LPC4357 EVB: Ooops got sense of the LED GPIO backward
This commit is contained in:
parent
f2603866e0
commit
57e57bba36
|
@ -555,7 +555,7 @@ LED and Pushbuttons
|
|||
LED SIGNAL MCU
|
||||
D6 LED_3V3 PE_& GPIO7[7]
|
||||
|
||||
LED is grounded and a high output illuminates the LED.
|
||||
A low output illuminates the LED.
|
||||
|
||||
If CONFIG_ARCH_LEDS is defined, the LED will be controlled as follows
|
||||
for NuttX debug functionality (where NC means "No Change").
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
* D6 LED_3V3 PE_7 GPIO7[7]
|
||||
* ---- ------- -------------
|
||||
*
|
||||
* LED is grounded and a high output illuminates the LED.
|
||||
* A low output illuminates the LED.
|
||||
*
|
||||
* LED index values for use with lpc43_setled()
|
||||
*/
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
* D6 LED_3V3 PE_7 GPIO7[7]
|
||||
* ---- ------- -------------
|
||||
*
|
||||
* LED is grounded and a high output illuminates the LED.
|
||||
* A low output illuminates the LED.
|
||||
*
|
||||
* Definitions to configure LED pins as GPIOs:
|
||||
*
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
/* Definitions to configure LED GPIO as outputs */
|
||||
|
||||
#define GPIO_LED (GPIO_MODE_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT7 | GPIO_PIN7)
|
||||
#define GPIO_LED (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT7 | GPIO_PIN7)
|
||||
|
||||
/* Button definitions *******************************************************/
|
||||
/* to be provided */
|
||||
|
|
|
@ -155,21 +155,26 @@ void board_led_initialize(void)
|
|||
|
||||
void board_led_on(int led)
|
||||
{
|
||||
bool ledon = true; /* OFF. Low illuminates */
|
||||
|
||||
switch (led)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
lpc43_gpio_write(GPIO_LED, false); /* LED OFF */
|
||||
break;
|
||||
break; /* LED OFF until state 1 */
|
||||
|
||||
case 2: /* LED no change */
|
||||
break;
|
||||
case 2:
|
||||
return; /* LED no change */
|
||||
|
||||
case 1:
|
||||
case 3:
|
||||
lpc43_gpio_write(GPIO_LED, true); /* LED ON */
|
||||
ledon = false; /* LED ON. Low illuminates */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Turn LED on or off, depending on state */
|
||||
|
||||
lpc43_gpio_write(GPIO_LED, ledon);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -183,13 +188,16 @@ void board_led_off(int led)
|
|||
default:
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
break; /* LED no change */
|
||||
|
||||
case 3:
|
||||
lpc43_gpio_write(GPIO_LED, false); /* LED OFF */
|
||||
break;
|
||||
break; /* LED OFF */
|
||||
|
||||
case 2:
|
||||
return; /* LED no change */
|
||||
}
|
||||
|
||||
/* LED OFF, Low illuminates */
|
||||
|
||||
lpc43_gpio_write(GPIO_LED, true);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_LEDS */
|
||||
|
|
|
@ -149,7 +149,7 @@ void lpc43_setled(int led, bool ledon)
|
|||
{
|
||||
if (led == BOARD_LED)
|
||||
{
|
||||
lpc43_gpio_write(GPIO_LED, ledon);
|
||||
lpc43_gpio_write(GPIO_LED, !ledon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ void lpc43_setled(int led, bool ledon)
|
|||
|
||||
void lpc43_setleds(uint8_t ledset)
|
||||
{
|
||||
lpc43_gpio_write(GPIO_LED, (ledset & BOARD_LED_BIT) != 0);
|
||||
lpc43_gpio_write(GPIO_LED, (ledset & BOARD_LED_BIT) == 0);
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_ARCH_LEDS */
|
||||
|
|
|
@ -83,12 +83,12 @@ File Systems
|
|||
int losetup(FAR const char *devname, FAR const char *filename,
|
||||
uint16_t sectsize, off_t offset, bool readonly);
|
||||
|
||||
Give a file or character devices at 'filename', losetup will create the
|
||||
Given a file or character devices at 'filename', losetup will create the
|
||||
block device 'devname' using a bogus sector size of sectsize. 'offset' is
|
||||
normally zero but can be used to provide an offset into the EEPROM where
|
||||
the block driver data starts; The EEPROM block driver can also be read-
|
||||
only.
|
||||
|
||||
There is a corresponding function that will destory the loop device:
|
||||
There is a corresponding function that will destroy the loop device:
|
||||
|
||||
int loteardown(FAR const char *devname);
|
||||
|
|
Loading…
Reference in New Issue