Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

oEB500 Class Reference

an eb500 Bluetooth device from Parallax. More...

#include <oeb500.h>

Inheritance diagram for oEB500:

oUART OOMRM oTPU

Public Member Functions

 oEB500 (IOLINE imode, PORT ip, IOLINE iconnect, PORT pconnect)
 Constructor for eb500 Bluetooth module.

void send_command (const char *const icommand, bool cr)
 transmits an ASCII eb500 command.

void mode (EB500_MODE)
 Switches to COMMAND_MODE or DATA_MODE when using a dedicated channel for the mode.

void receive_ack (void)
 will wait for a '>' character from eb500 module.

bool connected (void)
 returns whether eb500 has a bluetooth connection using the dedicated channel.

void init (IOLINE channel, UART_MODE mode, int dsize, PARITY_TYPE parity, int BAUD_RATE)
 Init specifying channel on TPU port, mode of transmission, parity, and baud rate.

void priority (PRIORITY p)
 Sets TPU priority. Ref TPU Channel Utilization)
PRIORITY: Priority of channel.


bool havebyte ()
 Returns true if a byte was received;
bool: Return true if data in internal buffer; otherwise false.


word inbyte (void)
 returns the last unreturned data word

void outbyte (word txbyte)
 puts character out.

int sendingbyte (void)
 Whether module is still sending a byte or not.

int send (const char *const buf, int nbytes)
 Write a string of characters.

void buffer (volatile word *inbuffer, uint16 ilen)
 Provide a working buffer for the UART channel.

bool active (uint8 r=FALSE)
 Used to determine stale information.

void dump (void)
 Reset receiving counter after syncronizing messages.

uint16 byte_count (void)
 Returns number of bytes in signal buffer.

void baud_rate (int dsize, PARITY_TYPE parity, int BAUD_RATE)
 Allows reconfiguring of baud rate...basically reinitiales the channel.


Static Public Member Functions

int TCR1 (void)
void TMCR (int iarb)
bool HSQR (int chan, int val)
 Configures the host sequence register.

bool HSRR (int chan, int val)
 Configures the host sequence request register.

bool CPR (int chan, int val)
 Configures the channel priority register (Ref. TPU Channel Utilization).

bool CIER (int chan, int cie)
 Configures the channel interrupt enable register.

int CISR (int chan)
 Returns the channel interrupt status register.

void CISR_clear (int chan)
 Clears the channel interrupt status register for the channel.

bool TICR (int cirl, int cibv)
 Configures the TPU interrupt configuration register.

int tpu_vector (IOLINE channel)
 Given a channel, returns the vector number to use for an interrupt.


Detailed Description

an eb500 Bluetooth device from Parallax.


Constructor & Destructor Documentation

oEB500 IOLINE  imode,
PORT  ip,
IOLINE  iconnect,
PORT  pconnect
 

Constructor for eb500 Bluetooth module.

Parameters:
rx: Receiving TPU UART channel
tx: Transmitting TPU UART channel
imod: channel for mode pin of eb500 module
ip : port for mode pin of eb500 module
iconnect: output channel to detect a live bluetooth connection.
pconnect: port of iconnect.
baud : baud rate to run eb500 module.


Member Function Documentation

bool CIER int  chan,
int  cie
[static, inherited]
 

Configures the channel interrupt enable register.

Parameters:
int: channel
int: 1 enables; 0 disables

bool CPR int  chan,
int  val
[static, inherited]
 

Configures the channel priority register (Ref. TPU Channel Utilization).

Parameters:
int: channel
int: priority

bool havebyte  )  [inherited]
 

Returns true if a byte was received;
bool: Return true if data in internal buffer; otherwise false.

bool HSQR int  chan,
int  val
[static, inherited]
 

Configures the host sequence register.

Parameters:
int: channel
int dependent upon function (CFSR) selected

bool HSRR int  chan,
int  val
[static, inherited]
 

Configures the host sequence request register.

Parameters:
int: channel
int: dependend upon function

void send_command const char *const  icommand,
bool  cr
 

transmits an ASCII eb500 command.

Parameters:
icommand : eb500 command to transmit
cr : true to append a carriage return to command.

int TCR1 void   )  [static, inherited]
 

misnomer--should be TCR1 divisor--return number of clocks (PSCK,TCR1P modifications) Globally available object. Can be used in combination with TPU_REGISTER definition to say TPU_REGISTER->CFSR.BITS...

void TMCR int  iarb  )  [static, inherited]
 

was tpu_init Configures the channel function select register


The documentation for this class was generated from the following file:
Generated on Mon Oct 8 19:32:45 2007 for OOMRM Hardware API by doxygen1.3