USB Host Shield 2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BluetoothService Class Referenceabstract

#include <BTD.h>

Inheritance diagram for BluetoothService:
Inheritance graph
[legend]
Collaboration diagram for BluetoothService:
Collaboration graph
[legend]

Public Member Functions

 BluetoothService (BTD *p)
 
virtual void ACLData (uint8_t *ACLData)=0
 
virtual void Run ()=0
 
virtual void Reset ()=0
 
virtual void disconnect ()=0
 
void attachOnInit (void(*funcOnInit)(void))
 

Protected Member Functions

virtual void onInit ()=0
 
bool checkHciHandle (uint8_t *buf, uint16_t handle)
 

Protected Attributes

void(* pFuncOnInit )(void)
 
BTDpBtd
 
uint16_t hci_handle
 
uint32_t l2cap_event_flag
 
uint8_t identifier
 

Detailed Description

All Bluetooth services should inherit this class.

Definition at line 604 of file BTD.h.

Constructor & Destructor Documentation

◆ BluetoothService()

BluetoothService::BluetoothService ( BTD p)
inline

Definition at line 606 of file BTD.h.

Member Function Documentation

◆ ACLData()

virtual void BluetoothService::ACLData ( uint8_t *  ACLData)
pure virtual

Used to pass acldata to the Bluetooth service.

Parameters
ACLDataPointer to the incoming acldata.

Implemented in WII, SPP, PS3BT, and BTHID.

◆ Run()

virtual void BluetoothService::Run ( )
pure virtual

Used to run the different state machines in the Bluetooth service.

Implemented in WII, SPP, PS3BT, and BTHID.

◆ Reset()

virtual void BluetoothService::Reset ( )
pure virtual

Used to reset the Bluetooth service.

Implemented in WII, SPP, PS3BT, and BTHID.

◆ disconnect()

virtual void BluetoothService::disconnect ( )
pure virtual

Used to disconnect both the L2CAP Channel and the HCI Connection for the Bluetooth service.

Implemented in WII, SPP, PS3BT, and BTHID.

◆ attachOnInit()

void BluetoothService::attachOnInit ( void(*)(void)  funcOnInit)
inline

Used to call your own function when the device is successfully initialized.

Parameters
funcOnInitFunction to call.

Definition at line 626 of file BTD.h.

◆ onInit()

virtual void BluetoothService::onInit ( )
protectedpure 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 WII, SPP, PS3BT, and BTHID.

◆ checkHciHandle()

bool BluetoothService::checkHciHandle ( uint8_t *  buf,
uint16_t  handle 
)
inlineprotected

Used to check if the incoming L2CAP data matches the HCI Handle

Definition at line 639 of file BTD.h.

Member Data Documentation

◆ pFuncOnInit

void(* BluetoothService::pFuncOnInit) (void)
protected

Pointer to function called in onInit().

Definition at line 644 of file BTD.h.

◆ pBtd

BTD* BluetoothService::pBtd
protected

Pointer to BTD instance.

Definition at line 647 of file BTD.h.

◆ hci_handle

uint16_t BluetoothService::hci_handle
protected

The HCI Handle for the connection.

Definition at line 650 of file BTD.h.

◆ l2cap_event_flag

uint32_t BluetoothService::l2cap_event_flag
protected

L2CAP flags of received Bluetooth events.

Definition at line 653 of file BTD.h.

◆ identifier

uint8_t BluetoothService::identifier
protected

Identifier for L2CAP commands.

Definition at line 656 of file BTD.h.


The documentation for this class was generated from the following file: