add system LED definition
Change-Id: I97dc71ac00b64fdd05e0ff4c7e16e1b68b57b695
This commit is contained in:
parent
ccbed0b1df
commit
5908a5ccc6
|
@ -1044,6 +1044,13 @@ drivers:
|
|||
configuration:
|
||||
usb_gclk_selection: Generic clock generator 1
|
||||
pads:
|
||||
LED_system:
|
||||
name: PC18
|
||||
definition: Atmel:SAME54_Drivers:0.0.1::SAME54P20A-AU::pad::PC18
|
||||
mode: Digital output
|
||||
user_label: LED_system
|
||||
configuration:
|
||||
pad_initial_level: High
|
||||
PA24:
|
||||
name: PA24
|
||||
definition: Atmel:SAME54_Drivers:0.0.1::SAME54P20A-AU::pad::PA24
|
||||
|
|
|
@ -31,5 +31,6 @@
|
|||
#define PA25 GPIO(GPIO_PORTA, 25)
|
||||
#define PB24 GPIO(GPIO_PORTB, 24)
|
||||
#define PB25 GPIO(GPIO_PORTB, 25)
|
||||
#define LED_system GPIO(GPIO_PORTC, 18)
|
||||
|
||||
#endif // ATMEL_START_PINS_H_INCLUDED
|
||||
|
|
|
@ -176,6 +176,20 @@ void system_init(void)
|
|||
{
|
||||
init_mcu();
|
||||
|
||||
// GPIO on PC18
|
||||
|
||||
gpio_set_pin_level(LED_system,
|
||||
// <y> Initial level
|
||||
// <id> pad_initial_level
|
||||
// <false"> Low
|
||||
// <true"> High
|
||||
true);
|
||||
|
||||
// Set pin direction to output
|
||||
gpio_set_pin_direction(LED_system, GPIO_DIRECTION_OUT);
|
||||
|
||||
gpio_set_pin_function(LED_system, GPIO_PIN_FUNCTION_OFF);
|
||||
|
||||
UART_debug_init();
|
||||
|
||||
USB_DEVICE_INSTANCE_init();
|
||||
|
|
Loading…
Reference in New Issue