Fixed unused parameter warnings for FastIO.* (appeared on xtensa architectures)
This commit is contained in:
+23
-9
@@ -84,7 +84,8 @@ fio_bit fio_pinToBit(uint8_t pin)
|
||||
}
|
||||
|
||||
|
||||
void fio_digitalWrite(fio_register pinRegister, fio_bit pinBit, uint8_t value)
|
||||
void fio_digitalWrite(__attribute__((unused)) fio_register pinRegister,
|
||||
fio_bit pinBit, uint8_t value)
|
||||
{
|
||||
#ifdef FIO_FALLBACK
|
||||
digitalWrite(pinBit, value);
|
||||
@@ -103,11 +104,14 @@ void fio_digitalWrite(fio_register pinRegister, fio_bit pinBit, uint8_t value)
|
||||
#endif
|
||||
}
|
||||
|
||||
int fio_digitalRead(fio_register pinRegister, uint8_t pinBit)
|
||||
int fio_digitalRead(__attribute__((unused)) fio_register pinRegister,
|
||||
uint8_t pinBit)
|
||||
{
|
||||
#ifdef FIO_FALLBACK
|
||||
return digitalRead (pinBit);
|
||||
#else
|
||||
int fio_digitalRead(fio_register pinRegister, uint8_t pinBit)
|
||||
{
|
||||
if (*pinRegister & pinBit)
|
||||
{
|
||||
return HIGH;
|
||||
@@ -116,8 +120,16 @@ int fio_digitalRead(fio_register pinRegister, uint8_t pinBit)
|
||||
#endif
|
||||
}
|
||||
|
||||
void fio_shiftOut (fio_register dataRegister, fio_bit dataBit,
|
||||
fio_register clockRegister, fio_bit clockBit,
|
||||
// __attribute__((unused)) is necessary when fio_digitalWrite_XXX falls
|
||||
// back to digitalWrite and leaves dataRegister and clockRegister unused.
|
||||
// This attribute has no effect when those parameters are actually used.
|
||||
//
|
||||
// Same goes for the functions following this one
|
||||
|
||||
void fio_shiftOut (__attribute__((unused)) fio_register dataRegister,
|
||||
fio_bit dataBit,
|
||||
__attribute__((unused)) fio_register clockRegister,
|
||||
fio_bit clockBit,
|
||||
uint8_t value, uint8_t bitOrder)
|
||||
{
|
||||
// # disable interrupts
|
||||
@@ -167,8 +179,10 @@ void fio_shiftOut (fio_register dataRegister, fio_bit dataBit,
|
||||
}
|
||||
|
||||
|
||||
void fio_shiftOut(fio_register dataRegister, fio_bit dataBit,
|
||||
fio_register clockRegister, fio_bit clockBit)
|
||||
void fio_shiftOut(__attribute__((unused)) fio_register dataRegister,
|
||||
fio_bit dataBit,
|
||||
__attribute__((unused)) fio_register clockRegister,
|
||||
fio_bit clockBit)
|
||||
{
|
||||
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
|
||||
{
|
||||
@@ -198,11 +212,11 @@ void fio_shiftOut1_init(fio_register shift1Register, fio_bit shift1Bit)
|
||||
}
|
||||
|
||||
|
||||
void fio_shiftOut1(fio_register shift1Register, fio_bit shift1Bit, uint8_t value,
|
||||
bool noLatch)
|
||||
void fio_shiftOut1(__attribute__((unused)) fio_register shift1Register,
|
||||
fio_bit shift1Bit, uint8_t value, bool noLatch)
|
||||
{
|
||||
/*
|
||||
* this function are based on Shif1 protocol developed by Roman Black
|
||||
* this function are based on Shift1 protocol developed by Roman Black
|
||||
* (http://www.romanblack.com/shift1.htm)
|
||||
*
|
||||
* test sketches:
|
||||
|
||||
Reference in New Issue
Block a user