USB Host Shield 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | List of all members
BTHID Class Reference

#include <BTHID.h>

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

Public Member Functions

 BTHID (BTD *p, bool pair=false, const char *pin="1234")
 
HIDReportParserGetReportParser (uint8_t id)
 
bool SetReportParser (uint8_t id, HIDReportParser *prs)
 
void setProtocolMode (uint8_t mode)
 
void pair (void)
 
void attachOnInit (void(*funcOnInit)(void))
 
BluetoothService implementation
virtual void ACLData (uint8_t *ACLData)
 
virtual void Run ()
 
virtual void Reset ()
 
virtual void disconnect ()
 

Public Attributes

bool connected
 

Detailed Description

This BluetoothService class implements support for the HID keyboard and mice.

Definition at line 68 of file BTHID.h.

Constructor & Destructor Documentation

BTHID::BTHID ( BTD p,
bool  pair = false,
const char *  pin = "1234" 
)

Constructor for the BTHID class.

Parameters
pPointer to the BTD class instance.
pairSet this to true in order to pair with the device. If the argument is omitted then it will not pair with it. One can use PAIR to set it to true.
pinWrite the pin to BTD::btdPin. If argument is omitted, then "1234" will be used.

Definition at line 23 of file BTHID.cpp.

Member Function Documentation

void BTHID::ACLData ( uint8_t *  ACLData)
virtual

Used to pass acldata to the services.

Parameters
ACLDataIncoming acldata.

Reimplemented from BluetoothService.

Definition at line 61 of file BTHID.cpp.

void BTHID::Run ( )
virtual

Used to run part of the state maschine.

Reimplemented from BluetoothService.

Definition at line 347 of file BTHID.cpp.

void BTHID::Reset ( )
virtual

Use this to reset the service.

Reimplemented from BluetoothService.

Definition at line 47 of file BTHID.cpp.

void BTHID::disconnect ( )
virtual

Used this to disconnect any of the controllers.

Reimplemented from BluetoothService.

Definition at line 54 of file BTHID.cpp.

HIDReportParser* BTHID::GetReportParser ( uint8_t  id)
inline

Definition at line 92 of file BTHID.h.

bool BTHID::SetReportParser ( uint8_t  id,
HIDReportParser prs 
)
inline

Definition at line 96 of file BTHID.h.

void BTHID::setProtocolMode ( uint8_t  mode)
inline

Definition at line 101 of file BTHID.h.

void BTHID::pair ( void  )
inline

Call this to start the paring sequence with a controller

Definition at line 109 of file BTHID.h.

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

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

Parameters
funcOnInitFunction to call.

Definition at line 118 of file BTHID.h.

Member Data Documentation

bool BTHID::connected

True if a device is connected

Definition at line 103 of file BTHID.h.


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