configs/imxrt1050-evk: Add logic to support user LED
This commit is contained in:
parent
8de51543a4
commit
459b9ec262
@ -48,6 +48,8 @@
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include "imxrt_gpio.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
@ -55,6 +57,23 @@
|
||||
|
||||
/* i.MX RT 1050 GPIO Pin Definitions ************************************************/
|
||||
|
||||
/* LEDs
|
||||
*
|
||||
* There is only 1 user LED available on the IMXRT board that
|
||||
* can be turned on and off. The LEDs can be activated by driving the
|
||||
* connected I/O line to GND..
|
||||
*
|
||||
* ---------- ----------- ---------------------
|
||||
* IMXRT Function Shared functionality
|
||||
* GPIO
|
||||
* ---------- ----------- ---------------------
|
||||
* GPIO1 PIN9 USER LED
|
||||
* ---------- ----------- ---------------------
|
||||
*/
|
||||
|
||||
#define GPIO_LED0 (GPIO_OUTPUT | GPIO_OUTPUT_ZERO | \
|
||||
GPIO_PORT1 | GPIO_PIN9)
|
||||
|
||||
/************************************************************************************
|
||||
* Public Types
|
||||
************************************************************************************/
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "imxrt_gpio.h"
|
||||
#include "imxrt1050-evk.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -62,7 +63,8 @@
|
||||
void board_userled_initialize(void)
|
||||
{
|
||||
/* Configure LED GPIOs for output */
|
||||
#warning Missing logic
|
||||
|
||||
imxrt_config_gpio(GPIO_LED0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -71,7 +73,7 @@ void board_userled_initialize(void)
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
#warning Missing logic
|
||||
imxrt_gpio_write(GPIO_LED0, !ledon); /* Low illuminates */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -80,5 +82,7 @@ void board_userled(int led, bool ledon)
|
||||
|
||||
void board_userled_all(uint8_t ledset)
|
||||
{
|
||||
#warning Missing logic
|
||||
/* Low illuminates */
|
||||
|
||||
imxrt_gpio_write(GPIO_LED0, (ledset & BOARD_USERLED_BIT) == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user