rename board path
This commit is contained in:
17
board/Sipeed_LonganNano/BSP/Src/mcu_init.c
Normal file
17
board/Sipeed_LonganNano/BSP/Src/mcu_init.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "mcu_init.h"
|
||||
|
||||
void board_init() {
|
||||
|
||||
SystemInit();
|
||||
|
||||
rcu_periph_clock_enable(RCU_GPIOA);
|
||||
rcu_periph_clock_enable(RCU_GPIOC);
|
||||
|
||||
gpio_init(LEDR_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LEDR_PIN);
|
||||
gpio_init(LEDG_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LEDG_PIN);
|
||||
gpio_init(LEDB_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LEDB_PIN);
|
||||
|
||||
gpio_bit_set(LEDR_GPIO_PORT, LEDR_PIN);
|
||||
gpio_bit_set(LEDG_GPIO_PORT, LEDG_PIN);
|
||||
gpio_bit_set(LEDB_GPIO_PORT, LEDB_PIN);
|
||||
}
|
Reference in New Issue
Block a user