Defines | |
| #define | EE_BAUD(CLOCK, BAUD) ( ((CLOCK / BAUD) / 4) - 1 ) |
| #define | XEEBeginWrite(control, address) XEESetAddr(control, address) |
Typedefs | |
| typedef unsigned short int | XEE_ADDR |
| typedef enum _XEE_RESULT | XEE_RESULT |
Enumerations | |
| enum | _XEE_RESULT { XEE_SUCCESS = 0, XEE_READY = 0, XEE_BUS_COLLISION, XEE_NAK, XEE_VERIFY_ERR, XEE_BUSY } |
Functions | |
| BYTE | XEEBeginRead (unsigned char control, XEE_ADDR address) |
| BYTE | XEEEndRead (void) |
| BYTE | XEEEndWrite (void) |
| void | XEEInit (unsigned char baud) |
| BYTE | XEEIsBusy (unsigned char control) |
| unsigned char | XEERead (void) |
| BYTE | XEEReadArray (unsigned char control, XEE_ADDR address, unsigned char *buffer, unsigned char length) |
| BYTE | XEESetAddr (unsigned char control, XEE_ADDR address) |
| BYTE | XEEWrite (unsigned char val) |
|
|
|
|
|
Sets up internal address counter of EEPROM. This function does not release the I2C bus. User must close XEEEndWrite() after this function is called to relase the I2C bus.
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Sets internal address counter to given address. Puts EEPROM in sequential read mode. This function does not release I2C bus. User must call XEEEndRead() when read is not longer needed; I2C bus will released after XEEEndRead() is called.
|
|
|
Ends sequential read cycle. This function ends seuential cycle that was in progress. It releases I2C bus.
|
|
|
Instructs EEPROM to begin write cycle. Call this function after either page full of bytes written or no more bytes are left to load. This function initiates the write cycle. User must call for XEEWait() to ensure that write cycle is finished before calling any other routine.
|
|
|
Overview: Initialize I2C module to communicate to serial EEPROM.
|
|
|
Requests ack from EEPROM.
|
|
|
Reads next byte from EEPROM; internal address is incremented by one. This function does not release I2C bus. User must call XEEEndRead() when read is not longer needed; I2C bus will released after XEEEndRead() is called.
|
|
||||||||||||||||||||
|
Reads desired number of bytes in sequential mode. This function performs all necessary steps and releases the bus when finished.
|
|
||||||||||||
|
Modifies internal address counter of EEPROM. This function does not release the I2C bus. User must close XEEClose() after this function is called.
|
|
|
Writes given value 'val' at current address. Current address is set by XEEBeginWrite() and is incremented by every XEEWrite(). This function does not initiate the write cycle; it simply loads given value into internal page buffer. This function does not release the I2C bus. User must close XEEEndWrite() after this function is called to relase the I2C bus.
|
1.4.5