Skip to content

Commit

Permalink
[firmware] Add macro to switch off enclosure LED
Browse files Browse the repository at this point in the history
If macro ENCLOSURE_LED_OFF is enabled in the LUFAConfig.h file,
the enclosure LED will be switched off after bootup. The macro is
disabled by default.
  • Loading branch information
KapuKapu committed Feb 6, 2016
1 parent 347d87e commit bd67f6b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Firmware/LUFAConfig.h
Expand Up @@ -64,6 +64,7 @@
// #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
// #define NO_LIMITED_CONTROLLER_CONNECT
// #define NO_SOF_EVENTS
// #define ENCLOSURE_LED_OFF
/* USB Device Mode Driver Related Tokens: */
// #define USE_RAM_DESCRIPTORS
#define USE_FLASH_DESCRIPTORS
Expand Down
5 changes: 5 additions & 0 deletions Firmware/Lightpack.c
Expand Up @@ -148,6 +148,7 @@ int main(void)
enableWatchdog();
SetupHardware();
_WaveSwitchOnUsbLed(100, 100);

// Led driver ports initialization
LedDriver_Init();

Expand All @@ -159,6 +160,10 @@ int main(void)

sei();

#ifdef ENCLOSURE_LED_OFF
CLR(USBLED);
#endif

for (;;)
{
wdt_reset();
Expand Down
2 changes: 1 addition & 1 deletion Firmware/Lightpack.h
Expand Up @@ -78,7 +78,7 @@ static inline void _BlinkUsbLed(const uint8_t times, const uint8_t ms)
}

static inline void _WaveSwitchOnUsbLed(const uint8_t num, const uint8_t target)
{
{
for (uint8_t pwm = 0; pwm < num; pwm++)
{
CLR(USBLED);
Expand Down

0 comments on commit bd67f6b

Please sign in to comment.