Skip to content

Commit da722c8

Browse files
committed
!debug: Enable debug prints for port B
disabled protocol on other ports to simplify debugging also increases size of debug buffer
1 parent 818f4d0 commit da722c8

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/pbio/platform/prime_hub/pbdrvconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119

120120
#define PBDRV_CONFIG_USB (1)
121121
#define PBDRV_CONFIG_USB_MAX_PACKET_SIZE (64)
122-
#define PBDRV_CONFIG_USB_NUM_BUFFERED_PACKETS (2)
122+
#define PBDRV_CONFIG_USB_NUM_BUFFERED_PACKETS (64)
123123
#define PBDRV_CONFIG_USB_VID LEGO_USB_VID
124124
#define PBDRV_CONFIG_USB_PID 0xFFFF
125125
#define PBDRV_CONFIG_USB_PID_0 LEGO_USB_PID_SPIKE_PRIME

lib/pbio/platform/prime_hub/platform.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
229229
#if PBDRV_CONFIG_UART_DEBUG_FIRST_PORT
230230
.supported_modes = PBIO_PORT_MODE_UART,
231231
#else // PBDRV_CONFIG_UART_DEBUG_FIRST_PORT
232-
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
232+
.supported_modes = PBIO_PORT_MODE_UART,
233233
#endif
234234
},
235235
{
@@ -266,7 +266,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
266266
.uart_tx_alt_uart = GPIO_AF8_UART8,
267267
.uart_rx_alt_uart = GPIO_AF8_UART8,
268268
},
269-
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
269+
.supported_modes = PBIO_PORT_MODE_UART,
270270
},
271271
{
272272
.port_id = PBIO_PORT_ID_D,
@@ -284,7 +284,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
284284
.uart_tx_alt_uart = GPIO_AF8_UART5,
285285
.uart_rx_alt_uart = GPIO_AF8_UART5,
286286
},
287-
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
287+
.supported_modes = PBIO_PORT_MODE_UART,
288288
},
289289
{
290290
.port_id = PBIO_PORT_ID_E,
@@ -302,7 +302,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
302302
.uart_tx_alt_uart = GPIO_AF11_UART10,
303303
.uart_rx_alt_uart = GPIO_AF11_UART10,
304304
},
305-
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
305+
.supported_modes = PBIO_PORT_MODE_UART,
306306
},
307307
{
308308
.port_id = PBIO_PORT_ID_F,
@@ -320,7 +320,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
320320
.uart_tx_alt_uart = GPIO_AF11_UART9,
321321
.uart_rx_alt_uart = GPIO_AF11_UART9,
322322
},
323-
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
323+
.supported_modes = PBIO_PORT_MODE_UART,
324324
},
325325
};
326326

lib/pbio/src/port_lump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <pbdrv/clock.h>
1818
#include <pbdrv/ioport.h>
1919

20-
#define DEBUG 0
20+
#define DEBUG 1
2121
#if DEBUG
2222
#include <stdio.h>
2323
#include <inttypes.h>

0 commit comments

Comments
 (0)