diff options
Diffstat (limited to 'LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h')
-rw-r--r-- | LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h b/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h index 3dd1dfe53..15ae804d4 100644 --- a/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h +++ b/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h @@ -79,24 +79,24 @@ #if !defined(__DOXYGEN__)
static inline void Buttons_Init(void)
{
- PORTE_OUTCLR = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
+ PORTE.OUTSET = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
- PORTCFG_MPCMASK = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
- PORTE_PIN0CTRL = PORT_OPC_PULLUP_gc;
+ PORTCFG.MPCMASK = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
+ PORTE.PIN0CTRL = (PORT_INVEN_bm | PORT_OPC_PULLUP_gc);
}
static inline void Buttons_Disable(void)
{
- PORTE_OUTCLR = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
+ PORTE.OUTCLR = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
- PORTCFG_MPCMASK = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
- PORTE_PIN0CTRL = 0;
+ PORTCFG.MPCMASK = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4);
+ PORTE.PIN0CTRL = 0;
}
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
- return (~PORTE_IN & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4));
+ return (PORTE_IN & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4));
}
#endif
|