Commit 9207e8b2 authored by Dean Camera's avatar Dean Camera
Browse files

Changed board LED driver implementations of LEDs_ToggleLEDs() for the AVR8...

Changed board LED driver implementations of LEDs_ToggleLEDs() for the AVR8 architecture to use the fast PIN register toggle alternative function for speed.
parent 395e4287
......@@ -152,8 +152,8 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= (LEDMask & LEDS_PORTD_LEDS);
PORTE ^= ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
PIND = (LEDMask & LEDS_PORTD_LEDS);
PINE = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -114,7 +114,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTB ^= LEDMask;
PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -126,7 +126,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -126,7 +126,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -151,7 +151,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -114,7 +114,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTF ^= LEDMask;
PINF = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -141,8 +141,8 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTB ^= (LEDMask & LEDS_PORTB_LEDS);
PORTD ^= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
PINB = (LEDMask & LEDS_PORTB_LEDS);
PIND = ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -118,7 +118,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -167,9 +167,9 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_USB2AX)
PORTC ^= LEDMask;
PINC = LEDMask;
#else
PORTD ^= LEDMask;
PIND = LEDMask;
#endif
}
......
......@@ -114,7 +114,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -126,7 +126,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -122,7 +122,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTB ^= LEDMask;
PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
......@@ -121,7 +121,7 @@
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTB ^= LEDMask;
PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment