MICA Microphone
[Device Drivers]


Defines

#define dev_open_DEV_MICA2_MIC()   mos_mutex_lock(&mic_mutex)
 gain an exclusive lock on the Microphone. Any other threads calling dev_open_DEV_MICA2_MIC() will block until the owner calls dev_close_DEV_MICA2_MIC().
#define dev_close_DEV_MICA2_MIC()   mos_mutex_unlock(&mic_mutex)
 release exclusive lock on the Microphone. Any other thread blocking on dev_open_DEV_MICA2_MIC() will now unblock.

Functions

uint16_t dev_read_DEV_MICA2_MIC (void *buf, uint16_t count)
 read from the Microphone into buf.
uint16_t dev_write_DEV_MICA2_MIC (const void *buf, uint16_t count)
 not supported for the MICA2 Microphone.
uint8_t dev_mode_DEV_MICA2_MIC (uint8_t md)
 change the status of the MICA2 Microphone. Accepted parameters are:
  1. DEV_MODE_OFF: Turn the device off.
  2. DEV_MODE_ON: Turn the device on.

uint8_t dev_ioctl_DEV_MICA2_MIC (int8_t request,...)
 not supported for the MICA2 Microphone.

Variables

mos_mutex_t mic_mutex

Detailed Description

This group contains functions associated with the MICA Microphone. This applies to the MICAz and MICA2 platforms.

Function Documentation

uint8_t dev_ioctl_DEV_MICA2_MIC int8_t  request,
  ...
 

Parameters:
request ignored.
... ignored.
Returns:
DEV_BAD_IOCTL

uint8_t dev_mode_DEV_MICA2_MIC uint8_t  md  ) 
 

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

uint16_t dev_read_DEV_MICA2_MIC void *  buf,
uint16_t  count
 

Parameters:
count the number of bytes to read. A value of '1' will read an 8-bit value; a value of '2' will read a 16-bit value. any other value will return DEV_UNSUPPORTED.
buf the buffer to store the result in.
Returns:
the number of bytes read. Must be either '1' or '2'.

uint16_t dev_write_DEV_MICA2_MIC const void *  buf,
uint16_t  count
 

Parameters:
buf ignored.
count ignored.
Returns:
DEV_UNSUPPORTED


Variable Documentation

mos_mutex_t mic_mutex
 

For internal use only.

Used by the dev_open and dev_close functions.


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