Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev).
Simplify some of the LED driver functions to produce more compact code.
This commit is contained in:
@@ -112,12 +112,12 @@
|
||||
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
|
||||
const uint8_t ActiveMask)
|
||||
{
|
||||
PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
|
||||
PORTD = ((PORTD & ~LEDMask) | ActiveMask);
|
||||
}
|
||||
|
||||
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS));
|
||||
PORTD ^= LEDMask;
|
||||
}
|
||||
|
||||
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
Reference in New Issue
Block a user