GaIA BIOS Library
Loading...
Searching...
No Matches
eeprom.h File Reference

EEPROM Driver. More...

#include <stdint.h>

Data Structures

struct  eeprom_driver_t
 EEPROM Driver struct. More...

Macros

#define DONT_USE_CRC   0
 Do not add or check CRC.
#define USE_CRC   1
 Add CRC.
#define LOAD_CHECK_CRC   2
 Check CRC and load the data.
#define ONLY_CHECK_CRC   3
 Only check CRC.
#define EE_OK   0
 No error.
#define EE_ERROR   -1
 Error while accessing the EEPROM.
#define EE_TYPE_24C02   0x01
 Eeprom identification bitmask for 24C02.
#define EE_TYPE_24C16   0x02
 Eeprom identification bitmask for 24C16.
#define EE_TYPE_24C64   0x04
 Eeprom identification bitmask for 24C64.

Functions

void eeprom_type_identify (void)
 Identifies the on-board eeprom type.
int eeprom_write (uint16_t address, const uint8_t *src, uint16_t size, uint8_t crc_mode)
 Writes n bytes at the given address.
int eeprom_read (uint16_t address, uint8_t *dst, uint16_t size, uint8_t crc_mode)
 Reads n bytes from the given address.

Variables

uint8_t eeprom_type
 After the identification procedure, this byte contains the system eeprom configuration.
uint32_t eeprom_aux

Detailed Description

EEPROM Driver.

Author
Tecnologix, 2014