OTG leds removed from blink example to prevent OTG-FAULT shartcut on the boards
This commit is contained in:
parent
d0b36a4b30
commit
9dc54edf00
|
@ -7,16 +7,15 @@
|
|||
#define LED_BLUE PD15 //58
|
||||
#define LED_RED PD13 //19
|
||||
#define LED_ORANGE PD13 //57
|
||||
#define LED_RED_OTG_OVERCURRENT PD5
|
||||
|
||||
*/
|
||||
|
||||
#define NUMLEDS 5
|
||||
const uint8_t Led[] = {LED_GREEN, LED_ORANGE, LED_RED, LED_BLUE, LED_RED_OTG_OVERCURRENT};
|
||||
#define NUMLEDS 4
|
||||
const uint8_t Led[] = {LED_GREEN, LED_ORANGE, LED_RED, LED_BLUE};
|
||||
|
||||
void setup()
|
||||
{
|
||||
for (int n = 0; n < NUMLEDS; n++) pinMode(Led[n], OUTPUT);
|
||||
//pinMode(REDLEDOTGOVERCURRENT,PULL_UP); // needed to protect STMPS2141 FAULT output from shortcutting PC5 on power fault
|
||||
}
|
||||
|
||||
void setLed(uint8_t n, uint8_t state)
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
// STM32F429 Discovery
|
||||
|
||||
#define GREENLED PG13
|
||||
|
||||
#define REDLED PG14
|
||||
#define OTGFSOC_LED PC5
|
||||
|
||||
#define NUMLEDS 3
|
||||
const uint8_t Led[] = {GREENLED, REDLED, OTGFSOC_LED};
|
||||
#define NUMLEDS 2
|
||||
const uint8_t Led[] = {GREENLED, REDLED};
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define LED_BLUE PD15 // 58
|
||||
#define LED_RED PD14 // 19
|
||||
#define LED_ORANGE PD13 // 57
|
||||
#define LED_RED_OTG_OVERCURRENT PD5
|
||||
#define LED_RED_OTG_OVERCURRENT PD5 // be careful with this led. When using it configure the output as PULL_UP.
|
||||
|
||||
//On-board user button
|
||||
#define USER_BTN PA0 // 2
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef VARIANT_H
|
||||
#define VARIANT_H
|
||||
|
||||
//On-board LED pin number PIN
|
||||
#define LED_BUILTIN PG13
|
||||
#define LED_GREEN LED_BUILTIN
|
||||
#define LED_RED PG14
|
||||
#define LED_RED_OTG_OVERCURRENT PC5
|
||||
#define LED_RED_OTG_OVERCURRENT PC5 // be careful with this led. When using it configure the output as PULL_UP.
|
||||
|
||||
//On-board user button
|
||||
#define USER_BTN PA0
|
||||
|
|
Loading…
Reference in New Issue