Skip to content

Commit b3e05b6

Browse files
benothmn-sterwango
authored andcommitted
lib: stm32wba: linklayer_plat: Migrate some functions to zephyr repo
Migrate LINKLAYER_PLAT_EnableRadioIT, LINKLAYER_PLAT_DisableRadioIT, LINKLAYER_PLAT_EnableIRQ and LINKLAYER_PLAT_DisableIRQ to zephyr repo Signed-off-by: Nidhal BEN OTHMEN <[email protected]>
1 parent 5dcc08c commit b3e05b6

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,18 @@
4141

4242
#else
4343
#include "scm.h"
44-
#endif
44+
#endif /* __ZEPHYR__ */
45+
46+
#ifndef __ZEPHYR__
4547
#define max(a,b) ((a) > (b) ? a : b)
4648

4749
/* 2.4GHz RADIO ISR callbacks */
4850
typedef void (*radio_isr_cb_t) (void);
4951

50-
51-
5252
/* Radio critical sections */
5353
static uint32_t primask_bit = 0;
5454
volatile int32_t irq_counter;
55+
#endif /* __ZEPHYR__ */
5556

5657
/* Radio bus clock control variables */
5758
uint8_t AHB5_SwitchedOff;
@@ -103,7 +104,7 @@ void LINKLAYER_PLAT_Assert(uint8_t condition)
103104
{
104105
assert_param(condition);
105106
}
106-
#endif
107+
#endif /* __ZEPHYR__ */
107108

108109
/**
109110
* @brief Enable/disable the Link Layer active clock (baseband clock).
@@ -269,7 +270,6 @@ void LINKLAYER_PLAT_TriggerSwLowIT(uint8_t priority)
269270

270271
HAL_NVIC_SetPendingIRQ((IRQn_Type) RADIO_SW_LOW_INTR_NUM);
271272
}
272-
#endif
273273

274274
/**
275275
* @brief Enable interrupts.
@@ -303,7 +303,6 @@ void LINKLAYER_PLAT_DisableIRQ(void)
303303
irq_counter ++;
304304
}
305305

306-
#ifndef __ZEPHYR__
307306
/**
308307
* @brief Enable specific interrupt group.
309308
* @param isr_type: mask for interrupt group to enable.
@@ -399,7 +398,6 @@ void LINKLAYER_PLAT_DisableSpecificIRQ(uint8_t isr_type)
399398
}
400399
}
401400
}
402-
#endif
403401

404402
/**
405403
* @brief Enable link layer high priority ISR only.
@@ -437,7 +435,6 @@ void LINKLAYER_PLAT_DisableRadioIT(void)
437435
/* USER CODE END LINKLAYER_PLAT_DisableRadioIT_2 */
438436
}
439437

440-
#ifndef __ZEPHYR__
441438
/**
442439
* @brief Link Layer notification for radio activity start.
443440
* @param None
@@ -577,7 +574,7 @@ uint32_t LINKLAYER_PLAT_GetUDN(void)
577574
{
578575
return LL_FLASH_GetUDN();
579576
}
580-
#endif
577+
#endif /* __ZEPHYR__ */
581578
/* USER CODE BEGIN LINKLAYER_PLAT 0 */
582579

583580
/* USER CODE END LINKLAYER_PLAT 0 */

0 commit comments

Comments
 (0)