File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,6 @@ void board_init(void) {
59
59
// Without this, USB does not function.
60
60
HAL_InitTick ((1UL << __NVIC_PRIO_BITS ) - 1UL );
61
61
62
- initialize_discharge_pin ();
63
-
64
62
__HAL_RCC_GPIOE_CLK_ENABLE ();
65
63
GPIO_InitTypeDef GPIO_InitStruct ;
66
64
GPIO_InitStruct .Mode = GPIO_MODE_OUTPUT_PP ;
@@ -78,6 +76,7 @@ bool board_requests_safe_mode(void) {
78
76
}
79
77
80
78
void reset_board (void ) {
79
+ initialize_discharge_pin ();
81
80
}
82
81
83
82
void board_deinit (void ) {
Original file line number Diff line number Diff line change 64
64
65
65
#define DEFAULT_UART_BUS_RX (&pin_PA10)
66
66
#define DEFAULT_UART_BUS_TX (&pin_PA09)
67
+
68
+ #define SWAN_R5_DISCHARGE_3V3 (&pin_PE06)
69
+ #define SWAN_R5_ENABLE_3V3 (&pin_PE04)
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
86
86
87
87
{ MP_ROM_QSTR (MP_QSTR_ext ), MP_ROM_PTR (& carrier_type ) },
88
88
89
- { MP_ROM_QSTR (MP_QSTR_ENABLE_3V3 ), MP_ROM_PTR (& pin_PE04 ) },
90
- { MP_ROM_QSTR (MP_QSTR_DISCHARGE_3V3 ), MP_ROM_PTR (& pin_PE06 ) },
89
+ { MP_ROM_QSTR (MP_QSTR_ENABLE_3V3 ), MP_ROM_PTR (SWAN_R5_ENABLE_3V3 ) },
90
+ { MP_ROM_QSTR (MP_QSTR_DISCHARGE_3V3 ), MP_ROM_PTR (SWAN_R5_DISCHARGE_3V3 ) },
91
91
{ MP_ROM_QSTR (MP_QSTR_DISABLE_DISCHARGING ), MP_ROM_TRUE },
92
92
{ MP_ROM_QSTR (MP_QSTR_ENABLE_DISCHARGING ), MP_ROM_FALSE },
93
93
You can’t perform that action at this time.
0 commit comments