Uncrustify code style
This commit is contained in:
parent
b605e9b43f
commit
ca2e82a459
@ -175,7 +175,6 @@ gpio_int_cb(PIN_Handle handle, PIN_Id pin_id)
|
||||
/* Notify the GPIO HAL driver */
|
||||
gpio_hal_event_handler(gpio_hal_pin_to_mask(pin_id));
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
gpio_hal_arch_init(void)
|
||||
|
@ -73,8 +73,7 @@ static void rtimer_clock_stub(uintptr_t unused) { (void)unused; /* do nothing */
|
||||
static void
|
||||
rtimer_isr_hook(void)
|
||||
{
|
||||
if(AONRTCEventGet(RTIMER_RTC_CH))
|
||||
{
|
||||
if(AONRTCEventGet(RTIMER_RTC_CH)) {
|
||||
AONRTCEventClear(RTIMER_RTC_CH);
|
||||
AONRTCChannelDisable(RTIMER_RTC_CH);
|
||||
|
||||
@ -84,12 +83,9 @@ rtimer_isr_hook(void)
|
||||
* HWI Dispatch clears the interrupt. If HWI wasn't triggered, clear
|
||||
* the interrupt manually.
|
||||
*/
|
||||
if(AONRTCEventGet(HWIP_RTC_CH))
|
||||
{
|
||||
if(AONRTCEventGet(HWIP_RTC_CH)) {
|
||||
hwi_dispatch_fxn();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
IntPendClear(INT_AON_RTC_COMB);
|
||||
}
|
||||
}
|
||||
@ -122,8 +118,7 @@ rtimer_arch_init(void)
|
||||
|
||||
/* Try to access the RAM vector table. */
|
||||
ramvec_table = (isr_fxn_t *)HWREG(NVIC_VTABLE);
|
||||
if(!ramvec_table)
|
||||
{
|
||||
if(!ramvec_table) {
|
||||
/*
|
||||
* Unable to find the RAM vector table is a serious fault.
|
||||
* Spin-lock forever.
|
||||
@ -136,8 +131,7 @@ rtimer_arch_init(void)
|
||||
* in the RAM vector table. Fetch and store it.
|
||||
*/
|
||||
hwi_dispatch_fxn = (hwi_dispatch_fxn_t)ramvec_table[INT_AON_RTC_COMB];
|
||||
if(!hwi_dispatch_fxn)
|
||||
{
|
||||
if(!hwi_dispatch_fxn) {
|
||||
/*
|
||||
* Unable to find the HWI dispatch ISR in the RAM vector table is
|
||||
* a serious fault. Spin-lock forever.
|
||||
|
@ -90,22 +90,22 @@ __attribute__ ((section(".resetVecs"))) __attribute__ ((used))
|
||||
static void(*const resetVectors[16]) (void) =
|
||||
{
|
||||
(void (*)(void))((uint32_t)&_stack_end),
|
||||
// The initial stack pointer
|
||||
resetISR, // The reset handler
|
||||
nmiISR, // The NMI handler
|
||||
faultISR, // The hard fault handler
|
||||
defaultHandler, // The MPU fault handler
|
||||
busFaultHandler, // The bus fault handler
|
||||
defaultHandler, // The usage fault handler
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
defaultHandler, // SVCall handler
|
||||
defaultHandler, // Debug monitor handler
|
||||
0, // Reserved
|
||||
defaultHandler, // The PendSV handler
|
||||
defaultHandler // The SysTick handler
|
||||
/* The initial stack pointer */
|
||||
resetISR, /* The reset handler */
|
||||
nmiISR, /* The NMI handler */
|
||||
faultISR, /* The hard fault handler */
|
||||
defaultHandler, /* The MPU fault handler */
|
||||
busFaultHandler, /* The bus fault handler */
|
||||
defaultHandler, /* The usage fault handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
defaultHandler, /* SVCall handler */
|
||||
defaultHandler, /* Debug monitor handler */
|
||||
0, /* Reserved */
|
||||
defaultHandler, /* The PendSV handler */
|
||||
defaultHandler /* The SysTick handler */
|
||||
};
|
||||
//*****************************************************************************
|
||||
//
|
||||
@ -233,8 +233,7 @@ static void
|
||||
nmiISR(void)
|
||||
{
|
||||
/* Enter an infinite loop. */
|
||||
while(1)
|
||||
{
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,8 +295,7 @@ busFaultHandler(void)
|
||||
{
|
||||
x__ = 0;
|
||||
/* Enter an infinite loop. */
|
||||
while(1)
|
||||
{
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,8 +310,7 @@ static void
|
||||
defaultHandler(void)
|
||||
{
|
||||
/* Enter an infinite loop. */
|
||||
while(1)
|
||||
{
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,7 @@
|
||||
#error "startup_cc13xx_cc26xx_iar.c: Unsupported compiler!"
|
||||
#endif
|
||||
|
||||
|
||||
// We need intrinsic functions for IAR (if used in source code)
|
||||
/* We need intrinsic functions for IAR (if used in source code) */
|
||||
#include <intrinsics.h>
|
||||
#include <ti/devices/DeviceFamily.h>
|
||||
#include DeviceFamily_constructPath(inc/hw_types.h)
|
||||
@ -99,7 +98,7 @@ extern void AUXCompAIntHandler( void );
|
||||
extern void AUXADCIntHandler(void);
|
||||
extern void TRNGIntHandler(void);
|
||||
|
||||
// Default interrupt handlers
|
||||
/* Default interrupt handlers */
|
||||
#pragma weak MPUFaultIntHandler = intDefaultHandler
|
||||
#pragma weak BusFaultIntHandler = intDefaultHandler
|
||||
#pragma weak UsageFaultIntHandler = intDefaultHandler
|
||||
|
@ -82,7 +82,7 @@ trng_rand(uint8_t *entropy_buf, size_t entropy_len, uint32_t timeout_us)
|
||||
|
||||
TRNG_close(trng_handle);
|
||||
|
||||
return (result == TRNG_STATUS_SUCCESS);
|
||||
return result == TRNG_STATUS_SUCCESS;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @} */
|
||||
|
@ -153,7 +153,7 @@ dot_15_4g_freq(const uint16_t chan)
|
||||
const uint32_t chan0 = DOT_15_4G_CHAN0_FREQ;
|
||||
const uint32_t spacing = DOT_15_4G_FREQ_SPACING;
|
||||
const uint32_t chan_min = DOT_15_4G_CHAN_MIN;
|
||||
return (chan0 + spacing * ((uint32_t)chan - chan_min));
|
||||
return chan0 + spacing * ((uint32_t)chan - chan_min);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static inline bool
|
||||
@ -161,8 +161,8 @@ dot_15_4g_chan_in_range(const uint16_t chan)
|
||||
{
|
||||
const uint16_t chan_min = DOT_15_4G_CHAN_MIN;
|
||||
const uint16_t chan_max = DOT_15_4G_CHAN_MAX;
|
||||
return ((chan >= chan_min) &&
|
||||
(chan <= chan_max));
|
||||
return (chan >= chan_min) &&
|
||||
(chan <= chan_max);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define DOT_15_4G_DEFAULT_CHAN IEEE802154_DEFAULT_CHANNEL
|
||||
|
@ -206,7 +206,11 @@ static cmd_mod_filt_t cmd_mod_filt;
|
||||
#define cmd_rx (*(volatile rfc_CMD_IEEE_RX_t*) &rf_cmd_ieee_rx)
|
||||
#define cmd_rx_ack (*(volatile rfc_CMD_IEEE_RX_ACK_t*)&rf_cmd_ieee_rx_ack)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static inline bool rx_is_active(void) { return cmd_rx.status == ACTIVE; }
|
||||
static inline bool
|
||||
rx_is_active(void)
|
||||
{
|
||||
return cmd_rx.status == ACTIVE;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Forward declarations of local functions */
|
||||
static void check_rat_overflow(void);
|
||||
@ -630,7 +634,7 @@ channel_clear(void)
|
||||
}
|
||||
|
||||
/* Channel is clear if CCA state is IDLE */
|
||||
return (cmd_cca_req.ccaInfo.ccaState == CCA_STATE_IDLE);
|
||||
return cmd_cca_req.ccaInfo.ccaState == CCA_STATE_IDLE;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
@ -653,7 +657,7 @@ receiving_packet(void)
|
||||
}
|
||||
|
||||
/* We are receiving a packet if a CCA sync has been seen, i.e. ccaSync is busy (1) */
|
||||
return (cmd_cca_req.ccaInfo.ccaSync == CCA_STATE_BUSY);
|
||||
return cmd_cca_req.ccaInfo.ccaSync == CCA_STATE_BUSY;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
@ -840,7 +844,6 @@ set_value(radio_param_t param, radio_value_t value)
|
||||
return (on() == RF_RESULT_OK)
|
||||
? RADIO_RESULT_OK
|
||||
: RADIO_RESULT_ERROR;
|
||||
|
||||
} else if(value == RADIO_POWER_MODE_OFF) {
|
||||
off();
|
||||
return RADIO_RESULT_OK;
|
||||
|
@ -197,8 +197,16 @@ static prop_radio_t prop_radio;
|
||||
#define cmd_tx (*(volatile rfc_CMD_PROP_TX_ADV_t *) &rf_cmd_prop_tx_adv)
|
||||
#define cmd_rx (*(volatile rfc_CMD_PROP_RX_ADV_t *) &rf_cmd_prop_rx_adv)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static inline bool tx_is_active(void) { return cmd_tx.status == ACTIVE; }
|
||||
static inline bool rx_is_active(void) { return cmd_rx.status == ACTIVE; }
|
||||
static inline bool
|
||||
tx_is_active(void)
|
||||
{
|
||||
return cmd_tx.status == ACTIVE;
|
||||
}
|
||||
static inline bool
|
||||
rx_is_active(void)
|
||||
{
|
||||
return cmd_rx.status == ACTIVE;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int on(void);
|
||||
static int off(void);
|
||||
@ -466,7 +474,7 @@ channel_clear(void)
|
||||
const uint8_t cca_state = cca_request();
|
||||
|
||||
/* Channel is clear if CCA state is IDLE */
|
||||
return (cca_state == CCA_STATE_IDLE);
|
||||
return cca_state == CCA_STATE_IDLE;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
@ -478,7 +486,7 @@ receiving_packet(void)
|
||||
|
||||
const uint8_t cca_state = cca_request();
|
||||
|
||||
return (cca_state == CCA_STATE_BUSY);
|
||||
return cca_state == CCA_STATE_BUSY;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
@ -617,7 +625,6 @@ set_value(radio_param_t param, radio_value_t value)
|
||||
return (on() == RF_RESULT_OK)
|
||||
? RADIO_RESULT_OK
|
||||
: RADIO_RESULT_ERROR;
|
||||
|
||||
} else if(value == RADIO_POWER_MODE_OFF) {
|
||||
off();
|
||||
return RADIO_RESULT_OK;
|
||||
|
@ -276,7 +276,6 @@ netstack_sched_fs(void)
|
||||
|
||||
synth_error = (EVENTS_CMD_DONE(events))
|
||||
&& (CMD_STATUS(netstack_cmd_fs) == ERROR_SYNTH_PROG);
|
||||
|
||||
} while(synth_error && (num_tries++ < CMD_FS_RETRIES));
|
||||
|
||||
cmd_rx_restore(rx_key);
|
||||
|
Loading…
Reference in New Issue
Block a user