Defines | Functions

# eep_lib.h File Reference

This file contains a set of routines to perform eeprom access. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | EEPROM_BLANK_VALUE 0xFF
## Functions
bit | eeprom_erase (void)
| This function erases the whole eeprom memory.
bit | eeprom_wr_byte (Uint16 addr, Uchar value)
| This function writes a byte in the eeprom memory.
Byte | eeprom_rd_byte (Uint16 addr)
| This function reads a byte in the eeprom memory.
bit | eeprom_rd_block (Uint16 src, Byte _MemType_ *dest, Byte n)
| This function reads up to 256 bytes in the eeprom memory.
bit | eeprom_wr_block (Byte _MemType_ *src, Uint16 dest, U16 n)
| This function writes up to 256 bytes in the eeprom memory.

## Detailed Description

This file contains a set of routines to perform eeprom access.

- Compiler: IAR EWAVR and GNU GCC for AVR
- Supported devices: ATmega32U4

Author:
  Atmel Corporation: http://www.atmel.com
  Support and FAQ: http://support.atmel.no/

Definition in file eep_lib.h.

## Define Documentation

#define EEPROM_BLANK_VALUE 0xFF

Definition at line 51 of file eep_lib.h.

## Function Documentation

bit eeprom_erase | ( | void | ) |

This function erases the whole eeprom memory.

Returns:
  The result of function.
  - FALSE: result KO
  - TRUE: result OK

bit eeprom_wr_byte | ( | Uint16 | addr,
|  | Uchar | value
| ) |  |

This function writes a byte in the eeprom memory.

Parameters:

  addr | Address of the eeprom memory to write
  value | Byte to write

Returns:
  The result of function.
  - FALSE: result KO
  - TRUE: result OK

Byte eeprom_rd_byte | ( | Uint16 | addr ) |

This function reads a byte in the eeprom memory.

Parameters:

  addr | Address of the eeprom memory to read

Returns:
  Value read in the eeprom memory

bit eeprom_rd_block | ( | Uint16 | src,
|  | Byte _MemType_ * | dest,
|  | Byte | n
| ) |  |

This function reads up to 256 bytes in the eeprom memory.

Parameters:

  src | Address of the array to store read data
  *dest | Address of the eeprom memory to read
  n | number of byte to read

Returns:
  The result of function.
  - FALSE: result KO
  - TRUE: result OK

bit eeprom_wr_block | ( | Byte _MemType_ * | src,
|  | Uint16 | dest,
|  | U16 | n
| ) |  |

This function writes up to 256 bytes in the eeprom memory.

Parameters:

  *src | Address of the array to write
  dest | Address of the eeprom memory to write
  n | number of byte to write

Returns:
  The result of function.
  - FALSE: result KO
  - TRUE: result OK