USB_Host_Shield_2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BTD Class Reference

#include <BTD.h>

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

Public Member Functions

 BTD (USB *p)
 
virtual uint8_t Init (uint8_t parent, uint8_t port, bool lowspeed)
 
virtual uint8_t Release ()
 
virtual uint8_t Poll ()
 
virtual uint8_t GetAddress ()
 
virtual bool isReady ()
 
virtual void EndpointXtract (uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
 
void disconnect ()
 
int8_t registerServiceClass (BluetoothService *pService)
 
void HCI_Command (uint8_t *data, uint16_t nbytes)
 
void hci_reset ()
 
void hci_read_bdaddr ()
 
void hci_read_local_version_information ()
 
void hci_set_local_name (const char *name)
 
void hci_write_scan_enable ()
 
void hci_remote_name ()
 
void hci_accept_connection ()
 
void hci_write_scan_disable ()
 
void hci_disconnect (uint16_t handle)
 
void hci_pin_code_request_reply ()
 
void hci_pin_code_negative_request_reply ()
 
void hci_link_key_request_negative_reply ()
 
void hci_authentication_request ()
 
void hci_inquiry ()
 
void hci_inquiry_cancel ()
 
void hci_connect ()
 
void L2CAP_Command (uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
 
void l2cap_connection_request (uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
 
void l2cap_connection_response (uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
 
void l2cap_config_request (uint16_t handle, uint8_t rxid, uint8_t *dcid)
 
void l2cap_config_response (uint16_t handle, uint8_t rxid, uint8_t *scid)
 
void l2cap_disconnection_request (uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
 
void l2cap_disconnection_response (uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
 
void l2cap_information_response (uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
 

Public Attributes

bool watingForConnection
 
bool l2capConnectionClaimed
 
const char * btdName
 
const char * btdPin
 
uint8_t my_bdaddr [6]
 
uint16_t hci_handle
 
uint8_t disc_bdaddr [6]
 
uint8_t remote_name [30]
 
uint8_t hci_version
 
bool connectToWii
 
bool incomingWii
 
bool pairWithWii
 
bool motionPlusInside
 

Protected Member Functions

void PrintEndpointDescriptor (const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
 

Protected Attributes

USBpUsb
 
uint8_t bAddress
 
EpInfo epInfo [BTD_MAX_ENDPOINTS]
 
uint8_t bConfNum
 
uint8_t bNumEP
 
uint32_t qNextPollTime
 

Static Protected Attributes

static const uint8_t BTD_EVENT_PIPE = 1
 
static const uint8_t BTD_DATAIN_PIPE = 2
 
static const uint8_t BTD_DATAOUT_PIPE = 3
 

Constructor & Destructor Documentation

BTD::BTD ( USB p)

Member Function Documentation

void BTD::disconnect ( )
inline
void BTD::EndpointXtract ( uint8_t  conf,
uint8_t  iface,
uint8_t  alt,
uint8_t  proto,
const USB_ENDPOINT_DESCRIPTOR ep 
)
virtual

Implements UsbConfigXtracter.

virtual uint8_t BTD::GetAddress ( )
inlinevirtual

Implements USBDeviceConfig.

void BTD::hci_accept_connection ( )
void BTD::hci_authentication_request ( )
void BTD::HCI_Command ( uint8_t *  data,
uint16_t  nbytes 
)
void BTD::hci_connect ( )
void BTD::hci_disconnect ( uint16_t  handle)
void BTD::hci_inquiry ( )
void BTD::hci_inquiry_cancel ( )
void BTD::hci_link_key_request_negative_reply ( )
void BTD::hci_pin_code_negative_request_reply ( )
void BTD::hci_pin_code_request_reply ( )
void BTD::hci_read_bdaddr ( )
void BTD::hci_read_local_version_information ( )
void BTD::hci_remote_name ( )
void BTD::hci_reset ( )
void BTD::hci_set_local_name ( const char *  name)
void BTD::hci_write_scan_disable ( )
void BTD::hci_write_scan_enable ( )
uint8_t BTD::Init ( uint8_t  parent,
uint8_t  port,
bool  lowspeed 
)
virtual

Implements USBDeviceConfig.

virtual bool BTD::isReady ( )
inlinevirtual
void BTD::L2CAP_Command ( uint16_t  handle,
uint8_t *  data,
uint8_t  nbytes,
uint8_t  channelLow = 0x01,
uint8_t  channelHigh = 0x00 
)
void BTD::l2cap_config_request ( uint16_t  handle,
uint8_t  rxid,
uint8_t *  dcid 
)
void BTD::l2cap_config_response ( uint16_t  handle,
uint8_t  rxid,
uint8_t *  scid 
)
void BTD::l2cap_connection_request ( uint16_t  handle,
uint8_t  rxid,
uint8_t *  scid,
uint16_t  psm 
)
void BTD::l2cap_connection_response ( uint16_t  handle,
uint8_t  rxid,
uint8_t *  dcid,
uint8_t *  scid,
uint8_t  result 
)
void BTD::l2cap_disconnection_request ( uint16_t  handle,
uint8_t  rxid,
uint8_t *  dcid,
uint8_t *  scid 
)
void BTD::l2cap_disconnection_response ( uint16_t  handle,
uint8_t  rxid,
uint8_t *  dcid,
uint8_t *  scid 
)
void BTD::l2cap_information_response ( uint16_t  handle,
uint8_t  rxid,
uint8_t  infoTypeLow,
uint8_t  infoTypeHigh 
)
uint8_t BTD::Poll ( )
virtual

Implements USBDeviceConfig.

void BTD::PrintEndpointDescriptor ( const USB_ENDPOINT_DESCRIPTOR ep_ptr)
protected
int8_t BTD::registerServiceClass ( BluetoothService pService)
inline
uint8_t BTD::Release ( )
virtual

Implements USBDeviceConfig.

Member Data Documentation

uint8_t BTD::bAddress
protected
uint8_t BTD::bConfNum
protected
uint8_t BTD::bNumEP
protected
const uint8_t BTD::BTD_DATAIN_PIPE = 2
staticprotected
const uint8_t BTD::BTD_DATAOUT_PIPE = 3
staticprotected
const uint8_t BTD::BTD_EVENT_PIPE = 1
staticprotected
const char* BTD::btdName
const char* BTD::btdPin
bool BTD::connectToWii
uint8_t BTD::disc_bdaddr[6]
EpInfo BTD::epInfo[BTD_MAX_ENDPOINTS]
protected
uint16_t BTD::hci_handle
uint8_t BTD::hci_version
bool BTD::incomingWii
bool BTD::l2capConnectionClaimed
bool BTD::motionPlusInside
uint8_t BTD::my_bdaddr[6]
bool BTD::pairWithWii
USB* BTD::pUsb
protected
uint32_t BTD::qNextPollTime
protected
uint8_t BTD::remote_name[30]
bool BTD::watingForConnection

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