Added new LEDs_ToggleLEDs() function to the Board LEDs driver.
This commit is contained in:
@@ -88,24 +88,29 @@
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LedMask;
|
||||
PORTD |= LEDMask;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOffLEDs(const uint8_t LedMask)
|
||||
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD &= ~LedMask;
|
||||
PORTD &= ~LEDMask;
|
||||
}
|
||||
|
||||
static inline void LEDs_SetAllLEDs(const uint8_t LedMask)
|
||||
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LedMask);
|
||||
PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
|
||||
}
|
||||
|
||||
static inline void LEDs_ChangeLEDs(const uint8_t LedMask, const uint8_t ActiveMask)
|
||||
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
|
||||
{
|
||||
PORTD = ((PORTD & ~LedMask) | ActiveMask);
|
||||
PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
|
||||
}
|
||||
|
||||
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS));
|
||||
}
|
||||
|
||||
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
Reference in New Issue
Block a user