Skip to content

Commit 93a9526

Browse files
author
microbuilder
committed
Minor cleanup to match documentation
1 parent dae79f7 commit 93a9526

File tree

1 file changed

+27
-35
lines changed

1 file changed

+27
-35
lines changed

libraries/Bluefruit52Lib/src/bluefruit.h

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -64,62 +64,57 @@ extern "C"
6464
class AdafruitBluefruit
6565
{
6666
public:
67-
AdafruitBluefruit(void); // Constructor
67+
// Constructor
68+
AdafruitBluefruit(void);
6869

6970
err_t begin(bool prph_enable = true, bool central_enable = false);
70-
71-
void autoConnLed(bool enabled);
72-
void setConnLedInterval(uint32_t ms);
73-
void startConnLed(void);
74-
void stopConnLed(void);
75-
76-
void setName(const char* str);
77-
char* getName(void);
78-
79-
bool setTxPower(int8_t power);
80-
int8_t getTxPower(void);
8171

8272
/*------------------------------------------------------------------*/
83-
/* Advertising & Scan Response (active scan)
73+
/* Lower Level Classes (Bluefruit.Advertising.*, etc.)
8474
*------------------------------------------------------------------*/
8575
BLEAdvertising Advertising;
8676
BLEAdvertising ScanResponse;
77+
BLECentral Central;
8778

8879
/*------------------------------------------------------------------*/
89-
/*
80+
/* General Purpose Functions
9081
*------------------------------------------------------------------*/
91-
bool connected(void);
92-
void disconnect(void);
93-
94-
err_t setConnInterval (uint16_t min, uint16_t max);
95-
err_t setConnIntervalMS(uint16_t min_ms, uint16_t max_ms);
96-
97-
uint16_t connHandle(void);
98-
bool connBonded(void);
99-
uint16_t connInterval(void);
82+
void autoConnLed (bool enabled);
83+
void setConnLedInterval (uint32_t ms);
84+
void startConnLed (void);
85+
void stopConnLed (void);
86+
void setName (const char* str);
87+
char* getName (void);
88+
bool setTxPower (int8_t power);
89+
int8_t getTxPower (void);
10090

101-
void clearBonds(void);
91+
/*------------------------------------------------------------------*/
92+
/* GAP, Connections and Bonding
93+
*------------------------------------------------------------------*/
94+
bool connected (void);
95+
void disconnect (void);
96+
err_t setConnInterval (uint16_t min, uint16_t max);
97+
err_t setConnIntervalMS (uint16_t min_ms, uint16_t max_ms);
98+
uint16_t connHandle (void);
99+
bool connBonded (void);
100+
uint16_t connInterval (void);
101+
void clearBonds (void);
102102

103103
ble_gap_addr_t peerAddr(void);
104104

105105
bool txbuf_get(uint32_t ms);
106106

107-
COMMENT_OUT ( bool setPIN(const char* pin); )
108-
109107
/*------------------------------------------------------------------*/
110-
/* Central API object
111-
*------------------------------------------------------------------*/
112-
BLECentral Central;
113-
114-
/*------------------------------------------------------------------*/
115-
/* Callback
108+
/* Callbacks
116109
*------------------------------------------------------------------*/
117110
typedef void (*connect_callback_t) (void);
118111
typedef void (*disconnect_callback_t) (uint8_t reason);
119112

120113
void setConnectCallback ( connect_callback_t fp);
121114
void setDisconnectCallback( disconnect_callback_t fp);
122115

116+
COMMENT_OUT ( bool setPIN(const char* pin); )
117+
123118
// internal usage only
124119
err_t _registerCharacteristic(BLECharacteristic* chars);
125120

@@ -194,6 +189,3 @@ COMMENT_OUT(
194189
};
195190

196191
extern AdafruitBluefruit Bluefruit;
197-
198-
199-

0 commit comments

Comments
 (0)