TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 88

MODULE, BLUETOOTH, DATA ACQUISITION

TOOTHPIC

Manufacturer Part Number
TOOTHPIC
Description
MODULE, BLUETOOTH, DATA ACQUISITION
Manufacturer
RF Solutions
Datasheet

Specifications of TOOTHPIC

Svhc
No SVHC (15-Dec-2010)
If there is enough available space, nBytes of data is placed in the buffer and the function returns immediately
with the value True. If pTxDataR is non-zero, the data is sourced from that ROM address; otherwise it is
sourced from the RAM address pTxData. If the transmit buffer does not contain sufficient space for nBytes,
it will wait for up to msTimeOut milliseconds for sufficient space. If at the end of that period there is still
insufficient space, BMTTransmit will return with the value False, without adding any data to the transmit
buffer; in addition, if msTimeOut was an odd number, a ERR_TXTIMEOUT error status event will be generated
before returning. If msTimeOut is zero, BMTTransmit will not return until sufficient space is available in the
buffer.
The BlueMatik transmit buffer is reset if the remote device disconnects.
BMTTxAdvance, BMTTxAdvanceCh
The BMTAdvance macro advances the transmit buffer end pointer BMTTxEnd by i bytes.
BMTAdvanceCh macro advances the transmit buffer end pointer BMTTxEnd by 1 byte. Transmission will take
place as soon as possible. They are high-speed macros and no buffer overrun checks are made. Use the
BMTTxWaitBytes macro or BMTRxEmpty value to wait until there is room for more data in the transmit buffer.
i must be of type unsigned char – this is a macro and no type casting is done.
The BlueMatik transmit buffer is reset if the remote device disconnects.
As of ToothPIC 3.0.00005, BMTTxAdvance and BMTTxAdvanceCh have not been fully implemented and the
BMTTransmit macro should be used instead.
BMTTxLoc, BMTTxCh
The BMTTxLoc(i) macro is a pointer to the memory location of the ith character in the transmit buffer after
the end point BMTTxEnd, accounting for the fact that the buffer is circular. The BMTTxCh macro is a pointer to
the memory location of the transmit buffer end point BMTTxEnd. i must be of type unsigned char – this is a
macro and no type casting is done. i is zero-based, so BMTTxLoc(0) so is the next vacant position in the
transmit buffer.
BMTTxLoc / BMTTxCh and BMTTdvance / BMTTxAdvanceCh provide a memory- and time-efficient way of
writing data into the buffer for transmission. They are high-speed macros and no buffer overrun checks are
made. Use the BMTTxWaitBytes macro value to wait until there is room for more data in the transmit buffer.
Examples:
As of ToothPIC 3.0.00005, BMTTxLoc and BMTTxCh have not been fully implemented and the BMTTransmit
macro should be used instead.
Page 88
BMTTxAdvance( unsigned char i )
BMTTxAdvanceCh
unsigned char * BMTTxLoc( unsigned char i )
unsigned char * BMTTxCh
BMTTxWaitBytes(1);
*BMTTxCh = 'A';
BMTTxAdvanceCh;
char i;
BMTTxWaitBytes(26);
for ( i=0; i<26; i++ )
BMTTxAdvance(26);
9-Apr-06
*BMTTxLoc(i) = 'A' + i; // Whole alphabet
Toothpick 3.0.00007
DS380-8
© FlexiPanel Ltd
// Put character in buffer
// Transmit
// Wait for space
Patents apply and/or pending
www.FlexiPanel.com
The

Related parts for TOOTHPIC