add system LED initialisation
Change-Id: I79f1b769fc9dd7e1a972bacf0928ff46988f0e36
This commit is contained in:
parent
5c7d9805c2
commit
d25509abca
|
@ -27,6 +27,10 @@
|
|||
#define GPIO_PIN_FUNCTION_M 12
|
||||
#define GPIO_PIN_FUNCTION_N 13
|
||||
|
||||
/** LED pin to indicate system state (pull low to switch on */
|
||||
#define LED_SYSTEM GPIO(GPIO_PORTC, 18)
|
||||
|
||||
/** USB D+/D- pins */
|
||||
#define PA24 GPIO(GPIO_PORTA, 24)
|
||||
#define PA25 GPIO(GPIO_PORTA, 25)
|
||||
|
||||
|
|
|
@ -143,6 +143,11 @@ void system_init(void)
|
|||
{
|
||||
init_mcu();
|
||||
|
||||
// configure system LED
|
||||
gpio_set_pin_level(LED_SYSTEM, true); // switch off LED
|
||||
gpio_set_pin_direction(LED_SYSTEM, GPIO_DIRECTION_OUT);
|
||||
gpio_set_pin_function(LED_SYSTEM, GPIO_PIN_FUNCTION_OFF);
|
||||
|
||||
USB_DEVICE_INSTANCE_init();
|
||||
FLASH_0_init();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue