File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -53,14 +53,26 @@ void board_init(void) {
5353 // Set tick interrupt priority, default HAL value is intentionally invalid
5454 // Without this, USB does not function.
5555 HAL_InitTick ((1UL << __NVIC_PRIO_BITS ) - 1UL );
56+
57+ initialize_discharge_pin ();
58+
59+ __HAL_RCC_GPIOE_CLK_ENABLE ();
60+ GPIO_InitTypeDef GPIO_InitStruct ;
61+ GPIO_InitStruct .Mode = GPIO_MODE_OUTPUT_PP ;
62+ GPIO_InitStruct .Pull = GPIO_NOPULL ;
63+ GPIO_InitStruct .Speed = GPIO_SPEED_LOW ;
64+ GPIO_InitStruct .Pin = GPIO_PIN_2 ;
65+ HAL_GPIO_Init (GPIOE , & GPIO_InitStruct );
66+ HAL_GPIO_WritePin (GPIOE , GPIO_PIN_2 , GPIO_PIN_SET );
67+ HAL_Delay (50 );
68+ HAL_GPIO_WritePin (GPIOE , GPIO_PIN_2 , GPIO_PIN_RESET );
5669}
5770
5871bool board_requests_safe_mode (void ) {
5972 return false;
6073}
6174
6275void reset_board (void ) {
63- initialize_discharge_pin ();
6476}
6577
6678void board_deinit (void ) {
You can’t perform that action at this time.
0 commit comments