|
Igtimi Yachtbot Firmware
|
#include <stdlib.h>#include "uTrack.h"#include "utHAL.h"#include "utBluetoothAudio.h"#include "utBluetoothRFCOMM.h"Data Structures | |
| struct | BT_Profile |
| struct | BT_Device |
| struct | BTCommand |
Macros | |
| #define | BLUETOOTH_RX_BUFFER_SIZE 256 |
| #define | BT_RESPONSE_BUFFER_LENGTH 256 |
| #define | BT_RESPONSE_DATA_BUFFER_LENGTH 1024 |
| #define | BLUETOOTH_TX_BUFFER_SIZE 1024 |
| #define | BT_MAX_NUM_MODES 2 |
| #define | BT_MAX_NUM_SETUP_COMMANDS 32 |
| #define | BT_MAX_COMMAND_LENGTH 64 |
Enumerations | |
| enum | ModuleType { BT_MODULE_NONE = 0x00 , BT_MODULE_AUDIO = 0x01 , BT_MODULE_RFCOMM = 0x02 , BT_MODULE_ANY = 0x03 } |
| enum | BT_StateType { STATE_OFF , STATE_COMMAND , STATE_SETUP , STATE_PAIRING , STATE_RUNNING } |
| enum | BT_SetupStage { BT_WAIT_BANNER , BT_WAIT_COMMANDS } |
| enum | BT_Auth_Mode { BT_AUTH_MODE_DISPLAY , BT_AUTH_MODE_BUTTON , BT_AUTH_MODE_KEYBOARD , BT_AUTH_MODE_NONE } |
Functions | |
| bool | utBT_Notify (UT_DeviceMessage state) |
| bool | BTaddMode (BT_Profile b) |
| bool | BTaddSetupCommand (char *com) |
| void | utBT_SendCommand (const char *format,...) |
| int | utBT_SendData (const u8 *data, u32 size) |
| int | BTLoggerHasSpace (void) |
| UT_NotificationType | BTnotificationType (void) |
| bool | isBTOn (void) |
| void | BT_switchMode (char *oldProfile, char *newProfile, char *command, u8 commandLength) |
| ModuleType | BT_getModuleType (void) |
Variables | |
| bool | bluemix |
| bool | processingBTCommands |
| char | bluemixAddress [17] |
The software module for handling the Bluetooth hardware module (WT32).
Holds commond methods for bluetooth connection. Profiles can be added so they can be connected to.
| #define BLUETOOTH_RX_BUFFER_SIZE 256 |
The buffer for receiving data.
| #define BLUETOOTH_TX_BUFFER_SIZE 1024 |
The transmitting buffer.
| #define BT_MAX_COMMAND_LENGTH 64 |
Max command length for the BT module.
| #define BT_MAX_NUM_MODES 2 |
Maximum number of allowable profile (e.g Audio, RFCOMM)
| #define BT_MAX_NUM_SETUP_COMMANDS 32 |
The maximum number of allowable setup commands for the BT module.
| #define BT_RESPONSE_BUFFER_LENGTH 256 |
The buffer for the response.
| bool BTaddMode | ( | BT_Profile | b | ) |
Allows other 'profiles' to add themselves to the bluetooth 'layer'
| BT_Profile | - the BT_Profile struct containing information about the profile. |
| bool BTaddSetupCommand | ( | char * | com | ) |
A method for adding in setup commands from different profiles.
| char* | - The setup command. |
| int BTLoggerHasSpace | ( | void | ) |
Returns the amount of space in the buffer for the logger
| void |
| bool utBT_Notify | ( | UT_DeviceMessage | state | ) |
Main Loop calls back to here
| UT_DeviceMessage | state - Current state of the loop |
| void utBT_SendCommand | ( | const char * | format, |
| ... | |||
| ) |
Send a command
| const | char* - the command |
| int utBT_SendData | ( | const u8 * | data, |
| u32 | size | ||
| ) |
Sends a specified amount of data via the Bluetooth UART
| const | u8* - the data to send |
| u32 | size - the amount of data to send |