sxkbd

Firmware for RP2040-based corne split keyboard
git clone https://git.sinitax.com/sinitax/sxkbd
Log | Files | Refs | Submodules | README | LICENSE | sfeed.txt

tinyusb.diff (864B)


      1 diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c
      2 index 90e2192c0..6a2735eaf 100644
      3 --- a/hw/bsp/rp2040/family.c
      4 +++ b/hw/bsp/rp2040/family.c
      5 @@ -118,7 +118,7 @@ void stdio_rtt_init(void)
      6  
      7  #endif
      8  
      9 -#ifdef UART_DEV
     10 +#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
     11  static uart_inst_t *uart_inst;
     12  #endif
     13  
     14 @@ -188,7 +188,7 @@ uint32_t board_button_read(void)
     15  
     16  int board_uart_read(uint8_t* buf, int len)
     17  {
     18 -#ifdef UART_DEV
     19 +#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
     20    for(int i=0;i<len;i++) {
     21      buf[i] = uart_getc(uart_inst);
     22    }
     23 @@ -201,7 +201,7 @@ int board_uart_read(uint8_t* buf, int len)
     24  
     25  int board_uart_write(void const * buf, int len)
     26  {
     27 -#ifdef UART_DEV
     28 +#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
     29    char const* bufch = (char const*) buf;
     30    for(int i=0;i<len;i++) {
     31      uart_putc(uart_inst, bufch[i]);