AVR I2C
[Device Drivers]


Functions

uint16_t dev_read_DEV_AVR_I2C (void *buf, uint16_t count)
 read from the I2C Bus into buf.
uint16_t dev_write_DEV_AVR_I2C (const void *buf, uint16_t count)
 write from buf to the I2C Bus.
uint8_t dev_mode_DEV_AVR_I2C (uint8_t md)
 change the status of the AVR I2C Driver. Accepted parameters are:
  1. DEV_MODE_OFF: Turn the device off.
  2. DEV_MODE_ON: Turn the device on.

uint8_t dev_ioctl_DEV_AVR_I2C (int8_t request,...)
 send an IO Control to the I2C Bus. Accepted parameters are:
  1. I2C_ENABLE_ACK
  2. I2C_DISABLE_ACK
  3. I2C_DEST_ADDR, [uint16_t address]
  4. I2C_SLAVE_ADDR, [uint16_t address]
  5. I2C_SET_BRR, [uint16_t baudrate]


Detailed Description

This group contains functions associated with the I2C driver for the AVR architecture. Other drivers may use this driver to communicate with hardware sitting on the I2C bus, such as the weatherboard gps driver. In general, application programmers should not need to use this device, Unless a there is an unsupported device attached to the I2C Bus.

Function Documentation

uint8_t dev_ioctl_DEV_AVR_I2C 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_I2C uint8_t  md  ) 
 

Parameters:
md The mode you wish to change to.
Returns:
DEV_OK or DEV_UNSUPPORTED.

uint16_t dev_read_DEV_AVR_I2C void *  buf,
uint16_t  count
 

Parameters:
count the number of bytes to read. A value of '2' will read a 16-bit value; any other value will read an array of bytes.
buf the buffer to store the result in.
Returns:
the number of bytes read.

uint16_t dev_write_DEV_AVR_I2C const void *  buf,
uint16_t  count
 

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


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