![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for reading from and writing to the EEPROM on QuikEval-compatible demo boards. More...
Library for reading from and writing to the EEPROM on QuikEval-compatible demo boards.
Definition in file QuikEval_EEPROM_Wire.cpp.
Go to the source code of this file.
Functions | |
uint8_t | read_quikeval_id_string (char *buffer) |
Read the id string from the EEPROM, then parse the product name, demo board name, and demo board option from the id string into the global demo_board variable. More... | |
int8_t | discover_demo_board (char *demo_name) |
Read the ID string from the EEPROM and determine if the correct board is connected. More... | |
int8_t | eeprom_poll (uint8_t i2c_address) |
Determine if the EEPROM is ready for communication by writing the address+!write byte and looking for an acknowledge. More... | |
int8_t | eeprom_write_poll (uint8_t i2c_address) |
Wait for the eeprom write cycle to complete by executing the acknowledge polling loop. More... | |
uint8_t | eeprom_write_byte (uint8_t i2c_address, char data, uint16_t address) |
Write the data byte to the EEPROM with i2c_address starting at EEPROM address. More... | |
uint8_t | eeprom_write_byte_array (uint8_t i2c_address, char data[], uint16_t address, uint8_t num_bytes) |
Write the data byte array to the EEPROM with i2c_address starting at EEPROM address. More... | |
uint8_t | eeprom_write_buffer (uint8_t i2c_address, char *buffer, uint16_t address) |
Write the buffer to the EEPROM with i2c_address starting at EEPROM address in blocks of EEPROM_PAGE_SIZE bytes. More... | |
uint8_t | eeprom_read_byte (uint8_t i2c_address, char *data, uint16_t address) |
Read a data byte at address from the EEPROM with i2c_address. More... | |
uint8_t | eeprom_read_byte_array (uint8_t i2c_address, char *data, uint16_t address, uint8_t num_bytes) |
Read a data byte at address from the EEPROM with i2c_address. More... | |
uint8_t | eeprom_read_buffer (uint8_t i2c_address, char *buffer, uint16_t address, uint8_t count) |
Read data bytes from the EEPROM starting at address until number bytes read equals count. More... | |
uint8_t | eeprom_read_buffer_with_terminator (uint8_t i2c_address, char *buffer, uint16_t address, char terminator, uint8_t count) |
Read data bytes from the EEPROM starting at address until the terminator is read or the number bytes read equals count. More... | |
uint8_t | eeprom_write_int16 (uint8_t i2c_address, int16_t write_data, uint16_t address) |
Write the 2 byte integer data to the EEPROM starting at address. More... | |
uint8_t | eeprom_read_int16 (uint8_t i2c_address, int16_t *read_data, uint16_t address) |
Read the two byte integer data from the EEPROM starting at address. More... | |
uint8_t | eeprom_write_float (uint8_t i2c_address, float write_data, uint16_t address) |
Write the 4 byte float data to the EEPROM starting at address. More... | |
uint8_t | eeprom_read_float (uint8_t i2c_address, float *read_data, uint16_t address) |
Read the four byte float data from the EEPROM starting at address. More... | |
uint8_t | eeprom_write_int32 (uint8_t i2c_address, int32_t write_data, uint16_t address) |
Write the 4 byte long data to the EEPROM starting at address. More... | |
uint8_t | eeprom_read_int32 (uint8_t i2c_address, int32_t *read_data, uint16_t address) |
Read the four byte long data from the EEPROM starting at address. More... | |
uint8_t | enable_calibration () |
Functions to set and clear the calibration key. More... | |
uint8_t | disable_calibration () |
Disable calibration key. More... | |
Macros | |
#define | _delay_us delayMicroseconds |
Variables | |
struct demo_board_type | demo_board |
Instantiate demo board structure. More... | |
uint8_t disable_calibration | ( | ) |
Disable calibration key.
Definition at line 546 of file QuikEval_EEPROM_Wire.cpp.
int8_t discover_demo_board | ( | char * | demo_name | ) |
Read the ID string from the EEPROM and determine if the correct board is connected.
Returns 1 if successful, 0 if not successful
Definition at line 155 of file QuikEval_EEPROM_Wire.cpp.
int8_t eeprom_poll | ( | uint8_t | i2c_address | ) |
Determine if the EEPROM is ready for communication by writing the address+!write byte and looking for an acknowledge.
This is repeated every 1ms until an acknowledge occurs, or a timeout occurs. If a timeout occurs, an I2C stop is generated. Returns 0 if an acknowledge is generated and 1 if not.
Definition at line 194 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_buffer | ( | uint8_t | i2c_address, |
char * | buffer, | ||
uint16_t | address, | ||
uint8_t | count | ||
) |
Read data bytes from the EEPROM starting at address until number bytes read equals count.
A null terminator is added to the end of the buffer. Returns the number of bytes read.
Definition at line 343 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_buffer_with_terminator | ( | uint8_t | i2c_address, |
char * | buffer, | ||
uint16_t | address, | ||
char | terminator, | ||
uint8_t | count | ||
) |
Read data bytes from the EEPROM starting at address until the terminator is read or the number bytes read equals count.
A null terminator is placed at the end of the buffer. Returns the number of bytes read.
Definition at line 382 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_byte | ( | uint8_t | i2c_address, |
char * | data, | ||
uint16_t | address | ||
) |
Read a data byte at address from the EEPROM with i2c_address.
Returns the number of bytes read.
Definition at line 299 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_byte_array | ( | uint8_t | i2c_address, |
char * | data, | ||
uint16_t | address, | ||
uint8_t | num_bytes | ||
) |
Read a data byte at address from the EEPROM with i2c_address.
Returns the number of bytes read.
Definition at line 330 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_float | ( | uint8_t | i2c_address, |
float * | read_data, | ||
uint16_t | address | ||
) |
Read the four byte float data from the EEPROM starting at address.
Returns the total number of bytes written
Definition at line 479 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_int16 | ( | uint8_t | i2c_address, |
int16_t * | read_data, | ||
uint16_t | address | ||
) |
Read the two byte integer data from the EEPROM starting at address.
Returns the total number of bytes read.
Definition at line 439 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_read_int32 | ( | uint8_t | i2c_address, |
int32_t * | read_data, | ||
uint16_t | address | ||
) |
Read the four byte long data from the EEPROM starting at address.
Returns the total number of bytes written
Definition at line 522 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_write_buffer | ( | uint8_t | i2c_address, |
char * | buffer, | ||
uint16_t | address | ||
) |
Write the buffer to the EEPROM with i2c_address starting at EEPROM address in blocks of EEPROM_PAGE_SIZE bytes.
Returns the total number of byte written
Definition at line 262 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_write_byte | ( | uint8_t | i2c_address, |
char | data, | ||
uint16_t | address | ||
) |
Write the data byte to the EEPROM with i2c_address starting at EEPROM address.
Returns the total number of bytes written
Definition at line 229 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_write_byte_array | ( | uint8_t | i2c_address, |
char | data[], | ||
uint16_t | address, | ||
uint8_t | num_bytes | ||
) |
Write the data byte array to the EEPROM with i2c_address starting at EEPROM address.
! Returns the total number of bytes written
Definition at line 250 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_write_float | ( | uint8_t | i2c_address, |
float | write_data, | ||
uint16_t | address | ||
) |
Write the 4 byte float data to the EEPROM starting at address.
Use the eeprom_write_byte routine to avoid keeping track of page boundaries with the eeprom_write_buffer routine. Returns the total number of bytes written.
Definition at line 456 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_write_int16 | ( | uint8_t | i2c_address, |
int16_t | write_data, | ||
uint16_t | address | ||
) |
Write the 2 byte integer data to the EEPROM starting at address.
Use the eeprom_write_byte routine to avoid keeping track of page boundaries with the eeprom_write_buffer routine. Returns the total number of bytes written.
Definition at line 421 of file QuikEval_EEPROM_Wire.cpp.
uint8_t eeprom_write_int32 | ( | uint8_t | i2c_address, |
int32_t | write_data, | ||
uint16_t | address | ||
) |
Write the 4 byte long data to the EEPROM starting at address.
Use the eeprom_write_byte routine to avoid keeping track of page boundaries with the eeprom_write_buffer routine. Returns the total number of bytes written.
Definition at line 499 of file QuikEval_EEPROM_Wire.cpp.
int8_t eeprom_write_poll | ( | uint8_t | i2c_address | ) |
Wait for the eeprom write cycle to complete by executing the acknowledge polling loop.
Returns 0 if an acknowledge is generated and 1 if not.
Definition at line 221 of file QuikEval_EEPROM_Wire.cpp.
uint8_t enable_calibration | ( | ) |
Functions to set and clear the calibration key.
Useful for swtiching between calibrated operation and default operation, without actually clearing the stored calibration numbers. Enable calibration key
Definition at line 540 of file QuikEval_EEPROM_Wire.cpp.
uint8_t read_quikeval_id_string | ( | char * | buffer | ) |
Read the id string from the EEPROM, then parse the product name, demo board name, and demo board option from the id string into the global demo_board variable.
Returns the number of characters read from the information string.
Definition at line 89 of file QuikEval_EEPROM_Wire.cpp.
#define _delay_us delayMicroseconds |
Definition at line 78 of file QuikEval_EEPROM_Wire.cpp.
struct demo_board_type demo_board |
Instantiate demo board structure.
Definition at line 83 of file QuikEval_EEPROM_Wire.cpp.