Proyecto ABInBev para la tarjeta Guaria 1/2.
EEPROM Class Reference
#include <eeprom.h>
Public Member Functions | |
EEPROM (PinName sda, PinName scl, uint8_t address, TypeEeprom type) | |
Constructor, initialize the eeprom on i2c interface. | |
void | read (uint32_t address, int8_t &data) |
Random read byte. | |
void | read (uint32_t address, int16_t &data) |
Random read short. | |
void | read (uint32_t address, int32_t &data) |
Random read long. | |
void | read (uint32_t address, float &data) |
Random read float. | |
void | read (uint32_t address, void *data, uint32_t size) |
Random read anything. | |
void | read (int8_t &data) |
Current address read byte. | |
void | read (uint32_t address, int8_t *data, uint32_t size) |
Sequential read byte. | |
void | write (uint32_t address, int8_t data) |
Write byte. | |
void | write (uint32_t address, int16_t data) |
Write short. | |
void | write (uint32_t address, int32_t data) |
Write long. | |
void | write (uint32_t address, float data) |
Write float. | |
void | write (uint32_t address, void *data, uint32_t size) |
Write anything (use the page write mode) | |
void | write (uint32_t address, int8_t data[], uint32_t size) |
Write array of bytes (use the page mode) | |
void | ready (void) |
Wait eeprom ready. | |
uint32_t | getSize (void) |
Get eeprom size in bytes. | |
const char * | getName (void) |
Get eeprom name. | |
void | clear (void) |
Clear eeprom (write with 0) | |
uint8_t | getError (void) |
Get the current error number (EEPROM_NoError if no error) | |
std::string | getErrorMessage (void) |
Get current error message. |
Detailed Description
EEPROM Class.
Definition at line 377 of file eeprom.h.
Constructor & Destructor Documentation
EEPROM | ( | PinName | sda, |
PinName | scl, | ||
uint8_t | address, | ||
TypeEeprom | type | ||
) |
Constructor, initialize the eeprom on i2c interface.
EEPROM(PinName sda, PinName scl, uint8_t address, TypeEeprom type) : _i2c(sda, scl)
- Parameters:
-
sda sda i2c pin (PinName) scl scl i2c pin (PinName) address eeprom address, according to eeprom type (uint8_t) type eeprom type (TypeEeprom)
- Returns:
- none
Constructor, initialize the eeprom on i2c interface.
- Parameters:
-
sda sda i2c pin (PinName) scl scl i2c pin (PinName) address eeprom address, according to eeprom type (uint8_t) type eeprom type (TypeEeprom)
- Returns:
- none
Definition at line 46 of file eeprom.cpp.
Member Function Documentation
void clear | ( | void | ) |
Clear eeprom (write with 0)
void clear(void)
- Parameters:
-
none
- Returns:
- none
Clear eeprom (write with 0)
- Parameters:
-
none
- Returns:
- none
Definition at line 883 of file eeprom.cpp.
uint8_t getError | ( | void | ) |
Get the current error number (EEPROM_NoError if no error)
uint8_t getError(void)
- Parameters:
-
none
- Returns:
- none
Get the current error number (EEPROM_NoError if no error)
- Parameters:
-
none
- Returns:
- none
Definition at line 997 of file eeprom.cpp.
std::string getErrorMessage | ( | void | ) |
const char * getName | ( | void | ) |
Get eeprom name.
const char* getName(void)
- Parameters:
-
none
- Returns:
- name (const char*)
Get eeprom name
- Parameters:
-
none
- Returns:
- name (const char*)
Definition at line 944 of file eeprom.cpp.
uint32_t getSize | ( | void | ) |
Get eeprom size in bytes.
uint32_t getSize(void)
- Parameters:
-
none
- Returns:
- size in bytes (uint32_t)
Get eeprom size in bytes
- Parameters:
-
none
- Returns:
- size in bytes (uint32_t)
Definition at line 932 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int8_t * | data, | ||
uint32_t | size | ||
) |
Sequential read byte.
void read(uint32_t address, int8_t *data, uint32_t size)
- Parameters:
-
address start address (uint32_t) data bytes array to read (int8_t[]&) size number of bytes to read (uint32_t)
- Returns:
- none
Sequential read byte
- Parameters:
-
address start address (uint32_t) data bytes array to read (int8_t[]&) size number of bytes to read (uint32_t)
- Returns:
- none
Definition at line 662 of file eeprom.cpp.
void read | ( | uint32_t | address, |
float & | data | ||
) |
Random read float.
void read(uint32_t address, float& data)
- Parameters:
-
address start address (uint32_t) data float to read (float&)
- Returns:
- none
Random read float
- Parameters:
-
address start address (uint32_t) data float to read (float&)
- Returns:
- none
Definition at line 818 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int16_t & | data | ||
) |
Random read short.
void read(uint32_t address, int16_t& data)
- Parameters:
-
address start address (uint32_t) data short to read (int16_t&)
- Returns:
- none
Random read short
- Parameters:
-
address start address (uint32_t) data short to read (int16_t&)
- Returns:
- none
Definition at line 762 of file eeprom.cpp.
void read | ( | uint32_t | address, |
void * | data, | ||
uint32_t | size | ||
) |
Random read anything.
void read(uint32_t address, void *data, uint32_t size)
- Parameters:
-
address start address (uint32_t) data data to read (void *) size number of bytes to read (uint32_t)
- Returns:
- none
Random read anything
- Parameters:
-
address start address (uint32_t) data data to read (void *) size number of bytes to read (uint32_t)
- Returns:
- none
Definition at line 847 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int8_t & | data | ||
) |
Random read byte.
void read(uint32_t address, int8_t& data)
- Parameters:
-
address start address (uint32_t) data byte to read (int8_t&)
- Returns:
- none
Random read byte
- Parameters:
-
address start address (uint32_t) data byte to read (int8_t&)
- Returns:
- none
Definition at line 595 of file eeprom.cpp.
void read | ( | int8_t & | data ) |
Current address read byte.
void read(int8_t& data)
- Parameters:
-
data byte to read (int8_t&)
- Returns:
- none
Current address read byte
- Parameters:
-
data byte to read (int8_t&)
- Returns:
- none
Definition at line 733 of file eeprom.cpp.
void read | ( | uint32_t | address, |
int32_t & | data | ||
) |
Random read long.
void read(uint32_t address, int32_t& data)
- Parameters:
-
address start address (uint32_t) data long to read (int32_t&)
- Returns:
- none
Random read long
- Parameters:
-
address start address (uint32_t) data long to read (int32_t&)
- Returns:
- none
Definition at line 790 of file eeprom.cpp.
void ready | ( | void | ) |
Wait eeprom ready.
void ready(void)
- Parameters:
-
none
- Returns:
- none
Wait eeprom ready
- Parameters:
-
none
- Returns:
- none
Definition at line 902 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int32_t | data | ||
) |
Write long.
void write(uint32_t address, int32_t data)
- Parameters:
-
address start address (uint32_t) data long to write (int32_t)
- Returns:
- none
Write long
- Parameters:
-
address start address (uint32_t) data long to write (int32_t)
- Returns:
- none
Definition at line 502 of file eeprom.cpp.
void write | ( | uint32_t | address, |
float | data | ||
) |
Write float.
void write(uint32_t address, float data)
- Parameters:
-
address start address (uint32_t) data float to write (float)
- Returns:
- none
Write float
- Parameters:
-
address start address (uint32_t) data float to write (float)
- Returns:
- none
Definition at line 530 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int8_t | data[], | ||
uint32_t | length | ||
) |
Write array of bytes (use the page mode)
void write(uint32_t address, int8_t data[], uint32_t length)
- Parameters:
-
address start address (uint32_t) data bytes array to write (int8_t[]) size number of bytes to write (uint32_t)
- Returns:
- none
Write array of bytes (use the page mode)
- Parameters:
-
address start address (uint32_t) data bytes array to write (int8_t[]) size number of bytes to write (uint32_t)
- Returns:
- none
Definition at line 215 of file eeprom.cpp.
void write | ( | uint32_t | address, |
void * | data, | ||
uint32_t | size | ||
) |
Write anything (use the page write mode)
void write(uint32_t address, void *data, uint32_t size)
- Parameters:
-
address start address (uint32_t) data data to write (void *) size number of bytes to write (uint32_t)
- Returns:
- none
Write anything (use the page write mode)
- Parameters:
-
address start address (uint32_t) data data to write (void *) size number of bytes to write (uint32_t)
- Returns:
- none
Definition at line 559 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int16_t | data | ||
) |
Write short.
void write(uint32_t address, int16_t data)
- Parameters:
-
address start address (uint32_t) data short to write (int16_t)
- Returns:
- none
Write short
- Parameters:
-
address start address (uint32_t) data short to write (int16_t)
- Returns:
- none
Definition at line 474 of file eeprom.cpp.
void write | ( | uint32_t | address, |
int8_t | data | ||
) |
Write byte.
void write(uint32_t address, int8_t data)
- Parameters:
-
address start address (uint32_t) data byte to write (int8_t)
- Returns:
- none
Write byte
- Parameters:
-
address start address (uint32_t) data byte to write (int8_t)
- Returns:
- none
Definition at line 147 of file eeprom.cpp.
Generated on Thu Jul 28 2022 19:27:02 by 1.7.2