bt.h File Reference


Data Structures

struct  bt_device

Functions

bool bt_connect (const char *addr)
bool bt_connected ()
bool bt_disconnect ()
uint8 bt_scan (bt_device **list, uint8 timeout)
bool bt_set_name (const char *name)

Function Documentation

bool bt_connect ( const char *  addr  ) 

connect to a device

Parameters:
addr address (null-terminated string)
Returns:
true if successful, false if not

bool bt_connected (  ) 

return if the device is connected or not

Returns:
true if connected, false if not

bool bt_disconnect (  ) 

disconnect from the current connection

Returns:
true if successful, false if not

uint8 bt_scan ( bt_device **  list,
uint8  timeout 
)

initiate a device scan

Parameters:
list pointer that will hold the location of the device list
timeout time to scan in seconds
Returns:
number of devices found

bool bt_set_name ( const char *  name  ) 

set the friendly name of the device

Parameters:
name name string (up to 16 characters long)
Returns:
true if successful, false if not