mirror of https://github.com/ARMmbed/mbed-os.git
Apply astyle suggestions from the CI
parent
7149877c5d
commit
8a31b6a7ca
|
@ -211,8 +211,7 @@ static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_
|
|||
{
|
||||
platform_enter_critical();
|
||||
|
||||
switch (new_state)
|
||||
{
|
||||
switch (new_state) {
|
||||
/*Reset PHY driver and set to idle*/
|
||||
case PHY_INTERFACE_RESET:
|
||||
rf_abort();
|
||||
|
@ -495,7 +494,8 @@ static uint8_t rf_convert_energy_level(uint8_t energyLevel)
|
|||
/**
|
||||
* SET MAC 16 address to Register
|
||||
*/
|
||||
static void rf_mac_set_shortAddress(uint8_t* valueAddress) {
|
||||
static void rf_mac_set_shortAddress(uint8_t *valueAddress)
|
||||
{
|
||||
ZLL->MACSHORTADDRS0 &= ~ZLL_MACSHORTADDRS0_MACSHORTADDRS0_MASK;
|
||||
ZLL->MACSHORTADDRS0 |= ZLL_MACSHORTADDRS0_MACSHORTADDRS0(common_read_16_bit(valueAddress));
|
||||
}
|
||||
|
@ -503,7 +503,8 @@ static void rf_mac_set_shortAddress(uint8_t* valueAddress) {
|
|||
/**
|
||||
* SET PAN-ID to Register
|
||||
*/
|
||||
static void rf_mac_set_panId(uint8_t* valueAddress) {
|
||||
static void rf_mac_set_panId(uint8_t *valueAddress)
|
||||
{
|
||||
ZLL->MACSHORTADDRS0 &= ~ZLL_MACSHORTADDRS0_MACPANID0_MASK;
|
||||
ZLL->MACSHORTADDRS0 |= ZLL_MACSHORTADDRS0_MACPANID0(common_read_16_bit(valueAddress));
|
||||
}
|
||||
|
@ -511,7 +512,8 @@ static void rf_mac_set_panId(uint8_t* valueAddress) {
|
|||
/**
|
||||
* SET MAC64 address to register
|
||||
*/
|
||||
static void rf_mac_set_mac64(const uint8_t* valueAddress) {
|
||||
static void rf_mac_set_mac64(const uint8_t *valueAddress)
|
||||
{
|
||||
ZLL->MACLONGADDRS0_MSB = common_read_32_bit(valueAddress);
|
||||
valueAddress += 4;
|
||||
ZLL->MACLONGADDRS0_LSB = common_read_32_bit(valueAddress);
|
||||
|
@ -1009,8 +1011,7 @@ static void handle_IRQ_events(void)
|
|||
rf_receive();
|
||||
} else {
|
||||
PhyIsrSeqCleanup();
|
||||
switch(xcvseqCopy)
|
||||
{
|
||||
switch (xcvseqCopy) {
|
||||
case gTX_c:
|
||||
if ((ZLL->PHY_CTRL & ZLL_PHY_CTRL_CCABFRTX_MASK) &&
|
||||
(irqStatus & ZLL_IRQSTS_CCA_MASK)) {
|
||||
|
|
|
@ -577,8 +577,7 @@ static int8_t rf_start_cca(uint8_t *data_ptr, uint16_t data_length, uint8_t tx_h
|
|||
static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_t rf_channel)
|
||||
{
|
||||
int8_t ret_val = 0;
|
||||
switch (new_state)
|
||||
{
|
||||
switch (new_state) {
|
||||
/* Reset PHY driver and set to idle */
|
||||
case PHY_INTERFACE_RESET:
|
||||
RAIL_Idle(gRailHandle, RAIL_IDLE_FORCE_SHUTDOWN_CLEAR_FLAGS, true);
|
||||
|
@ -648,8 +647,7 @@ static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_
|
|||
*/
|
||||
static int8_t rf_extension(phy_extension_type_e extension_type, uint8_t *data_ptr)
|
||||
{
|
||||
switch (extension_type)
|
||||
{
|
||||
switch (extension_type) {
|
||||
/* Control MAC pending bit for Indirect data transmission */
|
||||
case PHY_EXTENSION_CTRL_PENDING_BIT:
|
||||
if (*data_ptr) {
|
||||
|
@ -703,8 +701,7 @@ static int8_t rf_extension(phy_extension_type_e extension_type, uint8_t *data_pt
|
|||
static int8_t rf_address_write(phy_address_type_e address_type, uint8_t *address_ptr)
|
||||
{
|
||||
int8_t ret_val = 0;
|
||||
switch (address_type)
|
||||
{
|
||||
switch (address_type) {
|
||||
/*Set 48-bit address*/
|
||||
case PHY_MAC_48BIT:
|
||||
// 15.4 does not support 48-bit addressing
|
||||
|
@ -841,7 +838,8 @@ uint32_t NanostackRfPhyEfr32::get_driver_version()
|
|||
* Callback that lets the app know when the radio has finished init
|
||||
* and is ready.
|
||||
*/
|
||||
static void RAILCb_RfReady(RAIL_Handle_t handle) {
|
||||
static void RAILCb_RfReady(RAIL_Handle_t handle)
|
||||
{
|
||||
(void) handle;
|
||||
radio_state = RADIO_IDLE;
|
||||
}
|
||||
|
@ -854,7 +852,8 @@ static void RAILCb_RfReady(RAIL_Handle_t handle) {
|
|||
* @return bool True if able to switch to the requested channel
|
||||
*
|
||||
*/
|
||||
static bool rail_checkAndSwitchChannel(uint8_t newChannel) {
|
||||
static bool rail_checkAndSwitchChannel(uint8_t newChannel)
|
||||
{
|
||||
if (channel == newChannel) {
|
||||
return true;
|
||||
}
|
||||
|
@ -888,8 +887,9 @@ static void radioEventHandler(RAIL_Handle_t railHandle,
|
|||
/* RAIL_Events_t is a 64-bit event mask, but a thread only supports 32
|
||||
* signal bits. This means we have to convert from a RAIL event mask to
|
||||
* our own custom event mask. */
|
||||
if (railHandle != gRailHandle)
|
||||
if (railHandle != gRailHandle) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MBED_CONF_RTOS_PRESENT
|
||||
if (rf_thread_id == 0) {
|
||||
|
@ -955,8 +955,7 @@ static void radioEventHandler(RAIL_Handle_t railHandle,
|
|||
* If \ref RAIL_RX_OPTION_IGNORE_CRC_ERRORS is set, this event also occurs
|
||||
* for packets with CRC errors.
|
||||
*/
|
||||
case RAIL_EVENT_RX_PACKET_RECEIVED_SHIFT:
|
||||
{
|
||||
case RAIL_EVENT_RX_PACKET_RECEIVED_SHIFT: {
|
||||
/* Get RX packet that got signaled */
|
||||
RAIL_RxPacketInfo_t rxPacketInfo;
|
||||
RAIL_RxPacketHandle_t rxHandle = RAIL_GetRxPacketInfo(gRailHandle,
|
||||
|
@ -1272,8 +1271,7 @@ static void radioEventHandler(RAIL_Handle_t railHandle,
|
|||
}
|
||||
events = events >> 1;
|
||||
index += 1;
|
||||
}
|
||||
while (events != 0);
|
||||
} while (events != 0);
|
||||
}
|
||||
|
||||
NanostackRfPhy &NanostackRfPhy::get_default_instance()
|
||||
|
|
Loading…
Reference in New Issue