Sabre-6Quad: Add some pin disambiguatino logic

This commit is contained in:
Gregory Nutt
2016-03-07 09:03:41 -06:00
parent e1d024039a
commit cb0b518042
3 changed files with 26 additions and 18 deletions
+2 -1
View File
@@ -77,7 +77,8 @@ Serial Console
==============
A DEBUG VCOM is available MICRO USB AB 5 J509. This corresponds to UART1
from the i.MX6.
from the i.MX6. UART1 connects to J509 via the CSIO_DAT10 and CSIO_DAT11
pins
Configurations
==============
+21 -15
View File
@@ -55,31 +55,31 @@
/* LED index values for use with board_userled() */
#define BOARD_LED0 0
#define BOARD_NLEDS 1
#define BOARD_LED0 0
#define BOARD_NLEDS 1
/* LED bits for use with board_userled_all() */
#define BOARD_LED0_BIT (1 << BOARD_LED0)
#define BOARD_LED0_BIT (1 << BOARD_LED0)
/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
* defined. In that case, the usage by the board port is defined in
* include/board.h and src/sam_autoleds.c. The LEDs are used to encode
* OS-related events as follows:
*
* ------------------- ---------------------------- ------
* SYMBOL Meaning LED
* ------------------- ---------------------------- ------ */
* ---------------------- ---------------------------- ------
* SYMBOL Meaning LED
* ---------------------- ---------------------------- ------ */
#define LED_STARTED 0 /* NuttX has been started OFF */
#define LED_HEAPALLOCATE 0 /* Heap has been allocated OFF */
#define LED_IRQSENABLED 0 /* Interrupts enabled OFF */
#define LED_STACKCREATED 1 /* Idle stack created ON */
#define LED_INIRQ 2 /* In an interrupt N/C */
#define LED_SIGNAL 2 /* In a signal handler N/C */
#define LED_ASSERTION 2 /* An assertion failed N/C */
#define LED_PANIC 3 /* The system has crashed FLASH */
#undef LED_IDLE /* MCU is is sleep mode Not used */
#define LED_STARTED 0 /* NuttX has been started OFF */
#define LED_HEAPALLOCATE 0 /* Heap has been allocated OFF */
#define LED_IRQSENABLED 0 /* Interrupts enabled OFF */
#define LED_STACKCREATED 1 /* Idle stack created ON */
#define LED_INIRQ 2 /* In an interrupt N/C */
#define LED_SIGNAL 2 /* In a signal handler N/C */
#define LED_ASSERTION 2 /* An assertion failed N/C */
#define LED_PANIC 3 /* The system has crashed FLASH */
#undef LED_IDLE /* MCU is is sleep mode Not used */
/* Thus is LED is statically on, NuttX has successfully booted and is,
* apparently, running normally. If LED is flashing at approximately
@@ -89,6 +89,12 @@
/* Button definitions ***************************************************************/
/* GPIO Disambiguation **************************************************************/
/* A DEBUG VCOM is available MICRO USB AB 5 J509. This corresponds to UART1 from
* the i.MX6. UART1 connects to J509 via the CSIO_DAT10 and CSIO_DAT11 pins:
*/
#define GPIO_UART1_RX_DATA GPIO_UART1_RX_DATA_2
#define GPIO_UART1_TX_DATA GPIO_UART1_TX_DATA_2
/************************************************************************************
* Public Types
+3 -2
View File
@@ -72,6 +72,7 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "up_arch.h"
#include "imx_gpio.h"
#include "sabre-6quad.h"
@@ -116,7 +117,7 @@ void board_autoled_on(int led)
{
if (led == 1 || led == 3)
{
imx_gpiowrite(GPIO_LED0, false); /* Low illuminates */
imx_gpio_write(GPIO_LED0, false); /* Low illuminates */
}
}
@@ -128,7 +129,7 @@ void board_autoled_off(int led)
{
if (led == 3)
{
imx_gpiowrite(GPIO_LED0, true); /* High extinguishes */
imx_gpio_write(GPIO_LED0, true); /* High extinguishes */
}
}