Fast software SPI.
More...
#include <softspi.h>
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin, uint8_t Mode = 0>
class SoftSPI< MisoPin, MosiPin, SckPin, Mode >
Fast software SPI.
◆ begin()
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin, uint8_t Mode = 0>
◆ receive()
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin, uint8_t Mode = 0>
Soft SPI receive byte.
- Returns
- Data byte received.
673 receiveBit(7, &
data);
674 receiveBit(6, &
data);
675 receiveBit(5, &
data);
676 receiveBit(4, &
data);
677 receiveBit(3, &
data);
678 receiveBit(2, &
data);
679 receiveBit(1, &
data);
680 receiveBit(0, &
data);
◆ send()
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin, uint8_t Mode = 0>
Soft SPI send byte.
- Parameters
-
[in] | data | Data byte to send. |
◆ transfer()
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin, uint8_t Mode = 0>
Soft SPI transfer byte.
- Parameters
-
[in] | txData | Data byte to send. |
- Returns
- Data byte received.
706 transferBit(7, &rxData, txData);
707 transferBit(6, &rxData, txData);
708 transferBit(5, &rxData, txData);
709 transferBit(4, &rxData, txData);
710 transferBit(3, &rxData, txData);
711 transferBit(2, &rxData, txData);
712 transferBit(1, &rxData, txData);
713 transferBit(0, &rxData, txData);