Skip to content

Commit

Permalink
feat(pce): sets up kb2040 stemma connector to be used for uart logging
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertDaleSmith committed Mar 24, 2024
1 parent 371c09a commit b8b7b6a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/console/pcengine/pcengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#include "pcengine.h"
#include "hardware/clocks.h"

#if CFG_TUSB_DEBUG >= 1
#include "hardware/uart.h"
#endif

// Definition of global variables
uint32_t output_analog_1x = 0;
uint32_t output_analog_1y = 0;
Expand Down Expand Up @@ -48,6 +52,15 @@ static const int64_t reset_period = 600; // at 600us, reset the scan exclude fla
// init for pcengine communication
void pce_init()
{
#if CFG_TUSB_DEBUG >= 1
// Initialize chosen UART
uart_init(UART_ID, BAUD_RATE);

// Set the GPIO function for the UART pins
gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART);
gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART);
#endif

// use turbo button feature with PCE
turbo_init();

Expand Down

0 comments on commit b8b7b6a

Please sign in to comment.