TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 92

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)
Callbacks
When events occur that ToothPIC wants to tell you about, it calls a callback function. Callbacks are functions
which you must provide, even if you do nothing in them. The “Hello World” Firmware Solutions show the
minimum your application needs to do in terms of callback functions.
Callbacks generally occur while ToothPIC is servicing a low-priority interrupt. Therefore your callback function
can’t do anything which relies on interrupts being responded to. This includes functions such as AwaitBMTOK,
which require interpretation of incoming serial data from BlueMatik. It does not include most BMTCommands
and FxPCommands which transmit data only. (The exception is BMTReset, which cannot be called from
within a callback.) If necessary, set a semaphore inside the callback then return from the callback function.
From inside your main code, inspect the semaphore value frequently and respond appropriately when it is set.
(See the Semaphores section for an example.)
The callback functions are ErrorStatus, BMTEvent and FxPEvent.
ErrorStatus
ErrorStatus( unsigned char ErrNum )
Called if an error happens. Unless otherwise documented, errors are viewed as fatal and if you return from
ErrorStatus() results may be unpredictable, particularly if ErrorStatus or any of the functions it calls
use static variables. ErrNum indicates the exact nature of the error and will be one of the following:
Page 92
Name
ERR_BMTATBUFFOVERRUN
ERR_BMTFRAME
ERR_BMTOVERRUN
ERR_NOBLUEMATIK
ERR_WAITINGPREV
ERR_BMTBUFFOVERRUN
ERR_FLEXIPANELSERVICE
ERR_NOFLEXIPANELSERVICE
ERR_RXTIMEOUT
ERR_TXTIMEOUT
0x1C
0xC0
0x10
0x14
0x18
0x20
0x40
0x80
9-Apr-06
Keyboard but no pointing device †
Pointing device but no keyboard †
Toothpick 3.0.00007
Keyboard and pointing device †
Sensing device ‡
Card reader‡
Digitizer ‡
Value
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
DS380-8
© FlexiPanel Ltd
Explanation
AT response received before the previous one was
processed.
Framing error on BlueMatik UART. Most likely the
clock speed is wrong or a BlueMatik with incorrect
default baud rate has been installed.
BlueMatik input overrun – previous received character
was not added to buffer by the time the next character
was received.
BlueMatik not initialized yet. May not be installed.
Still awaiting completion of previous command
BlueMatik receive buffer overrun – no room left in
receive buffer
Operation not possible because FlexiPanel user
interface service is in operation
Operation not possible because FlexiPanel user
interface service is not in operation
BMTReceive timed out and the timeout value was odd
(i.e. not even). If you return from ErrorStatus(),
results BMTReceive will return with return value
False.
BMTTransmit timed out and the timeout value was
odd (i.e. not even). If you return from
Scanner
Camera
Display
Patents apply and/or pending
Printer
www.FlexiPanel.com

Related parts for TOOTHPIC