mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
apps: fix style issues in code
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
f4d3e549b6
commit
aed0e2873e
35 changed files with 615 additions and 514 deletions
|
|
@ -36,7 +36,7 @@
|
|||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
|||
|
|
@ -233,26 +233,26 @@ struct lwm2mstub_serverinfo_s
|
|||
char security_key[LWM2MSTUB_MAX_SEQKEY];
|
||||
};
|
||||
|
||||
typedef void (*lwm2mstub_write_cb_t)(int seq_no, int srv_id,
|
||||
typedef CODE void (*lwm2mstub_write_cb_t)(int seq_no, int srv_id,
|
||||
FAR struct lwm2mstub_instance_s *inst, FAR char *value,
|
||||
int len);
|
||||
|
||||
typedef void (*lwm2mstub_read_cb_t)(int seq_no, int srv_id,
|
||||
typedef CODE void (*lwm2mstub_read_cb_t)(int seq_no, int srv_id,
|
||||
FAR struct lwm2mstub_instance_s *inst);
|
||||
|
||||
typedef void (*lwm2mstub_exec_cb_t)(int seq_no, int srv_id,
|
||||
typedef CODE void (*lwm2mstub_exec_cb_t)(int seq_no, int srv_id,
|
||||
FAR struct lwm2mstub_instance_s *inst);
|
||||
|
||||
typedef void (*lwm2mstub_ovstart_cb_t)(int seq_no, int srv_id,
|
||||
typedef CODE void (*lwm2mstub_ovstart_cb_t)(int seq_no, int srv_id,
|
||||
FAR struct lwm2mstub_instance_s *inst, FAR char *token,
|
||||
FAR struct lwm2mstub_ovcondition_s *cond);
|
||||
|
||||
typedef void (*lwm2mstub_ovstop_cb_t)(int seq_no, int srv_id,
|
||||
typedef CODE void (*lwm2mstub_ovstop_cb_t)(int seq_no, int srv_id,
|
||||
FAR struct lwm2mstub_instance_s *inst, FAR char *token);
|
||||
|
||||
typedef void (*lwm2mstub_operation_cb_t)(int event);
|
||||
typedef CODE void (*lwm2mstub_operation_cb_t)(int event);
|
||||
|
||||
typedef void (*lwm2mstub_fwupstate_cb_t)(int event);
|
||||
typedef CODE void (*lwm2mstub_fwupstate_cb_t)(int event);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ enum wapi_pta_prio_e
|
|||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue