24#ifndef __BLUETOOTH_HEAD_H__
25#define __BLUETOOTH_HEAD_H__
30#include "utBluetoothAudio.h"
31#include "utBluetoothRFCOMM.h"
38#define BLUETOOTH_RX_BUFFER_SIZE 256
45#define BT_RESPONSE_BUFFER_LENGTH 256
48#define BT_RESPONSE_DATA_BUFFER_LENGTH 1024
55#define BLUETOOTH_TX_BUFFER_SIZE 1024
63#define BT_MAX_NUM_MODES 2
70#define BT_MAX_NUM_SETUP_COMMANDS 32
77#define BT_MAX_COMMAND_LENGTH 64
106 void (*SetupCommandsCallback)(void);
107 bool (*ConnectionCallback)(u8 linkid, u8 channelid,
char * address);
108 void (*DisconnectionCallback)(u8 linkid,
char * errorMessage);
109 void (*PairingCallback)(void);
110 bool (*CommandCallback)(
char *argv, u8 size);
111 bool (*DataCallback)(UT_RingBuffer *responseBuffer);
162 BT_MODULE_NONE = 0x00,
163 BT_MODULE_AUDIO = 0x01,
164 BT_MODULE_RFCOMM = 0x02,
165 BT_MODULE_ANY = 0x03,
188 BT_AUTH_MODE_DISPLAY,
190 BT_AUTH_MODE_KEYBOARD,
196extern bool processingBTCommands;
197extern char bluemixAddress[17];
262extern UT_NotificationType BTnotificationType(
void);
264extern bool isBTOn(
void);
266extern void BT_switchMode(
char *oldProfile,
char *newProfile,
char *command, u8 commandLength);
A device that is created when a Bluetooth device is connected to.
Definition: utBluetooth.h:132
bool Connected
Definition: utBluetooth.h:138
u8 LinkID
Definition: utBluetooth.h:135
char * Profile
Definition: utBluetooth.h:134
u8 mode
Definition: utBluetooth.h:137
u8 Channel
Definition: utBluetooth.h:136
All the information that is requited when creating a new profile/mode.
Definition: utBluetooth.h:102
All the information about a command to send to the Bluetooth module.
Definition: utBluetooth.h:153
int maxAttempts
Definition: utBluetooth.h:156
int numAttempts
Definition: utBluetooth.h:155
ModuleType
The fixed mode the BT module can connect to.
Definition: utBluetooth.h:161
BT_SetupStage
The states used internally when in SetupMode.
Definition: utBluetooth.h:180
bool BTaddMode(BT_Profile b)
BT_Auth_Mode
The states used internally when in SetupMode.
Definition: utBluetooth.h:187
void utBT_SendCommand(const char *format,...)
bool utBT_Notify(UT_DeviceMessage state)
#define BT_MAX_COMMAND_LENGTH
Max command length for the BT module.
Definition: utBluetooth.h:77
bool BTaddSetupCommand(char *com)
BT_StateType
The mode this module is running in.
Definition: utBluetooth.h:170
int utBT_SendData(const u8 *data, u32 size)
int BTLoggerHasSpace(void)