Low-level EEPROM interface.  
More...
Low-level EEPROM interface. 
 | 
| file   | eeprom.h | 
|   | Low-level eeprom driver interface. 
  | 
|   | 
 | 
| uint8_t  | eeprom_read_byte (uint32_t pos) | 
|   | Read a byte at the given position in eeprom.  More...
  | 
|   | 
| size_t  | eeprom_read (uint32_t pos, void *data, size_t len) | 
|   | Read len bytes from the given position.  More...
  | 
|   | 
| void  | eeprom_write_byte (uint32_t pos, uint8_t data) | 
|   | Write a byte at the given position.  More...
  | 
|   | 
| size_t  | eeprom_write (uint32_t pos, const void *data, size_t len) | 
|   | Write len bytes at the given position.  More...
  | 
|   | 
| size_t  | eeprom_set (uint32_t pos, uint8_t val, size_t len) | 
|   | Set len bytes from the given position pos with value val.  More...
  | 
|   | 
| size_t  | eeprom_clear (uint32_t pos, size_t len) | 
|   | Clear len bytes from the given position pos.  More...
  | 
|   | 
| size_t  | eeprom_erase (void) | 
|   | Erase the whole EEPROM content.  More...
  | 
|   | 
◆ eeprom_clear()
      
        
          | size_t eeprom_clear  | 
          ( | 
          uint32_t  | 
          pos,  | 
        
        
           | 
           | 
          size_t  | 
          len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Clear len bytes from the given position pos. 
Clearing a byte in EEPROM simply consists in setting it to 0
- Parameters
 - 
  
    | [in] | pos | start position in eeprom  | 
    | [in] | len | the number of bytes to clear | 
  
   
- Returns
 - the number of bytes cleared 
 
 
 
◆ eeprom_erase()
      
        
          | size_t eeprom_erase  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
Erase the whole EEPROM content. 
- Returns
 - the EEPROM_SIZE 
 
 
 
◆ eeprom_read()
      
        
          | size_t eeprom_read  | 
          ( | 
          uint32_t  | 
          pos,  | 
        
        
           | 
           | 
          void *  | 
          data,  | 
        
        
           | 
           | 
          size_t  | 
          len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Read len bytes from the given position. 
This function must be implemented by each CPU that provides an internal EEPROM.
- Parameters
 - 
  
    | [in] | pos | start position in eeprom  | 
    | [out] | data | output memory location to write to  | 
    | [in] | len | the number of bytes to read | 
  
   
- Returns
 - the number of bytes read 
 
 
 
◆ eeprom_read_byte()
      
        
          | uint8_t eeprom_read_byte  | 
          ( | 
          uint32_t  | 
          pos | ) | 
           | 
        
      
 
Read a byte at the given position in eeprom. 
- Parameters
 - 
  
  
 
- Returns
 - the byte read 
 
 
 
◆ eeprom_set()
      
        
          | size_t eeprom_set  | 
          ( | 
          uint32_t  | 
          pos,  | 
        
        
           | 
           | 
          uint8_t  | 
          val,  | 
        
        
           | 
           | 
          size_t  | 
          len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set len bytes from the given position pos with value val. 
- Parameters
 - 
  
    | [in] | pos | start position in eeprom  | 
    | [in] | val | the value to set  | 
    | [in] | len | the number of bytes to set | 
  
   
- Returns
 - the number of bytes set 
 
 
 
◆ eeprom_write()
      
        
          | size_t eeprom_write  | 
          ( | 
          uint32_t  | 
          pos,  | 
        
        
           | 
           | 
          const void *  | 
          data,  | 
        
        
           | 
           | 
          size_t  | 
          len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Write len bytes at the given position. 
This function must be implemented by each CPU that provides an internal EEPROM.
- Parameters
 - 
  
    | [in] | pos | start position in eeprom  | 
    | [in] | data | input memory location to read into  | 
    | [in] | len | the number of bytes to read | 
  
   
- Returns
 - the number of bytes written 
 
 
 
◆ eeprom_write_byte()
      
        
          | void eeprom_write_byte  | 
          ( | 
          uint32_t  | 
          pos,  | 
        
        
           | 
           | 
          uint8_t  | 
          data  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Write a byte at the given position. 
- Parameters
 - 
  
    | [in] | pos | position to write  | 
    | [in] | data | byte address to write to  |