Skip to content

Commit ffb60af

Browse files
committed
pbio/drv/ioport_debug: Drop it.
This was mostly unused, so investing time in cleaning this up is currently not worth it. This can be re-instated as part of the port mode that allows direct uart access when we suport it.
1 parent da71e11 commit ffb60af

File tree

9 files changed

+5
-138
lines changed

9 files changed

+5
-138
lines changed

bricks/_common/sources.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ PBIO_SRC_C = $(addprefix lib/pbio/,\
155155
drv/gpio/gpio_stm32l4.c \
156156
drv/imu/imu_lsm6ds3tr_c_stm32.c \
157157
drv/ioport/ioport_pup.c \
158-
drv/ioport/ioport_debug_uart.c \
159158
drv/led/led_array_pwm.c \
160159
drv/led/led_array.c \
161160
drv/led/led_core.c \

lib/pbio/drv/bluetooth/bluetooth_stm32_cc2640.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,9 @@
4545

4646
PROCESS(pbdrv_bluetooth_spi_process, "Bluetooth SPI");
4747

48-
#define DEBUG_ON_LAST_UART_PORT (0)
49-
50-
#if DEBUG_ON_LAST_UART_PORT
51-
#include <pbdrv/../../drv/ioport/ioport_debug_uart.h>
52-
#define DBG(...)
53-
#define DEBUG_PRINT(...)
54-
#define DEBUG_PRINT_PT PBDRV_IOPORT_DEBUG_UART_PT_PRINTF
55-
static void uart_poll_callback(pbdrv_uart_dev_t *uart) {
56-
process_poll(&pbdrv_bluetooth_spi_process);
57-
}
58-
#else
5948
#define DBG(...)
6049
#define DEBUG_PRINT(...)
6150
#define DEBUG_PRINT_PT(...)
62-
#endif
6351

6452
// hub name goes in special section so that it can be modified when flashing firmware
6553
__attribute__((section(".name")))
@@ -2271,14 +2259,6 @@ PROCESS_THREAD(pbdrv_bluetooth_spi_process, ev, data) {
22712259

22722260
PROCESS_BEGIN();
22732261

2274-
#if DEBUG_ON_LAST_UART_PORT
2275-
// Wait for the UART to be ready for debugging.
2276-
while (pbdrv_ioport_debug_uart_init(uart_poll_callback) != PBIO_SUCCESS) {
2277-
etimer_set(&timer, 100);
2278-
PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_TIMER && etimer_expired(&timer));
2279-
}
2280-
#endif // DEBUG_ON_LAST_UART_PORT
2281-
22822262
start:
22832263
// take Bluetooth chip out of reset
22842264
bluetooth_reset(RESET_STATE_OUT_HIGH);

lib/pbio/drv/ioport/ioport_debug_uart.c

Lines changed: 0 additions & 59 deletions
This file was deleted.

lib/pbio/drv/ioport/ioport_debug_uart.h

Lines changed: 0 additions & 48 deletions
This file was deleted.

lib/pbio/platform/city_hub/pbdrvconfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#define PBDRV_CONFIG_IOPORT_PUP (1)
4646
#define PBDRV_CONFIG_IOPORT_NUM_DEV (2)
4747
#define PBDRV_CONFIG_IOPORT_PUP_QUIRK_POWER_CYCLE (1)
48-
#define PBDRV_CONFIG_IOPORT_DEBUG_UART (0) // Doesn't work.
4948

5049
#define PBDRV_CONFIG_LED (1)
5150
#define PBDRV_CONFIG_LED_NUM_DEV (1)
@@ -55,7 +54,7 @@
5554
#define PBDRV_CONFIG_LEGODEV (1)
5655
#define PBDRV_CONFIG_LEGODEV_PUP (1)
5756
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_INT_DEV (0)
58-
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (2 - PBDRV_CONFIG_IOPORT_DEBUG_UART)
57+
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (2)
5958
#define PBDRV_CONFIG_LEGODEV_PUP_UART (1)
6059
#define PBDRV_CONFIG_LEGODEV_MODE_INFO (1)
6160
#define PBDRV_CONFIG_LEGODEV_PUP_UART_NUM_DEV (PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV)

lib/pbio/platform/essential_hub/pbdrvconfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
#define PBDRV_CONFIG_IOPORT_PUP (1)
7070
#define PBDRV_CONFIG_IOPORT_NUM_DEV (2)
7171
#define PBDRV_CONFIG_IOPORT_PUP_QUIRK_POWER_CYCLE (0)
72-
#define PBDRV_CONFIG_IOPORT_DEBUG_UART (0)
7372

7473
#define PBDRV_CONFIG_LED (1)
7574
#define PBDRV_CONFIG_LED_NUM_DEV (2)
@@ -79,7 +78,7 @@
7978
#define PBDRV_CONFIG_LEGODEV (1)
8079
#define PBDRV_CONFIG_LEGODEV_PUP (1)
8180
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_INT_DEV (0)
82-
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (2 - PBDRV_CONFIG_IOPORT_DEBUG_UART)
81+
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (2)
8382
#define PBDRV_CONFIG_LEGODEV_PUP_UART (1)
8483
#define PBDRV_CONFIG_LEGODEV_MODE_INFO (1)
8584
#define PBDRV_CONFIG_LEGODEV_PUP_UART_NUM_DEV (PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV)

lib/pbio/platform/move_hub/pbdrvconfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#define PBDRV_CONFIG_IOPORT_PUP (1)
4545
#define PBDRV_CONFIG_IOPORT_NUM_DEV (2)
4646
#define PBDRV_CONFIG_IOPORT_PUP_QUIRK_POWER_CYCLE (0)
47-
#define PBDRV_CONFIG_IOPORT_DEBUG_UART (0) // Doesn't work.
4847

4948
#define PBDRV_CONFIG_LED (1)
5049
#define PBDRV_CONFIG_LED_NUM_DEV (1)
@@ -54,7 +53,7 @@
5453
#define PBDRV_CONFIG_LEGODEV (1)
5554
#define PBDRV_CONFIG_LEGODEV_PUP (1)
5655
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_INT_DEV (2)
57-
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (2 - PBDRV_CONFIG_IOPORT_DEBUG_UART)
56+
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (2)
5857
#define PBDRV_CONFIG_LEGODEV_PUP_UART (1)
5958
#define PBDRV_CONFIG_LEGODEV_MODE_INFO (0) // Reduces build size by disabling some unused features of the protocol.
6059
#define PBDRV_CONFIG_LEGODEV_PUP_UART_NUM_DEV (PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV)

lib/pbio/platform/prime_hub/pbdrvconfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
#define PBDRV_CONFIG_IOPORT_PUP (1)
7171
#define PBDRV_CONFIG_IOPORT_NUM_DEV (6)
7272
#define PBDRV_CONFIG_IOPORT_PUP_QUIRK_POWER_CYCLE (0)
73-
#define PBDRV_CONFIG_IOPORT_DEBUG_UART (0)
7473

7574
#define PBDRV_CONFIG_LED (1)
7675
#define PBDRV_CONFIG_LED_NUM_DEV (5)
@@ -87,7 +86,7 @@
8786
#define PBDRV_CONFIG_LEGODEV (1)
8887
#define PBDRV_CONFIG_LEGODEV_PUP (1)
8988
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_INT_DEV (0)
90-
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (6 - PBDRV_CONFIG_IOPORT_DEBUG_UART)
89+
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (6)
9190
#define PBDRV_CONFIG_LEGODEV_PUP_UART (1)
9291
#define PBDRV_CONFIG_LEGODEV_MODE_INFO (1)
9392
#define PBDRV_CONFIG_LEGODEV_PUP_UART_NUM_DEV (PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV)

lib/pbio/platform/technic_hub/pbdrvconfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#define PBDRV_CONFIG_IOPORT_PUP (1)
5656
#define PBDRV_CONFIG_IOPORT_NUM_DEV (4)
5757
#define PBDRV_CONFIG_IOPORT_PUP_QUIRK_POWER_CYCLE (1)
58-
#define PBDRV_CONFIG_IOPORT_DEBUG_UART (0)
5958

6059
#define PBDRV_CONFIG_LED (1)
6160
#define PBDRV_CONFIG_LED_NUM_DEV (1)
@@ -65,7 +64,7 @@
6564
#define PBDRV_CONFIG_LEGODEV (1)
6665
#define PBDRV_CONFIG_LEGODEV_PUP (1)
6766
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_INT_DEV (0)
68-
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (4 - PBDRV_CONFIG_IOPORT_DEBUG_UART)
67+
#define PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV (4)
6968
#define PBDRV_CONFIG_LEGODEV_PUP_UART (1)
7069
#define PBDRV_CONFIG_LEGODEV_MODE_INFO (1)
7170
#define PBDRV_CONFIG_LEGODEV_PUP_UART_NUM_DEV (PBDRV_CONFIG_LEGODEV_PUP_NUM_EXT_DEV)

0 commit comments

Comments
 (0)