|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
Bit-banged serial shift functions: shiftIn() and shiftOut(). More...
#include "Arduino.h"Functions | |
| uint8_t | shiftIn (pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder) |
| Shift in a byte of data one bit at a time. | |
| void | shiftOut (pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder, uint8_t val) |
| Shift out a byte of data one bit at a time. | |
Bit-banged serial shift functions: shiftIn() and shiftOut().
| uint8_t shiftIn | ( | pin_size_t | dataPin, |
| pin_size_t | clockPin, | ||
| BitOrder | bitOrder | ||
| ) |
Shift in a byte of data one bit at a time.
Each bit is read while the clock is HIGH, then the clock is set back to LOW.
| dataPin | Pin number to read the data from. |
| clockPin | Pin number to clock the data on. |
| bitOrder | LSBFIRST or MSBFIRST. |
| void shiftOut | ( | pin_size_t | dataPin, |
| pin_size_t | clockPin, | ||
| BitOrder | bitOrder, | ||
| uint8_t | val | ||
| ) |
Shift out a byte of data one bit at a time.
Each bit is written to the data pin, then the clock is pulsed HIGH then LOW.
| dataPin | Pin number to write the data to. |
| clockPin | Pin number to clock the data on. |
| bitOrder | LSBFIRST or MSBFIRST. |
| val | Byte to shift out. |