Fix nxstyle warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-08-09 20:51:47 +08:00
committed by patacongo
parent a0ce81d659
commit ae94688dc4
7 changed files with 97 additions and 64 deletions

View File

@@ -56,7 +56,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Configuration *************************************************************/
/* Configuration ************************************************************/
#if !defined(CONFIG_SCHED_HPWORK) || !defined(CONFIG_SCHED_LPWORK)
# error Both Low and High priority work queues are required for this driver
@@ -93,8 +93,8 @@
#define XBEE_COORDASSOCFLAGS_CHAN_REASSIGN 2
#define XBEE_COORDASSOCFLAGS_ALLOWASSOC 4
/* Size of read buffer active for all of the transaction. i.e. must be big enough
* to handle full transmit and receive.
/* Size of read buffer active for all of the transaction. i.e. must be big
* enough to handle full transmit and receive.
*/
#define XBEE_RXBUF_SIZE 256
@@ -159,7 +159,7 @@ struct xbee_priv_s
FAR struct xbee_maccb_s *cb; /* Head of a list of XBee MAC callbacks */
uint8_t nclients; /* Number of registered callbacks */
FAR struct iob_s *rx_apiframes; /* List of incoming API frames to process */
struct work_s notifwork; /* For deferring notifications to LPWORK queue*/
struct work_s notifwork; /* For deferring notifications to LPWORK queue */
struct work_s attnwork; /* For deferring interrupt work to work queue */
volatile bool attn_latched; /* Latched state of ATTN */
sem_t primitive_sem; /* Exclusive access to the primitive queue */
@@ -171,7 +171,7 @@ struct xbee_priv_s
sem_t atquery_sem; /* Only allow one AT query at a time */
sem_t atresp_sem; /* For signaling pending AT response received */
char querycmd[2]; /* Stores the pending AT Query command */
bool querydone; /* Used to tell waiting thread query is done*/
bool querydone; /* Used to tell waiting thread query is done */
struct wdog_s atquery_wd; /* Support AT Query timeout and retry */
struct wdog_s reqdata_wd; /* Support send timeout and retry */
uint8_t frameid; /* For differentiating AT request/response */
@@ -180,28 +180,28 @@ struct xbee_priv_s
bool txdone;
#ifdef CONFIG_XBEE_LOCKUP_WORKAROUND
struct wdog_s lockup_wd; /* Watchdog to protect for XBee lockup */
struct work_s lockupwork; /* For deferring lockup query check to LPWORK queue*/
struct work_s backupwork; /* For deferring backing up parameters to LPWORK queue*/
struct work_s lockupwork; /* For deferring lockup query check to LPWORK queue */
struct work_s backupwork; /* For deferring backing up parameters to LPWORK queue */
#endif
/******************* Fields related to Xbee radio ***************************/
/******************* Fields related to Xbee radio *************************/
uint16_t firmwareversion;
/************* Fields related to addressing and coordinator *****************/
/************* Fields related to addressing and coordinator ***************/
/* Holds all address information (Extended, Short, and PAN ID) for the MAC. */
/* Holds all address information(Extended, Short, and PAN ID) for the MAC */
struct ieee802154_addr_s addr;
struct ieee802154_pandesc_s pandesc;
/****************** Uncategorized MAC PIB attributes ***********************/
/****************** Uncategorized MAC PIB attributes **********************/
/* What type of device is this node acting as */
enum ieee802154_devmode_e devmode : 2;
/****************** PHY attributes ***********************/
/****************** PHY attributes ****************************************/
uint8_t chan;
uint8_t pwrlvl;
@@ -220,9 +220,10 @@ struct xbee_priv_s
* Name: xbee_next_frameid
*
* Description:
* Increment the frame id. This is used to coordinate TX requests with subsequent
* TX status frames received by the XBee device. We must skip value 0 since
* that value is to tell the XBee not to provide a status response.
* Increment the frame id. This is used to coordinate TX requests with
* subsequent TX status frames received by the XBee device. We must skip
* value 0 since that value is to tell the XBee not to provide a status
* response.
*
****************************************************************************/
@@ -249,7 +250,8 @@ static inline uint8_t xbee_next_frameid(FAR struct xbee_priv_s *priv)
*
****************************************************************************/
static inline void xbee_insert_checksum(FAR uint8_t *frame, uint16_t framelen)
static inline void xbee_insert_checksum(FAR uint8_t *frame,
uint16_t framelen)
{
int i;
uint8_t checksum = 0;
@@ -263,7 +265,7 @@ static inline void xbee_insert_checksum(FAR uint8_t *frame, uint16_t framelen)
checksum += frame[i];
}
frame[framelen - 1] = 0xFF - checksum;
frame[framelen - 1] = 0xff - checksum;
}
/****************************************************************************
@@ -299,14 +301,15 @@ int xbee_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand);
*
****************************************************************************/
void xbee_send_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand);
void xbee_send_atquery(FAR struct xbee_priv_s *priv,
FAR const char *atcommand);
/****************************************************************************
* Name: xbee_query_firmwareversion
*
* Description:
* Sends API frame with AT command request in order to get the firmware version
* from the device.
* Sends API frame with AT command request in order to get the firmware
* version from the device.
*
****************************************************************************/
@@ -327,8 +330,8 @@ void xbee_send_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand);
* Name: xbee_query_eaddr
*
* Description:
* Sends API frame with AT command request in order to get the IEEE 802.15.4
* Extended Address. (Serial Number) from the device.
* Sends API frame with AT command request in order to get the IEEE
* 802.15.4 Extended Address. (Serial Number) from the device.
*
****************************************************************************/
@@ -372,8 +375,8 @@ void xbee_send_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand);
* Name: xbee_query_powermode
*
* Description:
* Sends API frame with AT command request in order to get the RF Power Mode
* from the device.
* Sends API frame with AT command request in order to get the RF Power
* Mode from the device.
*
****************************************************************************/
@@ -416,8 +419,8 @@ void xbee_set_panid(FAR struct xbee_priv_s *priv, FAR const uint8_t *panid);
* Name: xbee_set_saddr
*
* Description:
* Sends API frame with AT command request in order to set the Short Address
* (Source Address (MY)) of the device
* Sends API frame with AT command request in order to set the Short
* Address (Source Address (MY)) of the device
*
****************************************************************************/
@@ -438,8 +441,8 @@ void xbee_set_chan(FAR struct xbee_priv_s *priv, uint8_t chan);
* Name: xbee_set_powerlevel
*
* Description:
* Sends API frame with AT command request in order to set the RF power level
* of the device.
* Sends API frame with AT command request in order to set the RF power
* level of the device.
*
****************************************************************************/
@@ -491,7 +494,7 @@ void xbee_enable_coord(FAR struct xbee_priv_s *priv, bool enable);
* Name: xbee_regdump
*
* Description:
* Perform a series of queries updating struct and printing settings to SYSLOG.
* Perform a series of queries updating struct and printing settings.
*
****************************************************************************/