mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
Sabre-6Quad: Fix sense of LED discrete output. It appears that a high value illuminates the LED.
This commit is contained in:
@@ -56,11 +56,11 @@ With this change, the NSH serial console works:
|
|||||||
But there are still no timer interrupts. LEDs do not appear to be working.
|
But there are still no timer interrupts. LEDs do not appear to be working.
|
||||||
|
|
||||||
2016-05-17: Timer interrupts now work. This turned out to be just a minor
|
2016-05-17: Timer interrupts now work. This turned out to be just a minor
|
||||||
bit setting error in the timer configuration. Timer appears to be too fast
|
bit setting error in the timer configuration. LEDs were not working simply
|
||||||
be about a factor of three, however.
|
because board_autoled_initialize() was not being called in the board startup
|
||||||
|
logic.
|
||||||
|
|
||||||
LEDs were not working simply because board_autoled_initialize() was not being
|
At this point, I would say that the basic NSH port is complete.
|
||||||
called in the board startup logic.
|
|
||||||
|
|
||||||
Platform Features
|
Platform Features
|
||||||
=================
|
=================
|
||||||
@@ -129,7 +129,7 @@ LEDs
|
|||||||
----
|
----
|
||||||
A single LED is available driven GPIO1_IO02. On the schematic this is
|
A single LED is available driven GPIO1_IO02. On the schematic this is
|
||||||
USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with
|
USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with
|
||||||
KEY_ROW6 (ALT2). A low value illuminates the LED.
|
KEY_ROW6 (ALT2). A high value illuminates the LED.
|
||||||
|
|
||||||
This LED is not used by the board port unless CONFIG_ARCH_LEDS is
|
This LED is not used by the board port unless CONFIG_ARCH_LEDS is
|
||||||
defined. In that case, the usage by the board port is defined in
|
defined. In that case, the usage by the board port is defined in
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
*
|
*
|
||||||
* A single LED is available driven GPIO1_IO02. On the schematic this is
|
* A single LED is available driven GPIO1_IO02. On the schematic this is
|
||||||
* USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with KEY_ROW6
|
* USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with KEY_ROW6
|
||||||
* (ALT2). A low value illuminates the LED.
|
* (ALT2). A high value illuminates the LED.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* LED index values for use with board_userled() */
|
/* LED index values for use with board_userled() */
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ void board_autoled_on(int led)
|
|||||||
{
|
{
|
||||||
if (led == 1 || led == 3)
|
if (led == 1 || led == 3)
|
||||||
{
|
{
|
||||||
imx_gpio_write(GPIO_LED, false); /* Low illuminates */
|
imx_gpio_write(GPIO_LED, true); /* High illuminates */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ void board_autoled_off(int led)
|
|||||||
{
|
{
|
||||||
if (led == 3)
|
if (led == 3)
|
||||||
{
|
{
|
||||||
imx_gpio_write(GPIO_LED, true); /* High extinguishes */
|
imx_gpio_write(GPIO_LED, false); /* Low extinguishes */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,12 +57,12 @@
|
|||||||
*
|
*
|
||||||
* A single LED is available driven GPIO1_IO02. On the schematic this is
|
* A single LED is available driven GPIO1_IO02. On the schematic this is
|
||||||
* USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with KEY_ROW6
|
* USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with KEY_ROW6
|
||||||
* (ALT2). A low value illuminates the LED.
|
* (ALT2). A high value illuminates the LED.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define IOMUX_LED (IOMUX_PULL_NONE | IOMUX_CMOS_OUTPUT | IOMUX_DRIVE_40OHM | \
|
#define IOMUX_LED (IOMUX_PULL_NONE | IOMUX_CMOS_OUTPUT | IOMUX_DRIVE_40OHM | \
|
||||||
IOMUX_SPEED_MEDIUM | IOMUX_SLEW_SLOW)
|
IOMUX_SPEED_MEDIUM | IOMUX_SLEW_SLOW)
|
||||||
#define GPIO_LED (GPIO_OUTPUT | GPIO_OUTPUT_ONE | GPIO_PORT1 | GPIO_PIN2 | \
|
#define GPIO_LED (GPIO_OUTPUT | GPIO_OUTPUT_ZERO | GPIO_PORT1 | GPIO_PIN2 | \
|
||||||
IOMUX_LED)
|
IOMUX_LED)
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user