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 569 of file BTD.h.

Constructor & Destructor Documentation

BluetoothService::BluetoothService ( BTD p)
inline

Definition at line 571 of file BTD.h.

Member Function Documentation

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, PS3BT, SPP, and BTHID.

virtual void BluetoothService::Run ( )
pure virtual

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

Implemented in WII, PS3BT, SPP, and BTHID.

virtual void BluetoothService::Reset ( )
pure virtual

Used to reset the Bluetooth service.

Implemented in WII, PS3BT, SPP, and BTHID.

virtual void BluetoothService::disconnect ( )
pure virtual

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

Implemented in SPP, WII, PS3BT, and BTHID.

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 591 of file BTD.h.

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, PS3BT, SPP, and BTHID.

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 604 of file BTD.h.

Member Data Documentation

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

Pointer to function called in onInit().

Definition at line 609 of file BTD.h.

BTD* BluetoothService::pBtd
protected

Pointer to BTD instance.

Definition at line 612 of file BTD.h.

uint16_t BluetoothService::hci_handle
protected

The HCI Handle for the connection.

Definition at line 615 of file BTD.h.

uint32_t BluetoothService::l2cap_event_flag
protected

L2CAP flags of received Bluetooth events.

Definition at line 618 of file BTD.h.

uint8_t BluetoothService::identifier
protected

Identifier for L2CAP commands.

Definition at line 621 of file BTD.h.


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