42 #ifndef HELPER_FUNCTIONS_H_ 43 #define HELPER_FUNCTIONS_H_ 70 void fillArrayPattern(uint8_t * byteArray, uint32_t numBytes,
int seedNumber);
81 void fillArrayConst(uint8_t * byteArray, uint32_t numBytes,
int constantNum);
123 uint32_t rxNumBytes);
void load4BytesToTxBuffer(uint8_t *txBuffer, uint8_t opcode, uint32_t address)
Loads 1 byte of opcode followed by 3 address bytes into the txBuffer. The data is stored at the first...
void printSPIExchange(uint8_t *txBuffer, uint32_t txNumBytes, uint8_t *rxBuffer, uint32_t rxNumBytes)
Prints the byte array in hexadecimal with a formatted output. Indicates what bytes were sent...
void displayByteArray(uint8_t *byteArray, uint32_t numBytes)
Helper function to display a byte array/buffer. This function uses the printSPIExchange() function in...
void fillArrayPattern(uint8_t *byteArray, uint32_t numBytes, int seedNumber)
Helper function to display fill a byte array/buffer with a pattern based on a seedNumber. The seed will be incremented by the index of the array.
bool compareByteArrays(uint8_t *arr1, uint8_t *arr2, uint32_t arrLength)
Helper function to compare 2 byte arrays and print an error message if they do not match...
void fillArrayConst(uint8_t *byteArray, uint32_t numBytes, int constantNum)
Helper function to display fill a byte array/buffer with a constant number.