nimble_statconn.h File Reference

Simple static connection manager for NimBLE netif. More...

Detailed Description

Simple static connection manager for NimBLE netif.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file nimble_statconn.h.

#include <stdint.h>
#include "nimble_netif.h"
+ Include dependency graph for nimble_statconn.h:

Go to the source code of this file.

Macros

#define NIMBLE_STATCONN_ADV_ITVL_MS   (90U)
 Advertising interval used when in advertising mode [in ms].
 
#define NIMBLE_STATCONN_CONN_WIN_MS   (100U)
 Scan window used when opening new connections [in ms].
 
#define NIMBLE_STATCONN_CONN_TIMEOUT_MS   (600U)
 Opening a new connection is aborted after this time [in ms].
 
#define NIMBLE_STATCONN_CONN_ITVL_MS   (75U)
 Connection interval used when opening a new connection [in ms].
 
#define NIMBLE_STATCONN_CONN_LATENCY   (0)
 Slave latency used for new connections [# of connection events].
 
#define NIMBLE_STATCONN_CONN_SUPERTO_MS   (2500U)
 Supervision timeout used for new connections [in ms].
 

Enumerations

enum  { NIMBLE_STATCONN_OK = 0, NIMBLE_STATCONN_NOSLOT = -1, NIMBLE_STATCONN_NOTCONN = -2, NIMBLE_STATCONN_INUSE = -3 }
 Return codes used by the statconn module. More...
 

Functions

void nimble_statconn_init (void)
 Initialize the statconn module. More...
 
void nimble_statconn_eventcb (nimble_netif_eventcb_t cb)
 Register a callback that is called on netif events. More...
 
int nimble_statconn_add_master (const uint8_t *addr)
 Connect to peer (master) with a given address as slave. More...
 
int nimble_statconn_add_slave (const uint8_t *addr)
 Connect to a peer (slave) with a given address as master. More...
 
int nimble_statconn_rm (const uint8_t *addr)
 Remove the connection to the given peer. More...