Skip to content

Commit 43cf440

Browse files
committed
Fix formatting
1 parent 7f2e121 commit 43cf440

File tree

10 files changed

+1606
-1278
lines changed

10 files changed

+1606
-1278
lines changed

examples/nimble_blecent/CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020

2121
if(CONFIG_EXAMPLES_NIMBLE_BLECENT)
2222
nuttx_add_application(
23-
NAME nimble
24-
SRCS ${CMAKE_CURRENT_LIST_DIR}/nimble_blecent_main.c ${CMAKE_CURRENT_LIST_DIR}/misc.c ${CMAKE_CURRENT_LIST_DIR}/peer.c
25-
DEPENDS nimble)
23+
NAME
24+
nimble
25+
SRCS
26+
${CMAKE_CURRENT_LIST_DIR}/nimble_blecent_main.c
27+
${CMAKE_CURRENT_LIST_DIR}/misc.c
28+
${CMAKE_CURRENT_LIST_DIR}/peer.c
29+
DEPENDS
30+
nimble)
2631
endif()

examples/nimble_blecent/blecent.h

+24-10
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@
2121
#ifndef H_BLECENT_
2222
#define H_BLECENT_
2323

24+
/****************************************************************************
25+
* Included Files
26+
****************************************************************************/
27+
2428
#include <stdio.h>
2529

2630
#ifdef __cplusplus
27-
extern "C" {
31+
extern "C"
32+
{
2833
#endif
2934

3035
struct ble_hs_adv_fields;
@@ -40,30 +45,35 @@ union ble_store_key;
4045
#define BLECENT_CHR_UNR_ALERT_STAT_UUID 0x2A45
4146
#define BLECENT_CHR_ALERT_NOT_CTRL_PT 0x2A44
4247

43-
/** Misc. */
48+
/* Misc. */
49+
4450
void print_bytes(const uint8_t *bytes, int len);
4551
void print_mbuf(const struct os_mbuf *om);
4652
char *addr_str(const void *addr);
4753
void print_uuid(const ble_uuid_t *uuid);
4854
void print_conn_desc(const struct ble_gap_conn_desc *desc);
4955
void print_adv_fields(const struct ble_hs_adv_fields *fields);
5056

51-
/** Peer. */
52-
struct peer_dsc {
57+
/* Peer. */
58+
59+
struct peer_dsc
60+
{
5361
SLIST_ENTRY(peer_dsc) next;
5462
struct ble_gatt_dsc dsc;
5563
};
5664
SLIST_HEAD(peer_dsc_list, peer_dsc);
5765

58-
struct peer_chr {
66+
struct peer_chr
67+
{
5968
SLIST_ENTRY(peer_chr) next;
6069
struct ble_gatt_chr chr;
6170

6271
struct peer_dsc_list dscs;
6372
};
6473
SLIST_HEAD(peer_chr_list, peer_chr);
6574

66-
struct peer_svc {
75+
struct peer_svc
76+
{
6777
SLIST_ENTRY(peer_svc) next;
6878
struct ble_gatt_svc svc;
6979

@@ -74,19 +84,23 @@ SLIST_HEAD(peer_svc_list, peer_svc);
7484
struct peer;
7585
typedef void peer_disc_fn(const struct peer *peer, int status, void *arg);
7686

77-
struct peer {
87+
struct peer
88+
{
7889
SLIST_ENTRY(peer) next;
7990

8091
uint16_t conn_handle;
8192

82-
/** List of discovered GATT services. */
93+
/* List of discovered GATT services. */
94+
8395
struct peer_svc_list svcs;
8496

85-
/** Keeps track of where we are in the service discovery process. */
97+
/* Keeps track of where we are in the service discovery process. */
98+
8699
uint16_t disc_prev_chr_val;
87100
struct peer_svc *cur_svc;
88101

89-
/** Callback that gets executed when service discovery completes. */
102+
/* Callback that gets executed when service discovery completes. */
103+
90104
peer_disc_fn *disc_cb;
91105
void *disc_cb_arg;
92106
};

0 commit comments

Comments
 (0)