AVR EEPROM
[Device Drivers]


Defines

#define dev_open_DEV_AVR_EEPROM()   mos_mutex_lock(&eeprom_mutex)
 gain an exclusive lock on the AVR EEPROM Driver. Any other threads calling dev_open_DEV_AVR_EEPROM() will block until the owner calls dev_close_DEV_AVR_EEPROM().
#define dev_close_DEV_AVR_EEPROM()   mos_mutex_unlock(&eeprom_mutex)
 release exclusive lock on the AVR EEPROM Driver. Any other thread blocking on dev_open_DEV_AVR_EEPROM() will now unblock.

Functions

uint16_t dev_read_DEV_AVR_EEPROM (void *buf, uint16_t count)
 read count bytes from the current eeprom address into buf.
uint16_t dev_write_DEV_AVR_EEPROM (const void *buf, uint16_t count)
 write from buf to the current eeprom address.
uint8_t dev_mode_DEV_AVR_EEPROM (uint8_t md)
 not supported for the AVR EEPROM.
uint8_t dev_ioctl_DEV_AVR_EEPROM (int8_t request,...)
 send an IO Control to the EEPROM Driver. Accepted parameters are:
  1. DEV_SEEK, [int16_t address]


Variables

mos_mutex_t eeprom_mutex

Detailed Description

This group contains functions associated with the AVR EEPROM Driver. Applications can use this device to read or write from the AVR EEPROM. This applies to all AVR-based platforms (micaz/mica2/...)

Function Documentation

uint8_t dev_ioctl_DEV_AVR_EEPROM int8_t  request,
  ...
 

Parameters:
request The requested action.
... any required arguments for the specified IOCTL.
Returns:
DEV_OK or DEV_BAD_IOCTL.

uint8_t dev_mode_DEV_AVR_EEPROM uint8_t  md  ) 
 

Parameters:
md ignored.
Returns:
DEV_UNSUPPORTED

uint16_t dev_read_DEV_AVR_EEPROM void *  buf,
uint16_t  count
 

Parameters:
count the number of bytes to read.
buf the buffer to store the result in.
Returns:
the number of bytes read.

uint16_t dev_write_DEV_AVR_EEPROM const void *  buf,
uint16_t  count
 

Parameters:
count the number of bytes to be written.
buf the buffer containing the bytes to be written.
Returns:
the number of bytes written.


Variable Documentation

mos_mutex_t eeprom_mutex
 

For internal use only.

Used by dev_open and dev_close.


Generated on Sun Nov 22 06:26:00 2009 for MANTIS by  doxygen 1.4.6