#include <sys/types.h>
#include <bt/bt_hci_api.h>
Defines | |
#define | CPM_DEFAULT_MASTER_OR_SLAVE BT_HCI_MY_ROLE_SLAVE |
#define | CPM_DEFAULT_MAX_SNIFF_LINKS 1 |
#define | CPM_DEFAULT_SLEEP_TIME 10000 |
#define | CPM_DEFAULT_SNIFF_ATTEMPT 8 |
#define | CPM_DEFAULT_SNIFF_INTERVAL 512 |
#define | CPM_DEFAULT_SNIFF_TIMEOUT 16 |
#define | CPM_DEFAULT_THREAD_PRIORITY 100 |
#define | CPM_DEFAULT_WAIT_TIME 1000 |
Functions | |
char | cpm_init (struct btstack *bt_stack, u_long cod) |
Initializes the Connection Power Manager. | |
void | cpm_pause (void) |
Pauses the Connection Power Manager. | |
void | cpm_resume (void) |
Resumes the Connection Power Manager. | |
void | cpm_start (void) |
Starts the Connection Power Manager. | |
void | cpm_stop (void) |
Stops the Connection Power Manager. |
#define CPM_DEFAULT_MASTER_OR_SLAVE BT_HCI_MY_ROLE_SLAVE |
put either master or slave links to sniff
#define CPM_DEFAULT_MAX_SNIFF_LINKS 1 |
maximum links putted to sniff
#define CPM_DEFAULT_SLEEP_TIME 10000 |
periodic time in ms to check the con_table
#define CPM_DEFAULT_SNIFF_ATTEMPT 8 |
sniff attempt SA (see bt_hci_sniff_mode)
#define CPM_DEFAULT_SNIFF_INTERVAL 512 |
sniff interval SI (see bt_hci_sniff_mode)
#define CPM_DEFAULT_SNIFF_TIMEOUT 16 |
sniff timeout ST (see bt_hci_sniff_mode)
#define CPM_DEFAULT_THREAD_PRIORITY 100 |
priority of this thread (see NutThreadSetPriority)
#define CPM_DEFAULT_WAIT_TIME 1000 |
wait time in ms between each link putting in sniff mode
Initializes the Connection Power Manager.
stack | Pointer to the btstack | |
cod | only put connections in sniff mode if remote device has this CoD (0 to disable) |
void cpm_pause | ( | void | ) |
Pauses the Connection Power Manager.
Waits to put active links to sniff mode
void cpm_resume | ( | void | ) |
Resumes the Connection Power Manager.
Resumes to put active links to sniff mode
void cpm_start | ( | void | ) |
Starts the Connection Power Manager.
Puts active links to sniff mode
void cpm_stop | ( | void | ) |
Stops the Connection Power Manager.
Returns all sniff links back to active mode