USB Host Shield 2.0
|
#include <SPP.h>
Public Member Functions | |
SPP (BTD *p, const char *name="Arduino", const char *pin="0000") | |
operator bool () | |
BluetoothService implementation | |
virtual void | ACLData (uint8_t *ACLData) |
virtual void | Run () |
virtual void | Reset () |
virtual void | disconnect () |
Serial port profile (SPP) Print functions | |
virtual int | available (void) |
virtual void | flush (void) |
virtual int | peek (void) |
virtual int | read (void) |
virtual size_t | write (uint8_t data) |
virtual size_t | write (const uint8_t *data, size_t size) |
void | discard (void) |
void | send (void) |
Public Attributes | |
bool | connected |
This BluetoothService class implements the Serial Port Protocol (SPP). It inherits the Arduino Stream class. This allows it to use all the standard Arduino print and stream functions.
SPP::SPP | ( | BTD * | p, |
const char * | name = "Arduino" , |
||
const char * | pin = "0000" |
||
) |
Constructor for the SPP class.
p | Pointer to BTD class instance. |
name | Set the name to BTD::btdName. If argument is omitted, then "Arduino" will be used. |
pin | Write the pin to BTD::btdPin. If argument is omitted, then "0000" will be used. |
|
inline |
|
virtual |
Used to pass acldata to the services.
ACLData | Incoming acldata. |
Reimplemented from BluetoothService.
|
virtual |
Used to establish the connection automatically.
Reimplemented from BluetoothService.
|
virtual |
Use this to reset the service.
Reimplemented from BluetoothService.
|
virtual |
Used this to disconnect the virtual serial port.
Reimplemented from BluetoothService.
|
virtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void SPP::discard | ( | void | ) |
void SPP::send | ( | void | ) |
bool SPP::connected |