Clean up softspi.h
This commit is contained in:
parent
e78bdd654d
commit
389376c40e
1 changed files with 6 additions and 8 deletions
|
@ -19,12 +19,11 @@ bool fastDigitalRead(uint8_t pin) {
|
|||
*/
|
||||
static inline __attribute__((always_inline))
|
||||
void fastDigitalWrite(uint8_t pin, bool value) {
|
||||
if (value) {
|
||||
if (value)
|
||||
*portSetRegister(pin) = 1;
|
||||
} else {
|
||||
else
|
||||
*portClearRegister(pin) = 1;
|
||||
}
|
||||
}
|
||||
#else // CORE_TEENSY
|
||||
//------------------------------------------------------------------------------
|
||||
/** read pin value
|
||||
|
@ -42,12 +41,11 @@ bool fastDigitalRead(uint8_t pin){
|
|||
*/
|
||||
static inline __attribute__((always_inline))
|
||||
void fastDigitalWrite(uint8_t pin, bool value){
|
||||
if(value) {
|
||||
if (value)
|
||||
g_APinDescription[pin].pPort->PIO_SODR = g_APinDescription[pin].ulPin;
|
||||
} else {
|
||||
else
|
||||
g_APinDescription[pin].pPort->PIO_CODR = g_APinDescription[pin].ulPin;
|
||||
}
|
||||
}
|
||||
#endif // CORE_TEENSY
|
||||
//------------------------------------------------------------------------------
|
||||
inline void fastDigitalToggle(uint8_t pin) {
|
||||
|
|
Reference in a new issue