Minor changes.
This commit is contained in:
+8
-4
@@ -87,9 +87,12 @@ void fio_digitalWrite(fio_register pinRegister, uint8_t pinBit, uint8_t value)
|
||||
int fio_digitalRead(fio_register pinRegister, uint8_t pinBit)
|
||||
{
|
||||
#ifdef FIO_FALLBACK
|
||||
return digitalRead(pinBit);
|
||||
return digitalRead (pinBit);
|
||||
#else
|
||||
if (*pinRegister & pinBit) return HIGH;
|
||||
if (*pinRegister & pinBit)
|
||||
{
|
||||
return HIGH;
|
||||
}
|
||||
return LOW;
|
||||
#endif
|
||||
}
|
||||
@@ -152,9 +155,10 @@ void fio_shiftOut1(fio_register shift1Register, fio_bit shift1Bit, uint8_t value
|
||||
* http://pastebin.com/raw.php?i=2hnC9v2Z
|
||||
* http://pastebin.com/raw.php?i=bGg4DhXQ
|
||||
* http://pastebin.com/raw.php?i=tg1ZFiM5
|
||||
* http://pastebin.com/raw.php?i=93ExPDD3 - cascading
|
||||
* http://pastebin.com/raw.php?i=93ExPDD3 - cascading
|
||||
* tested with:
|
||||
* TPIC6595N - seems to work fine (circuit: http://www.3guys1laser.com/arduino-one-wire-shift-register-prototype)
|
||||
* TPIC6595N - seems to work fine (circuit: http://www.3guys1laser.com/
|
||||
* arduino-one-wire-shift-register-prototype)
|
||||
* 7HC595N
|
||||
*/
|
||||
// disable interrupts since timing is going to be critical
|
||||
|
||||
@@ -98,7 +98,7 @@ fio_bit fio_pinToBit(uint8_t pin);
|
||||
@param value[in] desired output
|
||||
*/
|
||||
// __attribute__ ((always_inline)) /* let the optimizer decide that for now */
|
||||
void fio_digitalWrite(fio_register pinRegister, fio_bit pinBit, uint8_t value);
|
||||
void fio_digitalWrite ( fio_register pinRegister, fio_bit pinBit, uint8_t value );
|
||||
|
||||
/**
|
||||
* This is where the magic happens that makes things fast.
|
||||
@@ -128,7 +128,7 @@ void fio_digitalWrite(fio_register pinRegister, fio_bit pinBit, uint8_t value);
|
||||
@param pinBit[in] Bit - Pin if fast io is disabled
|
||||
@result Value read from pin
|
||||
*/
|
||||
int fio_digitalRead(fio_register pinRegister, fio_bit pinBit);
|
||||
int fio_digitalRead ( fio_register pinRegister, fio_bit pinBit );
|
||||
|
||||
/*!
|
||||
@method
|
||||
@@ -141,8 +141,8 @@ int fio_digitalRead(fio_register pinRegister, fio_bit pinBit);
|
||||
@param clockBit[in] Bit of data pin - Pin if fast digital write is disabled
|
||||
@param bitOrder[in] bit order
|
||||
*/
|
||||
void fio_shiftOut(fio_register dataRegister, fio_bit dataBit, fio_register clockRegister,
|
||||
fio_bit clockBit, uint8_t value, uint8_t bitOrder);
|
||||
void fio_shiftOut( fio_register dataRegister, fio_bit dataBit, fio_register clockRegister,
|
||||
fio_bit clockBit, uint8_t value, uint8_t bitOrder );
|
||||
|
||||
/*!
|
||||
@method
|
||||
|
||||
Reference in New Issue
Block a user