diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index 4052480dda5776920c8e3a7e177b94af3b937d35..04480d514306ab9701fa82f09cbfafe3de6efece 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -190,10 +190,16 @@ /* Type Defines: */ #if defined(__AVR32__) + /** Type define for an unsigned native word-sized chunk of data. */ typedef uint32_t uintN_t; + + /** Type define for a signed native word-sized chunk of data. */ typedef int32_t intN_t; #else + /** Type define for an unsigned native word-sized chunk of data. */ typedef uint8_t uintN_t; + + /** Type define for a signed native word-sized chunk of data. */ typedef int8_t intN_t; #endif #endif diff --git a/LUFA/DriverStubs/Buttons.h b/LUFA/DriverStubs/Buttons.h index deab56e9efd87bf8bd090ade7dd84c6c5e6908ab..8c97cd7503ccaa8ac58ffc37f56dc1588352902a 100644 --- a/LUFA/DriverStubs/Buttons.h +++ b/LUFA/DriverStubs/Buttons.h @@ -70,8 +70,7 @@ // TODO: Initialize the appropriate port pins as an inputs here, with pull-ups } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) { // TODO: Return current button status here, debounced if required } diff --git a/LUFA/DriverStubs/Joystick.h b/LUFA/DriverStubs/Joystick.h index 21e306f1e6f3738f41d2b3edc2738669f5901a49..859225f132c15cb97ad67f6fd28306907c7d55ba 100644 --- a/LUFA/DriverStubs/Joystick.h +++ b/LUFA/DriverStubs/Joystick.h @@ -82,8 +82,7 @@ // TODO: Initialize joystick port pins as inputs with pull-ups } - static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) { // TODO: Return current joystick position data which can be obtained by masking against the JOY_* macros } diff --git a/LUFA/DriverStubs/LEDs.h b/LUFA/DriverStubs/LEDs.h index 6bdc847d156e1d319f44a40b173bf243b5f0084a..1b34e58fd737f23cd773e997c77154ffeee4b912 100644 --- a/LUFA/DriverStubs/LEDs.h +++ b/LUFA/DriverStubs/LEDs.h @@ -84,33 +84,32 @@ // TODO: Add code to initialize LED port pins as outputs here } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { // TODO: Add code to turn on LEDs given in the LEDMask mask here, leave others as-is } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { // TODO: Add code to turn off LEDs given in the LEDMask mask here, leave others as-is } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t LEDMask) { // TODO: Add code to turn on only LEDs given in the LEDMask mask here, all others off } - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uintN_t LEDMask, const uintN_t ActiveMask) { // TODO: Add code to set the Leds in the given LEDMask to the status given in ActiveMask here } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { // TODO: Add code to toggle the Leds in the given LEDMask, ignoring all others } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { // TODO: Add code to return the current LEDs status' here which can be masked against LED_LED* macros } diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h b/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h index af95a894b7feb832d00756426b11c75a99f6804e..d26e0e8616f407fcf04e53240ddfa30f043759c5 100644 --- a/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h +++ b/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h @@ -79,8 +79,7 @@ PORTD |= BUTTONS_BUTTON1; } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) { return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1); } diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h index 2208f2e4019abfce55624e70ba6e24a9ea106e76..fb7e09ff46547157be472583fa69c3e52fc294b1 100644 --- a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h +++ b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h @@ -96,33 +96,32 @@ PORTD &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTD |= (LEDMask & LEDS_ALL_LEDS); } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTD &= ~(LEDMask & LEDS_ALL_LEDS); } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t LEDMask) { PORTD = (PORTD & ~LEDS_ALL_LEDS) | (LEDMask & LEDS_ALL_LEDS); } - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uintN_t LEDMask, const uintN_t ActiveMask) { PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS)); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (PORTD & LEDS_ALL_LEDS); } diff --git a/LUFA/Drivers/Board/BUMBLEB/Buttons.h b/LUFA/Drivers/Board/BUMBLEB/Buttons.h index e0a5cc5a9ac53b66c7bb45e6619a6d8ad53679de..166c97083abd1b73e92dccdd1c617e30c06ee0bc 100644 --- a/LUFA/Drivers/Board/BUMBLEB/Buttons.h +++ b/LUFA/Drivers/Board/BUMBLEB/Buttons.h @@ -81,8 +81,7 @@ PORTD |= BUTTONS_BUTTON1; } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) { return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1); } diff --git a/LUFA/Drivers/Board/BUMBLEB/Joystick.h b/LUFA/Drivers/Board/BUMBLEB/Joystick.h index 1809677596ff1fed4384af5929ef1bd705ba76d6..fdd4b03194b0dcf0fdd2d4bc3eb2f46b5c0a12ac 100644 --- a/LUFA/Drivers/Board/BUMBLEB/Joystick.h +++ b/LUFA/Drivers/Board/BUMBLEB/Joystick.h @@ -98,8 +98,7 @@ PORTD |= JOY_MASK; } - static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) { return (uint8_t)(~PIND & JOY_MASK); } diff --git a/LUFA/Drivers/Board/BUMBLEB/LEDs.h b/LUFA/Drivers/Board/BUMBLEB/LEDs.h index 549bbde62a9acef41a61c23a6e63ef9028a5484c..a5251be58217acbac896837b6235831fd76c27be 100644 --- a/LUFA/Drivers/Board/BUMBLEB/LEDs.h +++ b/LUFA/Drivers/Board/BUMBLEB/LEDs.h @@ -95,28 +95,27 @@ PORTB &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LedMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LedMask) { PORTB |= LedMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LedMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LedMask) { PORTB &= ~LedMask; } - static inline void LEDs_SetAllLEDs(const uint8_t LedMask) + static inline void LEDs_SetAllLEDs(const uintN_t LedMask) { PORTB = ((PORTB & ~LEDS_ALL_LEDS) | LedMask); } - static inline void LEDs_ChangeLEDs(const uint8_t LedMask, const uint8_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uintN_t LedMask, const uintN_t ActiveMask) { PORTB = ((PORTB & ~LedMask) | ActiveMask); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (PORTB & LEDS_ALL_LEDS); } diff --git a/LUFA/Drivers/Board/EVK1101/Buttons.h b/LUFA/Drivers/Board/EVK1101/Buttons.h index b827787c7d6eddbe37cf8d0ddae1d25f1d686fe8..0aa195f27ce0f057276b1f6216f8281359e47a52 100644 --- a/LUFA/Drivers/Board/EVK1101/Buttons.h +++ b/LUFA/Drivers/Board/EVK1101/Buttons.h @@ -82,8 +82,7 @@ AVR32_GPIO.port[1].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2); } - static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint32_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) { return (~AVR32_GPIO.port[1].pvr & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2)); } diff --git a/LUFA/Drivers/Board/EVK1101/Joystick.h b/LUFA/Drivers/Board/EVK1101/Joystick.h index 0bcc59c949a82c65cb704a8b89915d24a772ce8b..f02ec405fdd70b95d4b5ef7332f0d7db8d114b19 100644 --- a/LUFA/Drivers/Board/EVK1101/Joystick.h +++ b/LUFA/Drivers/Board/EVK1101/Joystick.h @@ -99,8 +99,7 @@ AVR32_GPIO.port[1].puers = JOY_MASK_PB; } - static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint32_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) { return ((~AVR32_GPIO.port[1].pvr & JOY_MASK_PB) | (~AVR32_GPIO.port[0].pvr & JOY_MASK_PA)); diff --git a/LUFA/Drivers/Board/EVK1101/LEDs.h b/LUFA/Drivers/Board/EVK1101/LEDs.h index f19e464d72c47173fe1c5aecf40797be6bb6a2ce..9b341695c74a408bfcaa4d5f55e293b390ba5963 100644 --- a/LUFA/Drivers/Board/EVK1101/LEDs.h +++ b/LUFA/Drivers/Board/EVK1101/LEDs.h @@ -94,35 +94,34 @@ AVR32_GPIO.port[0].ovrs = LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { AVR32_GPIO.port[0].ovrc = LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint32_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { AVR32_GPIO.port[0].ovrs = LEDMask; } - static inline void LEDs_SetAllLEDs(const uint32_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t LEDMask) { AVR32_GPIO.port[0].ovrs = LEDS_ALL_LEDS; AVR32_GPIO.port[0].ovrc = LEDMask; } - static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uintN_t LEDMask, const uintN_t ActiveMask) { AVR32_GPIO.port[0].ovrs = LEDMask; AVR32_GPIO.port[0].ovrc = ActiveMask; } - static inline void LEDs_ToggleLEDs(const uint32_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { AVR32_GPIO.port[0].ovrt = LEDMask; } - static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint32_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (AVR32_GPIO.port[0].ovr & LEDS_ALL_LEDS); } diff --git a/LUFA/Drivers/Board/EVK527/Buttons.h b/LUFA/Drivers/Board/EVK527/Buttons.h index 0150fa151ed15c1bacd9bd13e7ee77c93fc739ed..950c5742d069e12723c6890437f81cb3bb6791bd 100644 --- a/LUFA/Drivers/Board/EVK527/Buttons.h +++ b/LUFA/Drivers/Board/EVK527/Buttons.h @@ -85,8 +85,7 @@ PORTE |= BUTTONS_BUTTON1; } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) { return ((PINE & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1); } diff --git a/LUFA/Drivers/Board/EVK527/Joystick.h b/LUFA/Drivers/Board/EVK527/Joystick.h index 7d208ea9fdf0e10775df123658d2d4e212d8ef12..d8583d19dc5502344b939912731b6f7713741212 100644 --- a/LUFA/Drivers/Board/EVK527/Joystick.h +++ b/LUFA/Drivers/Board/EVK527/Joystick.h @@ -68,7 +68,7 @@ /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) /* Macros: */ - #define JOY_FMASK ((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)) + #define JOY_FMASK ((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)) #define JOY_CMASK (1 << 6)) #endif @@ -100,8 +100,7 @@ PORTC |= JOY_CMASK; } - static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) { return (((uint8_t)~PINF & JOY_FMASK) | (((uint8_t)~PINC & JOY_CMASK) >> 3)); } diff --git a/LUFA/Drivers/Board/EVK527/LEDs.h b/LUFA/Drivers/Board/EVK527/LEDs.h index ea7c7c2c718dc938113cdb8300e85d0e4d5fa526..d01a8148084d1295cbc81c3bfdde8585d8c08b4c 100644 --- a/LUFA/Drivers/Board/EVK527/LEDs.h +++ b/LUFA/Drivers/Board/EVK527/LEDs.h @@ -90,32 +90,31 @@ PORTD &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTD |= LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTD &= ~LEDMask; } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t 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 uintN_t LEDMask, const uintN_t ActiveMask) { PORTD = ((PORTD & ~LEDMask) | ActiveMask); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { return (PORTD & LEDS_ALL_LEDS); diff --git a/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h b/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h index d095d6e0f0cad4b8a3af1ed0c925ac06e4d1206a..e33aa862bc0abff3e94564f44ad1ada826c43aa9 100644 --- a/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h +++ b/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h @@ -106,21 +106,21 @@ PORTE |= (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT); } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTD |= (LEDMask & LEDS_LED1); PORTD &= ~(LEDMask & LEDS_LED2); PORTE &= ~((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTD &= ~(LEDMask & LEDS_LED1); PORTD |= (LEDMask & LEDS_LED2); PORTE |= ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t LEDMask) { PORTD = (((PORTD & ~LEDS_LED1) | (LEDMask & LEDS_LED1)) | ((PORTD | LEDS_LED2) & ~(LEDMask & LEDS_LED2))); @@ -128,7 +128,7 @@ ~((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT)); } - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uintN_t LEDMask, const uintN_t ActiveMask) { PORTD = (((PORTD & ~(LEDMask & LEDS_LED1)) | (ActiveMask & LEDS_LED1)) | ((PORTD | (LEDMask & LEDS_LED2)) & ~(ActiveMask & LEDS_LED2))); @@ -136,13 +136,12 @@ ~((ActiveMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT)); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTD ^ (LEDMask & LEDS_PORTD_LEDS)); PORTE = (PORTE ^ ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { return (((PORTD & LEDS_LED1) | (~PORTD & LEDS_LED2)) | diff --git a/LUFA/Drivers/Board/STK525/Buttons.h b/LUFA/Drivers/Board/STK525/Buttons.h index f3dccafd9abb2bce79d71ec611d29e067554ed61..e70822ea4010c1a29a9054bf865bdb885bcb8de3 100644 --- a/LUFA/Drivers/Board/STK525/Buttons.h +++ b/LUFA/Drivers/Board/STK525/Buttons.h @@ -85,8 +85,7 @@ PORTE |= BUTTONS_BUTTON1; } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) { return ((PINE & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1); } diff --git a/LUFA/Drivers/Board/STK525/Joystick.h b/LUFA/Drivers/Board/STK525/Joystick.h index 6358f957e6ef7343aa0d61f432889754faf0c290..aab650d98b92eae2eb16a4366c5f84f862d84a63 100644 --- a/LUFA/Drivers/Board/STK525/Joystick.h +++ b/LUFA/Drivers/Board/STK525/Joystick.h @@ -100,8 +100,7 @@ PORTE |= JOY_EMASK; } - static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) { return (((uint8_t)~PINB & JOY_BMASK) | (((uint8_t)~PINE & JOY_EMASK) >> 1)); } diff --git a/LUFA/Drivers/Board/STK525/LEDs.h b/LUFA/Drivers/Board/STK525/LEDs.h index b54a8c987d4167bea6722777f95dbc0fc1be8fca..1f2e9a2b0e4d4d199aa175ceeee7a1d369cc288b 100644 --- a/LUFA/Drivers/Board/STK525/LEDs.h +++ b/LUFA/Drivers/Board/STK525/LEDs.h @@ -93,33 +93,32 @@ PORTD &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTD |= LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTD &= ~LEDMask; } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t 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 uintN_t LEDMask, const uintN_t ActiveMask) { PORTD = ((PORTD & ~LEDMask) | ActiveMask); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (PORTD & LEDS_ALL_LEDS); } diff --git a/LUFA/Drivers/Board/STK526/Buttons.h b/LUFA/Drivers/Board/STK526/Buttons.h index f480560f65566a7516bf615b654939a017f61cb3..56af91f29e1fe5337c9ad5b42dba44ef3b20847c 100644 --- a/LUFA/Drivers/Board/STK526/Buttons.h +++ b/LUFA/Drivers/Board/STK526/Buttons.h @@ -85,8 +85,8 @@ PORTD |= BUTTONS_BUTTON1; } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; + static inline uintN_t Buttons_GetStatus(void) { return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1); } diff --git a/LUFA/Drivers/Board/STK526/Joystick.h b/LUFA/Drivers/Board/STK526/Joystick.h index b095536aa7a13cdc905f37ebe68d35faab408d82..f17e280beac42d51c79443a3c442a76d07ed1e7f 100644 --- a/LUFA/Drivers/Board/STK526/Joystick.h +++ b/LUFA/Drivers/Board/STK526/Joystick.h @@ -97,8 +97,8 @@ PORTB |= JOY_BMASK; } - static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; + static inline uintN_t Joystick_GetStatus(void) { return ((uint8_t)~PINB & JOY_BMASK); } diff --git a/LUFA/Drivers/Board/STK526/LEDs.h b/LUFA/Drivers/Board/STK526/LEDs.h index d1ac493adbaa6bb2b8662ea9a039f7d100e4f3b5..fdae8f577231119d51de93b13e4a17eb824ccd7b 100644 --- a/LUFA/Drivers/Board/STK526/LEDs.h +++ b/LUFA/Drivers/Board/STK526/LEDs.h @@ -93,33 +93,32 @@ PORTD &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTD |= LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTD &= ~LEDMask; } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t 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 uintN_t LEDMask, const uintN_t ActiveMask) { PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS)); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (PORTD & LEDS_ALL_LEDS); } diff --git a/LUFA/Drivers/Board/USBKEY/Buttons.h b/LUFA/Drivers/Board/USBKEY/Buttons.h index db1391c8e1e35659d754ba20ce4332e2901b347a..471a19ad2f743c8fc7d4a0b7e611defff57e2a1a 100644 --- a/LUFA/Drivers/Board/USBKEY/Buttons.h +++ b/LUFA/Drivers/Board/USBKEY/Buttons.h @@ -79,8 +79,8 @@ PORTE |= BUTTONS_BUTTON1; } - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) + static inline uintN_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; + static inline uintN_t Buttons_GetStatus(void) { return ((PINE & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1); } diff --git a/LUFA/Drivers/Board/USBKEY/Joystick.h b/LUFA/Drivers/Board/USBKEY/Joystick.h index b0829914b085d67e3a26bf45d102017f11bb2584..b6dd8d17df98593b0b481ae0be8f9eeb57abd569 100644 --- a/LUFA/Drivers/Board/USBKEY/Joystick.h +++ b/LUFA/Drivers/Board/USBKEY/Joystick.h @@ -100,8 +100,8 @@ PORTE |= JOY_EMASK; } - static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Joystick_GetStatus(void) + static inline uintN_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; + static inline uintN_t Joystick_GetStatus(void) { return (((uint8_t)~PINB & JOY_BMASK) | (((uint8_t)~PINE & JOY_EMASK) >> 1)); } diff --git a/LUFA/Drivers/Board/USBKEY/LEDs.h b/LUFA/Drivers/Board/USBKEY/LEDs.h index e1a5b23147bf6cfac946b07847bc768f6ac4b45b..0864be82dfa2e7fdfa8979dde1153beb3010f719 100644 --- a/LUFA/Drivers/Board/USBKEY/LEDs.h +++ b/LUFA/Drivers/Board/USBKEY/LEDs.h @@ -93,33 +93,32 @@ PORTD &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTD |= LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTD &= ~LEDMask; } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t 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 uintN_t LEDMask, const uintN_t ActiveMask) { PORTD = ((PORTD & ~LEDMask) | ActiveMask); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (PORTD & LEDS_ALL_LEDS); } diff --git a/LUFA/Drivers/Board/XPLAIN/LEDs.h b/LUFA/Drivers/Board/XPLAIN/LEDs.h index add868d20b7a69eecc1b4019536eb294a463f593..2c80aa702b2ad104e377a83f0de49157f2b1f2a1 100644 --- a/LUFA/Drivers/Board/XPLAIN/LEDs.h +++ b/LUFA/Drivers/Board/XPLAIN/LEDs.h @@ -84,33 +84,32 @@ PORTB |= LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOnLEDs(const uintN_t LEDMask) { PORTB &= ~LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + static inline void LEDs_TurnOffLEDs(const uintN_t LEDMask) { PORTB |= LEDMask; } - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + static inline void LEDs_SetAllLEDs(const uintN_t LEDMask) { PORTB = ((PORTB | LEDS_ALL_LEDS) & ~LEDMask); } - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uintN_t LEDMask, const uintN_t ActiveMask) { PORTB = ((PORTB | (LEDMask & LEDS_ALL_LEDS)) & (~ActiveMask & LEDS_ALL_LEDS)); } - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + static inline void LEDs_ToggleLEDs(const uintN_t LEDMask) { PORTD = (PORTB ^ (LEDMask & LEDS_ALL_LEDS)); } - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) + static inline uintN_t LEDs_GetLEDs(void) { return (~PORTB & LEDS_ALL_LEDS); }