Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoHood committed Oct 3, 2015
1 parent af5300d commit 7b01fe1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/PinChangeInterrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ extern uint8_t fallingPorts[PCINT_NUM_USED_PORTS];
extern uint8_t risingPorts[PCINT_NUM_USED_PORTS];


static inline uint8_t getArrayPosPCINT(uint8_t pcintPort)__attribute__((alway_inline));
static inline uint8_t getArrayPosPCINT(uint8_t pcintPort) {
static inline uint8_t getArrayPosPCINT(uint8_t pcintPort) __attribute__((always_inline));
uint8_t getArrayPosPCINT(uint8_t pcintPort) {
/*
Maps the port to the array.
This is needed since you can deactivate ports
Expand Down Expand Up @@ -374,10 +374,10 @@ Serial.println("#endif");
*/

// API attach function
static void attachPinChangeInterrupt(const uint8_t pcintNum, void(*userFunc)(void), const uint8_t mode) __attribute__((always_inline));
static inline void attachPinChangeInterrupt(const uint8_t pcintNum, void(*userFunc)(void), const uint8_t mode) __attribute__((always_inline));
void attachPinChangeInterrupt(const uint8_t pcintNum, void(*userFunc)(void), const uint8_t mode) {
#else // no API attach function
static void attachPinChangeInterrupt(const uint8_t pcintNum, const uint8_t mode) __attribute__((always_inline));
static inline void attachPinChangeInterrupt(const uint8_t pcintNum, const uint8_t mode) __attribute__((always_inline));
void attachPinChangeInterrupt(const uint8_t pcintNum, const uint8_t mode) {
#endif // PCINT_API

Expand Down Expand Up @@ -575,7 +575,7 @@ void attachPinChangeInterrupt(const uint8_t pcintNum, const uint8_t mode) {
}

// enable interrupt again if temporary disabled
static void enablePinChangeInterrupt(const uint8_t pcintNum) __attribute__((always_inline));
static inline void enablePinChangeInterrupt(const uint8_t pcintNum) __attribute__((always_inline));
void enablePinChangeInterrupt(const uint8_t pcintNum) {
// get PCINT registers
uint8_t pcintPort = pcintNum / 8;
Expand Down Expand Up @@ -612,7 +612,7 @@ void enablePinChangeInterrupt(const uint8_t pcintNum) {
//================================================================================

void disablePinChangeInterruptHelper(const uint8_t pcintPort, const uint8_t pcintMask);
static void detachPinChangeInterrupt(const uint8_t pcintNum) __attribute__((always_inline));
static inline void detachPinChangeInterrupt(const uint8_t pcintNum) __attribute__((always_inline));

void detachPinChangeInterrupt(const uint8_t pcintNum) {
// get PCINT registers
Expand Down Expand Up @@ -789,7 +789,7 @@ void detachPinChangeInterrupt(const uint8_t pcintNum) {
disablePinChangeInterruptHelper(pcintPort, pcintMask);
}

static void disablePinChangeInterrupt(const uint8_t pcintNum) __attribute__((always_inline));
static inline void disablePinChangeInterrupt(const uint8_t pcintNum) __attribute__((always_inline));
void disablePinChangeInterrupt(const uint8_t pcintNum) {
// get PCINT registers
uint8_t pcintPort = pcintNum / 8;
Expand Down Expand Up @@ -828,7 +828,7 @@ void disablePinChangeInterrupt(const uint8_t pcintNum) {
// getTrigger Function (inlined)
//================================================================================

static uint8_t getPinChangeInterruptTrigger(const uint8_t pcintNum) __attribute__((always_inline));
static inline uint8_t getPinChangeInterruptTrigger(const uint8_t pcintNum) __attribute__((always_inline));
uint8_t getPinChangeInterruptTrigger(const uint8_t pcintNum) {
// get PCINT registers
uint8_t pcintPort = pcintNum / 8;
Expand Down
2 changes: 1 addition & 1 deletion src/PinChangeInterrupt0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ void PinChangeInterruptEventPCINT7(void) {

#endif // PCINT_USE_PORT0

#endif // PCINT_INCLUDE_FROM_CPP
#endif // PCINT_INCLUDE_FROM_CPP
2 changes: 1 addition & 1 deletion src/PinChangeInterrupt1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ void PinChangeInterruptEventPCINT15(void) {

#endif // PCINT_USE_PORT1

#endif // PCINT_INCLUDE_FROM_CPP
#endif // PCINT_INCLUDE_FROM_CPP
2 changes: 1 addition & 1 deletion src/PinChangeInterruptPins.h
Original file line number Diff line number Diff line change
Expand Up @@ -746,4 +746,4 @@ PCINT_NUM_USED_PINS_PORT3)
PCINT_USE_PORT0 + \
PCINT_USE_PORT1 + \
PCINT_USE_PORT2 + \
PCINT_USE_PORT3)
PCINT_USE_PORT3)
2 changes: 1 addition & 1 deletion src/PinChangeInterruptSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,4 @@ The order is also okay. */
#if defined(PCINT_ENABLE_PCINT1)
#undef PCINT_ENABLE_PCINT1
#endif
#endif
#endif

0 comments on commit 7b01fe1

Please sign in to comment.