Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers.
This commit is contained in:
parent
a147cee95f
commit
5563da6a62
65 changed files with 422 additions and 16 deletions
|
|
@ -80,6 +80,12 @@
|
|||
PORTE &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRE &= ~LEDS_ALL_LEDS;
|
||||
PORTE &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTE |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,6 +92,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= (LEDMask & LEDS_ALL_LEDS);
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@
|
|||
PORTC |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRC &= ~LEDS_ALL_LEDS;
|
||||
PORTC &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTC &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,14 @@
|
|||
#if !defined(__DOXYGEN__)
|
||||
static inline void LEDs_Init(void)
|
||||
{
|
||||
DDRC |= LEDS_ALL_LEDS;
|
||||
DDRC |= LEDS_ALL_LEDS;
|
||||
PORTC &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRC &= ~LEDS_ALL_LEDS;
|
||||
PORTC &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
|
|
|
|||
|
|
@ -76,6 +76,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,13 @@
|
|||
static inline void Joystick_Init(void)
|
||||
{
|
||||
DDRD &= ~JOY_MASK;
|
||||
PORTD |= JOY_MASK;
|
||||
PORTD |= JOY_MASK;
|
||||
}
|
||||
|
||||
static inline void Joystick_Disable(void)
|
||||
{
|
||||
DDRD &= ~JOY_MASK;
|
||||
PORTD &= ~JOY_MASK;
|
||||
}
|
||||
|
||||
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
|
|
|||
|
|
@ -91,6 +91,12 @@
|
|||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRB &= ~LEDS_ALL_LEDS;
|
||||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
|
||||
{
|
||||
PORTB |= LedMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTE |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRE &= ~BUTTONS_BUTTON1;
|
||||
PORTE &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTE &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRE &= ~LEDS_ALL_LEDS;
|
||||
PORTE &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTE |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTE |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRE &= ~BUTTONS_BUTTON1;
|
||||
PORTE &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,11 +91,20 @@
|
|||
#if !defined(__DOXYGEN__)
|
||||
static inline void Joystick_Init(void)
|
||||
{
|
||||
DDRF &= ~(JOY_FMASK);
|
||||
DDRC &= ~(JOY_CMASK);
|
||||
DDRF &= ~JOY_FMASK;
|
||||
DDRC &= ~JOY_CMASK;
|
||||
|
||||
PORTF |= JOY_FMASK;
|
||||
PORTC |= JOY_CMASK;
|
||||
PORTF |= JOY_FMASK;
|
||||
PORTC |= JOY_CMASK;
|
||||
}
|
||||
|
||||
static inline void Joystick_Disable(void)
|
||||
{
|
||||
DDRF &= ~JOY_FMASK;
|
||||
DDRC &= ~JOY_CMASK;
|
||||
|
||||
PORTF &= ~JOY_FMASK;
|
||||
PORTC &= ~JOY_CMASK;
|
||||
}
|
||||
|
||||
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@
|
|||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRB &= ~LEDS_ALL_LEDS;
|
||||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTB |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTD |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@
|
|||
PORTD |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTD |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -102,6 +102,15 @@
|
|||
PORTE |= (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_PORTD_LEDS;
|
||||
PORTD &= ~LEDS_PORTD_LEDS;
|
||||
|
||||
DDRE &= ~(LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
|
||||
PORTE &= ~(LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= (LEDMask & LEDS_LED1);
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTB |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRB &= ~LEDS_ALL_LEDS;
|
||||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTB &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTE |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRE &= ~BUTTONS_BUTTON1;
|
||||
PORTE &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,11 +91,20 @@
|
|||
#if !defined(__DOXYGEN__)
|
||||
static inline void Joystick_Init(void)
|
||||
{
|
||||
DDRB &= ~(JOY_BMASK);
|
||||
DDRE &= ~(JOY_EMASK);
|
||||
DDRB &= ~JOY_BMASK;
|
||||
DDRE &= ~JOY_EMASK;
|
||||
|
||||
PORTB |= JOY_BMASK;
|
||||
PORTE |= JOY_EMASK;
|
||||
PORTB |= JOY_BMASK;
|
||||
PORTE |= JOY_EMASK;
|
||||
}
|
||||
|
||||
static inline void Joystick_Disable(void)
|
||||
{
|
||||
DDRB &= ~JOY_BMASK;
|
||||
DDRE &= ~JOY_EMASK;
|
||||
|
||||
PORTB &= ~JOY_BMASK;
|
||||
PORTE &= ~JOY_EMASK;
|
||||
}
|
||||
|
||||
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -90,7 +90,14 @@
|
|||
{
|
||||
DDRB &= ~JOY_BMASK;
|
||||
|
||||
PORTB |= JOY_BMASK;
|
||||
PORTB |= JOY_BMASK;
|
||||
}
|
||||
|
||||
static inline void Joystick_Disable(void)
|
||||
{
|
||||
DDRB &= ~JOY_BMASK;
|
||||
|
||||
PORTB &= ~JOY_BMASK;
|
||||
}
|
||||
|
||||
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -94,6 +94,12 @@
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
#if (BOARD == BOARD_TEENSY2)
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTE |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRE &= ~BUTTONS_BUTTON1;
|
||||
PORTE &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTF &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRF &= ~LEDS_ALL_LEDS;
|
||||
PORTF &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTF |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,6 +98,12 @@
|
|||
DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRB &= ~LEDS_PORTB_LEDS;
|
||||
DDRD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTB |= (LEDMask & LEDS_PORTB_LEDS);
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@
|
|||
PORTD |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -104,6 +104,17 @@
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
#if (BOARD == BOARD_USB2AX)
|
||||
DDRC &= ~LEDS_ALL_LEDS;
|
||||
PORTC &= ~LEDS_ALL_LEDS;
|
||||
#else
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
#if (BOARD == BOARD_USB2AX)
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
PORTD |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD &= ~LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTE |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRE &= ~BUTTONS_BUTTON1;
|
||||
PORTE &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,11 +91,20 @@
|
|||
#if !defined(__DOXYGEN__)
|
||||
static inline void Joystick_Init(void)
|
||||
{
|
||||
DDRB &= ~(JOY_BMASK);
|
||||
DDRE &= ~(JOY_EMASK);
|
||||
DDRB &= ~JOY_BMASK;
|
||||
DDRE &= ~JOY_EMASK;
|
||||
|
||||
PORTB |= JOY_BMASK;
|
||||
PORTE |= JOY_EMASK;
|
||||
PORTB |= JOY_BMASK;
|
||||
PORTE |= JOY_EMASK;
|
||||
}
|
||||
|
||||
static inline void Joystick_Disable(void)
|
||||
{
|
||||
DDRB &= ~JOY_BMASK;
|
||||
DDRE &= ~JOY_EMASK;
|
||||
|
||||
PORTB &= ~JOY_BMASK;
|
||||
PORTE &= ~JOY_EMASK;
|
||||
}
|
||||
|
||||
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@
|
|||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRD &= ~LEDS_ALL_LEDS;
|
||||
PORTD &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTD |= LEDMask;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@
|
|||
PORTD |= BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline void Buttons_Disable(void)
|
||||
{
|
||||
DDRD &= ~BUTTONS_BUTTON1;
|
||||
PORTD &= ~BUTTONS_BUTTON1;
|
||||
}
|
||||
|
||||
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Buttons_GetStatus(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@
|
|||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRB &= ~LEDS_ALL_LEDS;
|
||||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
|
||||
{
|
||||
PORTB |= LedMask;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@
|
|||
PORTB |= LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_Disable(void)
|
||||
{
|
||||
DDRB &= ~LEDS_ALL_LEDS;
|
||||
PORTB &= ~LEDS_ALL_LEDS;
|
||||
}
|
||||
|
||||
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
|
||||
{
|
||||
PORTB &= ~LEDMask;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue