X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/4d131de85b386b1ae948032e06831b0250e89070..01a80df6c2f61326e198f9dc9933df560da7379d:/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h 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