MICA2 Battery Driver
[Device Drivers]


Defines

#define dev_open_DEV_MICA2_BATTERY(void)   mos_mutex_lock(&battery_mutex)
 gain an exclusive lock on the Battery. Any other threads calling dev_open_DEV_MICA2_BATTERY() will block until the owner calls dev_close_DEV_MICA2_BATTERY().
#define dev_close_DEV_MICA2_BATTERY(void)   mos_mutex_unlock(&battery_mutex)
 release exclusive lock on the Battery. Any other thread blocking on dev_open_DEV_MICA2_BATTERY() will now unblock.

Functions

uint16_t dev_read_DEV_MICA2_BATTERY (void *buf, uint16_t count)
 read the current battery value.
uint16_t dev_write_DEV_MICA2_BATTERY (const void *buf, uint16_t count)
 not supported by the MICA2 Battery Driver.
uint8_t dev_mode_DEV_MICA2_BATTERY (uint8_t md)
 change the mode of the mica2 battery driver. Accepted parameters are:
  1. DEV_MODE_ON
  2. DEV_MODE_OFF

uint8_t dev_ioctl_DEV_MICA2_BATTERY (int8_t request,...)
 not supported by the MICA2 Battery Driver.

Detailed Description

This group contains functions associated with reading the MICA2 Battery status.

Function Documentation

uint8_t dev_ioctl_DEV_MICA2_BATTERY int8_t  request,
  ...
 

Parameters:
request ignored
... ignored
Returns:
DEV_BAD_IOCTL

uint8_t dev_mode_DEV_MICA2_BATTERY uint8_t  md  ) 
 

Parameters:
md the new mode.
Returns:
DEV_OK or DEV_UNSUPPORTED.

uint16_t dev_read_DEV_MICA2_BATTERY void *  buf,
uint16_t  count
 

Parameters:
buf the buffer to read the battery value into.
count the number of bytes to read. This must be either '1' to read an 8-bit value, or '2' to read a 16-bit value.
Returns:
the number of bytes read.

uint16_t dev_write_DEV_MICA2_BATTERY const void *  buf,
uint16_t  count
 

Parameters:
buf ignored
count ignored
Returns:
DEV_UNSUPPORTED


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