| | |
| | | * returns 0 for success, or -1 for error |
| | | */ |
| | | uint8_t tt; |
| | | int writetospi |
| | | ( |
| | | uint16_t headerLength, |
| | | uint8_t *headerBuffer, |
| | | uint32_t bodylength, |
| | | uint8_t *bodyBuffer |
| | | ) |
| | | int writetospi(uint16_t headerLength, const uint8_t *headerBuffer, uint16_t bodylength, const uint8_t *bodyBuffer) |
| | | { |
| | | |
| | | int i = 0; |
| | |
| | | * returns the offset into read buffer where first byte of read data may be found, |
| | | * or returns -1 if there was an error |
| | | */ |
| | | int readfromspi |
| | | ( |
| | | uint16_t headerLength, |
| | | uint8_t *headerBuffer, |
| | | uint32_t readlength, |
| | | uint8_t *readBuffer |
| | | ) |
| | | int readfromspi(uint16_t headerLength, /*const*/ uint8_t *headerBuffer, uint16_t readlength, uint8_t *readBuffer) |
| | | { |
| | | |
| | | int i = 0; |