Skip to content

Commit f6354c6

Browse files
committed
!debug city poweroff
1 parent bcf0ed3 commit f6354c6

6 files changed

Lines changed: 7 additions & 11 deletions

File tree

lib/pbio/drv/bluetooth/bluetooth.c

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

2222
#include "./bluetooth.h"
2323

24-
#define DEBUG 0
24+
#define DEBUG 1
2525

2626
#if DEBUG
2727
#include <pbio/debug.h>

lib/pbio/drv/bluetooth/bluetooth_stm32_cc2640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include "./bluetooth.h"
4444
#include "./bluetooth_stm32_cc2640.h"
4545

46-
#define DEBUG 0
46+
#define DEBUG 1
4747

4848
#if DEBUG
4949
#include <pbio/debug.h>

lib/pbio/drv/uart/uart_debug_first_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static pbio_error_t pbdrv_uart_debug_process_thread(pbio_os_state_t *state, void
8989
lwrb_init(&ring_buffer, ring_buf_storage, sizeof(ring_buf_storage));
9090
}
9191

92-
while (pbdrv_uart_get_instance(0, &debug_uart) != PBIO_SUCCESS) {
92+
while (pbdrv_uart_get_instance(1, &debug_uart) != PBIO_SUCCESS) {
9393
pbio_os_request_poll();
9494
PBIO_OS_AWAIT_ONCE(state);
9595
}

lib/pbio/platform/city_hub/pbdrvconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#define PBDRV_CONFIG_RESET_STM32_HAS_BLE_BOOTLOADER (1)
7272

7373
#define PBDRV_CONFIG_UART (1)
74-
#define PBDRV_CONFIG_UART_DEBUG_FIRST_PORT (0)
74+
#define PBDRV_CONFIG_UART_DEBUG_FIRST_PORT (1)
7575
#define PBDRV_CONFIG_UART_STM32F0 (1)
7676
#define PBDRV_CONFIG_UART_STM32F0_NUM_UART (2)
7777

lib/pbio/platform/city_hub/platform.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
178178
.uart_tx_alt_uart = 1, // USART3
179179
.uart_rx_alt_uart = 1, // USART3
180180
},
181-
#if PBDRV_CONFIG_UART_DEBUG_FIRST_PORT
182-
.supported_modes = PBIO_PORT_MODE_UART,
183-
#else // PBDRV_CONFIG_UART_DEBUG_FIRST_PORT
184181
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
185-
#endif
186182
},
187183
{
188184
.port_id = PBIO_PORT_ID_B,
@@ -200,7 +196,7 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
200196
.uart_tx_alt_uart = 0, // USART4
201197
.uart_rx_alt_uart = 0, // USART4
202198
},
203-
.supported_modes = PBIO_PORT_MODE_LEGO_DCM | PBIO_PORT_MODE_UART,
199+
.supported_modes = PBIO_PORT_MODE_UART,
204200
},
205201
};
206202

lib/pbio/src/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,8 @@ void pbio_port_power_off(void) {
554554
// We also want to turn off sensors powered through the motor terminals
555555
// and stop their processes from triggering any further actions.
556556
for (uint8_t i = 0; i < PBIO_CONFIG_PORT_NUM_DEV; i++) {
557-
pbio_port_t *port = &ports[i];
558-
pbio_port_set_mode(port, PBIO_PORT_MODE_NONE);
557+
// pbio_port_t *port = &ports[i];
558+
// pbio_port_set_mode(port, PBIO_PORT_MODE_NONE);
559559
}
560560

561561
// This turns off any sensor lights that run on VCC.

0 commit comments

Comments
 (0)