|
Little-Wire
|
Functions | |
| void | littleWire::spi_init () |
| unsigned char | littleWire::spi_sendMessage (unsigned char message) |
| void | littleWire::spi_sendMessageMulti (unsigned char *sendBuffer, unsigned char *inputBuffer, unsigned char length, unsigned char mode) |
| void | littleWire::spi_updateDelay (unsigned int duration) |
SPI functions
| void littleWire::spi_init | ( | ) |
Initialize the SPI module on the Little-Wire
| unsigned char littleWire::spi_sendMessage | ( | unsigned char | message | ) |
Send and receive a single byte SPI message. Chip select is always manual
| message | Message to send |
| void littleWire::spi_sendMessageMulti | ( | unsigned char * | sendBuffer, |
| unsigned char * | inputBuffer, | ||
| unsigned char | length, | ||
| unsigned char | mode | ||
| ) |
Send and receive multiple (up to 4 bytes) SPI messages. Chip select is automatic or manual.
If automatic chip select is selected, RESET_PIN stays HIGH in idle time , and goes to LOW while sending the messages over SPI
| sendBuffer | Pointer of the array which has your messages to send. |
| inputBuffer | Pointer of the array which you want to store SPI response messages. |
| length | Length of the messages. ( Maximum is 4) |
| mode | Chip select mode. (AUTO_CS or MANUAL_CS ) |
| void littleWire::spi_updateDelay | ( | unsigned int | duration | ) |
Change the SPI message frequency by adjusting delay duration. By default, Little-Wire sends the SPI messages with maximum speed.
If your hardware can't catch up with the speed, increase the duration value to lower the SPI speed.
| duration | Amount of delay. |
1.7.6.1