mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixed typo
This commit is contained in:
parent
85a6c43d4e
commit
00658d60eb
6 changed files with 8 additions and 8 deletions
6
BTD.cpp
6
BTD.cpp
|
@ -589,7 +589,7 @@ void BTD::HCI_event_task() {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_AUTHENTICATION_COMPLETE:
|
case EV_AUTHENTICATION_COMPLETE:
|
||||||
if(!hcibuf[2]) { // Check if paring was successful
|
if(!hcibuf[2]) { // Check if pairing was successful
|
||||||
if(pairWithWii && !connectToWii) {
|
if(pairWithWii && !connectToWii) {
|
||||||
#ifdef DEBUG_USB_HOST
|
#ifdef DEBUG_USB_HOST
|
||||||
Notify(PSTR("\r\nPairing successful with Wiimote"), 0x80);
|
Notify(PSTR("\r\nPairing successful with Wiimote"), 0x80);
|
||||||
|
@ -603,7 +603,7 @@ void BTD::HCI_event_task() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef DEBUG_USB_HOST
|
#ifdef DEBUG_USB_HOST
|
||||||
Notify(PSTR("\r\nParing Failed: "), 0x80);
|
Notify(PSTR("\r\nPairing Failed: "), 0x80);
|
||||||
D_PrintHex<uint8_t > (hcibuf[2], 0x80);
|
D_PrintHex<uint8_t > (hcibuf[2], 0x80);
|
||||||
#endif
|
#endif
|
||||||
hci_disconnect(hci_handle);
|
hci_disconnect(hci_handle);
|
||||||
|
@ -1110,7 +1110,7 @@ void BTD::hci_pin_code_request_reply() {
|
||||||
hcibuf[9] = 6; // Pin length is the length of the Bluetooth address
|
hcibuf[9] = 6; // Pin length is the length of the Bluetooth address
|
||||||
if(pairWiiUsingSync) {
|
if(pairWiiUsingSync) {
|
||||||
#ifdef DEBUG_USB_HOST
|
#ifdef DEBUG_USB_HOST
|
||||||
Notify(PSTR("\r\nParing with Wii controller via SYNC"), 0x80);
|
Notify(PSTR("\r\nPairing with Wii controller via SYNC"), 0x80);
|
||||||
#endif
|
#endif
|
||||||
for(uint8_t i = 0; i < 6; i++)
|
for(uint8_t i = 0; i < 6; i++)
|
||||||
hcibuf[10 + i] = my_bdaddr[i]; // The pin is the Bluetooth dongles Bluetooth address backwards
|
hcibuf[10 + i] = my_bdaddr[i]; // The pin is the Bluetooth dongles Bluetooth address backwards
|
||||||
|
|
2
BTD.h
2
BTD.h
|
@ -535,7 +535,7 @@ private:
|
||||||
uint8_t pollInterval;
|
uint8_t pollInterval;
|
||||||
bool bPollEnable;
|
bool bPollEnable;
|
||||||
|
|
||||||
bool pairWiiUsingSync; // True if paring was done using the Wii SYNC button.
|
bool pairWiiUsingSync; // True if pairing was done using the Wii SYNC button.
|
||||||
bool checkRemoteName; // Used to check remote device's name before connecting.
|
bool checkRemoteName; // Used to check remote device's name before connecting.
|
||||||
bool incomingPS4; // True if a PS4 controller is connecting
|
bool incomingPS4; // True if a PS4 controller is connecting
|
||||||
uint8_t classOfDevice[3]; // Class of device of last device
|
uint8_t classOfDevice[3]; // Class of device of last device
|
||||||
|
|
2
BTHID.h
2
BTHID.h
|
@ -87,7 +87,7 @@ public:
|
||||||
/** True if a device is connected */
|
/** True if a device is connected */
|
||||||
bool connected;
|
bool connected;
|
||||||
|
|
||||||
/** Call this to start the paring sequence with a device */
|
/** Call this to start the pairing sequence with a device */
|
||||||
void pair(void) {
|
void pair(void) {
|
||||||
if(pBtd)
|
if(pBtd)
|
||||||
pBtd->pairWithHID();
|
pBtd->pairWithHID();
|
||||||
|
|
|
@ -176,7 +176,7 @@ The [PS4BT.ino](examples/Bluetooth/PS4BT/PS4BT.ino) and [PS4USB.ino](examples/PS
|
||||||
|
|
||||||
Before you can use the PS4 controller via Bluetooth you will need to pair with it.
|
Before you can use the PS4 controller via Bluetooth you will need to pair with it.
|
||||||
|
|
||||||
Simply create the PS4BT instance like so: ```PS4BT PS4(&Btd, PAIR);``` and then hold down the Share button and then hold down the PS without releasing the Share button. The PS4 controller will then start to blink rapidly indicating that it is in paring mode.
|
Simply create the PS4BT instance like so: ```PS4BT PS4(&Btd, PAIR);``` and then hold down the Share button and then hold down the PS without releasing the Share button. The PS4 controller will then start to blink rapidly indicating that it is in pairing mode.
|
||||||
|
|
||||||
It should then automatically pair the dongle with your controller. This only have to be done once.
|
It should then automatically pair the dongle with your controller. This only have to be done once.
|
||||||
|
|
||||||
|
|
2
Wii.h
2
Wii.h
|
@ -85,7 +85,7 @@ public:
|
||||||
|
|
||||||
/** @name Wii Controller functions */
|
/** @name Wii Controller functions */
|
||||||
|
|
||||||
/** Call this to start the paring sequence with a controller */
|
/** Call this to start the pairing sequence with a controller */
|
||||||
void pair(void) {
|
void pair(void) {
|
||||||
if(pBtd)
|
if(pBtd)
|
||||||
pBtd->pairWithWiimote();
|
pBtd->pairWithWiimote();
|
||||||
|
|
|
@ -19,7 +19,7 @@ BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
||||||
|
|
||||||
/* You can create the instance of the PS4BT class in two ways */
|
/* You can create the instance of the PS4BT class in two ways */
|
||||||
// This will start an inquiry and then pair with the PS4 controller - you only have to do this once
|
// This will start an inquiry and then pair with the PS4 controller - you only have to do this once
|
||||||
// You will need to hold down the PS and Share button at the same time, the PS4 controller will then start to blink rapidly indicating that it is in paring mode
|
// You will need to hold down the PS and Share button at the same time, the PS4 controller will then start to blink rapidly indicating that it is in pairing mode
|
||||||
PS4BT PS4(&Btd, PAIR);
|
PS4BT PS4(&Btd, PAIR);
|
||||||
|
|
||||||
// After that you can simply create the instance like so and then press the PS button on the device
|
// After that you can simply create the instance like so and then press the PS button on the device
|
||||||
|
|
Loading…
Reference in a new issue