Dependents:
UsbHostMAX3421E_Hello
« Back to documentation index
BluetoothService Class Reference
All Bluetooth services should inherit this class.
More...
#include <BTD.h >
Inherited by BTHID , PS3BT , SPP , and WII .
Public Member Functions
virtual void ACLData (uint8_t *ACLData)=0
Used to pass acldata to the Bluetooth service.
virtual void Run ()=0
Used to run the different state machines in the Bluetooth service.
virtual void Reset ()=0
Used to reset the Bluetooth service.
virtual void disconnect ()=0
Used to disconnect both the L2CAP Channel and the HCI Connection for the Bluetooth service.
void attachOnInit (void(*funcOnInit)(void))
Used to call your own function when the device is successfully initialized.
Protected Member Functions
virtual void onInit ()=0
Called when a device is successfully initialized.
bool checkHciHandle (uint8_t *buf, uint16_t handle)
Used to check if the incoming L2CAP data matches the HCI Handle.
Protected Attributes
void(* pFuncOnInit )(void)
Pointer to function called in onInit() .
BTD * pBtd
Pointer to BTD instance.
uint16_t hci_handle
The HCI Handle for the connection.
uint32_t l2cap_event_flag
L2CAP flags of received Bluetooth events.
uint8_t identifier
Identifier for L2CAP commands.
Detailed Description
All Bluetooth services should inherit this class.
Definition at line 570 of file BTD.h .
Member Function Documentation
virtual void ACLData
(
uint8_t *
ACLData )
[pure virtual]
Used to pass acldata to the Bluetooth service.
Parameters:
ACLData Pointer to the incoming acldata.
Implemented in BTHID , PS3BT , SPP , and WII .
void attachOnInit
(
void(*)(void)
funcOnInit )
Used to call your own function when the device is successfully initialized.
Parameters:
funcOnInit Function to call.
Definition at line 592 of file BTD.h .
bool checkHciHandle
(
uint8_t *
buf ,
uint16_t
handle
)
[protected]
Used to check if the incoming L2CAP data matches the HCI Handle.
Definition at line 605 of file BTD.h .
virtual void disconnect
(
)
[pure virtual]
Used to disconnect both the L2CAP Channel and the HCI Connection for the Bluetooth service.
Implemented in BTHID , PS3BT , SPP , and WII .
virtual void onInit
(
)
[protected, pure virtual]
Called when a device is successfully initialized.
Use attachOnInit(void (*funcOnInit)(void)) to call your own function. This is useful for instance if you want to set the LEDs in a specific way.
Implemented in BTHID , PS3BT , SPP , and WII .
virtual void Reset
(
)
[pure virtual]
virtual void Run
(
)
[pure virtual]
Used to run the different state machines in the Bluetooth service.
Implemented in BTHID , PS3BT , SPP , and WII .
Field Documentation
The HCI Handle for the connection.
Definition at line 616 of file BTD.h .
Identifier for L2CAP commands.
Definition at line 622 of file BTD.h .
L2CAP flags of received Bluetooth events.
Definition at line 619 of file BTD.h .
Pointer to BTD instance.
Definition at line 613 of file BTD.h .