+#include "_reg_blecore.h"
+#include "compiler.h"
+#include "architect.h"
+#include "ble_reg_access.h"
+
+#define REG_BLECORE_COUNT 99
+
+#define REG_BLECORE_DECODING_MASK 0x000001FF
+
+/**
+ * @brief RWBLECNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 MASTER_SOFT_RST 0
+ * 30 MASTER_TGSOFT_RST 0
+ * 29 REG_SOFT_RST 0
+ * 28 RADIOCNTL_SOFT_RST 0
+ * 27 SWINT_REQ 0
+ * 26 RFTEST_ABORT 0
+ * 25 ADVERT_ABORT 0
+ * 24 SCAN_ABORT 0
+ * 20 MD_DSB 0
+ * 19 SN_DSB 0
+ * 18 NESN_DSB 0
+ * 17 CRYPT_DSB 0
+ * 16 LRPMAP_DSB 0
+ * 15 LRFEC_DSB 0
+ * 14 WHIT_DSB 0
+ * 13 CRC_DSB 0
+ * 12 HOP_REMAP_DSB 0
+ * 11 RXCTEERR_RETX_EN 0
+ * 10 ANONYMOUS_ADV_FILT_EN 0
+ * 09 ADVERTFILT_EN 0
+ * 08 RWBLE_EN 0
+ * 03:00 RXWINSZDEF 0x0
+ *
+ */
+#define BLE_RWBLECNTL_ADDR 0x00900800
+#define BLE_RWBLECNTL_OFFSET 0x00000000
+#define BLE_RWBLECNTL_INDEX 0x00000000
+#define BLE_RWBLECNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_rwblecntl_get(void)
+{
+ return REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+}
+
+__INLINE void ble_rwblecntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_MASTER_SOFT_RST_BIT ((uint32_t)0x80000000)
+#define BLE_MASTER_SOFT_RST_POS 31
+#define BLE_MASTER_TGSOFT_RST_BIT ((uint32_t)0x40000000)
+#define BLE_MASTER_TGSOFT_RST_POS 30
+#define BLE_REG_SOFT_RST_BIT ((uint32_t)0x20000000)
+#define BLE_REG_SOFT_RST_POS 29
+#define BLE_RADIOCNTL_SOFT_RST_BIT ((uint32_t)0x10000000)
+#define BLE_RADIOCNTL_SOFT_RST_POS 28
+#define BLE_SWINT_REQ_BIT ((uint32_t)0x08000000)
+#define BLE_SWINT_REQ_POS 27
+#define BLE_RFTEST_ABORT_BIT ((uint32_t)0x04000000)
+#define BLE_RFTEST_ABORT_POS 26
+#define BLE_ADVERT_ABORT_BIT ((uint32_t)0x02000000)
+#define BLE_ADVERT_ABORT_POS 25
+#define BLE_SCAN_ABORT_BIT ((uint32_t)0x01000000)
+#define BLE_SCAN_ABORT_POS 24
+#define BLE_MD_DSB_BIT ((uint32_t)0x00100000)
+#define BLE_MD_DSB_POS 20
+#define BLE_SN_DSB_BIT ((uint32_t)0x00080000)
+#define BLE_SN_DSB_POS 19
+#define BLE_NESN_DSB_BIT ((uint32_t)0x00040000)
+#define BLE_NESN_DSB_POS 18
+#define BLE_CRYPT_DSB_BIT ((uint32_t)0x00020000)
+#define BLE_CRYPT_DSB_POS 17
+#define BLE_LRPMAP_DSB_BIT ((uint32_t)0x00010000)
+#define BLE_LRPMAP_DSB_POS 16
+#define BLE_LRFEC_DSB_BIT ((uint32_t)0x00008000)
+#define BLE_LRFEC_DSB_POS 15
+#define BLE_WHIT_DSB_BIT ((uint32_t)0x00004000)
+#define BLE_WHIT_DSB_POS 14
+#define BLE_CRC_DSB_BIT ((uint32_t)0x00002000)
+#define BLE_CRC_DSB_POS 13
+#define BLE_HOP_REMAP_DSB_BIT ((uint32_t)0x00001000)
+#define BLE_HOP_REMAP_DSB_POS 12
+#define BLE_RXCTEERR_RETX_EN_BIT ((uint32_t)0x00000800)
+#define BLE_RXCTEERR_RETX_EN_POS 11
+#define BLE_ANONYMOUS_ADV_FILT_EN_BIT ((uint32_t)0x00000400)
+#define BLE_ANONYMOUS_ADV_FILT_EN_POS 10
+#define BLE_ADVERTFILT_EN_BIT ((uint32_t)0x00000200)
+#define BLE_ADVERTFILT_EN_POS 9
+#define BLE_RWBLE_EN_BIT ((uint32_t)0x00000100)
+#define BLE_RWBLE_EN_POS 8
+#define BLE_RXWINSZDEF_MASK ((uint32_t)0x0000000F)
+#define BLE_RXWINSZDEF_LSB 0
+#define BLE_RXWINSZDEF_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_MASTER_SOFT_RST_RST 0x0
+#define BLE_MASTER_TGSOFT_RST_RST 0x0
+#define BLE_REG_SOFT_RST_RST 0x0
+#define BLE_RADIOCNTL_SOFT_RST_RST 0x0
+#define BLE_SWINT_REQ_RST 0x0
+#define BLE_RFTEST_ABORT_RST 0x0
+#define BLE_ADVERT_ABORT_RST 0x0
+#define BLE_SCAN_ABORT_RST 0x0
+#define BLE_MD_DSB_RST 0x0
+#define BLE_SN_DSB_RST 0x0
+#define BLE_NESN_DSB_RST 0x0
+#define BLE_CRYPT_DSB_RST 0x0
+#define BLE_LRPMAP_DSB_RST 0x0
+#define BLE_LRFEC_DSB_RST 0x0
+#define BLE_WHIT_DSB_RST 0x0
+#define BLE_CRC_DSB_RST 0x0
+#define BLE_HOP_REMAP_DSB_RST 0x0
+#define BLE_RXCTEERR_RETX_EN_RST 0x0
+#define BLE_ANONYMOUS_ADV_FILT_EN_RST 0x0
+#define BLE_ADVERTFILT_EN_RST 0x0
+#define BLE_RWBLE_EN_RST 0x0
+#define BLE_RXWINSZDEF_RST 0x0
+
+__INLINE void ble_rwblecntl_pack(uint8_t mastersoftrst, uint8_t mastertgsoftrst, uint8_t regsoftrst, uint8_t radiocntlsoftrst, uint8_t swintreq, uint8_t rftestabort, uint8_t advertabort, uint8_t scanabort, uint8_t mddsb, uint8_t sndsb, uint8_t nesndsb, uint8_t cryptdsb, uint8_t lrpmapdsb, uint8_t lrfecdsb, uint8_t whitdsb, uint8_t crcdsb, uint8_t hopremapdsb, uint8_t rxcteerrretxen, uint8_t anonymousadvfilten, uint8_t advertfilten, uint8_t rwbleen, uint8_t rxwinszdef)
+{
+ BLE_ASSERT_ERR((((uint32_t)mastersoftrst << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mastertgsoftrst << 30) & ~((uint32_t)0x40000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)regsoftrst << 29) & ~((uint32_t)0x20000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)radiocntlsoftrst << 28) & ~((uint32_t)0x10000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swintreq << 27) & ~((uint32_t)0x08000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rftestabort << 26) & ~((uint32_t)0x04000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)advertabort << 25) & ~((uint32_t)0x02000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)scanabort << 24) & ~((uint32_t)0x01000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mddsb << 20) & ~((uint32_t)0x00100000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)sndsb << 19) & ~((uint32_t)0x00080000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)nesndsb << 18) & ~((uint32_t)0x00040000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)cryptdsb << 17) & ~((uint32_t)0x00020000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)lrpmapdsb << 16) & ~((uint32_t)0x00010000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)lrfecdsb << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)whitdsb << 14) & ~((uint32_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)crcdsb << 13) & ~((uint32_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)hopremapdsb << 12) & ~((uint32_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxcteerrretxen << 11) & ~((uint32_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)anonymousadvfilten << 10) & ~((uint32_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)advertfilten << 9) & ~((uint32_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rwbleen << 8) & ~((uint32_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxwinszdef << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, ((uint32_t)mastersoftrst << 31) | ((uint32_t)mastertgsoftrst << 30) | ((uint32_t)regsoftrst << 29) | ((uint32_t)radiocntlsoftrst << 28) | ((uint32_t)swintreq << 27) | ((uint32_t)rftestabort << 26) | ((uint32_t)advertabort << 25) | ((uint32_t)scanabort << 24) | ((uint32_t)mddsb << 20) | ((uint32_t)sndsb << 19) | ((uint32_t)nesndsb << 18) | ((uint32_t)cryptdsb << 17) | ((uint32_t)lrpmapdsb << 16) | ((uint32_t)lrfecdsb << 15) | ((uint32_t)whitdsb << 14) | ((uint32_t)crcdsb << 13) | ((uint32_t)hopremapdsb << 12) | ((uint32_t)rxcteerrretxen << 11) | ((uint32_t)anonymousadvfilten << 10) | ((uint32_t)advertfilten << 9) | ((uint32_t)rwbleen << 8) | ((uint32_t)rxwinszdef << 0));
+}
+
+__INLINE void ble_rwblecntl_unpack(uint8_t* mastersoftrst, uint8_t* mastertgsoftrst, uint8_t* regsoftrst, uint8_t* radiocntlsoftrst, uint8_t* swintreq, uint8_t* rftestabort, uint8_t* advertabort, uint8_t* scanabort, uint8_t* mddsb, uint8_t* sndsb, uint8_t* nesndsb, uint8_t* cryptdsb, uint8_t* lrpmapdsb, uint8_t* lrfecdsb, uint8_t* whitdsb, uint8_t* crcdsb, uint8_t* hopremapdsb, uint8_t* rxcteerrretxen, uint8_t* anonymousadvfilten, uint8_t* advertfilten, uint8_t* rwbleen, uint8_t* rxwinszdef)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+
+ *mastersoftrst = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *mastertgsoftrst = (localVal & ((uint32_t)0x40000000)) >> 30;
+ *regsoftrst = (localVal & ((uint32_t)0x20000000)) >> 29;
+ *radiocntlsoftrst = (localVal & ((uint32_t)0x10000000)) >> 28;
+ *swintreq = (localVal & ((uint32_t)0x08000000)) >> 27;
+ *rftestabort = (localVal & ((uint32_t)0x04000000)) >> 26;
+ *advertabort = (localVal & ((uint32_t)0x02000000)) >> 25;
+ *scanabort = (localVal & ((uint32_t)0x01000000)) >> 24;
+ *mddsb = (localVal & ((uint32_t)0x00100000)) >> 20;
+ *sndsb = (localVal & ((uint32_t)0x00080000)) >> 19;
+ *nesndsb = (localVal & ((uint32_t)0x00040000)) >> 18;
+ *cryptdsb = (localVal & ((uint32_t)0x00020000)) >> 17;
+ *lrpmapdsb = (localVal & ((uint32_t)0x00010000)) >> 16;
+ *lrfecdsb = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *whitdsb = (localVal & ((uint32_t)0x00004000)) >> 14;
+ *crcdsb = (localVal & ((uint32_t)0x00002000)) >> 13;
+ *hopremapdsb = (localVal & ((uint32_t)0x00001000)) >> 12;
+ *rxcteerrretxen = (localVal & ((uint32_t)0x00000800)) >> 11;
+ *anonymousadvfilten = (localVal & ((uint32_t)0x00000400)) >> 10;
+ *advertfilten = (localVal & ((uint32_t)0x00000200)) >> 9;
+ *rwbleen = (localVal & ((uint32_t)0x00000100)) >> 8;
+ *rxwinszdef = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_rwblecntl_master_soft_rst_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_rwblecntl_master_soft_rst_setf(uint8_t mastersoftrst)
+{
+ BLE_ASSERT_ERR((((uint32_t)mastersoftrst << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)mastersoftrst << 31));
+}
+
+__INLINE uint8_t ble_rwblecntl_master_tgsoft_rst_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x40000000)) >> 30);
+}
+
+__INLINE void ble_rwblecntl_master_tgsoft_rst_setf(uint8_t mastertgsoftrst)
+{
+ BLE_ASSERT_ERR((((uint32_t)mastertgsoftrst << 30) & ~((uint32_t)0x40000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x40000000)) | ((uint32_t)mastertgsoftrst << 30));
+}
+
+__INLINE uint8_t ble_rwblecntl_reg_soft_rst_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x20000000)) >> 29);
+}
+
+__INLINE void ble_rwblecntl_reg_soft_rst_setf(uint8_t regsoftrst)
+{
+ BLE_ASSERT_ERR((((uint32_t)regsoftrst << 29) & ~((uint32_t)0x20000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x20000000)) | ((uint32_t)regsoftrst << 29));
+}
+
+__INLINE uint8_t ble_rwblecntl_radiocntl_soft_rst_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x10000000)) >> 28);
+}
+
+__INLINE void ble_rwblecntl_radiocntl_soft_rst_setf(uint8_t radiocntlsoftrst)
+{
+ BLE_ASSERT_ERR((((uint32_t)radiocntlsoftrst << 28) & ~((uint32_t)0x10000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x10000000)) | ((uint32_t)radiocntlsoftrst << 28));
+}
+
+__INLINE uint8_t ble_rwblecntl_swint_req_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x08000000)) >> 27);
+}
+
+__INLINE void ble_rwblecntl_swint_req_setf(uint8_t swintreq)
+{
+ BLE_ASSERT_ERR((((uint32_t)swintreq << 27) & ~((uint32_t)0x08000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x08000000)) | ((uint32_t)swintreq << 27));
+}
+
+__INLINE uint8_t ble_rwblecntl_rftest_abort_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x04000000)) >> 26);
+}
+
+__INLINE void ble_rwblecntl_rftest_abort_setf(uint8_t rftestabort)
+{
+ BLE_ASSERT_ERR((((uint32_t)rftestabort << 26) & ~((uint32_t)0x04000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x04000000)) | ((uint32_t)rftestabort << 26));
+}
+
+__INLINE uint8_t ble_rwblecntl_advert_abort_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x02000000)) >> 25);
+}
+
+__INLINE void ble_rwblecntl_advert_abort_setf(uint8_t advertabort)
+{
+ BLE_ASSERT_ERR((((uint32_t)advertabort << 25) & ~((uint32_t)0x02000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x02000000)) | ((uint32_t)advertabort << 25));
+}
+
+__INLINE uint8_t ble_rwblecntl_scan_abort_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x01000000)) >> 24);
+}
+
+__INLINE void ble_rwblecntl_scan_abort_setf(uint8_t scanabort)
+{
+ BLE_ASSERT_ERR((((uint32_t)scanabort << 24) & ~((uint32_t)0x01000000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x01000000)) | ((uint32_t)scanabort << 24));
+}
+
+__INLINE uint8_t ble_rwblecntl_md_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00100000)) >> 20);
+}
+
+__INLINE void ble_rwblecntl_md_dsb_setf(uint8_t mddsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)mddsb << 20) & ~((uint32_t)0x00100000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00100000)) | ((uint32_t)mddsb << 20));
+}
+
+__INLINE uint8_t ble_rwblecntl_sn_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00080000)) >> 19);
+}
+
+__INLINE void ble_rwblecntl_sn_dsb_setf(uint8_t sndsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)sndsb << 19) & ~((uint32_t)0x00080000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00080000)) | ((uint32_t)sndsb << 19));
+}
+
+__INLINE uint8_t ble_rwblecntl_nesn_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00040000)) >> 18);
+}
+
+__INLINE void ble_rwblecntl_nesn_dsb_setf(uint8_t nesndsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)nesndsb << 18) & ~((uint32_t)0x00040000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00040000)) | ((uint32_t)nesndsb << 18));
+}
+
+__INLINE uint8_t ble_rwblecntl_crypt_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00020000)) >> 17);
+}
+
+__INLINE void ble_rwblecntl_crypt_dsb_setf(uint8_t cryptdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)cryptdsb << 17) & ~((uint32_t)0x00020000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00020000)) | ((uint32_t)cryptdsb << 17));
+}
+
+__INLINE uint8_t ble_rwblecntl_lrpmap_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00010000)) >> 16);
+}
+
+__INLINE void ble_rwblecntl_lrpmap_dsb_setf(uint8_t lrpmapdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrpmapdsb << 16) & ~((uint32_t)0x00010000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00010000)) | ((uint32_t)lrpmapdsb << 16));
+}
+
+__INLINE uint8_t ble_rwblecntl_lrfec_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_rwblecntl_lrfec_dsb_setf(uint8_t lrfecdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrfecdsb << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)lrfecdsb << 15));
+}
+
+__INLINE uint8_t ble_rwblecntl_whit_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00004000)) >> 14);
+}
+
+__INLINE void ble_rwblecntl_whit_dsb_setf(uint8_t whitdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)whitdsb << 14) & ~((uint32_t)0x00004000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00004000)) | ((uint32_t)whitdsb << 14));
+}
+
+__INLINE uint8_t ble_rwblecntl_crc_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00002000)) >> 13);
+}
+
+__INLINE void ble_rwblecntl_crc_dsb_setf(uint8_t crcdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)crcdsb << 13) & ~((uint32_t)0x00002000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00002000)) | ((uint32_t)crcdsb << 13));
+}
+
+__INLINE uint8_t ble_rwblecntl_hop_remap_dsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00001000)) >> 12);
+}
+
+__INLINE void ble_rwblecntl_hop_remap_dsb_setf(uint8_t hopremapdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)hopremapdsb << 12) & ~((uint32_t)0x00001000)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00001000)) | ((uint32_t)hopremapdsb << 12));
+}
+
+__INLINE uint8_t ble_rwblecntl_rxcteerr_retx_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000800)) >> 11);
+}
+
+__INLINE void ble_rwblecntl_rxcteerr_retx_en_setf(uint8_t rxcteerrretxen)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxcteerrretxen << 11) & ~((uint32_t)0x00000800)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00000800)) | ((uint32_t)rxcteerrretxen << 11));
+}
+
+__INLINE uint8_t ble_rwblecntl_anonymous_adv_filt_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000400)) >> 10);
+}
+
+__INLINE void ble_rwblecntl_anonymous_adv_filt_en_setf(uint8_t anonymousadvfilten)
+{
+ BLE_ASSERT_ERR((((uint32_t)anonymousadvfilten << 10) & ~((uint32_t)0x00000400)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00000400)) | ((uint32_t)anonymousadvfilten << 10));
+}
+
+__INLINE uint8_t ble_rwblecntl_advertfilt_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000200)) >> 9);
+}
+
+__INLINE void ble_rwblecntl_advertfilt_en_setf(uint8_t advertfilten)
+{
+ BLE_ASSERT_ERR((((uint32_t)advertfilten << 9) & ~((uint32_t)0x00000200)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00000200)) | ((uint32_t)advertfilten << 9));
+}
+
+__INLINE uint8_t ble_rwblecntl_rwble_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000100)) >> 8);
+}
+
+__INLINE void ble_rwblecntl_rwble_en_setf(uint8_t rwbleen)
+{
+ BLE_ASSERT_ERR((((uint32_t)rwbleen << 8) & ~((uint32_t)0x00000100)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x00000100)) | ((uint32_t)rwbleen << 8));
+}
+
+__INLINE uint8_t ble_rwblecntl_rxwinszdef_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECNTL_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_rwblecntl_rxwinszdef_setf(uint8_t rxwinszdef)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxwinszdef << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_RWBLECNTL_ADDR, (REG_BLE_RD(BLE_RWBLECNTL_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)rxwinszdef << 0));
+}
+
+/**
+ * @brief VERSION register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 TYP 0xA
+ * 23:16 REL 0x0
+ * 15:08 UPG 0xF
+ * 07:00 BUILD 0x0
+ *
+ */
+#define BLE_VERSION_ADDR 0x00900804
+#define BLE_VERSION_OFFSET 0x00000004
+#define BLE_VERSION_INDEX 0x00000001
+#define BLE_VERSION_RESET 0x0A000F00
+
+__INLINE uint32_t ble_version_get(void)
+{
+ return REG_BLE_RD(BLE_VERSION_ADDR);
+}
+
+// field definitions
+#define BLE_TYP_MASK ((uint32_t)0xFF000000)
+#define BLE_TYP_LSB 24
+#define BLE_TYP_WIDTH ((uint32_t)0x00000008)
+#define BLE_REL_MASK ((uint32_t)0x00FF0000)
+#define BLE_REL_LSB 16
+#define BLE_REL_WIDTH ((uint32_t)0x00000008)
+#define BLE_UPG_MASK ((uint32_t)0x0000FF00)
+#define BLE_UPG_LSB 8
+#define BLE_UPG_WIDTH ((uint32_t)0x00000008)
+#define BLE_BUILD_MASK ((uint32_t)0x000000FF)
+#define BLE_BUILD_LSB 0
+#define BLE_BUILD_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_TYP_RST 0xA
+#define BLE_REL_RST 0x0
+#define BLE_UPG_RST 0xF
+#define BLE_BUILD_RST 0x0
+
+__INLINE void ble_version_unpack(uint8_t* typ, uint8_t* rel, uint8_t* upg, uint8_t* build)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_VERSION_ADDR);
+
+ *typ = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rel = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *upg = (localVal & ((uint32_t)0x0000FF00)) >> 8;
+ *build = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_version_typ_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_VERSION_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE uint8_t ble_version_rel_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_VERSION_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE uint8_t ble_version_upg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_VERSION_ADDR);
+ return ((localVal & ((uint32_t)0x0000FF00)) >> 8);
+}
+
+__INLINE uint8_t ble_version_build_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_VERSION_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+/**
+ * @brief RWBLECONF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 DMMODE 0
+ * 28 CORRELATOR 1
+ * 27 USERXLR 1
+ * 26 USETXLR 1
+ * 24 USEISO 1
+ * 21 WLANCOEX 1
+ * 20:16 RFIF 0x1
+ * 15 USEDBG 1
+ * 14 DECIPHER 0
+ * 13:08 CLK_SEL 0x8
+ * 07 INTMODE 1
+ * 06 BUS_TYPE 0
+ * 04:00 ADDR_WIDTH 0xD
+ *
+ */
+#define BLE_RWBLECONF_ADDR 0x00900808
+#define BLE_RWBLECONF_OFFSET 0x00000008
+#define BLE_RWBLECONF_INDEX 0x00000002
+#define BLE_RWBLECONF_RESET 0x1D21888D
+
+__INLINE uint32_t ble_rwbleconf_get(void)
+{
+ return REG_BLE_RD(BLE_RWBLECONF_ADDR);
+}
+
+// field definitions
+#define BLE_DMMODE_BIT ((uint32_t)0x80000000)
+#define BLE_DMMODE_POS 31
+#define BLE_CORRELATOR_BIT ((uint32_t)0x10000000)
+#define BLE_CORRELATOR_POS 28
+#define BLE_USERXLR_BIT ((uint32_t)0x08000000)
+#define BLE_USERXLR_POS 27
+#define BLE_USETXLR_BIT ((uint32_t)0x04000000)
+#define BLE_USETXLR_POS 26
+#define BLE_USEISO_BIT ((uint32_t)0x01000000)
+#define BLE_USEISO_POS 24
+#define BLE_WLANCOEX_BIT ((uint32_t)0x00200000)
+#define BLE_WLANCOEX_POS 21
+#define BLE_RFIF_MASK ((uint32_t)0x001F0000)
+#define BLE_RFIF_LSB 16
+#define BLE_RFIF_WIDTH ((uint32_t)0x00000005)
+#define BLE_USEDBG_BIT ((uint32_t)0x00008000)
+#define BLE_USEDBG_POS 15
+#define BLE_DECIPHER_BIT ((uint32_t)0x00004000)
+#define BLE_DECIPHER_POS 14
+#define BLE_CLK_SEL_MASK ((uint32_t)0x00003F00)
+#define BLE_CLK_SEL_LSB 8
+#define BLE_CLK_SEL_WIDTH ((uint32_t)0x00000006)
+#define BLE_INTMODE_BIT ((uint32_t)0x00000080)
+#define BLE_INTMODE_POS 7
+#define BLE_BUS_TYPE_BIT ((uint32_t)0x00000040)
+#define BLE_BUS_TYPE_POS 6
+#define BLE_ADDR_WIDTH_MASK ((uint32_t)0x0000001F)
+#define BLE_ADDR_WIDTH_LSB 0
+#define BLE_ADDR_WIDTH_WIDTH ((uint32_t)0x00000005)
+
+#define BLE_DMMODE_RST 0x0
+#define BLE_CORRELATOR_RST 0x1
+#define BLE_USERXLR_RST 0x1
+#define BLE_USETXLR_RST 0x1
+#define BLE_USEISO_RST 0x1
+#define BLE_WLANCOEX_RST 0x1
+#define BLE_RFIF_RST 0x1
+#define BLE_USEDBG_RST 0x1
+#define BLE_DECIPHER_RST 0x0
+#define BLE_CLK_SEL_RST 0x8
+#define BLE_INTMODE_RST 0x1
+#define BLE_BUS_TYPE_RST 0x0
+#define BLE_ADDR_WIDTH_RST 0xD
+
+__INLINE void ble_rwbleconf_unpack(uint8_t* dmmode, uint8_t* correlator, uint8_t* userxlr, uint8_t* usetxlr, uint8_t* useiso, uint8_t* wlancoex, uint8_t* rfif, uint8_t* usedbg, uint8_t* decipher, uint8_t* clksel, uint8_t* intmode, uint8_t* bustype, uint8_t* addrwidth)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+
+ *dmmode = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *correlator = (localVal & ((uint32_t)0x10000000)) >> 28;
+ *userxlr = (localVal & ((uint32_t)0x08000000)) >> 27;
+ *usetxlr = (localVal & ((uint32_t)0x04000000)) >> 26;
+ *useiso = (localVal & ((uint32_t)0x01000000)) >> 24;
+ *wlancoex = (localVal & ((uint32_t)0x00200000)) >> 21;
+ *rfif = (localVal & ((uint32_t)0x001F0000)) >> 16;
+ *usedbg = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *decipher = (localVal & ((uint32_t)0x00004000)) >> 14;
+ *clksel = (localVal & ((uint32_t)0x00003F00)) >> 8;
+ *intmode = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *bustype = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *addrwidth = (localVal & ((uint32_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t ble_rwbleconf_dmmode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE uint8_t ble_rwbleconf_correlator_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x10000000)) >> 28);
+}
+
+__INLINE uint8_t ble_rwbleconf_userxlr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x08000000)) >> 27);
+}
+
+__INLINE uint8_t ble_rwbleconf_usetxlr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x04000000)) >> 26);
+}
+
+__INLINE uint8_t ble_rwbleconf_useiso_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x01000000)) >> 24);
+}
+
+__INLINE uint8_t ble_rwbleconf_wlancoex_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x00200000)) >> 21);
+}
+
+__INLINE uint8_t ble_rwbleconf_rfif_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x001F0000)) >> 16);
+}
+
+__INLINE uint8_t ble_rwbleconf_usedbg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE uint8_t ble_rwbleconf_decipher_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x00004000)) >> 14);
+}
+
+__INLINE uint8_t ble_rwbleconf_clk_sel_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x00003F00)) >> 8);
+}
+
+__INLINE uint8_t ble_rwbleconf_intmode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE uint8_t ble_rwbleconf_bus_type_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE uint8_t ble_rwbleconf_addr_width_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RWBLECONF_ADDR);
+ return ((localVal & ((uint32_t)0x0000001F)) >> 0);
+}
+
+/**
+ * @brief INTCNTL0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 16 ERRORINTMSK 0
+ * 06 ISORXINTMSK 0
+ * 05 ISOTXINTMSK 0
+ * 04 RXINTMSK 0
+ * 03 TXINTMSK 0
+ * 02 SKIPEVTINTMSK 0
+ * 01 ENDEVTINTMSK 1
+ * 00 STARTEVTINTMSK 1
+ *
+ */
+#define BLE_INTCNTL0_ADDR 0x0090080C
+#define BLE_INTCNTL0_OFFSET 0x0000000C
+#define BLE_INTCNTL0_INDEX 0x00000003
+#define BLE_INTCNTL0_RESET 0x00000003
+
+__INLINE uint32_t ble_intcntl0_get(void)
+{
+ return REG_BLE_RD(BLE_INTCNTL0_ADDR);
+}
+
+__INLINE void ble_intcntl0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, value);
+}
+
+// field definitions
+#define BLE_ERRORINTMSK_BIT ((uint32_t)0x00010000)
+#define BLE_ERRORINTMSK_POS 16
+#define BLE_ISORXINTMSK_BIT ((uint32_t)0x00000040)
+#define BLE_ISORXINTMSK_POS 6
+#define BLE_ISOTXINTMSK_BIT ((uint32_t)0x00000020)
+#define BLE_ISOTXINTMSK_POS 5
+#define BLE_RXINTMSK_BIT ((uint32_t)0x00000010)
+#define BLE_RXINTMSK_POS 4
+#define BLE_TXINTMSK_BIT ((uint32_t)0x00000008)
+#define BLE_TXINTMSK_POS 3
+#define BLE_SKIPEVTINTMSK_BIT ((uint32_t)0x00000004)
+#define BLE_SKIPEVTINTMSK_POS 2
+#define BLE_ENDEVTINTMSK_BIT ((uint32_t)0x00000002)
+#define BLE_ENDEVTINTMSK_POS 1
+#define BLE_STARTEVTINTMSK_BIT ((uint32_t)0x00000001)
+#define BLE_STARTEVTINTMSK_POS 0
+
+#define BLE_ERRORINTMSK_RST 0x0
+#define BLE_ISORXINTMSK_RST 0x0
+#define BLE_ISOTXINTMSK_RST 0x0
+#define BLE_RXINTMSK_RST 0x0
+#define BLE_TXINTMSK_RST 0x0
+#define BLE_SKIPEVTINTMSK_RST 0x0
+#define BLE_ENDEVTINTMSK_RST 0x1
+#define BLE_STARTEVTINTMSK_RST 0x1
+
+__INLINE void ble_intcntl0_pack(uint8_t errorintmsk, uint8_t isorxintmsk, uint8_t isotxintmsk, uint8_t rxintmsk, uint8_t txintmsk, uint8_t skipevtintmsk, uint8_t endevtintmsk, uint8_t startevtintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)errorintmsk << 16) & ~((uint32_t)0x00010000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)isorxintmsk << 6) & ~((uint32_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)isotxintmsk << 5) & ~((uint32_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxintmsk << 4) & ~((uint32_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txintmsk << 3) & ~((uint32_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)skipevtintmsk << 2) & ~((uint32_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)endevtintmsk << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)startevtintmsk << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, ((uint32_t)errorintmsk << 16) | ((uint32_t)isorxintmsk << 6) | ((uint32_t)isotxintmsk << 5) | ((uint32_t)rxintmsk << 4) | ((uint32_t)txintmsk << 3) | ((uint32_t)skipevtintmsk << 2) | ((uint32_t)endevtintmsk << 1) | ((uint32_t)startevtintmsk << 0));
+}
+
+__INLINE void ble_intcntl0_unpack(uint8_t* errorintmsk, uint8_t* isorxintmsk, uint8_t* isotxintmsk, uint8_t* rxintmsk, uint8_t* txintmsk, uint8_t* skipevtintmsk, uint8_t* endevtintmsk, uint8_t* startevtintmsk)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+
+ *errorintmsk = (localVal & ((uint32_t)0x00010000)) >> 16;
+ *isorxintmsk = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *isotxintmsk = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *rxintmsk = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *txintmsk = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *skipevtintmsk = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *endevtintmsk = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *startevtintmsk = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_intcntl0_errorintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00010000)) >> 16);
+}
+
+__INLINE void ble_intcntl0_errorintmsk_setf(uint8_t errorintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)errorintmsk << 16) & ~((uint32_t)0x00010000)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00010000)) | ((uint32_t)errorintmsk << 16));
+}
+
+__INLINE uint8_t ble_intcntl0_isorxintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE void ble_intcntl0_isorxintmsk_setf(uint8_t isorxintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)isorxintmsk << 6) & ~((uint32_t)0x00000040)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000040)) | ((uint32_t)isorxintmsk << 6));
+}
+
+__INLINE uint8_t ble_intcntl0_isotxintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE void ble_intcntl0_isotxintmsk_setf(uint8_t isotxintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)isotxintmsk << 5) & ~((uint32_t)0x00000020)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000020)) | ((uint32_t)isotxintmsk << 5));
+}
+
+__INLINE uint8_t ble_intcntl0_rxintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE void ble_intcntl0_rxintmsk_setf(uint8_t rxintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxintmsk << 4) & ~((uint32_t)0x00000010)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000010)) | ((uint32_t)rxintmsk << 4));
+}
+
+__INLINE uint8_t ble_intcntl0_txintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE void ble_intcntl0_txintmsk_setf(uint8_t txintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)txintmsk << 3) & ~((uint32_t)0x00000008)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000008)) | ((uint32_t)txintmsk << 3));
+}
+
+__INLINE uint8_t ble_intcntl0_skipevtintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE void ble_intcntl0_skipevtintmsk_setf(uint8_t skipevtintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)skipevtintmsk << 2) & ~((uint32_t)0x00000004)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000004)) | ((uint32_t)skipevtintmsk << 2));
+}
+
+__INLINE uint8_t ble_intcntl0_endevtintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_intcntl0_endevtintmsk_setf(uint8_t endevtintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)endevtintmsk << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)endevtintmsk << 1));
+}
+
+__INLINE uint8_t ble_intcntl0_startevtintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_intcntl0_startevtintmsk_setf(uint8_t startevtintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)startevtintmsk << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_INTCNTL0_ADDR, (REG_BLE_RD(BLE_INTCNTL0_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)startevtintmsk << 0));
+}
+
+/**
+ * @brief INTSTAT0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 16 ERRORINTSTAT 0
+ *
+ */
+#define BLE_INTSTAT0_ADDR 0x00900810
+#define BLE_INTSTAT0_OFFSET 0x00000010
+#define BLE_INTSTAT0_INDEX 0x00000004
+#define BLE_INTSTAT0_RESET 0x00000000
+
+__INLINE uint32_t ble_intstat0_get(void)
+{
+ return REG_BLE_RD(BLE_INTSTAT0_ADDR);
+}
+
+// field definitions
+#define BLE_ERRORINTSTAT_BIT ((uint32_t)0x00010000)
+#define BLE_ERRORINTSTAT_POS 16
+
+#define BLE_ERRORINTSTAT_RST 0x0
+
+__INLINE uint8_t ble_intstat0_errorintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT0_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00010000)) == 0);
+ return (localVal >> 16);
+}
+
+/**
+ * @brief INTACK0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 16 ERRORINTACK 0
+ *
+ */
+#define BLE_INTACK0_ADDR 0x00900814
+#define BLE_INTACK0_OFFSET 0x00000014
+#define BLE_INTACK0_INDEX 0x00000005
+#define BLE_INTACK0_RESET 0x00000000
+
+__INLINE uint32_t ble_intack0_get(void)
+{
+ return REG_BLE_RD(BLE_INTACK0_ADDR);
+}
+
+__INLINE void ble_intack0_clear(uint32_t value)
+{
+ REG_BLE_WR(BLE_INTACK0_ADDR, value);
+}
+
+// field definitions
+#define BLE_ERRORINTACK_BIT ((uint32_t)0x00010000)
+#define BLE_ERRORINTACK_POS 16
+
+#define BLE_ERRORINTACK_RST 0x0
+
+__INLINE uint8_t ble_intack0_errorintack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK0_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00010000)) == 0);
+ return (localVal >> 16);
+}
+
+__INLINE void ble_intack0_errorintack_clearf(uint8_t errorintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)errorintack << 16) & ~((uint32_t)0x00010000)) == 0);
+ REG_BLE_WR(BLE_INTACK0_ADDR, (uint32_t)errorintack << 16);
+}
+
+/**
+ * @brief INTCNTL1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 30:28 CLKNINTSRMSK 0x0
+ * 27:24 CLKNINTSRVAL 0x0
+ * 15 FIFOINTMSK 1
+ * 06 TIMESTAMPTGT2INTMSK 0
+ * 05 TIMESTAMPTGT1INTMSK 0
+ * 04 FINETGTINTMSK 0
+ * 03 SWINTMSK 0
+ * 02 CRYPTINTMSK 0
+ * 01 SLPINTMSK 1
+ * 00 CLKNINTMSK 1
+ *
+ */
+#define BLE_INTCNTL1_ADDR 0x00900818
+#define BLE_INTCNTL1_OFFSET 0x00000018
+#define BLE_INTCNTL1_INDEX 0x00000006
+#define BLE_INTCNTL1_RESET 0x00008003
+
+__INLINE uint32_t ble_intcntl1_get(void)
+{
+ return REG_BLE_RD(BLE_INTCNTL1_ADDR);
+}
+
+__INLINE void ble_intcntl1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, value);
+}
+
+// field definitions
+#define BLE_CLKNINTSRMSK_MASK ((uint32_t)0x70000000)
+#define BLE_CLKNINTSRMSK_LSB 28
+#define BLE_CLKNINTSRMSK_WIDTH ((uint32_t)0x00000003)
+#define BLE_CLKNINTSRVAL_MASK ((uint32_t)0x0F000000)
+#define BLE_CLKNINTSRVAL_LSB 24
+#define BLE_CLKNINTSRVAL_WIDTH ((uint32_t)0x00000004)
+#define BLE_FIFOINTMSK_BIT ((uint32_t)0x00008000)
+#define BLE_FIFOINTMSK_POS 15
+#define BLE_TIMESTAMPTGT2INTMSK_BIT ((uint32_t)0x00000040)
+#define BLE_TIMESTAMPTGT2INTMSK_POS 6
+#define BLE_TIMESTAMPTGT1INTMSK_BIT ((uint32_t)0x00000020)
+#define BLE_TIMESTAMPTGT1INTMSK_POS 5
+#define BLE_FINETGTINTMSK_BIT ((uint32_t)0x00000010)
+#define BLE_FINETGTINTMSK_POS 4
+#define BLE_SWINTMSK_BIT ((uint32_t)0x00000008)
+#define BLE_SWINTMSK_POS 3
+#define BLE_CRYPTINTMSK_BIT ((uint32_t)0x00000004)
+#define BLE_CRYPTINTMSK_POS 2
+#define BLE_SLPINTMSK_BIT ((uint32_t)0x00000002)
+#define BLE_SLPINTMSK_POS 1
+#define BLE_CLKNINTMSK_BIT ((uint32_t)0x00000001)
+#define BLE_CLKNINTMSK_POS 0
+
+#define BLE_CLKNINTSRMSK_RST 0x0
+#define BLE_CLKNINTSRVAL_RST 0x0
+#define BLE_FIFOINTMSK_RST 0x1
+#define BLE_TIMESTAMPTGT2INTMSK_RST 0x0
+#define BLE_TIMESTAMPTGT1INTMSK_RST 0x0
+#define BLE_FINETGTINTMSK_RST 0x0
+#define BLE_SWINTMSK_RST 0x0
+#define BLE_CRYPTINTMSK_RST 0x0
+#define BLE_SLPINTMSK_RST 0x1
+#define BLE_CLKNINTMSK_RST 0x1
+
+__INLINE void ble_intcntl1_pack(uint8_t clknintsrmsk, uint8_t clknintsrval, uint8_t fifointmsk, uint8_t timestamptgt2intmsk, uint8_t timestamptgt1intmsk, uint8_t finetgtintmsk, uint8_t swintmsk, uint8_t cryptintmsk, uint8_t slpintmsk, uint8_t clknintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)clknintsrmsk << 28) & ~((uint32_t)0x70000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)clknintsrval << 24) & ~((uint32_t)0x0F000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)fifointmsk << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt2intmsk << 6) & ~((uint32_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt1intmsk << 5) & ~((uint32_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)finetgtintmsk << 4) & ~((uint32_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swintmsk << 3) & ~((uint32_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)cryptintmsk << 2) & ~((uint32_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)slpintmsk << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)clknintmsk << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, ((uint32_t)clknintsrmsk << 28) | ((uint32_t)clknintsrval << 24) | ((uint32_t)fifointmsk << 15) | ((uint32_t)timestamptgt2intmsk << 6) | ((uint32_t)timestamptgt1intmsk << 5) | ((uint32_t)finetgtintmsk << 4) | ((uint32_t)swintmsk << 3) | ((uint32_t)cryptintmsk << 2) | ((uint32_t)slpintmsk << 1) | ((uint32_t)clknintmsk << 0));
+}
+
+__INLINE void ble_intcntl1_unpack(uint8_t* clknintsrmsk, uint8_t* clknintsrval, uint8_t* fifointmsk, uint8_t* timestamptgt2intmsk, uint8_t* timestamptgt1intmsk, uint8_t* finetgtintmsk, uint8_t* swintmsk, uint8_t* cryptintmsk, uint8_t* slpintmsk, uint8_t* clknintmsk)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+
+ *clknintsrmsk = (localVal & ((uint32_t)0x70000000)) >> 28;
+ *clknintsrval = (localVal & ((uint32_t)0x0F000000)) >> 24;
+ *fifointmsk = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *timestamptgt2intmsk = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *timestamptgt1intmsk = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *finetgtintmsk = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *swintmsk = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *cryptintmsk = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *slpintmsk = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *clknintmsk = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_intcntl1_clknintsrmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x70000000)) >> 28);
+}
+
+__INLINE void ble_intcntl1_clknintsrmsk_setf(uint8_t clknintsrmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)clknintsrmsk << 28) & ~((uint32_t)0x70000000)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x70000000)) | ((uint32_t)clknintsrmsk << 28));
+}
+
+__INLINE uint8_t ble_intcntl1_clknintsrval_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x0F000000)) >> 24);
+}
+
+__INLINE void ble_intcntl1_clknintsrval_setf(uint8_t clknintsrval)
+{
+ BLE_ASSERT_ERR((((uint32_t)clknintsrval << 24) & ~((uint32_t)0x0F000000)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x0F000000)) | ((uint32_t)clknintsrval << 24));
+}
+
+__INLINE uint8_t ble_intcntl1_fifointmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_intcntl1_fifointmsk_setf(uint8_t fifointmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)fifointmsk << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)fifointmsk << 15));
+}
+
+__INLINE uint8_t ble_intcntl1_timestamptgt2intmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE void ble_intcntl1_timestamptgt2intmsk_setf(uint8_t timestamptgt2intmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt2intmsk << 6) & ~((uint32_t)0x00000040)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000040)) | ((uint32_t)timestamptgt2intmsk << 6));
+}
+
+__INLINE uint8_t ble_intcntl1_timestamptgt1intmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE void ble_intcntl1_timestamptgt1intmsk_setf(uint8_t timestamptgt1intmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt1intmsk << 5) & ~((uint32_t)0x00000020)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000020)) | ((uint32_t)timestamptgt1intmsk << 5));
+}
+
+__INLINE uint8_t ble_intcntl1_finetgtintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE void ble_intcntl1_finetgtintmsk_setf(uint8_t finetgtintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)finetgtintmsk << 4) & ~((uint32_t)0x00000010)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000010)) | ((uint32_t)finetgtintmsk << 4));
+}
+
+__INLINE uint8_t ble_intcntl1_swintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE void ble_intcntl1_swintmsk_setf(uint8_t swintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)swintmsk << 3) & ~((uint32_t)0x00000008)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000008)) | ((uint32_t)swintmsk << 3));
+}
+
+__INLINE uint8_t ble_intcntl1_cryptintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE void ble_intcntl1_cryptintmsk_setf(uint8_t cryptintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)cryptintmsk << 2) & ~((uint32_t)0x00000004)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000004)) | ((uint32_t)cryptintmsk << 2));
+}
+
+__INLINE uint8_t ble_intcntl1_slpintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_intcntl1_slpintmsk_setf(uint8_t slpintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)slpintmsk << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)slpintmsk << 1));
+}
+
+__INLINE uint8_t ble_intcntl1_clknintmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_intcntl1_clknintmsk_setf(uint8_t clknintmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)clknintmsk << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_INTCNTL1_ADDR, (REG_BLE_RD(BLE_INTCNTL1_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)clknintmsk << 0));
+}
+
+/**
+ * @brief INTSTAT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 FIFOINTSTAT 0
+ * 06 TIMESTAMPTGT2INTSTAT 0
+ * 05 TIMESTAMPTGT1INTSTAT 0
+ * 04 FINETGTINTSTAT 0
+ * 03 SWINTSTAT 0
+ * 02 CRYPTINTSTAT 0
+ * 01 SLPINTSTAT 0
+ * 00 CLKNINTSTAT 0
+ *
+ */
+#define BLE_INTSTAT1_ADDR 0x0090081C
+#define BLE_INTSTAT1_OFFSET 0x0000001C
+#define BLE_INTSTAT1_INDEX 0x00000007
+#define BLE_INTSTAT1_RESET 0x00000000
+
+__INLINE uint32_t ble_intstat1_get(void)
+{
+ return REG_BLE_RD(BLE_INTSTAT1_ADDR);
+}
+
+// field definitions
+#define BLE_FIFOINTSTAT_BIT ((uint32_t)0x00008000)
+#define BLE_FIFOINTSTAT_POS 15
+#define BLE_TIMESTAMPTGT2INTSTAT_BIT ((uint32_t)0x00000040)
+#define BLE_TIMESTAMPTGT2INTSTAT_POS 6
+#define BLE_TIMESTAMPTGT1INTSTAT_BIT ((uint32_t)0x00000020)
+#define BLE_TIMESTAMPTGT1INTSTAT_POS 5
+#define BLE_FINETGTINTSTAT_BIT ((uint32_t)0x00000010)
+#define BLE_FINETGTINTSTAT_POS 4
+#define BLE_SWINTSTAT_BIT ((uint32_t)0x00000008)
+#define BLE_SWINTSTAT_POS 3
+#define BLE_CRYPTINTSTAT_BIT ((uint32_t)0x00000004)
+#define BLE_CRYPTINTSTAT_POS 2
+#define BLE_SLPINTSTAT_BIT ((uint32_t)0x00000002)
+#define BLE_SLPINTSTAT_POS 1
+#define BLE_CLKNINTSTAT_BIT ((uint32_t)0x00000001)
+#define BLE_CLKNINTSTAT_POS 0
+
+#define BLE_FIFOINTSTAT_RST 0x0
+#define BLE_TIMESTAMPTGT2INTSTAT_RST 0x0
+#define BLE_TIMESTAMPTGT1INTSTAT_RST 0x0
+#define BLE_FINETGTINTSTAT_RST 0x0
+#define BLE_SWINTSTAT_RST 0x0
+#define BLE_CRYPTINTSTAT_RST 0x0
+#define BLE_SLPINTSTAT_RST 0x0
+#define BLE_CLKNINTSTAT_RST 0x0
+
+__INLINE void ble_intstat1_unpack(uint8_t* fifointstat, uint8_t* timestamptgt2intstat, uint8_t* timestamptgt1intstat, uint8_t* finetgtintstat, uint8_t* swintstat, uint8_t* cryptintstat, uint8_t* slpintstat, uint8_t* clknintstat)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+
+ *fifointstat = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *timestamptgt2intstat = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *timestamptgt1intstat = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *finetgtintstat = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *swintstat = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *cryptintstat = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *slpintstat = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *clknintstat = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_intstat1_fifointstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE uint8_t ble_intstat1_timestamptgt2intstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE uint8_t ble_intstat1_timestamptgt1intstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE uint8_t ble_intstat1_finetgtintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE uint8_t ble_intstat1_swintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE uint8_t ble_intstat1_cryptintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE uint8_t ble_intstat1_slpintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE uint8_t ble_intstat1_clknintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTSTAT1_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+/**
+ * @brief INTACK1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 FIFOINTACK 0
+ * 06 TIMESTAMPTGT2INTACK 0
+ * 05 TIMESTAMPTGT1INTACK 0
+ * 04 FINETGTINTACK 0
+ * 03 SWINTACK 0
+ * 02 CRYPTINTACK 0
+ * 01 SLPINTACK 0
+ * 00 CLKNINTACK 0
+ *
+ */
+#define BLE_INTACK1_ADDR 0x00900820
+#define BLE_INTACK1_OFFSET 0x00000020
+#define BLE_INTACK1_INDEX 0x00000008
+#define BLE_INTACK1_RESET 0x00000000
+
+__INLINE uint32_t ble_intack1_get(void)
+{
+ return REG_BLE_RD(BLE_INTACK1_ADDR);
+}
+
+__INLINE void ble_intack1_clear(uint32_t value)
+{
+ REG_BLE_WR(BLE_INTACK1_ADDR, value);
+}
+
+// field definitions
+#define BLE_FIFOINTACK_BIT ((uint32_t)0x00008000)
+#define BLE_FIFOINTACK_POS 15
+#define BLE_TIMESTAMPTGT2INTACK_BIT ((uint32_t)0x00000040)
+#define BLE_TIMESTAMPTGT2INTACK_POS 6
+#define BLE_TIMESTAMPTGT1INTACK_BIT ((uint32_t)0x00000020)
+#define BLE_TIMESTAMPTGT1INTACK_POS 5
+#define BLE_FINETGTINTACK_BIT ((uint32_t)0x00000010)
+#define BLE_FINETGTINTACK_POS 4
+#define BLE_SWINTACK_BIT ((uint32_t)0x00000008)
+#define BLE_SWINTACK_POS 3
+#define BLE_CRYPTINTACK_BIT ((uint32_t)0x00000004)
+#define BLE_CRYPTINTACK_POS 2
+#define BLE_SLPINTACK_BIT ((uint32_t)0x00000002)
+#define BLE_SLPINTACK_POS 1
+#define BLE_CLKNINTACK_BIT ((uint32_t)0x00000001)
+#define BLE_CLKNINTACK_POS 0
+
+#define BLE_FIFOINTACK_RST 0x0
+#define BLE_TIMESTAMPTGT2INTACK_RST 0x0
+#define BLE_TIMESTAMPTGT1INTACK_RST 0x0
+#define BLE_FINETGTINTACK_RST 0x0
+#define BLE_SWINTACK_RST 0x0
+#define BLE_CRYPTINTACK_RST 0x0
+#define BLE_SLPINTACK_RST 0x0
+#define BLE_CLKNINTACK_RST 0x0
+
+__INLINE void ble_intack1_pack(uint8_t fifointack, uint8_t timestamptgt2intack, uint8_t timestamptgt1intack, uint8_t finetgtintack, uint8_t swintack, uint8_t cryptintack, uint8_t slpintack, uint8_t clknintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)fifointack << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt2intack << 6) & ~((uint32_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt1intack << 5) & ~((uint32_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)finetgtintack << 4) & ~((uint32_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swintack << 3) & ~((uint32_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)cryptintack << 2) & ~((uint32_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)slpintack << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)clknintack << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, ((uint32_t)fifointack << 15) | ((uint32_t)timestamptgt2intack << 6) | ((uint32_t)timestamptgt1intack << 5) | ((uint32_t)finetgtintack << 4) | ((uint32_t)swintack << 3) | ((uint32_t)cryptintack << 2) | ((uint32_t)slpintack << 1) | ((uint32_t)clknintack << 0));
+}
+
+__INLINE void ble_intack1_unpack(uint8_t* fifointack, uint8_t* timestamptgt2intack, uint8_t* timestamptgt1intack, uint8_t* finetgtintack, uint8_t* swintack, uint8_t* cryptintack, uint8_t* slpintack, uint8_t* clknintack)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+
+ *fifointack = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *timestamptgt2intack = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *timestamptgt1intack = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *finetgtintack = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *swintack = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *cryptintack = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *slpintack = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *clknintack = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_intack1_fifointack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_intack1_fifointack_clearf(uint8_t fifointack)
+{
+ BLE_ASSERT_ERR((((uint32_t)fifointack << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)fifointack << 15);
+}
+
+__INLINE uint8_t ble_intack1_timestamptgt2intack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE void ble_intack1_timestamptgt2intack_clearf(uint8_t timestamptgt2intack)
+{
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt2intack << 6) & ~((uint32_t)0x00000040)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)timestamptgt2intack << 6);
+}
+
+__INLINE uint8_t ble_intack1_timestamptgt1intack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE void ble_intack1_timestamptgt1intack_clearf(uint8_t timestamptgt1intack)
+{
+ BLE_ASSERT_ERR((((uint32_t)timestamptgt1intack << 5) & ~((uint32_t)0x00000020)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)timestamptgt1intack << 5);
+}
+
+__INLINE uint8_t ble_intack1_finetgtintack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE void ble_intack1_finetgtintack_clearf(uint8_t finetgtintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)finetgtintack << 4) & ~((uint32_t)0x00000010)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)finetgtintack << 4);
+}
+
+__INLINE uint8_t ble_intack1_swintack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE void ble_intack1_swintack_clearf(uint8_t swintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)swintack << 3) & ~((uint32_t)0x00000008)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)swintack << 3);
+}
+
+__INLINE uint8_t ble_intack1_cryptintack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE void ble_intack1_cryptintack_clearf(uint8_t cryptintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)cryptintack << 2) & ~((uint32_t)0x00000004)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)cryptintack << 2);
+}
+
+__INLINE uint8_t ble_intack1_slpintack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_intack1_slpintack_clearf(uint8_t slpintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)slpintack << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)slpintack << 1);
+}
+
+__INLINE uint8_t ble_intack1_clknintack_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_INTACK1_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_intack1_clknintack_clearf(uint8_t clknintack)
+{
+ BLE_ASSERT_ERR((((uint32_t)clknintack << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_INTACK1_ADDR, (uint32_t)clknintack << 0);
+}
+
+/**
+ * @brief ACTFIFOSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:28 SKIP_ET_IDX 0x0
+ * 27:24 CURRENT_ET_IDX 0x0
+ * 15 ACTFLAG 0
+ * 06 ISORXINTSTAT 0
+ * 05 ISOTXINTSTAT 0
+ * 04 RXINTSTAT 0
+ * 03 TXINTSTAT 0
+ * 02 SKIPACTINTSTAT 0
+ * 01 ENDACTINTSTAT 0
+ * 00 STARTACTINTSTAT 0
+ *
+ */
+#define BLE_ACTFIFOSTAT_ADDR 0x00900824
+#define BLE_ACTFIFOSTAT_OFFSET 0x00000024
+#define BLE_ACTFIFOSTAT_INDEX 0x00000009
+#define BLE_ACTFIFOSTAT_RESET 0x00000000
+
+__INLINE uint32_t ble_actfifostat_get(void)
+{
+ return REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+}
+
+// field definitions
+#define BLE_SKIP_ET_IDX_MASK ((uint32_t)0xF0000000)
+#define BLE_SKIP_ET_IDX_LSB 28
+#define BLE_SKIP_ET_IDX_WIDTH ((uint32_t)0x00000004)
+#define BLE_CURRENT_ET_IDX_MASK ((uint32_t)0x0F000000)
+#define BLE_CURRENT_ET_IDX_LSB 24
+#define BLE_CURRENT_ET_IDX_WIDTH ((uint32_t)0x00000004)
+#define BLE_ACTFLAG_BIT ((uint32_t)0x00008000)
+#define BLE_ACTFLAG_POS 15
+#define BLE_ISORXINTSTAT_BIT ((uint32_t)0x00000040)
+#define BLE_ISORXINTSTAT_POS 6
+#define BLE_ISOTXINTSTAT_BIT ((uint32_t)0x00000020)
+#define BLE_ISOTXINTSTAT_POS 5
+#define BLE_RXINTSTAT_BIT ((uint32_t)0x00000010)
+#define BLE_RXINTSTAT_POS 4
+#define BLE_TXINTSTAT_BIT ((uint32_t)0x00000008)
+#define BLE_TXINTSTAT_POS 3
+#define BLE_SKIPACTINTSTAT_BIT ((uint32_t)0x00000004)
+#define BLE_SKIPACTINTSTAT_POS 2
+#define BLE_ENDACTINTSTAT_BIT ((uint32_t)0x00000002)
+#define BLE_ENDACTINTSTAT_POS 1
+#define BLE_STARTACTINTSTAT_BIT ((uint32_t)0x00000001)
+#define BLE_STARTACTINTSTAT_POS 0
+
+#define BLE_SKIP_ET_IDX_RST 0x0
+#define BLE_CURRENT_ET_IDX_RST 0x0
+#define BLE_ACTFLAG_RST 0x0
+#define BLE_ISORXINTSTAT_RST 0x0
+#define BLE_ISOTXINTSTAT_RST 0x0
+#define BLE_RXINTSTAT_RST 0x0
+#define BLE_TXINTSTAT_RST 0x0
+#define BLE_SKIPACTINTSTAT_RST 0x0
+#define BLE_ENDACTINTSTAT_RST 0x0
+#define BLE_STARTACTINTSTAT_RST 0x0
+
+__INLINE void ble_actfifostat_unpack(uint8_t* skipetidx, uint8_t* currentetidx, uint8_t* actflag, uint8_t* isorxintstat, uint8_t* isotxintstat, uint8_t* rxintstat, uint8_t* txintstat, uint8_t* skipactintstat, uint8_t* endactintstat, uint8_t* startactintstat)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+
+ *skipetidx = (localVal & ((uint32_t)0xF0000000)) >> 28;
+ *currentetidx = (localVal & ((uint32_t)0x0F000000)) >> 24;
+ *actflag = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *isorxintstat = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *isotxintstat = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *rxintstat = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *txintstat = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *skipactintstat = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *endactintstat = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *startactintstat = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_actfifostat_skip_et_idx_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0xF0000000)) >> 28);
+}
+
+__INLINE uint8_t ble_actfifostat_current_et_idx_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x0F000000)) >> 24);
+}
+
+__INLINE uint8_t ble_actfifostat_actflag_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE uint8_t ble_actfifostat_isorxintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE uint8_t ble_actfifostat_isotxintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE uint8_t ble_actfifostat_rxintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE uint8_t ble_actfifostat_txintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE uint8_t ble_actfifostat_skipactintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE uint8_t ble_actfifostat_endactintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE uint8_t ble_actfifostat_startactintstat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTFIFOSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+/**
+ * @brief CURRENTRXDESCPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 CURRENTRXDESCPTR 0x0
+ *
+ */
+#define BLE_CURRENTRXDESCPTR_ADDR 0x00900828
+#define BLE_CURRENTRXDESCPTR_OFFSET 0x00000028
+#define BLE_CURRENTRXDESCPTR_INDEX 0x0000000A
+#define BLE_CURRENTRXDESCPTR_RESET 0x00000000
+
+__INLINE uint32_t ble_currentrxdescptr_get(void)
+{
+ return REG_BLE_RD(BLE_CURRENTRXDESCPTR_ADDR);
+}
+
+__INLINE void ble_currentrxdescptr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_CURRENTRXDESCPTR_ADDR, value);
+}
+
+// field definitions
+#define BLE_CURRENTRXDESCPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_CURRENTRXDESCPTR_LSB 0
+#define BLE_CURRENTRXDESCPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_CURRENTRXDESCPTR_RST 0x0
+
+__INLINE uint16_t ble_currentrxdescptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_CURRENTRXDESCPTR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_currentrxdescptr_setf(uint16_t currentrxdescptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)currentrxdescptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_CURRENTRXDESCPTR_ADDR, (uint32_t)currentrxdescptr << 0);
+}
+
+/**
+ * @brief ETPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 ETPTR 0x0
+ *
+ */
+#define BLE_ETPTR_ADDR 0x0090082C
+#define BLE_ETPTR_OFFSET 0x0000002C
+#define BLE_ETPTR_INDEX 0x0000000B
+#define BLE_ETPTR_RESET 0x00000000
+
+__INLINE uint32_t ble_etptr_get(void)
+{
+ return REG_BLE_RD(BLE_ETPTR_ADDR);
+}
+
+__INLINE void ble_etptr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_ETPTR_ADDR, value);
+}
+
+// field definitions
+#define BLE_ETPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_ETPTR_LSB 0
+#define BLE_ETPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_ETPTR_RST 0x0
+
+__INLINE uint16_t ble_etptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ETPTR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_etptr_setf(uint16_t etptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)etptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_ETPTR_ADDR, (uint32_t)etptr << 0);
+}
+
+/**
+ * @brief DEEPSLCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 EXTWKUPDSB 0
+ * 15 DEEP_SLEEP_STAT 0
+ * 03 DEEP_SLEEP_CORR_EN 0
+ * 02 DEEP_SLEEP_ON 0
+ * 01 RADIO_SLEEP_EN 0
+ * 00 OSC_SLEEP_EN 0
+ *
+ */
+#define BLE_DEEPSLCNTL_ADDR 0x00900830
+#define BLE_DEEPSLCNTL_OFFSET 0x00000030
+#define BLE_DEEPSLCNTL_INDEX 0x0000000C
+#define BLE_DEEPSLCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_deepslcntl_get(void)
+{
+ return REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+}
+
+__INLINE void ble_deepslcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_EXTWKUPDSB_BIT ((uint32_t)0x80000000)
+#define BLE_EXTWKUPDSB_POS 31
+#define BLE_DEEP_SLEEP_STAT_BIT ((uint32_t)0x00008000)
+#define BLE_DEEP_SLEEP_STAT_POS 15
+#define BLE_DEEP_SLEEP_CORR_EN_BIT ((uint32_t)0x00000008)
+#define BLE_DEEP_SLEEP_CORR_EN_POS 3
+#define BLE_DEEP_SLEEP_ON_BIT ((uint32_t)0x00000004)
+#define BLE_DEEP_SLEEP_ON_POS 2
+#define BLE_RADIO_SLEEP_EN_BIT ((uint32_t)0x00000002)
+#define BLE_RADIO_SLEEP_EN_POS 1
+#define BLE_OSC_SLEEP_EN_BIT ((uint32_t)0x00000001)
+#define BLE_OSC_SLEEP_EN_POS 0
+
+#define BLE_EXTWKUPDSB_RST 0x0
+#define BLE_DEEP_SLEEP_STAT_RST 0x0
+#define BLE_DEEP_SLEEP_CORR_EN_RST 0x0
+#define BLE_DEEP_SLEEP_ON_RST 0x0
+#define BLE_RADIO_SLEEP_EN_RST 0x0
+#define BLE_OSC_SLEEP_EN_RST 0x0
+
+__INLINE void ble_deepslcntl_pack(uint8_t extwkupdsb, uint8_t deepsleepcorren, uint8_t deepsleepon, uint8_t radiosleepen, uint8_t oscsleepen)
+{
+ BLE_ASSERT_ERR((((uint32_t)extwkupdsb << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)deepsleepcorren << 3) & ~((uint32_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)deepsleepon << 2) & ~((uint32_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)radiosleepen << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)oscsleepen << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, ((uint32_t)extwkupdsb << 31) | ((uint32_t)deepsleepcorren << 3) | ((uint32_t)deepsleepon << 2) | ((uint32_t)radiosleepen << 1) | ((uint32_t)oscsleepen << 0));
+}
+
+__INLINE void ble_deepslcntl_unpack(uint8_t* extwkupdsb, uint8_t* deepsleepstat, uint8_t* deepsleepcorren, uint8_t* deepsleepon, uint8_t* radiosleepen, uint8_t* oscsleepen)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+
+ *extwkupdsb = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *deepsleepstat = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *deepsleepcorren = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *deepsleepon = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *radiosleepen = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *oscsleepen = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_deepslcntl_extwkupdsb_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_deepslcntl_extwkupdsb_setf(uint8_t extwkupdsb)
+{
+ BLE_ASSERT_ERR((((uint32_t)extwkupdsb << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, (REG_BLE_RD(BLE_DEEPSLCNTL_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)extwkupdsb << 31));
+}
+
+__INLINE uint8_t ble_deepslcntl_deep_sleep_stat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE uint8_t ble_deepslcntl_deep_sleep_corr_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE void ble_deepslcntl_deep_sleep_corr_en_setf(uint8_t deepsleepcorren)
+{
+ BLE_ASSERT_ERR((((uint32_t)deepsleepcorren << 3) & ~((uint32_t)0x00000008)) == 0);
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, (REG_BLE_RD(BLE_DEEPSLCNTL_ADDR) & ~((uint32_t)0x00000008)) | ((uint32_t)deepsleepcorren << 3));
+}
+
+__INLINE uint8_t ble_deepslcntl_deep_sleep_on_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE void ble_deepslcntl_deep_sleep_on_setf(uint8_t deepsleepon)
+{
+ BLE_ASSERT_ERR((((uint32_t)deepsleepon << 2) & ~((uint32_t)0x00000004)) == 0);
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, (REG_BLE_RD(BLE_DEEPSLCNTL_ADDR) & ~((uint32_t)0x00000004)) | ((uint32_t)deepsleepon << 2));
+}
+
+__INLINE uint8_t ble_deepslcntl_radio_sleep_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_deepslcntl_radio_sleep_en_setf(uint8_t radiosleepen)
+{
+ BLE_ASSERT_ERR((((uint32_t)radiosleepen << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, (REG_BLE_RD(BLE_DEEPSLCNTL_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)radiosleepen << 1));
+}
+
+__INLINE uint8_t ble_deepslcntl_osc_sleep_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_deepslcntl_osc_sleep_en_setf(uint8_t oscsleepen)
+{
+ BLE_ASSERT_ERR((((uint32_t)oscsleepen << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_DEEPSLCNTL_ADDR, (REG_BLE_RD(BLE_DEEPSLCNTL_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)oscsleepen << 0));
+}
+
+/**
+ * @brief DEEPSLWKUP register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 DEEPSLTIME 0x0
+ *
+ */
+#define BLE_DEEPSLWKUP_ADDR 0x00900834
+#define BLE_DEEPSLWKUP_OFFSET 0x00000034
+#define BLE_DEEPSLWKUP_INDEX 0x0000000D
+#define BLE_DEEPSLWKUP_RESET 0x00000000
+
+__INLINE uint32_t ble_deepslwkup_get(void)
+{
+ return REG_BLE_RD(BLE_DEEPSLWKUP_ADDR);
+}
+
+__INLINE void ble_deepslwkup_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DEEPSLWKUP_ADDR, value);
+}
+
+// field definitions
+#define BLE_DEEPSLTIME_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_DEEPSLTIME_LSB 0
+#define BLE_DEEPSLTIME_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_DEEPSLTIME_RST 0x0
+
+__INLINE uint32_t ble_deepslwkup_deepsltime_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLWKUP_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_deepslwkup_deepsltime_setf(uint32_t deepsltime)
+{
+ BLE_ASSERT_ERR((((uint32_t)deepsltime << 0) & ~((uint32_t)0xFFFFFFFF)) == 0);
+ REG_BLE_WR(BLE_DEEPSLWKUP_ADDR, (uint32_t)deepsltime << 0);
+}
+
+/**
+ * @brief DEEPSLSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 DEEPSLDUR 0x0
+ *
+ */
+#define BLE_DEEPSLSTAT_ADDR 0x00900838
+#define BLE_DEEPSLSTAT_OFFSET 0x00000038
+#define BLE_DEEPSLSTAT_INDEX 0x0000000E
+#define BLE_DEEPSLSTAT_RESET 0x00000000
+
+__INLINE uint32_t ble_deepslstat_get(void)
+{
+ return REG_BLE_RD(BLE_DEEPSLSTAT_ADDR);
+}
+
+// field definitions
+#define BLE_DEEPSLDUR_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_DEEPSLDUR_LSB 0
+#define BLE_DEEPSLDUR_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_DEEPSLDUR_RST 0x0
+
+__INLINE uint32_t ble_deepslstat_deepsldur_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEEPSLSTAT_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief ENBPRESET register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:21 TWEXT 0x0
+ * 20:10 TWOSC 0x0
+ * 09:00 TWRM 0x0
+ *
+ */
+#define BLE_ENBPRESET_ADDR 0x0090083C
+#define BLE_ENBPRESET_OFFSET 0x0000003C
+#define BLE_ENBPRESET_INDEX 0x0000000F
+#define BLE_ENBPRESET_RESET 0x00000000
+
+__INLINE uint32_t ble_enbpreset_get(void)
+{
+ return REG_BLE_RD(BLE_ENBPRESET_ADDR);
+}
+
+__INLINE void ble_enbpreset_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_ENBPRESET_ADDR, value);
+}
+
+// field definitions
+#define BLE_TWEXT_MASK ((uint32_t)0xFFE00000)
+#define BLE_TWEXT_LSB 21
+#define BLE_TWEXT_WIDTH ((uint32_t)0x0000000B)
+#define BLE_TWOSC_MASK ((uint32_t)0x001FFC00)
+#define BLE_TWOSC_LSB 10
+#define BLE_TWOSC_WIDTH ((uint32_t)0x0000000B)
+#define BLE_TWRM_MASK ((uint32_t)0x000003FF)
+#define BLE_TWRM_LSB 0
+#define BLE_TWRM_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_TWEXT_RST 0x0
+#define BLE_TWOSC_RST 0x0
+#define BLE_TWRM_RST 0x0
+
+__INLINE void ble_enbpreset_pack(uint16_t twext, uint16_t twosc, uint16_t twrm)
+{
+ BLE_ASSERT_ERR((((uint32_t)twext << 21) & ~((uint32_t)0xFFE00000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)twrm << 0) & ~((uint32_t)0x000003FF)) == 0);
+ REG_BLE_WR(BLE_ENBPRESET_ADDR, ((uint32_t)twext << 21) | ((uint32_t)twosc << 10) | ((uint32_t)twrm << 0));
+}
+
+__INLINE void ble_enbpreset_unpack(uint16_t* twext, uint16_t* twosc, uint16_t* twrm)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ENBPRESET_ADDR);
+
+ *twext = (localVal & ((uint32_t)0xFFE00000)) >> 21;
+ *twosc = (localVal & ((uint32_t)0x001FFC00)) >> 10;
+ *twrm = (localVal & ((uint32_t)0x000003FF)) >> 0;
+}
+
+__INLINE uint16_t ble_enbpreset_twext_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ENBPRESET_ADDR);
+ return ((localVal & ((uint32_t)0xFFE00000)) >> 21);
+}
+
+__INLINE void ble_enbpreset_twext_setf(uint16_t twext)
+{
+ BLE_ASSERT_ERR((((uint32_t)twext << 21) & ~((uint32_t)0xFFE00000)) == 0);
+ REG_BLE_WR(BLE_ENBPRESET_ADDR, (REG_BLE_RD(BLE_ENBPRESET_ADDR) & ~((uint32_t)0xFFE00000)) | ((uint32_t)twext << 21));
+}
+
+__INLINE uint16_t ble_enbpreset_twosc_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ENBPRESET_ADDR);
+ return ((localVal & ((uint32_t)0x001FFC00)) >> 10);
+}
+
+__INLINE void ble_enbpreset_twosc_setf(uint16_t twosc)
+{
+ BLE_ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0);
+ REG_BLE_WR(BLE_ENBPRESET_ADDR, (REG_BLE_RD(BLE_ENBPRESET_ADDR) & ~((uint32_t)0x001FFC00)) | ((uint32_t)twosc << 10));
+}
+
+__INLINE uint16_t ble_enbpreset_twrm_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ENBPRESET_ADDR);
+ return ((localVal & ((uint32_t)0x000003FF)) >> 0);
+}
+
+__INLINE void ble_enbpreset_twrm_setf(uint16_t twrm)
+{
+ BLE_ASSERT_ERR((((uint32_t)twrm << 0) & ~((uint32_t)0x000003FF)) == 0);
+ REG_BLE_WR(BLE_ENBPRESET_ADDR, (REG_BLE_RD(BLE_ENBPRESET_ADDR) & ~((uint32_t)0x000003FF)) | ((uint32_t)twrm << 0));
+}
+
+/**
+ * @brief FINECNTCORR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 FINECNTCORR 0x0
+ *
+ */
+#define BLE_FINECNTCORR_ADDR 0x00900840
+#define BLE_FINECNTCORR_OFFSET 0x00000040
+#define BLE_FINECNTCORR_INDEX 0x00000010
+#define BLE_FINECNTCORR_RESET 0x00000000
+
+__INLINE uint32_t ble_finecntcorr_get(void)
+{
+ return REG_BLE_RD(BLE_FINECNTCORR_ADDR);
+}
+
+__INLINE void ble_finecntcorr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_FINECNTCORR_ADDR, value);
+}
+
+// field definitions
+#define BLE_FINECNTCORR_MASK ((uint32_t)0x000003FF)
+#define BLE_FINECNTCORR_LSB 0
+#define BLE_FINECNTCORR_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_FINECNTCORR_RST 0x0
+
+__INLINE uint16_t ble_finecntcorr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_FINECNTCORR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_finecntcorr_setf(uint16_t finecntcorr)
+{
+ BLE_ASSERT_ERR((((uint32_t)finecntcorr << 0) & ~((uint32_t)0x000003FF)) == 0);
+ REG_BLE_WR(BLE_FINECNTCORR_ADDR, (uint32_t)finecntcorr << 0);
+}
+
+/**
+ * @brief CLKNCNTCORR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 ABS_DELTA 0
+ * 27:00 CLKNCNTCORR 0x0
+ *
+ */
+#define BLE_CLKNCNTCORR_ADDR 0x00900844
+#define BLE_CLKNCNTCORR_OFFSET 0x00000044
+#define BLE_CLKNCNTCORR_INDEX 0x00000011
+#define BLE_CLKNCNTCORR_RESET 0x00000000
+
+__INLINE uint32_t ble_clkncntcorr_get(void)
+{
+ return REG_BLE_RD(BLE_CLKNCNTCORR_ADDR);
+}
+
+__INLINE void ble_clkncntcorr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_CLKNCNTCORR_ADDR, value);
+}
+
+// field definitions
+#define BLE_ABS_DELTA_BIT ((uint32_t)0x80000000)
+#define BLE_ABS_DELTA_POS 31
+#define BLE_CLKNCNTCORR_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_CLKNCNTCORR_LSB 0
+#define BLE_CLKNCNTCORR_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_ABS_DELTA_RST 0x0
+#define BLE_CLKNCNTCORR_RST 0x0
+
+__INLINE void ble_clkncntcorr_pack(uint8_t absdelta, uint32_t clkncntcorr)
+{
+ BLE_ASSERT_ERR((((uint32_t)absdelta << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)clkncntcorr << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_CLKNCNTCORR_ADDR, ((uint32_t)absdelta << 31) | ((uint32_t)clkncntcorr << 0));
+}
+
+__INLINE void ble_clkncntcorr_unpack(uint8_t* absdelta, uint32_t* clkncntcorr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_CLKNCNTCORR_ADDR);
+
+ *absdelta = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *clkncntcorr = (localVal & ((uint32_t)0x0FFFFFFF)) >> 0;
+}
+
+__INLINE uint8_t ble_clkncntcorr_abs_delta_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_CLKNCNTCORR_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_clkncntcorr_abs_delta_setf(uint8_t absdelta)
+{
+ BLE_ASSERT_ERR((((uint32_t)absdelta << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_CLKNCNTCORR_ADDR, (REG_BLE_RD(BLE_CLKNCNTCORR_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)absdelta << 31));
+}
+
+__INLINE uint32_t ble_clkncntcorr_clkncntcorr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_CLKNCNTCORR_ADDR);
+ return ((localVal & ((uint32_t)0x0FFFFFFF)) >> 0);
+}
+
+__INLINE void ble_clkncntcorr_clkncntcorr_setf(uint32_t clkncntcorr)
+{
+ BLE_ASSERT_ERR((((uint32_t)clkncntcorr << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_CLKNCNTCORR_ADDR, (REG_BLE_RD(BLE_CLKNCNTCORR_ADDR) & ~((uint32_t)0x0FFFFFFF)) | ((uint32_t)clkncntcorr << 0));
+}
+
+/**
+ * @brief DIAGCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 DIAG3_EN 0
+ * 30:24 DIAG3 0x0
+ * 23 DIAG2_EN 0
+ * 22:16 DIAG2 0x0
+ * 15 DIAG1_EN 0
+ * 14:08 DIAG1 0x0
+ * 07 DIAG0_EN 0
+ * 06:00 DIAG0 0x0
+ *
+ */
+#define BLE_DIAGCNTL_ADDR 0x00900850
+#define BLE_DIAGCNTL_OFFSET 0x00000050
+#define BLE_DIAGCNTL_INDEX 0x00000014
+#define BLE_DIAGCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_diagcntl_get(void)
+{
+ return REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+}
+
+__INLINE void ble_diagcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_DIAG3_EN_BIT ((uint32_t)0x80000000)
+#define BLE_DIAG3_EN_POS 31
+#define BLE_DIAG3_MASK ((uint32_t)0x7F000000)
+#define BLE_DIAG3_LSB 24
+#define BLE_DIAG3_WIDTH ((uint32_t)0x00000007)
+#define BLE_DIAG2_EN_BIT ((uint32_t)0x00800000)
+#define BLE_DIAG2_EN_POS 23
+#define BLE_DIAG2_MASK ((uint32_t)0x007F0000)
+#define BLE_DIAG2_LSB 16
+#define BLE_DIAG2_WIDTH ((uint32_t)0x00000007)
+#define BLE_DIAG1_EN_BIT ((uint32_t)0x00008000)
+#define BLE_DIAG1_EN_POS 15
+#define BLE_DIAG1_MASK ((uint32_t)0x00007F00)
+#define BLE_DIAG1_LSB 8
+#define BLE_DIAG1_WIDTH ((uint32_t)0x00000007)
+#define BLE_DIAG0_EN_BIT ((uint32_t)0x00000080)
+#define BLE_DIAG0_EN_POS 7
+#define BLE_DIAG0_MASK ((uint32_t)0x0000007F)
+#define BLE_DIAG0_LSB 0
+#define BLE_DIAG0_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_DIAG3_EN_RST 0x0
+#define BLE_DIAG3_RST 0x0
+#define BLE_DIAG2_EN_RST 0x0
+#define BLE_DIAG2_RST 0x0
+#define BLE_DIAG1_EN_RST 0x0
+#define BLE_DIAG1_RST 0x0
+#define BLE_DIAG0_EN_RST 0x0
+#define BLE_DIAG0_RST 0x0
+
+__INLINE void ble_diagcntl_pack(uint8_t diag3en, uint8_t diag3, uint8_t diag2en, uint8_t diag2, uint8_t diag1en, uint8_t diag1, uint8_t diag0en, uint8_t diag0)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag3en << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag3 << 24) & ~((uint32_t)0x7F000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag2en << 23) & ~((uint32_t)0x00800000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag2 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag1en << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag1 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag0en << 7) & ~((uint32_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)diag0 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, ((uint32_t)diag3en << 31) | ((uint32_t)diag3 << 24) | ((uint32_t)diag2en << 23) | ((uint32_t)diag2 << 16) | ((uint32_t)diag1en << 15) | ((uint32_t)diag1 << 8) | ((uint32_t)diag0en << 7) | ((uint32_t)diag0 << 0));
+}
+
+__INLINE void ble_diagcntl_unpack(uint8_t* diag3en, uint8_t* diag3, uint8_t* diag2en, uint8_t* diag2, uint8_t* diag1en, uint8_t* diag1, uint8_t* diag0en, uint8_t* diag0)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+
+ *diag3en = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *diag3 = (localVal & ((uint32_t)0x7F000000)) >> 24;
+ *diag2en = (localVal & ((uint32_t)0x00800000)) >> 23;
+ *diag2 = (localVal & ((uint32_t)0x007F0000)) >> 16;
+ *diag1en = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *diag1 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *diag0en = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *diag0 = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_diagcntl_diag3_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_diagcntl_diag3_en_setf(uint8_t diag3en)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag3en << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)diag3en << 31));
+}
+
+__INLINE uint8_t ble_diagcntl_diag3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x7F000000)) >> 24);
+}
+
+__INLINE void ble_diagcntl_diag3_setf(uint8_t diag3)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag3 << 24) & ~((uint32_t)0x7F000000)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x7F000000)) | ((uint32_t)diag3 << 24));
+}
+
+__INLINE uint8_t ble_diagcntl_diag2_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00800000)) >> 23);
+}
+
+__INLINE void ble_diagcntl_diag2_en_setf(uint8_t diag2en)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag2en << 23) & ~((uint32_t)0x00800000)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x00800000)) | ((uint32_t)diag2en << 23));
+}
+
+__INLINE uint8_t ble_diagcntl_diag2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x007F0000)) >> 16);
+}
+
+__INLINE void ble_diagcntl_diag2_setf(uint8_t diag2)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag2 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x007F0000)) | ((uint32_t)diag2 << 16));
+}
+
+__INLINE uint8_t ble_diagcntl_diag1_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_diagcntl_diag1_en_setf(uint8_t diag1en)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag1en << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)diag1en << 15));
+}
+
+__INLINE uint8_t ble_diagcntl_diag1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_diagcntl_diag1_setf(uint8_t diag1)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag1 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)diag1 << 8));
+}
+
+__INLINE uint8_t ble_diagcntl_diag0_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE void ble_diagcntl_diag0_en_setf(uint8_t diag0en)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag0en << 7) & ~((uint32_t)0x00000080)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x00000080)) | ((uint32_t)diag0en << 7));
+}
+
+__INLINE uint8_t ble_diagcntl_diag0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_diagcntl_diag0_setf(uint8_t diag0)
+{
+ BLE_ASSERT_ERR((((uint32_t)diag0 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_DIAGCNTL_ADDR, (REG_BLE_RD(BLE_DIAGCNTL_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)diag0 << 0));
+}
+
+/**
+ * @brief DIAGSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 DIAG3STAT 0x0
+ * 23:16 DIAG2STAT 0x0
+ * 15:08 DIAG1STAT 0x0
+ * 07:00 DIAG0STAT 0x0
+ *
+ */
+#define BLE_DIAGSTAT_ADDR 0x00900854
+#define BLE_DIAGSTAT_OFFSET 0x00000054
+#define BLE_DIAGSTAT_INDEX 0x00000015
+#define BLE_DIAGSTAT_RESET 0x00000000
+
+__INLINE uint32_t ble_diagstat_get(void)
+{
+ return REG_BLE_RD(BLE_DIAGSTAT_ADDR);
+}
+
+// field definitions
+#define BLE_DIAG3STAT_MASK ((uint32_t)0xFF000000)
+#define BLE_DIAG3STAT_LSB 24
+#define BLE_DIAG3STAT_WIDTH ((uint32_t)0x00000008)
+#define BLE_DIAG2STAT_MASK ((uint32_t)0x00FF0000)
+#define BLE_DIAG2STAT_LSB 16
+#define BLE_DIAG2STAT_WIDTH ((uint32_t)0x00000008)
+#define BLE_DIAG1STAT_MASK ((uint32_t)0x0000FF00)
+#define BLE_DIAG1STAT_LSB 8
+#define BLE_DIAG1STAT_WIDTH ((uint32_t)0x00000008)
+#define BLE_DIAG0STAT_MASK ((uint32_t)0x000000FF)
+#define BLE_DIAG0STAT_LSB 0
+#define BLE_DIAG0STAT_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_DIAG3STAT_RST 0x0
+#define BLE_DIAG2STAT_RST 0x0
+#define BLE_DIAG1STAT_RST 0x0
+#define BLE_DIAG0STAT_RST 0x0
+
+__INLINE void ble_diagstat_unpack(uint8_t* diag3stat, uint8_t* diag2stat, uint8_t* diag1stat, uint8_t* diag0stat)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGSTAT_ADDR);
+
+ *diag3stat = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *diag2stat = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *diag1stat = (localVal & ((uint32_t)0x0000FF00)) >> 8;
+ *diag0stat = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_diagstat_diag3stat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGSTAT_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE uint8_t ble_diagstat_diag2stat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE uint8_t ble_diagstat_diag1stat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x0000FF00)) >> 8);
+}
+
+__INLINE uint8_t ble_diagstat_diag0stat_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DIAGSTAT_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+/**
+ * @brief DEBUGADDMAX register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:16 REG_ADDMAX 0x0
+ * 15:00 EM_ADDMAX 0x0
+ *
+ */
+#define BLE_DEBUGADDMAX_ADDR 0x00900858
+#define BLE_DEBUGADDMAX_OFFSET 0x00000058
+#define BLE_DEBUGADDMAX_INDEX 0x00000016
+#define BLE_DEBUGADDMAX_RESET 0x00000000
+
+__INLINE uint32_t ble_debugaddmax_get(void)
+{
+ return REG_BLE_RD(BLE_DEBUGADDMAX_ADDR);
+}
+
+__INLINE void ble_debugaddmax_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DEBUGADDMAX_ADDR, value);
+}
+
+// field definitions
+#define BLE_REG_ADDMAX_MASK ((uint32_t)0xFFFF0000)
+#define BLE_REG_ADDMAX_LSB 16
+#define BLE_REG_ADDMAX_WIDTH ((uint32_t)0x00000010)
+#define BLE_EM_ADDMAX_MASK ((uint32_t)0x0000FFFF)
+#define BLE_EM_ADDMAX_LSB 0
+#define BLE_EM_ADDMAX_WIDTH ((uint32_t)0x00000010)
+
+#define BLE_REG_ADDMAX_RST 0x0
+#define BLE_EM_ADDMAX_RST 0x0
+
+__INLINE void ble_debugaddmax_pack(uint16_t regaddmax, uint16_t emaddmax)
+{
+ BLE_ASSERT_ERR((((uint32_t)regaddmax << 16) & ~((uint32_t)0xFFFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)emaddmax << 0) & ~((uint32_t)0x0000FFFF)) == 0);
+ REG_BLE_WR(BLE_DEBUGADDMAX_ADDR, ((uint32_t)regaddmax << 16) | ((uint32_t)emaddmax << 0));
+}
+
+__INLINE void ble_debugaddmax_unpack(uint16_t* regaddmax, uint16_t* emaddmax)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEBUGADDMAX_ADDR);
+
+ *regaddmax = (localVal & ((uint32_t)0xFFFF0000)) >> 16;
+ *emaddmax = (localVal & ((uint32_t)0x0000FFFF)) >> 0;
+}
+
+__INLINE uint16_t ble_debugaddmax_reg_addmax_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEBUGADDMAX_ADDR);
+ return ((localVal & ((uint32_t)0xFFFF0000)) >> 16);
+}
+
+__INLINE void ble_debugaddmax_reg_addmax_setf(uint16_t regaddmax)
+{
+ BLE_ASSERT_ERR((((uint32_t)regaddmax << 16) & ~((uint32_t)0xFFFF0000)) == 0);
+ REG_BLE_WR(BLE_DEBUGADDMAX_ADDR, (REG_BLE_RD(BLE_DEBUGADDMAX_ADDR) & ~((uint32_t)0xFFFF0000)) | ((uint32_t)regaddmax << 16));
+}
+
+__INLINE uint16_t ble_debugaddmax_em_addmax_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEBUGADDMAX_ADDR);
+ return ((localVal & ((uint32_t)0x0000FFFF)) >> 0);
+}
+
+__INLINE void ble_debugaddmax_em_addmax_setf(uint16_t emaddmax)
+{
+ BLE_ASSERT_ERR((((uint32_t)emaddmax << 0) & ~((uint32_t)0x0000FFFF)) == 0);
+ REG_BLE_WR(BLE_DEBUGADDMAX_ADDR, (REG_BLE_RD(BLE_DEBUGADDMAX_ADDR) & ~((uint32_t)0x0000FFFF)) | ((uint32_t)emaddmax << 0));
+}
+
+/**
+ * @brief DEBUGADDMIN register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:16 REG_ADDMIN 0x0
+ * 15:00 EM_ADDMIN 0x0
+ *
+ */
+#define BLE_DEBUGADDMIN_ADDR 0x0090085C
+#define BLE_DEBUGADDMIN_OFFSET 0x0000005C
+#define BLE_DEBUGADDMIN_INDEX 0x00000017
+#define BLE_DEBUGADDMIN_RESET 0x00000000
+
+__INLINE uint32_t ble_debugaddmin_get(void)
+{
+ return REG_BLE_RD(BLE_DEBUGADDMIN_ADDR);
+}
+
+__INLINE void ble_debugaddmin_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DEBUGADDMIN_ADDR, value);
+}
+
+// field definitions
+#define BLE_REG_ADDMIN_MASK ((uint32_t)0xFFFF0000)
+#define BLE_REG_ADDMIN_LSB 16
+#define BLE_REG_ADDMIN_WIDTH ((uint32_t)0x00000010)
+#define BLE_EM_ADDMIN_MASK ((uint32_t)0x0000FFFF)
+#define BLE_EM_ADDMIN_LSB 0
+#define BLE_EM_ADDMIN_WIDTH ((uint32_t)0x00000010)
+
+#define BLE_REG_ADDMIN_RST 0x0
+#define BLE_EM_ADDMIN_RST 0x0
+
+__INLINE void ble_debugaddmin_pack(uint16_t regaddmin, uint16_t emaddmin)
+{
+ BLE_ASSERT_ERR((((uint32_t)regaddmin << 16) & ~((uint32_t)0xFFFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)emaddmin << 0) & ~((uint32_t)0x0000FFFF)) == 0);
+ REG_BLE_WR(BLE_DEBUGADDMIN_ADDR, ((uint32_t)regaddmin << 16) | ((uint32_t)emaddmin << 0));
+}
+
+__INLINE void ble_debugaddmin_unpack(uint16_t* regaddmin, uint16_t* emaddmin)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEBUGADDMIN_ADDR);
+
+ *regaddmin = (localVal & ((uint32_t)0xFFFF0000)) >> 16;
+ *emaddmin = (localVal & ((uint32_t)0x0000FFFF)) >> 0;
+}
+
+__INLINE uint16_t ble_debugaddmin_reg_addmin_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEBUGADDMIN_ADDR);
+ return ((localVal & ((uint32_t)0xFFFF0000)) >> 16);
+}
+
+__INLINE void ble_debugaddmin_reg_addmin_setf(uint16_t regaddmin)
+{
+ BLE_ASSERT_ERR((((uint32_t)regaddmin << 16) & ~((uint32_t)0xFFFF0000)) == 0);
+ REG_BLE_WR(BLE_DEBUGADDMIN_ADDR, (REG_BLE_RD(BLE_DEBUGADDMIN_ADDR) & ~((uint32_t)0xFFFF0000)) | ((uint32_t)regaddmin << 16));
+}
+
+__INLINE uint16_t ble_debugaddmin_em_addmin_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DEBUGADDMIN_ADDR);
+ return ((localVal & ((uint32_t)0x0000FFFF)) >> 0);
+}
+
+__INLINE void ble_debugaddmin_em_addmin_setf(uint16_t emaddmin)
+{
+ BLE_ASSERT_ERR((((uint32_t)emaddmin << 0) & ~((uint32_t)0x0000FFFF)) == 0);
+ REG_BLE_WR(BLE_DEBUGADDMIN_ADDR, (REG_BLE_RD(BLE_DEBUGADDMIN_ADDR) & ~((uint32_t)0x0000FFFF)) | ((uint32_t)emaddmin << 0));
+}
+
+/**
+ * @brief ERRORTYPESTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 22 DFCNTL_EMACC_ERROR 0
+ * 21 FIFOINTOVF 0
+ * 20 PHY_ERROR 0
+ * 19 TXAEHEADER_PTR_ERROR 0
+ * 18 TMAFS_UNDERRUN 0
+ * 17 RAL_UNDERRUN 0
+ * 16 RAL_ERROR 0
+ * 15 RXDATA_PTR_ERROR 0
+ * 14 TXDATA_PTR_ERROR 0
+ * 13 RXDESC_EMPTY_ERROR 0
+ * 12 TXDESC_EMPTY_ERROR 0
+ * 11 CSFORMAT_ERROR 0
+ * 10 LLCHMAP_ERROR 0
+ * 09 ADV_UNDERRUN 0
+ * 08 IFS_UNDERRUN 0
+ * 07 LIST_ERROR 0
+ * 06 EVT_CNTL_APFM_ERROR 0
+ * 05 ACT_SCHDL_APFM_ERROR 0
+ * 04 ACT_SCHDL_ENTRY_ERROR 0
+ * 03 RADIO_EMACC_ERROR 0
+ * 02 PKTCNTL_EMACC_ERROR 0
+ * 01 RXCRYPT_ERROR 0
+ * 00 TXCRYPT_ERROR 0
+ *
+ */
+#define BLE_ERRORTYPESTAT_ADDR 0x00900860
+#define BLE_ERRORTYPESTAT_OFFSET 0x00000060
+#define BLE_ERRORTYPESTAT_INDEX 0x00000018
+#define BLE_ERRORTYPESTAT_RESET 0x00000000
+
+__INLINE uint32_t ble_errortypestat_get(void)
+{
+ return REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+}
+
+// field definitions
+#define BLE_DFCNTL_EMACC_ERROR_BIT ((uint32_t)0x00400000)
+#define BLE_DFCNTL_EMACC_ERROR_POS 22
+#define BLE_FIFOINTOVF_BIT ((uint32_t)0x00200000)
+#define BLE_FIFOINTOVF_POS 21
+#define BLE_PHY_ERROR_BIT ((uint32_t)0x00100000)
+#define BLE_PHY_ERROR_POS 20
+#define BLE_TXAEHEADER_PTR_ERROR_BIT ((uint32_t)0x00080000)
+#define BLE_TXAEHEADER_PTR_ERROR_POS 19
+#define BLE_TMAFS_UNDERRUN_BIT ((uint32_t)0x00040000)
+#define BLE_TMAFS_UNDERRUN_POS 18
+#define BLE_RAL_UNDERRUN_BIT ((uint32_t)0x00020000)
+#define BLE_RAL_UNDERRUN_POS 17
+#define BLE_RAL_ERROR_BIT ((uint32_t)0x00010000)
+#define BLE_RAL_ERROR_POS 16
+#define BLE_RXDATA_PTR_ERROR_BIT ((uint32_t)0x00008000)
+#define BLE_RXDATA_PTR_ERROR_POS 15
+#define BLE_TXDATA_PTR_ERROR_BIT ((uint32_t)0x00004000)
+#define BLE_TXDATA_PTR_ERROR_POS 14
+#define BLE_RXDESC_EMPTY_ERROR_BIT ((uint32_t)0x00002000)
+#define BLE_RXDESC_EMPTY_ERROR_POS 13
+#define BLE_TXDESC_EMPTY_ERROR_BIT ((uint32_t)0x00001000)
+#define BLE_TXDESC_EMPTY_ERROR_POS 12
+#define BLE_CSFORMAT_ERROR_BIT ((uint32_t)0x00000800)
+#define BLE_CSFORMAT_ERROR_POS 11
+#define BLE_LLCHMAP_ERROR_BIT ((uint32_t)0x00000400)
+#define BLE_LLCHMAP_ERROR_POS 10
+#define BLE_ADV_UNDERRUN_BIT ((uint32_t)0x00000200)
+#define BLE_ADV_UNDERRUN_POS 9
+#define BLE_IFS_UNDERRUN_BIT ((uint32_t)0x00000100)
+#define BLE_IFS_UNDERRUN_POS 8
+#define BLE_LIST_ERROR_BIT ((uint32_t)0x00000080)
+#define BLE_LIST_ERROR_POS 7
+#define BLE_EVT_CNTL_APFM_ERROR_BIT ((uint32_t)0x00000040)
+#define BLE_EVT_CNTL_APFM_ERROR_POS 6
+#define BLE_ACT_SCHDL_APFM_ERROR_BIT ((uint32_t)0x00000020)
+#define BLE_ACT_SCHDL_APFM_ERROR_POS 5
+#define BLE_ACT_SCHDL_ENTRY_ERROR_BIT ((uint32_t)0x00000010)
+#define BLE_ACT_SCHDL_ENTRY_ERROR_POS 4
+#define BLE_RADIO_EMACC_ERROR_BIT ((uint32_t)0x00000008)
+#define BLE_RADIO_EMACC_ERROR_POS 3
+#define BLE_PKTCNTL_EMACC_ERROR_BIT ((uint32_t)0x00000004)
+#define BLE_PKTCNTL_EMACC_ERROR_POS 2
+#define BLE_RXCRYPT_ERROR_BIT ((uint32_t)0x00000002)
+#define BLE_RXCRYPT_ERROR_POS 1
+#define BLE_TXCRYPT_ERROR_BIT ((uint32_t)0x00000001)
+#define BLE_TXCRYPT_ERROR_POS 0
+
+#define BLE_DFCNTL_EMACC_ERROR_RST 0x0
+#define BLE_FIFOINTOVF_RST 0x0
+#define BLE_PHY_ERROR_RST 0x0
+#define BLE_TXAEHEADER_PTR_ERROR_RST 0x0
+#define BLE_TMAFS_UNDERRUN_RST 0x0
+#define BLE_RAL_UNDERRUN_RST 0x0
+#define BLE_RAL_ERROR_RST 0x0
+#define BLE_RXDATA_PTR_ERROR_RST 0x0
+#define BLE_TXDATA_PTR_ERROR_RST 0x0
+#define BLE_RXDESC_EMPTY_ERROR_RST 0x0
+#define BLE_TXDESC_EMPTY_ERROR_RST 0x0
+#define BLE_CSFORMAT_ERROR_RST 0x0
+#define BLE_LLCHMAP_ERROR_RST 0x0
+#define BLE_ADV_UNDERRUN_RST 0x0
+#define BLE_IFS_UNDERRUN_RST 0x0
+#define BLE_LIST_ERROR_RST 0x0
+#define BLE_EVT_CNTL_APFM_ERROR_RST 0x0
+#define BLE_ACT_SCHDL_APFM_ERROR_RST 0x0
+#define BLE_ACT_SCHDL_ENTRY_ERROR_RST 0x0
+#define BLE_RADIO_EMACC_ERROR_RST 0x0
+#define BLE_PKTCNTL_EMACC_ERROR_RST 0x0
+#define BLE_RXCRYPT_ERROR_RST 0x0
+#define BLE_TXCRYPT_ERROR_RST 0x0
+
+__INLINE void ble_errortypestat_unpack(uint8_t* dfcntlemaccerror, uint8_t* fifointovf, uint8_t* phyerror, uint8_t* txaeheaderptrerror, uint8_t* tmafsunderrun, uint8_t* ralunderrun, uint8_t* ralerror, uint8_t* rxdataptrerror, uint8_t* txdataptrerror, uint8_t* rxdescemptyerror, uint8_t* txdescemptyerror, uint8_t* csformaterror, uint8_t* llchmaperror, uint8_t* advunderrun, uint8_t* ifsunderrun, uint8_t* listerror, uint8_t* evtcntlapfmerror, uint8_t* actschdlapfmerror, uint8_t* actschdlentryerror, uint8_t* radioemaccerror, uint8_t* pktcntlemaccerror, uint8_t* rxcrypterror, uint8_t* txcrypterror)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+
+ *dfcntlemaccerror = (localVal & ((uint32_t)0x00400000)) >> 22;
+ *fifointovf = (localVal & ((uint32_t)0x00200000)) >> 21;
+ *phyerror = (localVal & ((uint32_t)0x00100000)) >> 20;
+ *txaeheaderptrerror = (localVal & ((uint32_t)0x00080000)) >> 19;
+ *tmafsunderrun = (localVal & ((uint32_t)0x00040000)) >> 18;
+ *ralunderrun = (localVal & ((uint32_t)0x00020000)) >> 17;
+ *ralerror = (localVal & ((uint32_t)0x00010000)) >> 16;
+ *rxdataptrerror = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *txdataptrerror = (localVal & ((uint32_t)0x00004000)) >> 14;
+ *rxdescemptyerror = (localVal & ((uint32_t)0x00002000)) >> 13;
+ *txdescemptyerror = (localVal & ((uint32_t)0x00001000)) >> 12;
+ *csformaterror = (localVal & ((uint32_t)0x00000800)) >> 11;
+ *llchmaperror = (localVal & ((uint32_t)0x00000400)) >> 10;
+ *advunderrun = (localVal & ((uint32_t)0x00000200)) >> 9;
+ *ifsunderrun = (localVal & ((uint32_t)0x00000100)) >> 8;
+ *listerror = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *evtcntlapfmerror = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *actschdlapfmerror = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *actschdlentryerror = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *radioemaccerror = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *pktcntlemaccerror = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *rxcrypterror = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *txcrypterror = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_errortypestat_dfcntl_emacc_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00400000)) >> 22);
+}
+
+__INLINE uint8_t ble_errortypestat_fifointovf_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00200000)) >> 21);
+}
+
+__INLINE uint8_t ble_errortypestat_phy_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00100000)) >> 20);
+}
+
+__INLINE uint8_t ble_errortypestat_txaeheader_ptr_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00080000)) >> 19);
+}
+
+__INLINE uint8_t ble_errortypestat_tmafs_underrun_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00040000)) >> 18);
+}
+
+__INLINE uint8_t ble_errortypestat_ral_underrun_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00020000)) >> 17);
+}
+
+__INLINE uint8_t ble_errortypestat_ral_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00010000)) >> 16);
+}
+
+__INLINE uint8_t ble_errortypestat_rxdata_ptr_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE uint8_t ble_errortypestat_txdata_ptr_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00004000)) >> 14);
+}
+
+__INLINE uint8_t ble_errortypestat_rxdesc_empty_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00002000)) >> 13);
+}
+
+__INLINE uint8_t ble_errortypestat_txdesc_empty_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00001000)) >> 12);
+}
+
+__INLINE uint8_t ble_errortypestat_csformat_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000800)) >> 11);
+}
+
+__INLINE uint8_t ble_errortypestat_llchmap_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000400)) >> 10);
+}
+
+__INLINE uint8_t ble_errortypestat_adv_underrun_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000200)) >> 9);
+}
+
+__INLINE uint8_t ble_errortypestat_ifs_underrun_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000100)) >> 8);
+}
+
+__INLINE uint8_t ble_errortypestat_list_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE uint8_t ble_errortypestat_evt_cntl_apfm_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE uint8_t ble_errortypestat_act_schdl_apfm_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE uint8_t ble_errortypestat_act_schdl_entry_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE uint8_t ble_errortypestat_radio_emacc_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE uint8_t ble_errortypestat_pktcntl_emacc_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE uint8_t ble_errortypestat_rxcrypt_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE uint8_t ble_errortypestat_txcrypt_error_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ERRORTYPESTAT_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+/**
+ * @brief SWPROFILING register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 SWPROF31 0
+ * 30 SWPROF30 0
+ * 29 SWPROF29 0
+ * 28 SWPROF28 0
+ * 27 SWPROF27 0
+ * 26 SWPROF26 0
+ * 25 SWPROF25 0
+ * 24 SWPROF24 0
+ * 23 SWPROF23 0
+ * 22 SWPROF22 0
+ * 21 SWPROF21 0
+ * 20 SWPROF20 0
+ * 19 SWPROF19 0
+ * 18 SWPROF18 0
+ * 17 SWPROF17 0
+ * 16 SWPROF16 0
+ * 15 SWPROF15 0
+ * 14 SWPROF14 0
+ * 13 SWPROF13 0
+ * 12 SWPROF12 0
+ * 11 SWPROF11 0
+ * 10 SWPROF10 0
+ * 09 SWPROF9 0
+ * 08 SWPROF8 0
+ * 07 SWPROF7 0
+ * 06 SWPROF6 0
+ * 05 SWPROF5 0
+ * 04 SWPROF4 0
+ * 03 SWPROF3 0
+ * 02 SWPROF2 0
+ * 01 SWPROF1 0
+ * 00 SWPROF0 0
+ *
+ */
+#define BLE_SWPROFILING_ADDR 0x00900864
+#define BLE_SWPROFILING_OFFSET 0x00000064
+#define BLE_SWPROFILING_INDEX 0x00000019
+#define BLE_SWPROFILING_RESET 0x00000000
+
+__INLINE uint32_t ble_swprofiling_get(void)
+{
+ return REG_BLE_RD(BLE_SWPROFILING_ADDR);
+}
+
+__INLINE void ble_swprofiling_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, value);
+}
+
+// field definitions
+#define BLE_SWPROF31_BIT ((uint32_t)0x80000000)
+#define BLE_SWPROF31_POS 31
+#define BLE_SWPROF30_BIT ((uint32_t)0x40000000)
+#define BLE_SWPROF30_POS 30
+#define BLE_SWPROF29_BIT ((uint32_t)0x20000000)
+#define BLE_SWPROF29_POS 29
+#define BLE_SWPROF28_BIT ((uint32_t)0x10000000)
+#define BLE_SWPROF28_POS 28
+#define BLE_SWPROF27_BIT ((uint32_t)0x08000000)
+#define BLE_SWPROF27_POS 27
+#define BLE_SWPROF26_BIT ((uint32_t)0x04000000)
+#define BLE_SWPROF26_POS 26
+#define BLE_SWPROF25_BIT ((uint32_t)0x02000000)
+#define BLE_SWPROF25_POS 25
+#define BLE_SWPROF24_BIT ((uint32_t)0x01000000)
+#define BLE_SWPROF24_POS 24
+#define BLE_SWPROF23_BIT ((uint32_t)0x00800000)
+#define BLE_SWPROF23_POS 23
+#define BLE_SWPROF22_BIT ((uint32_t)0x00400000)
+#define BLE_SWPROF22_POS 22
+#define BLE_SWPROF21_BIT ((uint32_t)0x00200000)
+#define BLE_SWPROF21_POS 21
+#define BLE_SWPROF20_BIT ((uint32_t)0x00100000)
+#define BLE_SWPROF20_POS 20
+#define BLE_SWPROF19_BIT ((uint32_t)0x00080000)
+#define BLE_SWPROF19_POS 19
+#define BLE_SWPROF18_BIT ((uint32_t)0x00040000)
+#define BLE_SWPROF18_POS 18
+#define BLE_SWPROF17_BIT ((uint32_t)0x00020000)
+#define BLE_SWPROF17_POS 17
+#define BLE_SWPROF16_BIT ((uint32_t)0x00010000)
+#define BLE_SWPROF16_POS 16
+#define BLE_SWPROF15_BIT ((uint32_t)0x00008000)
+#define BLE_SWPROF15_POS 15
+#define BLE_SWPROF14_BIT ((uint32_t)0x00004000)
+#define BLE_SWPROF14_POS 14
+#define BLE_SWPROF13_BIT ((uint32_t)0x00002000)
+#define BLE_SWPROF13_POS 13
+#define BLE_SWPROF12_BIT ((uint32_t)0x00001000)
+#define BLE_SWPROF12_POS 12
+#define BLE_SWPROF11_BIT ((uint32_t)0x00000800)
+#define BLE_SWPROF11_POS 11
+#define BLE_SWPROF10_BIT ((uint32_t)0x00000400)
+#define BLE_SWPROF10_POS 10
+#define BLE_SWPROF9_BIT ((uint32_t)0x00000200)
+#define BLE_SWPROF9_POS 9
+#define BLE_SWPROF8_BIT ((uint32_t)0x00000100)
+#define BLE_SWPROF8_POS 8
+#define BLE_SWPROF7_BIT ((uint32_t)0x00000080)
+#define BLE_SWPROF7_POS 7
+#define BLE_SWPROF6_BIT ((uint32_t)0x00000040)
+#define BLE_SWPROF6_POS 6
+#define BLE_SWPROF5_BIT ((uint32_t)0x00000020)
+#define BLE_SWPROF5_POS 5
+#define BLE_SWPROF4_BIT ((uint32_t)0x00000010)
+#define BLE_SWPROF4_POS 4
+#define BLE_SWPROF3_BIT ((uint32_t)0x00000008)
+#define BLE_SWPROF3_POS 3
+#define BLE_SWPROF2_BIT ((uint32_t)0x00000004)
+#define BLE_SWPROF2_POS 2
+#define BLE_SWPROF1_BIT ((uint32_t)0x00000002)
+#define BLE_SWPROF1_POS 1
+#define BLE_SWPROF0_BIT ((uint32_t)0x00000001)
+#define BLE_SWPROF0_POS 0
+
+#define BLE_SWPROF31_RST 0x0
+#define BLE_SWPROF30_RST 0x0
+#define BLE_SWPROF29_RST 0x0
+#define BLE_SWPROF28_RST 0x0
+#define BLE_SWPROF27_RST 0x0
+#define BLE_SWPROF26_RST 0x0
+#define BLE_SWPROF25_RST 0x0
+#define BLE_SWPROF24_RST 0x0
+#define BLE_SWPROF23_RST 0x0
+#define BLE_SWPROF22_RST 0x0
+#define BLE_SWPROF21_RST 0x0
+#define BLE_SWPROF20_RST 0x0
+#define BLE_SWPROF19_RST 0x0
+#define BLE_SWPROF18_RST 0x0
+#define BLE_SWPROF17_RST 0x0
+#define BLE_SWPROF16_RST 0x0
+#define BLE_SWPROF15_RST 0x0
+#define BLE_SWPROF14_RST 0x0
+#define BLE_SWPROF13_RST 0x0
+#define BLE_SWPROF12_RST 0x0
+#define BLE_SWPROF11_RST 0x0
+#define BLE_SWPROF10_RST 0x0
+#define BLE_SWPROF9_RST 0x0
+#define BLE_SWPROF8_RST 0x0
+#define BLE_SWPROF7_RST 0x0
+#define BLE_SWPROF6_RST 0x0
+#define BLE_SWPROF5_RST 0x0
+#define BLE_SWPROF4_RST 0x0
+#define BLE_SWPROF3_RST 0x0
+#define BLE_SWPROF2_RST 0x0
+#define BLE_SWPROF1_RST 0x0
+#define BLE_SWPROF0_RST 0x0
+
+__INLINE void ble_swprofiling_pack(uint8_t swprof31, uint8_t swprof30, uint8_t swprof29, uint8_t swprof28, uint8_t swprof27, uint8_t swprof26, uint8_t swprof25, uint8_t swprof24, uint8_t swprof23, uint8_t swprof22, uint8_t swprof21, uint8_t swprof20, uint8_t swprof19, uint8_t swprof18, uint8_t swprof17, uint8_t swprof16, uint8_t swprof15, uint8_t swprof14, uint8_t swprof13, uint8_t swprof12, uint8_t swprof11, uint8_t swprof10, uint8_t swprof9, uint8_t swprof8, uint8_t swprof7, uint8_t swprof6, uint8_t swprof5, uint8_t swprof4, uint8_t swprof3, uint8_t swprof2, uint8_t swprof1, uint8_t swprof0)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof31 << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof30 << 30) & ~((uint32_t)0x40000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof29 << 29) & ~((uint32_t)0x20000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof28 << 28) & ~((uint32_t)0x10000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof27 << 27) & ~((uint32_t)0x08000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof26 << 26) & ~((uint32_t)0x04000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof25 << 25) & ~((uint32_t)0x02000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof24 << 24) & ~((uint32_t)0x01000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof23 << 23) & ~((uint32_t)0x00800000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof22 << 22) & ~((uint32_t)0x00400000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof21 << 21) & ~((uint32_t)0x00200000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof20 << 20) & ~((uint32_t)0x00100000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof19 << 19) & ~((uint32_t)0x00080000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof18 << 18) & ~((uint32_t)0x00040000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof17 << 17) & ~((uint32_t)0x00020000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof16 << 16) & ~((uint32_t)0x00010000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof15 << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof14 << 14) & ~((uint32_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof13 << 13) & ~((uint32_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof12 << 12) & ~((uint32_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof11 << 11) & ~((uint32_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof10 << 10) & ~((uint32_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof9 << 9) & ~((uint32_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof8 << 8) & ~((uint32_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof7 << 7) & ~((uint32_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof6 << 6) & ~((uint32_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof5 << 5) & ~((uint32_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof4 << 4) & ~((uint32_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof3 << 3) & ~((uint32_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof2 << 2) & ~((uint32_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof1 << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)swprof0 << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, ((uint32_t)swprof31 << 31) | ((uint32_t)swprof30 << 30) | ((uint32_t)swprof29 << 29) | ((uint32_t)swprof28 << 28) | ((uint32_t)swprof27 << 27) | ((uint32_t)swprof26 << 26) | ((uint32_t)swprof25 << 25) | ((uint32_t)swprof24 << 24) | ((uint32_t)swprof23 << 23) | ((uint32_t)swprof22 << 22) | ((uint32_t)swprof21 << 21) | ((uint32_t)swprof20 << 20) | ((uint32_t)swprof19 << 19) | ((uint32_t)swprof18 << 18) | ((uint32_t)swprof17 << 17) | ((uint32_t)swprof16 << 16) | ((uint32_t)swprof15 << 15) | ((uint32_t)swprof14 << 14) | ((uint32_t)swprof13 << 13) | ((uint32_t)swprof12 << 12) | ((uint32_t)swprof11 << 11) | ((uint32_t)swprof10 << 10) | ((uint32_t)swprof9 << 9) | ((uint32_t)swprof8 << 8) | ((uint32_t)swprof7 << 7) | ((uint32_t)swprof6 << 6) | ((uint32_t)swprof5 << 5) | ((uint32_t)swprof4 << 4) | ((uint32_t)swprof3 << 3) | ((uint32_t)swprof2 << 2) | ((uint32_t)swprof1 << 1) | ((uint32_t)swprof0 << 0));
+}
+
+__INLINE void ble_swprofiling_unpack(uint8_t* swprof31, uint8_t* swprof30, uint8_t* swprof29, uint8_t* swprof28, uint8_t* swprof27, uint8_t* swprof26, uint8_t* swprof25, uint8_t* swprof24, uint8_t* swprof23, uint8_t* swprof22, uint8_t* swprof21, uint8_t* swprof20, uint8_t* swprof19, uint8_t* swprof18, uint8_t* swprof17, uint8_t* swprof16, uint8_t* swprof15, uint8_t* swprof14, uint8_t* swprof13, uint8_t* swprof12, uint8_t* swprof11, uint8_t* swprof10, uint8_t* swprof9, uint8_t* swprof8, uint8_t* swprof7, uint8_t* swprof6, uint8_t* swprof5, uint8_t* swprof4, uint8_t* swprof3, uint8_t* swprof2, uint8_t* swprof1, uint8_t* swprof0)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+
+ *swprof31 = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *swprof30 = (localVal & ((uint32_t)0x40000000)) >> 30;
+ *swprof29 = (localVal & ((uint32_t)0x20000000)) >> 29;
+ *swprof28 = (localVal & ((uint32_t)0x10000000)) >> 28;
+ *swprof27 = (localVal & ((uint32_t)0x08000000)) >> 27;
+ *swprof26 = (localVal & ((uint32_t)0x04000000)) >> 26;
+ *swprof25 = (localVal & ((uint32_t)0x02000000)) >> 25;
+ *swprof24 = (localVal & ((uint32_t)0x01000000)) >> 24;
+ *swprof23 = (localVal & ((uint32_t)0x00800000)) >> 23;
+ *swprof22 = (localVal & ((uint32_t)0x00400000)) >> 22;
+ *swprof21 = (localVal & ((uint32_t)0x00200000)) >> 21;
+ *swprof20 = (localVal & ((uint32_t)0x00100000)) >> 20;
+ *swprof19 = (localVal & ((uint32_t)0x00080000)) >> 19;
+ *swprof18 = (localVal & ((uint32_t)0x00040000)) >> 18;
+ *swprof17 = (localVal & ((uint32_t)0x00020000)) >> 17;
+ *swprof16 = (localVal & ((uint32_t)0x00010000)) >> 16;
+ *swprof15 = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *swprof14 = (localVal & ((uint32_t)0x00004000)) >> 14;
+ *swprof13 = (localVal & ((uint32_t)0x00002000)) >> 13;
+ *swprof12 = (localVal & ((uint32_t)0x00001000)) >> 12;
+ *swprof11 = (localVal & ((uint32_t)0x00000800)) >> 11;
+ *swprof10 = (localVal & ((uint32_t)0x00000400)) >> 10;
+ *swprof9 = (localVal & ((uint32_t)0x00000200)) >> 9;
+ *swprof8 = (localVal & ((uint32_t)0x00000100)) >> 8;
+ *swprof7 = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *swprof6 = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *swprof5 = (localVal & ((uint32_t)0x00000020)) >> 5;
+ *swprof4 = (localVal & ((uint32_t)0x00000010)) >> 4;
+ *swprof3 = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *swprof2 = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *swprof1 = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *swprof0 = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_swprofiling_swprof31_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_swprofiling_swprof31_setf(uint8_t swprof31)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof31 << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)swprof31 << 31));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof30_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x40000000)) >> 30);
+}
+
+__INLINE void ble_swprofiling_swprof30_setf(uint8_t swprof30)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof30 << 30) & ~((uint32_t)0x40000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x40000000)) | ((uint32_t)swprof30 << 30));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof29_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x20000000)) >> 29);
+}
+
+__INLINE void ble_swprofiling_swprof29_setf(uint8_t swprof29)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof29 << 29) & ~((uint32_t)0x20000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x20000000)) | ((uint32_t)swprof29 << 29));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof28_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x10000000)) >> 28);
+}
+
+__INLINE void ble_swprofiling_swprof28_setf(uint8_t swprof28)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof28 << 28) & ~((uint32_t)0x10000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x10000000)) | ((uint32_t)swprof28 << 28));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof27_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x08000000)) >> 27);
+}
+
+__INLINE void ble_swprofiling_swprof27_setf(uint8_t swprof27)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof27 << 27) & ~((uint32_t)0x08000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x08000000)) | ((uint32_t)swprof27 << 27));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof26_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x04000000)) >> 26);
+}
+
+__INLINE void ble_swprofiling_swprof26_setf(uint8_t swprof26)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof26 << 26) & ~((uint32_t)0x04000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x04000000)) | ((uint32_t)swprof26 << 26));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof25_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x02000000)) >> 25);
+}
+
+__INLINE void ble_swprofiling_swprof25_setf(uint8_t swprof25)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof25 << 25) & ~((uint32_t)0x02000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x02000000)) | ((uint32_t)swprof25 << 25));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof24_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x01000000)) >> 24);
+}
+
+__INLINE void ble_swprofiling_swprof24_setf(uint8_t swprof24)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof24 << 24) & ~((uint32_t)0x01000000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x01000000)) | ((uint32_t)swprof24 << 24));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof23_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00800000)) >> 23);
+}
+
+__INLINE void ble_swprofiling_swprof23_setf(uint8_t swprof23)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof23 << 23) & ~((uint32_t)0x00800000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00800000)) | ((uint32_t)swprof23 << 23));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof22_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00400000)) >> 22);
+}
+
+__INLINE void ble_swprofiling_swprof22_setf(uint8_t swprof22)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof22 << 22) & ~((uint32_t)0x00400000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00400000)) | ((uint32_t)swprof22 << 22));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof21_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00200000)) >> 21);
+}
+
+__INLINE void ble_swprofiling_swprof21_setf(uint8_t swprof21)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof21 << 21) & ~((uint32_t)0x00200000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00200000)) | ((uint32_t)swprof21 << 21));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof20_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00100000)) >> 20);
+}
+
+__INLINE void ble_swprofiling_swprof20_setf(uint8_t swprof20)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof20 << 20) & ~((uint32_t)0x00100000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00100000)) | ((uint32_t)swprof20 << 20));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof19_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00080000)) >> 19);
+}
+
+__INLINE void ble_swprofiling_swprof19_setf(uint8_t swprof19)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof19 << 19) & ~((uint32_t)0x00080000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00080000)) | ((uint32_t)swprof19 << 19));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof18_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00040000)) >> 18);
+}
+
+__INLINE void ble_swprofiling_swprof18_setf(uint8_t swprof18)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof18 << 18) & ~((uint32_t)0x00040000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00040000)) | ((uint32_t)swprof18 << 18));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof17_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00020000)) >> 17);
+}
+
+__INLINE void ble_swprofiling_swprof17_setf(uint8_t swprof17)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof17 << 17) & ~((uint32_t)0x00020000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00020000)) | ((uint32_t)swprof17 << 17));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof16_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00010000)) >> 16);
+}
+
+__INLINE void ble_swprofiling_swprof16_setf(uint8_t swprof16)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof16 << 16) & ~((uint32_t)0x00010000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00010000)) | ((uint32_t)swprof16 << 16));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof15_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_swprofiling_swprof15_setf(uint8_t swprof15)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof15 << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)swprof15 << 15));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof14_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00004000)) >> 14);
+}
+
+__INLINE void ble_swprofiling_swprof14_setf(uint8_t swprof14)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof14 << 14) & ~((uint32_t)0x00004000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00004000)) | ((uint32_t)swprof14 << 14));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof13_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00002000)) >> 13);
+}
+
+__INLINE void ble_swprofiling_swprof13_setf(uint8_t swprof13)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof13 << 13) & ~((uint32_t)0x00002000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00002000)) | ((uint32_t)swprof13 << 13));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof12_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00001000)) >> 12);
+}
+
+__INLINE void ble_swprofiling_swprof12_setf(uint8_t swprof12)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof12 << 12) & ~((uint32_t)0x00001000)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00001000)) | ((uint32_t)swprof12 << 12));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof11_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000800)) >> 11);
+}
+
+__INLINE void ble_swprofiling_swprof11_setf(uint8_t swprof11)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof11 << 11) & ~((uint32_t)0x00000800)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000800)) | ((uint32_t)swprof11 << 11));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof10_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000400)) >> 10);
+}
+
+__INLINE void ble_swprofiling_swprof10_setf(uint8_t swprof10)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof10 << 10) & ~((uint32_t)0x00000400)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000400)) | ((uint32_t)swprof10 << 10));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof9_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000200)) >> 9);
+}
+
+__INLINE void ble_swprofiling_swprof9_setf(uint8_t swprof9)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof9 << 9) & ~((uint32_t)0x00000200)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000200)) | ((uint32_t)swprof9 << 9));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof8_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000100)) >> 8);
+}
+
+__INLINE void ble_swprofiling_swprof8_setf(uint8_t swprof8)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof8 << 8) & ~((uint32_t)0x00000100)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000100)) | ((uint32_t)swprof8 << 8));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof7_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE void ble_swprofiling_swprof7_setf(uint8_t swprof7)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof7 << 7) & ~((uint32_t)0x00000080)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000080)) | ((uint32_t)swprof7 << 7));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof6_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE void ble_swprofiling_swprof6_setf(uint8_t swprof6)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof6 << 6) & ~((uint32_t)0x00000040)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000040)) | ((uint32_t)swprof6 << 6));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof5_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000020)) >> 5);
+}
+
+__INLINE void ble_swprofiling_swprof5_setf(uint8_t swprof5)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof5 << 5) & ~((uint32_t)0x00000020)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000020)) | ((uint32_t)swprof5 << 5));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof4_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000010)) >> 4);
+}
+
+__INLINE void ble_swprofiling_swprof4_setf(uint8_t swprof4)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof4 << 4) & ~((uint32_t)0x00000010)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000010)) | ((uint32_t)swprof4 << 4));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE void ble_swprofiling_swprof3_setf(uint8_t swprof3)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof3 << 3) & ~((uint32_t)0x00000008)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000008)) | ((uint32_t)swprof3 << 3));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE void ble_swprofiling_swprof2_setf(uint8_t swprof2)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof2 << 2) & ~((uint32_t)0x00000004)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000004)) | ((uint32_t)swprof2 << 2));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_swprofiling_swprof1_setf(uint8_t swprof1)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof1 << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)swprof1 << 1));
+}
+
+__INLINE uint8_t ble_swprofiling_swprof0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SWPROFILING_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_swprofiling_swprof0_setf(uint8_t swprof0)
+{
+ BLE_ASSERT_ERR((((uint32_t)swprof0 << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_SWPROFILING_ADDR, (REG_BLE_RD(BLE_SWPROFILING_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)swprof0 << 0));
+}
+
+/**
+ * @brief RADIOCNTL0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 29:16 SPIPTR 0x0
+ * 07 SPICFG 0
+ * 05:04 SPIFREQ 0x0
+ * 01 SPICOMP 1
+ * 00 SPIGO 0
+ *
+ */
+#define BLE_RADIOCNTL0_ADDR 0x00900870
+#define BLE_RADIOCNTL0_OFFSET 0x00000070
+#define BLE_RADIOCNTL0_INDEX 0x0000001C
+#define BLE_RADIOCNTL0_RESET 0x00000002
+
+__INLINE uint32_t ble_radiocntl0_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+}
+
+__INLINE void ble_radiocntl0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOCNTL0_ADDR, value);
+}
+
+// field definitions
+#define BLE_SPIPTR_MASK ((uint32_t)0x3FFF0000)
+#define BLE_SPIPTR_LSB 16
+#define BLE_SPIPTR_WIDTH ((uint32_t)0x0000000E)
+#define BLE_SPICFG_BIT ((uint32_t)0x00000080)
+#define BLE_SPICFG_POS 7
+#define BLE_SPIFREQ_MASK ((uint32_t)0x00000030)
+#define BLE_SPIFREQ_LSB 4
+#define BLE_SPIFREQ_WIDTH ((uint32_t)0x00000002)
+#define BLE_SPICOMP_BIT ((uint32_t)0x00000002)
+#define BLE_SPICOMP_POS 1
+#define BLE_SPIGO_BIT ((uint32_t)0x00000001)
+#define BLE_SPIGO_POS 0
+
+#define BLE_SPIPTR_RST 0x0
+#define BLE_SPICFG_RST 0x0
+#define BLE_SPIFREQ_RST 0x0
+#define BLE_SPICOMP_RST 0x1
+#define BLE_SPIGO_RST 0x0
+
+__INLINE void ble_radiocntl0_pack(uint16_t spiptr, uint8_t spicfg, uint8_t spifreq, uint8_t spigo)
+{
+ BLE_ASSERT_ERR((((uint32_t)spiptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)spicfg << 7) & ~((uint32_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)spifreq << 4) & ~((uint32_t)0x00000030)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)spigo << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL0_ADDR, ((uint32_t)spiptr << 16) | ((uint32_t)spicfg << 7) | ((uint32_t)spifreq << 4) | ((uint32_t)spigo << 0));
+}
+
+__INLINE void ble_radiocntl0_unpack(uint16_t* spiptr, uint8_t* spicfg, uint8_t* spifreq, uint8_t* spicomp, uint8_t* spigo)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+
+ *spiptr = (localVal & ((uint32_t)0x3FFF0000)) >> 16;
+ *spicfg = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *spifreq = (localVal & ((uint32_t)0x00000030)) >> 4;
+ *spicomp = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *spigo = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint16_t ble_radiocntl0_spiptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x3FFF0000)) >> 16);
+}
+
+__INLINE void ble_radiocntl0_spiptr_setf(uint16_t spiptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)spiptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL0_ADDR, (REG_BLE_RD(BLE_RADIOCNTL0_ADDR) & ~((uint32_t)0x3FFF0000)) | ((uint32_t)spiptr << 16));
+}
+
+__INLINE uint8_t ble_radiocntl0_spicfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE void ble_radiocntl0_spicfg_setf(uint8_t spicfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)spicfg << 7) & ~((uint32_t)0x00000080)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL0_ADDR, (REG_BLE_RD(BLE_RADIOCNTL0_ADDR) & ~((uint32_t)0x00000080)) | ((uint32_t)spicfg << 7));
+}
+
+__INLINE uint8_t ble_radiocntl0_spifreq_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000030)) >> 4);
+}
+
+__INLINE void ble_radiocntl0_spifreq_setf(uint8_t spifreq)
+{
+ BLE_ASSERT_ERR((((uint32_t)spifreq << 4) & ~((uint32_t)0x00000030)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL0_ADDR, (REG_BLE_RD(BLE_RADIOCNTL0_ADDR) & ~((uint32_t)0x00000030)) | ((uint32_t)spifreq << 4));
+}
+
+__INLINE uint8_t ble_radiocntl0_spicomp_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE uint8_t ble_radiocntl0_spigo_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_radiocntl0_spigo_setf(uint8_t spigo)
+{
+ BLE_ASSERT_ERR((((uint32_t)spigo << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL0_ADDR, (REG_BLE_RD(BLE_RADIOCNTL0_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)spigo << 0));
+}
+
+/**
+ * @brief RADIOCNTL1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 FORCEAGC_EN 0
+ * 30 FORCEIQ 0
+ * 29 RXDNSL 0
+ * 28 TXDNSL 0
+ * 27:16 FORCEAGC_LENGTH 0x0
+ * 15 SYNC_PULSE_MODE 0
+ * 14 SYNC_PULSE_SRC 0
+ * 13 DPCORR_EN 0
+ * 12 JEF_SELECT 0
+ * 09:04 XRFSEL 0x0
+ * 03:00 SUBVERSION 0x0
+ *
+ */
+#define BLE_RADIOCNTL1_ADDR 0x00900874
+#define BLE_RADIOCNTL1_OFFSET 0x00000074
+#define BLE_RADIOCNTL1_INDEX 0x0000001D
+#define BLE_RADIOCNTL1_RESET 0x00000000
+
+__INLINE uint32_t ble_radiocntl1_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+}
+
+__INLINE void ble_radiocntl1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, value);
+}
+
+// field definitions
+#define BLE_FORCEAGC_EN_BIT ((uint32_t)0x80000000)
+#define BLE_FORCEAGC_EN_POS 31
+#define BLE_FORCEIQ_BIT ((uint32_t)0x40000000)
+#define BLE_FORCEIQ_POS 30
+#define BLE_RXDNSL_BIT ((uint32_t)0x20000000)
+#define BLE_RXDNSL_POS 29
+#define BLE_TXDNSL_BIT ((uint32_t)0x10000000)
+#define BLE_TXDNSL_POS 28
+#define BLE_FORCEAGC_LENGTH_MASK ((uint32_t)0x0FFF0000)
+#define BLE_FORCEAGC_LENGTH_LSB 16
+#define BLE_FORCEAGC_LENGTH_WIDTH ((uint32_t)0x0000000C)
+#define BLE_SYNC_PULSE_MODE_BIT ((uint32_t)0x00008000)
+#define BLE_SYNC_PULSE_MODE_POS 15
+#define BLE_SYNC_PULSE_SRC_BIT ((uint32_t)0x00004000)
+#define BLE_SYNC_PULSE_SRC_POS 14
+#define BLE_DPCORR_EN_BIT ((uint32_t)0x00002000)
+#define BLE_DPCORR_EN_POS 13
+#define BLE_JEF_SELECT_BIT ((uint32_t)0x00001000)
+#define BLE_JEF_SELECT_POS 12
+#define BLE_XRFSEL_MASK ((uint32_t)0x000003F0)
+#define BLE_XRFSEL_LSB 4
+#define BLE_XRFSEL_WIDTH ((uint32_t)0x00000006)
+#define BLE_SUBVERSION_MASK ((uint32_t)0x0000000F)
+#define BLE_SUBVERSION_LSB 0
+#define BLE_SUBVERSION_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_FORCEAGC_EN_RST 0x0
+#define BLE_FORCEIQ_RST 0x0
+#define BLE_RXDNSL_RST 0x0
+#define BLE_TXDNSL_RST 0x0
+#define BLE_FORCEAGC_LENGTH_RST 0x0
+#define BLE_SYNC_PULSE_MODE_RST 0x0
+#define BLE_SYNC_PULSE_SRC_RST 0x0
+#define BLE_DPCORR_EN_RST 0x0
+#define BLE_JEF_SELECT_RST 0x0
+#define BLE_XRFSEL_RST 0x0
+#define BLE_SUBVERSION_RST 0x0
+
+__INLINE void ble_radiocntl1_pack(uint8_t forceagcen, uint8_t forceiq, uint8_t rxdnsl, uint8_t txdnsl, uint16_t forceagclength, uint8_t syncpulsemode, uint8_t syncpulsesrc, uint8_t dpcorren, uint8_t jefselect, uint8_t xrfsel, uint8_t subversion)
+{
+ BLE_ASSERT_ERR((((uint32_t)forceagcen << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)forceiq << 30) & ~((uint32_t)0x40000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxdnsl << 29) & ~((uint32_t)0x20000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txdnsl << 28) & ~((uint32_t)0x10000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)forceagclength << 16) & ~((uint32_t)0x0FFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)syncpulsemode << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)syncpulsesrc << 14) & ~((uint32_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)dpcorren << 13) & ~((uint32_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)jefselect << 12) & ~((uint32_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)xrfsel << 4) & ~((uint32_t)0x000003F0)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)subversion << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, ((uint32_t)forceagcen << 31) | ((uint32_t)forceiq << 30) | ((uint32_t)rxdnsl << 29) | ((uint32_t)txdnsl << 28) | ((uint32_t)forceagclength << 16) | ((uint32_t)syncpulsemode << 15) | ((uint32_t)syncpulsesrc << 14) | ((uint32_t)dpcorren << 13) | ((uint32_t)jefselect << 12) | ((uint32_t)xrfsel << 4) | ((uint32_t)subversion << 0));
+}
+
+__INLINE void ble_radiocntl1_unpack(uint8_t* forceagcen, uint8_t* forceiq, uint8_t* rxdnsl, uint8_t* txdnsl, uint16_t* forceagclength, uint8_t* syncpulsemode, uint8_t* syncpulsesrc, uint8_t* dpcorren, uint8_t* jefselect, uint8_t* xrfsel, uint8_t* subversion)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+
+ *forceagcen = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *forceiq = (localVal & ((uint32_t)0x40000000)) >> 30;
+ *rxdnsl = (localVal & ((uint32_t)0x20000000)) >> 29;
+ *txdnsl = (localVal & ((uint32_t)0x10000000)) >> 28;
+ *forceagclength = (localVal & ((uint32_t)0x0FFF0000)) >> 16;
+ *syncpulsemode = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *syncpulsesrc = (localVal & ((uint32_t)0x00004000)) >> 14;
+ *dpcorren = (localVal & ((uint32_t)0x00002000)) >> 13;
+ *jefselect = (localVal & ((uint32_t)0x00001000)) >> 12;
+ *xrfsel = (localVal & ((uint32_t)0x000003F0)) >> 4;
+ *subversion = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_radiocntl1_forceagc_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_radiocntl1_forceagc_en_setf(uint8_t forceagcen)
+{
+ BLE_ASSERT_ERR((((uint32_t)forceagcen << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)forceagcen << 31));
+}
+
+__INLINE uint8_t ble_radiocntl1_forceiq_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x40000000)) >> 30);
+}
+
+__INLINE void ble_radiocntl1_forceiq_setf(uint8_t forceiq)
+{
+ BLE_ASSERT_ERR((((uint32_t)forceiq << 30) & ~((uint32_t)0x40000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x40000000)) | ((uint32_t)forceiq << 30));
+}
+
+__INLINE uint8_t ble_radiocntl1_rxdnsl_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x20000000)) >> 29);
+}
+
+__INLINE void ble_radiocntl1_rxdnsl_setf(uint8_t rxdnsl)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxdnsl << 29) & ~((uint32_t)0x20000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x20000000)) | ((uint32_t)rxdnsl << 29));
+}
+
+__INLINE uint8_t ble_radiocntl1_txdnsl_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x10000000)) >> 28);
+}
+
+__INLINE void ble_radiocntl1_txdnsl_setf(uint8_t txdnsl)
+{
+ BLE_ASSERT_ERR((((uint32_t)txdnsl << 28) & ~((uint32_t)0x10000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x10000000)) | ((uint32_t)txdnsl << 28));
+}
+
+__INLINE uint16_t ble_radiocntl1_forceagc_length_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x0FFF0000)) >> 16);
+}
+
+__INLINE void ble_radiocntl1_forceagc_length_setf(uint16_t forceagclength)
+{
+ BLE_ASSERT_ERR((((uint32_t)forceagclength << 16) & ~((uint32_t)0x0FFF0000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x0FFF0000)) | ((uint32_t)forceagclength << 16));
+}
+
+__INLINE uint8_t ble_radiocntl1_sync_pulse_mode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_radiocntl1_sync_pulse_mode_setf(uint8_t syncpulsemode)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncpulsemode << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)syncpulsemode << 15));
+}
+
+__INLINE uint8_t ble_radiocntl1_sync_pulse_src_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00004000)) >> 14);
+}
+
+__INLINE void ble_radiocntl1_sync_pulse_src_setf(uint8_t syncpulsesrc)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncpulsesrc << 14) & ~((uint32_t)0x00004000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x00004000)) | ((uint32_t)syncpulsesrc << 14));
+}
+
+__INLINE uint8_t ble_radiocntl1_dpcorr_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00002000)) >> 13);
+}
+
+__INLINE void ble_radiocntl1_dpcorr_en_setf(uint8_t dpcorren)
+{
+ BLE_ASSERT_ERR((((uint32_t)dpcorren << 13) & ~((uint32_t)0x00002000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x00002000)) | ((uint32_t)dpcorren << 13));
+}
+
+__INLINE uint8_t ble_radiocntl1_jef_select_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00001000)) >> 12);
+}
+
+__INLINE void ble_radiocntl1_jef_select_setf(uint8_t jefselect)
+{
+ BLE_ASSERT_ERR((((uint32_t)jefselect << 12) & ~((uint32_t)0x00001000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x00001000)) | ((uint32_t)jefselect << 12));
+}
+
+__INLINE uint8_t ble_radiocntl1_xrfsel_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x000003F0)) >> 4);
+}
+
+__INLINE void ble_radiocntl1_xrfsel_setf(uint8_t xrfsel)
+{
+ BLE_ASSERT_ERR((((uint32_t)xrfsel << 4) & ~((uint32_t)0x000003F0)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x000003F0)) | ((uint32_t)xrfsel << 4));
+}
+
+__INLINE uint8_t ble_radiocntl1_subversion_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_radiocntl1_subversion_setf(uint8_t subversion)
+{
+ BLE_ASSERT_ERR((((uint32_t)subversion << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL1_ADDR, (REG_BLE_RD(BLE_RADIOCNTL1_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)subversion << 0));
+}
+
+/**
+ * @brief RADIOCNTL2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:30 LRSYNCCOMPMODE 0x3
+ * 29 RXCITERMBYPASS 0
+ * 28:24 LRVTBFLUSH 0x8
+ * 23:22 PHYMSK 0x0
+ * 21:20 LRSYNCERR 0x0
+ * 18:16 SYNCERR 0x0
+ * 13:00 FREQTABLE_PTR 0x40
+ *
+ */
+#define BLE_RADIOCNTL2_ADDR 0x00900878
+#define BLE_RADIOCNTL2_OFFSET 0x00000078
+#define BLE_RADIOCNTL2_INDEX 0x0000001E
+#define BLE_RADIOCNTL2_RESET 0xC8000040
+
+__INLINE uint32_t ble_radiocntl2_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+}
+
+__INLINE void ble_radiocntl2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, value);
+}
+
+// field definitions
+#define BLE_LRSYNCCOMPMODE_MASK ((uint32_t)0xC0000000)
+#define BLE_LRSYNCCOMPMODE_LSB 30
+#define BLE_LRSYNCCOMPMODE_WIDTH ((uint32_t)0x00000002)
+#define BLE_RXCITERMBYPASS_BIT ((uint32_t)0x20000000)
+#define BLE_RXCITERMBYPASS_POS 29
+#define BLE_LRVTBFLUSH_MASK ((uint32_t)0x1F000000)
+#define BLE_LRVTBFLUSH_LSB 24
+#define BLE_LRVTBFLUSH_WIDTH ((uint32_t)0x00000005)
+#define BLE_PHYMSK_MASK ((uint32_t)0x00C00000)
+#define BLE_PHYMSK_LSB 22
+#define BLE_PHYMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_LRSYNCERR_MASK ((uint32_t)0x00300000)
+#define BLE_LRSYNCERR_LSB 20
+#define BLE_LRSYNCERR_WIDTH ((uint32_t)0x00000002)
+#define BLE_SYNCERR_MASK ((uint32_t)0x00070000)
+#define BLE_SYNCERR_LSB 16
+#define BLE_SYNCERR_WIDTH ((uint32_t)0x00000003)
+#define BLE_FREQTABLE_PTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_FREQTABLE_PTR_LSB 0
+#define BLE_FREQTABLE_PTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_LRSYNCCOMPMODE_RST 0x3
+#define BLE_RXCITERMBYPASS_RST 0x0
+#define BLE_LRVTBFLUSH_RST 0x8
+#define BLE_PHYMSK_RST 0x0
+#define BLE_LRSYNCERR_RST 0x0
+#define BLE_SYNCERR_RST 0x0
+#define BLE_FREQTABLE_PTR_RST 0x40
+
+__INLINE void ble_radiocntl2_pack(uint8_t lrsynccompmode, uint8_t rxcitermbypass, uint8_t lrvtbflush, uint8_t phymsk, uint8_t lrsyncerr, uint8_t syncerr, uint16_t freqtableptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrsynccompmode << 30) & ~((uint32_t)0xC0000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxcitermbypass << 29) & ~((uint32_t)0x20000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)lrvtbflush << 24) & ~((uint32_t)0x1F000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)phymsk << 22) & ~((uint32_t)0x00C00000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)lrsyncerr << 20) & ~((uint32_t)0x00300000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)syncerr << 16) & ~((uint32_t)0x00070000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)freqtableptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, ((uint32_t)lrsynccompmode << 30) | ((uint32_t)rxcitermbypass << 29) | ((uint32_t)lrvtbflush << 24) | ((uint32_t)phymsk << 22) | ((uint32_t)lrsyncerr << 20) | ((uint32_t)syncerr << 16) | ((uint32_t)freqtableptr << 0));
+}
+
+__INLINE void ble_radiocntl2_unpack(uint8_t* lrsynccompmode, uint8_t* rxcitermbypass, uint8_t* lrvtbflush, uint8_t* phymsk, uint8_t* lrsyncerr, uint8_t* syncerr, uint16_t* freqtableptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+
+ *lrsynccompmode = (localVal & ((uint32_t)0xC0000000)) >> 30;
+ *rxcitermbypass = (localVal & ((uint32_t)0x20000000)) >> 29;
+ *lrvtbflush = (localVal & ((uint32_t)0x1F000000)) >> 24;
+ *phymsk = (localVal & ((uint32_t)0x00C00000)) >> 22;
+ *lrsyncerr = (localVal & ((uint32_t)0x00300000)) >> 20;
+ *syncerr = (localVal & ((uint32_t)0x00070000)) >> 16;
+ *freqtableptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t ble_radiocntl2_lrsynccompmode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0xC0000000)) >> 30);
+}
+
+__INLINE void ble_radiocntl2_lrsynccompmode_setf(uint8_t lrsynccompmode)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrsynccompmode << 30) & ~((uint32_t)0xC0000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0xC0000000)) | ((uint32_t)lrsynccompmode << 30));
+}
+
+__INLINE uint8_t ble_radiocntl2_rxcitermbypass_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x20000000)) >> 29);
+}
+
+__INLINE void ble_radiocntl2_rxcitermbypass_setf(uint8_t rxcitermbypass)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxcitermbypass << 29) & ~((uint32_t)0x20000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0x20000000)) | ((uint32_t)rxcitermbypass << 29));
+}
+
+__INLINE uint8_t ble_radiocntl2_lrvtbflush_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x1F000000)) >> 24);
+}
+
+__INLINE void ble_radiocntl2_lrvtbflush_setf(uint8_t lrvtbflush)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrvtbflush << 24) & ~((uint32_t)0x1F000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0x1F000000)) | ((uint32_t)lrvtbflush << 24));
+}
+
+__INLINE uint8_t ble_radiocntl2_phymsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x00C00000)) >> 22);
+}
+
+__INLINE void ble_radiocntl2_phymsk_setf(uint8_t phymsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)phymsk << 22) & ~((uint32_t)0x00C00000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0x00C00000)) | ((uint32_t)phymsk << 22));
+}
+
+__INLINE uint8_t ble_radiocntl2_lrsyncerr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x00300000)) >> 20);
+}
+
+__INLINE void ble_radiocntl2_lrsyncerr_setf(uint8_t lrsyncerr)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrsyncerr << 20) & ~((uint32_t)0x00300000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0x00300000)) | ((uint32_t)lrsyncerr << 20));
+}
+
+__INLINE uint8_t ble_radiocntl2_syncerr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x00070000)) >> 16);
+}
+
+__INLINE void ble_radiocntl2_syncerr_setf(uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncerr << 16) & ~((uint32_t)0x00070000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0x00070000)) | ((uint32_t)syncerr << 16));
+}
+
+__INLINE uint16_t ble_radiocntl2_freqtable_ptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_radiocntl2_freqtable_ptr_setf(uint16_t freqtableptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)freqtableptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL2_ADDR, (REG_BLE_RD(BLE_RADIOCNTL2_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)freqtableptr << 0));
+}
+
+/**
+ * @brief RADIOCNTL3 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:30 RXRATE3CFG 0x3
+ * 29:28 RXRATE2CFG 0x2
+ * 27:26 RXRATE1CFG 0x1
+ * 25:24 RXRATE0CFG 0x0
+ * 22:20 GETRSSIDELAY 0x4
+ * 18 RXSYNC_ROUTING 0
+ * 17:16 RXVALID_BEH 0x0
+ * 15:14 TXRATE3CFG 0x3
+ * 13:12 TXRATE2CFG 0x2
+ * 11:10 TXRATE1CFG 0x1
+ * 09:08 TXRATE0CFG 0x0
+ * 01:00 TXVALID_BEH 0x0
+ *
+ */
+#define BLE_RADIOCNTL3_ADDR 0x0090087C
+#define BLE_RADIOCNTL3_OFFSET 0x0000007C
+#define BLE_RADIOCNTL3_INDEX 0x0000001F
+#define BLE_RADIOCNTL3_RESET 0xE440E400
+
+__INLINE uint32_t ble_radiocntl3_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+}
+
+__INLINE void ble_radiocntl3_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXRATE3CFG_MASK ((uint32_t)0xC0000000)
+#define BLE_RXRATE3CFG_LSB 30
+#define BLE_RXRATE3CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_RXRATE2CFG_MASK ((uint32_t)0x30000000)
+#define BLE_RXRATE2CFG_LSB 28
+#define BLE_RXRATE2CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_RXRATE1CFG_MASK ((uint32_t)0x0C000000)
+#define BLE_RXRATE1CFG_LSB 26
+#define BLE_RXRATE1CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_RXRATE0CFG_MASK ((uint32_t)0x03000000)
+#define BLE_RXRATE0CFG_LSB 24
+#define BLE_RXRATE0CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_GETRSSIDELAY_MASK ((uint32_t)0x00700000)
+#define BLE_GETRSSIDELAY_LSB 20
+#define BLE_GETRSSIDELAY_WIDTH ((uint32_t)0x00000003)
+#define BLE_RXSYNC_ROUTING_BIT ((uint32_t)0x00040000)
+#define BLE_RXSYNC_ROUTING_POS 18
+#define BLE_RXVALID_BEH_MASK ((uint32_t)0x00030000)
+#define BLE_RXVALID_BEH_LSB 16
+#define BLE_RXVALID_BEH_WIDTH ((uint32_t)0x00000002)
+#define BLE_TXRATE3CFG_MASK ((uint32_t)0x0000C000)
+#define BLE_TXRATE3CFG_LSB 14
+#define BLE_TXRATE3CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_TXRATE2CFG_MASK ((uint32_t)0x00003000)
+#define BLE_TXRATE2CFG_LSB 12
+#define BLE_TXRATE2CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_TXRATE1CFG_MASK ((uint32_t)0x00000C00)
+#define BLE_TXRATE1CFG_LSB 10
+#define BLE_TXRATE1CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_TXRATE0CFG_MASK ((uint32_t)0x00000300)
+#define BLE_TXRATE0CFG_LSB 8
+#define BLE_TXRATE0CFG_WIDTH ((uint32_t)0x00000002)
+#define BLE_TXVALID_BEH_MASK ((uint32_t)0x00000003)
+#define BLE_TXVALID_BEH_LSB 0
+#define BLE_TXVALID_BEH_WIDTH ((uint32_t)0x00000002)
+
+#define BLE_RXRATE3CFG_RST 0x3
+#define BLE_RXRATE2CFG_RST 0x2
+#define BLE_RXRATE1CFG_RST 0x1
+#define BLE_RXRATE0CFG_RST 0x0
+#define BLE_GETRSSIDELAY_RST 0x4
+#define BLE_RXSYNC_ROUTING_RST 0x0
+#define BLE_RXVALID_BEH_RST 0x0
+#define BLE_TXRATE3CFG_RST 0x3
+#define BLE_TXRATE2CFG_RST 0x2
+#define BLE_TXRATE1CFG_RST 0x1
+#define BLE_TXRATE0CFG_RST 0x0
+#define BLE_TXVALID_BEH_RST 0x0
+
+__INLINE void ble_radiocntl3_pack(uint8_t rxrate3cfg, uint8_t rxrate2cfg, uint8_t rxrate1cfg, uint8_t rxrate0cfg, uint8_t getrssidelay, uint8_t rxsyncrouting, uint8_t rxvalidbeh, uint8_t txrate3cfg, uint8_t txrate2cfg, uint8_t txrate1cfg, uint8_t txrate0cfg, uint8_t txvalidbeh)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxrate3cfg << 30) & ~((uint32_t)0xC0000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxrate2cfg << 28) & ~((uint32_t)0x30000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxrate1cfg << 26) & ~((uint32_t)0x0C000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxrate0cfg << 24) & ~((uint32_t)0x03000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)getrssidelay << 20) & ~((uint32_t)0x00700000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxsyncrouting << 18) & ~((uint32_t)0x00040000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxvalidbeh << 16) & ~((uint32_t)0x00030000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txrate3cfg << 14) & ~((uint32_t)0x0000C000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txrate2cfg << 12) & ~((uint32_t)0x00003000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txrate1cfg << 10) & ~((uint32_t)0x00000C00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txrate0cfg << 8) & ~((uint32_t)0x00000300)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txvalidbeh << 0) & ~((uint32_t)0x00000003)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, ((uint32_t)rxrate3cfg << 30) | ((uint32_t)rxrate2cfg << 28) | ((uint32_t)rxrate1cfg << 26) | ((uint32_t)rxrate0cfg << 24) | ((uint32_t)getrssidelay << 20) | ((uint32_t)rxsyncrouting << 18) | ((uint32_t)rxvalidbeh << 16) | ((uint32_t)txrate3cfg << 14) | ((uint32_t)txrate2cfg << 12) | ((uint32_t)txrate1cfg << 10) | ((uint32_t)txrate0cfg << 8) | ((uint32_t)txvalidbeh << 0));
+}
+
+__INLINE void ble_radiocntl3_unpack(uint8_t* rxrate3cfg, uint8_t* rxrate2cfg, uint8_t* rxrate1cfg, uint8_t* rxrate0cfg, uint8_t* getrssidelay, uint8_t* rxsyncrouting, uint8_t* rxvalidbeh, uint8_t* txrate3cfg, uint8_t* txrate2cfg, uint8_t* txrate1cfg, uint8_t* txrate0cfg, uint8_t* txvalidbeh)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+
+ *rxrate3cfg = (localVal & ((uint32_t)0xC0000000)) >> 30;
+ *rxrate2cfg = (localVal & ((uint32_t)0x30000000)) >> 28;
+ *rxrate1cfg = (localVal & ((uint32_t)0x0C000000)) >> 26;
+ *rxrate0cfg = (localVal & ((uint32_t)0x03000000)) >> 24;
+ *getrssidelay = (localVal & ((uint32_t)0x00700000)) >> 20;
+ *rxsyncrouting = (localVal & ((uint32_t)0x00040000)) >> 18;
+ *rxvalidbeh = (localVal & ((uint32_t)0x00030000)) >> 16;
+ *txrate3cfg = (localVal & ((uint32_t)0x0000C000)) >> 14;
+ *txrate2cfg = (localVal & ((uint32_t)0x00003000)) >> 12;
+ *txrate1cfg = (localVal & ((uint32_t)0x00000C00)) >> 10;
+ *txrate0cfg = (localVal & ((uint32_t)0x00000300)) >> 8;
+ *txvalidbeh = (localVal & ((uint32_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t ble_radiocntl3_rxrate3cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0xC0000000)) >> 30);
+}
+
+__INLINE void ble_radiocntl3_rxrate3cfg_setf(uint8_t rxrate3cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxrate3cfg << 30) & ~((uint32_t)0xC0000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0xC0000000)) | ((uint32_t)rxrate3cfg << 30));
+}
+
+__INLINE uint8_t ble_radiocntl3_rxrate2cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x30000000)) >> 28);
+}
+
+__INLINE void ble_radiocntl3_rxrate2cfg_setf(uint8_t rxrate2cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxrate2cfg << 28) & ~((uint32_t)0x30000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x30000000)) | ((uint32_t)rxrate2cfg << 28));
+}
+
+__INLINE uint8_t ble_radiocntl3_rxrate1cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x0C000000)) >> 26);
+}
+
+__INLINE void ble_radiocntl3_rxrate1cfg_setf(uint8_t rxrate1cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxrate1cfg << 26) & ~((uint32_t)0x0C000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x0C000000)) | ((uint32_t)rxrate1cfg << 26));
+}
+
+__INLINE uint8_t ble_radiocntl3_rxrate0cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x03000000)) >> 24);
+}
+
+__INLINE void ble_radiocntl3_rxrate0cfg_setf(uint8_t rxrate0cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxrate0cfg << 24) & ~((uint32_t)0x03000000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x03000000)) | ((uint32_t)rxrate0cfg << 24));
+}
+
+__INLINE uint8_t ble_radiocntl3_getrssidelay_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00700000)) >> 20);
+}
+
+__INLINE void ble_radiocntl3_getrssidelay_setf(uint8_t getrssidelay)
+{
+ BLE_ASSERT_ERR((((uint32_t)getrssidelay << 20) & ~((uint32_t)0x00700000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00700000)) | ((uint32_t)getrssidelay << 20));
+}
+
+__INLINE uint8_t ble_radiocntl3_rxsync_routing_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00040000)) >> 18);
+}
+
+__INLINE void ble_radiocntl3_rxsync_routing_setf(uint8_t rxsyncrouting)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsyncrouting << 18) & ~((uint32_t)0x00040000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00040000)) | ((uint32_t)rxsyncrouting << 18));
+}
+
+__INLINE uint8_t ble_radiocntl3_rxvalid_beh_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00030000)) >> 16);
+}
+
+__INLINE void ble_radiocntl3_rxvalid_beh_setf(uint8_t rxvalidbeh)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxvalidbeh << 16) & ~((uint32_t)0x00030000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00030000)) | ((uint32_t)rxvalidbeh << 16));
+}
+
+__INLINE uint8_t ble_radiocntl3_txrate3cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x0000C000)) >> 14);
+}
+
+__INLINE void ble_radiocntl3_txrate3cfg_setf(uint8_t txrate3cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)txrate3cfg << 14) & ~((uint32_t)0x0000C000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x0000C000)) | ((uint32_t)txrate3cfg << 14));
+}
+
+__INLINE uint8_t ble_radiocntl3_txrate2cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00003000)) >> 12);
+}
+
+__INLINE void ble_radiocntl3_txrate2cfg_setf(uint8_t txrate2cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)txrate2cfg << 12) & ~((uint32_t)0x00003000)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00003000)) | ((uint32_t)txrate2cfg << 12));
+}
+
+__INLINE uint8_t ble_radiocntl3_txrate1cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00000C00)) >> 10);
+}
+
+__INLINE void ble_radiocntl3_txrate1cfg_setf(uint8_t txrate1cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)txrate1cfg << 10) & ~((uint32_t)0x00000C00)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00000C00)) | ((uint32_t)txrate1cfg << 10));
+}
+
+__INLINE uint8_t ble_radiocntl3_txrate0cfg_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00000300)) >> 8);
+}
+
+__INLINE void ble_radiocntl3_txrate0cfg_setf(uint8_t txrate0cfg)
+{
+ BLE_ASSERT_ERR((((uint32_t)txrate0cfg << 8) & ~((uint32_t)0x00000300)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00000300)) | ((uint32_t)txrate0cfg << 8));
+}
+
+__INLINE uint8_t ble_radiocntl3_txvalid_beh_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00000003)) >> 0);
+}
+
+__INLINE void ble_radiocntl3_txvalid_beh_setf(uint8_t txvalidbeh)
+{
+ BLE_ASSERT_ERR((((uint32_t)txvalidbeh << 0) & ~((uint32_t)0x00000003)) == 0);
+ REG_BLE_WR(BLE_RADIOCNTL3_ADDR, (REG_BLE_RD(BLE_RADIOCNTL3_ADDR) & ~((uint32_t)0x00000003)) | ((uint32_t)txvalidbeh << 0));
+}
+
+/**
+ * @brief RADIOPWRUPDN0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 SYNC_POSITION0 0x0
+ * 23:16 RXPWRUP0 0x0
+ * 14:08 TXPWRDN0 0x0
+ * 07:00 TXPWRUP0 0x0
+ *
+ */
+#define BLE_RADIOPWRUPDN0_ADDR 0x00900880
+#define BLE_RADIOPWRUPDN0_OFFSET 0x00000080
+#define BLE_RADIOPWRUPDN0_INDEX 0x00000020
+#define BLE_RADIOPWRUPDN0_RESET 0x00000000
+
+__INLINE uint32_t ble_radiopwrupdn0_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR);
+}
+
+__INLINE void ble_radiopwrupdn0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOPWRUPDN0_ADDR, value);
+}
+
+// field definitions
+#define BLE_SYNC_POSITION0_MASK ((uint32_t)0xFF000000)
+#define BLE_SYNC_POSITION0_LSB 24
+#define BLE_SYNC_POSITION0_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXPWRUP0_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXPWRUP0_LSB 16
+#define BLE_RXPWRUP0_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXPWRDN0_MASK ((uint32_t)0x00007F00)
+#define BLE_TXPWRDN0_LSB 8
+#define BLE_TXPWRDN0_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPWRUP0_MASK ((uint32_t)0x000000FF)
+#define BLE_TXPWRUP0_LSB 0
+#define BLE_TXPWRUP0_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_SYNC_POSITION0_RST 0x0
+#define BLE_RXPWRUP0_RST 0x0
+#define BLE_TXPWRDN0_RST 0x0
+#define BLE_TXPWRUP0_RST 0x0
+
+__INLINE void ble_radiopwrupdn0_pack(uint8_t syncposition0, uint8_t rxpwrup0, uint8_t txpwrdn0, uint8_t txpwrup0)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncposition0 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpwrup0 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn0 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrup0 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN0_ADDR, ((uint32_t)syncposition0 << 24) | ((uint32_t)rxpwrup0 << 16) | ((uint32_t)txpwrdn0 << 8) | ((uint32_t)txpwrup0 << 0));
+}
+
+__INLINE void ble_radiopwrupdn0_unpack(uint8_t* syncposition0, uint8_t* rxpwrup0, uint8_t* txpwrdn0, uint8_t* txpwrup0)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR);
+
+ *syncposition0 = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxpwrup0 = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txpwrdn0 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txpwrup0 = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_radiopwrupdn0_sync_position0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_radiopwrupdn0_sync_position0_setf(uint8_t syncposition0)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncposition0 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN0_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)syncposition0 << 24));
+}
+
+__INLINE uint8_t ble_radiopwrupdn0_rxpwrup0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_radiopwrupdn0_rxpwrup0_setf(uint8_t rxpwrup0)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpwrup0 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN0_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxpwrup0 << 16));
+}
+
+__INLINE uint8_t ble_radiopwrupdn0_txpwrdn0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_radiopwrupdn0_txpwrdn0_setf(uint8_t txpwrdn0)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn0 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN0_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)txpwrdn0 << 8));
+}
+
+__INLINE uint8_t ble_radiopwrupdn0_txpwrup0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_radiopwrupdn0_txpwrup0_setf(uint8_t txpwrup0)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrup0 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN0_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN0_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txpwrup0 << 0));
+}
+
+/**
+ * @brief RADIOPWRUPDN1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 SYNC_POSITION1 0x0
+ * 23:16 RXPWRUP1 0x0
+ * 14:08 TXPWRDN1 0x0
+ * 07:00 TXPWRUP1 0x0
+ *
+ */
+#define BLE_RADIOPWRUPDN1_ADDR 0x00900884
+#define BLE_RADIOPWRUPDN1_OFFSET 0x00000084
+#define BLE_RADIOPWRUPDN1_INDEX 0x00000021
+#define BLE_RADIOPWRUPDN1_RESET 0x00000000
+
+__INLINE uint32_t ble_radiopwrupdn1_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR);
+}
+
+__INLINE void ble_radiopwrupdn1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOPWRUPDN1_ADDR, value);
+}
+
+// field definitions
+#define BLE_SYNC_POSITION1_MASK ((uint32_t)0xFF000000)
+#define BLE_SYNC_POSITION1_LSB 24
+#define BLE_SYNC_POSITION1_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXPWRUP1_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXPWRUP1_LSB 16
+#define BLE_RXPWRUP1_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXPWRDN1_MASK ((uint32_t)0x00007F00)
+#define BLE_TXPWRDN1_LSB 8
+#define BLE_TXPWRDN1_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPWRUP1_MASK ((uint32_t)0x000000FF)
+#define BLE_TXPWRUP1_LSB 0
+#define BLE_TXPWRUP1_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_SYNC_POSITION1_RST 0x0
+#define BLE_RXPWRUP1_RST 0x0
+#define BLE_TXPWRDN1_RST 0x0
+#define BLE_TXPWRUP1_RST 0x0
+
+__INLINE void ble_radiopwrupdn1_pack(uint8_t syncposition1, uint8_t rxpwrup1, uint8_t txpwrdn1, uint8_t txpwrup1)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncposition1 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpwrup1 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn1 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrup1 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN1_ADDR, ((uint32_t)syncposition1 << 24) | ((uint32_t)rxpwrup1 << 16) | ((uint32_t)txpwrdn1 << 8) | ((uint32_t)txpwrup1 << 0));
+}
+
+__INLINE void ble_radiopwrupdn1_unpack(uint8_t* syncposition1, uint8_t* rxpwrup1, uint8_t* txpwrdn1, uint8_t* txpwrup1)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR);
+
+ *syncposition1 = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxpwrup1 = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txpwrdn1 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txpwrup1 = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_radiopwrupdn1_sync_position1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_radiopwrupdn1_sync_position1_setf(uint8_t syncposition1)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncposition1 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN1_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)syncposition1 << 24));
+}
+
+__INLINE uint8_t ble_radiopwrupdn1_rxpwrup1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_radiopwrupdn1_rxpwrup1_setf(uint8_t rxpwrup1)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpwrup1 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN1_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxpwrup1 << 16));
+}
+
+__INLINE uint8_t ble_radiopwrupdn1_txpwrdn1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_radiopwrupdn1_txpwrdn1_setf(uint8_t txpwrdn1)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn1 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN1_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)txpwrdn1 << 8));
+}
+
+__INLINE uint8_t ble_radiopwrupdn1_txpwrup1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_radiopwrupdn1_txpwrup1_setf(uint8_t txpwrup1)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrup1 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN1_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN1_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txpwrup1 << 0));
+}
+
+/**
+ * @brief RADIOPWRUPDN2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 SYNC_POSITION2 0x0
+ * 23:16 RXPWRUP2 0x0
+ * 14:08 TXPWRDN2 0x0
+ * 07:00 TXPWRUP2 0x0
+ *
+ */
+#define BLE_RADIOPWRUPDN2_ADDR 0x00900888
+#define BLE_RADIOPWRUPDN2_OFFSET 0x00000088
+#define BLE_RADIOPWRUPDN2_INDEX 0x00000022
+#define BLE_RADIOPWRUPDN2_RESET 0x00000000
+
+__INLINE uint32_t ble_radiopwrupdn2_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR);
+}
+
+__INLINE void ble_radiopwrupdn2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOPWRUPDN2_ADDR, value);
+}
+
+// field definitions
+#define BLE_SYNC_POSITION2_MASK ((uint32_t)0xFF000000)
+#define BLE_SYNC_POSITION2_LSB 24
+#define BLE_SYNC_POSITION2_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXPWRUP2_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXPWRUP2_LSB 16
+#define BLE_RXPWRUP2_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXPWRDN2_MASK ((uint32_t)0x00007F00)
+#define BLE_TXPWRDN2_LSB 8
+#define BLE_TXPWRDN2_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPWRUP2_MASK ((uint32_t)0x000000FF)
+#define BLE_TXPWRUP2_LSB 0
+#define BLE_TXPWRUP2_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_SYNC_POSITION2_RST 0x0
+#define BLE_RXPWRUP2_RST 0x0
+#define BLE_TXPWRDN2_RST 0x0
+#define BLE_TXPWRUP2_RST 0x0
+
+__INLINE void ble_radiopwrupdn2_pack(uint8_t syncposition2, uint8_t rxpwrup2, uint8_t txpwrdn2, uint8_t txpwrup2)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncposition2 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpwrup2 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn2 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrup2 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN2_ADDR, ((uint32_t)syncposition2 << 24) | ((uint32_t)rxpwrup2 << 16) | ((uint32_t)txpwrdn2 << 8) | ((uint32_t)txpwrup2 << 0));
+}
+
+__INLINE void ble_radiopwrupdn2_unpack(uint8_t* syncposition2, uint8_t* rxpwrup2, uint8_t* txpwrdn2, uint8_t* txpwrup2)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR);
+
+ *syncposition2 = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxpwrup2 = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txpwrdn2 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txpwrup2 = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_radiopwrupdn2_sync_position2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_radiopwrupdn2_sync_position2_setf(uint8_t syncposition2)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncposition2 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN2_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)syncposition2 << 24));
+}
+
+__INLINE uint8_t ble_radiopwrupdn2_rxpwrup2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_radiopwrupdn2_rxpwrup2_setf(uint8_t rxpwrup2)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpwrup2 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN2_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxpwrup2 << 16));
+}
+
+__INLINE uint8_t ble_radiopwrupdn2_txpwrdn2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_radiopwrupdn2_txpwrdn2_setf(uint8_t txpwrdn2)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn2 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN2_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)txpwrdn2 << 8));
+}
+
+__INLINE uint8_t ble_radiopwrupdn2_txpwrup2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_radiopwrupdn2_txpwrup2_setf(uint8_t txpwrup2)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrup2 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN2_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN2_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txpwrup2 << 0));
+}
+
+/**
+ * @brief RADIOPWRUPDN3 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 14:08 TXPWRDN3 0x0
+ * 07:00 TXPWRUP3 0x0
+ *
+ */
+#define BLE_RADIOPWRUPDN3_ADDR 0x0090088C
+#define BLE_RADIOPWRUPDN3_OFFSET 0x0000008C
+#define BLE_RADIOPWRUPDN3_INDEX 0x00000023
+#define BLE_RADIOPWRUPDN3_RESET 0x00000000
+
+__INLINE uint32_t ble_radiopwrupdn3_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOPWRUPDN3_ADDR);
+}
+
+__INLINE void ble_radiopwrupdn3_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOPWRUPDN3_ADDR, value);
+}
+
+// field definitions
+#define BLE_TXPWRDN3_MASK ((uint32_t)0x00007F00)
+#define BLE_TXPWRDN3_LSB 8
+#define BLE_TXPWRDN3_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPWRUP3_MASK ((uint32_t)0x000000FF)
+#define BLE_TXPWRUP3_LSB 0
+#define BLE_TXPWRUP3_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_TXPWRDN3_RST 0x0
+#define BLE_TXPWRUP3_RST 0x0
+
+__INLINE void ble_radiopwrupdn3_pack(uint8_t txpwrdn3, uint8_t txpwrup3)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn3 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpwrup3 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN3_ADDR, ((uint32_t)txpwrdn3 << 8) | ((uint32_t)txpwrup3 << 0));
+}
+
+__INLINE void ble_radiopwrupdn3_unpack(uint8_t* txpwrdn3, uint8_t* txpwrup3)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN3_ADDR);
+
+ *txpwrdn3 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txpwrup3 = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_radiopwrupdn3_txpwrdn3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN3_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_radiopwrupdn3_txpwrdn3_setf(uint8_t txpwrdn3)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrdn3 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN3_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN3_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)txpwrdn3 << 8));
+}
+
+__INLINE uint8_t ble_radiopwrupdn3_txpwrup3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOPWRUPDN3_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_radiopwrupdn3_txpwrup3_setf(uint8_t txpwrup3)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpwrup3 << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RADIOPWRUPDN3_ADDR, (REG_BLE_RD(BLE_RADIOPWRUPDN3_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txpwrup3 << 0));
+}
+
+/**
+ * @brief RADIOTXRXTIM0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 22:16 RFRXTMDA0 0x0
+ * 14:08 RXPATHDLY0 0x0
+ * 06:00 TXPATHDLY0 0x0
+ *
+ */
+#define BLE_RADIOTXRXTIM0_ADDR 0x00900890
+#define BLE_RADIOTXRXTIM0_OFFSET 0x00000090
+#define BLE_RADIOTXRXTIM0_INDEX 0x00000024
+#define BLE_RADIOTXRXTIM0_RESET 0x00000000
+
+__INLINE uint32_t ble_radiotxrxtim0_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR);
+}
+
+__INLINE void ble_radiotxrxtim0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOTXRXTIM0_ADDR, value);
+}
+
+// field definitions
+#define BLE_RFRXTMDA0_MASK ((uint32_t)0x007F0000)
+#define BLE_RFRXTMDA0_LSB 16
+#define BLE_RFRXTMDA0_WIDTH ((uint32_t)0x00000007)
+#define BLE_RXPATHDLY0_MASK ((uint32_t)0x00007F00)
+#define BLE_RXPATHDLY0_LSB 8
+#define BLE_RXPATHDLY0_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPATHDLY0_MASK ((uint32_t)0x0000007F)
+#define BLE_TXPATHDLY0_LSB 0
+#define BLE_TXPATHDLY0_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_RFRXTMDA0_RST 0x0
+#define BLE_RXPATHDLY0_RST 0x0
+#define BLE_TXPATHDLY0_RST 0x0
+
+__INLINE void ble_radiotxrxtim0_pack(uint8_t rfrxtmda0, uint8_t rxpathdly0, uint8_t txpathdly0)
+{
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda0 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpathdly0 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpathdly0 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM0_ADDR, ((uint32_t)rfrxtmda0 << 16) | ((uint32_t)rxpathdly0 << 8) | ((uint32_t)txpathdly0 << 0));
+}
+
+__INLINE void ble_radiotxrxtim0_unpack(uint8_t* rfrxtmda0, uint8_t* rxpathdly0, uint8_t* txpathdly0)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR);
+
+ *rfrxtmda0 = (localVal & ((uint32_t)0x007F0000)) >> 16;
+ *rxpathdly0 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txpathdly0 = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_radiotxrxtim0_rfrxtmda0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR);
+ return ((localVal & ((uint32_t)0x007F0000)) >> 16);
+}
+
+__INLINE void ble_radiotxrxtim0_rfrxtmda0_setf(uint8_t rfrxtmda0)
+{
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda0 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM0_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR) & ~((uint32_t)0x007F0000)) | ((uint32_t)rfrxtmda0 << 16));
+}
+
+__INLINE uint8_t ble_radiotxrxtim0_rxpathdly0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_radiotxrxtim0_rxpathdly0_setf(uint8_t rxpathdly0)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpathdly0 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM0_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)rxpathdly0 << 8));
+}
+
+__INLINE uint8_t ble_radiotxrxtim0_txpathdly0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_radiotxrxtim0_txpathdly0_setf(uint8_t txpathdly0)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpathdly0 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM0_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM0_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)txpathdly0 << 0));
+}
+
+/**
+ * @brief RADIOTXRXTIM1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 22:16 RFRXTMDA1 0x0
+ * 14:08 RXPATHDLY1 0x0
+ * 06:00 TXPATHDLY1 0x0
+ *
+ */
+#define BLE_RADIOTXRXTIM1_ADDR 0x00900894
+#define BLE_RADIOTXRXTIM1_OFFSET 0x00000094
+#define BLE_RADIOTXRXTIM1_INDEX 0x00000025
+#define BLE_RADIOTXRXTIM1_RESET 0x00000000
+
+__INLINE uint32_t ble_radiotxrxtim1_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR);
+}
+
+__INLINE void ble_radiotxrxtim1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOTXRXTIM1_ADDR, value);
+}
+
+// field definitions
+#define BLE_RFRXTMDA1_MASK ((uint32_t)0x007F0000)
+#define BLE_RFRXTMDA1_LSB 16
+#define BLE_RFRXTMDA1_WIDTH ((uint32_t)0x00000007)
+#define BLE_RXPATHDLY1_MASK ((uint32_t)0x00007F00)
+#define BLE_RXPATHDLY1_LSB 8
+#define BLE_RXPATHDLY1_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPATHDLY1_MASK ((uint32_t)0x0000007F)
+#define BLE_TXPATHDLY1_LSB 0
+#define BLE_TXPATHDLY1_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_RFRXTMDA1_RST 0x0
+#define BLE_RXPATHDLY1_RST 0x0
+#define BLE_TXPATHDLY1_RST 0x0
+
+__INLINE void ble_radiotxrxtim1_pack(uint8_t rfrxtmda1, uint8_t rxpathdly1, uint8_t txpathdly1)
+{
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda1 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpathdly1 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpathdly1 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM1_ADDR, ((uint32_t)rfrxtmda1 << 16) | ((uint32_t)rxpathdly1 << 8) | ((uint32_t)txpathdly1 << 0));
+}
+
+__INLINE void ble_radiotxrxtim1_unpack(uint8_t* rfrxtmda1, uint8_t* rxpathdly1, uint8_t* txpathdly1)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR);
+
+ *rfrxtmda1 = (localVal & ((uint32_t)0x007F0000)) >> 16;
+ *rxpathdly1 = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txpathdly1 = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_radiotxrxtim1_rfrxtmda1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR);
+ return ((localVal & ((uint32_t)0x007F0000)) >> 16);
+}
+
+__INLINE void ble_radiotxrxtim1_rfrxtmda1_setf(uint8_t rfrxtmda1)
+{
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda1 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM1_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR) & ~((uint32_t)0x007F0000)) | ((uint32_t)rfrxtmda1 << 16));
+}
+
+__INLINE uint8_t ble_radiotxrxtim1_rxpathdly1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_radiotxrxtim1_rxpathdly1_setf(uint8_t rxpathdly1)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpathdly1 << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM1_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)rxpathdly1 << 8));
+}
+
+__INLINE uint8_t ble_radiotxrxtim1_txpathdly1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_radiotxrxtim1_txpathdly1_setf(uint8_t txpathdly1)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpathdly1 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM1_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM1_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)txpathdly1 << 0));
+}
+
+/**
+ * @brief RADIOTXRXTIM2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 RXFLUSHPATHDLY2 0x0
+ * 23:16 RFRXTMDA2 0x0
+ * 15:08 RXPATHDLY2 0x0
+ * 06:00 TXPATHDLY2 0x0
+ *
+ */
+#define BLE_RADIOTXRXTIM2_ADDR 0x00900898
+#define BLE_RADIOTXRXTIM2_OFFSET 0x00000098
+#define BLE_RADIOTXRXTIM2_INDEX 0x00000026
+#define BLE_RADIOTXRXTIM2_RESET 0x00000000
+
+__INLINE uint32_t ble_radiotxrxtim2_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR);
+}
+
+__INLINE void ble_radiotxrxtim2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOTXRXTIM2_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXFLUSHPATHDLY2_MASK ((uint32_t)0xFF000000)
+#define BLE_RXFLUSHPATHDLY2_LSB 24
+#define BLE_RXFLUSHPATHDLY2_WIDTH ((uint32_t)0x00000008)
+#define BLE_RFRXTMDA2_MASK ((uint32_t)0x00FF0000)
+#define BLE_RFRXTMDA2_LSB 16
+#define BLE_RFRXTMDA2_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXPATHDLY2_MASK ((uint32_t)0x0000FF00)
+#define BLE_RXPATHDLY2_LSB 8
+#define BLE_RXPATHDLY2_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXPATHDLY2_MASK ((uint32_t)0x0000007F)
+#define BLE_TXPATHDLY2_LSB 0
+#define BLE_TXPATHDLY2_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_RXFLUSHPATHDLY2_RST 0x0
+#define BLE_RFRXTMDA2_RST 0x0
+#define BLE_RXPATHDLY2_RST 0x0
+#define BLE_TXPATHDLY2_RST 0x0
+
+__INLINE void ble_radiotxrxtim2_pack(uint8_t rxflushpathdly2, uint8_t rfrxtmda2, uint8_t rxpathdly2, uint8_t txpathdly2)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxflushpathdly2 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda2 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpathdly2 << 8) & ~((uint32_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpathdly2 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM2_ADDR, ((uint32_t)rxflushpathdly2 << 24) | ((uint32_t)rfrxtmda2 << 16) | ((uint32_t)rxpathdly2 << 8) | ((uint32_t)txpathdly2 << 0));
+}
+
+__INLINE void ble_radiotxrxtim2_unpack(uint8_t* rxflushpathdly2, uint8_t* rfrxtmda2, uint8_t* rxpathdly2, uint8_t* txpathdly2)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR);
+
+ *rxflushpathdly2 = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rfrxtmda2 = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *rxpathdly2 = (localVal & ((uint32_t)0x0000FF00)) >> 8;
+ *txpathdly2 = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_radiotxrxtim2_rxflushpathdly2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_radiotxrxtim2_rxflushpathdly2_setf(uint8_t rxflushpathdly2)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxflushpathdly2 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM2_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)rxflushpathdly2 << 24));
+}
+
+__INLINE uint8_t ble_radiotxrxtim2_rfrxtmda2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_radiotxrxtim2_rfrxtmda2_setf(uint8_t rfrxtmda2)
+{
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda2 << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM2_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rfrxtmda2 << 16));
+}
+
+__INLINE uint8_t ble_radiotxrxtim2_rxpathdly2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR);
+ return ((localVal & ((uint32_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void ble_radiotxrxtim2_rxpathdly2_setf(uint8_t rxpathdly2)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpathdly2 << 8) & ~((uint32_t)0x0000FF00)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM2_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR) & ~((uint32_t)0x0000FF00)) | ((uint32_t)rxpathdly2 << 8));
+}
+
+__INLINE uint8_t ble_radiotxrxtim2_txpathdly2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_radiotxrxtim2_txpathdly2_setf(uint8_t txpathdly2)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpathdly2 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM2_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM2_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)txpathdly2 << 0));
+}
+
+/**
+ * @brief RADIOTXRXTIM3 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 RXFLUSHPATHDLY3 0x0
+ * 22:16 RFRXTMDA3 0x0
+ * 06:00 TXPATHDLY3 0x0
+ *
+ */
+#define BLE_RADIOTXRXTIM3_ADDR 0x0090089C
+#define BLE_RADIOTXRXTIM3_OFFSET 0x0000009C
+#define BLE_RADIOTXRXTIM3_INDEX 0x00000027
+#define BLE_RADIOTXRXTIM3_RESET 0x00000000
+
+__INLINE uint32_t ble_radiotxrxtim3_get(void)
+{
+ return REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR);
+}
+
+__INLINE void ble_radiotxrxtim3_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RADIOTXRXTIM3_ADDR, value);
+}
+
+#define BK_BLE_ADDREG0_ADDR 0x00900990
+
+__INLINE uint32_t bk_ble_addtion_reg0_get(void)
+{
+ return REG_BLE_RD(BK_BLE_ADDREG0_ADDR);
+}
+
+__INLINE void bk_ble_addtion_reg0_set(uint32_t value)
+{
+ REG_BLE_WR(BK_BLE_ADDREG0_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXFLUSHPATHDLY3_MASK ((uint32_t)0xFF000000)
+#define BLE_RXFLUSHPATHDLY3_LSB 24
+#define BLE_RXFLUSHPATHDLY3_WIDTH ((uint32_t)0x00000008)
+#define BLE_RFRXTMDA3_MASK ((uint32_t)0x007F0000)
+#define BLE_RFRXTMDA3_LSB 16
+#define BLE_RFRXTMDA3_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPATHDLY3_MASK ((uint32_t)0x0000007F)
+#define BLE_TXPATHDLY3_LSB 0
+#define BLE_TXPATHDLY3_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_RXFLUSHPATHDLY3_RST 0x0
+#define BLE_RFRXTMDA3_RST 0x0
+#define BLE_TXPATHDLY3_RST 0x0
+
+__INLINE void ble_radiotxrxtim3_pack(uint8_t rxflushpathdly3, uint8_t rfrxtmda3, uint8_t txpathdly3)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxflushpathdly3 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda3 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpathdly3 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM3_ADDR, ((uint32_t)rxflushpathdly3 << 24) | ((uint32_t)rfrxtmda3 << 16) | ((uint32_t)txpathdly3 << 0));
+}
+
+__INLINE void ble_radiotxrxtim3_unpack(uint8_t* rxflushpathdly3, uint8_t* rfrxtmda3, uint8_t* txpathdly3)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR);
+
+ *rxflushpathdly3 = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rfrxtmda3 = (localVal & ((uint32_t)0x007F0000)) >> 16;
+ *txpathdly3 = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_radiotxrxtim3_rxflushpathdly3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_radiotxrxtim3_rxflushpathdly3_setf(uint8_t rxflushpathdly3)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxflushpathdly3 << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM3_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)rxflushpathdly3 << 24));
+}
+
+__INLINE uint8_t ble_radiotxrxtim3_rfrxtmda3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR);
+ return ((localVal & ((uint32_t)0x007F0000)) >> 16);
+}
+
+__INLINE void ble_radiotxrxtim3_rfrxtmda3_setf(uint8_t rfrxtmda3)
+{
+ BLE_ASSERT_ERR((((uint32_t)rfrxtmda3 << 16) & ~((uint32_t)0x007F0000)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM3_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR) & ~((uint32_t)0x007F0000)) | ((uint32_t)rfrxtmda3 << 16));
+}
+
+__INLINE uint8_t ble_radiotxrxtim3_txpathdly3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_radiotxrxtim3_txpathdly3_setf(uint8_t txpathdly3)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpathdly3 << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_RADIOTXRXTIM3_ADDR, (REG_BLE_RD(BLE_RADIOTXRXTIM3_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)txpathdly3 << 0));
+}
+
+/**
+ * @brief SPIPTRCNTL0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 29:16 TXOFFPTR 0x0
+ * 13:00 TXONPTR 0x0
+ *
+ */
+#define BLE_SPIPTRCNTL0_ADDR 0x009008A0
+#define BLE_SPIPTRCNTL0_OFFSET 0x000000A0
+#define BLE_SPIPTRCNTL0_INDEX 0x00000028
+#define BLE_SPIPTRCNTL0_RESET 0x00000000
+
+__INLINE uint32_t ble_spiptrcntl0_get(void)
+{
+ return REG_BLE_RD(BLE_SPIPTRCNTL0_ADDR);
+}
+
+__INLINE void ble_spiptrcntl0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SPIPTRCNTL0_ADDR, value);
+}
+
+// field definitions
+#define BLE_TXOFFPTR_MASK ((uint32_t)0x3FFF0000)
+#define BLE_TXOFFPTR_LSB 16
+#define BLE_TXOFFPTR_WIDTH ((uint32_t)0x0000000E)
+#define BLE_TXONPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_TXONPTR_LSB 0
+#define BLE_TXONPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_TXOFFPTR_RST 0x0
+#define BLE_TXONPTR_RST 0x0
+
+__INLINE void ble_spiptrcntl0_pack(uint16_t txoffptr, uint16_t txonptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)txoffptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txonptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL0_ADDR, ((uint32_t)txoffptr << 16) | ((uint32_t)txonptr << 0));
+}
+
+__INLINE void ble_spiptrcntl0_unpack(uint16_t* txoffptr, uint16_t* txonptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL0_ADDR);
+
+ *txoffptr = (localVal & ((uint32_t)0x3FFF0000)) >> 16;
+ *txonptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint16_t ble_spiptrcntl0_txoffptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x3FFF0000)) >> 16);
+}
+
+__INLINE void ble_spiptrcntl0_txoffptr_setf(uint16_t txoffptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)txoffptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL0_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL0_ADDR) & ~((uint32_t)0x3FFF0000)) | ((uint32_t)txoffptr << 16));
+}
+
+__INLINE uint16_t ble_spiptrcntl0_txonptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_spiptrcntl0_txonptr_setf(uint16_t txonptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)txonptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL0_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL0_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)txonptr << 0));
+}
+
+/**
+ * @brief SPIPTRCNTL1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 29:16 RXOFFPTR 0x0
+ * 13:00 RXONPTR 0x0
+ *
+ */
+#define BLE_SPIPTRCNTL1_ADDR 0x009008A4
+#define BLE_SPIPTRCNTL1_OFFSET 0x000000A4
+#define BLE_SPIPTRCNTL1_INDEX 0x00000029
+#define BLE_SPIPTRCNTL1_RESET 0x00000000
+
+__INLINE uint32_t ble_spiptrcntl1_get(void)
+{
+ return REG_BLE_RD(BLE_SPIPTRCNTL1_ADDR);
+}
+
+__INLINE void ble_spiptrcntl1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SPIPTRCNTL1_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXOFFPTR_MASK ((uint32_t)0x3FFF0000)
+#define BLE_RXOFFPTR_LSB 16
+#define BLE_RXOFFPTR_WIDTH ((uint32_t)0x0000000E)
+#define BLE_RXONPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_RXONPTR_LSB 0
+#define BLE_RXONPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_RXOFFPTR_RST 0x0
+#define BLE_RXONPTR_RST 0x0
+
+__INLINE void ble_spiptrcntl1_pack(uint16_t rxoffptr, uint16_t rxonptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxoffptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxonptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL1_ADDR, ((uint32_t)rxoffptr << 16) | ((uint32_t)rxonptr << 0));
+}
+
+__INLINE void ble_spiptrcntl1_unpack(uint16_t* rxoffptr, uint16_t* rxonptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL1_ADDR);
+
+ *rxoffptr = (localVal & ((uint32_t)0x3FFF0000)) >> 16;
+ *rxonptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint16_t ble_spiptrcntl1_rxoffptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x3FFF0000)) >> 16);
+}
+
+__INLINE void ble_spiptrcntl1_rxoffptr_setf(uint16_t rxoffptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxoffptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL1_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL1_ADDR) & ~((uint32_t)0x3FFF0000)) | ((uint32_t)rxoffptr << 16));
+}
+
+__INLINE uint16_t ble_spiptrcntl1_rxonptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_spiptrcntl1_rxonptr_setf(uint16_t rxonptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxonptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL1_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL1_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)rxonptr << 0));
+}
+
+/**
+ * @brief SPIPTRCNTL2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 29:16 RXLENGTHPTR 0x0
+ * 13:00 RSSIPTR 0x0
+ *
+ */
+#define BLE_SPIPTRCNTL2_ADDR 0x009008A8
+#define BLE_SPIPTRCNTL2_OFFSET 0x000000A8
+#define BLE_SPIPTRCNTL2_INDEX 0x0000002A
+#define BLE_SPIPTRCNTL2_RESET 0x00000000
+
+__INLINE uint32_t ble_spiptrcntl2_get(void)
+{
+ return REG_BLE_RD(BLE_SPIPTRCNTL2_ADDR);
+}
+
+__INLINE void ble_spiptrcntl2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SPIPTRCNTL2_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXLENGTHPTR_MASK ((uint32_t)0x3FFF0000)
+#define BLE_RXLENGTHPTR_LSB 16
+#define BLE_RXLENGTHPTR_WIDTH ((uint32_t)0x0000000E)
+#define BLE_RSSIPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_RSSIPTR_LSB 0
+#define BLE_RSSIPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_RXLENGTHPTR_RST 0x0
+#define BLE_RSSIPTR_RST 0x0
+
+__INLINE void ble_spiptrcntl2_pack(uint16_t rxlengthptr, uint16_t rssiptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxlengthptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rssiptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL2_ADDR, ((uint32_t)rxlengthptr << 16) | ((uint32_t)rssiptr << 0));
+}
+
+__INLINE void ble_spiptrcntl2_unpack(uint16_t* rxlengthptr, uint16_t* rssiptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL2_ADDR);
+
+ *rxlengthptr = (localVal & ((uint32_t)0x3FFF0000)) >> 16;
+ *rssiptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint16_t ble_spiptrcntl2_rxlengthptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x3FFF0000)) >> 16);
+}
+
+__INLINE void ble_spiptrcntl2_rxlengthptr_setf(uint16_t rxlengthptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxlengthptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL2_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL2_ADDR) & ~((uint32_t)0x3FFF0000)) | ((uint32_t)rxlengthptr << 16));
+}
+
+__INLINE uint16_t ble_spiptrcntl2_rssiptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_spiptrcntl2_rssiptr_setf(uint16_t rssiptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rssiptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL2_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL2_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)rssiptr << 0));
+}
+
+/**
+ * @brief SPIPTRCNTL3 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 29:16 CTESAMPPTR 0x0
+ * 13:00 RXPKTTYPPTR 0x0
+ *
+ */
+#define BLE_SPIPTRCNTL3_ADDR 0x009008AC
+#define BLE_SPIPTRCNTL3_OFFSET 0x000000AC
+#define BLE_SPIPTRCNTL3_INDEX 0x0000002B
+#define BLE_SPIPTRCNTL3_RESET 0x00000000
+
+__INLINE uint32_t ble_spiptrcntl3_get(void)
+{
+ return REG_BLE_RD(BLE_SPIPTRCNTL3_ADDR);
+}
+
+__INLINE void ble_spiptrcntl3_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SPIPTRCNTL3_ADDR, value);
+}
+
+// field definitions
+#define BLE_CTESAMPPTR_MASK ((uint32_t)0x3FFF0000)
+#define BLE_CTESAMPPTR_LSB 16
+#define BLE_CTESAMPPTR_WIDTH ((uint32_t)0x0000000E)
+#define BLE_RXPKTTYPPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_RXPKTTYPPTR_LSB 0
+#define BLE_RXPKTTYPPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_CTESAMPPTR_RST 0x0
+#define BLE_RXPKTTYPPTR_RST 0x0
+
+__INLINE void ble_spiptrcntl3_pack(uint16_t ctesampptr, uint16_t rxpkttypptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)ctesampptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpkttypptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL3_ADDR, ((uint32_t)ctesampptr << 16) | ((uint32_t)rxpkttypptr << 0));
+}
+
+__INLINE void ble_spiptrcntl3_unpack(uint16_t* ctesampptr, uint16_t* rxpkttypptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL3_ADDR);
+
+ *ctesampptr = (localVal & ((uint32_t)0x3FFF0000)) >> 16;
+ *rxpkttypptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint16_t ble_spiptrcntl3_ctesampptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x3FFF0000)) >> 16);
+}
+
+__INLINE void ble_spiptrcntl3_ctesampptr_setf(uint16_t ctesampptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)ctesampptr << 16) & ~((uint32_t)0x3FFF0000)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL3_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL3_ADDR) & ~((uint32_t)0x3FFF0000)) | ((uint32_t)ctesampptr << 16));
+}
+
+__INLINE uint16_t ble_spiptrcntl3_rxpkttypptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SPIPTRCNTL3_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_spiptrcntl3_rxpkttypptr_setf(uint16_t rxpkttypptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpkttypptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_SPIPTRCNTL3_ADDR, (REG_BLE_RD(BLE_SPIPTRCNTL3_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)rxpkttypptr << 0));
+}
+
+/**
+ * @brief AESCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 01 AES_MODE 0
+ * 00 AES_START 0
+ *
+ */
+#define BLE_AESCNTL_ADDR 0x009008B0
+#define BLE_AESCNTL_OFFSET 0x000000B0
+#define BLE_AESCNTL_INDEX 0x0000002C
+#define BLE_AESCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_aescntl_get(void)
+{
+ return REG_BLE_RD(BLE_AESCNTL_ADDR);
+}
+
+__INLINE void ble_aescntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_AESCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_AES_MODE_BIT ((uint32_t)0x00000002)
+#define BLE_AES_MODE_POS 1
+#define BLE_AES_START_BIT ((uint32_t)0x00000001)
+#define BLE_AES_START_POS 0
+
+#define BLE_AES_MODE_RST 0x0
+#define BLE_AES_START_RST 0x0
+
+__INLINE void ble_aescntl_pack(uint8_t aesmode, uint8_t aesstart)
+{
+ BLE_ASSERT_ERR((((uint32_t)aesmode << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)aesstart << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_AESCNTL_ADDR, ((uint32_t)aesmode << 1) | ((uint32_t)aesstart << 0));
+}
+
+__INLINE void ble_aescntl_unpack(uint8_t* aesmode, uint8_t* aesstart)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESCNTL_ADDR);
+
+ *aesmode = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *aesstart = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_aescntl_aes_mode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_aescntl_aes_mode_setf(uint8_t aesmode)
+{
+ BLE_ASSERT_ERR((((uint32_t)aesmode << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_AESCNTL_ADDR, (REG_BLE_RD(BLE_AESCNTL_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)aesmode << 1));
+}
+
+__INLINE uint8_t ble_aescntl_aes_start_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_aescntl_aes_start_setf(uint8_t aesstart)
+{
+ BLE_ASSERT_ERR((((uint32_t)aesstart << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_AESCNTL_ADDR, (REG_BLE_RD(BLE_AESCNTL_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)aesstart << 0));
+}
+
+/**
+ * @brief AESKEY31_0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 AESKEY31_0 0x0
+ *
+ */
+#define BLE_AESKEY31_0_ADDR 0x009008B4
+#define BLE_AESKEY31_0_OFFSET 0x000000B4
+#define BLE_AESKEY31_0_INDEX 0x0000002D
+#define BLE_AESKEY31_0_RESET 0x00000000
+
+__INLINE uint32_t ble_aeskey31_0_get(void)
+{
+ return REG_BLE_RD(BLE_AESKEY31_0_ADDR);
+}
+
+__INLINE void ble_aeskey31_0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_AESKEY31_0_ADDR, value);
+}
+
+// field definitions
+#define BLE_AESKEY31_0_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_AESKEY31_0_LSB 0
+#define BLE_AESKEY31_0_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_AESKEY31_0_RST 0x0
+
+__INLINE uint32_t ble_aeskey31_0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESKEY31_0_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_aeskey31_0_setf(uint32_t aeskey310)
+{
+ BLE_ASSERT_ERR((((uint32_t)aeskey310 << 0) & ~((uint32_t)0xFFFFFFFF)) == 0);
+ REG_BLE_WR(BLE_AESKEY31_0_ADDR, (uint32_t)aeskey310 << 0);
+}
+
+/**
+ * @brief AESKEY63_32 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 AESKEY63_32 0x0
+ *
+ */
+#define BLE_AESKEY63_32_ADDR 0x009008B8
+#define BLE_AESKEY63_32_OFFSET 0x000000B8
+#define BLE_AESKEY63_32_INDEX 0x0000002E
+#define BLE_AESKEY63_32_RESET 0x00000000
+
+__INLINE uint32_t ble_aeskey63_32_get(void)
+{
+ return REG_BLE_RD(BLE_AESKEY63_32_ADDR);
+}
+
+__INLINE void ble_aeskey63_32_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_AESKEY63_32_ADDR, value);
+}
+
+// field definitions
+#define BLE_AESKEY63_32_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_AESKEY63_32_LSB 0
+#define BLE_AESKEY63_32_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_AESKEY63_32_RST 0x0
+
+__INLINE uint32_t ble_aeskey63_32_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESKEY63_32_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_aeskey63_32_setf(uint32_t aeskey6332)
+{
+ BLE_ASSERT_ERR((((uint32_t)aeskey6332 << 0) & ~((uint32_t)0xFFFFFFFF)) == 0);
+ REG_BLE_WR(BLE_AESKEY63_32_ADDR, (uint32_t)aeskey6332 << 0);
+}
+
+/**
+ * @brief AESKEY95_64 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 AESKEY95_64 0x0
+ *
+ */
+#define BLE_AESKEY95_64_ADDR 0x009008BC
+#define BLE_AESKEY95_64_OFFSET 0x000000BC
+#define BLE_AESKEY95_64_INDEX 0x0000002F
+#define BLE_AESKEY95_64_RESET 0x00000000
+
+__INLINE uint32_t ble_aeskey95_64_get(void)
+{
+ return REG_BLE_RD(BLE_AESKEY95_64_ADDR);
+}
+
+__INLINE void ble_aeskey95_64_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_AESKEY95_64_ADDR, value);
+}
+
+// field definitions
+#define BLE_AESKEY95_64_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_AESKEY95_64_LSB 0
+#define BLE_AESKEY95_64_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_AESKEY95_64_RST 0x0
+
+__INLINE uint32_t ble_aeskey95_64_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESKEY95_64_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_aeskey95_64_setf(uint32_t aeskey9564)
+{
+ BLE_ASSERT_ERR((((uint32_t)aeskey9564 << 0) & ~((uint32_t)0xFFFFFFFF)) == 0);
+ REG_BLE_WR(BLE_AESKEY95_64_ADDR, (uint32_t)aeskey9564 << 0);
+}
+
+/**
+ * @brief AESKEY127_96 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 AESKEY127_96 0x0
+ *
+ */
+#define BLE_AESKEY127_96_ADDR 0x009008C0
+#define BLE_AESKEY127_96_OFFSET 0x000000C0
+#define BLE_AESKEY127_96_INDEX 0x00000030
+#define BLE_AESKEY127_96_RESET 0x00000000
+
+__INLINE uint32_t ble_aeskey127_96_get(void)
+{
+ return REG_BLE_RD(BLE_AESKEY127_96_ADDR);
+}
+
+__INLINE void ble_aeskey127_96_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_AESKEY127_96_ADDR, value);
+}
+
+// field definitions
+#define BLE_AESKEY127_96_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_AESKEY127_96_LSB 0
+#define BLE_AESKEY127_96_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_AESKEY127_96_RST 0x0
+
+__INLINE uint32_t ble_aeskey127_96_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESKEY127_96_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_aeskey127_96_setf(uint32_t aeskey12796)
+{
+ BLE_ASSERT_ERR((((uint32_t)aeskey12796 << 0) & ~((uint32_t)0xFFFFFFFF)) == 0);
+ REG_BLE_WR(BLE_AESKEY127_96_ADDR, (uint32_t)aeskey12796 << 0);
+}
+
+/**
+ * @brief AESPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 AESPTR 0x0
+ *
+ */
+#define BLE_AESPTR_ADDR 0x009008C4
+#define BLE_AESPTR_OFFSET 0x000000C4
+#define BLE_AESPTR_INDEX 0x00000031
+#define BLE_AESPTR_RESET 0x00000000
+
+__INLINE uint32_t ble_aesptr_get(void)
+{
+ return REG_BLE_RD(BLE_AESPTR_ADDR);
+}
+
+__INLINE void ble_aesptr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_AESPTR_ADDR, value);
+}
+
+// field definitions
+#define BLE_AESPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_AESPTR_LSB 0
+#define BLE_AESPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_AESPTR_RST 0x0
+
+__INLINE uint16_t ble_aesptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_AESPTR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_aesptr_setf(uint16_t aesptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)aesptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_AESPTR_ADDR, (uint32_t)aesptr << 0);
+}
+
+/**
+ * @brief TXMICVAL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 TXMICVAL 0x0
+ *
+ */
+#define BLE_TXMICVAL_ADDR 0x009008C8
+#define BLE_TXMICVAL_OFFSET 0x000000C8
+#define BLE_TXMICVAL_INDEX 0x00000032
+#define BLE_TXMICVAL_RESET 0x00000000
+
+__INLINE uint32_t ble_txmicval_get(void)
+{
+ return REG_BLE_RD(BLE_TXMICVAL_ADDR);
+}
+
+// field definitions
+#define BLE_TXMICVAL_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_TXMICVAL_LSB 0
+#define BLE_TXMICVAL_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_TXMICVAL_RST 0x0
+
+__INLINE uint32_t ble_txmicval_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_TXMICVAL_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief RXMICVAL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 RXMICVAL 0x0
+ *
+ */
+#define BLE_RXMICVAL_ADDR 0x009008CC
+#define BLE_RXMICVAL_OFFSET 0x000000CC
+#define BLE_RXMICVAL_INDEX 0x00000033
+#define BLE_RXMICVAL_RESET 0x00000000
+
+__INLINE uint32_t ble_rxmicval_get(void)
+{
+ return REG_BLE_RD(BLE_RXMICVAL_ADDR);
+}
+
+// field definitions
+#define BLE_RXMICVAL_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_RXMICVAL_LSB 0
+#define BLE_RXMICVAL_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_RXMICVAL_RST 0x0
+
+__INLINE uint32_t ble_rxmicval_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RXMICVAL_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief RFTESTCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 INFINITERX 0
+ * 27 RXPKTCNTEN 0
+ * 25:24 PERCOUNT_MODE 0x0
+ * 15 INFINITETX 0
+ * 14 TXLENGTHSRC 0
+ * 13 PRBSTYPE 0
+ * 12 TXPLDSRC 0
+ * 11 TXPKTCNTEN 0
+ * 07:00 TXLENGTH 0x0
+ *
+ */
+#define BLE_RFTESTCNTL_ADDR 0x009008D0
+#define BLE_RFTESTCNTL_OFFSET 0x000000D0
+#define BLE_RFTESTCNTL_INDEX 0x00000034
+#define BLE_RFTESTCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_rftestcntl_get(void)
+{
+ return REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+}
+
+__INLINE void ble_rftestcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_INFINITERX_BIT ((uint32_t)0x80000000)
+#define BLE_INFINITERX_POS 31
+#define BLE_RXPKTCNTEN_BIT ((uint32_t)0x08000000)
+#define BLE_RXPKTCNTEN_POS 27
+#define BLE_PERCOUNT_MODE_MASK ((uint32_t)0x03000000)
+#define BLE_PERCOUNT_MODE_LSB 24
+#define BLE_PERCOUNT_MODE_WIDTH ((uint32_t)0x00000002)
+#define BLE_INFINITETX_BIT ((uint32_t)0x00008000)
+#define BLE_INFINITETX_POS 15
+#define BLE_TXLENGTHSRC_BIT ((uint32_t)0x00004000)
+#define BLE_TXLENGTHSRC_POS 14
+#define BLE_PRBSTYPE_BIT ((uint32_t)0x00002000)
+#define BLE_PRBSTYPE_POS 13
+#define BLE_TXPLDSRC_BIT ((uint32_t)0x00001000)
+#define BLE_TXPLDSRC_POS 12
+#define BLE_TXPKTCNTEN_BIT ((uint32_t)0x00000800)
+#define BLE_TXPKTCNTEN_POS 11
+#define BLE_TXLENGTH_MASK ((uint32_t)0x000000FF)
+#define BLE_TXLENGTH_LSB 0
+#define BLE_TXLENGTH_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_INFINITERX_RST 0x0
+#define BLE_RXPKTCNTEN_RST 0x0
+#define BLE_PERCOUNT_MODE_RST 0x0
+#define BLE_INFINITETX_RST 0x0
+#define BLE_TXLENGTHSRC_RST 0x0
+#define BLE_PRBSTYPE_RST 0x0
+#define BLE_TXPLDSRC_RST 0x0
+#define BLE_TXPKTCNTEN_RST 0x0
+#define BLE_TXLENGTH_RST 0x0
+
+__INLINE void ble_rftestcntl_pack(uint8_t infiniterx, uint8_t rxpktcnten, uint8_t percountmode, uint8_t infinitetx, uint8_t txlengthsrc, uint8_t prbstype, uint8_t txpldsrc, uint8_t txpktcnten, uint8_t txlength)
+{
+ BLE_ASSERT_ERR((((uint32_t)infiniterx << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxpktcnten << 27) & ~((uint32_t)0x08000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)percountmode << 24) & ~((uint32_t)0x03000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)infinitetx << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txlengthsrc << 14) & ~((uint32_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)prbstype << 13) & ~((uint32_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpldsrc << 12) & ~((uint32_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txpktcnten << 11) & ~((uint32_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txlength << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, ((uint32_t)infiniterx << 31) | ((uint32_t)rxpktcnten << 27) | ((uint32_t)percountmode << 24) | ((uint32_t)infinitetx << 15) | ((uint32_t)txlengthsrc << 14) | ((uint32_t)prbstype << 13) | ((uint32_t)txpldsrc << 12) | ((uint32_t)txpktcnten << 11) | ((uint32_t)txlength << 0));
+}
+
+__INLINE void ble_rftestcntl_unpack(uint8_t* infiniterx, uint8_t* rxpktcnten, uint8_t* percountmode, uint8_t* infinitetx, uint8_t* txlengthsrc, uint8_t* prbstype, uint8_t* txpldsrc, uint8_t* txpktcnten, uint8_t* txlength)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+
+ *infiniterx = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *rxpktcnten = (localVal & ((uint32_t)0x08000000)) >> 27;
+ *percountmode = (localVal & ((uint32_t)0x03000000)) >> 24;
+ *infinitetx = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *txlengthsrc = (localVal & ((uint32_t)0x00004000)) >> 14;
+ *prbstype = (localVal & ((uint32_t)0x00002000)) >> 13;
+ *txpldsrc = (localVal & ((uint32_t)0x00001000)) >> 12;
+ *txpktcnten = (localVal & ((uint32_t)0x00000800)) >> 11;
+ *txlength = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_rftestcntl_infiniterx_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_rftestcntl_infiniterx_setf(uint8_t infiniterx)
+{
+ BLE_ASSERT_ERR((((uint32_t)infiniterx << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)infiniterx << 31));
+}
+
+__INLINE uint8_t ble_rftestcntl_rxpktcnten_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x08000000)) >> 27);
+}
+
+__INLINE void ble_rftestcntl_rxpktcnten_setf(uint8_t rxpktcnten)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxpktcnten << 27) & ~((uint32_t)0x08000000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x08000000)) | ((uint32_t)rxpktcnten << 27));
+}
+
+__INLINE uint8_t ble_rftestcntl_percount_mode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x03000000)) >> 24);
+}
+
+__INLINE void ble_rftestcntl_percount_mode_setf(uint8_t percountmode)
+{
+ BLE_ASSERT_ERR((((uint32_t)percountmode << 24) & ~((uint32_t)0x03000000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x03000000)) | ((uint32_t)percountmode << 24));
+}
+
+__INLINE uint8_t ble_rftestcntl_infinitetx_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_rftestcntl_infinitetx_setf(uint8_t infinitetx)
+{
+ BLE_ASSERT_ERR((((uint32_t)infinitetx << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)infinitetx << 15));
+}
+
+__INLINE uint8_t ble_rftestcntl_txlengthsrc_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00004000)) >> 14);
+}
+
+__INLINE void ble_rftestcntl_txlengthsrc_setf(uint8_t txlengthsrc)
+{
+ BLE_ASSERT_ERR((((uint32_t)txlengthsrc << 14) & ~((uint32_t)0x00004000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x00004000)) | ((uint32_t)txlengthsrc << 14));
+}
+
+__INLINE uint8_t ble_rftestcntl_prbstype_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00002000)) >> 13);
+}
+
+__INLINE void ble_rftestcntl_prbstype_setf(uint8_t prbstype)
+{
+ BLE_ASSERT_ERR((((uint32_t)prbstype << 13) & ~((uint32_t)0x00002000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x00002000)) | ((uint32_t)prbstype << 13));
+}
+
+__INLINE uint8_t ble_rftestcntl_txpldsrc_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00001000)) >> 12);
+}
+
+__INLINE void ble_rftestcntl_txpldsrc_setf(uint8_t txpldsrc)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpldsrc << 12) & ~((uint32_t)0x00001000)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x00001000)) | ((uint32_t)txpldsrc << 12));
+}
+
+__INLINE uint8_t ble_rftestcntl_txpktcnten_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000800)) >> 11);
+}
+
+__INLINE void ble_rftestcntl_txpktcnten_setf(uint8_t txpktcnten)
+{
+ BLE_ASSERT_ERR((((uint32_t)txpktcnten << 11) & ~((uint32_t)0x00000800)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x00000800)) | ((uint32_t)txpktcnten << 11));
+}
+
+__INLINE uint8_t ble_rftestcntl_txlength_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_rftestcntl_txlength_setf(uint8_t txlength)
+{
+ BLE_ASSERT_ERR((((uint32_t)txlength << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_RFTESTCNTL_ADDR, (REG_BLE_RD(BLE_RFTESTCNTL_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txlength << 0));
+}
+
+/**
+ * @brief RFTESTTXSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 TXPKTCNT 0x0
+ *
+ */
+#define BLE_RFTESTTXSTAT_ADDR 0x009008D4
+#define BLE_RFTESTTXSTAT_OFFSET 0x000000D4
+#define BLE_RFTESTTXSTAT_INDEX 0x00000035
+#define BLE_RFTESTTXSTAT_RESET 0x00000000
+
+__INLINE uint32_t ble_rftesttxstat_get(void)
+{
+ return REG_BLE_RD(BLE_RFTESTTXSTAT_ADDR);
+}
+
+// field definitions
+#define BLE_TXPKTCNT_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_TXPKTCNT_LSB 0
+#define BLE_TXPKTCNT_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_TXPKTCNT_RST 0x0
+
+__INLINE uint32_t ble_rftesttxstat_txpktcnt_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTTXSTAT_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief RFTESTRXSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:00 RXPKTCNT 0x0
+ *
+ */
+#define BLE_RFTESTRXSTAT_ADDR 0x009008D8
+#define BLE_RFTESTRXSTAT_OFFSET 0x000000D8
+#define BLE_RFTESTRXSTAT_INDEX 0x00000036
+#define BLE_RFTESTRXSTAT_RESET 0x00000000
+
+__INLINE uint32_t ble_rftestrxstat_get(void)
+{
+ return REG_BLE_RD(BLE_RFTESTRXSTAT_ADDR);
+}
+
+// field definitions
+#define BLE_RXPKTCNT_MASK ((uint32_t)0xFFFFFFFF)
+#define BLE_RXPKTCNT_LSB 0
+#define BLE_RXPKTCNT_WIDTH ((uint32_t)0x00000020)
+
+#define BLE_RXPKTCNT_RST 0x0
+
+__INLINE uint32_t ble_rftestrxstat_rxpktcnt_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RFTESTRXSTAT_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0xFFFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief TIMGENCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 25:16 PREFETCHABORT_TIME 0x1FE
+ * 08:00 PREFETCH_TIME 0x96
+ *
+ */
+#define BLE_TIMGENCNTL_ADDR 0x009008E0
+#define BLE_TIMGENCNTL_OFFSET 0x000000E0
+#define BLE_TIMGENCNTL_INDEX 0x00000038
+#define BLE_TIMGENCNTL_RESET 0x01FE0096
+
+__INLINE uint32_t ble_timgencntl_get(void)
+{
+ return REG_BLE_RD(BLE_TIMGENCNTL_ADDR);
+}
+
+__INLINE void ble_timgencntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_TIMGENCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_PREFETCHABORT_TIME_MASK ((uint32_t)0x03FF0000)
+#define BLE_PREFETCHABORT_TIME_LSB 16
+#define BLE_PREFETCHABORT_TIME_WIDTH ((uint32_t)0x0000000A)
+#define BLE_PREFETCH_TIME_MASK ((uint32_t)0x000001FF)
+#define BLE_PREFETCH_TIME_LSB 0
+#define BLE_PREFETCH_TIME_WIDTH ((uint32_t)0x00000009)
+
+#define BLE_PREFETCHABORT_TIME_RST 0x1FE
+#define BLE_PREFETCH_TIME_RST 0x96
+
+__INLINE void ble_timgencntl_pack(uint16_t prefetchaborttime, uint16_t prefetchtime)
+{
+ BLE_ASSERT_ERR((((uint32_t)prefetchaborttime << 16) & ~((uint32_t)0x03FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)prefetchtime << 0) & ~((uint32_t)0x000001FF)) == 0);
+ REG_BLE_WR(BLE_TIMGENCNTL_ADDR, ((uint32_t)prefetchaborttime << 16) | ((uint32_t)prefetchtime << 0));
+}
+
+__INLINE void ble_timgencntl_unpack(uint16_t* prefetchaborttime, uint16_t* prefetchtime)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_TIMGENCNTL_ADDR);
+
+ *prefetchaborttime = (localVal & ((uint32_t)0x03FF0000)) >> 16;
+ *prefetchtime = (localVal & ((uint32_t)0x000001FF)) >> 0;
+}
+
+__INLINE uint16_t ble_timgencntl_prefetchabort_time_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_TIMGENCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x03FF0000)) >> 16);
+}
+
+__INLINE void ble_timgencntl_prefetchabort_time_setf(uint16_t prefetchaborttime)
+{
+ BLE_ASSERT_ERR((((uint32_t)prefetchaborttime << 16) & ~((uint32_t)0x03FF0000)) == 0);
+ REG_BLE_WR(BLE_TIMGENCNTL_ADDR, (REG_BLE_RD(BLE_TIMGENCNTL_ADDR) & ~((uint32_t)0x03FF0000)) | ((uint32_t)prefetchaborttime << 16));
+}
+
+__INLINE uint16_t ble_timgencntl_prefetch_time_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_TIMGENCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x000001FF)) >> 0);
+}
+
+__INLINE void ble_timgencntl_prefetch_time_setf(uint16_t prefetchtime)
+{
+ BLE_ASSERT_ERR((((uint32_t)prefetchtime << 0) & ~((uint32_t)0x000001FF)) == 0);
+ REG_BLE_WR(BLE_TIMGENCNTL_ADDR, (REG_BLE_RD(BLE_TIMGENCNTL_ADDR) & ~((uint32_t)0x000001FF)) | ((uint32_t)prefetchtime << 0));
+}
+
+/**
+ * @brief FINETIMTGT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 27:00 FINETARGET 0x0
+ *
+ */
+#define BLE_FINETIMTGT_ADDR 0x009008E4
+#define BLE_FINETIMTGT_OFFSET 0x000000E4
+#define BLE_FINETIMTGT_INDEX 0x00000039
+#define BLE_FINETIMTGT_RESET 0x00000000
+
+__INLINE uint32_t ble_finetimtgt_get(void)
+{
+ return REG_BLE_RD(BLE_FINETIMTGT_ADDR);
+}
+
+__INLINE void ble_finetimtgt_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_FINETIMTGT_ADDR, value);
+}
+
+// field definitions
+#define BLE_FINETARGET_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_FINETARGET_LSB 0
+#define BLE_FINETARGET_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_FINETARGET_RST 0x0
+
+__INLINE uint32_t ble_finetimtgt_finetarget_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_FINETIMTGT_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0FFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_finetimtgt_finetarget_setf(uint32_t finetarget)
+{
+ BLE_ASSERT_ERR((((uint32_t)finetarget << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_FINETIMTGT_ADDR, (uint32_t)finetarget << 0);
+}
+
+/**
+ * @brief CLKNTGT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 27:00 CLKNTGT1 0x0
+ *
+ */
+#define BLE_CLKNTGT1_ADDR 0x009008E8
+#define BLE_CLKNTGT1_OFFSET 0x000000E8
+#define BLE_CLKNTGT1_INDEX 0x0000003A
+#define BLE_CLKNTGT1_RESET 0x00000000
+
+__INLINE uint32_t ble_clkntgt1_get(void)
+{
+ return REG_BLE_RD(BLE_CLKNTGT1_ADDR);
+}
+
+__INLINE void ble_clkntgt1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_CLKNTGT1_ADDR, value);
+}
+
+// field definitions
+#define BLE_CLKNTGT1_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_CLKNTGT1_LSB 0
+#define BLE_CLKNTGT1_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_CLKNTGT1_RST 0x0
+
+__INLINE uint32_t ble_clkntgt1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_CLKNTGT1_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0FFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_clkntgt1_setf(uint32_t clkntgt1)
+{
+ BLE_ASSERT_ERR((((uint32_t)clkntgt1 << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_CLKNTGT1_ADDR, (uint32_t)clkntgt1 << 0);
+}
+
+/**
+ * @brief HMICROSECTGT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 HMICROSECTGT1 0x0
+ *
+ */
+#define BLE_HMICROSECTGT1_ADDR 0x009008EC
+#define BLE_HMICROSECTGT1_OFFSET 0x000000EC
+#define BLE_HMICROSECTGT1_INDEX 0x0000003B
+#define BLE_HMICROSECTGT1_RESET 0x00000000
+
+__INLINE uint32_t ble_hmicrosectgt1_get(void)
+{
+ return REG_BLE_RD(BLE_HMICROSECTGT1_ADDR);
+}
+
+__INLINE void ble_hmicrosectgt1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_HMICROSECTGT1_ADDR, value);
+}
+
+// field definitions
+#define BLE_HMICROSECTGT1_MASK ((uint32_t)0x000003FF)
+#define BLE_HMICROSECTGT1_LSB 0
+#define BLE_HMICROSECTGT1_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_HMICROSECTGT1_RST 0x0
+
+__INLINE uint16_t ble_hmicrosectgt1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_HMICROSECTGT1_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_hmicrosectgt1_setf(uint16_t hmicrosectgt1)
+{
+ BLE_ASSERT_ERR((((uint32_t)hmicrosectgt1 << 0) & ~((uint32_t)0x000003FF)) == 0);
+ REG_BLE_WR(BLE_HMICROSECTGT1_ADDR, (uint32_t)hmicrosectgt1 << 0);
+}
+
+/**
+ * @brief CLKNTGT2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 27:00 CLKNTGT2 0x0
+ *
+ */
+#define BLE_CLKNTGT2_ADDR 0x009008F0
+#define BLE_CLKNTGT2_OFFSET 0x000000F0
+#define BLE_CLKNTGT2_INDEX 0x0000003C
+#define BLE_CLKNTGT2_RESET 0x00000000
+
+__INLINE uint32_t ble_clkntgt2_get(void)
+{
+ return REG_BLE_RD(BLE_CLKNTGT2_ADDR);
+}
+
+__INLINE void ble_clkntgt2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_CLKNTGT2_ADDR, value);
+}
+
+// field definitions
+#define BLE_CLKNTGT2_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_CLKNTGT2_LSB 0
+#define BLE_CLKNTGT2_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_CLKNTGT2_RST 0x0
+
+__INLINE uint32_t ble_clkntgt2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_CLKNTGT2_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0FFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_clkntgt2_setf(uint32_t clkntgt2)
+{
+ BLE_ASSERT_ERR((((uint32_t)clkntgt2 << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_CLKNTGT2_ADDR, (uint32_t)clkntgt2 << 0);
+}
+
+/**
+ * @brief HMICROSECTGT2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 HMICROSECTGT2 0x0
+ *
+ */
+#define BLE_HMICROSECTGT2_ADDR 0x009008F4
+#define BLE_HMICROSECTGT2_OFFSET 0x000000F4
+#define BLE_HMICROSECTGT2_INDEX 0x0000003D
+#define BLE_HMICROSECTGT2_RESET 0x00000000
+
+__INLINE uint32_t ble_hmicrosectgt2_get(void)
+{
+ return REG_BLE_RD(BLE_HMICROSECTGT2_ADDR);
+}
+
+__INLINE void ble_hmicrosectgt2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_HMICROSECTGT2_ADDR, value);
+}
+
+// field definitions
+#define BLE_HMICROSECTGT2_MASK ((uint32_t)0x000003FF)
+#define BLE_HMICROSECTGT2_LSB 0
+#define BLE_HMICROSECTGT2_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_HMICROSECTGT2_RST 0x0
+
+__INLINE uint16_t ble_hmicrosectgt2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_HMICROSECTGT2_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_hmicrosectgt2_setf(uint16_t hmicrosectgt2)
+{
+ BLE_ASSERT_ERR((((uint32_t)hmicrosectgt2 << 0) & ~((uint32_t)0x000003FF)) == 0);
+ REG_BLE_WR(BLE_HMICROSECTGT2_ADDR, (uint32_t)hmicrosectgt2 << 0);
+}
+
+/**
+ * @brief SLOTCLK register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 SAMP 0
+ * 30 CLKN_UPD 0
+ * 27:00 SCLK 0x0
+ *
+ */
+#define BLE_SLOTCLK_ADDR 0x009008F8
+#define BLE_SLOTCLK_OFFSET 0x000000F8
+#define BLE_SLOTCLK_INDEX 0x0000003E
+#define BLE_SLOTCLK_RESET 0x00000000
+
+__INLINE uint32_t ble_slotclk_get(void)
+{
+ return REG_BLE_RD(BLE_SLOTCLK_ADDR);
+}
+
+__INLINE void ble_slotclk_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SLOTCLK_ADDR, value);
+}
+
+// field definitions
+#define BLE_SAMP_BIT ((uint32_t)0x80000000)
+#define BLE_SAMP_POS 31
+#define BLE_CLKN_UPD_BIT ((uint32_t)0x40000000)
+#define BLE_CLKN_UPD_POS 30
+#define BLE_SCLK_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_SCLK_LSB 0
+#define BLE_SCLK_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_SAMP_RST 0x0
+#define BLE_CLKN_UPD_RST 0x0
+#define BLE_SCLK_RST 0x0
+
+__INLINE void ble_slotclk_pack(uint8_t samp, uint8_t clknupd, uint32_t sclk)
+{
+ BLE_ASSERT_ERR((((uint32_t)samp << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)clknupd << 30) & ~((uint32_t)0x40000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)sclk << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_SLOTCLK_ADDR, ((uint32_t)samp << 31) | ((uint32_t)clknupd << 30) | ((uint32_t)sclk << 0));
+}
+
+__INLINE void ble_slotclk_unpack(uint8_t* samp, uint8_t* clknupd, uint32_t* sclk)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SLOTCLK_ADDR);
+
+ *samp = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *clknupd = (localVal & ((uint32_t)0x40000000)) >> 30;
+ *sclk = (localVal & ((uint32_t)0x0FFFFFFF)) >> 0;
+}
+
+__INLINE uint8_t ble_slotclk_samp_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SLOTCLK_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_slotclk_samp_setf(uint8_t samp)
+{
+ BLE_ASSERT_ERR((((uint32_t)samp << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_SLOTCLK_ADDR, (REG_BLE_RD(BLE_SLOTCLK_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)samp << 31));
+}
+
+__INLINE uint8_t ble_slotclk_clkn_upd_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SLOTCLK_ADDR);
+ return ((localVal & ((uint32_t)0x40000000)) >> 30);
+}
+
+__INLINE void ble_slotclk_clkn_upd_setf(uint8_t clknupd)
+{
+ BLE_ASSERT_ERR((((uint32_t)clknupd << 30) & ~((uint32_t)0x40000000)) == 0);
+ REG_BLE_WR(BLE_SLOTCLK_ADDR, (REG_BLE_RD(BLE_SLOTCLK_ADDR) & ~((uint32_t)0x40000000)) | ((uint32_t)clknupd << 30));
+}
+
+__INLINE uint32_t ble_slotclk_sclk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SLOTCLK_ADDR);
+ return ((localVal & ((uint32_t)0x0FFFFFFF)) >> 0);
+}
+
+__INLINE void ble_slotclk_sclk_setf(uint32_t sclk)
+{
+ BLE_ASSERT_ERR((((uint32_t)sclk << 0) & ~((uint32_t)0x0FFFFFFF)) == 0);
+ REG_BLE_WR(BLE_SLOTCLK_ADDR, (REG_BLE_RD(BLE_SLOTCLK_ADDR) & ~((uint32_t)0x0FFFFFFF)) | ((uint32_t)sclk << 0));
+}
+
+/**
+ * @brief FINETIMECNT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 FINECNT 0x0
+ *
+ */
+#define BLE_FINETIMECNT_ADDR 0x009008FC
+#define BLE_FINETIMECNT_OFFSET 0x000000FC
+#define BLE_FINETIMECNT_INDEX 0x0000003F
+#define BLE_FINETIMECNT_RESET 0x00000000
+
+__INLINE uint32_t ble_finetimecnt_get(void)
+{
+ return REG_BLE_RD(BLE_FINETIMECNT_ADDR);
+}
+
+// field definitions
+#define BLE_FINECNT_MASK ((uint32_t)0x000003FF)
+#define BLE_FINECNT_LSB 0
+#define BLE_FINECNT_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_FINECNT_RST 0x0
+
+__INLINE uint16_t ble_finetimecnt_finecnt_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_FINETIMECNT_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief ACTSCHCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 START_ACT 0
+ * 03:00 ENTRY_IDX 0x0
+ *
+ */
+#define BLE_ACTSCHCNTL_ADDR 0x00900900
+#define BLE_ACTSCHCNTL_OFFSET 0x00000100
+#define BLE_ACTSCHCNTL_INDEX 0x00000040
+#define BLE_ACTSCHCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_actschcntl_get(void)
+{
+ return REG_BLE_RD(BLE_ACTSCHCNTL_ADDR);
+}
+
+__INLINE void ble_actschcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_ACTSCHCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_START_ACT_BIT ((uint32_t)0x80000000)
+#define BLE_START_ACT_POS 31
+#define BLE_ENTRY_IDX_MASK ((uint32_t)0x0000000F)
+#define BLE_ENTRY_IDX_LSB 0
+#define BLE_ENTRY_IDX_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_START_ACT_RST 0x0
+#define BLE_ENTRY_IDX_RST 0x0
+
+__INLINE void ble_actschcntl_pack(uint8_t startact, uint8_t entryidx)
+{
+ BLE_ASSERT_ERR((((uint32_t)startact << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)entryidx << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_ACTSCHCNTL_ADDR, ((uint32_t)startact << 31) | ((uint32_t)entryidx << 0));
+}
+
+__INLINE void ble_actschcntl_unpack(uint8_t* startact, uint8_t* entryidx)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTSCHCNTL_ADDR);
+
+ *startact = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *entryidx = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_actschcntl_start_act_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTSCHCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_actschcntl_start_act_setf(uint8_t startact)
+{
+ BLE_ASSERT_ERR((((uint32_t)startact << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_ACTSCHCNTL_ADDR, (REG_BLE_RD(BLE_ACTSCHCNTL_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)startact << 31));
+}
+
+__INLINE uint8_t ble_actschcntl_entry_idx_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTSCHCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_actschcntl_entry_idx_setf(uint8_t entryidx)
+{
+ BLE_ASSERT_ERR((((uint32_t)entryidx << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_ACTSCHCNTL_ADDR, (REG_BLE_RD(BLE_ACTSCHCNTL_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)entryidx << 0));
+}
+
+/**
+ * @brief STARTEVTCLKNTS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 27:00 STARTEVTCLKNTS 0x0
+ *
+ */
+#define BLE_STARTEVTCLKNTS_ADDR 0x00900904
+#define BLE_STARTEVTCLKNTS_OFFSET 0x00000104
+#define BLE_STARTEVTCLKNTS_INDEX 0x00000041
+#define BLE_STARTEVTCLKNTS_RESET 0x00000000
+
+__INLINE uint32_t ble_startevtclknts_get(void)
+{
+ return REG_BLE_RD(BLE_STARTEVTCLKNTS_ADDR);
+}
+
+// field definitions
+#define BLE_STARTEVTCLKNTS_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_STARTEVTCLKNTS_LSB 0
+#define BLE_STARTEVTCLKNTS_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_STARTEVTCLKNTS_RST 0x0
+
+__INLINE uint32_t ble_startevtclknts_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_STARTEVTCLKNTS_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0FFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief STARTEVTFINECNTTS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 STARTEVTFINECNTTS 0x0
+ *
+ */
+#define BLE_STARTEVTFINECNTTS_ADDR 0x00900908
+#define BLE_STARTEVTFINECNTTS_OFFSET 0x00000108
+#define BLE_STARTEVTFINECNTTS_INDEX 0x00000042
+#define BLE_STARTEVTFINECNTTS_RESET 0x00000000
+
+__INLINE uint32_t ble_startevtfinecntts_get(void)
+{
+ return REG_BLE_RD(BLE_STARTEVTFINECNTTS_ADDR);
+}
+
+// field definitions
+#define BLE_STARTEVTFINECNTTS_MASK ((uint32_t)0x000003FF)
+#define BLE_STARTEVTFINECNTTS_LSB 0
+#define BLE_STARTEVTFINECNTTS_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_STARTEVTFINECNTTS_RST 0x0
+
+__INLINE uint16_t ble_startevtfinecntts_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_STARTEVTFINECNTTS_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief ENDEVTCLKNTS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 27:00 ENDEVTCLKNTS 0x0
+ *
+ */
+#define BLE_ENDEVTCLKNTS_ADDR 0x0090090C
+#define BLE_ENDEVTCLKNTS_OFFSET 0x0000010C
+#define BLE_ENDEVTCLKNTS_INDEX 0x00000043
+#define BLE_ENDEVTCLKNTS_RESET 0x00000000
+
+__INLINE uint32_t ble_endevtclknts_get(void)
+{
+ return REG_BLE_RD(BLE_ENDEVTCLKNTS_ADDR);
+}
+
+// field definitions
+#define BLE_ENDEVTCLKNTS_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_ENDEVTCLKNTS_LSB 0
+#define BLE_ENDEVTCLKNTS_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_ENDEVTCLKNTS_RST 0x0
+
+__INLINE uint32_t ble_endevtclknts_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ENDEVTCLKNTS_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0FFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief ENDEVTFINECNTTS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 ENDEVTFINECNTTS 0x0
+ *
+ */
+#define BLE_ENDEVTFINECNTTS_ADDR 0x00900910
+#define BLE_ENDEVTFINECNTTS_OFFSET 0x00000110
+#define BLE_ENDEVTFINECNTTS_INDEX 0x00000044
+#define BLE_ENDEVTFINECNTTS_RESET 0x00000000
+
+__INLINE uint32_t ble_endevtfinecntts_get(void)
+{
+ return REG_BLE_RD(BLE_ENDEVTFINECNTTS_ADDR);
+}
+
+// field definitions
+#define BLE_ENDEVTFINECNTTS_MASK ((uint32_t)0x000003FF)
+#define BLE_ENDEVTFINECNTTS_LSB 0
+#define BLE_ENDEVTFINECNTTS_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_ENDEVTFINECNTTS_RST 0x0
+
+__INLINE uint16_t ble_endevtfinecntts_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ENDEVTFINECNTTS_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief SKIPEVTCLKNTS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 27:00 SKIPEVTCLKNTS 0x0
+ *
+ */
+#define BLE_SKIPEVTCLKNTS_ADDR 0x00900914
+#define BLE_SKIPEVTCLKNTS_OFFSET 0x00000114
+#define BLE_SKIPEVTCLKNTS_INDEX 0x00000045
+#define BLE_SKIPEVTCLKNTS_RESET 0x00000000
+
+__INLINE uint32_t ble_skipevtclknts_get(void)
+{
+ return REG_BLE_RD(BLE_SKIPEVTCLKNTS_ADDR);
+}
+
+// field definitions
+#define BLE_SKIPEVTCLKNTS_MASK ((uint32_t)0x0FFFFFFF)
+#define BLE_SKIPEVTCLKNTS_LSB 0
+#define BLE_SKIPEVTCLKNTS_WIDTH ((uint32_t)0x0000001C)
+
+#define BLE_SKIPEVTCLKNTS_RST 0x0
+
+__INLINE uint32_t ble_skipevtclknts_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SKIPEVTCLKNTS_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0FFFFFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief SKIPEVTFINECNTTS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 SKIPEVTFINECNTTS 0x0
+ *
+ */
+#define BLE_SKIPEVTFINECNTTS_ADDR 0x00900918
+#define BLE_SKIPEVTFINECNTTS_OFFSET 0x00000118
+#define BLE_SKIPEVTFINECNTTS_INDEX 0x00000046
+#define BLE_SKIPEVTFINECNTTS_RESET 0x00000000
+
+__INLINE uint32_t ble_skipevtfinecntts_get(void)
+{
+ return REG_BLE_RD(BLE_SKIPEVTFINECNTTS_ADDR);
+}
+
+// field definitions
+#define BLE_SKIPEVTFINECNTTS_MASK ((uint32_t)0x000003FF)
+#define BLE_SKIPEVTFINECNTTS_LSB 0
+#define BLE_SKIPEVTFINECNTTS_WIDTH ((uint32_t)0x0000000A)
+
+#define BLE_SKIPEVTFINECNTTS_RST 0x0
+
+__INLINE uint16_t ble_skipevtfinecntts_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SKIPEVTFINECNTTS_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief ADVTIM register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 TX_AUXPTR_THR 0x0
+ * 23:16 RX_AUXPTR_THR 0x0
+ * 13:00 ADVINT 0x0
+ *
+ */
+#define BLE_ADVTIM_ADDR 0x00900920
+#define BLE_ADVTIM_OFFSET 0x00000120
+#define BLE_ADVTIM_INDEX 0x00000048
+#define BLE_ADVTIM_RESET 0x00000000
+
+__INLINE uint32_t ble_advtim_get(void)
+{
+ return REG_BLE_RD(BLE_ADVTIM_ADDR);
+}
+
+__INLINE void ble_advtim_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_ADVTIM_ADDR, value);
+}
+
+// field definitions
+#define BLE_TX_AUXPTR_THR_MASK ((uint32_t)0xFF000000)
+#define BLE_TX_AUXPTR_THR_LSB 24
+#define BLE_TX_AUXPTR_THR_WIDTH ((uint32_t)0x00000008)
+#define BLE_RX_AUXPTR_THR_MASK ((uint32_t)0x00FF0000)
+#define BLE_RX_AUXPTR_THR_LSB 16
+#define BLE_RX_AUXPTR_THR_WIDTH ((uint32_t)0x00000008)
+#define BLE_ADVINT_MASK ((uint32_t)0x00003FFF)
+#define BLE_ADVINT_LSB 0
+#define BLE_ADVINT_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_TX_AUXPTR_THR_RST 0x0
+#define BLE_RX_AUXPTR_THR_RST 0x0
+#define BLE_ADVINT_RST 0x0
+
+__INLINE void ble_advtim_pack(uint8_t txauxptrthr, uint8_t rxauxptrthr, uint16_t advint)
+{
+ BLE_ASSERT_ERR((((uint32_t)txauxptrthr << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxauxptrthr << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)advint << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_ADVTIM_ADDR, ((uint32_t)txauxptrthr << 24) | ((uint32_t)rxauxptrthr << 16) | ((uint32_t)advint << 0));
+}
+
+__INLINE void ble_advtim_unpack(uint8_t* txauxptrthr, uint8_t* rxauxptrthr, uint16_t* advint)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ADVTIM_ADDR);
+
+ *txauxptrthr = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxauxptrthr = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *advint = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t ble_advtim_tx_auxptr_thr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ADVTIM_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_advtim_tx_auxptr_thr_setf(uint8_t txauxptrthr)
+{
+ BLE_ASSERT_ERR((((uint32_t)txauxptrthr << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_ADVTIM_ADDR, (REG_BLE_RD(BLE_ADVTIM_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)txauxptrthr << 24));
+}
+
+__INLINE uint8_t ble_advtim_rx_auxptr_thr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ADVTIM_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_advtim_rx_auxptr_thr_setf(uint8_t rxauxptrthr)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxauxptrthr << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_ADVTIM_ADDR, (REG_BLE_RD(BLE_ADVTIM_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxauxptrthr << 16));
+}
+
+__INLINE uint16_t ble_advtim_advint_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ADVTIM_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_advtim_advint_setf(uint16_t advint)
+{
+ BLE_ASSERT_ERR((((uint32_t)advint << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_ADVTIM_ADDR, (REG_BLE_RD(BLE_ADVTIM_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)advint << 0));
+}
+
+/**
+ * @brief ACTSCANCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 24:16 BACKOFF 0x1
+ * 08:00 UPPERLIMIT 0x1
+ *
+ */
+#define BLE_ACTSCANCNTL_ADDR 0x00900924
+#define BLE_ACTSCANCNTL_OFFSET 0x00000124
+#define BLE_ACTSCANCNTL_INDEX 0x00000049
+#define BLE_ACTSCANCNTL_RESET 0x00010001
+
+__INLINE uint32_t ble_actscancntl_get(void)
+{
+ return REG_BLE_RD(BLE_ACTSCANCNTL_ADDR);
+}
+
+__INLINE void ble_actscancntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_ACTSCANCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_BACKOFF_MASK ((uint32_t)0x01FF0000)
+#define BLE_BACKOFF_LSB 16
+#define BLE_BACKOFF_WIDTH ((uint32_t)0x00000009)
+#define BLE_UPPERLIMIT_MASK ((uint32_t)0x000001FF)
+#define BLE_UPPERLIMIT_LSB 0
+#define BLE_UPPERLIMIT_WIDTH ((uint32_t)0x00000009)
+
+#define BLE_BACKOFF_RST 0x1
+#define BLE_UPPERLIMIT_RST 0x1
+
+__INLINE void ble_actscancntl_pack(uint16_t backoff, uint16_t upperlimit)
+{
+ BLE_ASSERT_ERR((((uint32_t)backoff << 16) & ~((uint32_t)0x01FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)upperlimit << 0) & ~((uint32_t)0x000001FF)) == 0);
+ REG_BLE_WR(BLE_ACTSCANCNTL_ADDR, ((uint32_t)backoff << 16) | ((uint32_t)upperlimit << 0));
+}
+
+__INLINE void ble_actscancntl_unpack(uint16_t* backoff, uint16_t* upperlimit)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTSCANCNTL_ADDR);
+
+ *backoff = (localVal & ((uint32_t)0x01FF0000)) >> 16;
+ *upperlimit = (localVal & ((uint32_t)0x000001FF)) >> 0;
+}
+
+__INLINE uint16_t ble_actscancntl_backoff_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTSCANCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x01FF0000)) >> 16);
+}
+
+__INLINE void ble_actscancntl_backoff_setf(uint16_t backoff)
+{
+ BLE_ASSERT_ERR((((uint32_t)backoff << 16) & ~((uint32_t)0x01FF0000)) == 0);
+ REG_BLE_WR(BLE_ACTSCANCNTL_ADDR, (REG_BLE_RD(BLE_ACTSCANCNTL_ADDR) & ~((uint32_t)0x01FF0000)) | ((uint32_t)backoff << 16));
+}
+
+__INLINE uint16_t ble_actscancntl_upperlimit_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_ACTSCANCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x000001FF)) >> 0);
+}
+
+__INLINE void ble_actscancntl_upperlimit_setf(uint16_t upperlimit)
+{
+ BLE_ASSERT_ERR((((uint32_t)upperlimit << 0) & ~((uint32_t)0x000001FF)) == 0);
+ REG_BLE_WR(BLE_ACTSCANCNTL_ADDR, (REG_BLE_RD(BLE_ACTSCANCNTL_ADDR) & ~((uint32_t)0x000001FF)) | ((uint32_t)upperlimit << 0));
+}
+
+/**
+ * @brief WPALCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 23:16 WPALNBDEV 0x0
+ * 13:00 WPALBASEPTR 0x0
+ *
+ */
+#define BLE_WPALCNTL_ADDR 0x00900930
+#define BLE_WPALCNTL_OFFSET 0x00000130
+#define BLE_WPALCNTL_INDEX 0x0000004C
+#define BLE_WPALCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_wpalcntl_get(void)
+{
+ return REG_BLE_RD(BLE_WPALCNTL_ADDR);
+}
+
+__INLINE void ble_wpalcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_WPALCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_WPALNBDEV_MASK ((uint32_t)0x00FF0000)
+#define BLE_WPALNBDEV_LSB 16
+#define BLE_WPALNBDEV_WIDTH ((uint32_t)0x00000008)
+#define BLE_WPALBASEPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_WPALBASEPTR_LSB 0
+#define BLE_WPALBASEPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_WPALNBDEV_RST 0x0
+#define BLE_WPALBASEPTR_RST 0x0
+
+__INLINE void ble_wpalcntl_pack(uint8_t wpalnbdev, uint16_t wpalbaseptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)wpalnbdev << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wpalbaseptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_WPALCNTL_ADDR, ((uint32_t)wpalnbdev << 16) | ((uint32_t)wpalbaseptr << 0));
+}
+
+__INLINE void ble_wpalcntl_unpack(uint8_t* wpalnbdev, uint16_t* wpalbaseptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_WPALCNTL_ADDR);
+
+ *wpalnbdev = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *wpalbaseptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t ble_wpalcntl_wpalnbdev_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_WPALCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_wpalcntl_wpalnbdev_setf(uint8_t wpalnbdev)
+{
+ BLE_ASSERT_ERR((((uint32_t)wpalnbdev << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_WPALCNTL_ADDR, (REG_BLE_RD(BLE_WPALCNTL_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)wpalnbdev << 16));
+}
+
+__INLINE uint16_t ble_wpalcntl_wpalbaseptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_WPALCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_wpalcntl_wpalbaseptr_setf(uint16_t wpalbaseptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)wpalbaseptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_WPALCNTL_ADDR, (REG_BLE_RD(BLE_WPALCNTL_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)wpalbaseptr << 0));
+}
+
+/**
+ * @brief WPALCURRENTPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 WPALCURRENTPTR 0x0
+ *
+ */
+#define BLE_WPALCURRENTPTR_ADDR 0x00900934
+#define BLE_WPALCURRENTPTR_OFFSET 0x00000134
+#define BLE_WPALCURRENTPTR_INDEX 0x0000004D
+#define BLE_WPALCURRENTPTR_RESET 0x00000000
+
+__INLINE uint32_t ble_wpalcurrentptr_get(void)
+{
+ return REG_BLE_RD(BLE_WPALCURRENTPTR_ADDR);
+}
+
+__INLINE void ble_wpalcurrentptr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_WPALCURRENTPTR_ADDR, value);
+}
+
+// field definitions
+#define BLE_WPALCURRENTPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_WPALCURRENTPTR_LSB 0
+#define BLE_WPALCURRENTPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_WPALCURRENTPTR_RST 0x0
+
+__INLINE uint16_t ble_wpalcurrentptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_WPALCURRENTPTR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_wpalcurrentptr_setf(uint16_t wpalcurrentptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)wpalcurrentptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_WPALCURRENTPTR_ADDR, (uint32_t)wpalcurrentptr << 0);
+}
+
+/**
+ * @brief SEARCH_TIMEOUT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 05:00 SEARCH_TIMEOUT 0x10
+ *
+ */
+#define BLE_SEARCH_TIMEOUT_ADDR 0x00900938
+#define BLE_SEARCH_TIMEOUT_OFFSET 0x00000138
+#define BLE_SEARCH_TIMEOUT_INDEX 0x0000004E
+#define BLE_SEARCH_TIMEOUT_RESET 0x00000010
+
+__INLINE uint32_t ble_search_timeout_get(void)
+{
+ return REG_BLE_RD(BLE_SEARCH_TIMEOUT_ADDR);
+}
+
+__INLINE void ble_search_timeout_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_SEARCH_TIMEOUT_ADDR, value);
+}
+
+// field definitions
+#define BLE_SEARCH_TIMEOUT_MASK ((uint32_t)0x0000003F)
+#define BLE_SEARCH_TIMEOUT_LSB 0
+#define BLE_SEARCH_TIMEOUT_WIDTH ((uint32_t)0x00000006)
+
+#define BLE_SEARCH_TIMEOUT_RST 0x10
+
+__INLINE uint8_t ble_search_timeout_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_SEARCH_TIMEOUT_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x0000003F)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_search_timeout_setf(uint8_t searchtimeout)
+{
+ BLE_ASSERT_ERR((((uint32_t)searchtimeout << 0) & ~((uint32_t)0x0000003F)) == 0);
+ REG_BLE_WR(BLE_SEARCH_TIMEOUT_ADDR, (uint32_t)searchtimeout << 0);
+}
+
+/**
+ * @brief COEXIFCNTL0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 21:20 MWSSCANFREQMSK 0x0
+ * 19:18 WLCRXPRIOMODE 0x0
+ * 17:16 WLCTXPRIOMODE 0x0
+ * 15:14 MWSTXFRQMSK 0x0
+ * 13:12 MWSRXFRQMSK 0x0
+ * 11:10 MWSTXMSK 0x0
+ * 09:08 MWSRXMSK 0x0
+ * 07:06 WLANTXMSK 0x0
+ * 05:04 WLANRXMSK 0x1
+ * 03 MWSWCI_EN 0
+ * 02 MWSCOEX_EN 0
+ * 01 SYNCGEN_EN 0
+ * 00 WLANCOEX_EN 0
+ *
+ */
+#define BLE_COEXIFCNTL0_ADDR 0x00900940
+#define BLE_COEXIFCNTL0_OFFSET 0x00000140
+#define BLE_COEXIFCNTL0_INDEX 0x00000050
+#define BLE_COEXIFCNTL0_RESET 0x00000010
+
+__INLINE uint32_t ble_coexifcntl0_get(void)
+{
+ return REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+}
+
+__INLINE void ble_coexifcntl0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, value);
+}
+
+// field definitions
+#define BLE_MWSSCANFREQMSK_MASK ((uint32_t)0x00300000)
+#define BLE_MWSSCANFREQMSK_LSB 20
+#define BLE_MWSSCANFREQMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_WLCRXPRIOMODE_MASK ((uint32_t)0x000C0000)
+#define BLE_WLCRXPRIOMODE_LSB 18
+#define BLE_WLCRXPRIOMODE_WIDTH ((uint32_t)0x00000002)
+#define BLE_WLCTXPRIOMODE_MASK ((uint32_t)0x00030000)
+#define BLE_WLCTXPRIOMODE_LSB 16
+#define BLE_WLCTXPRIOMODE_WIDTH ((uint32_t)0x00000002)
+#define BLE_MWSTXFRQMSK_MASK ((uint32_t)0x0000C000)
+#define BLE_MWSTXFRQMSK_LSB 14
+#define BLE_MWSTXFRQMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_MWSRXFRQMSK_MASK ((uint32_t)0x00003000)
+#define BLE_MWSRXFRQMSK_LSB 12
+#define BLE_MWSRXFRQMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_MWSTXMSK_MASK ((uint32_t)0x00000C00)
+#define BLE_MWSTXMSK_LSB 10
+#define BLE_MWSTXMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_MWSRXMSK_MASK ((uint32_t)0x00000300)
+#define BLE_MWSRXMSK_LSB 8
+#define BLE_MWSRXMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_WLANTXMSK_MASK ((uint32_t)0x000000C0)
+#define BLE_WLANTXMSK_LSB 6
+#define BLE_WLANTXMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_WLANRXMSK_MASK ((uint32_t)0x00000030)
+#define BLE_WLANRXMSK_LSB 4
+#define BLE_WLANRXMSK_WIDTH ((uint32_t)0x00000002)
+#define BLE_MWSWCI_EN_BIT ((uint32_t)0x00000008)
+#define BLE_MWSWCI_EN_POS 3
+#define BLE_MWSCOEX_EN_BIT ((uint32_t)0x00000004)
+#define BLE_MWSCOEX_EN_POS 2
+#define BLE_SYNCGEN_EN_BIT ((uint32_t)0x00000002)
+#define BLE_SYNCGEN_EN_POS 1
+#define BLE_WLANCOEX_EN_BIT ((uint32_t)0x00000001)
+#define BLE_WLANCOEX_EN_POS 0
+
+#define BLE_MWSSCANFREQMSK_RST 0x0
+#define BLE_WLCRXPRIOMODE_RST 0x0
+#define BLE_WLCTXPRIOMODE_RST 0x0
+#define BLE_MWSTXFRQMSK_RST 0x0
+#define BLE_MWSRXFRQMSK_RST 0x0
+#define BLE_MWSTXMSK_RST 0x0
+#define BLE_MWSRXMSK_RST 0x0
+#define BLE_WLANTXMSK_RST 0x0
+#define BLE_WLANRXMSK_RST 0x1
+#define BLE_MWSWCI_EN_RST 0x0
+#define BLE_MWSCOEX_EN_RST 0x0
+#define BLE_SYNCGEN_EN_RST 0x0
+#define BLE_WLANCOEX_EN_RST 0x0
+
+__INLINE void ble_coexifcntl0_pack(uint8_t mwsscanfreqmsk, uint8_t wlcrxpriomode, uint8_t wlctxpriomode, uint8_t mwstxfrqmsk, uint8_t mwsrxfrqmsk, uint8_t mwstxmsk, uint8_t mwsrxmsk, uint8_t wlantxmsk, uint8_t wlanrxmsk, uint8_t mwswcien, uint8_t mwscoexen, uint8_t syncgenen, uint8_t wlancoexen)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwsscanfreqmsk << 20) & ~((uint32_t)0x00300000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlcrxpriomode << 18) & ~((uint32_t)0x000C0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlctxpriomode << 16) & ~((uint32_t)0x00030000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mwstxfrqmsk << 14) & ~((uint32_t)0x0000C000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mwsrxfrqmsk << 12) & ~((uint32_t)0x00003000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mwstxmsk << 10) & ~((uint32_t)0x00000C00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mwsrxmsk << 8) & ~((uint32_t)0x00000300)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlantxmsk << 6) & ~((uint32_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlanrxmsk << 4) & ~((uint32_t)0x00000030)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mwswcien << 3) & ~((uint32_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)mwscoexen << 2) & ~((uint32_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)syncgenen << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlancoexen << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, ((uint32_t)mwsscanfreqmsk << 20) | ((uint32_t)wlcrxpriomode << 18) | ((uint32_t)wlctxpriomode << 16) | ((uint32_t)mwstxfrqmsk << 14) | ((uint32_t)mwsrxfrqmsk << 12) | ((uint32_t)mwstxmsk << 10) | ((uint32_t)mwsrxmsk << 8) | ((uint32_t)wlantxmsk << 6) | ((uint32_t)wlanrxmsk << 4) | ((uint32_t)mwswcien << 3) | ((uint32_t)mwscoexen << 2) | ((uint32_t)syncgenen << 1) | ((uint32_t)wlancoexen << 0));
+}
+
+__INLINE void ble_coexifcntl0_unpack(uint8_t* mwsscanfreqmsk, uint8_t* wlcrxpriomode, uint8_t* wlctxpriomode, uint8_t* mwstxfrqmsk, uint8_t* mwsrxfrqmsk, uint8_t* mwstxmsk, uint8_t* mwsrxmsk, uint8_t* wlantxmsk, uint8_t* wlanrxmsk, uint8_t* mwswcien, uint8_t* mwscoexen, uint8_t* syncgenen, uint8_t* wlancoexen)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+
+ *mwsscanfreqmsk = (localVal & ((uint32_t)0x00300000)) >> 20;
+ *wlcrxpriomode = (localVal & ((uint32_t)0x000C0000)) >> 18;
+ *wlctxpriomode = (localVal & ((uint32_t)0x00030000)) >> 16;
+ *mwstxfrqmsk = (localVal & ((uint32_t)0x0000C000)) >> 14;
+ *mwsrxfrqmsk = (localVal & ((uint32_t)0x00003000)) >> 12;
+ *mwstxmsk = (localVal & ((uint32_t)0x00000C00)) >> 10;
+ *mwsrxmsk = (localVal & ((uint32_t)0x00000300)) >> 8;
+ *wlantxmsk = (localVal & ((uint32_t)0x000000C0)) >> 6;
+ *wlanrxmsk = (localVal & ((uint32_t)0x00000030)) >> 4;
+ *mwswcien = (localVal & ((uint32_t)0x00000008)) >> 3;
+ *mwscoexen = (localVal & ((uint32_t)0x00000004)) >> 2;
+ *syncgenen = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *wlancoexen = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwsscanfreqmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00300000)) >> 20);
+}
+
+__INLINE void ble_coexifcntl0_mwsscanfreqmsk_setf(uint8_t mwsscanfreqmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwsscanfreqmsk << 20) & ~((uint32_t)0x00300000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00300000)) | ((uint32_t)mwsscanfreqmsk << 20));
+}
+
+__INLINE uint8_t ble_coexifcntl0_wlcrxpriomode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x000C0000)) >> 18);
+}
+
+__INLINE void ble_coexifcntl0_wlcrxpriomode_setf(uint8_t wlcrxpriomode)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlcrxpriomode << 18) & ~((uint32_t)0x000C0000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x000C0000)) | ((uint32_t)wlcrxpriomode << 18));
+}
+
+__INLINE uint8_t ble_coexifcntl0_wlctxpriomode_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00030000)) >> 16);
+}
+
+__INLINE void ble_coexifcntl0_wlctxpriomode_setf(uint8_t wlctxpriomode)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlctxpriomode << 16) & ~((uint32_t)0x00030000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00030000)) | ((uint32_t)wlctxpriomode << 16));
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwstxfrqmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x0000C000)) >> 14);
+}
+
+__INLINE void ble_coexifcntl0_mwstxfrqmsk_setf(uint8_t mwstxfrqmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwstxfrqmsk << 14) & ~((uint32_t)0x0000C000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x0000C000)) | ((uint32_t)mwstxfrqmsk << 14));
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwsrxfrqmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00003000)) >> 12);
+}
+
+__INLINE void ble_coexifcntl0_mwsrxfrqmsk_setf(uint8_t mwsrxfrqmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwsrxfrqmsk << 12) & ~((uint32_t)0x00003000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00003000)) | ((uint32_t)mwsrxfrqmsk << 12));
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwstxmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000C00)) >> 10);
+}
+
+__INLINE void ble_coexifcntl0_mwstxmsk_setf(uint8_t mwstxmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwstxmsk << 10) & ~((uint32_t)0x00000C00)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000C00)) | ((uint32_t)mwstxmsk << 10));
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwsrxmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000300)) >> 8);
+}
+
+__INLINE void ble_coexifcntl0_mwsrxmsk_setf(uint8_t mwsrxmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwsrxmsk << 8) & ~((uint32_t)0x00000300)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000300)) | ((uint32_t)mwsrxmsk << 8));
+}
+
+__INLINE uint8_t ble_coexifcntl0_wlantxmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x000000C0)) >> 6);
+}
+
+__INLINE void ble_coexifcntl0_wlantxmsk_setf(uint8_t wlantxmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlantxmsk << 6) & ~((uint32_t)0x000000C0)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x000000C0)) | ((uint32_t)wlantxmsk << 6));
+}
+
+__INLINE uint8_t ble_coexifcntl0_wlanrxmsk_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000030)) >> 4);
+}
+
+__INLINE void ble_coexifcntl0_wlanrxmsk_setf(uint8_t wlanrxmsk)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlanrxmsk << 4) & ~((uint32_t)0x00000030)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000030)) | ((uint32_t)wlanrxmsk << 4));
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwswci_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000008)) >> 3);
+}
+
+__INLINE void ble_coexifcntl0_mwswci_en_setf(uint8_t mwswcien)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwswcien << 3) & ~((uint32_t)0x00000008)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000008)) | ((uint32_t)mwswcien << 3));
+}
+
+__INLINE uint8_t ble_coexifcntl0_mwscoex_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000004)) >> 2);
+}
+
+__INLINE void ble_coexifcntl0_mwscoex_en_setf(uint8_t mwscoexen)
+{
+ BLE_ASSERT_ERR((((uint32_t)mwscoexen << 2) & ~((uint32_t)0x00000004)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000004)) | ((uint32_t)mwscoexen << 2));
+}
+
+__INLINE uint8_t ble_coexifcntl0_syncgen_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_coexifcntl0_syncgen_en_setf(uint8_t syncgenen)
+{
+ BLE_ASSERT_ERR((((uint32_t)syncgenen << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)syncgenen << 1));
+}
+
+__INLINE uint8_t ble_coexifcntl0_wlancoex_en_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL0_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_coexifcntl0_wlancoex_en_setf(uint8_t wlancoexen)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlancoexen << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL0_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL0_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)wlancoexen << 0));
+}
+
+/**
+ * @brief COEXIFCNTL1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 28:24 WLCPRXTHR 0x0
+ * 20:16 WLCPTXTHR 0x0
+ * 14:08 WLCPDURATION 0x0
+ * 06:00 WLCPDELAY 0x0
+ *
+ */
+#define BLE_COEXIFCNTL1_ADDR 0x00900944
+#define BLE_COEXIFCNTL1_OFFSET 0x00000144
+#define BLE_COEXIFCNTL1_INDEX 0x00000051
+#define BLE_COEXIFCNTL1_RESET 0x00000000
+
+__INLINE uint32_t ble_coexifcntl1_get(void)
+{
+ return REG_BLE_RD(BLE_COEXIFCNTL1_ADDR);
+}
+
+__INLINE void ble_coexifcntl1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_COEXIFCNTL1_ADDR, value);
+}
+
+// field definitions
+#define BLE_WLCPRXTHR_MASK ((uint32_t)0x1F000000)
+#define BLE_WLCPRXTHR_LSB 24
+#define BLE_WLCPRXTHR_WIDTH ((uint32_t)0x00000005)
+#define BLE_WLCPTXTHR_MASK ((uint32_t)0x001F0000)
+#define BLE_WLCPTXTHR_LSB 16
+#define BLE_WLCPTXTHR_WIDTH ((uint32_t)0x00000005)
+#define BLE_WLCPDURATION_MASK ((uint32_t)0x00007F00)
+#define BLE_WLCPDURATION_LSB 8
+#define BLE_WLCPDURATION_WIDTH ((uint32_t)0x00000007)
+#define BLE_WLCPDELAY_MASK ((uint32_t)0x0000007F)
+#define BLE_WLCPDELAY_LSB 0
+#define BLE_WLCPDELAY_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_WLCPRXTHR_RST 0x0
+#define BLE_WLCPTXTHR_RST 0x0
+#define BLE_WLCPDURATION_RST 0x0
+#define BLE_WLCPDELAY_RST 0x0
+
+__INLINE void ble_coexifcntl1_pack(uint8_t wlcprxthr, uint8_t wlcptxthr, uint8_t wlcpduration, uint8_t wlcpdelay)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlcprxthr << 24) & ~((uint32_t)0x1F000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlcptxthr << 16) & ~((uint32_t)0x001F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlcpduration << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)wlcpdelay << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL1_ADDR, ((uint32_t)wlcprxthr << 24) | ((uint32_t)wlcptxthr << 16) | ((uint32_t)wlcpduration << 8) | ((uint32_t)wlcpdelay << 0));
+}
+
+__INLINE void ble_coexifcntl1_unpack(uint8_t* wlcprxthr, uint8_t* wlcptxthr, uint8_t* wlcpduration, uint8_t* wlcpdelay)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL1_ADDR);
+
+ *wlcprxthr = (localVal & ((uint32_t)0x1F000000)) >> 24;
+ *wlcptxthr = (localVal & ((uint32_t)0x001F0000)) >> 16;
+ *wlcpduration = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *wlcpdelay = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_coexifcntl1_wlcprxthr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x1F000000)) >> 24);
+}
+
+__INLINE void ble_coexifcntl1_wlcprxthr_setf(uint8_t wlcprxthr)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlcprxthr << 24) & ~((uint32_t)0x1F000000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL1_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL1_ADDR) & ~((uint32_t)0x1F000000)) | ((uint32_t)wlcprxthr << 24));
+}
+
+__INLINE uint8_t ble_coexifcntl1_wlcptxthr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x001F0000)) >> 16);
+}
+
+__INLINE void ble_coexifcntl1_wlcptxthr_setf(uint8_t wlcptxthr)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlcptxthr << 16) & ~((uint32_t)0x001F0000)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL1_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL1_ADDR) & ~((uint32_t)0x001F0000)) | ((uint32_t)wlcptxthr << 16));
+}
+
+__INLINE uint8_t ble_coexifcntl1_wlcpduration_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_coexifcntl1_wlcpduration_setf(uint8_t wlcpduration)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlcpduration << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL1_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL1_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)wlcpduration << 8));
+}
+
+__INLINE uint8_t ble_coexifcntl1_wlcpdelay_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL1_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_coexifcntl1_wlcpdelay_setf(uint8_t wlcpdelay)
+{
+ BLE_ASSERT_ERR((((uint32_t)wlcpdelay << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL1_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL1_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)wlcpdelay << 0));
+}
+
+/**
+ * @brief COEXIFCNTL2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 11:08 RX_ANT_DELAY 0x0
+ * 03:00 TX_ANT_DELAY 0x0
+ *
+ */
+#define BLE_COEXIFCNTL2_ADDR 0x00900948
+#define BLE_COEXIFCNTL2_OFFSET 0x00000148
+#define BLE_COEXIFCNTL2_INDEX 0x00000052
+#define BLE_COEXIFCNTL2_RESET 0x00000000
+
+__INLINE uint32_t ble_coexifcntl2_get(void)
+{
+ return REG_BLE_RD(BLE_COEXIFCNTL2_ADDR);
+}
+
+__INLINE void ble_coexifcntl2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_COEXIFCNTL2_ADDR, value);
+}
+
+// field definitions
+#define BLE_RX_ANT_DELAY_MASK ((uint32_t)0x00000F00)
+#define BLE_RX_ANT_DELAY_LSB 8
+#define BLE_RX_ANT_DELAY_WIDTH ((uint32_t)0x00000004)
+#define BLE_TX_ANT_DELAY_MASK ((uint32_t)0x0000000F)
+#define BLE_TX_ANT_DELAY_LSB 0
+#define BLE_TX_ANT_DELAY_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_RX_ANT_DELAY_RST 0x0
+#define BLE_TX_ANT_DELAY_RST 0x0
+
+__INLINE void ble_coexifcntl2_pack(uint8_t rxantdelay, uint8_t txantdelay)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxantdelay << 8) & ~((uint32_t)0x00000F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txantdelay << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL2_ADDR, ((uint32_t)rxantdelay << 8) | ((uint32_t)txantdelay << 0));
+}
+
+__INLINE void ble_coexifcntl2_unpack(uint8_t* rxantdelay, uint8_t* txantdelay)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL2_ADDR);
+
+ *rxantdelay = (localVal & ((uint32_t)0x00000F00)) >> 8;
+ *txantdelay = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_coexifcntl2_rx_ant_delay_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x00000F00)) >> 8);
+}
+
+__INLINE void ble_coexifcntl2_rx_ant_delay_setf(uint8_t rxantdelay)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxantdelay << 8) & ~((uint32_t)0x00000F00)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL2_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL2_ADDR) & ~((uint32_t)0x00000F00)) | ((uint32_t)rxantdelay << 8));
+}
+
+__INLINE uint8_t ble_coexifcntl2_tx_ant_delay_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_COEXIFCNTL2_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_coexifcntl2_tx_ant_delay_setf(uint8_t txantdelay)
+{
+ BLE_ASSERT_ERR((((uint32_t)txantdelay << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_COEXIFCNTL2_ADDR, (REG_BLE_RD(BLE_COEXIFCNTL2_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)txantdelay << 0));
+}
+
+/**
+ * @brief BLEMPRIO0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:28 BLEM7 0x3
+ * 27:24 BLEM6 0x4
+ * 23:20 BLEM5 0x8
+ * 19:16 BLEM4 0x9
+ * 15:12 BLEM3 0xA
+ * 11:08 BLEM2 0xD
+ * 07:04 BLEM1 0xE
+ * 03:00 BLEM0 0xF
+ *
+ */
+#define BLE_BLEMPRIO0_ADDR 0x0090094C
+#define BLE_BLEMPRIO0_OFFSET 0x0000014C
+#define BLE_BLEMPRIO0_INDEX 0x00000053
+#define BLE_BLEMPRIO0_RESET 0x3489ADEF
+
+__INLINE uint32_t ble_blemprio0_get(void)
+{
+ return REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+}
+
+__INLINE void ble_blemprio0_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, value);
+}
+
+// field definitions
+#define BLE_BLEM7_MASK ((uint32_t)0xF0000000)
+#define BLE_BLEM7_LSB 28
+#define BLE_BLEM7_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM6_MASK ((uint32_t)0x0F000000)
+#define BLE_BLEM6_LSB 24
+#define BLE_BLEM6_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM5_MASK ((uint32_t)0x00F00000)
+#define BLE_BLEM5_LSB 20
+#define BLE_BLEM5_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM4_MASK ((uint32_t)0x000F0000)
+#define BLE_BLEM4_LSB 16
+#define BLE_BLEM4_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM3_MASK ((uint32_t)0x0000F000)
+#define BLE_BLEM3_LSB 12
+#define BLE_BLEM3_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM2_MASK ((uint32_t)0x00000F00)
+#define BLE_BLEM2_LSB 8
+#define BLE_BLEM2_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM1_MASK ((uint32_t)0x000000F0)
+#define BLE_BLEM1_LSB 4
+#define BLE_BLEM1_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM0_MASK ((uint32_t)0x0000000F)
+#define BLE_BLEM0_LSB 0
+#define BLE_BLEM0_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_BLEM7_RST 0x3
+#define BLE_BLEM6_RST 0x4
+#define BLE_BLEM5_RST 0x8
+#define BLE_BLEM4_RST 0x9
+#define BLE_BLEM3_RST 0xA
+#define BLE_BLEM2_RST 0xD
+#define BLE_BLEM1_RST 0xE
+#define BLE_BLEM0_RST 0xF
+
+__INLINE void ble_blemprio0_pack(uint8_t blem7, uint8_t blem6, uint8_t blem5, uint8_t blem4, uint8_t blem3, uint8_t blem2, uint8_t blem1, uint8_t blem0)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem7 << 28) & ~((uint32_t)0xF0000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem6 << 24) & ~((uint32_t)0x0F000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem5 << 20) & ~((uint32_t)0x00F00000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem4 << 16) & ~((uint32_t)0x000F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem3 << 12) & ~((uint32_t)0x0000F000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem2 << 8) & ~((uint32_t)0x00000F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem1 << 4) & ~((uint32_t)0x000000F0)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem0 << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, ((uint32_t)blem7 << 28) | ((uint32_t)blem6 << 24) | ((uint32_t)blem5 << 20) | ((uint32_t)blem4 << 16) | ((uint32_t)blem3 << 12) | ((uint32_t)blem2 << 8) | ((uint32_t)blem1 << 4) | ((uint32_t)blem0 << 0));
+}
+
+__INLINE void ble_blemprio0_unpack(uint8_t* blem7, uint8_t* blem6, uint8_t* blem5, uint8_t* blem4, uint8_t* blem3, uint8_t* blem2, uint8_t* blem1, uint8_t* blem0)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+
+ *blem7 = (localVal & ((uint32_t)0xF0000000)) >> 28;
+ *blem6 = (localVal & ((uint32_t)0x0F000000)) >> 24;
+ *blem5 = (localVal & ((uint32_t)0x00F00000)) >> 20;
+ *blem4 = (localVal & ((uint32_t)0x000F0000)) >> 16;
+ *blem3 = (localVal & ((uint32_t)0x0000F000)) >> 12;
+ *blem2 = (localVal & ((uint32_t)0x00000F00)) >> 8;
+ *blem1 = (localVal & ((uint32_t)0x000000F0)) >> 4;
+ *blem0 = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_blemprio0_blem7_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0xF0000000)) >> 28);
+}
+
+__INLINE void ble_blemprio0_blem7_setf(uint8_t blem7)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem7 << 28) & ~((uint32_t)0xF0000000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0xF0000000)) | ((uint32_t)blem7 << 28));
+}
+
+__INLINE uint8_t ble_blemprio0_blem6_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x0F000000)) >> 24);
+}
+
+__INLINE void ble_blemprio0_blem6_setf(uint8_t blem6)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem6 << 24) & ~((uint32_t)0x0F000000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x0F000000)) | ((uint32_t)blem6 << 24));
+}
+
+__INLINE uint8_t ble_blemprio0_blem5_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x00F00000)) >> 20);
+}
+
+__INLINE void ble_blemprio0_blem5_setf(uint8_t blem5)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem5 << 20) & ~((uint32_t)0x00F00000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x00F00000)) | ((uint32_t)blem5 << 20));
+}
+
+__INLINE uint8_t ble_blemprio0_blem4_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x000F0000)) >> 16);
+}
+
+__INLINE void ble_blemprio0_blem4_setf(uint8_t blem4)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem4 << 16) & ~((uint32_t)0x000F0000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x000F0000)) | ((uint32_t)blem4 << 16));
+}
+
+__INLINE uint8_t ble_blemprio0_blem3_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x0000F000)) >> 12);
+}
+
+__INLINE void ble_blemprio0_blem3_setf(uint8_t blem3)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem3 << 12) & ~((uint32_t)0x0000F000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x0000F000)) | ((uint32_t)blem3 << 12));
+}
+
+__INLINE uint8_t ble_blemprio0_blem2_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x00000F00)) >> 8);
+}
+
+__INLINE void ble_blemprio0_blem2_setf(uint8_t blem2)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem2 << 8) & ~((uint32_t)0x00000F00)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x00000F00)) | ((uint32_t)blem2 << 8));
+}
+
+__INLINE uint8_t ble_blemprio0_blem1_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x000000F0)) >> 4);
+}
+
+__INLINE void ble_blemprio0_blem1_setf(uint8_t blem1)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem1 << 4) & ~((uint32_t)0x000000F0)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x000000F0)) | ((uint32_t)blem1 << 4));
+}
+
+__INLINE uint8_t ble_blemprio0_blem0_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO0_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_blemprio0_blem0_setf(uint8_t blem0)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem0 << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO0_ADDR, (REG_BLE_RD(BLE_BLEMPRIO0_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)blem0 << 0));
+}
+
+/**
+ * @brief BLEMPRIO1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:28 BLEM15 0x3
+ * 27:24 BLEM14 0x4
+ * 23:20 BLEM13 0x8
+ * 19:16 BLEM12 0x9
+ * 15:12 BLEM11 0xA
+ * 11:08 BLEM10 0xF
+ * 07:04 BLEM9 0xD
+ * 03:00 BLEM8 0xC
+ *
+ */
+#define BLE_BLEMPRIO1_ADDR 0x00900950
+#define BLE_BLEMPRIO1_OFFSET 0x00000150
+#define BLE_BLEMPRIO1_INDEX 0x00000054
+#define BLE_BLEMPRIO1_RESET 0x3489AFDC
+
+__INLINE uint32_t ble_blemprio1_get(void)
+{
+ return REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+}
+
+__INLINE void ble_blemprio1_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, value);
+}
+
+// field definitions
+#define BLE_BLEM15_MASK ((uint32_t)0xF0000000)
+#define BLE_BLEM15_LSB 28
+#define BLE_BLEM15_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM14_MASK ((uint32_t)0x0F000000)
+#define BLE_BLEM14_LSB 24
+#define BLE_BLEM14_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM13_MASK ((uint32_t)0x00F00000)
+#define BLE_BLEM13_LSB 20
+#define BLE_BLEM13_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM12_MASK ((uint32_t)0x000F0000)
+#define BLE_BLEM12_LSB 16
+#define BLE_BLEM12_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM11_MASK ((uint32_t)0x0000F000)
+#define BLE_BLEM11_LSB 12
+#define BLE_BLEM11_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM10_MASK ((uint32_t)0x00000F00)
+#define BLE_BLEM10_LSB 8
+#define BLE_BLEM10_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM9_MASK ((uint32_t)0x000000F0)
+#define BLE_BLEM9_LSB 4
+#define BLE_BLEM9_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM8_MASK ((uint32_t)0x0000000F)
+#define BLE_BLEM8_LSB 0
+#define BLE_BLEM8_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_BLEM15_RST 0x3
+#define BLE_BLEM14_RST 0x4
+#define BLE_BLEM13_RST 0x8
+#define BLE_BLEM12_RST 0x9
+#define BLE_BLEM11_RST 0xA
+#define BLE_BLEM10_RST 0xF
+#define BLE_BLEM9_RST 0xD
+#define BLE_BLEM8_RST 0xC
+
+__INLINE void ble_blemprio1_pack(uint8_t blem15, uint8_t blem14, uint8_t blem13, uint8_t blem12, uint8_t blem11, uint8_t blem10, uint8_t blem9, uint8_t blem8)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem15 << 28) & ~((uint32_t)0xF0000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem14 << 24) & ~((uint32_t)0x0F000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem13 << 20) & ~((uint32_t)0x00F00000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem12 << 16) & ~((uint32_t)0x000F0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem11 << 12) & ~((uint32_t)0x0000F000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem10 << 8) & ~((uint32_t)0x00000F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem9 << 4) & ~((uint32_t)0x000000F0)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem8 << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, ((uint32_t)blem15 << 28) | ((uint32_t)blem14 << 24) | ((uint32_t)blem13 << 20) | ((uint32_t)blem12 << 16) | ((uint32_t)blem11 << 12) | ((uint32_t)blem10 << 8) | ((uint32_t)blem9 << 4) | ((uint32_t)blem8 << 0));
+}
+
+__INLINE void ble_blemprio1_unpack(uint8_t* blem15, uint8_t* blem14, uint8_t* blem13, uint8_t* blem12, uint8_t* blem11, uint8_t* blem10, uint8_t* blem9, uint8_t* blem8)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+
+ *blem15 = (localVal & ((uint32_t)0xF0000000)) >> 28;
+ *blem14 = (localVal & ((uint32_t)0x0F000000)) >> 24;
+ *blem13 = (localVal & ((uint32_t)0x00F00000)) >> 20;
+ *blem12 = (localVal & ((uint32_t)0x000F0000)) >> 16;
+ *blem11 = (localVal & ((uint32_t)0x0000F000)) >> 12;
+ *blem10 = (localVal & ((uint32_t)0x00000F00)) >> 8;
+ *blem9 = (localVal & ((uint32_t)0x000000F0)) >> 4;
+ *blem8 = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_blemprio1_blem15_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0xF0000000)) >> 28);
+}
+
+__INLINE void ble_blemprio1_blem15_setf(uint8_t blem15)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem15 << 28) & ~((uint32_t)0xF0000000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0xF0000000)) | ((uint32_t)blem15 << 28));
+}
+
+__INLINE uint8_t ble_blemprio1_blem14_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x0F000000)) >> 24);
+}
+
+__INLINE void ble_blemprio1_blem14_setf(uint8_t blem14)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem14 << 24) & ~((uint32_t)0x0F000000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x0F000000)) | ((uint32_t)blem14 << 24));
+}
+
+__INLINE uint8_t ble_blemprio1_blem13_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x00F00000)) >> 20);
+}
+
+__INLINE void ble_blemprio1_blem13_setf(uint8_t blem13)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem13 << 20) & ~((uint32_t)0x00F00000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x00F00000)) | ((uint32_t)blem13 << 20));
+}
+
+__INLINE uint8_t ble_blemprio1_blem12_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x000F0000)) >> 16);
+}
+
+__INLINE void ble_blemprio1_blem12_setf(uint8_t blem12)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem12 << 16) & ~((uint32_t)0x000F0000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x000F0000)) | ((uint32_t)blem12 << 16));
+}
+
+__INLINE uint8_t ble_blemprio1_blem11_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x0000F000)) >> 12);
+}
+
+__INLINE void ble_blemprio1_blem11_setf(uint8_t blem11)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem11 << 12) & ~((uint32_t)0x0000F000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x0000F000)) | ((uint32_t)blem11 << 12));
+}
+
+__INLINE uint8_t ble_blemprio1_blem10_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x00000F00)) >> 8);
+}
+
+__INLINE void ble_blemprio1_blem10_setf(uint8_t blem10)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem10 << 8) & ~((uint32_t)0x00000F00)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x00000F00)) | ((uint32_t)blem10 << 8));
+}
+
+__INLINE uint8_t ble_blemprio1_blem9_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x000000F0)) >> 4);
+}
+
+__INLINE void ble_blemprio1_blem9_setf(uint8_t blem9)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem9 << 4) & ~((uint32_t)0x000000F0)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x000000F0)) | ((uint32_t)blem9 << 4));
+}
+
+__INLINE uint8_t ble_blemprio1_blem8_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO1_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_blemprio1_blem8_setf(uint8_t blem8)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem8 << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO1_ADDR, (REG_BLE_RD(BLE_BLEMPRIO1_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)blem8 << 0));
+}
+
+/**
+ * @brief BLEMPRIO2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:28 BLEMDEFAULT 0x3
+ * 11:08 BLEM18 0x2
+ * 07:04 BLEM17 0x7
+ * 03:00 BLEM16 0x7
+ *
+ */
+#define BLE_BLEMPRIO2_ADDR 0x00900954
+#define BLE_BLEMPRIO2_OFFSET 0x00000154
+#define BLE_BLEMPRIO2_INDEX 0x00000055
+#define BLE_BLEMPRIO2_RESET 0x30000277
+
+__INLINE uint32_t ble_blemprio2_get(void)
+{
+ return REG_BLE_RD(BLE_BLEMPRIO2_ADDR);
+}
+
+__INLINE void ble_blemprio2_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_BLEMPRIO2_ADDR, value);
+}
+
+// field definitions
+#define BLE_BLEMDEFAULT_MASK ((uint32_t)0xF0000000)
+#define BLE_BLEMDEFAULT_LSB 28
+#define BLE_BLEMDEFAULT_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM18_MASK ((uint32_t)0x00000F00)
+#define BLE_BLEM18_LSB 8
+#define BLE_BLEM18_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM17_MASK ((uint32_t)0x000000F0)
+#define BLE_BLEM17_LSB 4
+#define BLE_BLEM17_WIDTH ((uint32_t)0x00000004)
+#define BLE_BLEM16_MASK ((uint32_t)0x0000000F)
+#define BLE_BLEM16_LSB 0
+#define BLE_BLEM16_WIDTH ((uint32_t)0x00000004)
+
+#define BLE_BLEMDEFAULT_RST 0x3
+#define BLE_BLEM18_RST 0x2
+#define BLE_BLEM17_RST 0x7
+#define BLE_BLEM16_RST 0x7
+
+__INLINE void ble_blemprio2_pack(uint8_t blemdefault, uint8_t blem18, uint8_t blem17, uint8_t blem16)
+{
+ BLE_ASSERT_ERR((((uint32_t)blemdefault << 28) & ~((uint32_t)0xF0000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem18 << 8) & ~((uint32_t)0x00000F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem17 << 4) & ~((uint32_t)0x000000F0)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)blem16 << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO2_ADDR, ((uint32_t)blemdefault << 28) | ((uint32_t)blem18 << 8) | ((uint32_t)blem17 << 4) | ((uint32_t)blem16 << 0));
+}
+
+__INLINE void ble_blemprio2_unpack(uint8_t* blemdefault, uint8_t* blem18, uint8_t* blem17, uint8_t* blem16)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO2_ADDR);
+
+ *blemdefault = (localVal & ((uint32_t)0xF0000000)) >> 28;
+ *blem18 = (localVal & ((uint32_t)0x00000F00)) >> 8;
+ *blem17 = (localVal & ((uint32_t)0x000000F0)) >> 4;
+ *blem16 = (localVal & ((uint32_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t ble_blemprio2_blemdefault_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO2_ADDR);
+ return ((localVal & ((uint32_t)0xF0000000)) >> 28);
+}
+
+__INLINE void ble_blemprio2_blemdefault_setf(uint8_t blemdefault)
+{
+ BLE_ASSERT_ERR((((uint32_t)blemdefault << 28) & ~((uint32_t)0xF0000000)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO2_ADDR, (REG_BLE_RD(BLE_BLEMPRIO2_ADDR) & ~((uint32_t)0xF0000000)) | ((uint32_t)blemdefault << 28));
+}
+
+__INLINE uint8_t ble_blemprio2_blem18_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO2_ADDR);
+ return ((localVal & ((uint32_t)0x00000F00)) >> 8);
+}
+
+__INLINE void ble_blemprio2_blem18_setf(uint8_t blem18)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem18 << 8) & ~((uint32_t)0x00000F00)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO2_ADDR, (REG_BLE_RD(BLE_BLEMPRIO2_ADDR) & ~((uint32_t)0x00000F00)) | ((uint32_t)blem18 << 8));
+}
+
+__INLINE uint8_t ble_blemprio2_blem17_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO2_ADDR);
+ return ((localVal & ((uint32_t)0x000000F0)) >> 4);
+}
+
+__INLINE void ble_blemprio2_blem17_setf(uint8_t blem17)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem17 << 4) & ~((uint32_t)0x000000F0)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO2_ADDR, (REG_BLE_RD(BLE_BLEMPRIO2_ADDR) & ~((uint32_t)0x000000F0)) | ((uint32_t)blem17 << 4));
+}
+
+__INLINE uint8_t ble_blemprio2_blem16_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_BLEMPRIO2_ADDR);
+ return ((localVal & ((uint32_t)0x0000000F)) >> 0);
+}
+
+__INLINE void ble_blemprio2_blem16_setf(uint8_t blem16)
+{
+ BLE_ASSERT_ERR((((uint32_t)blem16 << 0) & ~((uint32_t)0x0000000F)) == 0);
+ REG_BLE_WR(BLE_BLEMPRIO2_ADDR, (REG_BLE_RD(BLE_BLEMPRIO2_ADDR) & ~((uint32_t)0x0000000F)) | ((uint32_t)blem16 << 0));
+}
+
+/**
+ * @brief RALCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 23:16 RALNBDEV 0x0
+ * 13:00 RALBASEPTR 0x0
+ *
+ */
+#define BLE_RALCNTL_ADDR 0x00900960
+#define BLE_RALCNTL_OFFSET 0x00000160
+#define BLE_RALCNTL_INDEX 0x00000058
+#define BLE_RALCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_ralcntl_get(void)
+{
+ return REG_BLE_RD(BLE_RALCNTL_ADDR);
+}
+
+__INLINE void ble_ralcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RALCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_RALNBDEV_MASK ((uint32_t)0x00FF0000)
+#define BLE_RALNBDEV_LSB 16
+#define BLE_RALNBDEV_WIDTH ((uint32_t)0x00000008)
+#define BLE_RALBASEPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_RALBASEPTR_LSB 0
+#define BLE_RALBASEPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_RALNBDEV_RST 0x0
+#define BLE_RALBASEPTR_RST 0x0
+
+__INLINE void ble_ralcntl_pack(uint8_t ralnbdev, uint16_t ralbaseptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)ralnbdev << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)ralbaseptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_RALCNTL_ADDR, ((uint32_t)ralnbdev << 16) | ((uint32_t)ralbaseptr << 0));
+}
+
+__INLINE void ble_ralcntl_unpack(uint8_t* ralnbdev, uint16_t* ralbaseptr)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RALCNTL_ADDR);
+
+ *ralnbdev = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *ralbaseptr = (localVal & ((uint32_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t ble_ralcntl_ralnbdev_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RALCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_ralcntl_ralnbdev_setf(uint8_t ralnbdev)
+{
+ BLE_ASSERT_ERR((((uint32_t)ralnbdev << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_RALCNTL_ADDR, (REG_BLE_RD(BLE_RALCNTL_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)ralnbdev << 16));
+}
+
+__INLINE uint16_t ble_ralcntl_ralbaseptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RALCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void ble_ralcntl_ralbaseptr_setf(uint16_t ralbaseptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)ralbaseptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_RALCNTL_ADDR, (REG_BLE_RD(BLE_RALCNTL_ADDR) & ~((uint32_t)0x00003FFF)) | ((uint32_t)ralbaseptr << 0));
+}
+
+/**
+ * @brief RALCURRENTPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 RALCURRENTPTR 0x0
+ *
+ */
+#define BLE_RALCURRENTPTR_ADDR 0x00900964
+#define BLE_RALCURRENTPTR_OFFSET 0x00000164
+#define BLE_RALCURRENTPTR_INDEX 0x00000059
+#define BLE_RALCURRENTPTR_RESET 0x00000000
+
+__INLINE uint32_t ble_ralcurrentptr_get(void)
+{
+ return REG_BLE_RD(BLE_RALCURRENTPTR_ADDR);
+}
+
+__INLINE void ble_ralcurrentptr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RALCURRENTPTR_ADDR, value);
+}
+
+// field definitions
+#define BLE_RALCURRENTPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_RALCURRENTPTR_LSB 0
+#define BLE_RALCURRENTPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_RALCURRENTPTR_RST 0x0
+
+__INLINE uint16_t ble_ralcurrentptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RALCURRENTPTR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_ralcurrentptr_setf(uint16_t ralcurrentptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)ralcurrentptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_RALCURRENTPTR_ADDR, (uint32_t)ralcurrentptr << 0);
+}
+
+/**
+ * @brief RAL_LOCAL_RND register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 LRND_INIT 0
+ * 21:00 LRND_VAL 0x3F0F0F
+ *
+ */
+#define BLE_RAL_LOCAL_RND_ADDR 0x00900968
+#define BLE_RAL_LOCAL_RND_OFFSET 0x00000168
+#define BLE_RAL_LOCAL_RND_INDEX 0x0000005A
+#define BLE_RAL_LOCAL_RND_RESET 0x003F0F0F
+
+__INLINE uint32_t ble_ral_local_rnd_get(void)
+{
+ return REG_BLE_RD(BLE_RAL_LOCAL_RND_ADDR);
+}
+
+__INLINE void ble_ral_local_rnd_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RAL_LOCAL_RND_ADDR, value);
+}
+
+// field definitions
+#define BLE_LRND_INIT_BIT ((uint32_t)0x80000000)
+#define BLE_LRND_INIT_POS 31
+#define BLE_LRND_VAL_MASK ((uint32_t)0x003FFFFF)
+#define BLE_LRND_VAL_LSB 0
+#define BLE_LRND_VAL_WIDTH ((uint32_t)0x00000016)
+
+#define BLE_LRND_INIT_RST 0x0
+#define BLE_LRND_VAL_RST 0x3F0F0F
+
+__INLINE void ble_ral_local_rnd_pack(uint8_t lrndinit, uint32_t lrndval)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrndinit << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)lrndval << 0) & ~((uint32_t)0x003FFFFF)) == 0);
+ REG_BLE_WR(BLE_RAL_LOCAL_RND_ADDR, ((uint32_t)lrndinit << 31) | ((uint32_t)lrndval << 0));
+}
+
+__INLINE void ble_ral_local_rnd_unpack(uint8_t* lrndinit, uint32_t* lrndval)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RAL_LOCAL_RND_ADDR);
+
+ *lrndinit = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *lrndval = (localVal & ((uint32_t)0x003FFFFF)) >> 0;
+}
+
+__INLINE uint8_t ble_ral_local_rnd_lrnd_init_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RAL_LOCAL_RND_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_ral_local_rnd_lrnd_init_setf(uint8_t lrndinit)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrndinit << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_RAL_LOCAL_RND_ADDR, (REG_BLE_RD(BLE_RAL_LOCAL_RND_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)lrndinit << 31));
+}
+
+__INLINE uint32_t ble_ral_local_rnd_lrnd_val_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RAL_LOCAL_RND_ADDR);
+ return ((localVal & ((uint32_t)0x003FFFFF)) >> 0);
+}
+
+__INLINE void ble_ral_local_rnd_lrnd_val_setf(uint32_t lrndval)
+{
+ BLE_ASSERT_ERR((((uint32_t)lrndval << 0) & ~((uint32_t)0x003FFFFF)) == 0);
+ REG_BLE_WR(BLE_RAL_LOCAL_RND_ADDR, (REG_BLE_RD(BLE_RAL_LOCAL_RND_ADDR) & ~((uint32_t)0x003FFFFF)) | ((uint32_t)lrndval << 0));
+}
+
+/**
+ * @brief RAL_PEER_RND register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31 PRND_INIT 0
+ * 21:00 PRND_VAL 0x30F0F0
+ *
+ */
+#define BLE_RAL_PEER_RND_ADDR 0x0090096C
+#define BLE_RAL_PEER_RND_OFFSET 0x0000016C
+#define BLE_RAL_PEER_RND_INDEX 0x0000005B
+#define BLE_RAL_PEER_RND_RESET 0x0030F0F0
+
+__INLINE uint32_t ble_ral_peer_rnd_get(void)
+{
+ return REG_BLE_RD(BLE_RAL_PEER_RND_ADDR);
+}
+
+__INLINE void ble_ral_peer_rnd_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_RAL_PEER_RND_ADDR, value);
+}
+
+// field definitions
+#define BLE_PRND_INIT_BIT ((uint32_t)0x80000000)
+#define BLE_PRND_INIT_POS 31
+#define BLE_PRND_VAL_MASK ((uint32_t)0x003FFFFF)
+#define BLE_PRND_VAL_LSB 0
+#define BLE_PRND_VAL_WIDTH ((uint32_t)0x00000016)
+
+#define BLE_PRND_INIT_RST 0x0
+#define BLE_PRND_VAL_RST 0x30F0F0
+
+__INLINE void ble_ral_peer_rnd_pack(uint8_t prndinit, uint32_t prndval)
+{
+ BLE_ASSERT_ERR((((uint32_t)prndinit << 31) & ~((uint32_t)0x80000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)prndval << 0) & ~((uint32_t)0x003FFFFF)) == 0);
+ REG_BLE_WR(BLE_RAL_PEER_RND_ADDR, ((uint32_t)prndinit << 31) | ((uint32_t)prndval << 0));
+}
+
+__INLINE void ble_ral_peer_rnd_unpack(uint8_t* prndinit, uint32_t* prndval)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RAL_PEER_RND_ADDR);
+
+ *prndinit = (localVal & ((uint32_t)0x80000000)) >> 31;
+ *prndval = (localVal & ((uint32_t)0x003FFFFF)) >> 0;
+}
+
+__INLINE uint8_t ble_ral_peer_rnd_prnd_init_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RAL_PEER_RND_ADDR);
+ return ((localVal & ((uint32_t)0x80000000)) >> 31);
+}
+
+__INLINE void ble_ral_peer_rnd_prnd_init_setf(uint8_t prndinit)
+{
+ BLE_ASSERT_ERR((((uint32_t)prndinit << 31) & ~((uint32_t)0x80000000)) == 0);
+ REG_BLE_WR(BLE_RAL_PEER_RND_ADDR, (REG_BLE_RD(BLE_RAL_PEER_RND_ADDR) & ~((uint32_t)0x80000000)) | ((uint32_t)prndinit << 31));
+}
+
+__INLINE uint32_t ble_ral_peer_rnd_prnd_val_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_RAL_PEER_RND_ADDR);
+ return ((localVal & ((uint32_t)0x003FFFFF)) >> 0);
+}
+
+__INLINE void ble_ral_peer_rnd_prnd_val_setf(uint32_t prndval)
+{
+ BLE_ASSERT_ERR((((uint32_t)prndval << 0) & ~((uint32_t)0x003FFFFF)) == 0);
+ REG_BLE_WR(BLE_RAL_PEER_RND_ADDR, (REG_BLE_RD(BLE_RAL_PEER_RND_ADDR) & ~((uint32_t)0x003FFFFF)) | ((uint32_t)prndval << 0));
+}
+
+/**
+ * @brief DFCNTL0_1US register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 RXSAMPSTINST0_1US 0x0
+ * 23:16 RXSWSTINST0_1US 0x0
+ * 07:00 TXSWSTINST0_1US 0x0
+ *
+ */
+#define BLE_DFCNTL0_1US_ADDR 0x00900970
+#define BLE_DFCNTL0_1US_OFFSET 0x00000170
+#define BLE_DFCNTL0_1US_INDEX 0x0000005C
+#define BLE_DFCNTL0_1US_RESET 0x00000000
+
+__INLINE uint32_t ble_dfcntl0_1us_get(void)
+{
+ return REG_BLE_RD(BLE_DFCNTL0_1US_ADDR);
+}
+
+__INLINE void ble_dfcntl0_1us_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFCNTL0_1US_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXSAMPSTINST0_1US_MASK ((uint32_t)0xFF000000)
+#define BLE_RXSAMPSTINST0_1US_LSB 24
+#define BLE_RXSAMPSTINST0_1US_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXSWSTINST0_1US_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXSWSTINST0_1US_LSB 16
+#define BLE_RXSWSTINST0_1US_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXSWSTINST0_1US_MASK ((uint32_t)0x000000FF)
+#define BLE_TXSWSTINST0_1US_LSB 0
+#define BLE_TXSWSTINST0_1US_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_RXSAMPSTINST0_1US_RST 0x0
+#define BLE_RXSWSTINST0_1US_RST 0x0
+#define BLE_TXSWSTINST0_1US_RST 0x0
+
+__INLINE void ble_dfcntl0_1us_pack(uint8_t rxsampstinst01us, uint8_t rxswstinst01us, uint8_t txswstinst01us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst01us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst01us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txswstinst01us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_1US_ADDR, ((uint32_t)rxsampstinst01us << 24) | ((uint32_t)rxswstinst01us << 16) | ((uint32_t)txswstinst01us << 0));
+}
+
+__INLINE void ble_dfcntl0_1us_unpack(uint8_t* rxsampstinst01us, uint8_t* rxswstinst01us, uint8_t* txswstinst01us)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_1US_ADDR);
+
+ *rxsampstinst01us = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxswstinst01us = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txswstinst01us = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_dfcntl0_1us_rxsampstinst0_1us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_1US_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_dfcntl0_1us_rxsampstinst0_1us_setf(uint8_t rxsampstinst01us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst01us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_1US_ADDR, (REG_BLE_RD(BLE_DFCNTL0_1US_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)rxsampstinst01us << 24));
+}
+
+__INLINE uint8_t ble_dfcntl0_1us_rxswstinst0_1us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_1US_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_dfcntl0_1us_rxswstinst0_1us_setf(uint8_t rxswstinst01us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst01us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_1US_ADDR, (REG_BLE_RD(BLE_DFCNTL0_1US_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxswstinst01us << 16));
+}
+
+__INLINE uint8_t ble_dfcntl0_1us_txswstinst0_1us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_1US_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_dfcntl0_1us_txswstinst0_1us_setf(uint8_t txswstinst01us)
+{
+ BLE_ASSERT_ERR((((uint32_t)txswstinst01us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_1US_ADDR, (REG_BLE_RD(BLE_DFCNTL0_1US_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txswstinst01us << 0));
+}
+
+/**
+ * @brief DFCNTL0_2US register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 RXSAMPSTINST0_2US 0x0
+ * 23:16 RXSWSTINST0_2US 0x0
+ * 07:00 TXSWSTINST0_2US 0x0
+ *
+ */
+#define BLE_DFCNTL0_2US_ADDR 0x00900974
+#define BLE_DFCNTL0_2US_OFFSET 0x00000174
+#define BLE_DFCNTL0_2US_INDEX 0x0000005D
+#define BLE_DFCNTL0_2US_RESET 0x00000000
+
+__INLINE uint32_t ble_dfcntl0_2us_get(void)
+{
+ return REG_BLE_RD(BLE_DFCNTL0_2US_ADDR);
+}
+
+__INLINE void ble_dfcntl0_2us_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFCNTL0_2US_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXSAMPSTINST0_2US_MASK ((uint32_t)0xFF000000)
+#define BLE_RXSAMPSTINST0_2US_LSB 24
+#define BLE_RXSAMPSTINST0_2US_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXSWSTINST0_2US_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXSWSTINST0_2US_LSB 16
+#define BLE_RXSWSTINST0_2US_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXSWSTINST0_2US_MASK ((uint32_t)0x000000FF)
+#define BLE_TXSWSTINST0_2US_LSB 0
+#define BLE_TXSWSTINST0_2US_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_RXSAMPSTINST0_2US_RST 0x0
+#define BLE_RXSWSTINST0_2US_RST 0x0
+#define BLE_TXSWSTINST0_2US_RST 0x0
+
+__INLINE void ble_dfcntl0_2us_pack(uint8_t rxsampstinst02us, uint8_t rxswstinst02us, uint8_t txswstinst02us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst02us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst02us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txswstinst02us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_2US_ADDR, ((uint32_t)rxsampstinst02us << 24) | ((uint32_t)rxswstinst02us << 16) | ((uint32_t)txswstinst02us << 0));
+}
+
+__INLINE void ble_dfcntl0_2us_unpack(uint8_t* rxsampstinst02us, uint8_t* rxswstinst02us, uint8_t* txswstinst02us)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_2US_ADDR);
+
+ *rxsampstinst02us = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxswstinst02us = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txswstinst02us = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_dfcntl0_2us_rxsampstinst0_2us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_2US_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_dfcntl0_2us_rxsampstinst0_2us_setf(uint8_t rxsampstinst02us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst02us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_2US_ADDR, (REG_BLE_RD(BLE_DFCNTL0_2US_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)rxsampstinst02us << 24));
+}
+
+__INLINE uint8_t ble_dfcntl0_2us_rxswstinst0_2us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_2US_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_dfcntl0_2us_rxswstinst0_2us_setf(uint8_t rxswstinst02us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst02us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_2US_ADDR, (REG_BLE_RD(BLE_DFCNTL0_2US_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxswstinst02us << 16));
+}
+
+__INLINE uint8_t ble_dfcntl0_2us_txswstinst0_2us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL0_2US_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_dfcntl0_2us_txswstinst0_2us_setf(uint8_t txswstinst02us)
+{
+ BLE_ASSERT_ERR((((uint32_t)txswstinst02us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL0_2US_ADDR, (REG_BLE_RD(BLE_DFCNTL0_2US_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txswstinst02us << 0));
+}
+
+/**
+ * @brief DFCNTL1_1US register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 RXSAMPSTINST1_1US 0x0
+ * 23:16 RXSWSTINST1_1US 0x0
+ * 07:00 TXSWSTINST1_1US 0x0
+ *
+ */
+#define BLE_DFCNTL1_1US_ADDR 0x00900978
+#define BLE_DFCNTL1_1US_OFFSET 0x00000178
+#define BLE_DFCNTL1_1US_INDEX 0x0000005E
+#define BLE_DFCNTL1_1US_RESET 0x00000000
+
+__INLINE uint32_t ble_dfcntl1_1us_get(void)
+{
+ return REG_BLE_RD(BLE_DFCNTL1_1US_ADDR);
+}
+
+__INLINE void ble_dfcntl1_1us_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFCNTL1_1US_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXSAMPSTINST1_1US_MASK ((uint32_t)0xFF000000)
+#define BLE_RXSAMPSTINST1_1US_LSB 24
+#define BLE_RXSAMPSTINST1_1US_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXSWSTINST1_1US_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXSWSTINST1_1US_LSB 16
+#define BLE_RXSWSTINST1_1US_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXSWSTINST1_1US_MASK ((uint32_t)0x000000FF)
+#define BLE_TXSWSTINST1_1US_LSB 0
+#define BLE_TXSWSTINST1_1US_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_RXSAMPSTINST1_1US_RST 0x0
+#define BLE_RXSWSTINST1_1US_RST 0x0
+#define BLE_TXSWSTINST1_1US_RST 0x0
+
+__INLINE void ble_dfcntl1_1us_pack(uint8_t rxsampstinst11us, uint8_t rxswstinst11us, uint8_t txswstinst11us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst11us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst11us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txswstinst11us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_1US_ADDR, ((uint32_t)rxsampstinst11us << 24) | ((uint32_t)rxswstinst11us << 16) | ((uint32_t)txswstinst11us << 0));
+}
+
+__INLINE void ble_dfcntl1_1us_unpack(uint8_t* rxsampstinst11us, uint8_t* rxswstinst11us, uint8_t* txswstinst11us)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_1US_ADDR);
+
+ *rxsampstinst11us = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxswstinst11us = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txswstinst11us = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_dfcntl1_1us_rxsampstinst1_1us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_1US_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_dfcntl1_1us_rxsampstinst1_1us_setf(uint8_t rxsampstinst11us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst11us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_1US_ADDR, (REG_BLE_RD(BLE_DFCNTL1_1US_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)rxsampstinst11us << 24));
+}
+
+__INLINE uint8_t ble_dfcntl1_1us_rxswstinst1_1us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_1US_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_dfcntl1_1us_rxswstinst1_1us_setf(uint8_t rxswstinst11us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst11us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_1US_ADDR, (REG_BLE_RD(BLE_DFCNTL1_1US_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxswstinst11us << 16));
+}
+
+__INLINE uint8_t ble_dfcntl1_1us_txswstinst1_1us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_1US_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_dfcntl1_1us_txswstinst1_1us_setf(uint8_t txswstinst11us)
+{
+ BLE_ASSERT_ERR((((uint32_t)txswstinst11us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_1US_ADDR, (REG_BLE_RD(BLE_DFCNTL1_1US_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txswstinst11us << 0));
+}
+
+/**
+ * @brief DFCNTL1_2US register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 31:24 RXSAMPSTINST1_2US 0x0
+ * 23:16 RXSWSTINST1_2US 0x0
+ * 07:00 TXSWSTINST1_2US 0x0
+ *
+ */
+#define BLE_DFCNTL1_2US_ADDR 0x0090097C
+#define BLE_DFCNTL1_2US_OFFSET 0x0000017C
+#define BLE_DFCNTL1_2US_INDEX 0x0000005F
+#define BLE_DFCNTL1_2US_RESET 0x00000000
+
+__INLINE uint32_t ble_dfcntl1_2us_get(void)
+{
+ return REG_BLE_RD(BLE_DFCNTL1_2US_ADDR);
+}
+
+__INLINE void ble_dfcntl1_2us_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFCNTL1_2US_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXSAMPSTINST1_2US_MASK ((uint32_t)0xFF000000)
+#define BLE_RXSAMPSTINST1_2US_LSB 24
+#define BLE_RXSAMPSTINST1_2US_WIDTH ((uint32_t)0x00000008)
+#define BLE_RXSWSTINST1_2US_MASK ((uint32_t)0x00FF0000)
+#define BLE_RXSWSTINST1_2US_LSB 16
+#define BLE_RXSWSTINST1_2US_WIDTH ((uint32_t)0x00000008)
+#define BLE_TXSWSTINST1_2US_MASK ((uint32_t)0x000000FF)
+#define BLE_TXSWSTINST1_2US_LSB 0
+#define BLE_TXSWSTINST1_2US_WIDTH ((uint32_t)0x00000008)
+
+#define BLE_RXSAMPSTINST1_2US_RST 0x0
+#define BLE_RXSWSTINST1_2US_RST 0x0
+#define BLE_TXSWSTINST1_2US_RST 0x0
+
+__INLINE void ble_dfcntl1_2us_pack(uint8_t rxsampstinst12us, uint8_t rxswstinst12us, uint8_t txswstinst12us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst12us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst12us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txswstinst12us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_2US_ADDR, ((uint32_t)rxsampstinst12us << 24) | ((uint32_t)rxswstinst12us << 16) | ((uint32_t)txswstinst12us << 0));
+}
+
+__INLINE void ble_dfcntl1_2us_unpack(uint8_t* rxsampstinst12us, uint8_t* rxswstinst12us, uint8_t* txswstinst12us)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_2US_ADDR);
+
+ *rxsampstinst12us = (localVal & ((uint32_t)0xFF000000)) >> 24;
+ *rxswstinst12us = (localVal & ((uint32_t)0x00FF0000)) >> 16;
+ *txswstinst12us = (localVal & ((uint32_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t ble_dfcntl1_2us_rxsampstinst1_2us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_2US_ADDR);
+ return ((localVal & ((uint32_t)0xFF000000)) >> 24);
+}
+
+__INLINE void ble_dfcntl1_2us_rxsampstinst1_2us_setf(uint8_t rxsampstinst12us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxsampstinst12us << 24) & ~((uint32_t)0xFF000000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_2US_ADDR, (REG_BLE_RD(BLE_DFCNTL1_2US_ADDR) & ~((uint32_t)0xFF000000)) | ((uint32_t)rxsampstinst12us << 24));
+}
+
+__INLINE uint8_t ble_dfcntl1_2us_rxswstinst1_2us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_2US_ADDR);
+ return ((localVal & ((uint32_t)0x00FF0000)) >> 16);
+}
+
+__INLINE void ble_dfcntl1_2us_rxswstinst1_2us_setf(uint8_t rxswstinst12us)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxswstinst12us << 16) & ~((uint32_t)0x00FF0000)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_2US_ADDR, (REG_BLE_RD(BLE_DFCNTL1_2US_ADDR) & ~((uint32_t)0x00FF0000)) | ((uint32_t)rxswstinst12us << 16));
+}
+
+__INLINE uint8_t ble_dfcntl1_2us_txswstinst1_2us_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCNTL1_2US_ADDR);
+ return ((localVal & ((uint32_t)0x000000FF)) >> 0);
+}
+
+__INLINE void ble_dfcntl1_2us_txswstinst1_2us_setf(uint8_t txswstinst12us)
+{
+ BLE_ASSERT_ERR((((uint32_t)txswstinst12us << 0) & ~((uint32_t)0x000000FF)) == 0);
+ REG_BLE_WR(BLE_DFCNTL1_2US_ADDR, (REG_BLE_RD(BLE_DFCNTL1_2US_ADDR) & ~((uint32_t)0x000000FF)) | ((uint32_t)txswstinst12us << 0));
+}
+
+/**
+ * @brief DFCURRENTPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 DFCURRENTPTR 0x0
+ *
+ */
+#define BLE_DFCURRENTPTR_ADDR 0x00900980
+#define BLE_DFCURRENTPTR_OFFSET 0x00000180
+#define BLE_DFCURRENTPTR_INDEX 0x00000060
+#define BLE_DFCURRENTPTR_RESET 0x00000000
+
+__INLINE uint32_t ble_dfcurrentptr_get(void)
+{
+ return REG_BLE_RD(BLE_DFCURRENTPTR_ADDR);
+}
+
+__INLINE void ble_dfcurrentptr_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFCURRENTPTR_ADDR, value);
+}
+
+// field definitions
+#define BLE_DFCURRENTPTR_MASK ((uint32_t)0x00003FFF)
+#define BLE_DFCURRENTPTR_LSB 0
+#define BLE_DFCURRENTPTR_WIDTH ((uint32_t)0x0000000E)
+
+#define BLE_DFCURRENTPTR_RST 0x0
+
+__INLINE uint16_t ble_dfcurrentptr_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFCURRENTPTR_ADDR);
+ BLE_ASSERT_ERR((localVal & ~((uint32_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void ble_dfcurrentptr_setf(uint16_t dfcurrentptr)
+{
+ BLE_ASSERT_ERR((((uint32_t)dfcurrentptr << 0) & ~((uint32_t)0x00003FFF)) == 0);
+ REG_BLE_WR(BLE_DFCURRENTPTR_ADDR, (uint32_t)dfcurrentptr << 0);
+}
+
+/**
+ * @brief DFANTCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXPRIMIDCNTLEN 0
+ * 14:08 RXPRIMANTID 0x0
+ * 07 TXPRIMIDCNTLEN 0
+ * 06:00 TXPRIMANTID 0x0
+ *
+ */
+#define BLE_DFANTCNTL_ADDR 0x00900984
+#define BLE_DFANTCNTL_OFFSET 0x00000184
+#define BLE_DFANTCNTL_INDEX 0x00000061
+#define BLE_DFANTCNTL_RESET 0x00000000
+
+__INLINE uint32_t ble_dfantcntl_get(void)
+{
+ return REG_BLE_RD(BLE_DFANTCNTL_ADDR);
+}
+
+__INLINE void ble_dfantcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFANTCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_RXPRIMIDCNTLEN_BIT ((uint32_t)0x00008000)
+#define BLE_RXPRIMIDCNTLEN_POS 15
+#define BLE_RXPRIMANTID_MASK ((uint32_t)0x00007F00)
+#define BLE_RXPRIMANTID_LSB 8
+#define BLE_RXPRIMANTID_WIDTH ((uint32_t)0x00000007)
+#define BLE_TXPRIMIDCNTLEN_BIT ((uint32_t)0x00000080)
+#define BLE_TXPRIMIDCNTLEN_POS 7
+#define BLE_TXPRIMANTID_MASK ((uint32_t)0x0000007F)
+#define BLE_TXPRIMANTID_LSB 0
+#define BLE_TXPRIMANTID_WIDTH ((uint32_t)0x00000007)
+
+#define BLE_RXPRIMIDCNTLEN_RST 0x0
+#define BLE_RXPRIMANTID_RST 0x0
+#define BLE_TXPRIMIDCNTLEN_RST 0x0
+#define BLE_TXPRIMANTID_RST 0x0
+
+__INLINE void ble_dfantcntl_pack(uint8_t rxprimidcntlen, uint8_t rxprimantid, uint8_t txprimidcntlen, uint8_t txprimantid)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxprimidcntlen << 15) & ~((uint32_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)rxprimantid << 8) & ~((uint32_t)0x00007F00)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txprimidcntlen << 7) & ~((uint32_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)txprimantid << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_DFANTCNTL_ADDR, ((uint32_t)rxprimidcntlen << 15) | ((uint32_t)rxprimantid << 8) | ((uint32_t)txprimidcntlen << 7) | ((uint32_t)txprimantid << 0));
+}
+
+__INLINE void ble_dfantcntl_unpack(uint8_t* rxprimidcntlen, uint8_t* rxprimantid, uint8_t* txprimidcntlen, uint8_t* txprimantid)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFANTCNTL_ADDR);
+
+ *rxprimidcntlen = (localVal & ((uint32_t)0x00008000)) >> 15;
+ *rxprimantid = (localVal & ((uint32_t)0x00007F00)) >> 8;
+ *txprimidcntlen = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *txprimantid = (localVal & ((uint32_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t ble_dfantcntl_rxprimidcntlen_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFANTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00008000)) >> 15);
+}
+
+__INLINE void ble_dfantcntl_rxprimidcntlen_setf(uint8_t rxprimidcntlen)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxprimidcntlen << 15) & ~((uint32_t)0x00008000)) == 0);
+ REG_BLE_WR(BLE_DFANTCNTL_ADDR, (REG_BLE_RD(BLE_DFANTCNTL_ADDR) & ~((uint32_t)0x00008000)) | ((uint32_t)rxprimidcntlen << 15));
+}
+
+__INLINE uint8_t ble_dfantcntl_rxprimantid_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFANTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00007F00)) >> 8);
+}
+
+__INLINE void ble_dfantcntl_rxprimantid_setf(uint8_t rxprimantid)
+{
+ BLE_ASSERT_ERR((((uint32_t)rxprimantid << 8) & ~((uint32_t)0x00007F00)) == 0);
+ REG_BLE_WR(BLE_DFANTCNTL_ADDR, (REG_BLE_RD(BLE_DFANTCNTL_ADDR) & ~((uint32_t)0x00007F00)) | ((uint32_t)rxprimantid << 8));
+}
+
+__INLINE uint8_t ble_dfantcntl_txprimidcntlen_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFANTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE void ble_dfantcntl_txprimidcntlen_setf(uint8_t txprimidcntlen)
+{
+ BLE_ASSERT_ERR((((uint32_t)txprimidcntlen << 7) & ~((uint32_t)0x00000080)) == 0);
+ REG_BLE_WR(BLE_DFANTCNTL_ADDR, (REG_BLE_RD(BLE_DFANTCNTL_ADDR) & ~((uint32_t)0x00000080)) | ((uint32_t)txprimidcntlen << 7));
+}
+
+__INLINE uint8_t ble_dfantcntl_txprimantid_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFANTCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x0000007F)) >> 0);
+}
+
+__INLINE void ble_dfantcntl_txprimantid_setf(uint8_t txprimantid)
+{
+ BLE_ASSERT_ERR((((uint32_t)txprimantid << 0) & ~((uint32_t)0x0000007F)) == 0);
+ REG_BLE_WR(BLE_DFANTCNTL_ADDR, (REG_BLE_RD(BLE_DFANTCNTL_ADDR) & ~((uint32_t)0x0000007F)) | ((uint32_t)txprimantid << 0));
+}
+
+/**
+ * @brief DFIFCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 07 ANTSWITCH_BEH 0
+ * 06 SAMPREQ_BEH 0
+ * 05:04 SAMPVALID_BEH 0x0
+ * 03:02 IF_WIDTH 0x3
+ * 01 MSB_LSB_ORDER 0
+ * 00 SYMBOL_ORDER 0
+ *
+ */
+#define BLE_DFIFCNTL_ADDR 0x00900988
+#define BLE_DFIFCNTL_OFFSET 0x00000188
+#define BLE_DFIFCNTL_INDEX 0x00000062
+#define BLE_DFIFCNTL_RESET 0x0000000C
+
+__INLINE uint32_t ble_dfifcntl_get(void)
+{
+ return REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+}
+
+__INLINE void ble_dfifcntl_set(uint32_t value)
+{
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, value);
+}
+
+// field definitions
+#define BLE_ANTSWITCH_BEH_BIT ((uint32_t)0x00000080)
+#define BLE_ANTSWITCH_BEH_POS 7
+#define BLE_SAMPREQ_BEH_BIT ((uint32_t)0x00000040)
+#define BLE_SAMPREQ_BEH_POS 6
+#define BLE_SAMPVALID_BEH_MASK ((uint32_t)0x00000030)
+#define BLE_SAMPVALID_BEH_LSB 4
+#define BLE_SAMPVALID_BEH_WIDTH ((uint32_t)0x00000002)
+#define BLE_IF_WIDTH_MASK ((uint32_t)0x0000000C)
+#define BLE_IF_WIDTH_LSB 2
+#define BLE_IF_WIDTH_WIDTH ((uint32_t)0x00000002)
+#define BLE_MSB_LSB_ORDER_BIT ((uint32_t)0x00000002)
+#define BLE_MSB_LSB_ORDER_POS 1
+#define BLE_SYMBOL_ORDER_BIT ((uint32_t)0x00000001)
+#define BLE_SYMBOL_ORDER_POS 0
+
+#define BLE_ANTSWITCH_BEH_RST 0x0
+#define BLE_SAMPREQ_BEH_RST 0x0
+#define BLE_SAMPVALID_BEH_RST 0x0
+#define BLE_IF_WIDTH_RST 0x3
+#define BLE_MSB_LSB_ORDER_RST 0x0
+#define BLE_SYMBOL_ORDER_RST 0x0
+
+__INLINE void ble_dfifcntl_pack(uint8_t antswitchbeh, uint8_t sampreqbeh, uint8_t sampvalidbeh, uint8_t ifwidth, uint8_t msblsborder, uint8_t symbolorder)
+{
+ BLE_ASSERT_ERR((((uint32_t)antswitchbeh << 7) & ~((uint32_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)sampreqbeh << 6) & ~((uint32_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)sampvalidbeh << 4) & ~((uint32_t)0x00000030)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)ifwidth << 2) & ~((uint32_t)0x0000000C)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)msblsborder << 1) & ~((uint32_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint32_t)symbolorder << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, ((uint32_t)antswitchbeh << 7) | ((uint32_t)sampreqbeh << 6) | ((uint32_t)sampvalidbeh << 4) | ((uint32_t)ifwidth << 2) | ((uint32_t)msblsborder << 1) | ((uint32_t)symbolorder << 0));
+}
+
+__INLINE void ble_dfifcntl_unpack(uint8_t* antswitchbeh, uint8_t* sampreqbeh, uint8_t* sampvalidbeh, uint8_t* ifwidth, uint8_t* msblsborder, uint8_t* symbolorder)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+
+ *antswitchbeh = (localVal & ((uint32_t)0x00000080)) >> 7;
+ *sampreqbeh = (localVal & ((uint32_t)0x00000040)) >> 6;
+ *sampvalidbeh = (localVal & ((uint32_t)0x00000030)) >> 4;
+ *ifwidth = (localVal & ((uint32_t)0x0000000C)) >> 2;
+ *msblsborder = (localVal & ((uint32_t)0x00000002)) >> 1;
+ *symbolorder = (localVal & ((uint32_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t ble_dfifcntl_antswitch_beh_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000080)) >> 7);
+}
+
+__INLINE void ble_dfifcntl_antswitch_beh_setf(uint8_t antswitchbeh)
+{
+ BLE_ASSERT_ERR((((uint32_t)antswitchbeh << 7) & ~((uint32_t)0x00000080)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, (REG_BLE_RD(BLE_DFIFCNTL_ADDR) & ~((uint32_t)0x00000080)) | ((uint32_t)antswitchbeh << 7));
+}
+
+__INLINE uint8_t ble_dfifcntl_sampreq_beh_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000040)) >> 6);
+}
+
+__INLINE void ble_dfifcntl_sampreq_beh_setf(uint8_t sampreqbeh)
+{
+ BLE_ASSERT_ERR((((uint32_t)sampreqbeh << 6) & ~((uint32_t)0x00000040)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, (REG_BLE_RD(BLE_DFIFCNTL_ADDR) & ~((uint32_t)0x00000040)) | ((uint32_t)sampreqbeh << 6));
+}
+
+__INLINE uint8_t ble_dfifcntl_sampvalid_beh_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000030)) >> 4);
+}
+
+__INLINE void ble_dfifcntl_sampvalid_beh_setf(uint8_t sampvalidbeh)
+{
+ BLE_ASSERT_ERR((((uint32_t)sampvalidbeh << 4) & ~((uint32_t)0x00000030)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, (REG_BLE_RD(BLE_DFIFCNTL_ADDR) & ~((uint32_t)0x00000030)) | ((uint32_t)sampvalidbeh << 4));
+}
+
+__INLINE uint8_t ble_dfifcntl_if_width_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x0000000C)) >> 2);
+}
+
+__INLINE void ble_dfifcntl_if_width_setf(uint8_t ifwidth)
+{
+ BLE_ASSERT_ERR((((uint32_t)ifwidth << 2) & ~((uint32_t)0x0000000C)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, (REG_BLE_RD(BLE_DFIFCNTL_ADDR) & ~((uint32_t)0x0000000C)) | ((uint32_t)ifwidth << 2));
+}
+
+__INLINE uint8_t ble_dfifcntl_msb_lsb_order_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000002)) >> 1);
+}
+
+__INLINE void ble_dfifcntl_msb_lsb_order_setf(uint8_t msblsborder)
+{
+ BLE_ASSERT_ERR((((uint32_t)msblsborder << 1) & ~((uint32_t)0x00000002)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, (REG_BLE_RD(BLE_DFIFCNTL_ADDR) & ~((uint32_t)0x00000002)) | ((uint32_t)msblsborder << 1));
+}
+
+__INLINE uint8_t ble_dfifcntl_symbol_order_getf(void)
+{
+ uint32_t localVal = REG_BLE_RD(BLE_DFIFCNTL_ADDR);
+ return ((localVal & ((uint32_t)0x00000001)) >> 0);
+}
+
+__INLINE void ble_dfifcntl_symbol_order_setf(uint8_t symbolorder)
+{
+ BLE_ASSERT_ERR((((uint32_t)symbolorder << 0) & ~((uint32_t)0x00000001)) == 0);
+ REG_BLE_WR(BLE_DFIFCNTL_ADDR, (REG_BLE_RD(BLE_DFIFCNTL_ADDR) & ~((uint32_t)0x00000001)) | ((uint32_t)symbolorder << 0));
+}
+
+
+#endif // _REG_BLECORE_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_cs.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_cs.h
new file mode 100755
index 0000000..40a8667
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_cs.h
@@ -0,0 +1,3783 @@
+#ifndef _REG_EM_BLE_CS_H_
+#define _REG_EM_BLE_CS_H_
+
+#include
+#include "_reg_em_ble_cs.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_CS_COUNT 56
+
+#define REG_EM_BLE_CS_DECODING_MASK 0x0000007F
+
+#define REG_EM_BLE_CS_ADDR_GET(idx) (EM_BLE_CS_OFFSET + (idx) * REG_EM_BLE_CS_SIZE)
+
+/**
+ * @brief CNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 10 TXBSY_EN 0
+ * 09 RXBSY_EN 0
+ * 08 DNABORT 0
+ * 04:00 FORMAT 0x0
+ *
+ */
+#define EM_BLE_CNTL_ADDR (0x00910000 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CNTL_INDEX 0x00000000
+#define EM_BLE_CNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_cntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_cntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXBSY_EN_BIT ((uint16_t)0x00000400)
+#define EM_BLE_TXBSY_EN_POS 10
+#define EM_BLE_RXBSY_EN_BIT ((uint16_t)0x00000200)
+#define EM_BLE_RXBSY_EN_POS 9
+#define EM_BLE_DNABORT_BIT ((uint16_t)0x00000100)
+#define EM_BLE_DNABORT_POS 8
+#define EM_BLE_FORMAT_MASK ((uint16_t)0x0000001F)
+#define EM_BLE_FORMAT_LSB 0
+#define EM_BLE_FORMAT_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_TXBSY_EN_RST 0x0
+#define EM_BLE_RXBSY_EN_RST 0x0
+#define EM_BLE_DNABORT_RST 0x0
+#define EM_BLE_FORMAT_RST 0x0
+
+__INLINE void em_ble_cntl_pack(int elt_idx, uint8_t txbsyen, uint8_t rxbsyen, uint8_t dnabort, uint8_t format)
+{
+ BLE_ASSERT_ERR((((uint16_t)txbsyen << 10) & ~((uint16_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxbsyen << 9) & ~((uint16_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)dnabort << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)format << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)txbsyen << 10) | ((uint16_t)rxbsyen << 9) | ((uint16_t)dnabort << 8) | ((uint16_t)format << 0));
+}
+
+__INLINE void em_ble_cntl_unpack(int elt_idx, uint8_t* txbsyen, uint8_t* rxbsyen, uint8_t* dnabort, uint8_t* format)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *txbsyen = (localVal & ((uint16_t)0x00000400)) >> 10;
+ *rxbsyen = (localVal & ((uint16_t)0x00000200)) >> 9;
+ *dnabort = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *format = (localVal & ((uint16_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_cntl_txbsy_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000400)) >> 10);
+}
+
+__INLINE void em_ble_cntl_txbsy_en_setf(int elt_idx, uint8_t txbsyen)
+{
+ BLE_ASSERT_ERR((((uint16_t)txbsyen << 10) & ~((uint16_t)0x00000400)) == 0);
+ EM_BLE_WR(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000400)) | ((uint16_t)txbsyen << 10));
+}
+
+__INLINE uint8_t em_ble_cntl_rxbsy_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000200)) >> 9);
+}
+
+__INLINE void em_ble_cntl_rxbsy_en_setf(int elt_idx, uint8_t rxbsyen)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbsyen << 9) & ~((uint16_t)0x00000200)) == 0);
+ EM_BLE_WR(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000200)) | ((uint16_t)rxbsyen << 9));
+}
+
+__INLINE uint8_t em_ble_cntl_dnabort_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_cntl_dnabort_setf(int elt_idx, uint8_t dnabort)
+{
+ BLE_ASSERT_ERR((((uint16_t)dnabort << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)dnabort << 8));
+}
+
+__INLINE uint8_t em_ble_cntl_format_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000001F)) >> 0);
+}
+
+__INLINE void em_ble_cntl_format_setf(int elt_idx, uint8_t format)
+{
+ BLE_ASSERT_ERR((((uint16_t)format << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000001F)) | ((uint16_t)format << 0));
+}
+
+/**
+ * @brief LINKCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 12:08 LINKLBL 0x0
+ * 06 SAS 0
+ * 05 NULLRXLLIDFLT 0
+ * 04 MIC_MODE 0
+ * 03 CRYPT_MODE 0
+ * 02 TXCRYPT_EN 0
+ * 01 RXCRYPT_EN 0
+ * 00 PRIV_NPUB 0
+ *
+ */
+#define EM_BLE_LINKCNTL_ADDR (0x00910002 + EM_BLE_CS_OFFSET)
+#define EM_BLE_LINKCNTL_INDEX 0x00000001
+#define EM_BLE_LINKCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_linkcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_linkcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_LINKLBL_MASK ((uint16_t)0x00001F00)
+#define EM_BLE_LINKLBL_LSB 8
+#define EM_BLE_LINKLBL_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_SAS_BIT ((uint16_t)0x00000040)
+#define EM_BLE_SAS_POS 6
+#define EM_BLE_NULLRXLLIDFLT_BIT ((uint16_t)0x00000020)
+#define EM_BLE_NULLRXLLIDFLT_POS 5
+#define EM_BLE_MIC_MODE_BIT ((uint16_t)0x00000010)
+#define EM_BLE_MIC_MODE_POS 4
+#define EM_BLE_CRYPT_MODE_BIT ((uint16_t)0x00000008)
+#define EM_BLE_CRYPT_MODE_POS 3
+#define EM_BLE_TXCRYPT_EN_BIT ((uint16_t)0x00000004)
+#define EM_BLE_TXCRYPT_EN_POS 2
+#define EM_BLE_RXCRYPT_EN_BIT ((uint16_t)0x00000002)
+#define EM_BLE_RXCRYPT_EN_POS 1
+#define EM_BLE_PRIV_NPUB_BIT ((uint16_t)0x00000001)
+#define EM_BLE_PRIV_NPUB_POS 0
+
+#define EM_BLE_LINKLBL_RST 0x0
+#define EM_BLE_SAS_RST 0x0
+#define EM_BLE_NULLRXLLIDFLT_RST 0x0
+#define EM_BLE_MIC_MODE_RST 0x0
+#define EM_BLE_CRYPT_MODE_RST 0x0
+#define EM_BLE_TXCRYPT_EN_RST 0x0
+#define EM_BLE_RXCRYPT_EN_RST 0x0
+#define EM_BLE_PRIV_NPUB_RST 0x0
+
+__INLINE void em_ble_linkcntl_pack(int elt_idx, uint8_t linklbl, uint8_t sas, uint8_t nullrxllidflt, uint8_t micmode, uint8_t cryptmode, uint8_t txcrypten, uint8_t rxcrypten, uint8_t privnpub)
+{
+ BLE_ASSERT_ERR((((uint16_t)linklbl << 8) & ~((uint16_t)0x00001F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)sas << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)nullrxllidflt << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)micmode << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)cryptmode << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txcrypten << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxcrypten << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)privnpub << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)linklbl << 8) | ((uint16_t)sas << 6) | ((uint16_t)nullrxllidflt << 5) | ((uint16_t)micmode << 4) | ((uint16_t)cryptmode << 3) | ((uint16_t)txcrypten << 2) | ((uint16_t)rxcrypten << 1) | ((uint16_t)privnpub << 0));
+}
+
+__INLINE void em_ble_linkcntl_unpack(int elt_idx, uint8_t* linklbl, uint8_t* sas, uint8_t* nullrxllidflt, uint8_t* micmode, uint8_t* cryptmode, uint8_t* txcrypten, uint8_t* rxcrypten, uint8_t* privnpub)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *linklbl = (localVal & ((uint16_t)0x00001F00)) >> 8;
+ *sas = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *nullrxllidflt = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *micmode = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *cryptmode = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *txcrypten = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *rxcrypten = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *privnpub = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_linkcntl_linklbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00001F00)) >> 8);
+}
+
+__INLINE void em_ble_linkcntl_linklbl_setf(int elt_idx, uint8_t linklbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)linklbl << 8) & ~((uint16_t)0x00001F00)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00001F00)) | ((uint16_t)linklbl << 8));
+}
+
+__INLINE uint8_t em_ble_linkcntl_sas_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_linkcntl_sas_setf(int elt_idx, uint8_t sas)
+{
+ BLE_ASSERT_ERR((((uint16_t)sas << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)sas << 6));
+}
+
+__INLINE uint8_t em_ble_linkcntl_nullrxllidflt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_linkcntl_nullrxllidflt_setf(int elt_idx, uint8_t nullrxllidflt)
+{
+ BLE_ASSERT_ERR((((uint16_t)nullrxllidflt << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)nullrxllidflt << 5));
+}
+
+__INLINE uint8_t em_ble_linkcntl_mic_mode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_linkcntl_mic_mode_setf(int elt_idx, uint8_t micmode)
+{
+ BLE_ASSERT_ERR((((uint16_t)micmode << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)micmode << 4));
+}
+
+__INLINE uint8_t em_ble_linkcntl_crypt_mode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_linkcntl_crypt_mode_setf(int elt_idx, uint8_t cryptmode)
+{
+ BLE_ASSERT_ERR((((uint16_t)cryptmode << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)cryptmode << 3));
+}
+
+__INLINE uint8_t em_ble_linkcntl_txcrypt_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_linkcntl_txcrypt_en_setf(int elt_idx, uint8_t txcrypten)
+{
+ BLE_ASSERT_ERR((((uint16_t)txcrypten << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)txcrypten << 2));
+}
+
+__INLINE uint8_t em_ble_linkcntl_rxcrypt_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_linkcntl_rxcrypt_en_setf(int elt_idx, uint8_t rxcrypten)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcrypten << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)rxcrypten << 1));
+}
+
+__INLINE uint8_t em_ble_linkcntl_priv_npub_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_linkcntl_priv_npub_setf(int elt_idx, uint8_t privnpub)
+{
+ BLE_ASSERT_ERR((((uint16_t)privnpub << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_LINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)privnpub << 0));
+}
+
+/**
+ * @brief ISOLINKCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:11 STREAM_LBL 0x0
+ * 10:08 GROUP_LBL 0x0
+ * 03 ISOSYNCMODE 0
+ * 02 ISOSYNCEN 0
+ * 01:00 ISOTYPE 0x0
+ *
+ */
+#define EM_BLE_ISOLINKCNTL_ADDR (0x00910004 + EM_BLE_CS_OFFSET)
+#define EM_BLE_ISOLINKCNTL_INDEX 0x00000002
+#define EM_BLE_ISOLINKCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_isolinkcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_isolinkcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_STREAM_LBL_MASK ((uint16_t)0x0000F800)
+#define EM_BLE_STREAM_LBL_LSB 11
+#define EM_BLE_STREAM_LBL_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_GROUP_LBL_MASK ((uint16_t)0x00000700)
+#define EM_BLE_GROUP_LBL_LSB 8
+#define EM_BLE_GROUP_LBL_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_ISOSYNCMODE_BIT ((uint16_t)0x00000008)
+#define EM_BLE_ISOSYNCMODE_POS 3
+#define EM_BLE_ISOSYNCEN_BIT ((uint16_t)0x00000004)
+#define EM_BLE_ISOSYNCEN_POS 2
+#define EM_BLE_ISOTYPE_MASK ((uint16_t)0x00000003)
+#define EM_BLE_ISOTYPE_LSB 0
+#define EM_BLE_ISOTYPE_WIDTH ((uint16_t)0x00000002)
+
+#define EM_BLE_STREAM_LBL_RST 0x0
+#define EM_BLE_GROUP_LBL_RST 0x0
+#define EM_BLE_ISOSYNCMODE_RST 0x0
+#define EM_BLE_ISOSYNCEN_RST 0x0
+#define EM_BLE_ISOTYPE_RST 0x0
+
+__INLINE void em_ble_isolinkcntl_pack(int elt_idx, uint8_t streamlbl, uint8_t grouplbl, uint8_t isosyncmode, uint8_t isosyncen, uint8_t isotype)
+{
+ BLE_ASSERT_ERR((((uint16_t)streamlbl << 11) & ~((uint16_t)0x0000F800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)grouplbl << 8) & ~((uint16_t)0x00000700)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isosyncmode << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isosyncen << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isotype << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)streamlbl << 11) | ((uint16_t)grouplbl << 8) | ((uint16_t)isosyncmode << 3) | ((uint16_t)isosyncen << 2) | ((uint16_t)isotype << 0));
+}
+
+__INLINE void em_ble_isolinkcntl_unpack(int elt_idx, uint8_t* streamlbl, uint8_t* grouplbl, uint8_t* isosyncmode, uint8_t* isosyncen, uint8_t* isotype)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *streamlbl = (localVal & ((uint16_t)0x0000F800)) >> 11;
+ *grouplbl = (localVal & ((uint16_t)0x00000700)) >> 8;
+ *isosyncmode = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *isosyncen = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *isotype = (localVal & ((uint16_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t em_ble_isolinkcntl_stream_lbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000F800)) >> 11);
+}
+
+__INLINE void em_ble_isolinkcntl_stream_lbl_setf(int elt_idx, uint8_t streamlbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)streamlbl << 11) & ~((uint16_t)0x0000F800)) == 0);
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000F800)) | ((uint16_t)streamlbl << 11));
+}
+
+__INLINE uint8_t em_ble_isolinkcntl_group_lbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000700)) >> 8);
+}
+
+__INLINE void em_ble_isolinkcntl_group_lbl_setf(int elt_idx, uint8_t grouplbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)grouplbl << 8) & ~((uint16_t)0x00000700)) == 0);
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000700)) | ((uint16_t)grouplbl << 8));
+}
+
+__INLINE uint8_t em_ble_isolinkcntl_isosyncmode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_isolinkcntl_isosyncmode_setf(int elt_idx, uint8_t isosyncmode)
+{
+ BLE_ASSERT_ERR((((uint16_t)isosyncmode << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)isosyncmode << 3));
+}
+
+__INLINE uint8_t em_ble_isolinkcntl_isosyncen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_isolinkcntl_isosyncen_setf(int elt_idx, uint8_t isosyncen)
+{
+ BLE_ASSERT_ERR((((uint16_t)isosyncen << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)isosyncen << 2));
+}
+
+__INLINE uint8_t em_ble_isolinkcntl_isotype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000003)) >> 0);
+}
+
+__INLINE void em_ble_isolinkcntl_isotype_setf(int elt_idx, uint8_t isotype)
+{
+ BLE_ASSERT_ERR((((uint16_t)isotype << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOLINKCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000003)) | ((uint16_t)isotype << 0));
+}
+
+/**
+ * @brief THRCNTL_RATECNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:12 RXTHR 0x0
+ * 11:08 TXTHR 0x0
+ * 05:04 AUX_RATE 0x0
+ * 03:02 RXRATE 0x0
+ * 01:00 TXRATE 0x0
+ *
+ */
+#define EM_BLE_THRCNTL_RATECNTL_ADDR (0x00910006 + EM_BLE_CS_OFFSET)
+#define EM_BLE_THRCNTL_RATECNTL_INDEX 0x00000003
+#define EM_BLE_THRCNTL_RATECNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_thrcntl_ratecntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXTHR_MASK ((uint16_t)0x0000F000)
+#define EM_BLE_RXTHR_LSB 12
+#define EM_BLE_RXTHR_WIDTH ((uint16_t)0x00000004)
+#define EM_BLE_TXTHR_MASK ((uint16_t)0x00000F00)
+#define EM_BLE_TXTHR_LSB 8
+#define EM_BLE_TXTHR_WIDTH ((uint16_t)0x00000004)
+#define EM_BLE_AUX_RATE_MASK ((uint16_t)0x00000030)
+#define EM_BLE_AUX_RATE_LSB 4
+#define EM_BLE_AUX_RATE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_RXRATE_MASK ((uint16_t)0x0000000C)
+#define EM_BLE_RXRATE_LSB 2
+#define EM_BLE_RXRATE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_TXRATE_MASK ((uint16_t)0x00000003)
+#define EM_BLE_TXRATE_LSB 0
+#define EM_BLE_TXRATE_WIDTH ((uint16_t)0x00000002)
+
+#define EM_BLE_RXTHR_RST 0x0
+#define EM_BLE_TXTHR_RST 0x0
+#define EM_BLE_AUX_RATE_RST 0x0
+#define EM_BLE_RXRATE_RST 0x0
+#define EM_BLE_TXRATE_RST 0x0
+
+__INLINE void em_ble_thrcntl_ratecntl_pack(int elt_idx, uint8_t rxthr, uint8_t txthr, uint8_t auxrate, uint8_t rxrate, uint8_t txrate)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxthr << 12) & ~((uint16_t)0x0000F000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txthr << 8) & ~((uint16_t)0x00000F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)auxrate << 4) & ~((uint16_t)0x00000030)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxrate << 2) & ~((uint16_t)0x0000000C)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txrate << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)rxthr << 12) | ((uint16_t)txthr << 8) | ((uint16_t)auxrate << 4) | ((uint16_t)rxrate << 2) | ((uint16_t)txrate << 0));
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_unpack(int elt_idx, uint8_t* rxthr, uint8_t* txthr, uint8_t* auxrate, uint8_t* rxrate, uint8_t* txrate)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *rxthr = (localVal & ((uint16_t)0x0000F000)) >> 12;
+ *txthr = (localVal & ((uint16_t)0x00000F00)) >> 8;
+ *auxrate = (localVal & ((uint16_t)0x00000030)) >> 4;
+ *rxrate = (localVal & ((uint16_t)0x0000000C)) >> 2;
+ *txrate = (localVal & ((uint16_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t em_ble_thrcntl_ratecntl_rxthr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000F000)) >> 12);
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_rxthr_setf(int elt_idx, uint8_t rxthr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxthr << 12) & ~((uint16_t)0x0000F000)) == 0);
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000F000)) | ((uint16_t)rxthr << 12));
+}
+
+__INLINE uint8_t em_ble_thrcntl_ratecntl_txthr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000F00)) >> 8);
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_txthr_setf(int elt_idx, uint8_t txthr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txthr << 8) & ~((uint16_t)0x00000F00)) == 0);
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000F00)) | ((uint16_t)txthr << 8));
+}
+
+__INLINE uint8_t em_ble_thrcntl_ratecntl_aux_rate_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000030)) >> 4);
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_aux_rate_setf(int elt_idx, uint8_t auxrate)
+{
+ BLE_ASSERT_ERR((((uint16_t)auxrate << 4) & ~((uint16_t)0x00000030)) == 0);
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000030)) | ((uint16_t)auxrate << 4));
+}
+
+__INLINE uint8_t em_ble_thrcntl_ratecntl_rxrate_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000000C)) >> 2);
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_rxrate_setf(int elt_idx, uint8_t rxrate)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxrate << 2) & ~((uint16_t)0x0000000C)) == 0);
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000000C)) | ((uint16_t)rxrate << 2));
+}
+
+__INLINE uint8_t em_ble_thrcntl_ratecntl_txrate_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000003)) >> 0);
+}
+
+__INLINE void em_ble_thrcntl_ratecntl_txrate_setf(int elt_idx, uint8_t txrate)
+{
+ BLE_ASSERT_ERR((((uint16_t)txrate << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_THRCNTL_RATECNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000003)) | ((uint16_t)txrate << 0));
+}
+
+/**
+ * @brief LEBDADDR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 BDADDR 0x0
+ *
+ */
+#define EM_BLE_LEBDADDR_ADDR (0x00910008 + EM_BLE_CS_OFFSET)
+#define EM_BLE_LEBDADDR_INDEX 0x00000004
+#define EM_BLE_LEBDADDR_RESET 0x00000000
+#define EM_BLE_LEBDADDR_COUNT 3
+
+__INLINE uint16_t em_ble_lebdaddr_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ return EM_BLE_RD(EM_BLE_LEBDADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_lebdaddr_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ EM_BLE_WR(EM_BLE_LEBDADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_BDADDR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_BDADDR_LSB 0
+#define EM_BLE_BDADDR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_BDADDR_RST 0x0
+
+__INLINE uint16_t em_ble_lebdaddr_bdaddr_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LEBDADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_lebdaddr_bdaddr_setf(int elt_idx, int reg_idx, uint16_t bdaddr)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ BLE_ASSERT_ERR((((uint16_t)bdaddr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_LEBDADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, (uint16_t)bdaddr << 0);
+}
+
+/**
+ * @brief SYNCWL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 SYNCWORDL 0x0
+ *
+ */
+#define EM_BLE_SYNCWL_ADDR (0x0091000E + EM_BLE_CS_OFFSET)
+#define EM_BLE_SYNCWL_INDEX 0x00000007
+#define EM_BLE_SYNCWL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_syncwl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_SYNCWL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_syncwl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_SYNCWL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_SYNCWORDL_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_SYNCWORDL_LSB 0
+#define EM_BLE_SYNCWORDL_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_SYNCWORDL_RST 0x0
+
+__INLINE uint16_t em_ble_syncwl_syncwordl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_SYNCWL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_syncwl_syncwordl_setf(int elt_idx, uint16_t syncwordl)
+{
+ BLE_ASSERT_ERR((((uint16_t)syncwordl << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_SYNCWL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)syncwordl << 0);
+}
+
+/**
+ * @brief SYNCWH register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 SYNCWORDH 0x0
+ *
+ */
+#define EM_BLE_SYNCWH_ADDR (0x00910010 + EM_BLE_CS_OFFSET)
+#define EM_BLE_SYNCWH_INDEX 0x00000008
+#define EM_BLE_SYNCWH_RESET 0x00000000
+
+__INLINE uint16_t em_ble_syncwh_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_SYNCWH_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_syncwh_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_SYNCWH_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_SYNCWORDH_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_SYNCWORDH_LSB 0
+#define EM_BLE_SYNCWORDH_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_SYNCWORDH_RST 0x0
+
+__INLINE uint16_t em_ble_syncwh_syncwordh_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_SYNCWH_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_syncwh_syncwordh_setf(int elt_idx, uint16_t syncwordh)
+{
+ BLE_ASSERT_ERR((((uint16_t)syncwordh << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_SYNCWH_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)syncwordh << 0);
+}
+
+/**
+ * @brief CRCINIT0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 CRCINIT0 0x0
+ *
+ */
+#define EM_BLE_CRCINIT0_ADDR (0x00910012 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CRCINIT0_INDEX 0x00000009
+#define EM_BLE_CRCINIT0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_crcinit0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CRCINIT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_crcinit0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CRCINIT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_CRCINIT0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_CRCINIT0_LSB 0
+#define EM_BLE_CRCINIT0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_CRCINIT0_RST 0x0
+
+__INLINE uint16_t em_ble_crcinit0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CRCINIT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_crcinit0_setf(int elt_idx, uint16_t crcinit0)
+{
+ BLE_ASSERT_ERR((((uint16_t)crcinit0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_CRCINIT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)crcinit0 << 0);
+}
+
+/**
+ * @brief CRCINIT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 RXMAXCTEBUF 0x0
+ * 07:00 CRCINIT1 0x0
+ *
+ */
+#define EM_BLE_CRCINIT1_ADDR (0x00910014 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CRCINIT1_INDEX 0x0000000A
+#define EM_BLE_CRCINIT1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_crcinit1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_crcinit1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXMAXCTEBUF_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_RXMAXCTEBUF_LSB 8
+#define EM_BLE_RXMAXCTEBUF_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_CRCINIT1_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_CRCINIT1_LSB 0
+#define EM_BLE_CRCINIT1_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_RXMAXCTEBUF_RST 0x0
+#define EM_BLE_CRCINIT1_RST 0x0
+
+__INLINE void em_ble_crcinit1_pack(int elt_idx, uint8_t rxmaxctebuf, uint8_t crcinit1)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxmaxctebuf << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)crcinit1 << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)rxmaxctebuf << 8) | ((uint16_t)crcinit1 << 0));
+}
+
+__INLINE void em_ble_crcinit1_unpack(int elt_idx, uint8_t* rxmaxctebuf, uint8_t* crcinit1)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *rxmaxctebuf = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *crcinit1 = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_crcinit1_rxmaxctebuf_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_crcinit1_rxmaxctebuf_setf(int elt_idx, uint8_t rxmaxctebuf)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxmaxctebuf << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)rxmaxctebuf << 8));
+}
+
+__INLINE uint8_t em_ble_crcinit1_crcinit1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_crcinit1_crcinit1_setf(int elt_idx, uint8_t crcinit1)
+{
+ BLE_ASSERT_ERR((((uint16_t)crcinit1 << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CRCINIT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)crcinit1 << 0));
+}
+
+/**
+ * @brief FILTPOL_RALCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 FILTER_POLICY 0x0
+ * 04 RAL_RESOL_EN 0
+ * 03 PERADV_FILT_EN 0
+ * 02 LOCAL_RPA_SEL 0
+ * 01 RAL_MODE 0
+ * 00 RAL_EN 0
+ *
+ */
+#define EM_BLE_FILTPOL_RALCNTL_ADDR (0x00910016 + EM_BLE_CS_OFFSET)
+#define EM_BLE_FILTPOL_RALCNTL_INDEX 0x0000000B
+#define EM_BLE_FILTPOL_RALCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_filtpol_ralcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_FILTER_POLICY_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_FILTER_POLICY_LSB 8
+#define EM_BLE_FILTER_POLICY_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RAL_RESOL_EN_BIT ((uint16_t)0x00000010)
+#define EM_BLE_RAL_RESOL_EN_POS 4
+#define EM_BLE_PERADV_FILT_EN_BIT ((uint16_t)0x00000008)
+#define EM_BLE_PERADV_FILT_EN_POS 3
+#define EM_BLE_LOCAL_RPA_SEL_BIT ((uint16_t)0x00000004)
+#define EM_BLE_LOCAL_RPA_SEL_POS 2
+#define EM_BLE_RAL_MODE_BIT ((uint16_t)0x00000002)
+#define EM_BLE_RAL_MODE_POS 1
+#define EM_BLE_RAL_EN_BIT ((uint16_t)0x00000001)
+#define EM_BLE_RAL_EN_POS 0
+
+#define EM_BLE_FILTER_POLICY_RST 0x0
+#define EM_BLE_RAL_RESOL_EN_RST 0x0
+#define EM_BLE_PERADV_FILT_EN_RST 0x0
+#define EM_BLE_LOCAL_RPA_SEL_RST 0x0
+#define EM_BLE_RAL_MODE_RST 0x0
+#define EM_BLE_RAL_EN_RST 0x0
+
+__INLINE void em_ble_filtpol_ralcntl_pack(int elt_idx, uint8_t filterpolicy, uint8_t ralresolen, uint8_t peradvfilten, uint8_t localrpasel, uint8_t ralmode, uint8_t ralen)
+{
+ BLE_ASSERT_ERR((((uint16_t)filterpolicy << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)ralresolen << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)peradvfilten << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)localrpasel << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)ralmode << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)ralen << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)filterpolicy << 8) | ((uint16_t)ralresolen << 4) | ((uint16_t)peradvfilten << 3) | ((uint16_t)localrpasel << 2) | ((uint16_t)ralmode << 1) | ((uint16_t)ralen << 0));
+}
+
+__INLINE void em_ble_filtpol_ralcntl_unpack(int elt_idx, uint8_t* filterpolicy, uint8_t* ralresolen, uint8_t* peradvfilten, uint8_t* localrpasel, uint8_t* ralmode, uint8_t* ralen)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *filterpolicy = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *ralresolen = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *peradvfilten = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *localrpasel = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *ralmode = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *ralen = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_filtpol_ralcntl_filter_policy_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_filter_policy_setf(int elt_idx, uint8_t filterpolicy)
+{
+ BLE_ASSERT_ERR((((uint16_t)filterpolicy << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)filterpolicy << 8));
+}
+
+__INLINE uint8_t em_ble_filtpol_ralcntl_ral_resol_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_ral_resol_en_setf(int elt_idx, uint8_t ralresolen)
+{
+ BLE_ASSERT_ERR((((uint16_t)ralresolen << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)ralresolen << 4));
+}
+
+__INLINE uint8_t em_ble_filtpol_ralcntl_peradv_filt_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_peradv_filt_en_setf(int elt_idx, uint8_t peradvfilten)
+{
+ BLE_ASSERT_ERR((((uint16_t)peradvfilten << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)peradvfilten << 3));
+}
+
+__INLINE uint8_t em_ble_filtpol_ralcntl_local_rpa_sel_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_local_rpa_sel_setf(int elt_idx, uint8_t localrpasel)
+{
+ BLE_ASSERT_ERR((((uint16_t)localrpasel << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)localrpasel << 2));
+}
+
+__INLINE uint8_t em_ble_filtpol_ralcntl_ral_mode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_ral_mode_setf(int elt_idx, uint8_t ralmode)
+{
+ BLE_ASSERT_ERR((((uint16_t)ralmode << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)ralmode << 1));
+}
+
+__INLINE uint8_t em_ble_filtpol_ralcntl_ral_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_filtpol_ralcntl_ral_en_setf(int elt_idx, uint8_t ralen)
+{
+ BLE_ASSERT_ERR((((uint16_t)ralen << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_FILTPOL_RALCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)ralen << 0));
+}
+
+/**
+ * @brief HOPCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 FH_EN 0
+ * 14:13 HOP_MODE 0x0
+ * 12:08 HOP_INT 0x0
+ * 05:00 CH_IDX 0x0
+ *
+ */
+#define EM_BLE_HOPCNTL_ADDR (0x00910018 + EM_BLE_CS_OFFSET)
+#define EM_BLE_HOPCNTL_INDEX 0x0000000C
+#define EM_BLE_HOPCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_hopcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_hopcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_FH_EN_BIT ((uint16_t)0x00008000)
+#define EM_BLE_FH_EN_POS 15
+#define EM_BLE_HOP_MODE_MASK ((uint16_t)0x00006000)
+#define EM_BLE_HOP_MODE_LSB 13
+#define EM_BLE_HOP_MODE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_HOP_INT_MASK ((uint16_t)0x00001F00)
+#define EM_BLE_HOP_INT_LSB 8
+#define EM_BLE_HOP_INT_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_CH_IDX_MASK ((uint16_t)0x0000003F)
+#define EM_BLE_CH_IDX_LSB 0
+#define EM_BLE_CH_IDX_WIDTH ((uint16_t)0x00000006)
+
+#define EM_BLE_FH_EN_RST 0x0
+#define EM_BLE_HOP_MODE_RST 0x0
+#define EM_BLE_HOP_INT_RST 0x0
+#define EM_BLE_CH_IDX_RST 0x0
+
+__INLINE void em_ble_hopcntl_pack(int elt_idx, uint8_t fhen, uint8_t hopmode, uint8_t hopint, uint8_t chidx)
+{
+ BLE_ASSERT_ERR((((uint16_t)fhen << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)hopmode << 13) & ~((uint16_t)0x00006000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)hopint << 8) & ~((uint16_t)0x00001F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)chidx << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)fhen << 15) | ((uint16_t)hopmode << 13) | ((uint16_t)hopint << 8) | ((uint16_t)chidx << 0));
+}
+
+__INLINE void em_ble_hopcntl_unpack(int elt_idx, uint8_t* fhen, uint8_t* hopmode, uint8_t* hopint, uint8_t* chidx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *fhen = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *hopmode = (localVal & ((uint16_t)0x00006000)) >> 13;
+ *hopint = (localVal & ((uint16_t)0x00001F00)) >> 8;
+ *chidx = (localVal & ((uint16_t)0x0000003F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_hopcntl_fh_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_hopcntl_fh_en_setf(int elt_idx, uint8_t fhen)
+{
+ BLE_ASSERT_ERR((((uint16_t)fhen << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)fhen << 15));
+}
+
+__INLINE uint8_t em_ble_hopcntl_hop_mode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00006000)) >> 13);
+}
+
+__INLINE void em_ble_hopcntl_hop_mode_setf(int elt_idx, uint8_t hopmode)
+{
+ BLE_ASSERT_ERR((((uint16_t)hopmode << 13) & ~((uint16_t)0x00006000)) == 0);
+ EM_BLE_WR(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00006000)) | ((uint16_t)hopmode << 13));
+}
+
+__INLINE uint8_t em_ble_hopcntl_hop_int_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00001F00)) >> 8);
+}
+
+__INLINE void em_ble_hopcntl_hop_int_setf(int elt_idx, uint8_t hopint)
+{
+ BLE_ASSERT_ERR((((uint16_t)hopint << 8) & ~((uint16_t)0x00001F00)) == 0);
+ EM_BLE_WR(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00001F00)) | ((uint16_t)hopint << 8));
+}
+
+__INLINE uint8_t em_ble_hopcntl_ch_idx_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000003F)) >> 0);
+}
+
+__INLINE void em_ble_hopcntl_ch_idx_setf(int elt_idx, uint8_t chidx)
+{
+ BLE_ASSERT_ERR((((uint16_t)chidx << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_HOPCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000003F)) | ((uint16_t)chidx << 0));
+}
+
+/**
+ * @brief TXRXCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXBUFF_FULL 0
+ * 14 LASTEMPTY 0
+ * 13 SN 0
+ * 12 NESN 0
+ * 11 RXBFMICERR 0
+ * 10 RXMAFSERR 0
+ * 09 ENDS_ON_SAC 0
+ * 08 EXT_PA_EN 0
+ * 07:00 TXPWR 0x0
+ *
+ */
+#define EM_BLE_TXRXCNTL_ADDR (0x0091001A + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXRXCNTL_INDEX 0x0000000D
+#define EM_BLE_TXRXCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txrxcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txrxcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXBUFF_FULL_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXBUFF_FULL_POS 15
+#define EM_BLE_LASTEMPTY_BIT ((uint16_t)0x00004000)
+#define EM_BLE_LASTEMPTY_POS 14
+#define EM_BLE_SN_BIT ((uint16_t)0x00002000)
+#define EM_BLE_SN_POS 13
+#define EM_BLE_NESN_BIT ((uint16_t)0x00001000)
+#define EM_BLE_NESN_POS 12
+#define EM_BLE_RXBFMICERR_BIT ((uint16_t)0x00000800)
+#define EM_BLE_RXBFMICERR_POS 11
+#define EM_BLE_RXMAFSERR_BIT ((uint16_t)0x00000400)
+#define EM_BLE_RXMAFSERR_POS 10
+#define EM_BLE_ENDS_ON_SAC_BIT ((uint16_t)0x00000200)
+#define EM_BLE_ENDS_ON_SAC_POS 9
+#define EM_BLE_EXT_PA_EN_BIT ((uint16_t)0x00000100)
+#define EM_BLE_EXT_PA_EN_POS 8
+#define EM_BLE_TXPWR_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_TXPWR_LSB 0
+#define EM_BLE_TXPWR_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_RXBUFF_FULL_RST 0x0
+#define EM_BLE_LASTEMPTY_RST 0x0
+#define EM_BLE_SN_RST 0x0
+#define EM_BLE_NESN_RST 0x0
+#define EM_BLE_RXBFMICERR_RST 0x0
+#define EM_BLE_RXMAFSERR_RST 0x0
+#define EM_BLE_ENDS_ON_SAC_RST 0x0
+#define EM_BLE_EXT_PA_EN_RST 0x0
+#define EM_BLE_TXPWR_RST 0x0
+
+__INLINE void em_ble_txrxcntl_pack(int elt_idx, uint8_t rxbufffull, uint8_t lastempty, uint8_t sn, uint8_t nesn, uint8_t rxbfmicerr, uint8_t rxmafserr, uint8_t endsonsac, uint8_t extpaen, uint8_t txpwr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbufffull << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)lastempty << 14) & ~((uint16_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)sn << 13) & ~((uint16_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)nesn << 12) & ~((uint16_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxbfmicerr << 11) & ~((uint16_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxmafserr << 10) & ~((uint16_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)endsonsac << 9) & ~((uint16_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)extpaen << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txpwr << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)rxbufffull << 15) | ((uint16_t)lastempty << 14) | ((uint16_t)sn << 13) | ((uint16_t)nesn << 12) | ((uint16_t)rxbfmicerr << 11) | ((uint16_t)rxmafserr << 10) | ((uint16_t)endsonsac << 9) | ((uint16_t)extpaen << 8) | ((uint16_t)txpwr << 0));
+}
+
+__INLINE void em_ble_txrxcntl_unpack(int elt_idx, uint8_t* rxbufffull, uint8_t* lastempty, uint8_t* sn, uint8_t* nesn, uint8_t* rxbfmicerr, uint8_t* rxmafserr, uint8_t* endsonsac, uint8_t* extpaen, uint8_t* txpwr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *rxbufffull = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *lastempty = (localVal & ((uint16_t)0x00004000)) >> 14;
+ *sn = (localVal & ((uint16_t)0x00002000)) >> 13;
+ *nesn = (localVal & ((uint16_t)0x00001000)) >> 12;
+ *rxbfmicerr = (localVal & ((uint16_t)0x00000800)) >> 11;
+ *rxmafserr = (localVal & ((uint16_t)0x00000400)) >> 10;
+ *endsonsac = (localVal & ((uint16_t)0x00000200)) >> 9;
+ *extpaen = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *txpwr = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txrxcntl_rxbuff_full_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_txrxcntl_rxbuff_full_setf(int elt_idx, uint8_t rxbufffull)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbufffull << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxbufffull << 15));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_lastempty_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00004000)) >> 14);
+}
+
+__INLINE void em_ble_txrxcntl_lastempty_setf(int elt_idx, uint8_t lastempty)
+{
+ BLE_ASSERT_ERR((((uint16_t)lastempty << 14) & ~((uint16_t)0x00004000)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00004000)) | ((uint16_t)lastempty << 14));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_sn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00002000)) >> 13);
+}
+
+__INLINE void em_ble_txrxcntl_sn_setf(int elt_idx, uint8_t sn)
+{
+ BLE_ASSERT_ERR((((uint16_t)sn << 13) & ~((uint16_t)0x00002000)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00002000)) | ((uint16_t)sn << 13));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_nesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00001000)) >> 12);
+}
+
+__INLINE void em_ble_txrxcntl_nesn_setf(int elt_idx, uint8_t nesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)nesn << 12) & ~((uint16_t)0x00001000)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00001000)) | ((uint16_t)nesn << 12));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_rxbfmicerr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000800)) >> 11);
+}
+
+__INLINE void em_ble_txrxcntl_rxbfmicerr_setf(int elt_idx, uint8_t rxbfmicerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbfmicerr << 11) & ~((uint16_t)0x00000800)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000800)) | ((uint16_t)rxbfmicerr << 11));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_rxmafserr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000400)) >> 10);
+}
+
+__INLINE void em_ble_txrxcntl_rxmafserr_setf(int elt_idx, uint8_t rxmafserr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxmafserr << 10) & ~((uint16_t)0x00000400)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000400)) | ((uint16_t)rxmafserr << 10));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_ends_on_sac_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000200)) >> 9);
+}
+
+__INLINE void em_ble_txrxcntl_ends_on_sac_setf(int elt_idx, uint8_t endsonsac)
+{
+ BLE_ASSERT_ERR((((uint16_t)endsonsac << 9) & ~((uint16_t)0x00000200)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000200)) | ((uint16_t)endsonsac << 9));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_ext_pa_en_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_txrxcntl_ext_pa_en_setf(int elt_idx, uint8_t extpaen)
+{
+ BLE_ASSERT_ERR((((uint16_t)extpaen << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)extpaen << 8));
+}
+
+__INLINE uint8_t em_ble_txrxcntl_txpwr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_txrxcntl_txpwr_setf(int elt_idx, uint8_t txpwr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txpwr << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_TXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)txpwr << 0));
+}
+
+/**
+ * @brief RXDFCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 08 DFRSPEN 0
+ * 07:06 DFSWCNTL 0x0
+ * 05:04 DFSAMPCNTL 0x0
+ * 03:02 DFTYPE 0x0
+ * 01 DFFILTEREN 0
+ * 00 DFEN 0
+ *
+ */
+#define EM_BLE_RXDFCNTL_ADDR (0x0091001C + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXDFCNTL_INDEX 0x0000000E
+#define EM_BLE_RXDFCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxdfcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxdfcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_DFRSPEN_BIT ((uint16_t)0x00000100)
+#define EM_BLE_DFRSPEN_POS 8
+#define EM_BLE_DFSWCNTL_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_DFSWCNTL_LSB 6
+#define EM_BLE_DFSWCNTL_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_DFSAMPCNTL_MASK ((uint16_t)0x00000030)
+#define EM_BLE_DFSAMPCNTL_LSB 4
+#define EM_BLE_DFSAMPCNTL_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_DFTYPE_MASK ((uint16_t)0x0000000C)
+#define EM_BLE_DFTYPE_LSB 2
+#define EM_BLE_DFTYPE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_DFFILTEREN_BIT ((uint16_t)0x00000002)
+#define EM_BLE_DFFILTEREN_POS 1
+#define EM_BLE_DFEN_BIT ((uint16_t)0x00000001)
+#define EM_BLE_DFEN_POS 0
+
+#define EM_BLE_DFRSPEN_RST 0x0
+#define EM_BLE_DFSWCNTL_RST 0x0
+#define EM_BLE_DFSAMPCNTL_RST 0x0
+#define EM_BLE_DFTYPE_RST 0x0
+#define EM_BLE_DFFILTEREN_RST 0x0
+#define EM_BLE_DFEN_RST 0x0
+
+__INLINE void em_ble_rxdfcntl_pack(int elt_idx, uint8_t dfrspen, uint8_t dfswcntl, uint8_t dfsampcntl, uint8_t dftype, uint8_t dffilteren, uint8_t dfen)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfrspen << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)dfswcntl << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)dfsampcntl << 4) & ~((uint16_t)0x00000030)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)dftype << 2) & ~((uint16_t)0x0000000C)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)dffilteren << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)dfen << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)dfrspen << 8) | ((uint16_t)dfswcntl << 6) | ((uint16_t)dfsampcntl << 4) | ((uint16_t)dftype << 2) | ((uint16_t)dffilteren << 1) | ((uint16_t)dfen << 0));
+}
+
+__INLINE void em_ble_rxdfcntl_unpack(int elt_idx, uint8_t* dfrspen, uint8_t* dfswcntl, uint8_t* dfsampcntl, uint8_t* dftype, uint8_t* dffilteren, uint8_t* dfen)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *dfrspen = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *dfswcntl = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *dfsampcntl = (localVal & ((uint16_t)0x00000030)) >> 4;
+ *dftype = (localVal & ((uint16_t)0x0000000C)) >> 2;
+ *dffilteren = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *dfen = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxdfcntl_dfrspen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_rxdfcntl_dfrspen_setf(int elt_idx, uint8_t dfrspen)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfrspen << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)dfrspen << 8));
+}
+
+__INLINE uint8_t em_ble_rxdfcntl_dfswcntl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_rxdfcntl_dfswcntl_setf(int elt_idx, uint8_t dfswcntl)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfswcntl << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)dfswcntl << 6));
+}
+
+__INLINE uint8_t em_ble_rxdfcntl_dfsampcntl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000030)) >> 4);
+}
+
+__INLINE void em_ble_rxdfcntl_dfsampcntl_setf(int elt_idx, uint8_t dfsampcntl)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfsampcntl << 4) & ~((uint16_t)0x00000030)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000030)) | ((uint16_t)dfsampcntl << 4));
+}
+
+__INLINE uint8_t em_ble_rxdfcntl_dftype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000000C)) >> 2);
+}
+
+__INLINE void em_ble_rxdfcntl_dftype_setf(int elt_idx, uint8_t dftype)
+{
+ BLE_ASSERT_ERR((((uint16_t)dftype << 2) & ~((uint16_t)0x0000000C)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000000C)) | ((uint16_t)dftype << 2));
+}
+
+__INLINE uint8_t em_ble_rxdfcntl_dffilteren_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_rxdfcntl_dffilteren_setf(int elt_idx, uint8_t dffilteren)
+{
+ BLE_ASSERT_ERR((((uint16_t)dffilteren << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)dffilteren << 1));
+}
+
+__INLINE uint8_t em_ble_rxdfcntl_dfen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_rxdfcntl_dfen_setf(int elt_idx, uint8_t dfen)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfen << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)dfen << 0));
+}
+
+/**
+ * @brief RXWINCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXWIDE 0
+ * 14:00 RXWINSZ 0x0
+ *
+ */
+#define EM_BLE_RXWINCNTL_ADDR (0x0091001E + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXWINCNTL_INDEX 0x0000000F
+#define EM_BLE_RXWINCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxwincntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxwincntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXWIDE_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXWIDE_POS 15
+#define EM_BLE_RXWINSZ_MASK ((uint16_t)0x00007FFF)
+#define EM_BLE_RXWINSZ_LSB 0
+#define EM_BLE_RXWINSZ_WIDTH ((uint16_t)0x0000000F)
+
+#define EM_BLE_RXWIDE_RST 0x0
+#define EM_BLE_RXWINSZ_RST 0x0
+
+__INLINE void em_ble_rxwincntl_pack(int elt_idx, uint8_t rxwide, uint16_t rxwinsz)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxwide << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxwinsz << 0) & ~((uint16_t)0x00007FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)rxwide << 15) | ((uint16_t)rxwinsz << 0));
+}
+
+__INLINE void em_ble_rxwincntl_unpack(int elt_idx, uint8_t* rxwide, uint16_t* rxwinsz)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *rxwide = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *rxwinsz = (localVal & ((uint16_t)0x00007FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxwincntl_rxwide_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxwincntl_rxwide_setf(int elt_idx, uint8_t rxwide)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxwide << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxwide << 15));
+}
+
+__INLINE uint16_t em_ble_rxwincntl_rxwinsz_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00007FFF)) >> 0);
+}
+
+__INLINE void em_ble_rxwincntl_rxwinsz_setf(int elt_idx, uint16_t rxwinsz)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxwinsz << 0) & ~((uint16_t)0x00007FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXWINCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00007FFF)) | ((uint16_t)rxwinsz << 0));
+}
+
+/**
+ * @brief ISOTXDESCPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 ISOTXDESCPTR 0x0
+ *
+ */
+#define EM_BLE_ISOTXDESCPTR_ADDR (0x00910020 + EM_BLE_CS_OFFSET)
+#define EM_BLE_ISOTXDESCPTR_INDEX 0x00000010
+#define EM_BLE_ISOTXDESCPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_isotxdescptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ISOTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_isotxdescptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ISOTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ISOTXDESCPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_ISOTXDESCPTR_LSB 0
+#define EM_BLE_ISOTXDESCPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_ISOTXDESCPTR_RST 0x0
+
+__INLINE uint16_t em_ble_isotxdescptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_isotxdescptr_setf(int elt_idx, uint16_t isotxdescptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)isotxdescptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)isotxdescptr << 0);
+}
+
+/**
+ * @brief ISORXDESCPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 ISORXDESCPTR 0x0
+ *
+ */
+#define EM_BLE_ISORXDESCPTR_ADDR (0x00910022 + EM_BLE_CS_OFFSET)
+#define EM_BLE_ISORXDESCPTR_INDEX 0x00000011
+#define EM_BLE_ISORXDESCPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_isorxdescptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ISORXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_isorxdescptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ISORXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ISORXDESCPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_ISORXDESCPTR_LSB 0
+#define EM_BLE_ISORXDESCPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_ISORXDESCPTR_RST 0x0
+
+__INLINE uint16_t em_ble_isorxdescptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISORXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_isorxdescptr_setf(int elt_idx, uint16_t isorxdescptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)isorxdescptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_ISORXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)isorxdescptr << 0);
+}
+
+/**
+ * @brief ACLTXDESCPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 ACLTXDESCPTR 0x0
+ *
+ */
+#define EM_BLE_ACLTXDESCPTR_ADDR (0x00910024 + EM_BLE_CS_OFFSET)
+#define EM_BLE_ACLTXDESCPTR_INDEX 0x00000012
+#define EM_BLE_ACLTXDESCPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_acltxdescptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ACLTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_acltxdescptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ACLTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ACLTXDESCPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_ACLTXDESCPTR_LSB 0
+#define EM_BLE_ACLTXDESCPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_ACLTXDESCPTR_RST 0x0
+
+__INLINE uint16_t em_ble_acltxdescptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ACLTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_acltxdescptr_setf(int elt_idx, uint16_t acltxdescptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)acltxdescptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_ACLTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)acltxdescptr << 0);
+}
+
+/**
+ * @brief RXDFANTPATTCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 DFRSP 0
+ * 12:08 MAX_SAMP_CTE 0x0
+ * 06:00 RX_ANT_PATT_LENGTH 0x0
+ *
+ */
+#define EM_BLE_RXDFANTPATTCNTL_ADDR (0x00910026 + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXDFANTPATTCNTL_INDEX 0x00000013
+#define EM_BLE_RXDFANTPATTCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxdfantpattcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxdfantpattcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_DFRSP_BIT ((uint16_t)0x00008000)
+#define EM_BLE_DFRSP_POS 15
+#define EM_BLE_MAX_SAMP_CTE_MASK ((uint16_t)0x00001F00)
+#define EM_BLE_MAX_SAMP_CTE_LSB 8
+#define EM_BLE_MAX_SAMP_CTE_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_RX_ANT_PATT_LENGTH_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_RX_ANT_PATT_LENGTH_LSB 0
+#define EM_BLE_RX_ANT_PATT_LENGTH_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_DFRSP_RST 0x0
+#define EM_BLE_MAX_SAMP_CTE_RST 0x0
+#define EM_BLE_RX_ANT_PATT_LENGTH_RST 0x0
+
+__INLINE void em_ble_rxdfantpattcntl_pack(int elt_idx, uint8_t dfrsp, uint8_t maxsampcte, uint8_t rxantpattlength)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfrsp << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)maxsampcte << 8) & ~((uint16_t)0x00001F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxantpattlength << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)dfrsp << 15) | ((uint16_t)maxsampcte << 8) | ((uint16_t)rxantpattlength << 0));
+}
+
+__INLINE void em_ble_rxdfantpattcntl_unpack(int elt_idx, uint8_t* dfrsp, uint8_t* maxsampcte, uint8_t* rxantpattlength)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *dfrsp = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *maxsampcte = (localVal & ((uint16_t)0x00001F00)) >> 8;
+ *rxantpattlength = (localVal & ((uint16_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxdfantpattcntl_dfrsp_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxdfantpattcntl_dfrsp_setf(int elt_idx, uint8_t dfrsp)
+{
+ BLE_ASSERT_ERR((((uint16_t)dfrsp << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)dfrsp << 15));
+}
+
+__INLINE uint8_t em_ble_rxdfantpattcntl_max_samp_cte_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00001F00)) >> 8);
+}
+
+__INLINE void em_ble_rxdfantpattcntl_max_samp_cte_setf(int elt_idx, uint8_t maxsampcte)
+{
+ BLE_ASSERT_ERR((((uint16_t)maxsampcte << 8) & ~((uint16_t)0x00001F00)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00001F00)) | ((uint16_t)maxsampcte << 8));
+}
+
+__INLINE uint8_t em_ble_rxdfantpattcntl_rx_ant_patt_length_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000007F)) >> 0);
+}
+
+__INLINE void em_ble_rxdfantpattcntl_rx_ant_patt_length_setf(int elt_idx, uint8_t rxantpattlength)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxantpattlength << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000007F)) | ((uint16_t)rxantpattlength << 0));
+}
+
+/**
+ * @brief RXDFANTSWPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 RX_ANTENNA_ID_PTR 0x0
+ *
+ */
+#define EM_BLE_RXDFANTSWPTR_ADDR (0x00910028 + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXDFANTSWPTR_INDEX 0x00000014
+#define EM_BLE_RXDFANTSWPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxdfantswptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxdfantswptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RX_ANTENNA_ID_PTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_RX_ANTENNA_ID_PTR_LSB 0
+#define EM_BLE_RX_ANTENNA_ID_PTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_RX_ANTENNA_ID_PTR_RST 0x0
+
+__INLINE uint16_t em_ble_rxdfantswptr_rx_antenna_id_ptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxdfantswptr_rx_antenna_id_ptr_setf(int elt_idx, uint16_t rxantennaidptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxantennaidptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)rxantennaidptr << 0);
+}
+
+/**
+ * @brief TXDFANTPATTCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 06:00 TX_ANT_PATT_LENGTH 0x0
+ *
+ */
+#define EM_BLE_TXDFANTPATTCNTL_ADDR (0x0091002A + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXDFANTPATTCNTL_INDEX 0x00000015
+#define EM_BLE_TXDFANTPATTCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txdfantpattcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txdfantpattcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TX_ANT_PATT_LENGTH_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_TX_ANT_PATT_LENGTH_LSB 0
+#define EM_BLE_TX_ANT_PATT_LENGTH_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_TX_ANT_PATT_LENGTH_RST 0x0
+
+__INLINE uint8_t em_ble_txdfantpattcntl_tx_ant_patt_length_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000007F)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txdfantpattcntl_tx_ant_patt_length_setf(int elt_idx, uint8_t txantpattlength)
+{
+ BLE_ASSERT_ERR((((uint16_t)txantpattlength << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_TXDFANTPATTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)txantpattlength << 0);
+}
+
+/**
+ * @brief TXDFANTSWPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 TX_ANTENNA_ID_PTR 0x0
+ *
+ */
+#define EM_BLE_TXDFANTSWPTR_ADDR (0x0091002C + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXDFANTSWPTR_INDEX 0x00000016
+#define EM_BLE_TXDFANTSWPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txdfantswptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txdfantswptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TX_ANTENNA_ID_PTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_TX_ANTENNA_ID_PTR_LSB 0
+#define EM_BLE_TX_ANTENNA_ID_PTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_TX_ANTENNA_ID_PTR_RST 0x0
+
+__INLINE uint16_t em_ble_txdfantswptr_tx_antenna_id_ptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txdfantswptr_tx_antenna_id_ptr_setf(int elt_idx, uint16_t txantennaidptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txantennaidptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXDFANTSWPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)txantennaidptr << 0);
+}
+
+/**
+ * @brief WINOFFSET register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 WINOFFSET 0x0
+ *
+ */
+#define EM_BLE_WINOFFSET_ADDR (0x0091002E + EM_BLE_CS_OFFSET)
+#define EM_BLE_WINOFFSET_INDEX 0x00000017
+#define EM_BLE_WINOFFSET_RESET 0x00000000
+
+__INLINE uint16_t em_ble_winoffset_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_WINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_winoffset_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_WINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_WINOFFSET_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_WINOFFSET_LSB 0
+#define EM_BLE_WINOFFSET_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_WINOFFSET_RST 0x0
+
+__INLINE uint16_t em_ble_winoffset_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_WINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_winoffset_setf(int elt_idx, uint16_t winoffset)
+{
+ BLE_ASSERT_ERR((((uint16_t)winoffset << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_WINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)winoffset << 0);
+}
+
+/**
+ * @brief MINEVTIME register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 MINEVTIME 0x0
+ *
+ */
+#define EM_BLE_MINEVTIME_ADDR (0x0091002E + EM_BLE_CS_OFFSET)
+#define EM_BLE_MINEVTIME_INDEX 0x00000017
+#define EM_BLE_MINEVTIME_RESET 0x00000000
+
+__INLINE uint16_t em_ble_minevtime_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_MINEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_minevtime_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_MINEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_MINEVTIME_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_MINEVTIME_LSB 0
+#define EM_BLE_MINEVTIME_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_MINEVTIME_RST 0x0
+
+__INLINE uint16_t em_ble_minevtime_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_MINEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_minevtime_setf(int elt_idx, uint16_t minevtime)
+{
+ BLE_ASSERT_ERR((((uint16_t)minevtime << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_MINEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)minevtime << 0);
+}
+
+/**
+ * @brief MAXEVTIME register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 MAXEVTIME 0x0
+ *
+ */
+#define EM_BLE_MAXEVTIME_ADDR (0x00910030 + EM_BLE_CS_OFFSET)
+#define EM_BLE_MAXEVTIME_INDEX 0x00000018
+#define EM_BLE_MAXEVTIME_RESET 0x00000000
+
+__INLINE uint16_t em_ble_maxevtime_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_MAXEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_maxevtime_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_MAXEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_MAXEVTIME_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_MAXEVTIME_LSB 0
+#define EM_BLE_MAXEVTIME_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_MAXEVTIME_RST 0x0
+
+__INLINE uint16_t em_ble_maxevtime_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_MAXEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_maxevtime_setf(int elt_idx, uint16_t maxevtime)
+{
+ BLE_ASSERT_ERR((((uint16_t)maxevtime << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_MAXEVTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)maxevtime << 0);
+}
+
+/**
+ * @brief CONNINTERVAL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 CONNINTERVAL 0x0
+ *
+ */
+#define EM_BLE_CONNINTERVAL_ADDR (0x00910032 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CONNINTERVAL_INDEX 0x00000019
+#define EM_BLE_CONNINTERVAL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_conninterval_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CONNINTERVAL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_conninterval_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CONNINTERVAL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_CONNINTERVAL_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_CONNINTERVAL_LSB 0
+#define EM_BLE_CONNINTERVAL_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_CONNINTERVAL_RST 0x0
+
+__INLINE uint16_t em_ble_conninterval_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CONNINTERVAL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_conninterval_setf(int elt_idx, uint16_t conninterval)
+{
+ BLE_ASSERT_ERR((((uint16_t)conninterval << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_CONNINTERVAL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)conninterval << 0);
+}
+
+/**
+ * @brief CHMAP0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 LLCHMAP0 0xFFFF
+ *
+ */
+#define EM_BLE_CHMAP0_ADDR (0x00910032 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CHMAP0_INDEX 0x00000019
+#define EM_BLE_CHMAP0_RESET 0x0000FFFF
+
+__INLINE uint16_t em_ble_chmap0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CHMAP0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_chmap0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CHMAP0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_LLCHMAP0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_LLCHMAP0_LSB 0
+#define EM_BLE_LLCHMAP0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_LLCHMAP0_RST 0xFFFF
+
+__INLINE uint16_t em_ble_chmap0_llchmap0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CHMAP0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_chmap0_llchmap0_setf(int elt_idx, uint16_t llchmap0)
+{
+ BLE_ASSERT_ERR((((uint16_t)llchmap0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_CHMAP0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)llchmap0 << 0);
+}
+
+/**
+ * @brief CHMAP1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 LLCHMAP1 0xFFFF
+ *
+ */
+#define EM_BLE_CHMAP1_ADDR (0x00910034 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CHMAP1_INDEX 0x0000001A
+#define EM_BLE_CHMAP1_RESET 0x0000FFFF
+
+__INLINE uint16_t em_ble_chmap1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CHMAP1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_chmap1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CHMAP1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_LLCHMAP1_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_LLCHMAP1_LSB 0
+#define EM_BLE_LLCHMAP1_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_LLCHMAP1_RST 0xFFFF
+
+__INLINE uint16_t em_ble_chmap1_llchmap1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CHMAP1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_chmap1_llchmap1_setf(int elt_idx, uint16_t llchmap1)
+{
+ BLE_ASSERT_ERR((((uint16_t)llchmap1 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_CHMAP1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)llchmap1 << 0);
+}
+
+/**
+ * @brief CHMAP2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:10 CH_AUX 0x0
+ * 07:05 ADVCHMAP 0x7
+ * 04:00 LLCHMAP2 0x1F
+ *
+ */
+#define EM_BLE_CHMAP2_ADDR (0x00910036 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CHMAP2_INDEX 0x0000001B
+#define EM_BLE_CHMAP2_RESET 0x000000FF
+
+__INLINE uint16_t em_ble_chmap2_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_chmap2_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_CH_AUX_MASK ((uint16_t)0x0000FC00)
+#define EM_BLE_CH_AUX_LSB 10
+#define EM_BLE_CH_AUX_WIDTH ((uint16_t)0x00000006)
+#define EM_BLE_ADVCHMAP_MASK ((uint16_t)0x000000E0)
+#define EM_BLE_ADVCHMAP_LSB 5
+#define EM_BLE_ADVCHMAP_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_LLCHMAP2_MASK ((uint16_t)0x0000001F)
+#define EM_BLE_LLCHMAP2_LSB 0
+#define EM_BLE_LLCHMAP2_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_CH_AUX_RST 0x0
+#define EM_BLE_ADVCHMAP_RST 0x7
+#define EM_BLE_LLCHMAP2_RST 0x1F
+
+__INLINE void em_ble_chmap2_pack(int elt_idx, uint8_t chaux, uint8_t advchmap, uint8_t llchmap2)
+{
+ BLE_ASSERT_ERR((((uint16_t)chaux << 10) & ~((uint16_t)0x0000FC00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)advchmap << 5) & ~((uint16_t)0x000000E0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)llchmap2 << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)chaux << 10) | ((uint16_t)advchmap << 5) | ((uint16_t)llchmap2 << 0));
+}
+
+__INLINE void em_ble_chmap2_unpack(int elt_idx, uint8_t* chaux, uint8_t* advchmap, uint8_t* llchmap2)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *chaux = (localVal & ((uint16_t)0x0000FC00)) >> 10;
+ *advchmap = (localVal & ((uint16_t)0x000000E0)) >> 5;
+ *llchmap2 = (localVal & ((uint16_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_chmap2_ch_aux_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FC00)) >> 10);
+}
+
+__INLINE void em_ble_chmap2_ch_aux_setf(int elt_idx, uint8_t chaux)
+{
+ BLE_ASSERT_ERR((((uint16_t)chaux << 10) & ~((uint16_t)0x0000FC00)) == 0);
+ EM_BLE_WR(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000FC00)) | ((uint16_t)chaux << 10));
+}
+
+__INLINE uint8_t em_ble_chmap2_advchmap_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000E0)) >> 5);
+}
+
+__INLINE void em_ble_chmap2_advchmap_setf(int elt_idx, uint8_t advchmap)
+{
+ BLE_ASSERT_ERR((((uint16_t)advchmap << 5) & ~((uint16_t)0x000000E0)) == 0);
+ EM_BLE_WR(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000000E0)) | ((uint16_t)advchmap << 5));
+}
+
+__INLINE uint8_t em_ble_chmap2_llchmap2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000001F)) >> 0);
+}
+
+__INLINE void em_ble_chmap2_llchmap2_setf(int elt_idx, uint8_t llchmap2)
+{
+ BLE_ASSERT_ERR((((uint16_t)llchmap2 << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_CHMAP2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000001F)) | ((uint16_t)llchmap2 << 0));
+}
+
+/**
+ * @brief RXMAXAUXCHAIN register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:11 MAXRXCHDESC 0x0
+ * 10:00 MAXRXCHBYTE 0x0
+ *
+ */
+#define EM_BLE_RXMAXAUXCHAIN_ADDR (0x00910038 + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXMAXAUXCHAIN_INDEX 0x0000001C
+#define EM_BLE_RXMAXAUXCHAIN_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxmaxauxchain_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxmaxauxchain_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_MAXRXCHDESC_MASK ((uint16_t)0x0000F800)
+#define EM_BLE_MAXRXCHDESC_LSB 11
+#define EM_BLE_MAXRXCHDESC_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_MAXRXCHBYTE_MASK ((uint16_t)0x000007FF)
+#define EM_BLE_MAXRXCHBYTE_LSB 0
+#define EM_BLE_MAXRXCHBYTE_WIDTH ((uint16_t)0x0000000B)
+
+#define EM_BLE_MAXRXCHDESC_RST 0x0
+#define EM_BLE_MAXRXCHBYTE_RST 0x0
+
+__INLINE void em_ble_rxmaxauxchain_pack(int elt_idx, uint8_t maxrxchdesc, uint16_t maxrxchbyte)
+{
+ BLE_ASSERT_ERR((((uint16_t)maxrxchdesc << 11) & ~((uint16_t)0x0000F800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)maxrxchbyte << 0) & ~((uint16_t)0x000007FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)maxrxchdesc << 11) | ((uint16_t)maxrxchbyte << 0));
+}
+
+__INLINE void em_ble_rxmaxauxchain_unpack(int elt_idx, uint8_t* maxrxchdesc, uint16_t* maxrxchbyte)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *maxrxchdesc = (localVal & ((uint16_t)0x0000F800)) >> 11;
+ *maxrxchbyte = (localVal & ((uint16_t)0x000007FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxmaxauxchain_maxrxchdesc_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000F800)) >> 11);
+}
+
+__INLINE void em_ble_rxmaxauxchain_maxrxchdesc_setf(int elt_idx, uint8_t maxrxchdesc)
+{
+ BLE_ASSERT_ERR((((uint16_t)maxrxchdesc << 11) & ~((uint16_t)0x0000F800)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000F800)) | ((uint16_t)maxrxchdesc << 11));
+}
+
+__INLINE uint16_t em_ble_rxmaxauxchain_maxrxchbyte_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000007FF)) >> 0);
+}
+
+__INLINE void em_ble_rxmaxauxchain_maxrxchbyte_setf(int elt_idx, uint16_t maxrxchbyte)
+{
+ BLE_ASSERT_ERR((((uint16_t)maxrxchbyte << 0) & ~((uint16_t)0x000007FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXMAXAUXCHAIN_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000007FF)) | ((uint16_t)maxrxchbyte << 0));
+}
+
+/**
+ * @brief RXMAXBUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 ISORXMAXBUF 0x0
+ * 07:00 ACLRXMAXBUF 0x0
+ *
+ */
+#define EM_BLE_RXMAXBUF_ADDR (0x00910038 + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXMAXBUF_INDEX 0x0000001C
+#define EM_BLE_RXMAXBUF_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxmaxbuf_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxmaxbuf_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ISORXMAXBUF_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_ISORXMAXBUF_LSB 8
+#define EM_BLE_ISORXMAXBUF_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_ACLRXMAXBUF_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_ACLRXMAXBUF_LSB 0
+#define EM_BLE_ACLRXMAXBUF_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_ISORXMAXBUF_RST 0x0
+#define EM_BLE_ACLRXMAXBUF_RST 0x0
+
+__INLINE void em_ble_rxmaxbuf_pack(int elt_idx, uint8_t isorxmaxbuf, uint8_t aclrxmaxbuf)
+{
+ BLE_ASSERT_ERR((((uint16_t)isorxmaxbuf << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)aclrxmaxbuf << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)isorxmaxbuf << 8) | ((uint16_t)aclrxmaxbuf << 0));
+}
+
+__INLINE void em_ble_rxmaxbuf_unpack(int elt_idx, uint8_t* isorxmaxbuf, uint8_t* aclrxmaxbuf)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *isorxmaxbuf = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *aclrxmaxbuf = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxmaxbuf_isorxmaxbuf_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxmaxbuf_isorxmaxbuf_setf(int elt_idx, uint8_t isorxmaxbuf)
+{
+ BLE_ASSERT_ERR((((uint16_t)isorxmaxbuf << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)isorxmaxbuf << 8));
+}
+
+__INLINE uint8_t em_ble_rxmaxbuf_aclrxmaxbuf_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_rxmaxbuf_aclrxmaxbuf_setf(int elt_idx, uint8_t aclrxmaxbuf)
+{
+ BLE_ASSERT_ERR((((uint16_t)aclrxmaxbuf << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_RXMAXBUF_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)aclrxmaxbuf << 0));
+}
+
+/**
+ * @brief RXMAXTIME register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 12:00 RXMAXTIME 0x0
+ *
+ */
+#define EM_BLE_RXMAXTIME_ADDR (0x0091003A + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXMAXTIME_INDEX 0x0000001D
+#define EM_BLE_RXMAXTIME_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxmaxtime_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXMAXTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxmaxtime_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXMAXTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXMAXTIME_MASK ((uint16_t)0x00001FFF)
+#define EM_BLE_RXMAXTIME_LSB 0
+#define EM_BLE_RXMAXTIME_WIDTH ((uint16_t)0x0000000D)
+
+#define EM_BLE_RXMAXTIME_RST 0x0
+
+__INLINE uint16_t em_ble_rxmaxtime_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXMAXTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00001FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxmaxtime_setf(int elt_idx, uint16_t rxmaxtime)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxmaxtime << 0) & ~((uint16_t)0x00001FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXMAXTIME_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)rxmaxtime << 0);
+}
+
+/**
+ * @brief SK register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 SK 0x0
+ *
+ */
+#define EM_BLE_SK_ADDR (0x0091003C + EM_BLE_CS_OFFSET)
+#define EM_BLE_SK_INDEX 0x0000001E
+#define EM_BLE_SK_RESET 0x00000000
+#define EM_BLE_SK_COUNT 8
+
+__INLINE uint16_t em_ble_sk_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ return EM_BLE_RD(EM_BLE_SK_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_sk_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ EM_BLE_WR(EM_BLE_SK_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_SK_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_SK_LSB 0
+#define EM_BLE_SK_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_SK_RST 0x0
+
+__INLINE uint16_t em_ble_sk_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_SK_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_sk_setf(int elt_idx, int reg_idx, uint16_t sk)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ BLE_ASSERT_ERR((((uint16_t)sk << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_SK_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, (uint16_t)sk << 0);
+}
+
+/**
+ * @brief ADV_BD_ADDR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 ADV_BD_ADDR 0x0
+ *
+ */
+#define EM_BLE_ADV_BD_ADDR_ADDR (0x0091003C + EM_BLE_CS_OFFSET)
+#define EM_BLE_ADV_BD_ADDR_INDEX 0x0000001E
+#define EM_BLE_ADV_BD_ADDR_RESET 0x00000000
+#define EM_BLE_ADV_BD_ADDR_COUNT 3
+
+__INLINE uint16_t em_ble_adv_bd_addr_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ return EM_BLE_RD(EM_BLE_ADV_BD_ADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_adv_bd_addr_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ EM_BLE_WR(EM_BLE_ADV_BD_ADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_ADV_BD_ADDR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_ADV_BD_ADDR_LSB 0
+#define EM_BLE_ADV_BD_ADDR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_ADV_BD_ADDR_RST 0x0
+
+__INLINE uint16_t em_ble_adv_bd_addr_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ADV_BD_ADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_adv_bd_addr_setf(int elt_idx, int reg_idx, uint16_t advbdaddr)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ BLE_ASSERT_ERR((((uint16_t)advbdaddr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_ADV_BD_ADDR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, (uint16_t)advbdaddr << 0);
+}
+
+/**
+ * @brief PEER_RALPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 PEER_RALPTR 0x0
+ *
+ */
+#define EM_BLE_PEER_RALPTR_ADDR (0x0091003C + EM_BLE_CS_OFFSET)
+#define EM_BLE_PEER_RALPTR_INDEX 0x0000001E
+#define EM_BLE_PEER_RALPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_peer_ralptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_PEER_RALPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_peer_ralptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_PEER_RALPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_PEER_RALPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_PEER_RALPTR_LSB 0
+#define EM_BLE_PEER_RALPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_PEER_RALPTR_RST 0x0
+
+__INLINE uint16_t em_ble_peer_ralptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PEER_RALPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_peer_ralptr_setf(int elt_idx, uint16_t peerralptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)peerralptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_PEER_RALPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)peerralptr << 0);
+}
+
+/**
+ * @brief ADV_BD_ADDR_TYPE register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 00 ADV_BD_ADDR_TYPE 0
+ *
+ */
+#define EM_BLE_ADV_BD_ADDR_TYPE_ADDR (0x00910042 + EM_BLE_CS_OFFSET)
+#define EM_BLE_ADV_BD_ADDR_TYPE_INDEX 0x00000021
+#define EM_BLE_ADV_BD_ADDR_TYPE_RESET 0x00000000
+
+__INLINE uint16_t em_ble_adv_bd_addr_type_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ADV_BD_ADDR_TYPE_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_adv_bd_addr_type_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ADV_BD_ADDR_TYPE_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ADV_BD_ADDR_TYPE_BIT ((uint16_t)0x00000001)
+#define EM_BLE_ADV_BD_ADDR_TYPE_POS 0
+
+#define EM_BLE_ADV_BD_ADDR_TYPE_RST 0x0
+
+__INLINE uint8_t em_ble_adv_bd_addr_type_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ADV_BD_ADDR_TYPE_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00000001)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_adv_bd_addr_type_setf(int elt_idx, uint8_t advbdaddrtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)advbdaddrtype << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_ADV_BD_ADDR_TYPE_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)advbdaddrtype << 0);
+}
+
+/**
+ * @brief AUXTXDESCPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 AUXTXDESCPTR 0x0
+ *
+ */
+#define EM_BLE_AUXTXDESCPTR_ADDR (0x00910044 + EM_BLE_CS_OFFSET)
+#define EM_BLE_AUXTXDESCPTR_INDEX 0x00000022
+#define EM_BLE_AUXTXDESCPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_auxtxdescptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_AUXTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_auxtxdescptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_AUXTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_AUXTXDESCPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_AUXTXDESCPTR_LSB 0
+#define EM_BLE_AUXTXDESCPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_AUXTXDESCPTR_RST 0x0
+
+__INLINE uint16_t em_ble_auxtxdescptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_AUXTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_auxtxdescptr_setf(int elt_idx, uint16_t auxtxdescptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)auxtxdescptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_AUXTXDESCPTR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)auxtxdescptr << 0);
+}
+
+/**
+ * @brief IV register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 IV 0x0
+ *
+ */
+#define EM_BLE_IV_ADDR (0x0091004C + EM_BLE_CS_OFFSET)
+#define EM_BLE_IV_INDEX 0x00000026
+#define EM_BLE_IV_RESET 0x00000000
+#define EM_BLE_IV_COUNT 4
+
+__INLINE uint16_t em_ble_iv_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 3);
+ return EM_BLE_RD(EM_BLE_IV_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_iv_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 3);
+ EM_BLE_WR(EM_BLE_IV_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_IV_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_IV_LSB 0
+#define EM_BLE_IV_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_IV_RST 0x0
+
+__INLINE uint16_t em_ble_iv_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 3);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_IV_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_iv_setf(int elt_idx, int reg_idx, uint16_t iv)
+{
+ BLE_ASSERT_ERR(reg_idx <= 3);
+ BLE_ASSERT_ERR((((uint16_t)iv << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_IV_ADDR + elt_idx * REG_EM_BLE_CS_SIZE + reg_idx * 2, (uint16_t)iv << 0);
+}
+
+/**
+ * @brief WINOFFSET_2M register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 WINOFFSET_2M 0x0
+ *
+ */
+#define EM_BLE_WINOFFSET_2M_ADDR (0x00910046 + EM_BLE_CS_OFFSET)
+#define EM_BLE_WINOFFSET_2M_INDEX 0x00000023
+#define EM_BLE_WINOFFSET_2M_RESET 0x00000000
+
+__INLINE uint16_t em_ble_winoffset_2m_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_WINOFFSET_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_winoffset_2m_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_WINOFFSET_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_WINOFFSET_2M_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_WINOFFSET_2M_LSB 0
+#define EM_BLE_WINOFFSET_2M_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_WINOFFSET_2M_RST 0x0
+
+__INLINE uint16_t em_ble_winoffset_2m_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_WINOFFSET_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_winoffset_2m_setf(int elt_idx, uint16_t winoffset2m)
+{
+ BLE_ASSERT_ERR((((uint16_t)winoffset2m << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_WINOFFSET_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)winoffset2m << 0);
+}
+
+/**
+ * @brief CONNINTERVAL_2M register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 CONNINTERVAL_2M 0x0
+ *
+ */
+#define EM_BLE_CONNINTERVAL_2M_ADDR (0x00910048 + EM_BLE_CS_OFFSET)
+#define EM_BLE_CONNINTERVAL_2M_INDEX 0x00000024
+#define EM_BLE_CONNINTERVAL_2M_RESET 0x00000000
+
+__INLINE uint16_t em_ble_conninterval_2m_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CONNINTERVAL_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_conninterval_2m_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CONNINTERVAL_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_CONNINTERVAL_2M_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_CONNINTERVAL_2M_LSB 0
+#define EM_BLE_CONNINTERVAL_2M_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_CONNINTERVAL_2M_RST 0x0
+
+__INLINE uint16_t em_ble_conninterval_2m_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CONNINTERVAL_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_conninterval_2m_setf(int elt_idx, uint16_t conninterval2m)
+{
+ BLE_ASSERT_ERR((((uint16_t)conninterval2m << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_CONNINTERVAL_2M_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)conninterval2m << 0);
+}
+
+/**
+ * @brief WINOFFSET_LR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 WINOFFSET_LR 0x0
+ *
+ */
+#define EM_BLE_WINOFFSET_LR_ADDR (0x0091004A + EM_BLE_CS_OFFSET)
+#define EM_BLE_WINOFFSET_LR_INDEX 0x00000025
+#define EM_BLE_WINOFFSET_LR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_winoffset_lr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_WINOFFSET_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_winoffset_lr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_WINOFFSET_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_WINOFFSET_LR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_WINOFFSET_LR_LSB 0
+#define EM_BLE_WINOFFSET_LR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_WINOFFSET_LR_RST 0x0
+
+__INLINE uint16_t em_ble_winoffset_lr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_WINOFFSET_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_winoffset_lr_setf(int elt_idx, uint16_t winoffsetlr)
+{
+ BLE_ASSERT_ERR((((uint16_t)winoffsetlr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_WINOFFSET_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)winoffsetlr << 0);
+}
+
+/**
+ * @brief CONNINTERVAL_LR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 CONNINTERVAL_LR 0x0
+ *
+ */
+#define EM_BLE_CONNINTERVAL_LR_ADDR (0x0091004C + EM_BLE_CS_OFFSET)
+#define EM_BLE_CONNINTERVAL_LR_INDEX 0x00000026
+#define EM_BLE_CONNINTERVAL_LR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_conninterval_lr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CONNINTERVAL_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_conninterval_lr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CONNINTERVAL_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_CONNINTERVAL_LR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_CONNINTERVAL_LR_LSB 0
+#define EM_BLE_CONNINTERVAL_LR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_CONNINTERVAL_LR_RST 0x0
+
+__INLINE uint16_t em_ble_conninterval_lr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CONNINTERVAL_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_conninterval_lr_setf(int elt_idx, uint16_t connintervallr)
+{
+ BLE_ASSERT_ERR((((uint16_t)connintervallr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_CONNINTERVAL_LR_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)connintervallr << 0);
+}
+
+/**
+ * @brief TXWINOFFSET register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXWINOFFSET 0x0
+ *
+ */
+#define EM_BLE_TXWINOFFSET_ADDR (0x00910054 + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXWINOFFSET_INDEX 0x0000002A
+#define EM_BLE_TXWINOFFSET_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txwinoffset_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXWINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txwinoffset_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXWINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXWINOFFSET_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXWINOFFSET_LSB 0
+#define EM_BLE_TXWINOFFSET_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXWINOFFSET_RST 0x0
+
+__INLINE uint16_t em_ble_txwinoffset_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXWINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txwinoffset_setf(int elt_idx, uint16_t txwinoffset)
+{
+ BLE_ASSERT_ERR((((uint16_t)txwinoffset << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXWINOFFSET_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)txwinoffset << 0);
+}
+
+/**
+ * @brief TXCCMPKTCNT0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXCCMPKTCNT0 0x0
+ *
+ */
+#define EM_BLE_TXCCMPKTCNT0_ADDR (0x00910054 + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXCCMPKTCNT0_INDEX 0x0000002A
+#define EM_BLE_TXCCMPKTCNT0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txccmpktcnt0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txccmpktcnt0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXCCMPKTCNT0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXCCMPKTCNT0_LSB 0
+#define EM_BLE_TXCCMPKTCNT0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXCCMPKTCNT0_RST 0x0
+
+__INLINE uint16_t em_ble_txccmpktcnt0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txccmpktcnt0_setf(int elt_idx, uint16_t txccmpktcnt0)
+{
+ BLE_ASSERT_ERR((((uint16_t)txccmpktcnt0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)txccmpktcnt0 << 0);
+}
+
+/**
+ * @brief EXTADVSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 07 PREV_CTE 0
+ * 06 PREV_PAM 0
+ * 05 PREV_LAM 0
+ * 04:03 PREV_ADV_MODE 0x0
+ * 02:00 PREV_ADV_PKT_TYPE 0x0
+ *
+ */
+#define EM_BLE_EXTADVSTAT_ADDR (0x00910056 + EM_BLE_CS_OFFSET)
+#define EM_BLE_EXTADVSTAT_INDEX 0x0000002B
+#define EM_BLE_EXTADVSTAT_RESET 0x00000000
+
+__INLINE uint16_t em_ble_extadvstat_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_extadvstat_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_PREV_CTE_BIT ((uint16_t)0x00000080)
+#define EM_BLE_PREV_CTE_POS 7
+#define EM_BLE_PREV_PAM_BIT ((uint16_t)0x00000040)
+#define EM_BLE_PREV_PAM_POS 6
+#define EM_BLE_PREV_LAM_BIT ((uint16_t)0x00000020)
+#define EM_BLE_PREV_LAM_POS 5
+#define EM_BLE_PREV_ADV_MODE_MASK ((uint16_t)0x00000018)
+#define EM_BLE_PREV_ADV_MODE_LSB 3
+#define EM_BLE_PREV_ADV_MODE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_PREV_ADV_PKT_TYPE_MASK ((uint16_t)0x00000007)
+#define EM_BLE_PREV_ADV_PKT_TYPE_LSB 0
+#define EM_BLE_PREV_ADV_PKT_TYPE_WIDTH ((uint16_t)0x00000003)
+
+#define EM_BLE_PREV_CTE_RST 0x0
+#define EM_BLE_PREV_PAM_RST 0x0
+#define EM_BLE_PREV_LAM_RST 0x0
+#define EM_BLE_PREV_ADV_MODE_RST 0x0
+#define EM_BLE_PREV_ADV_PKT_TYPE_RST 0x0
+
+__INLINE void em_ble_extadvstat_pack(int elt_idx, uint8_t prevcte, uint8_t prevpam, uint8_t prevlam, uint8_t prevadvmode, uint8_t prevadvpkttype)
+{
+ BLE_ASSERT_ERR((((uint16_t)prevcte << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)prevpam << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)prevlam << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)prevadvmode << 3) & ~((uint16_t)0x00000018)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)prevadvpkttype << 0) & ~((uint16_t)0x00000007)) == 0);
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)prevcte << 7) | ((uint16_t)prevpam << 6) | ((uint16_t)prevlam << 5) | ((uint16_t)prevadvmode << 3) | ((uint16_t)prevadvpkttype << 0));
+}
+
+__INLINE void em_ble_extadvstat_unpack(int elt_idx, uint8_t* prevcte, uint8_t* prevpam, uint8_t* prevlam, uint8_t* prevadvmode, uint8_t* prevadvpkttype)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *prevcte = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *prevpam = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *prevlam = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *prevadvmode = (localVal & ((uint16_t)0x00000018)) >> 3;
+ *prevadvpkttype = (localVal & ((uint16_t)0x00000007)) >> 0;
+}
+
+__INLINE uint8_t em_ble_extadvstat_prev_cte_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_extadvstat_prev_cte_setf(int elt_idx, uint8_t prevcte)
+{
+ BLE_ASSERT_ERR((((uint16_t)prevcte << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)prevcte << 7));
+}
+
+__INLINE uint8_t em_ble_extadvstat_prev_pam_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_extadvstat_prev_pam_setf(int elt_idx, uint8_t prevpam)
+{
+ BLE_ASSERT_ERR((((uint16_t)prevpam << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)prevpam << 6));
+}
+
+__INLINE uint8_t em_ble_extadvstat_prev_lam_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_extadvstat_prev_lam_setf(int elt_idx, uint8_t prevlam)
+{
+ BLE_ASSERT_ERR((((uint16_t)prevlam << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)prevlam << 5));
+}
+
+__INLINE uint8_t em_ble_extadvstat_prev_adv_mode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000018)) >> 3);
+}
+
+__INLINE void em_ble_extadvstat_prev_adv_mode_setf(int elt_idx, uint8_t prevadvmode)
+{
+ BLE_ASSERT_ERR((((uint16_t)prevadvmode << 3) & ~((uint16_t)0x00000018)) == 0);
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000018)) | ((uint16_t)prevadvmode << 3));
+}
+
+__INLINE uint8_t em_ble_extadvstat_prev_adv_pkt_type_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000007)) >> 0);
+}
+
+__INLINE void em_ble_extadvstat_prev_adv_pkt_type_setf(int elt_idx, uint8_t prevadvpkttype)
+{
+ BLE_ASSERT_ERR((((uint16_t)prevadvpkttype << 0) & ~((uint16_t)0x00000007)) == 0);
+ EM_BLE_WR(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_EXTADVSTAT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000007)) | ((uint16_t)prevadvpkttype << 0));
+}
+
+/**
+ * @brief TXCCMPKTCNT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXCCMPKTCNT1 0x0
+ *
+ */
+#define EM_BLE_TXCCMPKTCNT1_ADDR (0x00910056 + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXCCMPKTCNT1_INDEX 0x0000002B
+#define EM_BLE_TXCCMPKTCNT1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txccmpktcnt1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txccmpktcnt1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXCCMPKTCNT1_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXCCMPKTCNT1_LSB 0
+#define EM_BLE_TXCCMPKTCNT1_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXCCMPKTCNT1_RST 0x0
+
+__INLINE uint16_t em_ble_txccmpktcnt1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txccmpktcnt1_setf(int elt_idx, uint16_t txccmpktcnt1)
+{
+ BLE_ASSERT_ERR((((uint16_t)txccmpktcnt1 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)txccmpktcnt1 << 0);
+}
+
+/**
+ * @brief TXCCMPKTCNT2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 06:00 TXCCMPKTCNT2 0x0
+ *
+ */
+#define EM_BLE_TXCCMPKTCNT2_ADDR (0x00910058 + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXCCMPKTCNT2_INDEX 0x0000002C
+#define EM_BLE_TXCCMPKTCNT2_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txccmpktcnt2_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_txccmpktcnt2_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXCCMPKTCNT2_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_TXCCMPKTCNT2_LSB 0
+#define EM_BLE_TXCCMPKTCNT2_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_TXCCMPKTCNT2_RST 0x0
+
+__INLINE uint8_t em_ble_txccmpktcnt2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000007F)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txccmpktcnt2_setf(int elt_idx, uint8_t txccmpktcnt2)
+{
+ BLE_ASSERT_ERR((((uint16_t)txccmpktcnt2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_TXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)txccmpktcnt2 << 0);
+}
+
+/**
+ * @brief RXCCMPKTCNT0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXCCMPKTCNT0 0x0
+ *
+ */
+#define EM_BLE_RXCCMPKTCNT0_ADDR (0x0091005A + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXCCMPKTCNT0_INDEX 0x0000002D
+#define EM_BLE_RXCCMPKTCNT0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxccmpktcnt0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxccmpktcnt0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXCCMPKTCNT0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXCCMPKTCNT0_LSB 0
+#define EM_BLE_RXCCMPKTCNT0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXCCMPKTCNT0_RST 0x0
+
+__INLINE uint16_t em_ble_rxccmpktcnt0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxccmpktcnt0_setf(int elt_idx, uint16_t rxccmpktcnt0)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxccmpktcnt0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCCMPKTCNT0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)rxccmpktcnt0 << 0);
+}
+
+/**
+ * @brief RXCCMPKTCNT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXCCMPKTCNT1 0x0
+ *
+ */
+#define EM_BLE_RXCCMPKTCNT1_ADDR (0x0091005C + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXCCMPKTCNT1_INDEX 0x0000002E
+#define EM_BLE_RXCCMPKTCNT1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxccmpktcnt1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxccmpktcnt1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXCCMPKTCNT1_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXCCMPKTCNT1_LSB 0
+#define EM_BLE_RXCCMPKTCNT1_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXCCMPKTCNT1_RST 0x0
+
+__INLINE uint16_t em_ble_rxccmpktcnt1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxccmpktcnt1_setf(int elt_idx, uint16_t rxccmpktcnt1)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxccmpktcnt1 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCCMPKTCNT1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)rxccmpktcnt1 << 0);
+}
+
+/**
+ * @brief RXCCMPKTCNT2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 06:00 RXCCMPKTCNT2 0x0
+ *
+ */
+#define EM_BLE_RXCCMPKTCNT2_ADDR (0x0091005E + EM_BLE_CS_OFFSET)
+#define EM_BLE_RXCCMPKTCNT2_INDEX 0x0000002F
+#define EM_BLE_RXCCMPKTCNT2_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxccmpktcnt2_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_rxccmpktcnt2_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXCCMPKTCNT2_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_RXCCMPKTCNT2_LSB 0
+#define EM_BLE_RXCCMPKTCNT2_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_RXCCMPKTCNT2_RST 0x0
+
+__INLINE uint8_t em_ble_rxccmpktcnt2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000007F)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxccmpktcnt2_setf(int elt_idx, uint8_t rxccmpktcnt2)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxccmpktcnt2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_RXCCMPKTCNT2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)rxccmpktcnt2 << 0);
+}
+
+/**
+ * @brief EVTCNT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 EVTCNT 0x0
+ *
+ */
+#define EM_BLE_EVTCNT_ADDR (0x00910060 + EM_BLE_CS_OFFSET)
+#define EM_BLE_EVTCNT_INDEX 0x00000030
+#define EM_BLE_EVTCNT_RESET 0x00000000
+
+__INLINE uint16_t em_ble_evtcnt_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_EVTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_evtcnt_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_EVTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_EVTCNT_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_EVTCNT_LSB 0
+#define EM_BLE_EVTCNT_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_EVTCNT_RST 0x0
+
+__INLINE uint16_t em_ble_evtcnt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EVTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_evtcnt_setf(int elt_idx, uint16_t evtcnt)
+{
+ BLE_ASSERT_ERR((((uint16_t)evtcnt << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_EVTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)evtcnt << 0);
+}
+
+/**
+ * @brief EVTCNT_OFFSET0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 EVTCNT_OFFSET0 0x0
+ *
+ */
+#define EM_BLE_EVTCNT_OFFSET0_ADDR (0x00910062 + EM_BLE_CS_OFFSET)
+#define EM_BLE_EVTCNT_OFFSET0_INDEX 0x00000031
+#define EM_BLE_EVTCNT_OFFSET0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_evtcnt_offset0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_EVTCNT_OFFSET0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_evtcnt_offset0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_EVTCNT_OFFSET0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_EVTCNT_OFFSET0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_EVTCNT_OFFSET0_LSB 0
+#define EM_BLE_EVTCNT_OFFSET0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_EVTCNT_OFFSET0_RST 0x0
+
+__INLINE uint16_t em_ble_evtcnt_offset0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EVTCNT_OFFSET0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_evtcnt_offset0_setf(int elt_idx, uint16_t evtcntoffset0)
+{
+ BLE_ASSERT_ERR((((uint16_t)evtcntoffset0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_EVTCNT_OFFSET0_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)evtcntoffset0 << 0);
+}
+
+/**
+ * @brief EVTCNT_OFFSET1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 EVTCNT_OFFSET1 0x0
+ *
+ */
+#define EM_BLE_EVTCNT_OFFSET1_ADDR (0x00910064 + EM_BLE_CS_OFFSET)
+#define EM_BLE_EVTCNT_OFFSET1_INDEX 0x00000032
+#define EM_BLE_EVTCNT_OFFSET1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_evtcnt_offset1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_EVTCNT_OFFSET1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_evtcnt_offset1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_EVTCNT_OFFSET1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_EVTCNT_OFFSET1_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_EVTCNT_OFFSET1_LSB 0
+#define EM_BLE_EVTCNT_OFFSET1_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_EVTCNT_OFFSET1_RST 0x0
+
+__INLINE uint16_t em_ble_evtcnt_offset1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EVTCNT_OFFSET1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_evtcnt_offset1_setf(int elt_idx, uint16_t evtcntoffset1)
+{
+ BLE_ASSERT_ERR((((uint16_t)evtcntoffset1 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_EVTCNT_OFFSET1_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)evtcntoffset1 << 0);
+}
+
+/**
+ * @brief EVTCNT_OFFSET2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 06:00 EVTCNT_OFFSET2 0x0
+ *
+ */
+#define EM_BLE_EVTCNT_OFFSET2_ADDR (0x00910066 + EM_BLE_CS_OFFSET)
+#define EM_BLE_EVTCNT_OFFSET2_INDEX 0x00000033
+#define EM_BLE_EVTCNT_OFFSET2_RESET 0x00000000
+
+__INLINE uint16_t em_ble_evtcnt_offset2_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_EVTCNT_OFFSET2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_evtcnt_offset2_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_EVTCNT_OFFSET2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_EVTCNT_OFFSET2_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_EVTCNT_OFFSET2_LSB 0
+#define EM_BLE_EVTCNT_OFFSET2_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_EVTCNT_OFFSET2_RST 0x0
+
+__INLINE uint8_t em_ble_evtcnt_offset2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_EVTCNT_OFFSET2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000007F)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_evtcnt_offset2_setf(int elt_idx, uint8_t evtcntoffset2)
+{
+ BLE_ASSERT_ERR((((uint16_t)evtcntoffset2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_EVTCNT_OFFSET2_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (uint16_t)evtcntoffset2 << 0);
+}
+
+/**
+ * @brief ISOEVTCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 FLUSHCNT 0x0
+ * 07:00 SUBEVTCNT 0x0
+ *
+ */
+#define EM_BLE_ISOEVTCNTL_ADDR (0x00910068 + EM_BLE_CS_OFFSET)
+#define EM_BLE_ISOEVTCNTL_INDEX 0x00000034
+#define EM_BLE_ISOEVTCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_isoevtcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_isoevtcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_FLUSHCNT_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_FLUSHCNT_LSB 8
+#define EM_BLE_FLUSHCNT_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_SUBEVTCNT_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_SUBEVTCNT_LSB 0
+#define EM_BLE_SUBEVTCNT_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_FLUSHCNT_RST 0x0
+#define EM_BLE_SUBEVTCNT_RST 0x0
+
+__INLINE void em_ble_isoevtcntl_pack(int elt_idx, uint8_t flushcnt, uint8_t subevtcnt)
+{
+ BLE_ASSERT_ERR((((uint16_t)flushcnt << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)subevtcnt << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)flushcnt << 8) | ((uint16_t)subevtcnt << 0));
+}
+
+__INLINE void em_ble_isoevtcntl_unpack(int elt_idx, uint8_t* flushcnt, uint8_t* subevtcnt)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *flushcnt = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *subevtcnt = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_isoevtcntl_flushcnt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_isoevtcntl_flushcnt_setf(int elt_idx, uint8_t flushcnt)
+{
+ BLE_ASSERT_ERR((((uint16_t)flushcnt << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)flushcnt << 8));
+}
+
+__INLINE uint8_t em_ble_isoevtcntl_subevtcnt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_isoevtcntl_subevtcnt_setf(int elt_idx, uint8_t subevtcnt)
+{
+ BLE_ASSERT_ERR((((uint16_t)subevtcnt << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOEVTCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)subevtcnt << 0));
+}
+
+/**
+ * @brief ISOTXRXCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 ISORXBUFF_FULL 0
+ * 14 ISOLASTEMPTY 0
+ * 13 ISOMD 0
+ * 12 ISOSN 0
+ * 11 ISONESN 0
+ * 09 ISORETX 0
+ * 08 ISORSVD 0
+ * 03 ISOWAITACK 0
+ * 02 ISOLASTMD 0
+ * 01 ISOLASTNESN 0
+ * 00 ISOLASTSN 0
+ *
+ */
+#define EM_BLE_ISOTXRXCNTL_ADDR (0x0091006A + EM_BLE_CS_OFFSET)
+#define EM_BLE_ISOTXRXCNTL_INDEX 0x00000035
+#define EM_BLE_ISOTXRXCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_isotxrxcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+__INLINE void em_ble_isotxrxcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ISORXBUFF_FULL_BIT ((uint16_t)0x00008000)
+#define EM_BLE_ISORXBUFF_FULL_POS 15
+#define EM_BLE_ISOLASTEMPTY_BIT ((uint16_t)0x00004000)
+#define EM_BLE_ISOLASTEMPTY_POS 14
+#define EM_BLE_ISOMD_BIT ((uint16_t)0x00002000)
+#define EM_BLE_ISOMD_POS 13
+#define EM_BLE_ISOSN_BIT ((uint16_t)0x00001000)
+#define EM_BLE_ISOSN_POS 12
+#define EM_BLE_ISONESN_BIT ((uint16_t)0x00000800)
+#define EM_BLE_ISONESN_POS 11
+#define EM_BLE_ISORETX_BIT ((uint16_t)0x00000200)
+#define EM_BLE_ISORETX_POS 9
+#define EM_BLE_ISORSVD_BIT ((uint16_t)0x00000100)
+#define EM_BLE_ISORSVD_POS 8
+#define EM_BLE_ISOWAITACK_BIT ((uint16_t)0x00000008)
+#define EM_BLE_ISOWAITACK_POS 3
+#define EM_BLE_ISOLASTMD_BIT ((uint16_t)0x00000004)
+#define EM_BLE_ISOLASTMD_POS 2
+#define EM_BLE_ISOLASTNESN_BIT ((uint16_t)0x00000002)
+#define EM_BLE_ISOLASTNESN_POS 1
+#define EM_BLE_ISOLASTSN_BIT ((uint16_t)0x00000001)
+#define EM_BLE_ISOLASTSN_POS 0
+
+#define EM_BLE_ISORXBUFF_FULL_RST 0x0
+#define EM_BLE_ISOLASTEMPTY_RST 0x0
+#define EM_BLE_ISOMD_RST 0x0
+#define EM_BLE_ISOSN_RST 0x0
+#define EM_BLE_ISONESN_RST 0x0
+#define EM_BLE_ISORETX_RST 0x0
+#define EM_BLE_ISORSVD_RST 0x0
+#define EM_BLE_ISOWAITACK_RST 0x0
+#define EM_BLE_ISOLASTMD_RST 0x0
+#define EM_BLE_ISOLASTNESN_RST 0x0
+#define EM_BLE_ISOLASTSN_RST 0x0
+
+__INLINE void em_ble_isotxrxcntl_pack(int elt_idx, uint8_t isorxbufffull, uint8_t isolastempty, uint8_t isomd, uint8_t isosn, uint8_t isonesn, uint8_t isoretx, uint8_t isorsvd, uint8_t isowaitack, uint8_t isolastmd, uint8_t isolastnesn, uint8_t isolastsn)
+{
+ BLE_ASSERT_ERR((((uint16_t)isorxbufffull << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isolastempty << 14) & ~((uint16_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isomd << 13) & ~((uint16_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isosn << 12) & ~((uint16_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isonesn << 11) & ~((uint16_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isoretx << 9) & ~((uint16_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isorsvd << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isowaitack << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isolastmd << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isolastnesn << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)isolastsn << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, ((uint16_t)isorxbufffull << 15) | ((uint16_t)isolastempty << 14) | ((uint16_t)isomd << 13) | ((uint16_t)isosn << 12) | ((uint16_t)isonesn << 11) | ((uint16_t)isoretx << 9) | ((uint16_t)isorsvd << 8) | ((uint16_t)isowaitack << 3) | ((uint16_t)isolastmd << 2) | ((uint16_t)isolastnesn << 1) | ((uint16_t)isolastsn << 0));
+}
+
+__INLINE void em_ble_isotxrxcntl_unpack(int elt_idx, uint8_t* isorxbufffull, uint8_t* isolastempty, uint8_t* isomd, uint8_t* isosn, uint8_t* isonesn, uint8_t* isoretx, uint8_t* isorsvd, uint8_t* isowaitack, uint8_t* isolastmd, uint8_t* isolastnesn, uint8_t* isolastsn)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *isorxbufffull = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *isolastempty = (localVal & ((uint16_t)0x00004000)) >> 14;
+ *isomd = (localVal & ((uint16_t)0x00002000)) >> 13;
+ *isosn = (localVal & ((uint16_t)0x00001000)) >> 12;
+ *isonesn = (localVal & ((uint16_t)0x00000800)) >> 11;
+ *isoretx = (localVal & ((uint16_t)0x00000200)) >> 9;
+ *isorsvd = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *isowaitack = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *isolastmd = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *isolastnesn = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *isolastsn = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isorxbuff_full_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_isotxrxcntl_isorxbuff_full_setf(int elt_idx, uint8_t isorxbufffull)
+{
+ BLE_ASSERT_ERR((((uint16_t)isorxbufffull << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)isorxbufffull << 15));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isolastempty_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00004000)) >> 14);
+}
+
+__INLINE void em_ble_isotxrxcntl_isolastempty_setf(int elt_idx, uint8_t isolastempty)
+{
+ BLE_ASSERT_ERR((((uint16_t)isolastempty << 14) & ~((uint16_t)0x00004000)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00004000)) | ((uint16_t)isolastempty << 14));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isomd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00002000)) >> 13);
+}
+
+__INLINE void em_ble_isotxrxcntl_isomd_setf(int elt_idx, uint8_t isomd)
+{
+ BLE_ASSERT_ERR((((uint16_t)isomd << 13) & ~((uint16_t)0x00002000)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00002000)) | ((uint16_t)isomd << 13));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isosn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00001000)) >> 12);
+}
+
+__INLINE void em_ble_isotxrxcntl_isosn_setf(int elt_idx, uint8_t isosn)
+{
+ BLE_ASSERT_ERR((((uint16_t)isosn << 12) & ~((uint16_t)0x00001000)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00001000)) | ((uint16_t)isosn << 12));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isonesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000800)) >> 11);
+}
+
+__INLINE void em_ble_isotxrxcntl_isonesn_setf(int elt_idx, uint8_t isonesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)isonesn << 11) & ~((uint16_t)0x00000800)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000800)) | ((uint16_t)isonesn << 11));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isoretx_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000200)) >> 9);
+}
+
+__INLINE void em_ble_isotxrxcntl_isoretx_setf(int elt_idx, uint8_t isoretx)
+{
+ BLE_ASSERT_ERR((((uint16_t)isoretx << 9) & ~((uint16_t)0x00000200)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000200)) | ((uint16_t)isoretx << 9));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isorsvd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_isotxrxcntl_isorsvd_setf(int elt_idx, uint8_t isorsvd)
+{
+ BLE_ASSERT_ERR((((uint16_t)isorsvd << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)isorsvd << 8));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isowaitack_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_isotxrxcntl_isowaitack_setf(int elt_idx, uint8_t isowaitack)
+{
+ BLE_ASSERT_ERR((((uint16_t)isowaitack << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)isowaitack << 3));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isolastmd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_isotxrxcntl_isolastmd_setf(int elt_idx, uint8_t isolastmd)
+{
+ BLE_ASSERT_ERR((((uint16_t)isolastmd << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)isolastmd << 2));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isolastnesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_isotxrxcntl_isolastnesn_setf(int elt_idx, uint8_t isolastnesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)isolastnesn << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)isolastnesn << 1));
+}
+
+__INLINE uint8_t em_ble_isotxrxcntl_isolastsn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_isotxrxcntl_isolastsn_setf(int elt_idx, uint8_t isolastsn)
+{
+ BLE_ASSERT_ERR((((uint16_t)isolastsn << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE, (EM_BLE_RD(EM_BLE_ISOTXRXCNTL_ADDR + elt_idx * REG_EM_BLE_CS_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)isolastsn << 0));
+}
+
+/**
+ * @brief TXRXDESCCNT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 ACLRXDESCCNT 0x0
+ * 07:00 ACLTXDESCCNT 0x0
+ *
+ */
+#define EM_BLE_TXRXDESCCNT_ADDR (0x0091006C + EM_BLE_CS_OFFSET)
+#define EM_BLE_TXRXDESCCNT_INDEX 0x00000036
+#define EM_BLE_TXRXDESCCNT_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txrxdesccnt_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXRXDESCCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+// field definitions
+#define EM_BLE_ACLRXDESCCNT_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_ACLRXDESCCNT_LSB 8
+#define EM_BLE_ACLRXDESCCNT_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_ACLTXDESCCNT_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_ACLTXDESCCNT_LSB 0
+#define EM_BLE_ACLTXDESCCNT_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_ACLRXDESCCNT_RST 0x0
+#define EM_BLE_ACLTXDESCCNT_RST 0x0
+
+__INLINE void em_ble_txrxdesccnt_unpack(int elt_idx, uint8_t* aclrxdesccnt, uint8_t* acltxdesccnt)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXDESCCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *aclrxdesccnt = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *acltxdesccnt = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txrxdesccnt_aclrxdesccnt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXDESCCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE uint8_t em_ble_txrxdesccnt_acltxdesccnt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXRXDESCCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+/**
+ * @brief ISOTXRXPKTCNT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 ISORXPKTCNTL 0x0
+ * 07:00 ISOTXPKTCNTL 0x0
+ *
+ */
+#define EM_BLE_ISOTXRXPKTCNT_ADDR (0x0091006E + EM_BLE_CS_OFFSET)
+#define EM_BLE_ISOTXRXPKTCNT_INDEX 0x00000037
+#define EM_BLE_ISOTXRXPKTCNT_RESET 0x00000000
+
+__INLINE uint16_t em_ble_isotxrxpktcnt_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_ISOTXRXPKTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+}
+
+// field definitions
+#define EM_BLE_ISORXPKTCNTL_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_ISORXPKTCNTL_LSB 8
+#define EM_BLE_ISORXPKTCNTL_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_ISOTXPKTCNTL_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_ISOTXPKTCNTL_LSB 0
+#define EM_BLE_ISOTXPKTCNTL_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_ISORXPKTCNTL_RST 0x0
+#define EM_BLE_ISOTXPKTCNTL_RST 0x0
+
+__INLINE void em_ble_isotxrxpktcnt_unpack(int elt_idx, uint8_t* isorxpktcntl, uint8_t* isotxpktcntl)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXPKTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+
+ *isorxpktcntl = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *isotxpktcntl = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_isotxrxpktcnt_isorxpktcntl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXPKTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE uint8_t em_ble_isotxrxpktcnt_isotxpktcntl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_ISOTXRXPKTCNT_ADDR + elt_idx * REG_EM_BLE_CS_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+
+#endif // _REG_EM_BLE_CS_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_et.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_et.h
new file mode 100755
index 0000000..1215ae9
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_et.h
@@ -0,0 +1,538 @@
+#ifndef _REG_EM_BLE_ET_H_
+#define _REG_EM_BLE_ET_H_
+
+#include
+#include "_reg_em_ble_et.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_ET_COUNT 8
+
+#define REG_EM_BLE_ET_DECODING_MASK 0x0000000F
+
+#define REG_EM_BLE_ET_ADDR_GET(idx) (EM_BLE_ET_OFFSET + (idx) * REG_EM_BLE_ET_SIZE)
+
+/**
+ * @brief LE_EXTAB register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:11 SCH_PRIO1 0x0
+ * 10 SPA 0
+ * 08 AE_NPS 0
+ * 07 RSVD 0
+ * 06 ISO 0
+ * 05:03 STATUS 0x0
+ * 02:00 MODE 0x0
+ *
+ */
+#define EM_BLE_LE_EXTAB_ADDR (0x00910000 + EM_BLE_ET_OFFSET)
+#define EM_BLE_LE_EXTAB_INDEX 0x00000000
+#define EM_BLE_LE_EXTAB_RESET 0x00000000
+
+__INLINE uint16_t em_ble_le_extab_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_le_extab_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_SCH_PRIO1_MASK ((uint16_t)0x0000F800)
+#define EM_BLE_SCH_PRIO1_LSB 11
+#define EM_BLE_SCH_PRIO1_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_SPA_BIT ((uint16_t)0x00000400)
+#define EM_BLE_SPA_POS 10
+#define EM_BLE_AE_NPS_BIT ((uint16_t)0x00000100)
+#define EM_BLE_AE_NPS_POS 8
+#define EM_BLE_RSVD_BIT ((uint16_t)0x00000080)
+#define EM_BLE_RSVD_POS 7
+#define EM_BLE_ISO_BIT ((uint16_t)0x00000040)
+#define EM_BLE_ISO_POS 6
+#define EM_BLE_STATUS_MASK ((uint16_t)0x00000038)
+#define EM_BLE_STATUS_LSB 3
+#define EM_BLE_STATUS_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_MODE_MASK ((uint16_t)0x00000007)
+#define EM_BLE_MODE_LSB 0
+#define EM_BLE_MODE_WIDTH ((uint16_t)0x00000003)
+
+#define EM_BLE_SCH_PRIO1_RST 0x0
+#define EM_BLE_SPA_RST 0x0
+#define EM_BLE_AE_NPS_RST 0x0
+#define EM_BLE_RSVD_RST 0x0
+#define EM_BLE_ISO_RST 0x0
+#define EM_BLE_STATUS_RST 0x0
+#define EM_BLE_MODE_RST 0x0
+
+__INLINE void em_ble_le_extab_pack(int elt_idx, uint8_t schprio1, uint8_t spa, uint8_t aenps, uint8_t rsvd, uint8_t iso, uint8_t status, uint8_t mode)
+{
+ BLE_ASSERT_ERR((((uint16_t)schprio1 << 11) & ~((uint16_t)0x0000F800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)spa << 10) & ~((uint16_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)aenps << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rsvd << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)iso << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)status << 3) & ~((uint16_t)0x00000038)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)mode << 0) & ~((uint16_t)0x00000007)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, ((uint16_t)schprio1 << 11) | ((uint16_t)spa << 10) | ((uint16_t)aenps << 8) | ((uint16_t)rsvd << 7) | ((uint16_t)iso << 6) | ((uint16_t)status << 3) | ((uint16_t)mode << 0));
+}
+
+__INLINE void em_ble_le_extab_unpack(int elt_idx, uint8_t* schprio1, uint8_t* spa, uint8_t* aenps, uint8_t* rsvd, uint8_t* iso, uint8_t* status, uint8_t* mode)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+
+ *schprio1 = (localVal & ((uint16_t)0x0000F800)) >> 11;
+ *spa = (localVal & ((uint16_t)0x00000400)) >> 10;
+ *aenps = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *rsvd = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *iso = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *status = (localVal & ((uint16_t)0x00000038)) >> 3;
+ *mode = (localVal & ((uint16_t)0x00000007)) >> 0;
+}
+
+__INLINE uint8_t em_ble_le_extab_sch_prio1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x0000F800)) >> 11);
+}
+
+__INLINE void em_ble_le_extab_sch_prio1_setf(int elt_idx, uint8_t schprio1)
+{
+ BLE_ASSERT_ERR((((uint16_t)schprio1 << 11) & ~((uint16_t)0x0000F800)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x0000F800)) | ((uint16_t)schprio1 << 11));
+}
+
+__INLINE uint8_t em_ble_le_extab_spa_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00000400)) >> 10);
+}
+
+__INLINE void em_ble_le_extab_spa_setf(int elt_idx, uint8_t spa)
+{
+ BLE_ASSERT_ERR((((uint16_t)spa << 10) & ~((uint16_t)0x00000400)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00000400)) | ((uint16_t)spa << 10));
+}
+
+__INLINE uint8_t em_ble_le_extab_ae_nps_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_le_extab_ae_nps_setf(int elt_idx, uint8_t aenps)
+{
+ BLE_ASSERT_ERR((((uint16_t)aenps << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)aenps << 8));
+}
+
+__INLINE uint8_t em_ble_le_extab_rsvd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_le_extab_rsvd_setf(int elt_idx, uint8_t rsvd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rsvd << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)rsvd << 7));
+}
+
+__INLINE uint8_t em_ble_le_extab_iso_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_le_extab_iso_setf(int elt_idx, uint8_t iso)
+{
+ BLE_ASSERT_ERR((((uint16_t)iso << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)iso << 6));
+}
+
+__INLINE uint8_t em_ble_le_extab_status_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00000038)) >> 3);
+}
+
+__INLINE void em_ble_le_extab_status_setf(int elt_idx, uint8_t status)
+{
+ BLE_ASSERT_ERR((((uint16_t)status << 3) & ~((uint16_t)0x00000038)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00000038)) | ((uint16_t)status << 3));
+}
+
+__INLINE uint8_t em_ble_le_extab_mode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00000007)) >> 0);
+}
+
+__INLINE void em_ble_le_extab_mode_setf(int elt_idx, uint8_t mode)
+{
+ BLE_ASSERT_ERR((((uint16_t)mode << 0) & ~((uint16_t)0x00000007)) == 0);
+ EM_BLE_WR(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_LE_EXTAB_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00000007)) | ((uint16_t)mode << 0));
+}
+
+/**
+ * @brief RAWSTP0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RAWSTP0 0x0
+ *
+ */
+#define EM_BLE_RAWSTP0_ADDR (0x00910002 + EM_BLE_ET_OFFSET)
+#define EM_BLE_RAWSTP0_INDEX 0x00000001
+#define EM_BLE_RAWSTP0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rawstp0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RAWSTP0_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_rawstp0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RAWSTP0_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RAWSTP0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RAWSTP0_LSB 0
+#define EM_BLE_RAWSTP0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RAWSTP0_RST 0x0
+
+__INLINE uint16_t em_ble_rawstp0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAWSTP0_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rawstp0_setf(int elt_idx, uint16_t rawstp0)
+{
+ BLE_ASSERT_ERR((((uint16_t)rawstp0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAWSTP0_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (uint16_t)rawstp0 << 0);
+}
+
+/**
+ * @brief RAWSTP1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 11:00 RAWSTP1 0x0
+ *
+ */
+#define EM_BLE_RAWSTP1_ADDR (0x00910004 + EM_BLE_ET_OFFSET)
+#define EM_BLE_RAWSTP1_INDEX 0x00000002
+#define EM_BLE_RAWSTP1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rawstp1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RAWSTP1_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_rawstp1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RAWSTP1_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RAWSTP1_MASK ((uint16_t)0x00000FFF)
+#define EM_BLE_RAWSTP1_LSB 0
+#define EM_BLE_RAWSTP1_WIDTH ((uint16_t)0x0000000C)
+
+#define EM_BLE_RAWSTP1_RST 0x0
+
+__INLINE uint16_t em_ble_rawstp1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAWSTP1_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00000FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rawstp1_setf(int elt_idx, uint16_t rawstp1)
+{
+ BLE_ASSERT_ERR((((uint16_t)rawstp1 << 0) & ~((uint16_t)0x00000FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAWSTP1_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (uint16_t)rawstp1 << 0);
+}
+
+/**
+ * @brief FINESTP register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 09:00 FINESTP 0x0
+ *
+ */
+#define EM_BLE_FINESTP_ADDR (0x00910006 + EM_BLE_ET_OFFSET)
+#define EM_BLE_FINESTP_INDEX 0x00000003
+#define EM_BLE_FINESTP_RESET 0x00000000
+
+__INLINE uint16_t em_ble_finestp_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_FINESTP_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_finestp_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_FINESTP_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_FINESTP_MASK ((uint16_t)0x000003FF)
+#define EM_BLE_FINESTP_LSB 0
+#define EM_BLE_FINESTP_WIDTH ((uint16_t)0x0000000A)
+
+#define EM_BLE_FINESTP_RST 0x0
+
+__INLINE uint16_t em_ble_finestp_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FINESTP_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x000003FF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_finestp_setf(int elt_idx, uint16_t finestp)
+{
+ BLE_ASSERT_ERR((((uint16_t)finestp << 0) & ~((uint16_t)0x000003FF)) == 0);
+ EM_BLE_WR(EM_BLE_FINESTP_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (uint16_t)finestp << 0);
+}
+
+/**
+ * @brief CSPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 CSPTR 0x0
+ *
+ */
+#define EM_BLE_CSPTR_ADDR (0x00910008 + EM_BLE_ET_OFFSET)
+#define EM_BLE_CSPTR_INDEX 0x00000004
+#define EM_BLE_CSPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_csptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_CSPTR_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_csptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_CSPTR_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_CSPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_CSPTR_LSB 0
+#define EM_BLE_CSPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_CSPTR_RST 0x0
+
+__INLINE uint16_t em_ble_csptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_CSPTR_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_csptr_setf(int elt_idx, uint16_t csptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)csptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_CSPTR_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (uint16_t)csptr << 0);
+}
+
+/**
+ * @brief PRIOBW register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 PRIO1D_UNIT 0
+ * 14:00 PRIO1D 0x0
+ *
+ */
+#define EM_BLE_PRIOBW_ADDR (0x0091000A + EM_BLE_ET_OFFSET)
+#define EM_BLE_PRIOBW_INDEX 0x00000005
+#define EM_BLE_PRIOBW_RESET 0x00000000
+
+__INLINE uint16_t em_ble_priobw_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_priobw_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_PRIO1D_UNIT_BIT ((uint16_t)0x00008000)
+#define EM_BLE_PRIO1D_UNIT_POS 15
+#define EM_BLE_PRIO1D_MASK ((uint16_t)0x00007FFF)
+#define EM_BLE_PRIO1D_LSB 0
+#define EM_BLE_PRIO1D_WIDTH ((uint16_t)0x0000000F)
+
+#define EM_BLE_PRIO1D_UNIT_RST 0x0
+#define EM_BLE_PRIO1D_RST 0x0
+
+__INLINE void em_ble_priobw_pack(int elt_idx, uint8_t prio1dunit, uint16_t prio1d)
+{
+ BLE_ASSERT_ERR((((uint16_t)prio1dunit << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)prio1d << 0) & ~((uint16_t)0x00007FFF)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, ((uint16_t)prio1dunit << 15) | ((uint16_t)prio1d << 0));
+}
+
+__INLINE void em_ble_priobw_unpack(int elt_idx, uint8_t* prio1dunit, uint16_t* prio1d)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+
+ *prio1dunit = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *prio1d = (localVal & ((uint16_t)0x00007FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_priobw_prio1d_unit_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_priobw_prio1d_unit_setf(int elt_idx, uint8_t prio1dunit)
+{
+ BLE_ASSERT_ERR((((uint16_t)prio1dunit << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)prio1dunit << 15));
+}
+
+__INLINE uint16_t em_ble_priobw_prio1d_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00007FFF)) >> 0);
+}
+
+__INLINE void em_ble_priobw_prio1d_setf(int elt_idx, uint16_t prio1d)
+{
+ BLE_ASSERT_ERR((((uint16_t)prio1d << 0) & ~((uint16_t)0x00007FFF)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_PRIOBW_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00007FFF)) | ((uint16_t)prio1d << 0));
+}
+
+/**
+ * @brief PRIOLVL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 12:08 SCH_PRIO3 0x0
+ * 04:00 SCH_PRIO2 0x0
+ *
+ */
+#define EM_BLE_PRIOLVL_ADDR (0x0091000C + EM_BLE_ET_OFFSET)
+#define EM_BLE_PRIOLVL_INDEX 0x00000006
+#define EM_BLE_PRIOLVL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_priolvl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_priolvl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_SCH_PRIO3_MASK ((uint16_t)0x00001F00)
+#define EM_BLE_SCH_PRIO3_LSB 8
+#define EM_BLE_SCH_PRIO3_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_SCH_PRIO2_MASK ((uint16_t)0x0000001F)
+#define EM_BLE_SCH_PRIO2_LSB 0
+#define EM_BLE_SCH_PRIO2_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_SCH_PRIO3_RST 0x0
+#define EM_BLE_SCH_PRIO2_RST 0x0
+
+__INLINE void em_ble_priolvl_pack(int elt_idx, uint8_t schprio3, uint8_t schprio2)
+{
+ BLE_ASSERT_ERR((((uint16_t)schprio3 << 8) & ~((uint16_t)0x00001F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)schprio2 << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, ((uint16_t)schprio3 << 8) | ((uint16_t)schprio2 << 0));
+}
+
+__INLINE void em_ble_priolvl_unpack(int elt_idx, uint8_t* schprio3, uint8_t* schprio2)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+
+ *schprio3 = (localVal & ((uint16_t)0x00001F00)) >> 8;
+ *schprio2 = (localVal & ((uint16_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_priolvl_sch_prio3_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x00001F00)) >> 8);
+}
+
+__INLINE void em_ble_priolvl_sch_prio3_setf(int elt_idx, uint8_t schprio3)
+{
+ BLE_ASSERT_ERR((((uint16_t)schprio3 << 8) & ~((uint16_t)0x00001F00)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x00001F00)) | ((uint16_t)schprio3 << 8));
+}
+
+__INLINE uint8_t em_ble_priolvl_sch_prio2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ return ((localVal & ((uint16_t)0x0000001F)) >> 0);
+}
+
+__INLINE void em_ble_priolvl_sch_prio2_setf(int elt_idx, uint8_t schprio2)
+{
+ BLE_ASSERT_ERR((((uint16_t)schprio2 << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (EM_BLE_RD(EM_BLE_PRIOLVL_ADDR + elt_idx * REG_EM_BLE_ET_SIZE) & ~((uint16_t)0x0000001F)) | ((uint16_t)schprio2 << 0));
+}
+
+/**
+ * @brief PRIOPTI register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 12:08 PTI_PRIO 0x0
+ *
+ */
+#define EM_BLE_PRIOPTI_ADDR (0x0091000E + EM_BLE_ET_OFFSET)
+#define EM_BLE_PRIOPTI_INDEX 0x00000007
+#define EM_BLE_PRIOPTI_RESET 0x00000000
+
+__INLINE uint16_t em_ble_priopti_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_PRIOPTI_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+}
+
+__INLINE void em_ble_priopti_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_PRIOPTI_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_PTI_PRIO_MASK ((uint16_t)0x00001F00)
+#define EM_BLE_PTI_PRIO_LSB 8
+#define EM_BLE_PTI_PRIO_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_PTI_PRIO_RST 0x0
+
+__INLINE uint8_t em_ble_priopti_pti_prio_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_PRIOPTI_ADDR + elt_idx * REG_EM_BLE_ET_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00001F00)) == 0);
+ return (localVal >> 8);
+}
+
+__INLINE void em_ble_priopti_pti_prio_setf(int elt_idx, uint8_t ptiprio)
+{
+ BLE_ASSERT_ERR((((uint16_t)ptiprio << 8) & ~((uint16_t)0x00001F00)) == 0);
+ EM_BLE_WR(EM_BLE_PRIOPTI_ADDR + elt_idx * REG_EM_BLE_ET_SIZE, (uint16_t)ptiprio << 8);
+}
+
+
+#endif // _REG_EM_BLE_ET_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_ft.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_ft.h
new file mode 100755
index 0000000..5a20b6c
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_ft.h
@@ -0,0 +1,101 @@
+#ifndef _REG_EM_BLE_FT_H_
+#define _REG_EM_BLE_FT_H_
+
+#include
+#include "_reg_em_ble_ft.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_FT_COUNT 1
+
+#define REG_EM_BLE_FT_DECODING_MASK 0x00000000
+
+#define REG_EM_BLE_FT_ADDR_GET(idx) (EM_BLE_FT_OFFSET + (idx) * REG_EM_BLE_FT_SIZE)
+
+/**
+ * @brief FREQTAB register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 FREQODD 0x0
+ * 07:00 FREQEVEN 0x0
+ *
+ */
+#define EM_BLE_FREQTAB_ADDR (0x00910000 + EM_BLE_FT_OFFSET)
+#define EM_BLE_FREQTAB_INDEX 0x00000000
+#define EM_BLE_FREQTAB_RESET 0x00000000
+#define EM_BLE_FREQTAB_COUNT 20
+
+__INLINE uint16_t em_ble_freqtab_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ return EM_BLE_RD(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_freqtab_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ EM_BLE_WR(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_FREQODD_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_FREQODD_LSB 8
+#define EM_BLE_FREQODD_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_FREQEVEN_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_FREQEVEN_LSB 0
+#define EM_BLE_FREQEVEN_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_FREQODD_RST 0x0
+#define EM_BLE_FREQEVEN_RST 0x0
+
+__INLINE void em_ble_freqtab_pack(int elt_idx, int reg_idx, uint8_t freqodd, uint8_t freqeven)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ BLE_ASSERT_ERR((((uint16_t)freqodd << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)freqeven << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2, ((uint16_t)freqodd << 8) | ((uint16_t)freqeven << 0));
+}
+
+__INLINE void em_ble_freqtab_unpack(int elt_idx, int reg_idx, uint8_t* freqodd, uint8_t* freqeven)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2);
+
+ *freqodd = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *freqeven = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_freqtab_freqodd_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_freqtab_freqodd_setf(int elt_idx, int reg_idx, uint8_t freqodd)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ BLE_ASSERT_ERR((((uint16_t)freqodd << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2, (EM_BLE_RD(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2) & ~((uint16_t)0x0000FF00)) | ((uint16_t)freqodd << 8));
+}
+
+__INLINE uint8_t em_ble_freqtab_freqeven_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_freqtab_freqeven_setf(int elt_idx, int reg_idx, uint8_t freqeven)
+{
+ BLE_ASSERT_ERR(reg_idx <= 19);
+ BLE_ASSERT_ERR((((uint16_t)freqeven << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2, (EM_BLE_RD(EM_BLE_FREQTAB_ADDR + elt_idx * REG_EM_BLE_FT_SIZE + reg_idx * 2) & ~((uint16_t)0x000000FF)) | ((uint16_t)freqeven << 0));
+}
+
+
+#endif // _REG_EM_BLE_FT_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_ral.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_ral.h
new file mode 100755
index 0000000..6ec0e5c
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_ral.h
@@ -0,0 +1,547 @@
+#ifndef _REG_EM_BLE_RAL_H_
+#define _REG_EM_BLE_RAL_H_
+
+#include
+#include "_reg_em_ble_ral.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RAL_COUNT 28
+
+#define REG_EM_BLE_RAL_DECODING_MASK 0x0000003F
+
+#define REG_EM_BLE_RAL_ADDR_GET(idx) (EM_BLE_RAL_OFFSET + (idx) * REG_EM_BLE_RAL_SIZE)
+
+/**
+ * @brief RAL_INFO register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 ENTRY_VALID 0
+ * 14 CONNECTED 0
+ * 13 IN_WHLIST 0
+ * 12 IN_PERADV_LIST 0
+ * 11 PEF 0
+ * 07 LOCAL_RPA_VALID 0
+ * 06 LOCAL_RPA_RENEW 0
+ * 05 LOCAL_IRK_VALID 0
+ * 03 PEER_RPA_VALID 0
+ * 02 PEER_RPA_RENEW 0
+ * 01 PEER_IRK_VALID 0
+ * 00 PEER_ID_TYPE 0
+ *
+ */
+#define EM_BLE_RAL_INFO_ADDR (0x00910000 + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_INFO_INDEX 0x00000000
+#define EM_BLE_RAL_INFO_RESET 0x00000000
+
+__INLINE uint16_t em_ble_ral_info_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+}
+
+__INLINE void em_ble_ral_info_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ENTRY_VALID_BIT ((uint16_t)0x00008000)
+#define EM_BLE_ENTRY_VALID_POS 15
+#define EM_BLE_CONNECTED_BIT ((uint16_t)0x00004000)
+#define EM_BLE_CONNECTED_POS 14
+#define EM_BLE_IN_WHLIST_BIT ((uint16_t)0x00002000)
+#define EM_BLE_IN_WHLIST_POS 13
+#define EM_BLE_IN_PERADV_LIST_BIT ((uint16_t)0x00001000)
+#define EM_BLE_IN_PERADV_LIST_POS 12
+#define EM_BLE_PEF_BIT ((uint16_t)0x00000800)
+#define EM_BLE_PEF_POS 11
+#define EM_BLE_LOCAL_RPA_VALID_BIT ((uint16_t)0x00000080)
+#define EM_BLE_LOCAL_RPA_VALID_POS 7
+#define EM_BLE_LOCAL_RPA_RENEW_BIT ((uint16_t)0x00000040)
+#define EM_BLE_LOCAL_RPA_RENEW_POS 6
+#define EM_BLE_LOCAL_IRK_VALID_BIT ((uint16_t)0x00000020)
+#define EM_BLE_LOCAL_IRK_VALID_POS 5
+#define EM_BLE_PEER_RPA_VALID_BIT ((uint16_t)0x00000008)
+#define EM_BLE_PEER_RPA_VALID_POS 3
+#define EM_BLE_PEER_RPA_RENEW_BIT ((uint16_t)0x00000004)
+#define EM_BLE_PEER_RPA_RENEW_POS 2
+#define EM_BLE_PEER_IRK_VALID_BIT ((uint16_t)0x00000002)
+#define EM_BLE_PEER_IRK_VALID_POS 1
+#define EM_BLE_PEER_ID_TYPE_BIT ((uint16_t)0x00000001)
+#define EM_BLE_PEER_ID_TYPE_POS 0
+
+#define EM_BLE_ENTRY_VALID_RST 0x0
+#define EM_BLE_CONNECTED_RST 0x0
+#define EM_BLE_IN_WHLIST_RST 0x0
+#define EM_BLE_IN_PERADV_LIST_RST 0x0
+#define EM_BLE_PEF_RST 0x0
+#define EM_BLE_LOCAL_RPA_VALID_RST 0x0
+#define EM_BLE_LOCAL_RPA_RENEW_RST 0x0
+#define EM_BLE_LOCAL_IRK_VALID_RST 0x0
+#define EM_BLE_PEER_RPA_VALID_RST 0x0
+#define EM_BLE_PEER_RPA_RENEW_RST 0x0
+#define EM_BLE_PEER_IRK_VALID_RST 0x0
+#define EM_BLE_PEER_ID_TYPE_RST 0x0
+
+__INLINE void em_ble_ral_info_pack(int elt_idx, uint8_t entryvalid, uint8_t connected, uint8_t inwhlist, uint8_t inperadvlist, uint8_t pef, uint8_t localrpavalid, uint8_t localrparenew, uint8_t localirkvalid, uint8_t peerrpavalid, uint8_t peerrparenew, uint8_t peerirkvalid, uint8_t peeridtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)entryvalid << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)connected << 14) & ~((uint16_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)inwhlist << 13) & ~((uint16_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)inperadvlist << 12) & ~((uint16_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)pef << 11) & ~((uint16_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)localrpavalid << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)localrparenew << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)localirkvalid << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)peerrpavalid << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)peerrparenew << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)peerirkvalid << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)peeridtype << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, ((uint16_t)entryvalid << 15) | ((uint16_t)connected << 14) | ((uint16_t)inwhlist << 13) | ((uint16_t)inperadvlist << 12) | ((uint16_t)pef << 11) | ((uint16_t)localrpavalid << 7) | ((uint16_t)localrparenew << 6) | ((uint16_t)localirkvalid << 5) | ((uint16_t)peerrpavalid << 3) | ((uint16_t)peerrparenew << 2) | ((uint16_t)peerirkvalid << 1) | ((uint16_t)peeridtype << 0));
+}
+
+__INLINE void em_ble_ral_info_unpack(int elt_idx, uint8_t* entryvalid, uint8_t* connected, uint8_t* inwhlist, uint8_t* inperadvlist, uint8_t* pef, uint8_t* localrpavalid, uint8_t* localrparenew, uint8_t* localirkvalid, uint8_t* peerrpavalid, uint8_t* peerrparenew, uint8_t* peerirkvalid, uint8_t* peeridtype)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+
+ *entryvalid = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *connected = (localVal & ((uint16_t)0x00004000)) >> 14;
+ *inwhlist = (localVal & ((uint16_t)0x00002000)) >> 13;
+ *inperadvlist = (localVal & ((uint16_t)0x00001000)) >> 12;
+ *pef = (localVal & ((uint16_t)0x00000800)) >> 11;
+ *localrpavalid = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *localrparenew = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *localirkvalid = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *peerrpavalid = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *peerrparenew = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *peerirkvalid = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *peeridtype = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_ral_info_entry_valid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_ral_info_entry_valid_setf(int elt_idx, uint8_t entryvalid)
+{
+ BLE_ASSERT_ERR((((uint16_t)entryvalid << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)entryvalid << 15));
+}
+
+__INLINE uint8_t em_ble_ral_info_connected_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00004000)) >> 14);
+}
+
+__INLINE void em_ble_ral_info_connected_setf(int elt_idx, uint8_t connected)
+{
+ BLE_ASSERT_ERR((((uint16_t)connected << 14) & ~((uint16_t)0x00004000)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00004000)) | ((uint16_t)connected << 14));
+}
+
+__INLINE uint8_t em_ble_ral_info_in_whlist_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00002000)) >> 13);
+}
+
+__INLINE void em_ble_ral_info_in_whlist_setf(int elt_idx, uint8_t inwhlist)
+{
+ BLE_ASSERT_ERR((((uint16_t)inwhlist << 13) & ~((uint16_t)0x00002000)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00002000)) | ((uint16_t)inwhlist << 13));
+}
+
+__INLINE uint8_t em_ble_ral_info_in_peradv_list_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00001000)) >> 12);
+}
+
+__INLINE void em_ble_ral_info_in_peradv_list_setf(int elt_idx, uint8_t inperadvlist)
+{
+ BLE_ASSERT_ERR((((uint16_t)inperadvlist << 12) & ~((uint16_t)0x00001000)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00001000)) | ((uint16_t)inperadvlist << 12));
+}
+
+__INLINE uint8_t em_ble_ral_info_pef_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000800)) >> 11);
+}
+
+__INLINE void em_ble_ral_info_pef_setf(int elt_idx, uint8_t pef)
+{
+ BLE_ASSERT_ERR((((uint16_t)pef << 11) & ~((uint16_t)0x00000800)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000800)) | ((uint16_t)pef << 11));
+}
+
+__INLINE uint8_t em_ble_ral_info_local_rpa_valid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_ral_info_local_rpa_valid_setf(int elt_idx, uint8_t localrpavalid)
+{
+ BLE_ASSERT_ERR((((uint16_t)localrpavalid << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)localrpavalid << 7));
+}
+
+__INLINE uint8_t em_ble_ral_info_local_rpa_renew_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_ral_info_local_rpa_renew_setf(int elt_idx, uint8_t localrparenew)
+{
+ BLE_ASSERT_ERR((((uint16_t)localrparenew << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)localrparenew << 6));
+}
+
+__INLINE uint8_t em_ble_ral_info_local_irk_valid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_ral_info_local_irk_valid_setf(int elt_idx, uint8_t localirkvalid)
+{
+ BLE_ASSERT_ERR((((uint16_t)localirkvalid << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)localirkvalid << 5));
+}
+
+__INLINE uint8_t em_ble_ral_info_peer_rpa_valid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_ral_info_peer_rpa_valid_setf(int elt_idx, uint8_t peerrpavalid)
+{
+ BLE_ASSERT_ERR((((uint16_t)peerrpavalid << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)peerrpavalid << 3));
+}
+
+__INLINE uint8_t em_ble_ral_info_peer_rpa_renew_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_ral_info_peer_rpa_renew_setf(int elt_idx, uint8_t peerrparenew)
+{
+ BLE_ASSERT_ERR((((uint16_t)peerrparenew << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)peerrparenew << 2));
+}
+
+__INLINE uint8_t em_ble_ral_info_peer_irk_valid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_ral_info_peer_irk_valid_setf(int elt_idx, uint8_t peerirkvalid)
+{
+ BLE_ASSERT_ERR((((uint16_t)peerirkvalid << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)peerirkvalid << 1));
+}
+
+__INLINE uint8_t em_ble_ral_info_peer_id_type_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_ral_info_peer_id_type_setf(int elt_idx, uint8_t peeridtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)peeridtype << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (EM_BLE_RD(EM_BLE_RAL_INFO_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)peeridtype << 0));
+}
+
+/**
+ * @brief RAL_PEER_SID register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RAL_PEER_SID 0x0
+ *
+ */
+#define EM_BLE_RAL_PEER_SID_ADDR (0x00910002 + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_PEER_SID_INDEX 0x00000001
+#define EM_BLE_RAL_PEER_SID_RESET 0x00000000
+
+__INLINE uint16_t em_ble_ral_peer_sid_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RAL_PEER_SID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+}
+
+__INLINE void em_ble_ral_peer_sid_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RAL_PEER_SID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RAL_PEER_SID_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RAL_PEER_SID_LSB 0
+#define EM_BLE_RAL_PEER_SID_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RAL_PEER_SID_RST 0x0
+
+__INLINE uint16_t em_ble_ral_peer_sid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_PEER_SID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_ral_peer_sid_setf(int elt_idx, uint16_t ralpeersid)
+{
+ BLE_ASSERT_ERR((((uint16_t)ralpeersid << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_PEER_SID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE, (uint16_t)ralpeersid << 0);
+}
+
+/**
+ * @brief RAL_PEER_IRK register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 PEER_IRK 0x0
+ *
+ */
+#define EM_BLE_RAL_PEER_IRK_ADDR (0x00910004 + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_PEER_IRK_INDEX 0x00000002
+#define EM_BLE_RAL_PEER_IRK_RESET 0x00000000
+#define EM_BLE_RAL_PEER_IRK_COUNT 8
+
+__INLINE uint16_t em_ble_ral_peer_irk_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ return EM_BLE_RD(EM_BLE_RAL_PEER_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_ral_peer_irk_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ EM_BLE_WR(EM_BLE_RAL_PEER_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_PEER_IRK_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_PEER_IRK_LSB 0
+#define EM_BLE_PEER_IRK_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_PEER_IRK_RST 0x0
+
+__INLINE uint16_t em_ble_ral_peer_irk_peer_irk_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_PEER_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_ral_peer_irk_peer_irk_setf(int elt_idx, int reg_idx, uint16_t peerirk)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ BLE_ASSERT_ERR((((uint16_t)peerirk << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_PEER_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, (uint16_t)peerirk << 0);
+}
+
+/**
+ * @brief RAL_PEER_RPA register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 PEER_RPA 0x0
+ *
+ */
+#define EM_BLE_RAL_PEER_RPA_ADDR (0x00910014 + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_PEER_RPA_INDEX 0x0000000A
+#define EM_BLE_RAL_PEER_RPA_RESET 0x00000000
+#define EM_BLE_RAL_PEER_RPA_COUNT 3
+
+__INLINE uint16_t em_ble_ral_peer_rpa_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ return EM_BLE_RD(EM_BLE_RAL_PEER_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_ral_peer_rpa_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ EM_BLE_WR(EM_BLE_RAL_PEER_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_PEER_RPA_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_PEER_RPA_LSB 0
+#define EM_BLE_PEER_RPA_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_PEER_RPA_RST 0x0
+
+__INLINE uint16_t em_ble_ral_peer_rpa_peer_rpa_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_PEER_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_ral_peer_rpa_peer_rpa_setf(int elt_idx, int reg_idx, uint16_t peerrpa)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ BLE_ASSERT_ERR((((uint16_t)peerrpa << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_PEER_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, (uint16_t)peerrpa << 0);
+}
+
+/**
+ * @brief RAL_PEER_ID register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 PEER_ID 0x0
+ *
+ */
+#define EM_BLE_RAL_PEER_ID_ADDR (0x0091001A + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_PEER_ID_INDEX 0x0000000D
+#define EM_BLE_RAL_PEER_ID_RESET 0x00000000
+#define EM_BLE_RAL_PEER_ID_COUNT 3
+
+__INLINE uint16_t em_ble_ral_peer_id_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ return EM_BLE_RD(EM_BLE_RAL_PEER_ID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_ral_peer_id_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ EM_BLE_WR(EM_BLE_RAL_PEER_ID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_PEER_ID_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_PEER_ID_LSB 0
+#define EM_BLE_PEER_ID_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_PEER_ID_RST 0x0
+
+__INLINE uint16_t em_ble_ral_peer_id_peer_id_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_PEER_ID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_ral_peer_id_peer_id_setf(int elt_idx, int reg_idx, uint16_t peerid)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ BLE_ASSERT_ERR((((uint16_t)peerid << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_PEER_ID_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, (uint16_t)peerid << 0);
+}
+
+/**
+ * @brief RAL_LOCAL_IRK register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 LOCAL_IRK 0x0
+ *
+ */
+#define EM_BLE_RAL_LOCAL_IRK_ADDR (0x00910020 + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_LOCAL_IRK_INDEX 0x00000010
+#define EM_BLE_RAL_LOCAL_IRK_RESET 0x00000000
+#define EM_BLE_RAL_LOCAL_IRK_COUNT 8
+
+__INLINE uint16_t em_ble_ral_local_irk_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ return EM_BLE_RD(EM_BLE_RAL_LOCAL_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_ral_local_irk_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ EM_BLE_WR(EM_BLE_RAL_LOCAL_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_LOCAL_IRK_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_LOCAL_IRK_LSB 0
+#define EM_BLE_LOCAL_IRK_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_LOCAL_IRK_RST 0x0
+
+__INLINE uint16_t em_ble_ral_local_irk_local_irk_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_LOCAL_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_ral_local_irk_local_irk_setf(int elt_idx, int reg_idx, uint16_t localirk)
+{
+ BLE_ASSERT_ERR(reg_idx <= 7);
+ BLE_ASSERT_ERR((((uint16_t)localirk << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_LOCAL_IRK_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, (uint16_t)localirk << 0);
+}
+
+/**
+ * @brief RAL_LOCAL_RPA register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 LOCAL_RPA 0x0
+ *
+ */
+#define EM_BLE_RAL_LOCAL_RPA_ADDR (0x00910030 + EM_BLE_RAL_OFFSET)
+#define EM_BLE_RAL_LOCAL_RPA_INDEX 0x00000018
+#define EM_BLE_RAL_LOCAL_RPA_RESET 0x00000000
+#define EM_BLE_RAL_LOCAL_RPA_COUNT 3
+
+__INLINE uint16_t em_ble_ral_local_rpa_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ return EM_BLE_RD(EM_BLE_RAL_LOCAL_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_ral_local_rpa_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ EM_BLE_WR(EM_BLE_RAL_LOCAL_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_LOCAL_RPA_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_LOCAL_RPA_LSB 0
+#define EM_BLE_LOCAL_RPA_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_LOCAL_RPA_RST 0x0
+
+__INLINE uint16_t em_ble_ral_local_rpa_local_rpa_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RAL_LOCAL_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_ral_local_rpa_local_rpa_setf(int elt_idx, int reg_idx, uint16_t localrpa)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ BLE_ASSERT_ERR((((uint16_t)localrpa << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RAL_LOCAL_RPA_ADDR + elt_idx * REG_EM_BLE_RAL_SIZE + reg_idx * 2, (uint16_t)localrpa << 0);
+}
+
+
+#endif // _REG_EM_BLE_RAL_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_audio_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_audio_buf.h
new file mode 100755
index 0000000..04aac84
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_audio_buf.h
@@ -0,0 +1,66 @@
+#ifndef _REG_EM_BLE_RX_AUDIO_BUF_H_
+#define _REG_EM_BLE_RX_AUDIO_BUF_H_
+
+#include
+#include "_reg_em_ble_rx_audio_buf.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RX_AUDIO_BUF_COUNT 1
+
+#define REG_EM_BLE_RX_AUDIO_BUF_DECODING_MASK 0x00000000
+
+#define REG_EM_BLE_RX_AUDIO_BUF_ADDR_GET(idx) (EM_BLE_RX_AUDIO_BUFFER_OFFSET + (idx) * REG_EM_BLE_RX_AUDIO_BUF_SIZE)
+
+/**
+ * @brief RXAUDIOBUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXAUDIOBUF 0x0
+ *
+ */
+#define EM_BLE_RXAUDIOBUF_ADDR (0x00910000 + EM_BLE_RX_AUDIO_BUFFER_OFFSET)
+#define EM_BLE_RXAUDIOBUF_INDEX 0x00000000
+#define EM_BLE_RXAUDIOBUF_RESET 0x00000000
+#define EM_BLE_RXAUDIOBUF_COUNT 32
+
+__INLINE uint16_t em_ble_rxaudiobuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ return EM_BLE_RD(EM_BLE_RXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_RX_AUDIO_BUF_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_rxaudiobuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ EM_BLE_WR(EM_BLE_RXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_RX_AUDIO_BUF_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_RXAUDIOBUF_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXAUDIOBUF_LSB 0
+#define EM_BLE_RXAUDIOBUF_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXAUDIOBUF_RST 0x0
+
+__INLINE uint16_t em_ble_rxaudiobuf_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_RX_AUDIO_BUF_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxaudiobuf_setf(int elt_idx, int reg_idx, uint16_t rxaudiobuf)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ BLE_ASSERT_ERR((((uint16_t)rxaudiobuf << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_RX_AUDIO_BUF_SIZE + reg_idx * 2, (uint16_t)rxaudiobuf << 0);
+}
+
+
+#endif // _REG_EM_BLE_RX_AUDIO_BUF_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_buf.h
new file mode 100755
index 0000000..f4d7b64
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_buf.h
@@ -0,0 +1,66 @@
+#ifndef _REG_EM_BLE_RX_BUF_H_
+#define _REG_EM_BLE_RX_BUF_H_
+
+#include
+#include "_reg_em_ble_rx_buf.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RX_BUF_COUNT 1
+
+#define REG_EM_BLE_RX_BUF_DECODING_MASK 0x00000000
+
+#define REG_EM_BLE_RX_BUF_ADDR_GET(idx) (EM_BLE_RX_BUFFER_OFFSET + (idx) * REG_EM_BLE_RX_BUF_SIZE)
+
+/**
+ * @brief RXBUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXBUF 0x0
+ *
+ */
+#define EM_BLE_RXBUF_ADDR (0x00910000 + EM_BLE_RX_BUFFER_OFFSET)
+#define EM_BLE_RXBUF_INDEX 0x00000000
+#define EM_BLE_RXBUF_RESET 0x00000000
+#define EM_BLE_RXBUF_COUNT 130
+
+__INLINE uint16_t em_ble_rxbuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 129);
+ return EM_BLE_RD(EM_BLE_RXBUF_ADDR + elt_idx * REG_EM_BLE_RX_BUF_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_rxbuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 129);
+ EM_BLE_WR(EM_BLE_RXBUF_ADDR + elt_idx * REG_EM_BLE_RX_BUF_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_RXBUF_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXBUF_LSB 0
+#define EM_BLE_RXBUF_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXBUF_RST 0x0
+
+__INLINE uint16_t em_ble_rxbuf_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 129);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXBUF_ADDR + elt_idx * REG_EM_BLE_RX_BUF_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxbuf_setf(int elt_idx, int reg_idx, uint16_t rxbuf)
+{
+ BLE_ASSERT_ERR(reg_idx <= 129);
+ BLE_ASSERT_ERR((((uint16_t)rxbuf << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXBUF_ADDR + elt_idx * REG_EM_BLE_RX_BUF_SIZE + reg_idx * 2, (uint16_t)rxbuf << 0);
+}
+
+
+#endif // _REG_EM_BLE_RX_BUF_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_cte_desc.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_cte_desc.h
new file mode 100755
index 0000000..a4eba5d
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_cte_desc.h
@@ -0,0 +1,173 @@
+#ifndef _REG_EM_BLE_RX_CTE_DESC_H_
+#define _REG_EM_BLE_RX_CTE_DESC_H_
+
+#include
+#include "_reg_em_ble_rx_cte_desc.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RX_CTE_DESC_COUNT 3
+
+#define REG_EM_BLE_RX_CTE_DESC_DECODING_MASK 0x00000007
+
+#define REG_EM_BLE_RX_CTE_DESC_ADDR_GET(idx) (EM_BLE_RX_CTE_DESC_OFFSET + (idx) * REG_EM_BLE_RX_CTE_DESC_SIZE)
+
+/**
+ * @brief RXCTECNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXDONE 0
+ * 13:00 RXNEXTPTR 0x0
+ *
+ */
+#define EM_BLE_RXCTECNTL_ADDR (0x00910000 + EM_BLE_RX_CTE_DESC_OFFSET)
+#define EM_BLE_RXCTECNTL_INDEX 0x00000000
+#define EM_BLE_RXCTECNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxctecntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxctecntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXDONE_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXDONE_POS 15
+#define EM_BLE_RXNEXTPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_RXNEXTPTR_LSB 0
+#define EM_BLE_RXNEXTPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_RXDONE_RST 0x0
+#define EM_BLE_RXNEXTPTR_RST 0x0
+
+__INLINE void em_ble_rxctecntl_pack(int elt_idx, uint8_t rxdone, uint16_t rxnextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxnextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE, ((uint16_t)rxdone << 15) | ((uint16_t)rxnextptr << 0));
+}
+
+__INLINE void em_ble_rxctecntl_unpack(int elt_idx, uint8_t* rxdone, uint16_t* rxnextptr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE);
+
+ *rxdone = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *rxnextptr = (localVal & ((uint16_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxctecntl_rxdone_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxctecntl_rxdone_setf(int elt_idx, uint8_t rxdone)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxdone << 15));
+}
+
+__INLINE uint16_t em_ble_rxctecntl_rxnextptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void em_ble_rxctecntl_rxnextptr_setf(int elt_idx, uint16_t rxnextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxnextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCTECNTL_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE) & ~((uint16_t)0x00003FFF)) | ((uint16_t)rxnextptr << 0));
+}
+
+/**
+ * @brief RXCTESAMPBUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 RX_Q 0x0
+ * 07:00 RX_I 0x0
+ *
+ */
+#define EM_BLE_RXCTESAMPBUF_ADDR (0x00910004 + EM_BLE_RX_CTE_DESC_OFFSET)
+#define EM_BLE_RXCTESAMPBUF_INDEX 0x00000002
+#define EM_BLE_RXCTESAMPBUF_RESET 0x00000000
+#define EM_BLE_RXCTESAMPBUF_COUNT 82
+
+__INLINE uint16_t em_ble_rxctesampbuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ return EM_BLE_RD(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_rxctesampbuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ EM_BLE_WR(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_RX_Q_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_RX_Q_LSB 8
+#define EM_BLE_RX_Q_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RX_I_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_RX_I_LSB 0
+#define EM_BLE_RX_I_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_RX_Q_RST 0x0
+#define EM_BLE_RX_I_RST 0x0
+
+__INLINE void em_ble_rxctesampbuf_pack(int elt_idx, int reg_idx, uint8_t rxq, uint8_t rxi)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ BLE_ASSERT_ERR((((uint16_t)rxq << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxi << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2, ((uint16_t)rxq << 8) | ((uint16_t)rxi << 0));
+}
+
+__INLINE void em_ble_rxctesampbuf_unpack(int elt_idx, int reg_idx, uint8_t* rxq, uint8_t* rxi)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2);
+
+ *rxq = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *rxi = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxctesampbuf_rx_q_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxctesampbuf_rx_q_setf(int elt_idx, int reg_idx, uint8_t rxq)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ BLE_ASSERT_ERR((((uint16_t)rxq << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2, (EM_BLE_RD(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2) & ~((uint16_t)0x0000FF00)) | ((uint16_t)rxq << 8));
+}
+
+__INLINE uint8_t em_ble_rxctesampbuf_rx_i_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_rxctesampbuf_rx_i_setf(int elt_idx, int reg_idx, uint8_t rxi)
+{
+ BLE_ASSERT_ERR(reg_idx <= 81);
+ BLE_ASSERT_ERR((((uint16_t)rxi << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2, (EM_BLE_RD(EM_BLE_RXCTESAMPBUF_ADDR + elt_idx * REG_EM_BLE_RX_CTE_DESC_SIZE + reg_idx * 2) & ~((uint16_t)0x000000FF)) | ((uint16_t)rxi << 0));
+}
+
+
+#endif // _REG_EM_BLE_RX_CTE_DESC_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_desc.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_desc.h
new file mode 100755
index 0000000..a18b768
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_desc.h
@@ -0,0 +1,1969 @@
+#ifndef _REG_EM_BLE_RX_DESC_H_
+#define _REG_EM_BLE_RX_DESC_H_
+
+#include
+#include "_reg_em_ble_rx_desc.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RX_DESC_COUNT 14
+
+#define REG_EM_BLE_RX_DESC_DECODING_MASK 0x0000001F
+
+#define REG_EM_BLE_RX_DESC_ADDR_GET(idx) (EM_BLE_RX_DESC_OFFSET + (idx) * REG_EM_BLE_RX_DESC_SIZE)
+
+/**
+ * @brief RXCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXDONE 0
+ * 13:00 RXNEXTPTR 0x0
+ *
+ */
+#define EM_BLE_RXCNTL_ADDR (0x00910000 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXCNTL_INDEX 0x00000000
+#define EM_BLE_RXCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXDONE_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXDONE_POS 15
+#define EM_BLE_RXNEXTPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_RXNEXTPTR_LSB 0
+#define EM_BLE_RXNEXTPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_RXDONE_RST 0x0
+#define EM_BLE_RXNEXTPTR_RST 0x0
+
+__INLINE void em_ble_rxcntl_pack(int elt_idx, uint8_t rxdone, uint16_t rxnextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxnextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxdone << 15) | ((uint16_t)rxnextptr << 0));
+}
+
+__INLINE void em_ble_rxcntl_unpack(int elt_idx, uint8_t* rxdone, uint16_t* rxnextptr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxdone = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *rxnextptr = (localVal & ((uint16_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxcntl_rxdone_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxcntl_rxdone_setf(int elt_idx, uint8_t rxdone)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxdone << 15));
+}
+
+__INLINE uint16_t em_ble_rxcntl_rxnextptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void em_ble_rxcntl_rxnextptr_setf(int elt_idx, uint16_t rxnextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxnextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCNTL_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00003FFF)) | ((uint16_t)rxnextptr << 0));
+}
+
+/**
+ * @brief RXSTATCE register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXCTEERR 0
+ * 07 NESN_ERR 0
+ * 06 SN_ERR 0
+ * 05 LLID_ERR 0
+ * 04 MIC_ERR 0
+ * 03 CRC_ERR 0
+ * 02 LEN_ERR 0
+ * 01 RXTIME_ERR 0
+ * 00 SYNC_ERR 0
+ *
+ */
+#define EM_BLE_RXSTATCE_ADDR (0x00910002 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXSTATCE_INDEX 0x00000001
+#define EM_BLE_RXSTATCE_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxstatce_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxstatce_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXCTEERR_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXCTEERR_POS 15
+#define EM_BLE_NESN_ERR_BIT ((uint16_t)0x00000080)
+#define EM_BLE_NESN_ERR_POS 7
+#define EM_BLE_SN_ERR_BIT ((uint16_t)0x00000040)
+#define EM_BLE_SN_ERR_POS 6
+#define EM_BLE_LLID_ERR_BIT ((uint16_t)0x00000020)
+#define EM_BLE_LLID_ERR_POS 5
+#define EM_BLE_MIC_ERR_BIT ((uint16_t)0x00000010)
+#define EM_BLE_MIC_ERR_POS 4
+#define EM_BLE_CRC_ERR_BIT ((uint16_t)0x00000008)
+#define EM_BLE_CRC_ERR_POS 3
+#define EM_BLE_LEN_ERR_BIT ((uint16_t)0x00000004)
+#define EM_BLE_LEN_ERR_POS 2
+#define EM_BLE_RXTIME_ERR_BIT ((uint16_t)0x00000002)
+#define EM_BLE_RXTIME_ERR_POS 1
+#define EM_BLE_SYNC_ERR_BIT ((uint16_t)0x00000001)
+#define EM_BLE_SYNC_ERR_POS 0
+
+#define EM_BLE_RXCTEERR_RST 0x0
+#define EM_BLE_NESN_ERR_RST 0x0
+#define EM_BLE_SN_ERR_RST 0x0
+#define EM_BLE_LLID_ERR_RST 0x0
+#define EM_BLE_MIC_ERR_RST 0x0
+#define EM_BLE_CRC_ERR_RST 0x0
+#define EM_BLE_LEN_ERR_RST 0x0
+#define EM_BLE_RXTIME_ERR_RST 0x0
+#define EM_BLE_SYNC_ERR_RST 0x0
+
+__INLINE void em_ble_rxstatce_pack(int elt_idx, uint8_t rxcteerr, uint8_t nesnerr, uint8_t snerr, uint8_t lliderr, uint8_t micerr, uint8_t crcerr, uint8_t lenerr, uint8_t rxtimeerr, uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcteerr << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)nesnerr << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)snerr << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)lliderr << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)micerr << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)crcerr << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)lenerr << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxtimeerr << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)syncerr << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxcteerr << 15) | ((uint16_t)nesnerr << 7) | ((uint16_t)snerr << 6) | ((uint16_t)lliderr << 5) | ((uint16_t)micerr << 4) | ((uint16_t)crcerr << 3) | ((uint16_t)lenerr << 2) | ((uint16_t)rxtimeerr << 1) | ((uint16_t)syncerr << 0));
+}
+
+__INLINE void em_ble_rxstatce_unpack(int elt_idx, uint8_t* rxcteerr, uint8_t* nesnerr, uint8_t* snerr, uint8_t* lliderr, uint8_t* micerr, uint8_t* crcerr, uint8_t* lenerr, uint8_t* rxtimeerr, uint8_t* syncerr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxcteerr = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *nesnerr = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *snerr = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *lliderr = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *micerr = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *crcerr = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *lenerr = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *rxtimeerr = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *syncerr = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxstatce_rxcteerr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxstatce_rxcteerr_setf(int elt_idx, uint8_t rxcteerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcteerr << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxcteerr << 15));
+}
+
+__INLINE uint8_t em_ble_rxstatce_nesn_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_rxstatce_nesn_err_setf(int elt_idx, uint8_t nesnerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)nesnerr << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)nesnerr << 7));
+}
+
+__INLINE uint8_t em_ble_rxstatce_sn_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_rxstatce_sn_err_setf(int elt_idx, uint8_t snerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)snerr << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)snerr << 6));
+}
+
+__INLINE uint8_t em_ble_rxstatce_llid_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_rxstatce_llid_err_setf(int elt_idx, uint8_t lliderr)
+{
+ BLE_ASSERT_ERR((((uint16_t)lliderr << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)lliderr << 5));
+}
+
+__INLINE uint8_t em_ble_rxstatce_mic_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_rxstatce_mic_err_setf(int elt_idx, uint8_t micerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)micerr << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)micerr << 4));
+}
+
+__INLINE uint8_t em_ble_rxstatce_crc_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_rxstatce_crc_err_setf(int elt_idx, uint8_t crcerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)crcerr << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)crcerr << 3));
+}
+
+__INLINE uint8_t em_ble_rxstatce_len_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_rxstatce_len_err_setf(int elt_idx, uint8_t lenerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)lenerr << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)lenerr << 2));
+}
+
+__INLINE uint8_t em_ble_rxstatce_rxtime_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_rxstatce_rxtime_err_setf(int elt_idx, uint8_t rxtimeerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxtimeerr << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)rxtimeerr << 1));
+}
+
+__INLINE uint8_t em_ble_rxstatce_sync_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_rxstatce_sync_err_setf(int elt_idx, uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)syncerr << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)syncerr << 0));
+}
+
+/**
+ * @brief RXSTATADV register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXCTEERR 0
+ * 11 FOLLOWAUXPTR 0
+ * 10 DEV_FILTERING_OK 0
+ * 09 IN_WHL 0
+ * 08 IN_PERADVAL 0
+ * 07 PEER_ADD_MATCH 0
+ * 06 BDADDR_MATCH 0
+ * 05 TYPE_ERR 0
+ * 04 PRIV_ERR 0
+ * 03 CRC_ERR 0
+ * 02 LEN_ERR 0
+ * 01 RXTIME_ERR 0
+ * 00 SYNC_ERR 0
+ *
+ */
+#define EM_BLE_RXSTATADV_ADDR (0x00910002 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXSTATADV_INDEX 0x00000001
+#define EM_BLE_RXSTATADV_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxstatadv_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxstatadv_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXCTEERR_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXCTEERR_POS 15
+#define EM_BLE_FOLLOWAUXPTR_BIT ((uint16_t)0x00000800)
+#define EM_BLE_FOLLOWAUXPTR_POS 11
+#define EM_BLE_DEV_FILTERING_OK_BIT ((uint16_t)0x00000400)
+#define EM_BLE_DEV_FILTERING_OK_POS 10
+#define EM_BLE_IN_WHL_BIT ((uint16_t)0x00000200)
+#define EM_BLE_IN_WHL_POS 9
+#define EM_BLE_IN_PERADVAL_BIT ((uint16_t)0x00000100)
+#define EM_BLE_IN_PERADVAL_POS 8
+#define EM_BLE_PEER_ADD_MATCH_BIT ((uint16_t)0x00000080)
+#define EM_BLE_PEER_ADD_MATCH_POS 7
+#define EM_BLE_BDADDR_MATCH_BIT ((uint16_t)0x00000040)
+#define EM_BLE_BDADDR_MATCH_POS 6
+#define EM_BLE_TYPE_ERR_BIT ((uint16_t)0x00000020)
+#define EM_BLE_TYPE_ERR_POS 5
+#define EM_BLE_PRIV_ERR_BIT ((uint16_t)0x00000010)
+#define EM_BLE_PRIV_ERR_POS 4
+#define EM_BLE_CRC_ERR_BIT ((uint16_t)0x00000008)
+#define EM_BLE_CRC_ERR_POS 3
+#define EM_BLE_LEN_ERR_BIT ((uint16_t)0x00000004)
+#define EM_BLE_LEN_ERR_POS 2
+#define EM_BLE_RXTIME_ERR_BIT ((uint16_t)0x00000002)
+#define EM_BLE_RXTIME_ERR_POS 1
+#define EM_BLE_SYNC_ERR_BIT ((uint16_t)0x00000001)
+#define EM_BLE_SYNC_ERR_POS 0
+
+#define EM_BLE_RXCTEERR_RST 0x0
+#define EM_BLE_FOLLOWAUXPTR_RST 0x0
+#define EM_BLE_DEV_FILTERING_OK_RST 0x0
+#define EM_BLE_IN_WHL_RST 0x0
+#define EM_BLE_IN_PERADVAL_RST 0x0
+#define EM_BLE_PEER_ADD_MATCH_RST 0x0
+#define EM_BLE_BDADDR_MATCH_RST 0x0
+#define EM_BLE_TYPE_ERR_RST 0x0
+#define EM_BLE_PRIV_ERR_RST 0x0
+#define EM_BLE_CRC_ERR_RST 0x0
+#define EM_BLE_LEN_ERR_RST 0x0
+#define EM_BLE_RXTIME_ERR_RST 0x0
+#define EM_BLE_SYNC_ERR_RST 0x0
+
+__INLINE void em_ble_rxstatadv_pack(int elt_idx, uint8_t rxcteerr, uint8_t followauxptr, uint8_t devfilteringok, uint8_t inwhl, uint8_t inperadval, uint8_t peeraddmatch, uint8_t bdaddrmatch, uint8_t typeerr, uint8_t priverr, uint8_t crcerr, uint8_t lenerr, uint8_t rxtimeerr, uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcteerr << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)followauxptr << 11) & ~((uint16_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)devfilteringok << 10) & ~((uint16_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)inwhl << 9) & ~((uint16_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)inperadval << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)peeraddmatch << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)bdaddrmatch << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)typeerr << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)priverr << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)crcerr << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)lenerr << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxtimeerr << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)syncerr << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxcteerr << 15) | ((uint16_t)followauxptr << 11) | ((uint16_t)devfilteringok << 10) | ((uint16_t)inwhl << 9) | ((uint16_t)inperadval << 8) | ((uint16_t)peeraddmatch << 7) | ((uint16_t)bdaddrmatch << 6) | ((uint16_t)typeerr << 5) | ((uint16_t)priverr << 4) | ((uint16_t)crcerr << 3) | ((uint16_t)lenerr << 2) | ((uint16_t)rxtimeerr << 1) | ((uint16_t)syncerr << 0));
+}
+
+__INLINE void em_ble_rxstatadv_unpack(int elt_idx, uint8_t* rxcteerr, uint8_t* followauxptr, uint8_t* devfilteringok, uint8_t* inwhl, uint8_t* inperadval, uint8_t* peeraddmatch, uint8_t* bdaddrmatch, uint8_t* typeerr, uint8_t* priverr, uint8_t* crcerr, uint8_t* lenerr, uint8_t* rxtimeerr, uint8_t* syncerr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxcteerr = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *followauxptr = (localVal & ((uint16_t)0x00000800)) >> 11;
+ *devfilteringok = (localVal & ((uint16_t)0x00000400)) >> 10;
+ *inwhl = (localVal & ((uint16_t)0x00000200)) >> 9;
+ *inperadval = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *peeraddmatch = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *bdaddrmatch = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *typeerr = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *priverr = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *crcerr = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *lenerr = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *rxtimeerr = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *syncerr = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxstatadv_rxcteerr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxstatadv_rxcteerr_setf(int elt_idx, uint8_t rxcteerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcteerr << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxcteerr << 15));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_followauxptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000800)) >> 11);
+}
+
+__INLINE void em_ble_rxstatadv_followauxptr_setf(int elt_idx, uint8_t followauxptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)followauxptr << 11) & ~((uint16_t)0x00000800)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000800)) | ((uint16_t)followauxptr << 11));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_dev_filtering_ok_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000400)) >> 10);
+}
+
+__INLINE void em_ble_rxstatadv_dev_filtering_ok_setf(int elt_idx, uint8_t devfilteringok)
+{
+ BLE_ASSERT_ERR((((uint16_t)devfilteringok << 10) & ~((uint16_t)0x00000400)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000400)) | ((uint16_t)devfilteringok << 10));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_in_whl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000200)) >> 9);
+}
+
+__INLINE void em_ble_rxstatadv_in_whl_setf(int elt_idx, uint8_t inwhl)
+{
+ BLE_ASSERT_ERR((((uint16_t)inwhl << 9) & ~((uint16_t)0x00000200)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000200)) | ((uint16_t)inwhl << 9));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_in_peradval_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_rxstatadv_in_peradval_setf(int elt_idx, uint8_t inperadval)
+{
+ BLE_ASSERT_ERR((((uint16_t)inperadval << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)inperadval << 8));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_peer_add_match_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_rxstatadv_peer_add_match_setf(int elt_idx, uint8_t peeraddmatch)
+{
+ BLE_ASSERT_ERR((((uint16_t)peeraddmatch << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)peeraddmatch << 7));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_bdaddr_match_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_rxstatadv_bdaddr_match_setf(int elt_idx, uint8_t bdaddrmatch)
+{
+ BLE_ASSERT_ERR((((uint16_t)bdaddrmatch << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)bdaddrmatch << 6));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_type_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_rxstatadv_type_err_setf(int elt_idx, uint8_t typeerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)typeerr << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)typeerr << 5));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_priv_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_rxstatadv_priv_err_setf(int elt_idx, uint8_t priverr)
+{
+ BLE_ASSERT_ERR((((uint16_t)priverr << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)priverr << 4));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_crc_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_rxstatadv_crc_err_setf(int elt_idx, uint8_t crcerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)crcerr << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)crcerr << 3));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_len_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_rxstatadv_len_err_setf(int elt_idx, uint8_t lenerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)lenerr << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)lenerr << 2));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_rxtime_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_rxstatadv_rxtime_err_setf(int elt_idx, uint8_t rxtimeerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxtimeerr << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)rxtimeerr << 1));
+}
+
+__INLINE uint8_t em_ble_rxstatadv_sync_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_rxstatadv_sync_err_setf(int elt_idx, uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)syncerr << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)syncerr << 0));
+}
+
+/**
+ * @brief RXSTATISOM0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:11 RXSTREAM_LBL 0x0
+ * 10:08 RXGROUP_LBL 0x0
+ * 07 NESN_ERR 0
+ * 06 SN_ERR 0
+ * 05 LLID_ERR 0
+ * 04 MIC_ERR 0
+ * 03 CRC_ERR 0
+ * 02 LEN_ERR 0
+ * 01 RXTIME_ERR 0
+ * 00 SYNC_ERR 0
+ *
+ */
+#define EM_BLE_RXSTATISOM0_ADDR (0x00910002 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXSTATISOM0_INDEX 0x00000001
+#define EM_BLE_RXSTATISOM0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxstatisom0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxstatisom0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXSTREAM_LBL_MASK ((uint16_t)0x0000F800)
+#define EM_BLE_RXSTREAM_LBL_LSB 11
+#define EM_BLE_RXSTREAM_LBL_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_RXGROUP_LBL_MASK ((uint16_t)0x00000700)
+#define EM_BLE_RXGROUP_LBL_LSB 8
+#define EM_BLE_RXGROUP_LBL_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_NESN_ERR_BIT ((uint16_t)0x00000080)
+#define EM_BLE_NESN_ERR_POS 7
+#define EM_BLE_SN_ERR_BIT ((uint16_t)0x00000040)
+#define EM_BLE_SN_ERR_POS 6
+#define EM_BLE_LLID_ERR_BIT ((uint16_t)0x00000020)
+#define EM_BLE_LLID_ERR_POS 5
+#define EM_BLE_MIC_ERR_BIT ((uint16_t)0x00000010)
+#define EM_BLE_MIC_ERR_POS 4
+#define EM_BLE_CRC_ERR_BIT ((uint16_t)0x00000008)
+#define EM_BLE_CRC_ERR_POS 3
+#define EM_BLE_LEN_ERR_BIT ((uint16_t)0x00000004)
+#define EM_BLE_LEN_ERR_POS 2
+#define EM_BLE_RXTIME_ERR_BIT ((uint16_t)0x00000002)
+#define EM_BLE_RXTIME_ERR_POS 1
+#define EM_BLE_SYNC_ERR_BIT ((uint16_t)0x00000001)
+#define EM_BLE_SYNC_ERR_POS 0
+
+#define EM_BLE_RXSTREAM_LBL_RST 0x0
+#define EM_BLE_RXGROUP_LBL_RST 0x0
+#define EM_BLE_NESN_ERR_RST 0x0
+#define EM_BLE_SN_ERR_RST 0x0
+#define EM_BLE_LLID_ERR_RST 0x0
+#define EM_BLE_MIC_ERR_RST 0x0
+#define EM_BLE_CRC_ERR_RST 0x0
+#define EM_BLE_LEN_ERR_RST 0x0
+#define EM_BLE_RXTIME_ERR_RST 0x0
+#define EM_BLE_SYNC_ERR_RST 0x0
+
+__INLINE void em_ble_rxstatisom0_pack(int elt_idx, uint8_t rxstreamlbl, uint8_t rxgrouplbl, uint8_t nesnerr, uint8_t snerr, uint8_t lliderr, uint8_t micerr, uint8_t crcerr, uint8_t lenerr, uint8_t rxtimeerr, uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxstreamlbl << 11) & ~((uint16_t)0x0000F800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxgrouplbl << 8) & ~((uint16_t)0x00000700)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)nesnerr << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)snerr << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)lliderr << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)micerr << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)crcerr << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)lenerr << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxtimeerr << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)syncerr << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxstreamlbl << 11) | ((uint16_t)rxgrouplbl << 8) | ((uint16_t)nesnerr << 7) | ((uint16_t)snerr << 6) | ((uint16_t)lliderr << 5) | ((uint16_t)micerr << 4) | ((uint16_t)crcerr << 3) | ((uint16_t)lenerr << 2) | ((uint16_t)rxtimeerr << 1) | ((uint16_t)syncerr << 0));
+}
+
+__INLINE void em_ble_rxstatisom0_unpack(int elt_idx, uint8_t* rxstreamlbl, uint8_t* rxgrouplbl, uint8_t* nesnerr, uint8_t* snerr, uint8_t* lliderr, uint8_t* micerr, uint8_t* crcerr, uint8_t* lenerr, uint8_t* rxtimeerr, uint8_t* syncerr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxstreamlbl = (localVal & ((uint16_t)0x0000F800)) >> 11;
+ *rxgrouplbl = (localVal & ((uint16_t)0x00000700)) >> 8;
+ *nesnerr = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *snerr = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *lliderr = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *micerr = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *crcerr = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *lenerr = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *rxtimeerr = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *syncerr = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_rxstream_lbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000F800)) >> 11);
+}
+
+__INLINE void em_ble_rxstatisom0_rxstream_lbl_setf(int elt_idx, uint8_t rxstreamlbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxstreamlbl << 11) & ~((uint16_t)0x0000F800)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000F800)) | ((uint16_t)rxstreamlbl << 11));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_rxgroup_lbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000700)) >> 8);
+}
+
+__INLINE void em_ble_rxstatisom0_rxgroup_lbl_setf(int elt_idx, uint8_t rxgrouplbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxgrouplbl << 8) & ~((uint16_t)0x00000700)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000700)) | ((uint16_t)rxgrouplbl << 8));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_nesn_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_rxstatisom0_nesn_err_setf(int elt_idx, uint8_t nesnerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)nesnerr << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)nesnerr << 7));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_sn_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_rxstatisom0_sn_err_setf(int elt_idx, uint8_t snerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)snerr << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)snerr << 6));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_llid_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_rxstatisom0_llid_err_setf(int elt_idx, uint8_t lliderr)
+{
+ BLE_ASSERT_ERR((((uint16_t)lliderr << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)lliderr << 5));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_mic_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_rxstatisom0_mic_err_setf(int elt_idx, uint8_t micerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)micerr << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)micerr << 4));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_crc_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_rxstatisom0_crc_err_setf(int elt_idx, uint8_t crcerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)crcerr << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)crcerr << 3));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_len_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_rxstatisom0_len_err_setf(int elt_idx, uint8_t lenerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)lenerr << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)lenerr << 2));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_rxtime_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_rxstatisom0_rxtime_err_setf(int elt_idx, uint8_t rxtimeerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxtimeerr << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)rxtimeerr << 1));
+}
+
+__INLINE uint8_t em_ble_rxstatisom0_sync_err_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_rxstatisom0_sync_err_setf(int elt_idx, uint8_t syncerr)
+{
+ BLE_ASSERT_ERR((((uint16_t)syncerr << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXSTATISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)syncerr << 0));
+}
+
+/**
+ * @brief RXPHCE register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 RXLEN 0x0
+ * 07:06 RXACLRFU 0x0
+ * 05 RXCP 0
+ * 04 RXMD 0
+ * 03 RXSN 0
+ * 02 RXNESN 0
+ * 01:00 RXLLID 0x0
+ *
+ */
+#define EM_BLE_RXPHCE_ADDR (0x00910004 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXPHCE_INDEX 0x00000002
+#define EM_BLE_RXPHCE_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxphce_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxphce_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXLEN_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_RXLEN_LSB 8
+#define EM_BLE_RXLEN_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RXACLRFU_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_RXACLRFU_LSB 6
+#define EM_BLE_RXACLRFU_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_RXCP_BIT ((uint16_t)0x00000020)
+#define EM_BLE_RXCP_POS 5
+#define EM_BLE_RXMD_BIT ((uint16_t)0x00000010)
+#define EM_BLE_RXMD_POS 4
+#define EM_BLE_RXSN_BIT ((uint16_t)0x00000008)
+#define EM_BLE_RXSN_POS 3
+#define EM_BLE_RXNESN_BIT ((uint16_t)0x00000004)
+#define EM_BLE_RXNESN_POS 2
+#define EM_BLE_RXLLID_MASK ((uint16_t)0x00000003)
+#define EM_BLE_RXLLID_LSB 0
+#define EM_BLE_RXLLID_WIDTH ((uint16_t)0x00000002)
+
+#define EM_BLE_RXLEN_RST 0x0
+#define EM_BLE_RXACLRFU_RST 0x0
+#define EM_BLE_RXCP_RST 0x0
+#define EM_BLE_RXMD_RST 0x0
+#define EM_BLE_RXSN_RST 0x0
+#define EM_BLE_RXNESN_RST 0x0
+#define EM_BLE_RXLLID_RST 0x0
+
+__INLINE void em_ble_rxphce_pack(int elt_idx, uint8_t rxlen, uint8_t rxaclrfu, uint8_t rxcp, uint8_t rxmd, uint8_t rxsn, uint8_t rxnesn, uint8_t rxllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxaclrfu << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxcp << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxlen << 8) | ((uint16_t)rxaclrfu << 6) | ((uint16_t)rxcp << 5) | ((uint16_t)rxmd << 4) | ((uint16_t)rxsn << 3) | ((uint16_t)rxnesn << 2) | ((uint16_t)rxllid << 0));
+}
+
+__INLINE void em_ble_rxphce_unpack(int elt_idx, uint8_t* rxlen, uint8_t* rxaclrfu, uint8_t* rxcp, uint8_t* rxmd, uint8_t* rxsn, uint8_t* rxnesn, uint8_t* rxllid)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxlen = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *rxaclrfu = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *rxcp = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *rxmd = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *rxsn = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *rxnesn = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *rxllid = (localVal & ((uint16_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxphce_rxlen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxphce_rxlen_setf(int elt_idx, uint8_t rxlen)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)rxlen << 8));
+}
+
+__INLINE uint8_t em_ble_rxphce_rxaclrfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_rxphce_rxaclrfu_setf(int elt_idx, uint8_t rxaclrfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxaclrfu << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)rxaclrfu << 6));
+}
+
+__INLINE uint8_t em_ble_rxphce_rxcp_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_rxphce_rxcp_setf(int elt_idx, uint8_t rxcp)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcp << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)rxcp << 5));
+}
+
+__INLINE uint8_t em_ble_rxphce_rxmd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_rxphce_rxmd_setf(int elt_idx, uint8_t rxmd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)rxmd << 4));
+}
+
+__INLINE uint8_t em_ble_rxphce_rxsn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_rxphce_rxsn_setf(int elt_idx, uint8_t rxsn)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)rxsn << 3));
+}
+
+__INLINE uint8_t em_ble_rxphce_rxnesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_rxphce_rxnesn_setf(int elt_idx, uint8_t rxnesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)rxnesn << 2));
+}
+
+__INLINE uint8_t em_ble_rxphce_rxllid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000003)) >> 0);
+}
+
+__INLINE void em_ble_rxphce_rxllid_setf(int elt_idx, uint8_t rxllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000003)) | ((uint16_t)rxllid << 0));
+}
+
+/**
+ * @brief RXPHADV register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 RXADVLEN 0x0
+ * 07 RXRXADD 0
+ * 06 RXTXADD 0
+ * 05 RXCHSEL2 0
+ * 04 RXADVRFU 0
+ * 03:00 RXTYPE 0x0
+ *
+ */
+#define EM_BLE_RXPHADV_ADDR (0x00910004 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXPHADV_INDEX 0x00000002
+#define EM_BLE_RXPHADV_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxphadv_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxphadv_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXADVLEN_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_RXADVLEN_LSB 8
+#define EM_BLE_RXADVLEN_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RXRXADD_BIT ((uint16_t)0x00000080)
+#define EM_BLE_RXRXADD_POS 7
+#define EM_BLE_RXTXADD_BIT ((uint16_t)0x00000040)
+#define EM_BLE_RXTXADD_POS 6
+#define EM_BLE_RXCHSEL2_BIT ((uint16_t)0x00000020)
+#define EM_BLE_RXCHSEL2_POS 5
+#define EM_BLE_RXADVRFU_BIT ((uint16_t)0x00000010)
+#define EM_BLE_RXADVRFU_POS 4
+#define EM_BLE_RXTYPE_MASK ((uint16_t)0x0000000F)
+#define EM_BLE_RXTYPE_LSB 0
+#define EM_BLE_RXTYPE_WIDTH ((uint16_t)0x00000004)
+
+#define EM_BLE_RXADVLEN_RST 0x0
+#define EM_BLE_RXRXADD_RST 0x0
+#define EM_BLE_RXTXADD_RST 0x0
+#define EM_BLE_RXCHSEL2_RST 0x0
+#define EM_BLE_RXADVRFU_RST 0x0
+#define EM_BLE_RXTYPE_RST 0x0
+
+__INLINE void em_ble_rxphadv_pack(int elt_idx, uint8_t rxadvlen, uint8_t rxrxadd, uint8_t rxtxadd, uint8_t rxchsel2, uint8_t rxadvrfu, uint8_t rxtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxadvlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxrxadd << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxtxadd << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxchsel2 << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxadvrfu << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxtype << 0) & ~((uint16_t)0x0000000F)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxadvlen << 8) | ((uint16_t)rxrxadd << 7) | ((uint16_t)rxtxadd << 6) | ((uint16_t)rxchsel2 << 5) | ((uint16_t)rxadvrfu << 4) | ((uint16_t)rxtype << 0));
+}
+
+__INLINE void em_ble_rxphadv_unpack(int elt_idx, uint8_t* rxadvlen, uint8_t* rxrxadd, uint8_t* rxtxadd, uint8_t* rxchsel2, uint8_t* rxadvrfu, uint8_t* rxtype)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxadvlen = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *rxrxadd = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *rxtxadd = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *rxchsel2 = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *rxadvrfu = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *rxtype = (localVal & ((uint16_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxphadv_rxadvlen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxphadv_rxadvlen_setf(int elt_idx, uint8_t rxadvlen)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxadvlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)rxadvlen << 8));
+}
+
+__INLINE uint8_t em_ble_rxphadv_rxrxadd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_rxphadv_rxrxadd_setf(int elt_idx, uint8_t rxrxadd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxrxadd << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)rxrxadd << 7));
+}
+
+__INLINE uint8_t em_ble_rxphadv_rxtxadd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_rxphadv_rxtxadd_setf(int elt_idx, uint8_t rxtxadd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxtxadd << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)rxtxadd << 6));
+}
+
+__INLINE uint8_t em_ble_rxphadv_rxchsel2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_rxphadv_rxchsel2_setf(int elt_idx, uint8_t rxchsel2)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxchsel2 << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)rxchsel2 << 5));
+}
+
+__INLINE uint8_t em_ble_rxphadv_rxadvrfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_rxphadv_rxadvrfu_setf(int elt_idx, uint8_t rxadvrfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxadvrfu << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)rxadvrfu << 4));
+}
+
+__INLINE uint8_t em_ble_rxphadv_rxtype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000000F)) >> 0);
+}
+
+__INLINE void em_ble_rxphadv_rxtype_setf(int elt_idx, uint8_t rxtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxtype << 0) & ~((uint16_t)0x0000000F)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHADV_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000000F)) | ((uint16_t)rxtype << 0));
+}
+
+/**
+ * @brief RXPHISOM0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 RXLEN 0x0
+ * 07:05 RXISOM0RFU 0x0
+ * 04 RXMD 0
+ * 03 RXSN 0
+ * 02 RXNESN 0
+ * 01:00 RXLLID 0x0
+ *
+ */
+#define EM_BLE_RXPHISOM0_ADDR (0x00910004 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXPHISOM0_INDEX 0x00000002
+#define EM_BLE_RXPHISOM0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxphisom0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxphisom0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXLEN_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_RXLEN_LSB 8
+#define EM_BLE_RXLEN_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RXISOM0RFU_MASK ((uint16_t)0x000000E0)
+#define EM_BLE_RXISOM0RFU_LSB 5
+#define EM_BLE_RXISOM0RFU_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_RXMD_BIT ((uint16_t)0x00000010)
+#define EM_BLE_RXMD_POS 4
+#define EM_BLE_RXSN_BIT ((uint16_t)0x00000008)
+#define EM_BLE_RXSN_POS 3
+#define EM_BLE_RXNESN_BIT ((uint16_t)0x00000004)
+#define EM_BLE_RXNESN_POS 2
+#define EM_BLE_RXLLID_MASK ((uint16_t)0x00000003)
+#define EM_BLE_RXLLID_LSB 0
+#define EM_BLE_RXLLID_WIDTH ((uint16_t)0x00000002)
+
+#define EM_BLE_RXLEN_RST 0x0
+#define EM_BLE_RXISOM0RFU_RST 0x0
+#define EM_BLE_RXMD_RST 0x0
+#define EM_BLE_RXSN_RST 0x0
+#define EM_BLE_RXNESN_RST 0x0
+#define EM_BLE_RXLLID_RST 0x0
+
+__INLINE void em_ble_rxphisom0_pack(int elt_idx, uint8_t rxlen, uint8_t rxisom0rfu, uint8_t rxmd, uint8_t rxsn, uint8_t rxnesn, uint8_t rxllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxisom0rfu << 5) & ~((uint16_t)0x000000E0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxlen << 8) | ((uint16_t)rxisom0rfu << 5) | ((uint16_t)rxmd << 4) | ((uint16_t)rxsn << 3) | ((uint16_t)rxnesn << 2) | ((uint16_t)rxllid << 0));
+}
+
+__INLINE void em_ble_rxphisom0_unpack(int elt_idx, uint8_t* rxlen, uint8_t* rxisom0rfu, uint8_t* rxmd, uint8_t* rxsn, uint8_t* rxnesn, uint8_t* rxllid)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxlen = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *rxisom0rfu = (localVal & ((uint16_t)0x000000E0)) >> 5;
+ *rxmd = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *rxsn = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *rxnesn = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *rxllid = (localVal & ((uint16_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxphisom0_rxlen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxphisom0_rxlen_setf(int elt_idx, uint8_t rxlen)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)rxlen << 8));
+}
+
+__INLINE uint8_t em_ble_rxphisom0_rxisom0rfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000E0)) >> 5);
+}
+
+__INLINE void em_ble_rxphisom0_rxisom0rfu_setf(int elt_idx, uint8_t rxisom0rfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxisom0rfu << 5) & ~((uint16_t)0x000000E0)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x000000E0)) | ((uint16_t)rxisom0rfu << 5));
+}
+
+__INLINE uint8_t em_ble_rxphisom0_rxmd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_rxphisom0_rxmd_setf(int elt_idx, uint8_t rxmd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)rxmd << 4));
+}
+
+__INLINE uint8_t em_ble_rxphisom0_rxsn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_rxphisom0_rxsn_setf(int elt_idx, uint8_t rxsn)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)rxsn << 3));
+}
+
+__INLINE uint8_t em_ble_rxphisom0_rxnesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_rxphisom0_rxnesn_setf(int elt_idx, uint8_t rxnesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)rxnesn << 2));
+}
+
+__INLINE uint8_t em_ble_rxphisom0_rxllid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000003)) >> 0);
+}
+
+__INLINE void em_ble_rxphisom0_rxllid_setf(int elt_idx, uint8_t rxllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHISOM0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000003)) | ((uint16_t)rxllid << 0));
+}
+
+/**
+ * @brief RXCHASS register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:14 RATE 0x0
+ * 13:08 USED_CH_IDX 0x0
+ * 07:00 RSSI 0x0
+ *
+ */
+#define EM_BLE_RXCHASS_ADDR (0x00910006 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXCHASS_INDEX 0x00000003
+#define EM_BLE_RXCHASS_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxchass_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxchass_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RATE_MASK ((uint16_t)0x0000C000)
+#define EM_BLE_RATE_LSB 14
+#define EM_BLE_RATE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_USED_CH_IDX_MASK ((uint16_t)0x00003F00)
+#define EM_BLE_USED_CH_IDX_LSB 8
+#define EM_BLE_USED_CH_IDX_WIDTH ((uint16_t)0x00000006)
+#define EM_BLE_RSSI_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_RSSI_LSB 0
+#define EM_BLE_RSSI_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_RATE_RST 0x0
+#define EM_BLE_USED_CH_IDX_RST 0x0
+#define EM_BLE_RSSI_RST 0x0
+
+__INLINE void em_ble_rxchass_pack(int elt_idx, uint8_t rate, uint8_t usedchidx, uint8_t rssi)
+{
+ BLE_ASSERT_ERR((((uint16_t)rate << 14) & ~((uint16_t)0x0000C000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)usedchidx << 8) & ~((uint16_t)0x00003F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rssi << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rate << 14) | ((uint16_t)usedchidx << 8) | ((uint16_t)rssi << 0));
+}
+
+__INLINE void em_ble_rxchass_unpack(int elt_idx, uint8_t* rate, uint8_t* usedchidx, uint8_t* rssi)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rate = (localVal & ((uint16_t)0x0000C000)) >> 14;
+ *usedchidx = (localVal & ((uint16_t)0x00003F00)) >> 8;
+ *rssi = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxchass_rate_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000C000)) >> 14);
+}
+
+__INLINE void em_ble_rxchass_rate_setf(int elt_idx, uint8_t rate)
+{
+ BLE_ASSERT_ERR((((uint16_t)rate << 14) & ~((uint16_t)0x0000C000)) == 0);
+ EM_BLE_WR(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000C000)) | ((uint16_t)rate << 14));
+}
+
+__INLINE uint8_t em_ble_rxchass_used_ch_idx_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00003F00)) >> 8);
+}
+
+__INLINE void em_ble_rxchass_used_ch_idx_setf(int elt_idx, uint8_t usedchidx)
+{
+ BLE_ASSERT_ERR((((uint16_t)usedchidx << 8) & ~((uint16_t)0x00003F00)) == 0);
+ EM_BLE_WR(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00003F00)) | ((uint16_t)usedchidx << 8));
+}
+
+__INLINE uint8_t em_ble_rxchass_rssi_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_rxchass_rssi_setf(int elt_idx, uint8_t rssi)
+{
+ BLE_ASSERT_ERR((((uint16_t)rssi << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXCHASS_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)rssi << 0));
+}
+
+/**
+ * @brief RXCLKNSYNC0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 CLKNRXSYNC0 0x0
+ *
+ */
+#define EM_BLE_RXCLKNSYNC0_ADDR (0x00910008 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXCLKNSYNC0_INDEX 0x00000004
+#define EM_BLE_RXCLKNSYNC0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxclknsync0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCLKNSYNC0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+// field definitions
+#define EM_BLE_CLKNRXSYNC0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_CLKNRXSYNC0_LSB 0
+#define EM_BLE_CLKNRXSYNC0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_CLKNRXSYNC0_RST 0x0
+
+__INLINE uint16_t em_ble_rxclknsync0_clknrxsync0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCLKNSYNC0_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief RXCLKNSYNC1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 11:00 CLKNRXSYNC1 0x0
+ *
+ */
+#define EM_BLE_RXCLKNSYNC1_ADDR (0x0091000A + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXCLKNSYNC1_INDEX 0x00000005
+#define EM_BLE_RXCLKNSYNC1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxclknsync1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCLKNSYNC1_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+// field definitions
+#define EM_BLE_CLKNRXSYNC1_MASK ((uint16_t)0x00000FFF)
+#define EM_BLE_CLKNRXSYNC1_LSB 0
+#define EM_BLE_CLKNRXSYNC1_WIDTH ((uint16_t)0x0000000C)
+
+#define EM_BLE_CLKNRXSYNC1_RST 0x0
+
+__INLINE uint16_t em_ble_rxclknsync1_clknrxsync1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCLKNSYNC1_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00000FFF)) == 0);
+ return (localVal >> 0);
+}
+
+/**
+ * @brief RXFCNTSYNC register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:11 RXLINKLBL 0x0
+ * 09:00 FCNTRXSYNC 0x0
+ *
+ */
+#define EM_BLE_RXFCNTSYNC_ADDR (0x0091000C + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXFCNTSYNC_INDEX 0x00000006
+#define EM_BLE_RXFCNTSYNC_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxfcntsync_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXFCNTSYNC_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+// field definitions
+#define EM_BLE_RXLINKLBL_MASK ((uint16_t)0x0000F800)
+#define EM_BLE_RXLINKLBL_LSB 11
+#define EM_BLE_RXLINKLBL_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_FCNTRXSYNC_MASK ((uint16_t)0x000003FF)
+#define EM_BLE_FCNTRXSYNC_LSB 0
+#define EM_BLE_FCNTRXSYNC_WIDTH ((uint16_t)0x0000000A)
+
+#define EM_BLE_RXLINKLBL_RST 0x0
+#define EM_BLE_FCNTRXSYNC_RST 0x0
+
+__INLINE void em_ble_rxfcntsync_unpack(int elt_idx, uint8_t* rxlinklbl, uint16_t* fcntrxsync)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXFCNTSYNC_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxlinklbl = (localVal & ((uint16_t)0x0000F800)) >> 11;
+ *fcntrxsync = (localVal & ((uint16_t)0x000003FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxfcntsync_rxlinklbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXFCNTSYNC_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000F800)) >> 11);
+}
+
+__INLINE uint16_t em_ble_rxfcntsync_fcntrxsync_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXFCNTSYNC_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000003FF)) >> 0);
+}
+
+/**
+ * @brief RXWPALPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXWPALPTR 0x0
+ *
+ */
+#define EM_BLE_RXWPALPTR_ADDR (0x0091000E + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXWPALPTR_INDEX 0x00000007
+#define EM_BLE_RXWPALPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxwpalptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXWPALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxwpalptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXWPALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXWPALPTR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXWPALPTR_LSB 0
+#define EM_BLE_RXWPALPTR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXWPALPTR_RST 0x0
+
+__INLINE uint16_t em_ble_rxwpalptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXWPALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxwpalptr_setf(int elt_idx, uint16_t rxwpalptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxwpalptr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXWPALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (uint16_t)rxwpalptr << 0);
+}
+
+/**
+ * @brief RXRALPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXRALPTR 0x0
+ *
+ */
+#define EM_BLE_RXRALPTR_ADDR (0x00910010 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXRALPTR_INDEX 0x00000008
+#define EM_BLE_RXRALPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxralptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXRALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxralptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXRALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXRALPTR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXRALPTR_LSB 0
+#define EM_BLE_RXRALPTR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXRALPTR_RST 0x0
+
+__INLINE uint16_t em_ble_rxralptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXRALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxralptr_setf(int elt_idx, uint16_t rxralptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxralptr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXRALPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (uint16_t)rxralptr << 0);
+}
+
+/**
+ * @brief RXAEHEADER register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXRSVD 0
+ * 14 RXPOW 0
+ * 13 RXSYNC 0
+ * 12 RXAUXPTR 0
+ * 11 RXADI 0
+ * 10 RXCTE 0
+ * 09 RXTGTA 0
+ * 08 RXADVA 0
+ * 07:06 RXAEMODE 0x0
+ * 05:00 RXAELENGTH 0x0
+ *
+ */
+#define EM_BLE_RXAEHEADER_ADDR (0x00910012 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXAEHEADER_INDEX 0x00000009
+#define EM_BLE_RXAEHEADER_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxaeheader_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxaeheader_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXRSVD_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXRSVD_POS 15
+#define EM_BLE_RXPOW_BIT ((uint16_t)0x00004000)
+#define EM_BLE_RXPOW_POS 14
+#define EM_BLE_RXSYNC_BIT ((uint16_t)0x00002000)
+#define EM_BLE_RXSYNC_POS 13
+#define EM_BLE_RXAUXPTR_BIT ((uint16_t)0x00001000)
+#define EM_BLE_RXAUXPTR_POS 12
+#define EM_BLE_RXADI_BIT ((uint16_t)0x00000800)
+#define EM_BLE_RXADI_POS 11
+#define EM_BLE_RXCTE_BIT ((uint16_t)0x00000400)
+#define EM_BLE_RXCTE_POS 10
+#define EM_BLE_RXTGTA_BIT ((uint16_t)0x00000200)
+#define EM_BLE_RXTGTA_POS 9
+#define EM_BLE_RXADVA_BIT ((uint16_t)0x00000100)
+#define EM_BLE_RXADVA_POS 8
+#define EM_BLE_RXAEMODE_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_RXAEMODE_LSB 6
+#define EM_BLE_RXAEMODE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_RXAELENGTH_MASK ((uint16_t)0x0000003F)
+#define EM_BLE_RXAELENGTH_LSB 0
+#define EM_BLE_RXAELENGTH_WIDTH ((uint16_t)0x00000006)
+
+#define EM_BLE_RXRSVD_RST 0x0
+#define EM_BLE_RXPOW_RST 0x0
+#define EM_BLE_RXSYNC_RST 0x0
+#define EM_BLE_RXAUXPTR_RST 0x0
+#define EM_BLE_RXADI_RST 0x0
+#define EM_BLE_RXCTE_RST 0x0
+#define EM_BLE_RXTGTA_RST 0x0
+#define EM_BLE_RXADVA_RST 0x0
+#define EM_BLE_RXAEMODE_RST 0x0
+#define EM_BLE_RXAELENGTH_RST 0x0
+
+__INLINE void em_ble_rxaeheader_pack(int elt_idx, uint8_t rxrsvd, uint8_t rxpow, uint8_t rxsync, uint8_t rxauxptr, uint8_t rxadi, uint8_t rxcte, uint8_t rxtgta, uint8_t rxadva, uint8_t rxaemode, uint8_t rxaelength)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxrsvd << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxpow << 14) & ~((uint16_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxsync << 13) & ~((uint16_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxauxptr << 12) & ~((uint16_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxadi << 11) & ~((uint16_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxcte << 10) & ~((uint16_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxtgta << 9) & ~((uint16_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxadva << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxaemode << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxaelength << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)rxrsvd << 15) | ((uint16_t)rxpow << 14) | ((uint16_t)rxsync << 13) | ((uint16_t)rxauxptr << 12) | ((uint16_t)rxadi << 11) | ((uint16_t)rxcte << 10) | ((uint16_t)rxtgta << 9) | ((uint16_t)rxadva << 8) | ((uint16_t)rxaemode << 6) | ((uint16_t)rxaelength << 0));
+}
+
+__INLINE void em_ble_rxaeheader_unpack(int elt_idx, uint8_t* rxrsvd, uint8_t* rxpow, uint8_t* rxsync, uint8_t* rxauxptr, uint8_t* rxadi, uint8_t* rxcte, uint8_t* rxtgta, uint8_t* rxadva, uint8_t* rxaemode, uint8_t* rxaelength)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *rxrsvd = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *rxpow = (localVal & ((uint16_t)0x00004000)) >> 14;
+ *rxsync = (localVal & ((uint16_t)0x00002000)) >> 13;
+ *rxauxptr = (localVal & ((uint16_t)0x00001000)) >> 12;
+ *rxadi = (localVal & ((uint16_t)0x00000800)) >> 11;
+ *rxcte = (localVal & ((uint16_t)0x00000400)) >> 10;
+ *rxtgta = (localVal & ((uint16_t)0x00000200)) >> 9;
+ *rxadva = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *rxaemode = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *rxaelength = (localVal & ((uint16_t)0x0000003F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxrsvd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxaeheader_rxrsvd_setf(int elt_idx, uint8_t rxrsvd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxrsvd << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxrsvd << 15));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxpow_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00004000)) >> 14);
+}
+
+__INLINE void em_ble_rxaeheader_rxpow_setf(int elt_idx, uint8_t rxpow)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxpow << 14) & ~((uint16_t)0x00004000)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00004000)) | ((uint16_t)rxpow << 14));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxsync_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00002000)) >> 13);
+}
+
+__INLINE void em_ble_rxaeheader_rxsync_setf(int elt_idx, uint8_t rxsync)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxsync << 13) & ~((uint16_t)0x00002000)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00002000)) | ((uint16_t)rxsync << 13));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxauxptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00001000)) >> 12);
+}
+
+__INLINE void em_ble_rxaeheader_rxauxptr_setf(int elt_idx, uint8_t rxauxptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxauxptr << 12) & ~((uint16_t)0x00001000)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00001000)) | ((uint16_t)rxauxptr << 12));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxadi_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000800)) >> 11);
+}
+
+__INLINE void em_ble_rxaeheader_rxadi_setf(int elt_idx, uint8_t rxadi)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxadi << 11) & ~((uint16_t)0x00000800)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000800)) | ((uint16_t)rxadi << 11));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxcte_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000400)) >> 10);
+}
+
+__INLINE void em_ble_rxaeheader_rxcte_setf(int elt_idx, uint8_t rxcte)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcte << 10) & ~((uint16_t)0x00000400)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000400)) | ((uint16_t)rxcte << 10));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxtgta_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000200)) >> 9);
+}
+
+__INLINE void em_ble_rxaeheader_rxtgta_setf(int elt_idx, uint8_t rxtgta)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxtgta << 9) & ~((uint16_t)0x00000200)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000200)) | ((uint16_t)rxtgta << 9));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxadva_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_rxaeheader_rxadva_setf(int elt_idx, uint8_t rxadva)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxadva << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)rxadva << 8));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxaemode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_rxaeheader_rxaemode_setf(int elt_idx, uint8_t rxaemode)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxaemode << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)rxaemode << 6));
+}
+
+__INLINE uint8_t em_ble_rxaeheader_rxaelength_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000003F)) >> 0);
+}
+
+__INLINE void em_ble_rxaeheader_rxaelength_setf(int elt_idx, uint8_t rxaelength)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxaelength << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXAEHEADER_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000003F)) | ((uint16_t)rxaelength << 0));
+}
+
+/**
+ * @brief RXDATAPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXDATAPTR 0x0
+ *
+ */
+#define EM_BLE_RXDATAPTR_ADDR (0x00910014 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXDATAPTR_INDEX 0x0000000A
+#define EM_BLE_RXDATAPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxdataptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXDATAPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxdataptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXDATAPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXDATAPTR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXDATAPTR_LSB 0
+#define EM_BLE_RXDATAPTR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXDATAPTR_RST 0x0
+
+__INLINE uint16_t em_ble_rxdataptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXDATAPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxdataptr_setf(int elt_idx, uint16_t rxdataptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdataptr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXDATAPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (uint16_t)rxdataptr << 0);
+}
+
+/**
+ * @brief RXPHCTE register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 NBRXIQSAMP 0x0
+ * 07:06 RXCTETYPE 0x0
+ * 05 RXCTERFU 0
+ * 04:00 RXCTETIME 0x0
+ *
+ */
+#define EM_BLE_RXPHCTE_ADDR (0x00910016 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXPHCTE_INDEX 0x0000000B
+#define EM_BLE_RXPHCTE_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxphcte_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxphcte_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_NBRXIQSAMP_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_NBRXIQSAMP_LSB 8
+#define EM_BLE_NBRXIQSAMP_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RXCTETYPE_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_RXCTETYPE_LSB 6
+#define EM_BLE_RXCTETYPE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_RXCTERFU_BIT ((uint16_t)0x00000020)
+#define EM_BLE_RXCTERFU_POS 5
+#define EM_BLE_RXCTETIME_MASK ((uint16_t)0x0000001F)
+#define EM_BLE_RXCTETIME_LSB 0
+#define EM_BLE_RXCTETIME_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_NBRXIQSAMP_RST 0x0
+#define EM_BLE_RXCTETYPE_RST 0x0
+#define EM_BLE_RXCTERFU_RST 0x0
+#define EM_BLE_RXCTETIME_RST 0x0
+
+__INLINE void em_ble_rxphcte_pack(int elt_idx, uint8_t nbrxiqsamp, uint8_t rxctetype, uint8_t rxcterfu, uint8_t rxctetime)
+{
+ BLE_ASSERT_ERR((((uint16_t)nbrxiqsamp << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxctetype << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxcterfu << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxctetime << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, ((uint16_t)nbrxiqsamp << 8) | ((uint16_t)rxctetype << 6) | ((uint16_t)rxcterfu << 5) | ((uint16_t)rxctetime << 0));
+}
+
+__INLINE void em_ble_rxphcte_unpack(int elt_idx, uint8_t* nbrxiqsamp, uint8_t* rxctetype, uint8_t* rxcterfu, uint8_t* rxctetime)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+
+ *nbrxiqsamp = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *rxctetype = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *rxcterfu = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *rxctetime = (localVal & ((uint16_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxphcte_nbrxiqsamp_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxphcte_nbrxiqsamp_setf(int elt_idx, uint8_t nbrxiqsamp)
+{
+ BLE_ASSERT_ERR((((uint16_t)nbrxiqsamp << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)nbrxiqsamp << 8));
+}
+
+__INLINE uint8_t em_ble_rxphcte_rxctetype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_rxphcte_rxctetype_setf(int elt_idx, uint8_t rxctetype)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxctetype << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)rxctetype << 6));
+}
+
+__INLINE uint8_t em_ble_rxphcte_rxcterfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_rxphcte_rxcterfu_setf(int elt_idx, uint8_t rxcterfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcterfu << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)rxcterfu << 5));
+}
+
+__INLINE uint8_t em_ble_rxphcte_rxctetime_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000001F)) >> 0);
+}
+
+__INLINE void em_ble_rxphcte_rxctetime_setf(int elt_idx, uint8_t rxctetime)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxctetime << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXPHCTE_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE) & ~((uint16_t)0x0000001F)) | ((uint16_t)rxctetime << 0));
+}
+
+/**
+ * @brief RXCTEPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXCTEPTR 0x0
+ *
+ */
+#define EM_BLE_RXCTEPTR_ADDR (0x00910018 + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXCTEPTR_INDEX 0x0000000C
+#define EM_BLE_RXCTEPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxcteptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXCTEPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxcteptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXCTEPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXCTEPTR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXCTEPTR_LSB 0
+#define EM_BLE_RXCTEPTR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXCTEPTR_RST 0x0
+
+__INLINE uint16_t em_ble_rxcteptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXCTEPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxcteptr_setf(int elt_idx, uint16_t rxcteptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxcteptr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXCTEPTR_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (uint16_t)rxcteptr << 0);
+}
+
+/**
+ * @brief RXRESERVED register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RSVD 0x0
+ *
+ */
+#define EM_BLE_RXRESERVED_ADDR (0x0091001A + EM_BLE_RX_DESC_OFFSET)
+#define EM_BLE_RXRESERVED_INDEX 0x0000000D
+#define EM_BLE_RXRESERVED_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxreserved_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXRESERVED_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxreserved_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXRESERVED_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RSVD_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RSVD_LSB 0
+#define EM_BLE_RSVD_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RSVD_RST 0x0
+
+__INLINE uint16_t em_ble_rxreserved_rsvd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXRESERVED_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxreserved_rsvd_setf(int elt_idx, uint16_t rsvd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rsvd << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXRESERVED_ADDR + elt_idx * REG_EM_BLE_RX_DESC_SIZE, (uint16_t)rsvd << 0);
+}
+
+
+#endif // _REG_EM_BLE_RX_DESC_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_iso_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_iso_buf.h
new file mode 100755
index 0000000..9c10fa9
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_iso_buf.h
@@ -0,0 +1,273 @@
+#ifndef _REG_EM_BLE_RX_ISO_BUF_H_
+#define _REG_EM_BLE_RX_ISO_BUF_H_
+
+#include
+#include "_reg_em_ble_rx_iso_buf.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RX_ISO_BUF_COUNT 4
+
+#define REG_EM_BLE_RX_ISO_BUF_DECODING_MASK 0x00000007
+
+#define REG_EM_BLE_RX_ISO_BUF_ADDR_GET(idx) (EM_BLE_RX_ISO_BUF_OFFSET + (idx) * REG_EM_BLE_RX_ISO_BUF_SIZE)
+
+/**
+ * @brief RXISOBUFSTAT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:14 INVL 0x0
+ * 07:00 RXISOLENGTH 0x0
+ *
+ */
+#define EM_BLE_RXISOBUFSTAT_ADDR (0x00910000 + EM_BLE_RX_ISO_BUF_OFFSET)
+#define EM_BLE_RXISOBUFSTAT_INDEX 0x00000000
+#define EM_BLE_RXISOBUFSTAT_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisobufstat_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+}
+
+__INLINE void em_ble_rxisobufstat_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_INVL_MASK ((uint16_t)0x0000C000)
+#define EM_BLE_INVL_LSB 14
+#define EM_BLE_INVL_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_RXISOLENGTH_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_RXISOLENGTH_LSB 0
+#define EM_BLE_RXISOLENGTH_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_INVL_RST 0x0
+#define EM_BLE_RXISOLENGTH_RST 0x0
+
+__INLINE void em_ble_rxisobufstat_pack(int elt_idx, uint8_t invl, uint8_t rxisolength)
+{
+ BLE_ASSERT_ERR((((uint16_t)invl << 14) & ~((uint16_t)0x0000C000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxisolength << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, ((uint16_t)invl << 14) | ((uint16_t)rxisolength << 0));
+}
+
+__INLINE void em_ble_rxisobufstat_unpack(int elt_idx, uint8_t* invl, uint8_t* rxisolength)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+
+ *invl = (localVal & ((uint16_t)0x0000C000)) >> 14;
+ *rxisolength = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxisobufstat_invl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x0000C000)) >> 14);
+}
+
+__INLINE void em_ble_rxisobufstat_invl_setf(int elt_idx, uint8_t invl)
+{
+ BLE_ASSERT_ERR((((uint16_t)invl << 14) & ~((uint16_t)0x0000C000)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE) & ~((uint16_t)0x0000C000)) | ((uint16_t)invl << 14));
+}
+
+__INLINE uint8_t em_ble_rxisobufstat_rxisolength_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_rxisobufstat_rxisolength_setf(int elt_idx, uint8_t rxisolength)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxisolength << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_RXISOBUFSTAT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)rxisolength << 0));
+}
+
+/**
+ * @brief RXISOBUFLBL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 12:08 RXBUFLINKLBL 0x0
+ * 07:03 RXBUFSTREAM_LBL 0x0
+ * 02:00 RXBUFGROUP_LBL 0x0
+ *
+ */
+#define EM_BLE_RXISOBUFLBL_ADDR (0x00910002 + EM_BLE_RX_ISO_BUF_OFFSET)
+#define EM_BLE_RXISOBUFLBL_INDEX 0x00000001
+#define EM_BLE_RXISOBUFLBL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisobuflbl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+}
+
+__INLINE void em_ble_rxisobuflbl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXBUFLINKLBL_MASK ((uint16_t)0x00001F00)
+#define EM_BLE_RXBUFLINKLBL_LSB 8
+#define EM_BLE_RXBUFLINKLBL_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_RXBUFSTREAM_LBL_MASK ((uint16_t)0x000000F8)
+#define EM_BLE_RXBUFSTREAM_LBL_LSB 3
+#define EM_BLE_RXBUFSTREAM_LBL_WIDTH ((uint16_t)0x00000005)
+#define EM_BLE_RXBUFGROUP_LBL_MASK ((uint16_t)0x00000007)
+#define EM_BLE_RXBUFGROUP_LBL_LSB 0
+#define EM_BLE_RXBUFGROUP_LBL_WIDTH ((uint16_t)0x00000003)
+
+#define EM_BLE_RXBUFLINKLBL_RST 0x0
+#define EM_BLE_RXBUFSTREAM_LBL_RST 0x0
+#define EM_BLE_RXBUFGROUP_LBL_RST 0x0
+
+__INLINE void em_ble_rxisobuflbl_pack(int elt_idx, uint8_t rxbuflinklbl, uint8_t rxbufstreamlbl, uint8_t rxbufgrouplbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbuflinklbl << 8) & ~((uint16_t)0x00001F00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxbufstreamlbl << 3) & ~((uint16_t)0x000000F8)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxbufgrouplbl << 0) & ~((uint16_t)0x00000007)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, ((uint16_t)rxbuflinklbl << 8) | ((uint16_t)rxbufstreamlbl << 3) | ((uint16_t)rxbufgrouplbl << 0));
+}
+
+__INLINE void em_ble_rxisobuflbl_unpack(int elt_idx, uint8_t* rxbuflinklbl, uint8_t* rxbufstreamlbl, uint8_t* rxbufgrouplbl)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+
+ *rxbuflinklbl = (localVal & ((uint16_t)0x00001F00)) >> 8;
+ *rxbufstreamlbl = (localVal & ((uint16_t)0x000000F8)) >> 3;
+ *rxbufgrouplbl = (localVal & ((uint16_t)0x00000007)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxisobuflbl_rxbuflinklbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x00001F00)) >> 8);
+}
+
+__INLINE void em_ble_rxisobuflbl_rxbuflinklbl_setf(int elt_idx, uint8_t rxbuflinklbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbuflinklbl << 8) & ~((uint16_t)0x00001F00)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE) & ~((uint16_t)0x00001F00)) | ((uint16_t)rxbuflinklbl << 8));
+}
+
+__INLINE uint8_t em_ble_rxisobuflbl_rxbufstream_lbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x000000F8)) >> 3);
+}
+
+__INLINE void em_ble_rxisobuflbl_rxbufstream_lbl_setf(int elt_idx, uint8_t rxbufstreamlbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbufstreamlbl << 3) & ~((uint16_t)0x000000F8)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE) & ~((uint16_t)0x000000F8)) | ((uint16_t)rxbufstreamlbl << 3));
+}
+
+__INLINE uint8_t em_ble_rxisobuflbl_rxbufgroup_lbl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x00000007)) >> 0);
+}
+
+__INLINE void em_ble_rxisobuflbl_rxbufgroup_lbl_setf(int elt_idx, uint8_t rxbufgrouplbl)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxbufgrouplbl << 0) & ~((uint16_t)0x00000007)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_RXISOBUFLBL_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE) & ~((uint16_t)0x00000007)) | ((uint16_t)rxbufgrouplbl << 0));
+}
+
+/**
+ * @brief RXISOSUBEVTCNT register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 07:00 SUBEVTCNT 0x0
+ *
+ */
+#define EM_BLE_RXISOSUBEVTCNT_ADDR (0x00910004 + EM_BLE_RX_ISO_BUF_OFFSET)
+#define EM_BLE_RXISOSUBEVTCNT_INDEX 0x00000002
+#define EM_BLE_RXISOSUBEVTCNT_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisosubevtcnt_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOSUBEVTCNT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+}
+
+__INLINE void em_ble_rxisosubevtcnt_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOSUBEVTCNT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_SUBEVTCNT_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_SUBEVTCNT_LSB 0
+#define EM_BLE_SUBEVTCNT_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_SUBEVTCNT_RST 0x0
+
+__INLINE uint8_t em_ble_rxisosubevtcnt_subevtcnt_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOSUBEVTCNT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x000000FF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxisosubevtcnt_subevtcnt_setf(int elt_idx, uint8_t subevtcnt)
+{
+ BLE_ASSERT_ERR((((uint16_t)subevtcnt << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOSUBEVTCNT_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE, (uint16_t)subevtcnt << 0);
+}
+
+/**
+ * @brief RXISODATABUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXISODATABUF 0x0
+ *
+ */
+#define EM_BLE_RXISODATABUF_ADDR (0x00910006 + EM_BLE_RX_ISO_BUF_OFFSET)
+#define EM_BLE_RXISODATABUF_INDEX 0x00000003
+#define EM_BLE_RXISODATABUF_RESET 0x00000000
+#define EM_BLE_RXISODATABUF_COUNT 31
+
+__INLINE uint16_t em_ble_rxisodatabuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 30);
+ return EM_BLE_RD(EM_BLE_RXISODATABUF_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_rxisodatabuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 30);
+ EM_BLE_WR(EM_BLE_RXISODATABUF_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_RXISODATABUF_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXISODATABUF_LSB 0
+#define EM_BLE_RXISODATABUF_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXISODATABUF_RST 0x0
+
+__INLINE uint16_t em_ble_rxisodatabuf_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 30);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISODATABUF_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxisodatabuf_setf(int elt_idx, int reg_idx, uint16_t rxisodatabuf)
+{
+ BLE_ASSERT_ERR(reg_idx <= 30);
+ BLE_ASSERT_ERR((((uint16_t)rxisodatabuf << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISODATABUF_ADDR + elt_idx * REG_EM_BLE_RX_ISO_BUF_SIZE + reg_idx * 2, (uint16_t)rxisodatabuf << 0);
+}
+
+
+#endif // _REG_EM_BLE_RX_ISO_BUF_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_iso_desc.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_iso_desc.h
new file mode 100755
index 0000000..20e5f99
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_rx_iso_desc.h
@@ -0,0 +1,332 @@
+#ifndef _REG_EM_BLE_RX_ISO_DESC_H_
+#define _REG_EM_BLE_RX_ISO_DESC_H_
+
+#include
+#include "_reg_em_ble_rx_iso_desc.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_RX_ISO_DESC_COUNT 6
+
+#define REG_EM_BLE_RX_ISO_DESC_DECODING_MASK 0x0000000F
+
+#define REG_EM_BLE_RX_ISO_DESC_ADDR_GET(idx) (EM_BLE_RX_ISO_DESC_OFFSET + (idx) * REG_EM_BLE_RX_ISO_DESC_SIZE)
+
+/**
+ * @brief RXISOPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 RXDONE 0
+ * 13:00 RXNEXTPTR 0x0
+ *
+ */
+#define EM_BLE_RXISOPTR_ADDR (0x00910000 + EM_BLE_RX_ISO_DESC_OFFSET)
+#define EM_BLE_RXISOPTR_INDEX 0x00000000
+#define EM_BLE_RXISOPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisoptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxisoptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXDONE_BIT ((uint16_t)0x00008000)
+#define EM_BLE_RXDONE_POS 15
+#define EM_BLE_RXNEXTPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_RXNEXTPTR_LSB 0
+#define EM_BLE_RXNEXTPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_RXDONE_RST 0x0
+#define EM_BLE_RXNEXTPTR_RST 0x0
+
+__INLINE void em_ble_rxisoptr_pack(int elt_idx, uint8_t rxdone, uint16_t rxnextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxnextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, ((uint16_t)rxdone << 15) | ((uint16_t)rxnextptr << 0));
+}
+
+__INLINE void em_ble_rxisoptr_unpack(int elt_idx, uint8_t* rxdone, uint16_t* rxnextptr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+
+ *rxdone = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *rxnextptr = (localVal & ((uint16_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxisoptr_rxdone_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_rxisoptr_rxdone_setf(int elt_idx, uint8_t rxdone)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)rxdone << 15));
+}
+
+__INLINE uint16_t em_ble_rxisoptr_rxnextptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void em_ble_rxisoptr_rxnextptr_setf(int elt_idx, uint16_t rxnextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxnextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXISOPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE) & ~((uint16_t)0x00003FFF)) | ((uint16_t)rxnextptr << 0));
+}
+
+/**
+ * @brief RXISOCNT0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXPLD_CNT0 0x0
+ *
+ */
+#define EM_BLE_RXISOCNT0_ADDR (0x00910002 + EM_BLE_RX_ISO_DESC_OFFSET)
+#define EM_BLE_RXISOCNT0_INDEX 0x00000001
+#define EM_BLE_RXISOCNT0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisocnt0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOCNT0_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxisocnt0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOCNT0_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXPLD_CNT0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXPLD_CNT0_LSB 0
+#define EM_BLE_RXPLD_CNT0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXPLD_CNT0_RST 0x0
+
+__INLINE uint16_t em_ble_rxisocnt0_rxpld_cnt0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOCNT0_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxisocnt0_rxpld_cnt0_setf(int elt_idx, uint16_t rxpldcnt0)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxpldcnt0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOCNT0_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (uint16_t)rxpldcnt0 << 0);
+}
+
+/**
+ * @brief RXISOCNT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RXPLD_CNT1 0x0
+ *
+ */
+#define EM_BLE_RXISOCNT1_ADDR (0x00910004 + EM_BLE_RX_ISO_DESC_OFFSET)
+#define EM_BLE_RXISOCNT1_INDEX 0x00000002
+#define EM_BLE_RXISOCNT1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisocnt1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOCNT1_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxisocnt1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOCNT1_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXPLD_CNT1_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RXPLD_CNT1_LSB 0
+#define EM_BLE_RXPLD_CNT1_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RXPLD_CNT1_RST 0x0
+
+__INLINE uint16_t em_ble_rxisocnt1_rxpld_cnt1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOCNT1_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxisocnt1_rxpld_cnt1_setf(int elt_idx, uint16_t rxpldcnt1)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxpldcnt1 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOCNT1_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (uint16_t)rxpldcnt1 << 0);
+}
+
+/**
+ * @brief RXISOCNT2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 RXFLUSHINSTANT 0x0
+ * 06:00 RXPLD_CNT2 0x0
+ *
+ */
+#define EM_BLE_RXISOCNT2_ADDR (0x00910006 + EM_BLE_RX_ISO_DESC_OFFSET)
+#define EM_BLE_RXISOCNT2_INDEX 0x00000003
+#define EM_BLE_RXISOCNT2_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisocnt2_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxisocnt2_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXFLUSHINSTANT_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_RXFLUSHINSTANT_LSB 8
+#define EM_BLE_RXFLUSHINSTANT_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_RXPLD_CNT2_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_RXPLD_CNT2_LSB 0
+#define EM_BLE_RXPLD_CNT2_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_RXFLUSHINSTANT_RST 0x0
+#define EM_BLE_RXPLD_CNT2_RST 0x0
+
+__INLINE void em_ble_rxisocnt2_pack(int elt_idx, uint8_t rxflushinstant, uint8_t rxpldcnt2)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxflushinstant << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)rxpldcnt2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, ((uint16_t)rxflushinstant << 8) | ((uint16_t)rxpldcnt2 << 0));
+}
+
+__INLINE void em_ble_rxisocnt2_unpack(int elt_idx, uint8_t* rxflushinstant, uint8_t* rxpldcnt2)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+
+ *rxflushinstant = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *rxpldcnt2 = (localVal & ((uint16_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_rxisocnt2_rxflushinstant_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_rxisocnt2_rxflushinstant_setf(int elt_idx, uint8_t rxflushinstant)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxflushinstant << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)rxflushinstant << 8));
+}
+
+__INLINE uint8_t em_ble_rxisocnt2_rxpld_cnt2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000007F)) >> 0);
+}
+
+__INLINE void em_ble_rxisocnt2_rxpld_cnt2_setf(int elt_idx, uint8_t rxpldcnt2)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxpldcnt2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_RXISOCNT2_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE) & ~((uint16_t)0x0000007F)) | ((uint16_t)rxpldcnt2 << 0));
+}
+
+/**
+ * @brief RXISOBUFPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 RXISOBUFPTR 0x0
+ *
+ */
+#define EM_BLE_RXISOBUFPTR_ADDR (0x00910008 + EM_BLE_RX_ISO_DESC_OFFSET)
+#define EM_BLE_RXISOBUFPTR_INDEX 0x00000004
+#define EM_BLE_RXISOBUFPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisobufptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxisobufptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RXISOBUFPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_RXISOBUFPTR_LSB 0
+#define EM_BLE_RXISOBUFPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_RXISOBUFPTR_RST 0x0
+
+__INLINE uint16_t em_ble_rxisobufptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxisobufptr_setf(int elt_idx, uint16_t rxisobufptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)rxisobufptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (uint16_t)rxisobufptr << 0);
+}
+
+/**
+ * @brief RXISORESERVED register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 RSVD 0x0
+ *
+ */
+#define EM_BLE_RXISORESERVED_ADDR (0x0091000A + EM_BLE_RX_ISO_DESC_OFFSET)
+#define EM_BLE_RXISORESERVED_INDEX 0x00000005
+#define EM_BLE_RXISORESERVED_RESET 0x00000000
+
+__INLINE uint16_t em_ble_rxisoreserved_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_RXISORESERVED_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_rxisoreserved_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_RXISORESERVED_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_RSVD_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_RSVD_LSB 0
+#define EM_BLE_RSVD_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_RSVD_RST 0x0
+
+__INLINE uint16_t em_ble_rxisoreserved_rsvd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_RXISORESERVED_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_rxisoreserved_rsvd_setf(int elt_idx, uint16_t rsvd)
+{
+ BLE_ASSERT_ERR((((uint16_t)rsvd << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_RXISORESERVED_ADDR + elt_idx * REG_EM_BLE_RX_ISO_DESC_SIZE, (uint16_t)rsvd << 0);
+}
+
+
+#endif // _REG_EM_BLE_RX_ISO_DESC_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_audio_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_audio_buf.h
new file mode 100755
index 0000000..f34b51b
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_audio_buf.h
@@ -0,0 +1,66 @@
+#ifndef _REG_EM_BLE_TX_AUDIO_BUF_H_
+#define _REG_EM_BLE_TX_AUDIO_BUF_H_
+
+#include
+#include "_reg_em_ble_tx_audio_buf.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_TX_AUDIO_BUF_COUNT 1
+
+#define REG_EM_BLE_TX_AUDIO_BUF_DECODING_MASK 0x00000000
+
+#define REG_EM_BLE_TX_AUDIO_BUF_ADDR_GET(idx) (EM_BLE_TX_AUDIO_BUFFER_OFFSET + (idx) * REG_EM_BLE_TX_AUDIO_BUF_SIZE)
+
+/**
+ * @brief TXAUDIOBUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXAUDIOBUF 0x0
+ *
+ */
+#define EM_BLE_TXAUDIOBUF_ADDR (0x00910000 + EM_BLE_TX_AUDIO_BUFFER_OFFSET)
+#define EM_BLE_TXAUDIOBUF_INDEX 0x00000000
+#define EM_BLE_TXAUDIOBUF_RESET 0x00000000
+#define EM_BLE_TXAUDIOBUF_COUNT 32
+
+__INLINE uint16_t em_ble_txaudiobuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ return EM_BLE_RD(EM_BLE_TXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_TX_AUDIO_BUF_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_txaudiobuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ EM_BLE_WR(EM_BLE_TXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_TX_AUDIO_BUF_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_TXAUDIOBUF_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXAUDIOBUF_LSB 0
+#define EM_BLE_TXAUDIOBUF_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXAUDIOBUF_RST 0x0
+
+__INLINE uint16_t em_ble_txaudiobuf_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_TX_AUDIO_BUF_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txaudiobuf_setf(int elt_idx, int reg_idx, uint16_t txaudiobuf)
+{
+ BLE_ASSERT_ERR(reg_idx <= 31);
+ BLE_ASSERT_ERR((((uint16_t)txaudiobuf << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUDIOBUF_ADDR + elt_idx * REG_EM_BLE_TX_AUDIO_BUF_SIZE + reg_idx * 2, (uint16_t)txaudiobuf << 0);
+}
+
+
+#endif // _REG_EM_BLE_TX_AUDIO_BUF_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_buf.h
new file mode 100755
index 0000000..f99726c
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_buf.h
@@ -0,0 +1,66 @@
+#ifndef _REG_EM_BLE_TX_BUF_H_
+#define _REG_EM_BLE_TX_BUF_H_
+
+#include
+#include "_reg_em_ble_tx_buf.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_TX_BUF_COUNT 1
+
+#define REG_EM_BLE_TX_BUF_DECODING_MASK 0x00000000
+
+#define REG_EM_BLE_TX_BUF_ADDR_GET(idx) (EM_BLE_TX_BUFFER_OFFSET + (idx) * REG_EM_BLE_TX_BUF_SIZE)
+
+/**
+ * @brief TXBUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXBUF 0x0
+ *
+ */
+#define EM_BLE_TXBUF_ADDR (0x00910000 + EM_BLE_TX_BUFFER_OFFSET)
+#define EM_BLE_TXBUF_INDEX 0x00000000
+#define EM_BLE_TXBUF_RESET 0x00000000
+#define EM_BLE_TXBUF_COUNT 19
+
+__INLINE uint16_t em_ble_txbuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ return EM_BLE_RD(EM_BLE_TXBUF_ADDR + elt_idx * REG_EM_BLE_TX_BUF_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_txbuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ EM_BLE_WR(EM_BLE_TXBUF_ADDR + elt_idx * REG_EM_BLE_TX_BUF_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_TXBUF_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXBUF_LSB 0
+#define EM_BLE_TXBUF_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXBUF_RST 0x0
+
+__INLINE uint16_t em_ble_txbuf_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXBUF_ADDR + elt_idx * REG_EM_BLE_TX_BUF_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txbuf_setf(int elt_idx, int reg_idx, uint16_t txbuf)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ BLE_ASSERT_ERR((((uint16_t)txbuf << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXBUF_ADDR + elt_idx * REG_EM_BLE_TX_BUF_SIZE + reg_idx * 2, (uint16_t)txbuf << 0);
+}
+
+
+#endif // _REG_EM_BLE_TX_BUF_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_buf_cntl.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_buf_cntl.h
new file mode 100755
index 0000000..7d0f432
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_buf_cntl.h
@@ -0,0 +1,66 @@
+#ifndef _REG_EM_BLE_TX_BUF_CNTL_H_
+#define _REG_EM_BLE_TX_BUF_CNTL_H_
+
+#include
+#include "_reg_em_ble_tx_buf_cntl.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_TX_BUF_CNTL_COUNT 1
+
+#define REG_EM_BLE_TX_BUF_CNTL_DECODING_MASK 0x00000000
+
+#define REG_EM_BLE_TX_BUF_CNTL_ADDR_GET(idx) (EM_BLE_TX_BUFFER_CNTL_OFFSET + (idx) * REG_EM_BLE_TX_BUF_CNTL_SIZE)
+
+/**
+ * @brief TXBUFCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXBUFCNTL 0x0
+ *
+ */
+#define EM_BLE_TXBUFCNTL_ADDR (0x00910000 + EM_BLE_TX_BUFFER_CNTL_OFFSET)
+#define EM_BLE_TXBUFCNTL_INDEX 0x00000000
+#define EM_BLE_TXBUFCNTL_RESET 0x00000000
+#define EM_BLE_TXBUFCNTL_COUNT 19
+
+__INLINE uint16_t em_ble_txbufcntl_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ return EM_BLE_RD(EM_BLE_TXBUFCNTL_ADDR + elt_idx * REG_EM_BLE_TX_BUF_CNTL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_txbufcntl_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ EM_BLE_WR(EM_BLE_TXBUFCNTL_ADDR + elt_idx * REG_EM_BLE_TX_BUF_CNTL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_TXBUFCNTL_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXBUFCNTL_LSB 0
+#define EM_BLE_TXBUFCNTL_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXBUFCNTL_RST 0x0
+
+__INLINE uint16_t em_ble_txbufcntl_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXBUFCNTL_ADDR + elt_idx * REG_EM_BLE_TX_BUF_CNTL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txbufcntl_setf(int elt_idx, int reg_idx, uint16_t txbufcntl)
+{
+ BLE_ASSERT_ERR(reg_idx <= 18);
+ BLE_ASSERT_ERR((((uint16_t)txbufcntl << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXBUFCNTL_ADDR + elt_idx * REG_EM_BLE_TX_BUF_CNTL_SIZE + reg_idx * 2, (uint16_t)txbufcntl << 0);
+}
+
+
+#endif // _REG_EM_BLE_TX_BUF_CNTL_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_desc.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_desc.h
new file mode 100755
index 0000000..2c3c192
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_desc.h
@@ -0,0 +1,974 @@
+#ifndef _REG_EM_BLE_TX_DESC_H_
+#define _REG_EM_BLE_TX_DESC_H_
+
+#include
+#include "_reg_em_ble_tx_desc.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_TX_DESC_COUNT 8
+
+#define REG_EM_BLE_TX_DESC_DECODING_MASK 0x0000000F
+
+#define REG_EM_BLE_TX_DESC_ADDR_GET(idx) (EM_BLE_TX_DESC_OFFSET + (idx) * REG_EM_BLE_TX_DESC_SIZE)
+
+/**
+ * @brief TXCNTL register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 TXDONE 0
+ * 13:00 NEXT_PTR 0x0
+ *
+ */
+#define EM_BLE_TXCNTL_ADDR (0x00910000 + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXCNTL_INDEX 0x00000000
+#define EM_BLE_TXCNTL_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txcntl_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txcntl_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXDONE_BIT ((uint16_t)0x00008000)
+#define EM_BLE_TXDONE_POS 15
+#define EM_BLE_NEXT_PTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_NEXT_PTR_LSB 0
+#define EM_BLE_NEXT_PTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_TXDONE_RST 0x0
+#define EM_BLE_NEXT_PTR_RST 0x0
+
+__INLINE void em_ble_txcntl_pack(int elt_idx, uint8_t txdone, uint16_t nextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)nextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txdone << 15) | ((uint16_t)nextptr << 0));
+}
+
+__INLINE void em_ble_txcntl_unpack(int elt_idx, uint8_t* txdone, uint16_t* nextptr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txdone = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *nextptr = (localVal & ((uint16_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txcntl_txdone_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_txcntl_txdone_setf(int elt_idx, uint8_t txdone)
+{
+ BLE_ASSERT_ERR((((uint16_t)txdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)txdone << 15));
+}
+
+__INLINE uint16_t em_ble_txcntl_next_ptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void em_ble_txcntl_next_ptr_setf(int elt_idx, uint16_t nextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)nextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXCNTL_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00003FFF)) | ((uint16_t)nextptr << 0));
+}
+
+/**
+ * @brief TXPHCE register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 TXLEN 0x0
+ * 07:06 TXACLRFU 0x0
+ * 05 TXCP 0
+ * 04 TXMD 0
+ * 03 TXSN 0
+ * 02 TXNESN 0
+ * 01:00 TXLLID 0x0
+ *
+ */
+#define EM_BLE_TXPHCE_ADDR (0x00910002 + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXPHCE_INDEX 0x00000001
+#define EM_BLE_TXPHCE_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txphce_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txphce_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXLEN_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_TXLEN_LSB 8
+#define EM_BLE_TXLEN_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_TXACLRFU_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_TXACLRFU_LSB 6
+#define EM_BLE_TXACLRFU_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_TXCP_BIT ((uint16_t)0x00000020)
+#define EM_BLE_TXCP_POS 5
+#define EM_BLE_TXMD_BIT ((uint16_t)0x00000010)
+#define EM_BLE_TXMD_POS 4
+#define EM_BLE_TXSN_BIT ((uint16_t)0x00000008)
+#define EM_BLE_TXSN_POS 3
+#define EM_BLE_TXNESN_BIT ((uint16_t)0x00000004)
+#define EM_BLE_TXNESN_POS 2
+#define EM_BLE_TXLLID_MASK ((uint16_t)0x00000003)
+#define EM_BLE_TXLLID_LSB 0
+#define EM_BLE_TXLLID_WIDTH ((uint16_t)0x00000002)
+
+#define EM_BLE_TXLEN_RST 0x0
+#define EM_BLE_TXACLRFU_RST 0x0
+#define EM_BLE_TXCP_RST 0x0
+#define EM_BLE_TXMD_RST 0x0
+#define EM_BLE_TXSN_RST 0x0
+#define EM_BLE_TXNESN_RST 0x0
+#define EM_BLE_TXLLID_RST 0x0
+
+__INLINE void em_ble_txphce_pack(int elt_idx, uint8_t txlen, uint8_t txaclrfu, uint8_t txcp, uint8_t txmd, uint8_t txsn, uint8_t txnesn, uint8_t txllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)txlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txaclrfu << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txcp << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txlen << 8) | ((uint16_t)txaclrfu << 6) | ((uint16_t)txcp << 5) | ((uint16_t)txmd << 4) | ((uint16_t)txsn << 3) | ((uint16_t)txnesn << 2) | ((uint16_t)txllid << 0));
+}
+
+__INLINE void em_ble_txphce_unpack(int elt_idx, uint8_t* txlen, uint8_t* txaclrfu, uint8_t* txcp, uint8_t* txmd, uint8_t* txsn, uint8_t* txnesn, uint8_t* txllid)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txlen = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *txaclrfu = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *txcp = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *txmd = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *txsn = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *txnesn = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *txllid = (localVal & ((uint16_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txphce_txlen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_txphce_txlen_setf(int elt_idx, uint8_t txlen)
+{
+ BLE_ASSERT_ERR((((uint16_t)txlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)txlen << 8));
+}
+
+__INLINE uint8_t em_ble_txphce_txaclrfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_txphce_txaclrfu_setf(int elt_idx, uint8_t txaclrfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)txaclrfu << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)txaclrfu << 6));
+}
+
+__INLINE uint8_t em_ble_txphce_txcp_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_txphce_txcp_setf(int elt_idx, uint8_t txcp)
+{
+ BLE_ASSERT_ERR((((uint16_t)txcp << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)txcp << 5));
+}
+
+__INLINE uint8_t em_ble_txphce_txmd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_txphce_txmd_setf(int elt_idx, uint8_t txmd)
+{
+ BLE_ASSERT_ERR((((uint16_t)txmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)txmd << 4));
+}
+
+__INLINE uint8_t em_ble_txphce_txsn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_txphce_txsn_setf(int elt_idx, uint8_t txsn)
+{
+ BLE_ASSERT_ERR((((uint16_t)txsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)txsn << 3));
+}
+
+__INLINE uint8_t em_ble_txphce_txnesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_txphce_txnesn_setf(int elt_idx, uint8_t txnesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)txnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)txnesn << 2));
+}
+
+__INLINE uint8_t em_ble_txphce_txllid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000003)) >> 0);
+}
+
+__INLINE void em_ble_txphce_txllid_setf(int elt_idx, uint8_t txllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)txllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000003)) | ((uint16_t)txllid << 0));
+}
+
+/**
+ * @brief TXPHADV register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 TXADVLEN 0x0
+ * 07 TXRXADD 0
+ * 06 TXTXADD 0
+ * 05 TXCHSEL2 0
+ * 04 TXADVRFU 0
+ * 03:00 TXTYPE 0x0
+ *
+ */
+#define EM_BLE_TXPHADV_ADDR (0x00910002 + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXPHADV_INDEX 0x00000001
+#define EM_BLE_TXPHADV_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txphadv_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txphadv_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXADVLEN_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_TXADVLEN_LSB 8
+#define EM_BLE_TXADVLEN_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_TXRXADD_BIT ((uint16_t)0x00000080)
+#define EM_BLE_TXRXADD_POS 7
+#define EM_BLE_TXTXADD_BIT ((uint16_t)0x00000040)
+#define EM_BLE_TXTXADD_POS 6
+#define EM_BLE_TXCHSEL2_BIT ((uint16_t)0x00000020)
+#define EM_BLE_TXCHSEL2_POS 5
+#define EM_BLE_TXADVRFU_BIT ((uint16_t)0x00000010)
+#define EM_BLE_TXADVRFU_POS 4
+#define EM_BLE_TXTYPE_MASK ((uint16_t)0x0000000F)
+#define EM_BLE_TXTYPE_LSB 0
+#define EM_BLE_TXTYPE_WIDTH ((uint16_t)0x00000004)
+
+#define EM_BLE_TXADVLEN_RST 0x0
+#define EM_BLE_TXRXADD_RST 0x0
+#define EM_BLE_TXTXADD_RST 0x0
+#define EM_BLE_TXCHSEL2_RST 0x0
+#define EM_BLE_TXADVRFU_RST 0x0
+#define EM_BLE_TXTYPE_RST 0x0
+
+__INLINE void em_ble_txphadv_pack(int elt_idx, uint8_t txadvlen, uint8_t txrxadd, uint8_t txtxadd, uint8_t txchsel2, uint8_t txadvrfu, uint8_t txtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)txadvlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txrxadd << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txtxadd << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txchsel2 << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txadvrfu << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txtype << 0) & ~((uint16_t)0x0000000F)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txadvlen << 8) | ((uint16_t)txrxadd << 7) | ((uint16_t)txtxadd << 6) | ((uint16_t)txchsel2 << 5) | ((uint16_t)txadvrfu << 4) | ((uint16_t)txtype << 0));
+}
+
+__INLINE void em_ble_txphadv_unpack(int elt_idx, uint8_t* txadvlen, uint8_t* txrxadd, uint8_t* txtxadd, uint8_t* txchsel2, uint8_t* txadvrfu, uint8_t* txtype)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txadvlen = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *txrxadd = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *txtxadd = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *txchsel2 = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *txadvrfu = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *txtype = (localVal & ((uint16_t)0x0000000F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txphadv_txadvlen_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_txphadv_txadvlen_setf(int elt_idx, uint8_t txadvlen)
+{
+ BLE_ASSERT_ERR((((uint16_t)txadvlen << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)txadvlen << 8));
+}
+
+__INLINE uint8_t em_ble_txphadv_txrxadd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_txphadv_txrxadd_setf(int elt_idx, uint8_t txrxadd)
+{
+ BLE_ASSERT_ERR((((uint16_t)txrxadd << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)txrxadd << 7));
+}
+
+__INLINE uint8_t em_ble_txphadv_txtxadd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_txphadv_txtxadd_setf(int elt_idx, uint8_t txtxadd)
+{
+ BLE_ASSERT_ERR((((uint16_t)txtxadd << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)txtxadd << 6));
+}
+
+__INLINE uint8_t em_ble_txphadv_txchsel2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_txphadv_txchsel2_setf(int elt_idx, uint8_t txchsel2)
+{
+ BLE_ASSERT_ERR((((uint16_t)txchsel2 << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)txchsel2 << 5));
+}
+
+__INLINE uint8_t em_ble_txphadv_txadvrfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_txphadv_txadvrfu_setf(int elt_idx, uint8_t txadvrfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)txadvrfu << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)txadvrfu << 4));
+}
+
+__INLINE uint8_t em_ble_txphadv_txtype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000000F)) >> 0);
+}
+
+__INLINE void em_ble_txphadv_txtype_setf(int elt_idx, uint8_t txtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)txtype << 0) & ~((uint16_t)0x0000000F)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHADV_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000000F)) | ((uint16_t)txtype << 0));
+}
+
+/**
+ * @brief TXDATAPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXDATAPTR 0x0
+ *
+ */
+#define EM_BLE_TXDATAPTR_ADDR (0x00910004 + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXDATAPTR_INDEX 0x00000002
+#define EM_BLE_TXDATAPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txdataptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txdataptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXDATAPTR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXDATAPTR_LSB 0
+#define EM_BLE_TXDATAPTR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXDATAPTR_RST 0x0
+
+__INLINE uint16_t em_ble_txdataptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txdataptr_setf(int elt_idx, uint16_t txdataptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txdataptr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (uint16_t)txdataptr << 0);
+}
+
+/**
+ * @brief TXAEHEADER register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 TXRSVD 0
+ * 14 TXPOW 0
+ * 13 TXSYNC 0
+ * 12 TXAUXPTR 0
+ * 11 TXADI 0
+ * 10 TXSUPP 0
+ * 09 TXTGTA 0
+ * 08 TXADVA 0
+ * 07:06 TXAEMODE 0x0
+ * 05:00 TXAELENGTH 0x0
+ *
+ */
+#define EM_BLE_TXAEHEADER_ADDR (0x00910006 + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXAEHEADER_INDEX 0x00000003
+#define EM_BLE_TXAEHEADER_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txaeheader_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txaeheader_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXRSVD_BIT ((uint16_t)0x00008000)
+#define EM_BLE_TXRSVD_POS 15
+#define EM_BLE_TXPOW_BIT ((uint16_t)0x00004000)
+#define EM_BLE_TXPOW_POS 14
+#define EM_BLE_TXSYNC_BIT ((uint16_t)0x00002000)
+#define EM_BLE_TXSYNC_POS 13
+#define EM_BLE_TXAUXPTR_BIT ((uint16_t)0x00001000)
+#define EM_BLE_TXAUXPTR_POS 12
+#define EM_BLE_TXADI_BIT ((uint16_t)0x00000800)
+#define EM_BLE_TXADI_POS 11
+#define EM_BLE_TXSUPP_BIT ((uint16_t)0x00000400)
+#define EM_BLE_TXSUPP_POS 10
+#define EM_BLE_TXTGTA_BIT ((uint16_t)0x00000200)
+#define EM_BLE_TXTGTA_POS 9
+#define EM_BLE_TXADVA_BIT ((uint16_t)0x00000100)
+#define EM_BLE_TXADVA_POS 8
+#define EM_BLE_TXAEMODE_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_TXAEMODE_LSB 6
+#define EM_BLE_TXAEMODE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_TXAELENGTH_MASK ((uint16_t)0x0000003F)
+#define EM_BLE_TXAELENGTH_LSB 0
+#define EM_BLE_TXAELENGTH_WIDTH ((uint16_t)0x00000006)
+
+#define EM_BLE_TXRSVD_RST 0x0
+#define EM_BLE_TXPOW_RST 0x0
+#define EM_BLE_TXSYNC_RST 0x0
+#define EM_BLE_TXAUXPTR_RST 0x0
+#define EM_BLE_TXADI_RST 0x0
+#define EM_BLE_TXSUPP_RST 0x0
+#define EM_BLE_TXTGTA_RST 0x0
+#define EM_BLE_TXADVA_RST 0x0
+#define EM_BLE_TXAEMODE_RST 0x0
+#define EM_BLE_TXAELENGTH_RST 0x0
+
+__INLINE void em_ble_txaeheader_pack(int elt_idx, uint8_t txrsvd, uint8_t txpow, uint8_t txsync, uint8_t txauxptr, uint8_t txadi, uint8_t txsupp, uint8_t txtgta, uint8_t txadva, uint8_t txaemode, uint8_t txaelength)
+{
+ BLE_ASSERT_ERR((((uint16_t)txrsvd << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txpow << 14) & ~((uint16_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txsync << 13) & ~((uint16_t)0x00002000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txauxptr << 12) & ~((uint16_t)0x00001000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txadi << 11) & ~((uint16_t)0x00000800)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txsupp << 10) & ~((uint16_t)0x00000400)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txtgta << 9) & ~((uint16_t)0x00000200)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txadva << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txaemode << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txaelength << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txrsvd << 15) | ((uint16_t)txpow << 14) | ((uint16_t)txsync << 13) | ((uint16_t)txauxptr << 12) | ((uint16_t)txadi << 11) | ((uint16_t)txsupp << 10) | ((uint16_t)txtgta << 9) | ((uint16_t)txadva << 8) | ((uint16_t)txaemode << 6) | ((uint16_t)txaelength << 0));
+}
+
+__INLINE void em_ble_txaeheader_unpack(int elt_idx, uint8_t* txrsvd, uint8_t* txpow, uint8_t* txsync, uint8_t* txauxptr, uint8_t* txadi, uint8_t* txsupp, uint8_t* txtgta, uint8_t* txadva, uint8_t* txaemode, uint8_t* txaelength)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txrsvd = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *txpow = (localVal & ((uint16_t)0x00004000)) >> 14;
+ *txsync = (localVal & ((uint16_t)0x00002000)) >> 13;
+ *txauxptr = (localVal & ((uint16_t)0x00001000)) >> 12;
+ *txadi = (localVal & ((uint16_t)0x00000800)) >> 11;
+ *txsupp = (localVal & ((uint16_t)0x00000400)) >> 10;
+ *txtgta = (localVal & ((uint16_t)0x00000200)) >> 9;
+ *txadva = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *txaemode = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *txaelength = (localVal & ((uint16_t)0x0000003F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txaeheader_txrsvd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_txaeheader_txrsvd_setf(int elt_idx, uint8_t txrsvd)
+{
+ BLE_ASSERT_ERR((((uint16_t)txrsvd << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)txrsvd << 15));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txpow_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00004000)) >> 14);
+}
+
+__INLINE void em_ble_txaeheader_txpow_setf(int elt_idx, uint8_t txpow)
+{
+ BLE_ASSERT_ERR((((uint16_t)txpow << 14) & ~((uint16_t)0x00004000)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00004000)) | ((uint16_t)txpow << 14));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txsync_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00002000)) >> 13);
+}
+
+__INLINE void em_ble_txaeheader_txsync_setf(int elt_idx, uint8_t txsync)
+{
+ BLE_ASSERT_ERR((((uint16_t)txsync << 13) & ~((uint16_t)0x00002000)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00002000)) | ((uint16_t)txsync << 13));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txauxptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00001000)) >> 12);
+}
+
+__INLINE void em_ble_txaeheader_txauxptr_setf(int elt_idx, uint8_t txauxptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxptr << 12) & ~((uint16_t)0x00001000)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00001000)) | ((uint16_t)txauxptr << 12));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txadi_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000800)) >> 11);
+}
+
+__INLINE void em_ble_txaeheader_txadi_setf(int elt_idx, uint8_t txadi)
+{
+ BLE_ASSERT_ERR((((uint16_t)txadi << 11) & ~((uint16_t)0x00000800)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000800)) | ((uint16_t)txadi << 11));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txsupp_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000400)) >> 10);
+}
+
+__INLINE void em_ble_txaeheader_txsupp_setf(int elt_idx, uint8_t txsupp)
+{
+ BLE_ASSERT_ERR((((uint16_t)txsupp << 10) & ~((uint16_t)0x00000400)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000400)) | ((uint16_t)txsupp << 10));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txtgta_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000200)) >> 9);
+}
+
+__INLINE void em_ble_txaeheader_txtgta_setf(int elt_idx, uint8_t txtgta)
+{
+ BLE_ASSERT_ERR((((uint16_t)txtgta << 9) & ~((uint16_t)0x00000200)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000200)) | ((uint16_t)txtgta << 9));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txadva_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_txaeheader_txadva_setf(int elt_idx, uint8_t txadva)
+{
+ BLE_ASSERT_ERR((((uint16_t)txadva << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)txadva << 8));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txaemode_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_txaeheader_txaemode_setf(int elt_idx, uint8_t txaemode)
+{
+ BLE_ASSERT_ERR((((uint16_t)txaemode << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)txaemode << 6));
+}
+
+__INLINE uint8_t em_ble_txaeheader_txaelength_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000003F)) >> 0);
+}
+
+__INLINE void em_ble_txaeheader_txaelength_setf(int elt_idx, uint8_t txaelength)
+{
+ BLE_ASSERT_ERR((((uint16_t)txaelength << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAEHEADER_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000003F)) | ((uint16_t)txaelength << 0));
+}
+
+/**
+ * @brief TXAUXPTR0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 TXAUXOFFSET_LSB 0x0
+ * 07 TXAUXOFFSET_UNIT 0
+ * 06 TXAUX_CA 0
+ * 05:00 TX_LL_CH 0x0
+ *
+ */
+#define EM_BLE_TXAUXPTR0_ADDR (0x00910008 + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXAUXPTR0_INDEX 0x00000004
+#define EM_BLE_TXAUXPTR0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txauxptr0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txauxptr0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXAUXOFFSET_LSB_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_TXAUXOFFSET_LSB_LSB 8
+#define EM_BLE_TXAUXOFFSET_LSB_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_TXAUXOFFSET_UNIT_BIT ((uint16_t)0x00000080)
+#define EM_BLE_TXAUXOFFSET_UNIT_POS 7
+#define EM_BLE_TXAUX_CA_BIT ((uint16_t)0x00000040)
+#define EM_BLE_TXAUX_CA_POS 6
+#define EM_BLE_TX_LL_CH_MASK ((uint16_t)0x0000003F)
+#define EM_BLE_TX_LL_CH_LSB 0
+#define EM_BLE_TX_LL_CH_WIDTH ((uint16_t)0x00000006)
+
+#define EM_BLE_TXAUXOFFSET_LSB_RST 0x0
+#define EM_BLE_TXAUXOFFSET_UNIT_RST 0x0
+#define EM_BLE_TXAUX_CA_RST 0x0
+#define EM_BLE_TX_LL_CH_RST 0x0
+
+__INLINE void em_ble_txauxptr0_pack(int elt_idx, uint8_t txauxoffsetlsb, uint8_t txauxoffsetunit, uint8_t txauxca, uint8_t txllch)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxoffsetlsb << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txauxoffsetunit << 7) & ~((uint16_t)0x00000080)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txauxca << 6) & ~((uint16_t)0x00000040)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txllch << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txauxoffsetlsb << 8) | ((uint16_t)txauxoffsetunit << 7) | ((uint16_t)txauxca << 6) | ((uint16_t)txllch << 0));
+}
+
+__INLINE void em_ble_txauxptr0_unpack(int elt_idx, uint8_t* txauxoffsetlsb, uint8_t* txauxoffsetunit, uint8_t* txauxca, uint8_t* txllch)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txauxoffsetlsb = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *txauxoffsetunit = (localVal & ((uint16_t)0x00000080)) >> 7;
+ *txauxca = (localVal & ((uint16_t)0x00000040)) >> 6;
+ *txllch = (localVal & ((uint16_t)0x0000003F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txauxptr0_txauxoffset_lsb_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_txauxptr0_txauxoffset_lsb_setf(int elt_idx, uint8_t txauxoffsetlsb)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxoffsetlsb << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)txauxoffsetlsb << 8));
+}
+
+__INLINE uint8_t em_ble_txauxptr0_txauxoffset_unit_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000080)) >> 7);
+}
+
+__INLINE void em_ble_txauxptr0_txauxoffset_unit_setf(int elt_idx, uint8_t txauxoffsetunit)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxoffsetunit << 7) & ~((uint16_t)0x00000080)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000080)) | ((uint16_t)txauxoffsetunit << 7));
+}
+
+__INLINE uint8_t em_ble_txauxptr0_txaux_ca_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000040)) >> 6);
+}
+
+__INLINE void em_ble_txauxptr0_txaux_ca_setf(int elt_idx, uint8_t txauxca)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxca << 6) & ~((uint16_t)0x00000040)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000040)) | ((uint16_t)txauxca << 6));
+}
+
+__INLINE uint8_t em_ble_txauxptr0_tx_ll_ch_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000003F)) >> 0);
+}
+
+__INLINE void em_ble_txauxptr0_tx_ll_ch_setf(int elt_idx, uint8_t txllch)
+{
+ BLE_ASSERT_ERR((((uint16_t)txllch << 0) & ~((uint16_t)0x0000003F)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAUXPTR0_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000003F)) | ((uint16_t)txllch << 0));
+}
+
+/**
+ * @brief TXAUXPTR1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 07:05 TXAUX_PHY 0x0
+ * 04:00 TXAUXOFFSET_MSB 0x0
+ *
+ */
+#define EM_BLE_TXAUXPTR1_ADDR (0x0091000A + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXAUXPTR1_INDEX 0x00000005
+#define EM_BLE_TXAUXPTR1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txauxptr1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txauxptr1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXAUX_PHY_MASK ((uint16_t)0x000000E0)
+#define EM_BLE_TXAUX_PHY_LSB 5
+#define EM_BLE_TXAUX_PHY_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_TXAUXOFFSET_MSB_MASK ((uint16_t)0x0000001F)
+#define EM_BLE_TXAUXOFFSET_MSB_LSB 0
+#define EM_BLE_TXAUXOFFSET_MSB_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_TXAUX_PHY_RST 0x0
+#define EM_BLE_TXAUXOFFSET_MSB_RST 0x0
+
+__INLINE void em_ble_txauxptr1_pack(int elt_idx, uint8_t txauxphy, uint8_t txauxoffsetmsb)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxphy << 5) & ~((uint16_t)0x000000E0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txauxoffsetmsb << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txauxphy << 5) | ((uint16_t)txauxoffsetmsb << 0));
+}
+
+__INLINE void em_ble_txauxptr1_unpack(int elt_idx, uint8_t* txauxphy, uint8_t* txauxoffsetmsb)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txauxphy = (localVal & ((uint16_t)0x000000E0)) >> 5;
+ *txauxoffsetmsb = (localVal & ((uint16_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txauxptr1_txaux_phy_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000E0)) >> 5);
+}
+
+__INLINE void em_ble_txauxptr1_txaux_phy_setf(int elt_idx, uint8_t txauxphy)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxphy << 5) & ~((uint16_t)0x000000E0)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x000000E0)) | ((uint16_t)txauxphy << 5));
+}
+
+__INLINE uint8_t em_ble_txauxptr1_txauxoffset_msb_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000001F)) >> 0);
+}
+
+__INLINE void em_ble_txauxptr1_txauxoffset_msb_setf(int elt_idx, uint8_t txauxoffsetmsb)
+{
+ BLE_ASSERT_ERR((((uint16_t)txauxoffsetmsb << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXAUXPTR1_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000001F)) | ((uint16_t)txauxoffsetmsb << 0));
+}
+
+/**
+ * @brief TXAEDATAPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXAEDATAPTR 0x0
+ *
+ */
+#define EM_BLE_TXAEDATAPTR_ADDR (0x0091000C + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXAEDATAPTR_INDEX 0x00000006
+#define EM_BLE_TXAEDATAPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txaedataptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXAEDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txaedataptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXAEDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXAEDATAPTR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXAEDATAPTR_LSB 0
+#define EM_BLE_TXAEDATAPTR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXAEDATAPTR_RST 0x0
+
+__INLINE uint16_t em_ble_txaedataptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXAEDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txaedataptr_setf(int elt_idx, uint16_t txaedataptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txaedataptr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXAEDATAPTR_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (uint16_t)txaedataptr << 0);
+}
+
+/**
+ * @brief TXPHCTE register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 07:06 TXCTETYPE 0x0
+ * 05 TXCTERFU 0
+ * 04:00 TXCTETIME 0x0
+ *
+ */
+#define EM_BLE_TXPHCTE_ADDR (0x0091000E + EM_BLE_TX_DESC_OFFSET)
+#define EM_BLE_TXPHCTE_INDEX 0x00000007
+#define EM_BLE_TXPHCTE_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txphcte_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+}
+
+__INLINE void em_ble_txphcte_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXCTETYPE_MASK ((uint16_t)0x000000C0)
+#define EM_BLE_TXCTETYPE_LSB 6
+#define EM_BLE_TXCTETYPE_WIDTH ((uint16_t)0x00000002)
+#define EM_BLE_TXCTERFU_BIT ((uint16_t)0x00000020)
+#define EM_BLE_TXCTERFU_POS 5
+#define EM_BLE_TXCTETIME_MASK ((uint16_t)0x0000001F)
+#define EM_BLE_TXCTETIME_LSB 0
+#define EM_BLE_TXCTETIME_WIDTH ((uint16_t)0x00000005)
+
+#define EM_BLE_TXCTETYPE_RST 0x0
+#define EM_BLE_TXCTERFU_RST 0x0
+#define EM_BLE_TXCTETIME_RST 0x0
+
+__INLINE void em_ble_txphcte_pack(int elt_idx, uint8_t txctetype, uint8_t txcterfu, uint8_t txctetime)
+{
+ BLE_ASSERT_ERR((((uint16_t)txctetype << 6) & ~((uint16_t)0x000000C0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txcterfu << 5) & ~((uint16_t)0x00000020)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txctetime << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, ((uint16_t)txctetype << 6) | ((uint16_t)txcterfu << 5) | ((uint16_t)txctetime << 0));
+}
+
+__INLINE void em_ble_txphcte_unpack(int elt_idx, uint8_t* txctetype, uint8_t* txcterfu, uint8_t* txctetime)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+
+ *txctetype = (localVal & ((uint16_t)0x000000C0)) >> 6;
+ *txcterfu = (localVal & ((uint16_t)0x00000020)) >> 5;
+ *txctetime = (localVal & ((uint16_t)0x0000001F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txphcte_txctetype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000C0)) >> 6);
+}
+
+__INLINE void em_ble_txphcte_txctetype_setf(int elt_idx, uint8_t txctetype)
+{
+ BLE_ASSERT_ERR((((uint16_t)txctetype << 6) & ~((uint16_t)0x000000C0)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x000000C0)) | ((uint16_t)txctetype << 6));
+}
+
+__INLINE uint8_t em_ble_txphcte_txcterfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000020)) >> 5);
+}
+
+__INLINE void em_ble_txphcte_txcterfu_setf(int elt_idx, uint8_t txcterfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)txcterfu << 5) & ~((uint16_t)0x00000020)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x00000020)) | ((uint16_t)txcterfu << 5));
+}
+
+__INLINE uint8_t em_ble_txphcte_txctetime_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000001F)) >> 0);
+}
+
+__INLINE void em_ble_txphcte_txctetime_setf(int elt_idx, uint8_t txctetime)
+{
+ BLE_ASSERT_ERR((((uint16_t)txctetime << 0) & ~((uint16_t)0x0000001F)) == 0);
+ EM_BLE_WR(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXPHCTE_ADDR + elt_idx * REG_EM_BLE_TX_DESC_SIZE) & ~((uint16_t)0x0000001F)) | ((uint16_t)txctetime << 0));
+}
+
+
+#endif // _REG_EM_BLE_TX_DESC_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_iso_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_iso_buf.h
new file mode 100755
index 0000000..96cdac0
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_iso_buf.h
@@ -0,0 +1,138 @@
+#ifndef _REG_EM_BLE_TX_ISO_BUF_H_
+#define _REG_EM_BLE_TX_ISO_BUF_H_
+
+#include
+#include "_reg_em_ble_tx_iso_buf.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_TX_ISO_BUF_COUNT 2
+
+#define REG_EM_BLE_TX_ISO_BUF_DECODING_MASK 0x00000003
+
+#define REG_EM_BLE_TX_ISO_BUF_ADDR_GET(idx) (EM_BLE_TX_ISO_BUF_OFFSET + (idx) * REG_EM_BLE_TX_ISO_BUF_SIZE)
+
+/**
+ * @brief TXISOBUFSETUP register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 08 TXISOMUTE 0
+ * 07:00 TXISOLENGTH 0x0
+ *
+ */
+#define EM_BLE_TXISOBUFSETUP_ADDR (0x00910000 + EM_BLE_TX_ISO_BUF_OFFSET)
+#define EM_BLE_TXISOBUFSETUP_INDEX 0x00000000
+#define EM_BLE_TXISOBUFSETUP_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisobufsetup_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE);
+}
+
+__INLINE void em_ble_txisobufsetup_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXISOMUTE_BIT ((uint16_t)0x00000100)
+#define EM_BLE_TXISOMUTE_POS 8
+#define EM_BLE_TXISOLENGTH_MASK ((uint16_t)0x000000FF)
+#define EM_BLE_TXISOLENGTH_LSB 0
+#define EM_BLE_TXISOLENGTH_WIDTH ((uint16_t)0x00000008)
+
+#define EM_BLE_TXISOMUTE_RST 0x0
+#define EM_BLE_TXISOLENGTH_RST 0x0
+
+__INLINE void em_ble_txisobufsetup_pack(int elt_idx, uint8_t txisomute, uint8_t txisolength)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisomute << 8) & ~((uint16_t)0x00000100)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txisolength << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE, ((uint16_t)txisomute << 8) | ((uint16_t)txisolength << 0));
+}
+
+__INLINE void em_ble_txisobufsetup_unpack(int elt_idx, uint8_t* txisomute, uint8_t* txisolength)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE);
+
+ *txisomute = (localVal & ((uint16_t)0x00000100)) >> 8;
+ *txisolength = (localVal & ((uint16_t)0x000000FF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txisobufsetup_txisomute_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x00000100)) >> 8);
+}
+
+__INLINE void em_ble_txisobufsetup_txisomute_setf(int elt_idx, uint8_t txisomute)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisomute << 8) & ~((uint16_t)0x00000100)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE) & ~((uint16_t)0x00000100)) | ((uint16_t)txisomute << 8));
+}
+
+__INLINE uint8_t em_ble_txisobufsetup_txisolength_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE);
+ return ((localVal & ((uint16_t)0x000000FF)) >> 0);
+}
+
+__INLINE void em_ble_txisobufsetup_txisolength_setf(int elt_idx, uint8_t txisolength)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisolength << 0) & ~((uint16_t)0x000000FF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE, (EM_BLE_RD(EM_BLE_TXISOBUFSETUP_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE) & ~((uint16_t)0x000000FF)) | ((uint16_t)txisolength << 0));
+}
+
+/**
+ * @brief TXISODATABUF register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXISODATABUF 0x0
+ *
+ */
+#define EM_BLE_TXISODATABUF_ADDR (0x00910002 + EM_BLE_TX_ISO_BUF_OFFSET)
+#define EM_BLE_TXISODATABUF_INDEX 0x00000001
+#define EM_BLE_TXISODATABUF_RESET 0x00000000
+#define EM_BLE_TXISODATABUF_COUNT 33
+
+__INLINE uint16_t em_ble_txisodatabuf_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 32);
+ return EM_BLE_RD(EM_BLE_TXISODATABUF_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_txisodatabuf_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 32);
+ EM_BLE_WR(EM_BLE_TXISODATABUF_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_TXISODATABUF_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXISODATABUF_LSB 0
+#define EM_BLE_TXISODATABUF_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXISODATABUF_RST 0x0
+
+__INLINE uint16_t em_ble_txisodatabuf_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 32);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISODATABUF_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txisodatabuf_setf(int elt_idx, int reg_idx, uint16_t txisodatabuf)
+{
+ BLE_ASSERT_ERR(reg_idx <= 32);
+ BLE_ASSERT_ERR((((uint16_t)txisodatabuf << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISODATABUF_ADDR + elt_idx * REG_EM_BLE_TX_ISO_BUF_SIZE + reg_idx * 2, (uint16_t)txisodatabuf << 0);
+}
+
+
+#endif // _REG_EM_BLE_TX_ISO_BUF_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_iso_desc.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_iso_desc.h
new file mode 100755
index 0000000..4191610
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_tx_iso_desc.h
@@ -0,0 +1,417 @@
+#ifndef _REG_EM_BLE_TX_ISO_DESC_H_
+#define _REG_EM_BLE_TX_ISO_DESC_H_
+
+#include
+#include "_reg_em_ble_tx_iso_desc.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_TX_ISO_DESC_COUNT 6
+
+#define REG_EM_BLE_TX_ISO_DESC_DECODING_MASK 0x0000000F
+
+#define REG_EM_BLE_TX_ISO_DESC_ADDR_GET(idx) (EM_BLE_TX_ISO_DESC_OFFSET + (idx) * REG_EM_BLE_TX_ISO_DESC_SIZE)
+
+/**
+ * @brief TXISOPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 TXDONE 0
+ * 13:00 NEXT_PTR 0x0
+ *
+ */
+#define EM_BLE_TXISOPTR_ADDR (0x00910000 + EM_BLE_TX_ISO_DESC_OFFSET)
+#define EM_BLE_TXISOPTR_INDEX 0x00000000
+#define EM_BLE_TXISOPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisoptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_txisoptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXDONE_BIT ((uint16_t)0x00008000)
+#define EM_BLE_TXDONE_POS 15
+#define EM_BLE_NEXT_PTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_NEXT_PTR_LSB 0
+#define EM_BLE_NEXT_PTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_TXDONE_RST 0x0
+#define EM_BLE_NEXT_PTR_RST 0x0
+
+__INLINE void em_ble_txisoptr_pack(int elt_idx, uint8_t txdone, uint16_t nextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)nextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, ((uint16_t)txdone << 15) | ((uint16_t)nextptr << 0));
+}
+
+__INLINE void em_ble_txisoptr_unpack(int elt_idx, uint8_t* txdone, uint16_t* nextptr)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+
+ *txdone = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *nextptr = (localVal & ((uint16_t)0x00003FFF)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txisoptr_txdone_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_txisoptr_txdone_setf(int elt_idx, uint8_t txdone)
+{
+ BLE_ASSERT_ERR((((uint16_t)txdone << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)txdone << 15));
+}
+
+__INLINE uint16_t em_ble_txisoptr_next_ptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00003FFF)) >> 0);
+}
+
+__INLINE void em_ble_txisoptr_next_ptr_setf(int elt_idx, uint16_t nextptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)nextptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x00003FFF)) | ((uint16_t)nextptr << 0));
+}
+
+/**
+ * @brief TXISOCNT0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXPLD_CNT0 0x0
+ *
+ */
+#define EM_BLE_TXISOCNT0_ADDR (0x00910002 + EM_BLE_TX_ISO_DESC_OFFSET)
+#define EM_BLE_TXISOCNT0_INDEX 0x00000001
+#define EM_BLE_TXISOCNT0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisocnt0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOCNT0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_txisocnt0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOCNT0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXPLD_CNT0_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXPLD_CNT0_LSB 0
+#define EM_BLE_TXPLD_CNT0_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXPLD_CNT0_RST 0x0
+
+__INLINE uint16_t em_ble_txisocnt0_txpld_cnt0_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOCNT0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txisocnt0_txpld_cnt0_setf(int elt_idx, uint16_t txpldcnt0)
+{
+ BLE_ASSERT_ERR((((uint16_t)txpldcnt0 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOCNT0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (uint16_t)txpldcnt0 << 0);
+}
+
+/**
+ * @brief TXISOCNT1 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 TXPLD_CNT1 0x0
+ *
+ */
+#define EM_BLE_TXISOCNT1_ADDR (0x00910004 + EM_BLE_TX_ISO_DESC_OFFSET)
+#define EM_BLE_TXISOCNT1_INDEX 0x00000002
+#define EM_BLE_TXISOCNT1_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisocnt1_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOCNT1_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_txisocnt1_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOCNT1_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXPLD_CNT1_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_TXPLD_CNT1_LSB 0
+#define EM_BLE_TXPLD_CNT1_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_TXPLD_CNT1_RST 0x0
+
+__INLINE uint16_t em_ble_txisocnt1_txpld_cnt1_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOCNT1_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txisocnt1_txpld_cnt1_setf(int elt_idx, uint16_t txpldcnt1)
+{
+ BLE_ASSERT_ERR((((uint16_t)txpldcnt1 << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOCNT1_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (uint16_t)txpldcnt1 << 0);
+}
+
+/**
+ * @brief TXISOCNT2 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:08 TXFLUSHINSTANT 0x0
+ * 06:00 TXISOCNT2 0x0
+ *
+ */
+#define EM_BLE_TXISOCNT2_ADDR (0x00910006 + EM_BLE_TX_ISO_DESC_OFFSET)
+#define EM_BLE_TXISOCNT2_INDEX 0x00000003
+#define EM_BLE_TXISOCNT2_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisocnt2_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_txisocnt2_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXFLUSHINSTANT_MASK ((uint16_t)0x0000FF00)
+#define EM_BLE_TXFLUSHINSTANT_LSB 8
+#define EM_BLE_TXFLUSHINSTANT_WIDTH ((uint16_t)0x00000008)
+#define EM_BLE_TXISOCNT2_MASK ((uint16_t)0x0000007F)
+#define EM_BLE_TXISOCNT2_LSB 0
+#define EM_BLE_TXISOCNT2_WIDTH ((uint16_t)0x00000007)
+
+#define EM_BLE_TXFLUSHINSTANT_RST 0x0
+#define EM_BLE_TXISOCNT2_RST 0x0
+
+__INLINE void em_ble_txisocnt2_pack(int elt_idx, uint8_t txflushinstant, uint8_t txisocnt2)
+{
+ BLE_ASSERT_ERR((((uint16_t)txflushinstant << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txisocnt2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, ((uint16_t)txflushinstant << 8) | ((uint16_t)txisocnt2 << 0));
+}
+
+__INLINE void em_ble_txisocnt2_unpack(int elt_idx, uint8_t* txflushinstant, uint8_t* txisocnt2)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+
+ *txflushinstant = (localVal & ((uint16_t)0x0000FF00)) >> 8;
+ *txisocnt2 = (localVal & ((uint16_t)0x0000007F)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txisocnt2_txflushinstant_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000FF00)) >> 8);
+}
+
+__INLINE void em_ble_txisocnt2_txflushinstant_setf(int elt_idx, uint8_t txflushinstant)
+{
+ BLE_ASSERT_ERR((((uint16_t)txflushinstant << 8) & ~((uint16_t)0x0000FF00)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x0000FF00)) | ((uint16_t)txflushinstant << 8));
+}
+
+__INLINE uint8_t em_ble_txisocnt2_txisocnt2_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x0000007F)) >> 0);
+}
+
+__INLINE void em_ble_txisocnt2_txisocnt2_setf(int elt_idx, uint8_t txisocnt2)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisocnt2 << 0) & ~((uint16_t)0x0000007F)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOCNT2_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x0000007F)) | ((uint16_t)txisocnt2 << 0));
+}
+
+/**
+ * @brief TXISOPHM0 register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 07:05 TXISOM0RFU 0x0
+ * 04 TXMD 0
+ * 03 TXSN 0
+ * 02 TXNESN 0
+ * 01:00 TXLLID 0x0
+ *
+ */
+#define EM_BLE_TXISOPHM0_ADDR (0x00910008 + EM_BLE_TX_ISO_DESC_OFFSET)
+#define EM_BLE_TXISOPHM0_INDEX 0x00000004
+#define EM_BLE_TXISOPHM0_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisophm0_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_txisophm0_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXISOM0RFU_MASK ((uint16_t)0x000000E0)
+#define EM_BLE_TXISOM0RFU_LSB 5
+#define EM_BLE_TXISOM0RFU_WIDTH ((uint16_t)0x00000003)
+#define EM_BLE_TXMD_BIT ((uint16_t)0x00000010)
+#define EM_BLE_TXMD_POS 4
+#define EM_BLE_TXSN_BIT ((uint16_t)0x00000008)
+#define EM_BLE_TXSN_POS 3
+#define EM_BLE_TXNESN_BIT ((uint16_t)0x00000004)
+#define EM_BLE_TXNESN_POS 2
+#define EM_BLE_TXLLID_MASK ((uint16_t)0x00000003)
+#define EM_BLE_TXLLID_LSB 0
+#define EM_BLE_TXLLID_WIDTH ((uint16_t)0x00000002)
+
+#define EM_BLE_TXISOM0RFU_RST 0x0
+#define EM_BLE_TXMD_RST 0x0
+#define EM_BLE_TXSN_RST 0x0
+#define EM_BLE_TXNESN_RST 0x0
+#define EM_BLE_TXLLID_RST 0x0
+
+__INLINE void em_ble_txisophm0_pack(int elt_idx, uint8_t txisom0rfu, uint8_t txmd, uint8_t txsn, uint8_t txnesn, uint8_t txllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisom0rfu << 5) & ~((uint16_t)0x000000E0)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)txllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, ((uint16_t)txisom0rfu << 5) | ((uint16_t)txmd << 4) | ((uint16_t)txsn << 3) | ((uint16_t)txnesn << 2) | ((uint16_t)txllid << 0));
+}
+
+__INLINE void em_ble_txisophm0_unpack(int elt_idx, uint8_t* txisom0rfu, uint8_t* txmd, uint8_t* txsn, uint8_t* txnesn, uint8_t* txllid)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+
+ *txisom0rfu = (localVal & ((uint16_t)0x000000E0)) >> 5;
+ *txmd = (localVal & ((uint16_t)0x00000010)) >> 4;
+ *txsn = (localVal & ((uint16_t)0x00000008)) >> 3;
+ *txnesn = (localVal & ((uint16_t)0x00000004)) >> 2;
+ *txllid = (localVal & ((uint16_t)0x00000003)) >> 0;
+}
+
+__INLINE uint8_t em_ble_txisophm0_txisom0rfu_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x000000E0)) >> 5);
+}
+
+__INLINE void em_ble_txisophm0_txisom0rfu_setf(int elt_idx, uint8_t txisom0rfu)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisom0rfu << 5) & ~((uint16_t)0x000000E0)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x000000E0)) | ((uint16_t)txisom0rfu << 5));
+}
+
+__INLINE uint8_t em_ble_txisophm0_txmd_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000010)) >> 4);
+}
+
+__INLINE void em_ble_txisophm0_txmd_setf(int elt_idx, uint8_t txmd)
+{
+ BLE_ASSERT_ERR((((uint16_t)txmd << 4) & ~((uint16_t)0x00000010)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x00000010)) | ((uint16_t)txmd << 4));
+}
+
+__INLINE uint8_t em_ble_txisophm0_txsn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000008)) >> 3);
+}
+
+__INLINE void em_ble_txisophm0_txsn_setf(int elt_idx, uint8_t txsn)
+{
+ BLE_ASSERT_ERR((((uint16_t)txsn << 3) & ~((uint16_t)0x00000008)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x00000008)) | ((uint16_t)txsn << 3));
+}
+
+__INLINE uint8_t em_ble_txisophm0_txnesn_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000004)) >> 2);
+}
+
+__INLINE void em_ble_txisophm0_txnesn_setf(int elt_idx, uint8_t txnesn)
+{
+ BLE_ASSERT_ERR((((uint16_t)txnesn << 2) & ~((uint16_t)0x00000004)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x00000004)) | ((uint16_t)txnesn << 2));
+}
+
+__INLINE uint8_t em_ble_txisophm0_txllid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ return ((localVal & ((uint16_t)0x00000003)) >> 0);
+}
+
+__INLINE void em_ble_txisophm0_txllid_setf(int elt_idx, uint8_t txllid)
+{
+ BLE_ASSERT_ERR((((uint16_t)txllid << 0) & ~((uint16_t)0x00000003)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (EM_BLE_RD(EM_BLE_TXISOPHM0_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE) & ~((uint16_t)0x00000003)) | ((uint16_t)txllid << 0));
+}
+
+/**
+ * @brief TXISOBUFPTR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 13:00 TXISOBUFPTR 0x0
+ *
+ */
+#define EM_BLE_TXISOBUFPTR_ADDR (0x0091000A + EM_BLE_TX_ISO_DESC_OFFSET)
+#define EM_BLE_TXISOBUFPTR_INDEX 0x00000005
+#define EM_BLE_TXISOBUFPTR_RESET 0x00000000
+
+__INLINE uint16_t em_ble_txisobufptr_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_TXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+}
+
+__INLINE void em_ble_txisobufptr_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_TXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_TXISOBUFPTR_MASK ((uint16_t)0x00003FFF)
+#define EM_BLE_TXISOBUFPTR_LSB 0
+#define EM_BLE_TXISOBUFPTR_WIDTH ((uint16_t)0x0000000E)
+
+#define EM_BLE_TXISOBUFPTR_RST 0x0
+
+__INLINE uint16_t em_ble_txisobufptr_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_TXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x00003FFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_txisobufptr_setf(int elt_idx, uint16_t txisobufptr)
+{
+ BLE_ASSERT_ERR((((uint16_t)txisobufptr << 0) & ~((uint16_t)0x00003FFF)) == 0);
+ EM_BLE_WR(EM_BLE_TXISOBUFPTR_ADDR + elt_idx * REG_EM_BLE_TX_ISO_DESC_SIZE, (uint16_t)txisobufptr << 0);
+}
+
+
+#endif // _REG_EM_BLE_TX_ISO_DESC_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_wpal.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_wpal.h
new file mode 100755
index 0000000..b7f410b
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/import/reg/ble_reg_em_ble_wpal.h
@@ -0,0 +1,215 @@
+#ifndef _REG_EM_BLE_WPAL_H_
+#define _REG_EM_BLE_WPAL_H_
+
+#include
+#include "_reg_em_ble_wpal.h"
+#include "compiler.h"
+#include "architect.h"
+#include "em_map.h"
+#include "ble_reg_access.h"
+
+#define REG_EM_BLE_WPAL_COUNT 6
+
+#define REG_EM_BLE_WPAL_DECODING_MASK 0x0000000F
+
+#define REG_EM_BLE_WPAL_ADDR_GET(idx) (EM_BLE_WPAL_OFFSET + (idx) * REG_EM_BLE_WPAL_SIZE)
+
+/**
+ * @brief LIST_INFO register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15 ENTRY_VALID 0
+ * 14 IDTYPE 0
+ * 01 IN_WL 0
+ * 00 IN_PERADVL 0
+ *
+ */
+#define EM_BLE_LIST_INFO_ADDR (0x00910000 + EM_BLE_WPAL_OFFSET)
+#define EM_BLE_LIST_INFO_INDEX 0x00000000
+#define EM_BLE_LIST_INFO_RESET 0x00000000
+
+__INLINE uint16_t em_ble_list_info_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+}
+
+__INLINE void em_ble_list_info_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_ENTRY_VALID_BIT ((uint16_t)0x00008000)
+#define EM_BLE_ENTRY_VALID_POS 15
+#define EM_BLE_IDTYPE_BIT ((uint16_t)0x00004000)
+#define EM_BLE_IDTYPE_POS 14
+#define EM_BLE_IN_WL_BIT ((uint16_t)0x00000002)
+#define EM_BLE_IN_WL_POS 1
+#define EM_BLE_IN_PERADVL_BIT ((uint16_t)0x00000001)
+#define EM_BLE_IN_PERADVL_POS 0
+
+#define EM_BLE_ENTRY_VALID_RST 0x0
+#define EM_BLE_IDTYPE_RST 0x0
+#define EM_BLE_IN_WL_RST 0x0
+#define EM_BLE_IN_PERADVL_RST 0x0
+
+__INLINE void em_ble_list_info_pack(int elt_idx, uint8_t entryvalid, uint8_t idtype, uint8_t inwl, uint8_t inperadvl)
+{
+ BLE_ASSERT_ERR((((uint16_t)entryvalid << 15) & ~((uint16_t)0x00008000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)idtype << 14) & ~((uint16_t)0x00004000)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)inwl << 1) & ~((uint16_t)0x00000002)) == 0);
+ BLE_ASSERT_ERR((((uint16_t)inperadvl << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, ((uint16_t)entryvalid << 15) | ((uint16_t)idtype << 14) | ((uint16_t)inwl << 1) | ((uint16_t)inperadvl << 0));
+}
+
+__INLINE void em_ble_list_info_unpack(int elt_idx, uint8_t* entryvalid, uint8_t* idtype, uint8_t* inwl, uint8_t* inperadvl)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+
+ *entryvalid = (localVal & ((uint16_t)0x00008000)) >> 15;
+ *idtype = (localVal & ((uint16_t)0x00004000)) >> 14;
+ *inwl = (localVal & ((uint16_t)0x00000002)) >> 1;
+ *inperadvl = (localVal & ((uint16_t)0x00000001)) >> 0;
+}
+
+__INLINE uint8_t em_ble_list_info_entry_valid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+ return ((localVal & ((uint16_t)0x00008000)) >> 15);
+}
+
+__INLINE void em_ble_list_info_entry_valid_setf(int elt_idx, uint8_t entryvalid)
+{
+ BLE_ASSERT_ERR((((uint16_t)entryvalid << 15) & ~((uint16_t)0x00008000)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, (EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE) & ~((uint16_t)0x00008000)) | ((uint16_t)entryvalid << 15));
+}
+
+__INLINE uint8_t em_ble_list_info_idtype_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+ return ((localVal & ((uint16_t)0x00004000)) >> 14);
+}
+
+__INLINE void em_ble_list_info_idtype_setf(int elt_idx, uint8_t idtype)
+{
+ BLE_ASSERT_ERR((((uint16_t)idtype << 14) & ~((uint16_t)0x00004000)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, (EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE) & ~((uint16_t)0x00004000)) | ((uint16_t)idtype << 14));
+}
+
+__INLINE uint8_t em_ble_list_info_in_wl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000002)) >> 1);
+}
+
+__INLINE void em_ble_list_info_in_wl_setf(int elt_idx, uint8_t inwl)
+{
+ BLE_ASSERT_ERR((((uint16_t)inwl << 1) & ~((uint16_t)0x00000002)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, (EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE) & ~((uint16_t)0x00000002)) | ((uint16_t)inwl << 1));
+}
+
+__INLINE uint8_t em_ble_list_info_in_peradvl_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+ return ((localVal & ((uint16_t)0x00000001)) >> 0);
+}
+
+__INLINE void em_ble_list_info_in_peradvl_setf(int elt_idx, uint8_t inperadvl)
+{
+ BLE_ASSERT_ERR((((uint16_t)inperadvl << 0) & ~((uint16_t)0x00000001)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, (EM_BLE_RD(EM_BLE_LIST_INFO_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE) & ~((uint16_t)0x00000001)) | ((uint16_t)inperadvl << 0));
+}
+
+/**
+ * @brief LIST_BDADDR register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 LBDADDR 0x0
+ *
+ */
+#define EM_BLE_LIST_BDADDR_ADDR (0x00910002 + EM_BLE_WPAL_OFFSET)
+#define EM_BLE_LIST_BDADDR_INDEX 0x00000001
+#define EM_BLE_LIST_BDADDR_RESET 0x00000000
+#define EM_BLE_LIST_BDADDR_COUNT 3
+
+__INLINE uint16_t em_ble_list_bdaddr_get(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ return EM_BLE_RD(EM_BLE_LIST_BDADDR_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE + reg_idx * 2);
+}
+
+__INLINE void em_ble_list_bdaddr_set(int elt_idx, int reg_idx, uint16_t value)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ EM_BLE_WR(EM_BLE_LIST_BDADDR_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE + reg_idx * 2, value);
+}
+
+// field definitions
+#define EM_BLE_LBDADDR_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_LBDADDR_LSB 0
+#define EM_BLE_LBDADDR_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_LBDADDR_RST 0x0
+
+__INLINE uint16_t em_ble_list_bdaddr_lbdaddr_getf(int elt_idx, int reg_idx)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_BDADDR_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE + reg_idx * 2);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_list_bdaddr_lbdaddr_setf(int elt_idx, int reg_idx, uint16_t lbdaddr)
+{
+ BLE_ASSERT_ERR(reg_idx <= 2);
+ BLE_ASSERT_ERR((((uint16_t)lbdaddr << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_BDADDR_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE + reg_idx * 2, (uint16_t)lbdaddr << 0);
+}
+
+/**
+ * @brief LIST_SID register definition
+ *
+ * Bits Field Name Reset Value
+ * ----- ------------------ -----------
+ * 15:00 LSID 0x0
+ *
+ */
+#define EM_BLE_LIST_SID_ADDR (0x00910008 + EM_BLE_WPAL_OFFSET)
+#define EM_BLE_LIST_SID_INDEX 0x00000004
+#define EM_BLE_LIST_SID_RESET 0x00000000
+
+__INLINE uint16_t em_ble_list_sid_get(int elt_idx)
+{
+ return EM_BLE_RD(EM_BLE_LIST_SID_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+}
+
+__INLINE void em_ble_list_sid_set(int elt_idx, uint16_t value)
+{
+ EM_BLE_WR(EM_BLE_LIST_SID_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, value);
+}
+
+// field definitions
+#define EM_BLE_LSID_MASK ((uint16_t)0x0000FFFF)
+#define EM_BLE_LSID_LSB 0
+#define EM_BLE_LSID_WIDTH ((uint16_t)0x00000010)
+
+#define EM_BLE_LSID_RST 0x0
+
+__INLINE uint16_t em_ble_list_sid_lsid_getf(int elt_idx)
+{
+ uint16_t localVal = EM_BLE_RD(EM_BLE_LIST_SID_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE);
+ BLE_ASSERT_ERR((localVal & ~((uint16_t)0x0000FFFF)) == 0);
+ return (localVal >> 0);
+}
+
+__INLINE void em_ble_list_sid_lsid_setf(int elt_idx, uint16_t lsid)
+{
+ BLE_ASSERT_ERR((((uint16_t)lsid << 0) & ~((uint16_t)0x0000FFFF)) == 0);
+ EM_BLE_WR(EM_BLE_LIST_SID_ADDR + elt_idx * REG_EM_BLE_WPAL_SIZE, (uint16_t)lsid << 0);
+}
+
+
+#endif // _REG_EM_BLE_WPAL_H_
+
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/ble_util_buf.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/ble_util_buf.h
new file mode 100755
index 0000000..2506ed0
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/ble_util_buf.h
@@ -0,0 +1,251 @@
+/**
+ ****************************************************************************************
+ *
+ * @file ble_util_buf.h
+ *
+ * @brief Main API file for the BLE EM buffer management system
+ *
+ * Copyright (C) RivieraWaves 2009-2016
+ *
+ ****************************************************************************************
+ */
+
+#ifndef BLE_UTIL_BUF_H_
+#define BLE_UTIL_BUF_H_
+
+/**
+ ****************************************************************************************
+ * @defgroup BLE_UTIL_BUF BLE EM buffer management system
+ * @ingroup ROOT
+ * @brief BLE EM buffer management system
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include // standard integer
+#include "common_list.h" // common list definition
+
+/*
+ * DEFINES
+ ****************************************************************************************
+ */
+
+/// ACL data: handle and data length decoding
+#define BLE_EM_ACL_DATA_LEN_LSB (0)
+#define BLE_EM_ACL_DATA_LEN_MASK (0x03FF)
+/// Packet boundary flag
+#define BLE_EM_ACL_PBF_LSB (12)
+#define BLE_EM_ACL_PBF_MASK (0x3000)
+/// Broadcast flag
+#define BLE_EM_ACL_BF_LSB (14)
+#define BLE_EM_ACL_BF_MASK (0xC000)
+
+#if (BLE_ISO_PRESENT)
+#define BLE_UTIL_ISODESC_INVALID 0xFF
+#endif // (BLE_ISO_PRESENT)
+
+/*
+ * STRUCTURE DEFINITION
+ ****************************************************************************************
+ */
+
+/// EM LLCP buffer element
+struct ble_em_llcp_buf_elt
+{
+ /// List header
+ struct common_list_hdr hdr;
+ /// EM buffer pointer
+ uint16_t buf_ptr;
+ /// Data length (in bytes)
+ uint8_t length;
+};
+
+/// EM ACL buffer element
+struct ble_em_acl_buf_elt
+{
+ /// List header
+ struct common_list_hdr hdr;
+ /// EM buffer pointer
+ uint16_t buf_ptr;
+ /// Data length (in bytes) + Data Flags (PBF + BF)
+ uint16_t data_len_flags;
+};
+
+/// EM advertising data buffer element
+struct ble_em_adv_buf_elt
+{
+ /// List header
+ struct common_list_hdr hdr;
+ /// EM buffer pointer
+ uint16_t buf_ptr;
+ /// Data length (in bytes)
+ uint16_t length;
+};
+
+#if (BLE_ISO_PRESENT)
+/// EM ISO TX/RX Buffer
+struct ble_em_iso_buf_elt
+{
+ /// List header
+ struct common_list_hdr hdr;
+ /// EM buffer pointer
+ uint16_t buf_ptr;
+ /// Buffer index
+ uint8_t buf_idx;
+};
+#endif // (BLE_ISO_PRESENT)
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+
+/**
+ ****************************************************************************************
+ * @brief Initialize BLE EM buffers management system
+ *
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void ble_util_buf_init(uint8_t init_type);
+
+/**
+ ****************************************************************************************
+ * @brief Allocate a LLCP TX buffer
+ *
+ * @return Pointer to LLCP TX buffer, NULL if no buffer available
+ ****************************************************************************************
+ */
+struct ble_em_llcp_buf_elt* ble_util_buf_llcp_tx_alloc(void);
+
+/**
+ ****************************************************************************************
+ * @brief Free a LLCP TX buffer
+ *
+ * @param[in] buf Pointer to LLCP TX buffer
+ ****************************************************************************************
+ */
+void ble_util_buf_llcp_tx_free(uint16_t buf);
+
+/**
+ ****************************************************************************************
+ * @brief Allocate a RX buffer
+ *
+ * @return Pointer to RX buffer, NULL if no buffer available
+ ****************************************************************************************
+ */
+uint16_t ble_util_buf_rx_alloc(void);
+
+/**
+ ****************************************************************************************
+ * @brief Free a RX buffer
+ *
+ * @param[in] buf Pointer to RX buffer
+ ****************************************************************************************
+ */
+void ble_util_buf_rx_free(uint16_t buf);
+
+/**
+ ****************************************************************************************
+ * @brief Allocate a ACL TX buffer
+ *
+ * @return Pointer to ACL TX buffer, NULL if no buffer available
+ ****************************************************************************************
+ */
+uint16_t ble_util_buf_acl_tx_alloc(void);
+
+
+/**
+ ****************************************************************************************
+ * @brief Retrieve TX buffer Element
+ *
+ * @return Pointer to ACL TX buffer element
+ ****************************************************************************************
+ */
+struct ble_em_acl_buf_elt* ble_util_buf_acl_tx_elt_get(uint16_t buf);
+
+/**
+ ****************************************************************************************
+ * @brief Free a ACL TX buffer
+ *
+ * @param[in] buf Pointer to ACL TX buffer
+ ****************************************************************************************
+ */
+void ble_util_buf_acl_tx_free(uint16_t buf);
+
+/**
+ ****************************************************************************************
+ * @brief Allocate an advertising data TX buffer
+ *
+ * @return Pointer to advertising data TX buffer, NULL if no buffer available
+ ****************************************************************************************
+ */
+uint16_t ble_util_buf_adv_tx_alloc(void);
+
+/**
+ ****************************************************************************************
+ * @brief Free an advertising data TX buffer
+ *
+ * @param[in] buf Pointer to advertising data TX buffer
+ ****************************************************************************************
+ */
+void ble_util_buf_adv_tx_free(uint16_t buf);
+
+#if (BLE_ISO_PRESENT)
+/**
+ ****************************************************************************************
+ * @brief Allocate an Isochronous data TX/RX buffer
+ *
+ * @param[out] index Index of Isochronous data TX/RX buffer
+ *
+ * @return Pointer to Isochronous data TX/RX buffer, NULL if no buffer available
+ ****************************************************************************************
+ */
+uint16_t ble_util_buf_iso_alloc(uint8_t* index);
+
+/**
+ ****************************************************************************************
+ * @brief Free an Isochronous data TX/RX buffer
+ *
+ * @param[in] index Index of Isochronous data TX/RX buffer
+ ****************************************************************************************
+ */
+void ble_util_buf_iso_free(uint8_t index);
+
+/**
+ ****************************************************************************************
+ * @brief Initialize BLE ISO descriptors management system
+ *
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void ble_util_isodesc_init(uint8_t init_type);
+
+/**
+ ****************************************************************************************
+ * @brief Allocate an ISO descriptor
+ *
+ * @return Descriptor index allocated
+ ****************************************************************************************
+ */
+uint8_t ble_util_isodesc_alloc(void);
+
+/**
+ ****************************************************************************************
+ * @brief Free an ISO descriptor
+ *
+ * @param[in] desc_idx Index number of ISO descriptor
+ ****************************************************************************************
+ */
+void ble_util_isodesc_free(uint8_t desc_idx);
+
+#endif // (BLE_ISO_PRESENT)
+
+/// @} BLE_UTIL_BUF
+
+#endif // BLE_UTIL_BUF_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llc/llc_int.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llc/llc_int.h
new file mode 100755
index 0000000..454a3e6
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llc/llc_int.h
@@ -0,0 +1,1062 @@
+/**
+ ****************************************************************************************
+ *
+ * @file llc_int.h
+ *
+ * @brief Link layer controller internal definition
+ *
+ * Copyright (C) RivieraWaves 2009-2016
+ *
+ ****************************************************************************************
+ */
+
+#ifndef LLC_INT_H_
+#define LLC_INT_H_
+
+/**
+ ****************************************************************************************
+ * @addtogroup LLC Link layer Controller
+ * @{
+ ****************************************************************************************
+ */
+#include "rwip_task.h" // Task definitions
+
+
+
+
+
+/*
+ * INSTANCES
+ ****************************************************************************************
+ */
+/// Maximum number of instances of the LLC task
+#define LLC_IDX_MAX BLE_ACTIVITY_MAX
+
+/*
+ * DEFINE
+ ****************************************************************************************
+ */
+///The master should allow a minimum of 6 connection events that the slave will be listening
+///for before the instant occurs
+#define LLC_PROC_SWITCH_INSTANT_DELAY (9)
+
+/*
+ * MESSAGES
+ ****************************************************************************************
+ */
+
+/// Message API of the LLC task
+/*@TRACE
+ * llc_encrypt_ind = ble_aes_func_res_ind */
+enum llc_msg_id
+{
+ LLC_MSG_ID_MSG_FIRST = TASK_BLE_FIRST_MSG(TASK_BLE_ID_LLC),
+
+ /*
+ * ************** Msg LLC->LLC****************
+ */
+ /// Local procedure LLCP Time out
+ LLC_LOC_LLCP_RSP_TO = LLC_MSG_ID_MSG_FIRST,
+ /// Remote procedure LLCP Time out
+ LLC_REM_LLCP_RSP_TO,
+ /// Authenticated Payload timeout event
+ LLC_AUTH_PAYL_REAL_TO,
+ /// Authenticated Payload Near timeout event
+ LLC_AUTH_PAYL_NEARLY_TO,
+ /// Link is stopped, clean-up environment
+ LLC_STOPPED_IND,
+ /// Triggered when encryption has been performed
+ LLC_ENCRYPT_IND,
+ #if (BLE_CON_CTE_REQ)
+ /// Constant Tone Extension request timeout
+ LLC_CTE_REQ_TO,
+ #endif // (BLE_CON_CTE_REQ)
+
+ /*
+ * ************ Local Procedures *************
+ */
+ /// Version exchange procedure
+ LLC_OP_VER_EXCH_IND,
+ /// Features exchange procedure
+ LLC_OP_FEATS_EXCH_IND,
+ /// Disconnection procedure
+ LLC_OP_DISCONNECT_IND,
+ /// Encryption procedure
+ LLC_OP_ENCRYPT_IND,
+ /// Data Length update procedure
+ LLC_OP_DL_UPD_IND,
+ /// Connection update procedure
+ LLC_OP_CON_UPD_IND,
+ /// LE Ping exchange
+ LLC_OP_LE_PING_IND,
+ /// Channel map update procedure
+ LLC_OP_CH_MAP_UPD_IND,
+ /// PHY update procedure
+ LLC_OP_PHY_UPD_IND,
+ #if (BLE_CON_CTE_REQ | BLE_CON_CTE_RSP)
+ /// Constant Tone Extension procedure
+ LLC_OP_CTE_IND,
+ #endif // (BLE_CON_CTE_REQ | BLE_CON_CTE_RSP)
+ /// Clock accuracy exchange procedure
+ LLC_OP_CLK_ACC_IND,
+ /// Periodic Advertising Sync Transfer procedure
+ LLC_OP_PAST_IND,
+};
+
+
+
+
+/*
+ * STATES
+ ****************************************************************************************
+ */
+/// Procedures type definition
+enum llc_proc_type
+{
+ /** Local initiated procedure
+ *
+ * @startuml llc_local_proc_init.png
+ * participant HCI
+ * participant LLC
+ * alt Procedure initiated by host
+ * HCI --> LLC : HCI_XXX_CMD
+ * LLC -> LLC: hci_xxx_cmd_handler()
+ * activate LLC
+ * note over LLC #aqua: Allocate and fill procedure message
+ * LLC --> LLC : LLC_OP_XXX_IND
+ * note right: send message to local task instance \nto flow control procedure
+ * LLC --> HCI : HCI_CMD_STAT_EVENT
+ * deactivate LLC
+ * else Procedure initiated by controller
+ * ... -> LLC: llc_xxx_proc_start()
+ * activate LLC
+ * note over LLC #aqua: Allocate and fill procedure message
+ * LLC --> LLC : LLC_OP_XXX_IND
+ * note right: send message to local task instance \nto flow control procedure
+ * deactivate LLC
+ * end
+ * @enduml
+ *
+ * Example of simple local procedure
+ *
+ * @startuml llc_local_proc_msc.png
+ * participant HCI
+ * participant ...
+ * participant LLC
+ * participant LLD
+ * ... --> LLC : LLC_OP_XXX_IND
+ * LLC -> LLC: llc_op_xxx_ind_handler()
+ * activate LLC
+ * hnote over LLC #lightgreen: Register Procedure\nLOCAL_PROC = busy
+ * LLC -> LLC: llc_op_xxx_continue(START)
+ * activate LLC
+ * note over LLC #aqua: state = WAIT_XXX_RSP\nStart transaction timer
+ * LLC --> LLD: LLCP_XXX_REQ
+ * deactivate LLC
+ * deactivate LLC
+ * ... wait for LLCP response ...
+ * LLD --> LLC: LLCP_XXX_RSP
+ * LLC -> LLC: llcp_xxx_rsp_handler()
+ * activate LLC
+ * note over LLC: copy information
+ * LLC -> LLC: llc_op_xxx_continue(XXX_RSP)
+ * activate LLC
+ * note over LLC #aqua: state = Done\nStop transaction timer
+ * hnote over LLC #lightgreen: Unregister Procedure\nLOCAL_PROC = idle
+ * LLC --> HCI: HCI_XXX_INFO_CMP_EVT
+ * deactivate LLC
+ * deactivate LLC
+ * @enduml
+ *
+ */
+ LLC_PROC_LOCAL,
+ /** Remote initiated procedure
+ *
+ *
+ * Example of simple remote procedure
+ *
+ * @startuml llc_remote_proc_msc.png
+ * participant HCI
+ * participant LLC
+ * participant LLC_LLCP
+ * participant LLD
+ * LLD --> LLC: LLCP_XXX_REQ
+ * LLC -> LLC: llcp_xxx_req_handler()
+ * activate LLC
+ * hnote over LLC #lightgreen: Allocate procedure message\nRegister Procedure\nREMOTE_PROC = busy
+ * LLC -> LLC: llc_op_xxx_continue(START)
+ * activate LLC
+ * note over LLC #aqua: state = WAIT_HCI_XXX_RSP
+ * LLC --> HCI: HCI_XXX_REQ_EVT
+ * deactivate LLC
+ * deactivate LLC
+ * ... wait for HCI response ...
+ * HCI --> LLC: HCI_XXX_REQ_REPLY_CMD
+ * LLC -> LLC: hci_xxx_req_reply_cmd_handler()
+ * activate LLC
+ * note over LLC: copy information
+ * LLC --> HCI: HCI_CMD_CMP_EVT
+ * LLC -> LLC: llc_op_xxx_continue(HCI_XXX_RSP)
+ * activate LLC
+ * note over LLC #aqua: state = WAIT_LLCP_ACK
+ * LLC --> LLD: LLCP_XXX_RSP
+ * deactivate LLC
+ * deactivate LLC
+ * ... wait for LLCP Baseband ACK ...
+ * LLD --> LLC_LLCP: LLD_LLCP_TX_CFM
+ * LLC_LLCP -> LLC_LLCP: lld_llcp_tx_cfm_handler()
+ * activate LLC_LLCP
+ * LLC_LLCP -\ LLC: llcp_xxx_rsp_ack_handler()
+ * activate LLC
+ * LLC -> LLC: llc_op_xxx_continue(LLCP_ACK)
+ * activate LLC
+ * note over LLC #aqua: state = Done
+ * hnote over LLC #lightgreen: Unregister Procedure\nREMOTE_PROC = idle
+ * LLC -/ LLC_LLCP
+ * deactivate LLC
+ * deactivate LLC
+ * deactivate LLC_LLCP
+ * @enduml
+ *
+ */
+ LLC_PROC_REMOTE,
+ /// Max number of operations
+ LLC_PROC_MAX
+};
+
+/// Possible states of the LLC task
+enum llc_state_id
+{
+ /// Connection ready state
+ LLC_IDLE = 0x00,
+ /// Local procedure on-going
+ LLC_LOC_PROC_BUSY = (1 << LLC_PROC_LOCAL),
+ /// Remote procedure on-going
+ LLC_REM_PROC_BUSY = (1 << LLC_PROC_REMOTE),
+
+ /// Not connected
+ LLC_FREE = 0xFF,
+};
+//
+
+
+
+/// Procedure identifier
+/*@TRACE*/
+enum llc_proc_id
+{
+ /// No procedure on-going
+ LLC_PROC_NONE,
+ /// Disconnection procedure
+ LLC_PROC_DISCONNECT,
+ /// Version Exchange procedure
+ LLC_PROC_VERSION_EXCHANGE,
+ /// Pause Encryption or Encryption Start procedure
+ LLC_PROC_ENCRYPT,
+ /// Feature Exchange procedure
+ LLC_PROC_FEATURE_EXCHANGE,
+ /// Connection update
+ LLC_PROC_CON_UPDATE,
+ /// Channel map update
+ LLC_PROC_CH_MAP_UPDATE,
+ /// Data Length update
+ LLC_PROC_DL_UPDATE,
+ /// LE Ping exchange
+ LLC_PROC_LE_PING,
+ /// PHY Update procedure
+ LLC_PROC_PHY_UPDATE,
+ #if (BLE_CON_CTE_REQ | BLE_CON_CTE_RSP)
+ /// Constant Tone Extension procedure
+ LLC_PROC_CTE,
+ #endif // (BLE_CON_CTE_REQ | BLE_CON_CTE_RSP)
+ /// Clock accuracy Exchange procedure
+ LLC_PROC_CLK_ACC,
+};
+
+
+/// List of unexpected error received during a procedure
+enum llc_error_type
+{
+ /// Disconnection detected
+ LLC_ERR_DISCONNECT,
+ /// LLCP Unknown PDU received
+ LLC_ERR_LLCP_UNKNOWN_RSP,
+ /// LLCP Reject PDU received
+ LLC_ERR_LLCP_REJECT_IND,
+ /// LLCP Reject Extended PDU received
+ LLC_ERR_LLCP_REJECT_IND_EXT,
+};
+
+
+/** LLCP state used for some operation flow control
+ *
+ * @startuml llc_llcp_state.png
+ * state "IDLE" as idle
+ * state "PAUSE_ENC" as pause
+ * state "START_ENC" as enc
+ * state "TERMINATE" as terminate
+ * idle -down-> terminate : disconnect
+ * enc -down-> terminate : disconnect
+ * pause -down-> terminate : disconnect
+ * idle -right-> pause : re-encrypt
+ * idle --> enc : encrypt
+ * pause --> enc : paused
+ * enc --> idle : encrypted
+ * @enduml
+ *
+ */
+enum llc_llcp_state
+{
+ /// No specific on-going procedure
+ LLC_LLCP_IDLE,
+ /// Pause encryption procedure on-going
+ LLC_LLCP_PAUSE_ENC,
+ /// Start encryption procedure on-going
+ LLC_LLCP_START_ENC,
+ /// Link termination procedure on-going
+ LLC_LLCP_TERMINATE,
+};
+
+/// LLCP direction used to configure the flow control
+enum llc_llcp_dir
+{
+ LLC_LLCP_DIR_RX = 0,
+ LLC_LLCP_DIR_TX = 1,
+ LLC_LLCP_DIR_BOTH = 2,
+};
+
+/// Bit field definitions for LLCP states
+/// 7 6 5 4 3 2 1 0
+/// +----+----+----+----+----+----+----+----+
+/// | RFU | TX | RX |
+/// +----+----+----+----+----+----+----+----+
+enum llc_llcp_state_bf
+{
+ /// RX field position
+ LLC_LLCP_RX_LSB = 0,
+ LLC_LLCP_RX_MASK = (0x3),
+
+ /// TX field position
+ LLC_LLCP_TX_LSB = 2,
+ LLC_LLCP_TX_MASK = (0xC),
+};
+
+
+/// Flow control bit field to flow control procedures requested by host and controller (autonomous)
+///
+/// 7 6 5 4 3 2 1 0
+/// +-------+----+----+----+----+----+----+----+
+/// | L_C_UP| PHY|S_DL|C_UP|ENC |FEAT| VER|DISC|
+/// +-------+----+----+----+----+----+----+----+
+///
+enum llc_flow_ctrl
+{
+ /// HCI Disconnect requested by host
+ LLC_HCI_DISCONNECT_REQ_POS = 0,
+ LLC_HCI_DISCONNECT_REQ_BIT = (1 << 0),
+
+ /// HCI Read Remote Version requested by host
+ LLC_HCI_RD_REM_VER_REQ_POS = 1,
+ LLC_HCI_RD_REM_VER_REQ_BIT = (1 << 1),
+
+ /// HCI Read Remote features requested by host
+ LLC_HCI_RD_REM_FEAT_REQ_POS = 2,
+ LLC_HCI_RD_REM_FEAT_REQ_BIT = (1 << 2),
+
+ /// HCI Start Encryption requested by host
+ LLC_HCI_START_ENCRYPT_REQ_POS = 3,
+ LLC_HCI_START_ENCRYPT_REQ_BIT = (1 << 3),
+
+ /// HCI Connection Update requested by host
+ LLC_HCI_CON_UPDATE_REQ_POS = 4,
+ LLC_HCI_CON_UPDATE_REQ_BIT = (1 << 4),
+
+ /// HCI Set Data Length requested by host
+ LLC_HCI_SET_DATA_LEN_REQ_POS = 5,
+ LLC_HCI_SET_DATA_LEN_REQ_BIT = (1 << 5),
+
+ /// HCI Set PHY requested by host
+ LLC_HCI_SET_PHY_REQ_POS = 6,
+ LLC_HCI_SET_PHY_REQ_BIT = (1 << 6),
+
+ /// Local Connection Update requested by controller
+ LLC_LOC_CON_UPDATE_REQ_POS = 7,
+ LLC_LOC_CON_UPDATE_REQ_BIT = (1 << 7),
+};
+
+
+
+
+/// Link information bit field
+///
+/// 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+/// +------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
+/// | | | | | | CK_A | ENC_S|CH UPD| PF_R | LDIS | ENC | INST | LV_S | PV_R | TX_O | ROLE |
+/// +------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
+///
+enum llc_info
+{
+ /// Device is master of the link
+ LLC_INFO_MASTER_ROLE_POS = 0,
+ LLC_INFO_MASTER_ROLE_BIT = (1 << 0),
+
+ /// LLCP buffer TX on-going
+ LLC_LLCP_TX_ONGOING_POS = 1,
+ LLC_LLCP_TX_ONGOING_BIT = (1 << 1),
+
+ /// Peer version information received
+ LLC_INFO_PEER_VERSION_RECV_POS = 2,
+ LLC_INFO_PEER_VERSION_RECV_BIT = (1 << 2),
+
+ /// Local version information sent
+ LLC_INFO_LOCAL_VERSION_SENT_POS = 3,
+ LLC_INFO_LOCAL_VERSION_SENT_BIT = (1 << 3),
+
+ /// Procedure with instant on-going
+ LLC_INFO_INSTANT_PROC_POS = 4,
+ LLC_INFO_INSTANT_PROC_BIT = (1 << 4),
+
+ /// Current Link is encrypted
+ LLC_INFO_LINK_ENCRYPTED_POS = 5,
+ LLC_INFO_LINK_ENCRYPTED_BIT = (1 << 5),
+
+ /// Discard LLCP reception debug feature
+ LLC_INFO_DBG_LLCP_DISCARD_POS = 6,
+ LLC_INFO_DBG_LLCP_DISCARD_BIT = (1 << 6),
+
+ /// Peer feature information received
+ LLC_INFO_PEER_FEATURE_RECV_POS = 7,
+ LLC_INFO_PEER_FEATURE_RECV_BIT = (1 << 7),
+
+ /// Local channel map update ongoing
+ LLC_INFO_LOC_CH_MAP_UPD_POS = 8,
+ LLC_INFO_LOC_CH_MAP_UPD_BIT = (1 << 8),
+
+ /// Encryption start ongoing
+ LLC_INFO_ENC_START_POS = 9,
+ LLC_INFO_ENC_START_BIT = (1 << 9),
+
+ /// Accurate clock indicated
+ LLC_INFO_CLK_ACC_POS = 10,
+ LLC_INFO_CLK_ACC_BIT = (1 << 10),
+};
+
+/*
+ * TYPE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/**
+ * Local or Remote procedure callback used to inform if an unexpected error is raised during procedure execution
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] error_type Error type (@see enum llc_error_type)
+ * @param[in] param Parameter according to error type:
+ * - LLC_ERR_DISCONNECT: reason
+ * - LLC_ERR_LLCP_UNKNOWN_RSP: struct ll_unknown_rsp*
+ * - LLC_ERR_LLCP_REJECT_IND: struct ll_reject_ind*
+ * - LLC_ERR_LLCP_REJECT_IND_EXT: struct ll_reject_ext_ind*
+ */
+/*@TRACE*/
+typedef void (*llc_proc_error_cb) (uint8_t link_id, uint8_t error_type, void* param);
+
+
+
+/// Version information structure
+typedef struct
+{
+ /// LMP version
+ uint8_t lmp_vers;
+ /// Manufacturer ID
+ uint16_t compid;
+ /// LMP subversion
+ uint16_t subvers;
+} llc_version_t;
+
+
+/// Information about on-going procedure
+/*@TRACE*/
+typedef struct
+{
+ /// Unexpected Error callback
+ llc_proc_error_cb error_cb;
+ /// Procedure identifier
+ //@trc_ref llc_proc_id
+ uint8_t id;
+ /// Current procedure state
+ uint8_t state;
+ /// Timer procedure state, shall not be modified by procedure (@see enum llc_timer_state)
+ //@trc_ref llc_timer_state
+ uint8_t timer_state;
+} llc_procedure_t;
+
+
+/// LE Ping information
+typedef struct{
+ /// Authenticated payload timeout (N*10ms)
+ uint16_t auth_payl_to;
+ /// Authenticated payload timeout (N*10ms), Near timer duration
+ uint16_t auth_near_payl_to;
+} llc_le_ping_t;
+
+
+#if (BLE_CON_CTE_REQ)
+/// CTE information
+typedef struct{
+ /// RX parameters received
+ bool param_received;
+ /// Sampling enable
+ bool sampl_en;
+ /// Request active
+ bool req_active;
+ /// CTE request interval (in number of connection events)
+ uint16_t cte_req_intv;
+ /// Requested CTE length (in 8us unit)
+ uint8_t req_cte_len;
+ /// Requested CTE type (0: AOA | 1: AOD-1us | 2: AOD-2us)
+ uint8_t req_cte_type;
+ /// Slot durations (1: 1us | 2: 2us)
+ uint8_t slot_dur;
+ /// Length of switching pattern (number of antenna IDs in the pattern)
+ uint8_t switching_pattern_len;
+} llc_cte_rx_t;
+#endif // (BLE_CON_CTE_REQ)
+
+#if (BLE_CON_CTE_RSP)
+/// CTE information
+typedef struct{
+ /// RX parameters received
+ bool param_received;
+ /// CTE TX enable
+ bool en;
+ /// Used CTE types (bit0: AOA | bit1: AOD-1us | bit2: AOD-2us)
+ uint8_t cte_types;
+ /// Length of switching pattern (number of antenna IDs in the pattern)
+ uint8_t switching_pattern_len;
+} llc_cte_tx_t;
+#endif // (BLE_CON_CTE_RSP)
+
+/// Information about connection parameters
+typedef struct
+{
+ /// Current channel map used for connection
+ struct le_chnl_map ch_map;
+
+ /// Interval (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t interval;
+ /// Latency (in units of event)
+ uint16_t latency;
+ /// Link supervision timeout (in units of 10 ms)
+ uint16_t timeout;
+
+ // **** Data Length Management ****
+ ///the maximum number of octets that the local device will send to the remote device
+ uint16_t max_tx_octets;
+ ///the maximum number of octets that the local device is able to receive from the remote device
+ uint16_t max_rx_octets;
+
+ ///the maximum number of microsecond that the local device will take to transmit to the remote
+ uint16_t max_tx_time;
+ ///the maximum number of microsecond that the local device can take to receive from the remote device
+ uint16_t max_rx_time;
+
+ // **** PHY Management ****
+ /// Current TX PHY (@see enum le_phy_value)
+ uint8_t tx_phy;
+ /// Current RX PHY (@see enum le_phy_value)
+ uint8_t rx_phy;
+
+ // **** Min Used Channels Management ****
+ /// PHY(s) for which the slave has a minimum number of used channels requirement
+ uint8_t min_used_ch_phys;
+ /// minimum number of channels to be used on the specified PHY
+ uint8_t min_used_ch;
+
+} llc_con_params_t;
+
+/// Information received from LL_PER_SYNC_IND
+typedef struct
+{
+ /// SyncInfo
+ struct sync_info syncinfo;
+ /// ID (provided by the Host)
+ uint16_t id;
+ /// Connection event counter of the LLCP reception
+ uint16_t con_evt_cnt_rx;
+ /// Connection event counter
+ uint16_t con_evt_cnt;
+ /// Last periodic advertising event counter
+ uint16_t last_pa_evt_cnt;
+ /// Advertising Set ID, advertiser address type and sleep clock accuracy
+ uint8_t sid_atype_sca;
+ /// Periodic advertising PHY (@see enum le_phy_mask)
+ uint8_t phy;
+ /// Periodic advertiser address
+ struct bd_addr adva;
+ /// Periodic advertiser RPA (unresolved RPA if advertiser address is a resolved identity address, 0 otherwise)
+ struct bd_addr adv_rpa;
+ /// Sync Connection event counter
+ uint16_t sync_con_evt_cnt;
+} llc_past_rx_info_t;
+
+/// Periodic advertising sync transfer parameters
+typedef struct
+{
+ /// Information received from LL_PER_SYNC_IND (temporarily stored during address resolution)
+ llc_past_rx_info_t rx_info;
+
+ // **** PAST RX ****
+ /// Mode (@see enum per_adv_sync_info_rec_mode)
+ uint8_t mode;
+ /// The number of periodic advertising packets that can be skipped after a successful receive
+ uint16_t skip;
+ /// Sync timeout (Time=N*10ms)
+ uint16_t sync_to;
+ /// CTE type (@see enum sync_cte_type)
+ uint8_t cte_type;
+} llc_past_param_t;
+
+/// LLC environment structure
+struct llc_env_tag
+{
+ /// Procedure Kernel message saved
+ llc_procedure_t* procedure[LLC_PROC_MAX];
+ /// Current connection parameters
+ llc_con_params_t con_params;
+
+ /// Queue of LLCP to be sent
+ struct common_list llcp_tx_queue;
+ /// Remote device feature exchange and used by the stack
+ struct features rem_feats;
+ ///version exchange env
+ llc_version_t rem_ver;
+ /// LE Ping information
+ llc_le_ping_t le_ping;
+ #if (BLE_CON_CTE_REQ)
+ /// CTE RX information
+ llc_cte_rx_t cte_rx;
+ #endif // (BLE_CON_CTE_REQ)
+ #if (BLE_CON_CTE_RSP)
+ /// CTE TX information
+ llc_cte_tx_t cte_tx;
+ #endif // (BLE_CON_CTE_RSP)
+
+ /// Periodic Advertising Sync Transfer parameters
+ llc_past_param_t past;
+
+ // Data Length
+ /// Suggested value for the Controller's maximum transmitted number of payload octets
+ uint16_t suggested_max_tx_octets;
+ /// Suggested value for the Controller's maximum packet transmission time (in us)
+ uint16_t suggested_max_tx_time;
+
+ // PHY Management
+ /// Phy options indicated by Host (@see enum le_phy_opt) (by default 0 if never set by Host)
+ uint16_t phy_opt;
+ /// Default TX preferred PHY to use (@see enum le_phy_mask)
+ uint8_t tx_phys;
+ /// Default RX preferred PHY to use (@see enum le_phy_mask)
+ uint8_t rx_phys;
+
+ /// Information about current link status (@see enum llc_info)
+ uint16_t link_info;
+ /// Information about the current link state (@see enum llc_llcp_state)
+ uint8_t llcp_state;
+ /// Flow control information of HCI commands and local (autonomous) procedures (see enum llc_flow_ctrl)
+ uint8_t flow_ctrl;
+ /// Disconnection reason
+ uint8_t disc_reason;
+ /// Indicate L2CAP start fragment is pending
+ bool l2cap_start;
+};
+
+/// AES function execution result
+struct llc_encrypt_ind
+{
+ /// Status of AES execution
+ uint8_t status;
+ /// Result of the
+ uint8_t result[KEY_LEN];
+};
+
+
+/*
+ * GLOBAL VARIABLE DECLARATIONS
+ *****************************************************************************************
+ */
+
+/// LLC task descriptor
+extern const struct kernel_task_desc TASK_BLE_DESC_LLC;
+
+/// LLM environment variable
+extern struct llc_env_tag* llc_env[];
+
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+
+/**
+ ****************************************************************************************
+ * @brief Perform a Link environment variable clean-up due to disconnection or reset
+ *
+ * @param[in] link_id Link Identifier
+ ****************************************************************************************
+ */
+void llc_cleanup(uint8_t link_id, bool reset);
+
+
+/**
+ ****************************************************************************************
+ * @brief Stop the link to ensure that all host request are correctly answered.
+ *
+ * It restore the message queue to force finishing postponed operations and then
+ * send a message to fully stop the link.
+ *
+ * @param[in] link_id Link Identifier
+ ****************************************************************************************
+ */
+void llc_stop(uint8_t link_id);
+
+#if (BLE_CENTRAL || BLE_PERIPHERAL)
+/**
+ ****************************************************************************************
+ * @brief Check if the feature is supported
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] feature Feature to check (@see enum ble_feature)
+ *
+ * @return True if peer device feature support is expected, False if not supported
+ ****************************************************************************************
+ */
+__INLINE bool llc_le_feature_check(uint8_t link_id, uint8_t feature)
+{
+ bool ret = false;
+
+ if(link_id < BLE_ACTIVITY_MAX)
+ {
+ struct llc_env_tag* llc_env_ptr = llc_env[link_id];
+ if(llc_env_ptr != NULL)
+ {
+ ret = ((llc_env_ptr->rem_feats.feats[feature >> 3] & (1<<(feature & 0x7))) != 0) ? true : false;
+ }
+ }
+ return (ret);
+}
+
+/**
+ ****************************************************************************************
+ * @brief Set/Force if peer feature is supported
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] feature Feature to check (@see enum ble_feature)
+ * @param[in] enable True to enable the feature, false else
+ ****************************************************************************************
+ */
+__INLINE void llc_le_feature_set(uint8_t link_id, uint8_t feature, bool enable)
+{
+ if(link_id < BLE_ACTIVITY_MAX)
+ {
+ struct llc_env_tag* llc_env_ptr = llc_env[link_id];
+ if(llc_env_ptr != NULL)
+ {
+ if(enable)
+ {
+ llc_env_ptr->rem_feats.feats[feature >> 3] |= (1<<(feature & 0x7));
+ }
+ else
+ {
+ llc_env_ptr->rem_feats.feats[feature >> 3] &= ~(1<<(feature & 0x7));
+ }
+ }
+ }
+}
+
+/**
+ ****************************************************************************************
+ * @brief Check if the link is disconnecting or not established
+ *
+ * @param[in] link_id Link identifier
+ *
+ * @return True if a link is disconnecting or already in not connected state, False else
+ ****************************************************************************************
+ */
+__INLINE bool llc_is_disconnecting(uint8_t link_id)
+{
+ bool res = true;
+ if(link_id < BLE_ACTIVITY_MAX)
+ {
+ struct llc_env_tag* llc_env_ptr = llc_env[link_id];
+ if(llc_env_ptr != NULL)
+ {
+ res = (GETF(llc_env_ptr->llcp_state, LLC_LLCP_RX) == LLC_LLCP_TERMINATE);
+ }
+ }
+ return (res);
+}
+#endif //(BLE_CENTRAL || BLE_PERIPHERAL)
+
+/**
+ ****************************************************************************************
+ * @brief Update the link state according to on-going activity
+ *
+ * When the state goes to terminate, it cannot return to another state.
+ * Also when LLCP TX state is updated, LLCP module in informed to update the TX Queue list
+ * if some LLCP transmission are paused.
+ *
+ * LLC can set asymmetric RX/TX configuration during encryption procedures.
+ * When setting Idle or Terminate states, both directions shall be configured at the same time.
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] dir Direction (0:RX | 1:TX | 2:both)
+ * @param[in] state New state to apply
+ ****************************************************************************************
+ */
+void llc_llcp_state_set(uint8_t link_id, uint8_t dir, uint8_t state);
+
+
+/* ************************************************************************************ */
+/* ******************** PROCEDURE MANAGEMENT ********************** */
+/* ************************************************************************************ */
+
+/**
+ ****************************************************************************************
+ * @brief Register/Start a procedure
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ * @param[in] params Procedure parameters
+ ****************************************************************************************
+ */
+void llc_proc_reg(uint8_t link_id, uint8_t proc_type, llc_procedure_t *params);
+
+/**
+ ****************************************************************************************
+ * @brief Unregister/finish a procedure
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ ****************************************************************************************
+ */
+void llc_proc_unreg(uint8_t link_id, uint8_t proc_type);
+
+/**
+ ****************************************************************************************
+ * @brief Retrieve current procedure
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ *
+ * @return current procedure type or LLC_PROC_NONE if not started (@see enum llc_proc_id_type)
+ ****************************************************************************************
+ */
+uint8_t llc_proc_id_get(uint8_t link_id, uint8_t proc_type);
+
+/**
+ ****************************************************************************************
+ * @brief Retrieve procedure state
+ *
+ * @param[in] proc procedure
+ *
+ * @return procedure state
+ ****************************************************************************************
+ */
+uint8_t llc_proc_state_get(llc_procedure_t *proc);
+
+/**
+ ****************************************************************************************
+ * @brief Set the procedure state
+ *
+ * @param[in] proc procedure
+ * @param[in] link_id link identifier
+ * @param[in] proc_state new procedure state
+ ****************************************************************************************
+ */
+void llc_proc_state_set(llc_procedure_t *proc, uint8_t link_id, uint8_t proc_state);
+
+/**
+ ****************************************************************************************
+ * @brief Retrieve pointer on the current procedure
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ *
+ * @return Pointer on the current procedure type or NULL if not used
+ *****************************************************************************************
+ */
+llc_procedure_t * llc_proc_get(uint8_t link_id, uint8_t proc_type);
+
+
+/**
+ ****************************************************************************************
+ * @brief Inform on-going procedure that an unexpected error event happens
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ * @param[in] error_type Type of procedure error detected (@see enum llc_error_type)
+ * @param[in] param Parameter according to error type (@see llc_proc_error_cb)
+ *****************************************************************************************
+ */
+void llc_proc_err_ind(uint8_t link_id, uint8_t proc_type, uint8_t error_type, void* param);
+
+/**
+ ****************************************************************************************
+ * @brief Enable or Disable Local or Remote procedure LLCP transaction timer
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ * @param[in] enable True to enable/restart the LLCP transaction timer, False to clear it
+ *****************************************************************************************
+ */
+void llc_proc_timer_set(uint8_t link_id, uint8_t proc_type, bool enable);
+
+/**
+ ****************************************************************************************
+ * @brief Pause or Resume Local or Remote procedure LLCP transaction timer
+ *
+ * (if a timer is already started, it will be paused until resume is requested, see state
+ * machine described in @see enum llc_timer_state)
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] proc_type Local or Remote Procedure (@see enum llc_proc_type)
+ * @param[in] enable True to pause the LLCP transaction timer, False to resume it
+ *****************************************************************************************
+ */
+void llc_proc_timer_pause_set(uint8_t link_id, uint8_t proc_type, bool enable);
+/**
+ ****************************************************************************************
+ * @brief Check if a procedure is not entering in collision with another one.
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] proc_id New procedure to start
+ *
+ * @return COMMON_ERROR_NO_ERROR if no collision;
+ * COMMON_ERROR_LMP_COLLISION or COMMON_ERROR_DIFF_TRANSACTION_COLLISION else.
+ ****************************************************************************************
+ */
+uint8_t llc_proc_collision_check(uint8_t link_id, uint8_t proc_id);
+
+
+
+
+/* ************************************************************************************ */
+/* ************************* HCI HELPERS ********************** */
+/* ************************************************************************************ */
+
+
+/**
+ ****************************************************************************************
+ * @brief Send HCI CC event returning a status only
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] opcode HCI Operation code
+ * @param[in] status HCI CC status code
+ ****************************************************************************************
+ */
+void llc_cmd_cmp_send(uint8_t link_id, uint16_t opcode, uint8_t status);
+
+/**
+ ****************************************************************************************
+ * @brief Send HCI CS event
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] opcode HCI Operation code
+ * @param[in] status HCI CS status code
+ ****************************************************************************************
+ */
+void llc_cmd_stat_send(uint8_t link_id, uint16_t opcode, uint8_t status);
+
+
+
+/* ************************************************************************************ */
+/* ************************* Procedure start ********************** */
+/* ************************************************************************************ */
+
+/**
+ ****************************************************************************************
+ * @brief Immediate Disconnection
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] reason Reason of disconnection
+ * @param[in] immediate True: Try to stop event as soon as possible
+ * False: Wait for new connection event to be programmed
+ ****************************************************************************************
+ */
+void llc_disconnect(uint8_t link_id, uint8_t reason, bool immediate);
+
+/**
+ ****************************************************************************************
+ * @brief Initiate the termination procedure
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] reason Reason of disconnection
+ ****************************************************************************************
+ */
+void llc_init_term_proc(uint8_t link_id, uint8_t reason);
+
+/**
+ ****************************************************************************************
+ * @brief Set the authenticated payload timeout and compute the timer margin.
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] auth_payl_to Authenticated payload timeout
+ *
+ * @return COMMON_ERROR_NO_ERROR if succeed; COMMON_ERROR_INVALID_HCI_PARAM else.
+ ****************************************************************************************
+ */
+uint8_t llc_le_ping_set(uint8_t link_id, uint16_t auth_payl_to);
+
+/**
+ ****************************************************************************************
+ * @brief Restart the authenticated payload timeout timer (and its margin timer)
+ * to check if encrypted link is still alive
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] auth_payl_to Authenticated payload timeout
+ ****************************************************************************************
+ */
+void llc_le_ping_restart(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * Start PHY update procedure
+ *
+ * @param[in] link_id Link identifier
+ ****************************************************************************************
+ */
+void phy_upd_proc_start(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * Start data length update procedure
+ *
+ * @param[in] link_id Link identifier
+ ****************************************************************************************
+ */
+void dl_upd_proc_start(uint8_t link_id);
+
+#if BLE_CON_CTE_REQ
+/**
+ ****************************************************************************************
+ * @brief Disable CTE request
+ *
+ * @param[in] link_id Link Identifier
+ ****************************************************************************************
+ */
+void llc_cte_req_dis(uint8_t link_id);
+#endif // BLE_CON_CTE_REQ
+#if BLE_CON_CTE_RSP
+/**
+ ****************************************************************************************
+ * @brief Disable CTE response
+ *
+ * @param[in] link_id Link Identifier
+ ****************************************************************************************
+ */
+void llc_cte_rsp_dis(uint8_t link_id);
+#endif // BLE_CON_CTE_RSP
+
+/// @} LLC
+
+#endif // LLC_INT_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llc/llc_llcp.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llc/llc_llcp.h
new file mode 100755
index 0000000..d377414
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llc/llc_llcp.h
@@ -0,0 +1,125 @@
+/**
+ ****************************************************************************************
+ *
+ * @file llc_llcp.h
+ *
+ * @brief Functions for control pdu transmission/reception handling
+ *
+ * Copyright (C) RivieraWaves 2009-2015
+ *
+ *
+ ****************************************************************************************
+ */
+
+#ifndef LLC_CNTL_H_
+#define LLC_CNTL_H_
+
+/**
+ ****************************************************************************************
+ * @addtogroup LLCLLCP LLCLLCP
+ * @ingroup LLC
+ * @brief Functions for control pdu transmission/reception handling
+ *
+ * This module implements the functions allowing the handling of the transmission and
+ * reception of the control pdu.
+ *
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+#include "common_llcp.h"
+
+#if (BLE_PERIPHERAL || BLE_CENTRAL)
+
+/*
+ * MACROS
+ ****************************************************************************************
+ */
+
+/*
+ * type definition
+ ****************************************************************************************
+ */
+/**
+ ****************************************************************************************
+ * @brief Callback used to inform procedure when LLCP packet transmitted has been
+ * baseband acknowledged
+ *
+ * @param[in] link_id Link identifier on which the pdu will be sent.
+ * @param[in] op_code LLCP operation code
+ *
+ ****************************************************************************************
+ */
+typedef void (*llc_llcp_tx_cfm_cb) (uint8_t link_id, uint8_t op_code);
+
+/**
+ ****************************************************************************************
+ * @brief Callback used to handle LLCP message
+ *
+ * @param[in] link_id Link identifier on which the pdu will be sent.
+ * @param[in] pdu LLCP PDU information received
+ * @param[in] event_cnt Event counter value when PDU has been received
+ *
+ * @return status code of handler:
+ * - COMMON_ERROR_NO_ERROR: Nothing more to do
+ * - COMMON_ERROR_TERMINATED_MIC_FAILURE: Immediately disconnect the link
+ * - others: Send an LLCP_REJECT_IND or LLCP_REJECT_IND_EXT
+ ****************************************************************************************
+ */
+typedef uint8_t (*llc_llcp_pdu_handler_func_t)(uint8_t link_id, union llcp_pdu *pdu, uint16_t event_cnt);
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+
+
+/**
+ ****************************************************************************************
+ * @brief Sends the programmed LLCP PDU on the given link identifier.
+ *
+ * @param[in] link_id The link identifier on which the LLCP has to be transmitted
+ * @param[in] pdu Pointer on the PDU to be sent
+ * @param[in] tx_cfm_cb Pointer to the function to call when LLCP packet TX is done.
+ ****************************************************************************************
+ */
+void llc_llcp_send(uint8_t link_id, union llcp_pdu *pdu, llc_llcp_tx_cfm_cb tx_cfm_cb);
+
+
+
+/**
+ ****************************************************************************************
+ * @brief Link state have changed, check if some pending LLCP has to be transmitted
+ *
+ * @param[in] link_id The link identifier
+ ****************************************************************************************
+ */
+void llc_llcp_tx_check(uint8_t link_id);
+
+
+/**
+ ****************************************************************************************
+ * @brief Sends the (extended) reject indication pdu.
+ *
+ * This function allocates an sets header and parameters of the pdu before pushing it in
+ * the tx queue.
+ *
+ * @param[in] link_id Link identifier on which the PDU will be sent.
+ * @param[in] rej_opcode Rejected Operation code.
+ * @param[in] reason The reason to be put in the Reject Indication PDU
+ * @param[in] tx_cfm_cb Pointer to the function to call when LLCP packet TX is done.
+ ****************************************************************************************
+ */
+void llc_ll_reject_ind_pdu_send(uint8_t link_id, uint8_t rej_opcode, uint8_t reason, llc_llcp_tx_cfm_cb tx_cfm_cb);
+
+#endif // #if (BLE_PERIPHERAL || BLE_CENTRAL)
+
+
+
+/// @} LLCLLCP
+
+#endif // LLC_CNTL_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llctrl.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llctrl.h
new file mode 100755
index 0000000..c11827e
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llctrl.h
@@ -0,0 +1,194 @@
+/**
+ ****************************************************************************************
+ *
+ * @file llctrl.h
+ *
+ * @brief Main API file for the Link Layer Controller
+ *
+ * Copyright (C) RivieraWaves 2009-2016
+ *
+ ****************************************************************************************
+ */
+
+#ifndef LLC_H_
+#define LLC_H_
+
+/**
+ ****************************************************************************************
+ * @defgroup LLC Link Layer Controller
+ * @ingroup ROOT
+ * @brief BLE Lower Layers
+ *
+ * The CONTROLLER contains the modules allowing the link establishment, maintenance and management.
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include "rwip_config.h"
+#if(BLE_CENTRAL || BLE_PERIPHERAL)
+#include "kernel_task.h" // kernel task definitions
+#include "common_bt.h"
+#include "common_llcp.h"
+
+/*
+ * DEFINES
+ ****************************************************************************************
+ */
+
+
+/*
+ * ENUMERATION DEFINITIONS
+ ****************************************************************************************
+ */
+
+/*
+ * TYPE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/// API structure to be set by LLM and used by the LLC for each new link
+struct llc_init_parameters
+{
+ /// Access address
+ struct access_addr aa;
+
+ /// CRC init
+ struct crc_init crcinit;
+
+ /// Window size (in units of 1,25 ms, i.e. 2 slots)
+ uint8_t winsize;
+
+ /// Window offset (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t winoffset;
+
+ /// Interval (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t interval;
+
+ /// Latency
+ uint16_t latency;
+
+ /// Timeout (in units of 10 ms, i.e. 16 slots)
+ uint16_t timeout;
+
+ /// Channel mapping
+ struct le_chnl_map chm;
+
+ /// Hopping increment (random value in the range of 5 to 16)
+ uint8_t hop_inc;
+
+ /**
+ * Master Sleep clock accuracy (only for slave)
+ * 0 251 ppm to 500 ppm
+ * 1 151 ppm to 250 ppm
+ * 2 101 ppm to 150 ppm
+ * 3 76 ppm to 100 ppm
+ * 4 51 ppm to 75 ppm
+ * 5 31 ppm to 50 ppm
+ * 6 21 ppm to 30 ppm
+ * 7 0 ppm to 20 ppm
+ */
+ uint8_t master_sca;
+
+ /// CONNECT_REQ packet fine timer count (in us)
+ uint16_t fine_cnt_rxsync;
+
+ /// CONNECT_REQ packet base timer count (timestamp, in slots)
+ uint32_t base_cnt_rxsync;
+
+ /// First anchor point timestamp (in slots, master only)
+ uint32_t first_anchor_ts;
+
+ /// Connection transmit/receive rate (@see enum lld_rate)
+ uint8_t rate;
+
+ /// Role (0: Master | 1: Slave)
+ uint8_t role;
+
+ /// Indicates whether channel selection algorithm #2 will be used or not
+ bool ch_sel_2;
+
+ /// Indicates whether the AUX_CONNECT_REQ PDU was used or not (true for AUX_CONNECT_REQ, false for CONNECT_IND)
+ bool aux_connect_req;
+
+ // Default Data Length parameters
+ /// Suggested value for the Controller's maximum transmitted number of payload octets
+ uint16_t suggested_max_tx_octets;
+ /// Suggested value for the Controller's maximum packet transmission time (in us)
+ uint16_t suggested_max_tx_time;
+
+ // Default PHY parameters
+ /// Default TX preferred PHY to use (@see enum le_phy_mask)
+ uint8_t tx_phys;
+ /// Default RX preferred PHY to use (@see enum le_phy_mask)
+ uint8_t rx_phys;
+
+ // Default PAST parameters
+ /// Mode (@see enum per_adv_sync_info_rec_mode)
+ uint8_t past_mode;
+ /// The number of periodic advertising packets that can be skipped after a successful receive
+ uint16_t past_skip;
+ /// Sync timeout (Time=N*10ms)
+ uint16_t past_sync_to;
+ /// CTE type (@see enum sync_cte_type)
+ uint8_t past_cte_type;
+};
+
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+/**
+ ****************************************************************************************
+ * @brief Initialization/Reset of the BLE LLC task
+ *
+ * This function initializes the LLC task, as well as the environment of the LLC
+ *
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void llc_init(uint8_t init_type);
+
+
+/**
+ ****************************************************************************************
+ * @brief Start an initialize a new LLC environment
+ *
+ * @param[in] link_id link identifier.
+ * @param[in] con_params All parameters needed to start the LLC
+ * @param[in] pref Link preferences (set by host)
+ *
+ * @return If the environment allocation and initialization has been done or not.
+ ****************************************************************************************
+ */
+uint8_t llc_start(uint8_t link_id, struct llc_init_parameters *con_params);
+
+/**
+ ****************************************************************************************
+ * @brief Handles a planner request to move the activity
+ *
+ * @param[in] id sch_plan identifier.
+ ****************************************************************************************
+ */
+void llc_con_move_cbk(uint16_t id);
+
+/**
+ ****************************************************************************************
+ * @brief Modify sleep clock accuracy
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] action Switch to more or less accurate clock (@see enum clk_acc_action)
+ ****************************************************************************************
+ */
+void llc_clk_acc_modify(uint8_t link_id, uint8_t action);
+
+#endif// (BLE_CENTRAL || BLE_PERIPHERAL)
+
+/// @} LLC
+
+#endif // LLC_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lld.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lld.h
new file mode 100755
index 0000000..0b704ef
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lld.h
@@ -0,0 +1,2132 @@
+/**
+****************************************************************************************
+*
+* @file lld.h
+*
+* @brief LLD API
+*
+* Copyright (C) RivieraWaves 2009-2016
+*
+*
+****************************************************************************************
+*/
+
+#ifndef LLD_H_
+#define LLD_H_
+
+/**
+ ****************************************************************************************
+ * @defgroup LLD Link Driver
+ * @ingroup ROOT
+ * @brief LLD module handles the real-time job of Bluetooth operations.
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include "rwip_config.h" // stack configuration
+
+#include // integer
+#include // boolean
+#include // BLE standard definitions
+#include "ble_util_buf.h" // BLE buffers management
+#include "rwip_task.h" // Task definitions
+#if (BLE_ISO_PRESENT)
+#include "data_path.h" // Used for Isochronous channels
+#endif // (BLE_ISO_PRESENT)
+
+
+
+/*
+ * DEFINES
+ *****************************************************************************************
+ */
+
+/*
+ * ENUMERATION DEFINITIONS
+ ****************************************************************************************
+ */
+
+
+/*
+ * MESSAGES IDENTIFIERS
+ ****************************************************************************************
+ */
+
+/// Message API of the LLM task
+/*@TRACE*/
+enum lld_msg_id
+{
+ LLD_MSG_ID_FIRST = TASK_BLE_FIRST_MSG(TASK_BLE_ID_LLD),
+
+ /*
+ * ************** Msg LD->LLM****************
+ */
+ LLD_ADV_REP_IND,
+ LLD_SCAN_REQ_IND,
+#if (CFG_BLE_PER_SYNC)
+ LLD_SYNC_START_REQ,
+ LLD_PER_ADV_REP_IND,
+ LLD_PER_ADV_RX_END_IND,
+#endif
+ LLD_SCAN_END_IND,
+ LLD_ADV_END_IND,
+ LLD_PER_ADV_END_IND,
+ LLD_INIT_END_IND,
+ LLD_TEST_END_IND,
+ #if BLE_CONLESS_CTE_RX
+ LLD_CONLESS_CTE_RX_IND,
+ #endif // BLE_CONLESS_CTE_RX
+
+ /*
+ * ************** Msg LLD->LLC****************
+ */
+ LLD_LLCP_RX_IND,
+ LLD_LLCP_TX_CFM,
+ LLD_ACL_RX_IND,
+ LLD_ACL_TX_CFM,
+ LLD_CON_PARAM_UPD_CFM,
+ LLD_CH_MAP_UPD_CFM,
+ LLD_PHY_UPD_CFM,
+ LLD_DISC_IND,
+ LLD_CON_ESTAB_IND,
+ LLD_CON_OFFSET_UPD_IND,
+ #if BLE_CON_CTE_REQ
+ LLD_CON_CTE_RX_IND,
+ #endif // BLE_CON_CTE_REQ
+};
+
+/*
+ * MESSAGES STRUCTURES
+ ****************************************************************************************
+ */
+
+/// Advertising report indication structure
+/*@TRACE*/
+struct lld_adv_rep_ind
+{
+ /// Peer device address match
+ bool peer_add_match;
+
+ /// local add Match
+ bool local_add_match;
+
+ /// Address of the RAL Structure for which RPA resolution is successful
+ uint16_t rxralptr;
+
+ /// Peer device address
+ struct bd_addr peer_id_addr;
+
+ /// Target device address
+ struct bd_addr target_id_addr;
+
+ /// Advertising Data Info field (Data ID + Set ID)
+ uint16_t adi;
+
+ /// Indicate if Advertising Data Info field is present
+ bool adi_present;
+
+ /// Privacy error
+ bool priv_err;
+
+ /// Activity identifier
+ uint8_t act_id;
+
+ /**
+ * Bit
+ * 0 Connectable advertising
+ * 1 Scannable advertising
+ * 2 Directed advertising
+ * 3 Scan response
+ * 4 Legacy advertising PDUs used
+ */
+ uint8_t evt_type;
+
+ /**
+ * Data status
+ * 00b Complete
+ * 01b Incomplete, more data to come
+ * 10b Incomplete, data truncated, no more to come
+ * 11b Reserved for future use
+ */
+ uint8_t data_status;
+
+ /**
+ * Peer address type
+ * 0x00 Public Device Address
+ * 0x01 Random Device Address
+ * 0xFF None - Anonymous
+ */
+ uint8_t addr_type;
+
+ /// RxAdd (0: Public | 1: Random)
+ uint8_t rx_rxadd;
+
+ /// Primary PHY (@see enum lld_rate)
+ uint8_t rate1;
+
+ /// Secondary PHY (@see enum lld_rate)
+ uint8_t rate2;
+
+ // Tx Power
+ uint8_t tx_power;
+
+ /// Received signal strength in dBm
+ int8_t rssi;
+
+ /// Periodic advertising interval
+ uint16_t interval;
+
+ /// Data length in bytes
+ uint8_t data_len;
+
+ /// Chain ID (differentiate interleaved chains - chain 1, chain 2)
+ uint8_t chain;
+
+ /// EM buffer to read & free. Valid if data_len != 0.
+ uint16_t em_buf;
+
+ /// Data offset
+ uint8_t data_offset;
+};
+
+// SyncInfo RX request for initiating a Periodic Scan
+/*@TRACE*/
+struct lld_sync_start_req
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ // SyncInfo
+ struct sync_info syncinfo;
+
+ /// The clock value of the reference time (in half-slot)
+ uint32_t base_cnt;
+
+ /// The fine timer value the reference time (in half-us)
+ uint16_t fine_cnt;
+
+ /// The bit rate of periodic advertising (@see enum lld_rate)
+ uint8_t rate;
+
+ /// Advertising SID
+ uint8_t adv_sid;
+
+ /// Address of the RAL Structure for which RPA resolution is successful
+ uint16_t rxralptr;
+
+ /// Advertising address type (0: public / 1: random)
+ uint8_t adv_addr_type;
+
+ /// Advertiser address
+ struct bd_addr adv_addr;
+
+ /// max Skip after receive
+ uint16_t skip;
+
+ /// Sync timeout (Time=N*10ms)
+ uint16_t sync_to;
+};
+
+/// Periodic advertising report indication structure
+/*@TRACE*/
+struct lld_per_adv_rep_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /// Advertiser rate (@see enum lld_rate)
+ uint8_t rate;
+
+ /// Periodic advertising interval (Time=N*1.25ms)
+ uint16_t interval;
+
+ /// Activity offset in slots (625 us)
+ uint16_t act_offset;
+
+ /// value of the sync event counter when the packet is received
+ uint16_t ref_evt_cnt;
+
+ /// Advertiser clock accuracy
+ uint8_t adv_ca;
+
+ /// Tx Power
+ uint8_t tx_power;
+
+ /// RSSI
+ int8_t rssi;
+
+ /// Data Status
+ uint8_t data_status;
+
+ /// Data length in bytes
+ uint8_t data_len;
+
+ /// EM buffer to read & free. Valid if data_len != 0.
+ uint16_t em_buf;
+
+ /// Data offset
+ uint8_t data_offset;
+
+ /// CTE Type (0x00: A0A, 0x01: AoD 1 us, 0x02: AoD 2us, 0xFF: No CTE, All other values: RFU)
+ uint8_t cte_type;
+
+ /// Used to know if ACAD data present in the received ADV packet - 0 means not present
+ uint8_t acad_len;
+
+ /// offset of ACAD data content in the EM Buffer
+ uint8_t acad_offset;
+};
+
+/// Periodic advertising RX end indication structure
+/*@TRACE*/
+struct lld_per_adv_rx_end_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /// Status of the advertising sync
+ uint8_t status;
+};
+
+/// Scan request indication structure
+/*@TRACE*/
+struct lld_scan_req_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /**
+ * Scanner address type
+ * 0x00 Public Device Address
+ * 0x01 Random Device Address
+ * 0x02 Public Identity Address (Corresponds to Resolved Private Address)
+ * 0x03 Random (static) Identity Address (Corresponds to Resolved Private Address)
+ * 0x04-0xFF Reserved for future use
+ */
+ uint8_t addr_type;
+
+ /// Scanner address
+ struct bd_addr addr;
+};
+
+/// Advertising end indication structure
+/*@TRACE*/
+struct lld_adv_end_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /// Status (BLE error code)
+ uint8_t status;
+
+ /// Access address
+ struct access_addr aa;
+
+ /// CRC init
+ struct crc_init crcinit;
+
+ /// Local resolvable private address used for advertising
+ struct bd_addr local_rpa;
+
+ /// Peer resolvable private address of initiator or peer address indicated in CONNECT_REQ packet
+ struct bd_addr peer_rpa;
+
+ /// Initiator identity address
+ struct bd_addr peer_id_addr;
+
+ /// Window size (in units of 1,25 ms, i.e. 2 slots)
+ uint8_t winsize;
+
+ /// Window offset (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t winoffset;
+
+ /// Interval (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t interval;
+
+ /// Latency
+ uint16_t latency;
+
+ /// Timeout (in units of 10 ms, i.e. 16 slots)
+ uint16_t timeout;
+
+ /// Channel mapping
+ struct le_chnl_map chm;
+
+ /// Hopping increment (random value in the range of 5 to 16)
+ uint8_t hop_inc;
+
+ /**
+ * Master Sleep clock accuracy (only for slave)
+ * 0 251 ppm to 500 ppm
+ * 1 151 ppm to 250 ppm
+ * 2 101 ppm to 150 ppm
+ * 3 76 ppm to 100 ppm
+ * 4 51 ppm to 75 ppm
+ * 5 31 ppm to 50 ppm
+ * 6 21 ppm to 30 ppm
+ * 7 0 ppm to 20 ppm
+ */
+ uint8_t master_sca;
+
+ /// CONNECT_REQ packet fine timer count (in us)
+ uint16_t fine_cnt_rxsync;
+
+ /// CONNECT_REQ packet base timer count (timestamp, in slots)
+ uint32_t base_cnt_rxsync;
+
+ /// PHY rate to be used for the connection (0: 1Mbps | 1: 2 Mbps | 2: 125 Kbps | 3: 500 Kbps)
+ uint8_t con_rate;
+
+ /// Connection status (True: device connected | False: device not connected)
+ bool connected;
+
+ /// Indicates whether channel selection algorithm #2 will be used or not
+ bool ch_sel_2;
+
+ /**
+ * Peer address type
+ * 0x00 Public Device Address
+ * 0x01 Random Device Address
+ * 0x02 Public Identity Address (Corresponds to peers Resolvable Private Address)
+ * 0x03 Random (static) Identity Address (Corresponds to peers Resolvable Private Address)
+ * 0x04 - 0xFF Reserved for future use
+ */
+ uint8_t peer_addr_type;
+
+ /// Number of completed extended advertising events
+ uint8_t nb_ext_adv_evts;
+};
+
+/// Periodic advertising end indication structure
+struct lld_per_adv_end_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /// Status (BLE error code)
+ uint8_t status;
+};
+
+/// Scanning end indication structure
+/*@TRACE*/
+struct lld_scan_end_ind
+{
+ /// Status (BLE error code)
+ uint8_t status;
+
+ /// Activity identifier used for advertising
+ uint8_t act_id;
+};
+
+/// Test mode end indication structure
+/*@TRACE*/
+struct lld_test_end_ind
+{
+ /// Status (BLE error code)
+ uint8_t status;
+
+ /// Number of packets received
+ uint16_t nb_pkt_recv;
+};
+
+/// Initiating end indication structure
+/*@TRACE*/
+struct lld_init_end_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /// Connection status (True: device connected | False: device not connected)
+ bool connected;
+
+ /// Local resolvable private address used for initiating
+ struct bd_addr local_rpa;
+
+ /// Peer resolvable private address of advertiser or peer address indicated in ADV packet
+ struct bd_addr peer_rpa;
+
+ /// Advertiser identity address
+ struct bd_addr peer_id_addr;
+
+ /// access address
+ struct access_addr aa;
+
+ /// Connection interval (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t con_intv;
+
+ /// Connection offset in slots (625 us)
+ uint16_t con_offset;
+
+ /// First anchor point (timestamp, in slots)
+ uint32_t base_con_txwin;
+
+ /**
+ * Peer address type
+ * 0x00 Public Device Address
+ * 0x01 Random Device Address
+ * 0x02 Public Identity Address (Corresponds to peers Resolvable Private Address)
+ * 0x03 Random (static) Identity Address (Corresponds to peers Resolvable Private Address)
+ * 0x04 - 0xFF Reserved for future use
+ */
+ uint8_t peer_addr_type;
+
+ /// Channel map for use on the connection
+ struct le_chnl_map ch_map;
+
+ /// Index of initiating PHY used
+ uint8_t phy_idx;
+
+ /// PHY rate to be used for the connection (0: 1Mbps | 1: 2 Mbps | 2: 125 Kbps | 3: 500 Kbps)
+ uint8_t con_rate;
+
+ /// Connection latency
+ uint16_t con_latency;
+
+ /// Connection supervision timeout in 10ms (N * 10ms)
+ uint16_t superv_to;
+
+ /// CRC init
+ struct crc_init crcinit;
+
+ /// Window size
+ uint8_t winsize;
+
+ /// Hopping increment
+ uint8_t hop_inc;
+
+ /// Master sleep clock accuracy
+ uint8_t m_sca;
+
+ /// TX power of peer device
+ uint8_t tx_power;
+
+ /// ADI collision - mismatch on AdvDataInfo
+ bool adi_collision;
+
+ /// Indicates whether channel selection algorithm #2 will be used or not
+ bool ch_sel_2;
+};
+
+/// LLD disconnection indication structure
+/*@TRACE*/
+struct lld_disc_ind
+{
+ /// Driver disconnection reason
+ uint8_t reason;
+};
+
+/// LLD LLCP reception indication structure
+/*@TRACE*/
+struct lld_llcp_rx_ind
+{
+ /// Event counter when the packet has been received
+ uint16_t event_cnt;
+ /// PDU length
+ uint8_t length;
+ /// EM buffer containing PDU
+ uint16_t em_buf;
+};
+
+/// LLD ACL reception indication structure
+/*@TRACE*/
+struct lld_acl_rx_ind
+{
+ /// EM buffer containing PDU
+ uint16_t em_buf;
+ /// Data length + Data Flags (PBF + BF)
+ uint16_t data_len;
+ /// LLID
+ uint8_t llid;
+};
+
+/// LLD connection established indication structure
+/*@TRACE*/
+struct lld_con_estab_ind
+{
+ /// Connection offset in slots (625 us)
+ uint16_t con_offset;
+};
+
+/// LLD connection offset update indication structure
+/*@TRACE*/
+struct lld_con_offset_upd_ind
+{
+ /// Connection offset in slots (625 us)
+ uint16_t con_offset;
+};
+
+#if BLE_CON_CTE_REQ
+/// LLD connection CTE RX indication structure
+/*@TRACE*/
+struct lld_con_cte_rx_ind
+{
+ /// RX CTE descriptor index
+ uint8_t em_rx_cte_desc_idx;
+ /// CTE time (in 8us unit)
+ uint8_t cte_time;
+ /// CTE type (0: AOA | 1: AOD-1us | 2: AOD-2us)
+ uint8_t cte_type;
+ /// Number of IQ samples
+ uint8_t nb_iq_samp;
+ /// PHY (@see enum le_phy_value)
+ uint8_t phy;
+ /// Channel index
+ uint8_t channel_idx;
+ /// RSSI (in 0.1 dBm)
+ int16_t rssi;
+ /// RSSI antenna ID
+ uint8_t rssi_antenna_id;
+ /// connEventCounter
+ uint16_t con_evt_cnt;
+};
+#endif // BLE_CON_CTE_REQ
+
+#if BLE_CONLESS_CTE_RX
+/// LLD connection CTE RX indication structure
+/*@TRACE*/
+struct lld_conless_cte_rx_ind
+{
+ /// Activity identifier
+ uint8_t act_id;
+ /// RX CTE descriptor index
+ uint8_t em_rx_cte_desc_idx;
+ /// Data channel index
+ uint8_t channel_idx;
+ /// RSSI (in 0.1 dBm)
+ int16_t rssi;
+ /// RSSI antenna ID
+ uint8_t rssi_antenna_id;
+ /// CTE type (0: AOA | 1: AOD-1us | 2: AOD-2us)
+ uint8_t cte_type;
+ /// Slot durations (1: 1us | 2: 2us)
+ uint8_t slot_dur;
+ /// paEventCounter
+ uint16_t pa_evt_cnt;
+ /// Sample_count
+ uint8_t sample_cnt;
+};
+#endif // BLE_CONLESS_CTE_RX
+
+/*
+ * STRUCTURE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/// Channel assessment data
+struct lld_ch_assess_data
+{
+ /// Timestamp of last received packet for each frequency
+ uint32_t timestamp[DATA_CHANNEL_NB];
+
+ /// Channel quality level for each frequency
+ int8_t level[DATA_CHANNEL_NB];
+};
+
+/// Advertising parameters structure
+struct lld_adv_params
+{
+ /// BD Address of the local device
+ struct bd_addr own_addr;
+
+ /// BD Address of the peer device (only for directed advertising)
+ struct bd_addr peer_addr;
+
+ /// Primary advertising interval
+ uint32_t prim_adv_intv;
+
+ /// Initial advertising data buffer
+ uint16_t init_adv_data_buf;
+
+ /// Initial scan response data buffer
+ uint16_t init_scan_rsp_data_buf;
+
+ /// Initial advertising data length
+ uint16_t init_adv_data_len;
+
+ /// Initial scan response data length
+ uint16_t init_scan_rsp_data_len;
+
+ /// Advertising event properties
+ uint16_t adv_evt_properties;
+
+ /// Duration (N * 10 ms), 0x0000 No advertising duration. Advertising to continue until the Host disables it.
+ uint16_t duration;
+
+ /// Maximum number of extended advertising events
+ uint8_t max_ext_adv_evt;
+
+ /// Primary advertising channel map
+ uint8_t prim_adv_ch_map;
+
+ /**
+ * Local address type
+ * 0x00 Public Device Address (default)
+ * 0x01 Random Device Address
+ * 0x02 Controller generates Resolvable Private Address based on the local IRK from resolving list. If resolving
+ * list contains no matching entry, use public address.
+ * 0x03 Controller generates Resolvable Private Address based on the local IRK from resolving list. If resolving
+ * list contains no matching entry, use random address from LE_Set_Random_Address.
+ */
+ uint8_t own_addr_type;
+
+ /**
+ * Peer address type (only for directed advertising)
+ * 0x00 Public Device Address (default) or Public Identity Address
+ * 0x01 Random Device Address or Random (static) Identity Address
+ * 0x02 - 0xFF Reserved for future use
+ */
+ uint8_t peer_addr_type;
+
+ /**
+ * Advertising filter policy:
+ * 0x00 Process scan and connection requests from all devices (i.e., the White List is not in use) (default).
+ * 0x01 Process connection requests from all devices and only scan requests from devices that are in the White List.
+ * 0x02 Process scan requests from all devices and only connection requests from devices that are in the White List.
+ * 0x03 Process scan and connection requests only from devices in the White List.
+ * 0x04 - 0xFF Reserved for future use.
+ */
+ uint8_t adv_filter_policy;
+
+ /// Advertising Tx power
+ int8_t adv_tx_pwr;
+
+ /// Primary advertising PHY
+ uint8_t prim_adv_phy;
+
+ /// Secondary advertising max skip
+ uint8_t sec_adv_max_skip;
+
+ /// Secondary advertising PHY
+ uint8_t sec_adv_phy;
+
+ /// Advertising SID
+ uint8_t adv_sid;
+
+ /// Scan request notification enable
+ uint8_t scan_req_notif_en;
+
+ /// Address resolution enabled
+ bool addr_resolution_en;
+
+ /// Index of the RAL entry corresponding to peer
+ uint8_t ral_idx;
+};
+
+#if BLE_CONLESS_CTE_TX
+/// Periodic advertising CTE parameters structure
+struct lld_per_adv_cte_params
+{
+ /// CTE length (in 8us unit)
+ uint8_t cte_len;
+ /// CTE type (0: AOA | 1: AOD-1us | 2: AOD-2us)
+ uint8_t cte_type;
+ /// CTE count (number of CTEs to transmit in each periodic advertising interval, range 0x01 to 0x10)
+ uint8_t cte_count;
+ /// Length of switching pattern (number of antenna IDs in the pattern)
+ uint8_t switching_pattern_len;
+ /// Antenna IDs
+ uint8_t antenna_id[BLE_MAX_SW_PAT_LEN];
+};
+#endif // BLE_CONLESS_CTE_TX
+
+/// Periodic advertising parameters structure
+struct lld_per_adv_params
+{
+ /// Periodic advertising interval expressed in units of 1.25 ms
+ uint16_t per_adv_intv;
+
+ /// Periodic advertising properties
+ uint16_t per_adv_properties;
+
+ /// Initial periodic advertising data buffer
+ uint16_t init_adv_data_buf;
+
+ /// Initial periodic advertising data length
+ uint16_t init_adv_data_len;
+
+ /// Periodic advertising offset in slots (625 us)
+ uint16_t per_adv_offset;
+
+ /**
+ * Local address type
+ * 0x00 Public Device Address (default)
+ * 0x01 Random Device Address
+ * 0x02 Controller generates Resolvable Private Address based on the local IRK from resolving list. If resolving
+ * list contains no matching entry, use public address.
+ * 0x03 Controller generates Resolvable Private Address based on the local IRK from resolving list. If resolving
+ * list contains no matching entry, use random address from LE_Set_Random_Address.
+ */
+ uint8_t own_addr_type;
+
+ /// Periodic advertising Tx power
+ int8_t adv_tx_pwr;
+
+ /// Secondary advertising PHY
+ uint8_t sec_adv_phy;
+
+ #if BLE_CONLESS_CTE_TX
+ struct lld_per_adv_cte_params cte_params;
+ #endif // BLE_CONLESS_CTE_TX
+};
+
+/// Scanning parameters structure
+struct lld_scan_params
+{
+ /// BD Address of the local device
+ struct bd_addr own_addr;
+
+ /// Extended scanning
+ bool ext_scan;
+
+ /// Scanning PHYs (bit0: 1M PHY, bit2: coded PHY)
+ uint8_t scan_phys;
+
+ /// Scan interval in slots (625 us)
+ uint16_t intv_1m; // 1M PHY
+ uint16_t intv_c; // coded PHY
+
+ /// Scan window in slots (625 us)
+ uint16_t win_1m; // 1M PHY
+ uint16_t win_c; // coded PHY
+
+ /**
+ * Scanning type
+ * 0x00 Passive Scanning. No SCAN_REQ packets shall be sent (default)
+ * 0x01 Active scanning. SCAN_REQ packets may be sent.
+ * 0x02 - 0xFF Reserved for future use
+ */
+ uint8_t type_1m; // 1M PHY
+ uint8_t type_c; // coded PHY
+
+ /**
+ * Local address type
+ * 0x00 Public Device Address (default)
+ * 0x01 Random Device Address
+ * 0x02 Controller generates Resolvable Private Address based on the local IRK from resolving list. If resolving
+ * list contains no matching entry, use public address.
+ * 0x03 Controller generates Resolvable Private Address based on the local IRK from resolving list. If resolving
+ * list contains no matching entry, use random address from LE_Set_Random_Address.
+ */
+ uint8_t own_addr_type;
+
+ /**
+ * Scan filter policy:
+ * 0x00 Accept all
+ * - advertisement packets except directed advertising packets not addressed to this device (default)
+ * 0x01 Accept only
+ * - advertisement packets from devices where the advertisers address is in the White list.
+ * - Directed advertising packets which are not addressed for this device shall be ignored.
+ * 0x02 Accept all
+ * - undirected advertisement packets, and
+ * - directed advertising packets where the initiator address is a resolvable private address, and
+ * - directed advertising packets addressed to this device.
+ * 0x03 Accept all
+ * - advertisement packets from devices where the advertisers address is in the White list, and
+ * - directed advertising packets where the initiator address is a resolvable private address, and
+ * - directed advertising packets addressed to this device.
+ * 0x04 - 0xFF Reserved for future use.
+ */
+ uint8_t filter_policy;
+
+ /// Address resolution enabled
+ bool addr_resolution_en;
+
+ /// Scan duration (N * 10 ms) | 0x0000: Scan continuously until explicitly disable
+ uint16_t duration;
+};
+
+#if BLE_CONLESS_CTE_RX
+/// Sync CTE parameters structure
+struct lld_sync_cte_params
+{
+ /// Sampling enable
+ uint8_t sampl_en;
+ /// Slot durations (1: 1us | 2: 2us)
+ uint8_t slot_dur;
+ /// Max sampled CTEs
+ uint8_t max_sampl_cte;
+ /// Length of switching pattern
+ uint8_t switching_pattern_len;
+ /// Antenna IDs
+ uint8_t antenna_id[BLE_MAX_SW_PAT_LEN];
+};
+#endif // BLE_CONLESS_CTE_RX
+
+/// Sync parameters structure
+struct lld_sync_params
+{
+ // SyncInfo
+ const struct sync_info* p_syncinfo;
+
+ /// The clock value of the reference time (in half-slot)
+ uint32_t base_cnt;
+
+ /// The fine timer value the reference time (in half-us)
+ uint16_t fine_cnt;
+
+ /// The bit rate of periodic advertising (@see enum lld_rate)
+ uint8_t rate;
+
+ /// Advertising SID
+ uint8_t adv_sid;
+
+ /// max Skip after receive
+ uint16_t skip;
+
+ /// Sync timeout (Time=N*10ms)
+ uint16_t sync_to;
+
+ /// Additional drift to consider on given time reference (in half-us)
+ uint16_t add_drift;
+
+ /// Specifies whether to only synchronize to periodic advertising with certain types of CTE (@see enum sync_cte_type)
+ uint8_t sync_cte_type;
+};
+
+/// Initiating parameters PHY sub-structure
+struct lld_init_phy_params
+{
+ /// Scan interval in slots (625 us)
+ uint16_t intv;
+
+ /// Scan window in slots (625 us)
+ uint16_t win;
+
+ /// Connection interval (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t con_intv;
+
+ /// Connection offset in slots (625 us)
+ uint16_t con_offset;
+
+ /// Connection latency
+ uint16_t con_latency;
+
+ /// Connection supervision timeout in 10ms (N * 10ms)
+ uint16_t superv_to;
+};
+
+/// Initiating parameters structure
+struct lld_init_params
+{
+ /// BD Address of the local device
+ struct bd_addr own_addr;
+
+ /// BD Address of the peer device (only if White List is not used)
+ struct bd_addr peer_addr;
+
+ /// Channel map to use for the connection
+ struct le_chnl_map ch_map;
+
+ /// Extended initiating
+ bool ext_init;
+
+ /// Scanning PHYs (bit0: 1M PHY, bit1: 2M PHY, bit2: coded PHY)
+ uint8_t init_phys;
+
+ /// Activity identifier
+ uint8_t act_id;
+
+ /**
+ * Local address type
+ * 0x00 Public Device Address (default)
+ * 0x01 Random Device Address
+ * 0x02 To generate RPA from resolving list. If no matching entry, use public address.
+ * 0x03 To generate RPA from resolving list. If no matching entry, use random address.
+ */
+ uint8_t own_addr_type;
+
+ /**
+ * Peer address type (only if White List is not used)
+ * 0x00 Public Device Address
+ * 0x01 Random Device Address
+ * 0x02 - 0xFF Reserved for future use
+ */
+ uint8_t peer_addr_type;
+
+ /**
+ * Initiator filter policy:
+ * 0x00 White list is not used to determine which advertiser to connect to. Peer_Address_Type and Peer_Address
+ * shall be used.
+ * 0x01 White list is used to determine which advertiser to connect to. Peer_Address_Type and Peer_Address shall
+ * be ignored.
+ * 0x02 - 0xFF Reserved for future use.
+ */
+ uint8_t filter_policy;
+
+ /**
+ * Parameters for Initiating PHY(s)
+ * The parameters are ordered in the same order as the set bits in the init_phys parameter, starting from bit 0.
+ * The number of elements is determined by the number of bits set in the Initiating_PHYs parameter.
+ */
+ struct lld_init_phy_params phy[MAX_INIT_PHYS];
+
+ /// Address resolution enabled
+ bool addr_resolution_en;
+};
+
+/// Connection parameters structure
+struct lld_con_params
+{
+ /// Access address
+ struct access_addr aa;
+
+ /// CRC init
+ struct crc_init crcinit;
+
+ /// Window size (in units of 1,25 ms, i.e. 2 slots)
+ uint8_t winsize;
+
+ /// Window offset (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t winoffset;
+
+ /// Interval (in units of 1,25 ms, i.e. 2 slots)
+ uint16_t interval;
+
+ /// Latency
+ uint16_t latency;
+
+ /// Timeout (in units of 10 ms, i.e. 16 slots)
+ uint16_t timeout;
+
+ /// Channel mapping
+ struct le_chnl_map chm;
+
+ /// Hopping increment (random value in the range of 5 to 16)
+ uint8_t hop_inc;
+
+ /**
+ * Master Sleep clock accuracy (only for slave)
+ * 0 251 ppm to 500 ppm
+ * 1 151 ppm to 250 ppm
+ * 2 101 ppm to 150 ppm
+ * 3 76 ppm to 100 ppm
+ * 4 51 ppm to 75 ppm
+ * 5 31 ppm to 50 ppm
+ * 6 21 ppm to 30 ppm
+ * 7 0 ppm to 20 ppm
+ */
+ uint8_t master_sca;
+
+ /// CONNECT_REQ packet fine timer count (in half-us)
+ uint16_t fine_cnt_rxsync;
+
+ /// CONNECT_REQ packet base timer count (timestamp, in half-slots)
+ uint32_t base_cnt_rxsync;
+
+ /// First anchor point timestamp (in half-slots, master only)
+ uint32_t first_anchor_ts;
+
+ /// Role (0: Master | 1: Slave)
+ uint8_t role;
+
+ /// Connection transmit/receive rate (@see enum lld_rate)
+ uint8_t rate;
+
+ /// Indicates whether channel selection algorithm #2 will be used or not
+ bool ch_sel_2;
+
+ /// Indicates whether the AUX_CONNECT_REQ PDU was used or not (true for AUX_CONNECT_REQ, false for CONNECT_IND)
+ bool aux_connect_req;
+};
+
+#if (BLE_ISO_MODE_0)
+/// Audio parameters structure
+struct lld_con_audio_params
+{
+ /// Reception Data Path : pointer must be filled
+ const struct data_path_itf* rx_dp;
+ /// Transmission Data Path : pointer must be filled
+ const struct data_path_itf* tx_dp;
+ /// Configure transmitter size in bytes
+ uint8_t tx_size;
+ /// Configure receiver size in bytes
+ uint8_t rx_size;
+ /// Salve audio source enabled
+ bool slv_src_enable;
+};
+#endif //(BLE_ISO_MODE_0)
+
+/// Test mode parameters structure
+struct lld_test_params
+{
+ /// Type (0: RX | 1: TX)
+ uint8_t type;
+
+ /// RF channel, N = (F - 2402) / 2
+ uint8_t channel;
+
+ /// Length of test data
+ uint8_t data_len;
+
+ /**
+ * Packet payload
+ * 0x00 PRBS9 sequence "11111111100000111101" (in transmission order) as described in [Vol 6] Part F, Section 4.1.5
+ * 0x01 Repeated "11110000" (in transmission order) sequence as described in [Vol 6] Part F, Section 4.1.5
+ * 0x02 Repeated "10101010" (in transmission order) sequence as described in [Vol 6] Part F, Section 4.1.5
+ * 0x03 PRBS15 sequence as described in [Vol 6] Part F, Section 4.1.5
+ * 0x04 Repeated "11111111" (in transmission order) sequence
+ * 0x05 Repeated "00000000" (in transmission order) sequence
+ * 0x06 Repeated "00001111" (in transmission order) sequence
+ * 0x07 Repeated "01010101" (in transmission order) sequence
+ * 0x08-0xFF Reserved for future use
+ */
+ uint8_t payload;
+
+ /**
+ * Tx/Rx PHY
+ * For Tx PHY:
+ * 0x00 Reserved for future use
+ * 0x01 LE 1M PHY
+ * 0x02 LE 2M PHY
+ * 0x03 LE Coded PHY with S=8 data coding
+ * 0x04 LE Coded PHY with S=2 data coding
+ * 0x05-0xFF Reserved for future use
+ * For Rx PHY:
+ * 0x00 Reserved for future use
+ * 0x01 LE 1M PHY
+ * 0x02 LE 2M PHY
+ * 0x03 LE Coded PHY
+ * 0x04-0xFF Reserved for future use
+ */
+ uint8_t phy;
+
+ /**
+ * CTE length
+ * 0x00 No Constant Tone Extension
+ * 0x02 - 0x14 Length of the Constant Tone Extension in 8 us units
+ * All other values Reserved for future use
+ */
+ uint8_t cte_len;
+
+ /**
+ * CTE type
+ * 0x00 AoA Constant Tone Extension
+ * 0x01 AoD Constant Tone Extension with 1 us slots
+ * 0x02 AoD Constant Tone Extension with 2 us slots
+ * All other values Reserved for future use
+ */
+ uint8_t cte_type;
+
+ /**
+ * Slot durations
+ * 0x01 Switching and sampling slots are 1 us each
+ * 0x02 Switching and sampling slots are 2 us each
+ * All other values Reserved for future use
+ */
+ uint8_t slot_dur;
+
+ /**
+ * Length of switching pattern
+ * 0x02 - 0x4B The number of Antenna IDs in the pattern
+ * All other values Reserved for future use
+ */
+ uint8_t switching_pattern_len;
+
+ /// Antenna IDs
+ uint8_t antenna_id[BLE_MAX_SW_PAT_LEN];
+};
+
+/*
+ * EXPORTED VARIABLES DECALRATION
+ ****************************************************************************************
+ */
+
+/*
+ * FUNCTIONS DECLARATION
+ ****************************************************************************************
+ */
+
+/**
+ ****************************************************************************************
+ * @brief Initialize the LLD module
+ *
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void lld_init(uint8_t init_type);
+
+/**
+ * ***************************************************************************************
+ * @brief Read BLE clock
+ *
+ * @return Clock value (in half-slots, i.e. units of 312.5 us)
+ ****************************************************************************************
+ */
+uint32_t lld_read_clock(void);
+
+/**
+ ****************************************************************************************
+ * @brief Get local SCA
+ *
+ * @return local_sca Local SCA, physical low power clock accuracy (@see enum SCA)
+ ****************************************************************************************
+ */
+uint8_t lld_local_sca_get(void);
+
+
+/**
+ ****************************************************************************************
+ * @brief Get channel assessment
+ *
+ * @return Pointer to channel assessment data
+ ****************************************************************************************
+ */
+struct lld_ch_assess_data* lld_ch_assess_data_get(void);
+
+/**
+ * ***************************************************************************************
+ * @brief Renew the resolvable private addresses
+ ****************************************************************************************
+ */
+void lld_rpa_renew(void);
+
+/**
+ ****************************************************************************************
+ * @brief Add a device to white list
+ *
+ * @param[in] position Position of the device in the list
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random | 0xFF: anonymous adv)
+ ****************************************************************************************
+ */
+void lld_white_list_add(uint8_t position, struct bd_addr *bd_addr, uint8_t bd_addr_type);
+
+/**
+ ****************************************************************************************
+ * @brief Remove a device from white list
+ *
+ * @param[in] position Position of the device in the list
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random | 0xFF: anonymous adv)
+ ****************************************************************************************
+ */
+void lld_white_list_rem(uint8_t position, struct bd_addr *bd_addr, uint8_t bd_addr_type);
+
+/**
+ ****************************************************************************************
+ * @brief Add a device to periodic advertiser list
+ *
+ * @param[in] position Position of the device in the list
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random)
+ * @param[in] adv_sid Advertising Set ID
+ ****************************************************************************************
+ */
+void lld_per_adv_list_add(uint8_t position, struct bd_addr *bd_addr, uint8_t bd_addr_type, uint8_t adv_sid);
+
+/**
+ ****************************************************************************************
+ * @brief Remove a device from periodic advertiser list
+ *
+ * @param[in] position Position of the device in the list
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random)
+ * @param[in] adv_sids Bit field of advertising Set IDs to remove, 1 bit per ADV_SID
+ ****************************************************************************************
+ */
+void lld_per_adv_list_rem(uint8_t position, struct bd_addr *bd_addr, uint8_t bd_addr_type, uint16_t adv_sids);
+
+/**
+ ****************************************************************************************
+ * @brief Clear resolving list
+ ****************************************************************************************
+ */
+void lld_res_list_clear(void);
+
+/**
+ ****************************************************************************************
+ * @brief Add a device to resolving list
+ *
+ * @param[in] position Position in RAL
+ * @param[in] bd_addr Peer's BD Address
+ * @param[in] peer_irk Peer identification resolving key
+ * @param[in] localr_irk Local identification resolving key
+ * @param[in] bd_addr_type Peer's BD Address type (0: public | 1: random)
+ * @param[in] connected True: device is connected | false: not connected
+ * @param[in] in_wl True: device is in white list | false: not in white list
+ ****************************************************************************************
+ */
+void lld_res_list_add(uint8_t position, struct bd_addr const *bd_addr, struct irk const *peer_irk, struct irk const *local_irk, uint8_t bd_addr_type, bool connected, bool in_wl);
+
+/**
+ ****************************************************************************************
+ * @brief Remove a device from resolving list
+ *
+ * @param[in] position Position in RAL
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+void lld_res_list_rem(uint8_t position);
+
+/**
+ ****************************************************************************************
+ * @brief Update status of a device privacy: network privacy or device privacy
+ *
+ * @param[in] position Position in RAL
+ * @param[in] privacy_mode 0: network privacy / 1: device privacy
+ ****************************************************************************************
+ */
+void lld_res_list_priv_mode_update(uint8_t position, uint8_t privacy_mode);
+
+/**
+ ****************************************************************************************
+ * @brief Update status of a device connected or disconnected
+ *
+ * @param[in] position Position in RAL
+ * @param[in] connected True: device connected / False: device disconnected
+ ****************************************************************************************
+ */
+void lld_res_list_peer_update(uint8_t position, bool connected);
+
+/**
+ ****************************************************************************************
+ * @brief Get the current peer resolvable address used for a peer device
+ *
+ * @param[in] position Position in RAL
+ * @param[out] peer_res_addr Peer resolvable address
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_res_list_peer_rpa_get(uint8_t position, struct bd_addr *peer_res_addr);
+
+/**
+ ****************************************************************************************
+ * @brief Get the current local resolvable address used for a peer device
+ *
+ * @param[in] position Position in RAL
+ * @param[out] local_res_addr Local resolvable address
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_res_list_local_rpa_get(uint8_t position, struct bd_addr *local_res_addr);
+
+
+#if (BLE_BROADCASTER)
+/**
+ ****************************************************************************************
+ * @brief Start Advertising
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] params Pointer to extended advertising parameters structure
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_adv_start(uint8_t act_id, struct lld_adv_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Advertising
+ *
+ * @param[in] act_id Activity identifier
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_adv_stop(uint8_t act_id);
+
+/**
+ ****************************************************************************************
+ * @brief Update Advertising data
+ *
+ * Note: the Host can only update the advertising data less than 252 bytes (see HCI:7.8.54)
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] len Length of the data, in range [0:252]
+ * @param[in] buffer EM buffer containing the data
+ ****************************************************************************************
+ */
+void lld_adv_adv_data_update(uint8_t act_id, uint8_t len, uint16_t buffer);
+
+/**
+ ****************************************************************************************
+ * @brief Update advertising duration
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] duration Advertising duration (N * 10 ms) | 0x0000: infinite
+ ****************************************************************************************
+ */
+void lld_adv_duration_update(uint8_t act_id, uint16_t duration);
+
+/**
+ ****************************************************************************************
+ * @brief Update advertising random address
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] addr Random address
+ ****************************************************************************************
+ */
+void lld_adv_rand_addr_update(uint8_t act_id, struct bd_addr addr);
+
+/**
+ ****************************************************************************************
+ * @brief Reset the event count, update the duration and the maximum number of extended advertising events
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] duration Advertising duration (N * 10 ms) | 0x0000: infinite
+ * @param[in] max_ext_adv_evt Maximum number of extended advertising events
+ ****************************************************************************************
+ */
+void lld_adv_restart(uint8_t act_id, uint16_t duration, uint8_t max_ext_adv_evt);
+
+/**
+ ****************************************************************************************
+ * @brief Update Scan response data
+ *
+ * Note: the Host may can only update the advertising data less than 252 bytes (see HCI:7.8.55)
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] len Length of the data, in range [0:252]
+ * @param[in] buffer EM buffer containing the data
+ ****************************************************************************************
+ */
+void lld_adv_scan_rsp_data_update(uint8_t act_id, uint8_t len, uint16_t buffer);
+
+/**
+ ****************************************************************************************
+ * @brief Read the TX power used for advertising
+ *
+ * @param[in] act_id Activity identifier
+ *
+ * @return Used TX power in dBm, signed integer, range between -70dBm and 20dBm.
+ ****************************************************************************************
+ */
+uint8_t lld_adv_tx_pwr_get(uint8_t act_id);
+
+/**
+ ****************************************************************************************
+ * @brief Start Periodic advertising
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] params Pointer to extended advertising parameters structure
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_start(uint8_t act_id, struct lld_per_adv_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Periodic advertising
+ *
+ * @param[in] act_id Activity identifier
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_stop(uint8_t act_id);
+
+/**
+ ****************************************************************************************
+ * @brief Update Periodic advertising data
+ *
+ * Note: the Host may can only update the advertising data less than 252 bytes (see HCI:7.8.54)
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] len Length of the data, in range [0:252]
+ * @param[in] buffer EM buffer containing the data
+ ****************************************************************************************
+ */
+void lld_per_adv_data_update(uint8_t act_id, uint8_t len, uint16_t buffer);
+
+
+/**
+ ****************************************************************************************
+ * @brief Initiate periodic advertising channel map update
+ *
+ * @param[in] act_id Activity ID
+ * @param[in] map New channel map to be applied
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_ch_map_update(uint8_t act_id, struct le_chnl_map *map);
+
+/**
+ ****************************************************************************************
+ * @brief Get info from a periodic advertiser
+ *
+ * @param[in] act_id Activity ID
+ * @param[out] phy Periodic advertising PHY (@see enum lld_rate)
+ * @param[out] intv Periodic advertising interval in units of 1.25 ms
+ * @param[out] aa Periodic advertising Access Address
+ * @param[out] crcinit Periodic advertising CRC Initialization value
+ * @param[out] sync_ind_ts Timestamp of the AUX_SYNC_IND packet (in 312.5 us half-slots)
+ * @param[out] pa_evt_cnt Corresponding paEventCounter value (in half-us)
+ * @param[out] map Corresponding channel map
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_info_get(uint8_t act_id, uint8_t* phy, uint16_t* intv, struct access_addr* aa, struct crc_init* crcinit, uint32_t* sync_ind_ts, uint16_t* pa_evt_cnt, struct le_chnl_map *map);
+
+/**
+ ****************************************************************************************
+ * @brief Set the connectionless LLD channel map
+ *
+ * @param[in] map New channel map for connectionless activities
+ ****************************************************************************************
+ */
+void lld_ch_map_set(const struct le_chnl_map *map);
+
+/**
+ ****************************************************************************************
+ * @brief Update extended advertising sync info
+ *
+ * @param[in] act_id Extended advertising activity identifier
+ * @param[in] per_adv_id Periodic advertising activity identifier
+ * @param[in] per_adv_interval Periodic advertising interval
+ ****************************************************************************************
+ */
+void lld_adv_sync_info_update(uint8_t act_id, uint8_t per_adv_id, uint16_t per_adv_interval);
+
+#if BLE_CONLESS_CTE_TX
+/**
+ ****************************************************************************************
+ * @brief Start Periodic advertising CTE Tx
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] params Pointer to periodic advertising CTE parameters structure
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_cte_start(uint8_t act_id, struct lld_per_adv_cte_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Periodic advertising CTE Tx
+ *
+ * @param[in] act_id Activity identifier
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_cte_stop(uint8_t act_id);
+#endif // BLE_CONLESS_CTE_TX
+#endif // (BLE_BROADCASTER)
+
+#if (BLE_OBSERVER)
+/**
+ ****************************************************************************************
+ * @brief Start Scanning
+ *
+ * @param[in] act_id Activitiy ID
+ * @param[in] params Pointer to Scanning parameters structure
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_scan_start(uint8_t act_id, struct lld_scan_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Scanning
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_scan_stop(void);
+
+/**
+ ****************************************************************************************
+ * @brief Update scanning parameters
+ *
+ * @param[in] duration Scan duration (N * 10 ms) | 0x0000: Scan continuously until explicitly disable
+ * @param[in] period Scan period (N * 1.28 sec) | 0x0000: Periodic scanning disabled
+ * @param[in] bd_addr new random address | NULL: no update
+ ****************************************************************************************
+ */
+uint8_t lld_scan_params_update(uint16_t duration, uint16_t period, struct bd_addr *bd_addr);
+
+/**
+ ****************************************************************************************
+ * @brief Restart Scanning
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_scan_restart(void);
+
+/**
+ ****************************************************************************************
+ * @brief Start Periodic Advertising RX (Create Sync)
+ *
+ * @param[in] act_id Activity ID
+ * @param[in] options Sync options (@see enum per_sync_opt)
+ * @param[in] adv_sid Advertising SID
+ * @param[in] adv_addr_type Advertising address type
+ * @param[in] adv_addr Advertiser address
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_scan_create_sync(uint8_t act_id, uint8_t options, uint8_t adv_sid, uint8_t adv_addr_type, struct bd_addr * adv_addr);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Create Sync for Periodic Scan Rx (Cancel Sync)
+ *
+ * @param[in] act_id Activity ID
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_scan_create_sync_cancel(uint8_t act_id);
+
+/**
+ ****************************************************************************************
+ * @brief Start Periodic Advertising Rx
+ *
+ * @param[in] act_id Activity ID
+ * @param[in] params Pointer to Scanning parameters structure
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+****************************************************************************************
+*/
+uint8_t lld_sync_start(uint8_t act_id, struct lld_sync_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Update channel map on a periodic advertiser
+ *
+ * @param[in] act_id Activity ID
+ * @param[in] map Pointer to the new channel map to be applied
+ * @param[in] instant Instant when the new channel map has to be applied
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_sync_ch_map_update(uint8_t act_id, struct le_chnl_map *map, uint16_t instant);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Periodic Advertising RX (Terminate Sync)
+ *
+ * @param[in] act_id Activity ID
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_sync_stop(uint8_t act_id);
+
+#if BLE_CONLESS_CTE_RX
+/**
+ ****************************************************************************************
+ * @brief Start Periodic advertising IQ sampling
+ *
+ * @param[in] act_id Activity identifier
+ * @param[in] params Pointer to periodic advertising CTE parameters structure
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_sync_cte_start(uint8_t act_id, struct lld_sync_cte_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Periodic advertising IQ sampling
+ *
+ * @param[in] act_id Activity identifier
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_sync_cte_stop(uint8_t act_id);
+#endif // BLE_CONLESS_CTE_RX
+
+#endif // (BLE_OBSERVER)
+
+
+
+#if (BLE_CENTRAL)
+/**
+ ****************************************************************************************
+ * @brief Start Initiating
+ *
+ * @param[in] params Pointer to Initiating parameters structure
+ *
+ * @return status 0: success | 1-255: error (BLE error code)
+ ****************************************************************************************
+ */
+uint8_t lld_init_start(struct lld_init_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop Initiating
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_init_stop(void);
+
+#endif // (BLE_CENTRAL)
+
+
+#if (BLE_CENTRAL || BLE_PERIPHERAL)
+/**
+ ****************************************************************************************
+ * @brief Start link
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] params Pointer to Connection parameters structure
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_start(uint8_t link_id, struct lld_con_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop link
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] immediate Immediate execution of the event stop
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_stop(uint8_t link_id, bool immediate);
+
+/**
+ ****************************************************************************************
+ * @brief Send an LLCP packet
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] buf_elt Buffer element of the LLCP to send
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_llcp_tx(uint8_t link_id, struct ble_em_llcp_buf_elt* buf_elt);
+
+/**
+ ****************************************************************************************
+ * @brief Send an ACL packet
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] buf_elt Buffer element of the data to send
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_data_tx(uint8_t link_id, struct ble_em_acl_buf_elt* buf_elt);
+
+/**
+ ****************************************************************************************
+ * @brief Set ACL data flow
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] enable True: data flow ON / False: data flow OFF
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_data_flow_set(uint8_t link_id, bool enable);
+
+/**
+ ****************************************************************************************
+ * @brief Update link parameters
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] win_size Window size (in units of 1,25 ms, i.e. 2 slots)
+ * @param[in] win_off Window offset (in units of 1,25 ms, i.e. 2 slots)
+ * @param[in] interval Interval (in units of 1,25 ms, i.e. 2 slots)
+ * @param[in] latency Slave latency
+ * @param[in] timeout Timeout (in units of 10 ms, i.e. 16 slots)
+ * @param[in] instant Instant when the new parameters have to be applied (when connection event counter equals the instant)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_param_update(uint8_t link_id, uint8_t win_size, uint16_t win_off, uint16_t interval, uint16_t latency,
+ uint16_t timeout, uint16_t instant);
+
+/**
+ ****************************************************************************************
+ * @brief Update channel map
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] map Pointer to the new channel map to be applied
+ * @param[in] instant Instant when the new channel map has to be applied (when connection event counter equals the instant)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_ch_map_update(uint8_t link_id, struct le_chnl_map *map, uint16_t instant);
+
+/**
+ ****************************************************************************************
+ * @brief Update data length
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] eff_tx_time Maximum effective transmit time (in us)
+ * @param[in] eff_tx_octets Maximum effective transmit size (in bytes)
+ * @param[in] eff_rx_time Maximum effective receive time (in us)
+ * @param[in] eff_rx_octets Maximum effective receive size (in bytes)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_data_len_update(uint8_t link_id, uint16_t eff_tx_time, uint16_t eff_tx_octets, uint16_t eff_rx_time, uint16_t eff_rx_octets);
+
+/**
+ ****************************************************************************************
+ * @brief Update PHYs
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] tx_rate Transmit rate to be set (@see enum lld_rate)
+ * @param[in] rx_rate Receive rate to be set (@see enum lld_rate)
+ * @param[in] instant Instant where the new rates have to be applied (when connection event counter equals the instant)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_phys_update(uint8_t link_id, uint8_t tx_rate, uint8_t rx_rate, uint16_t instant);
+
+/**
+ ****************************************************************************************
+ * @brief Update TX length as per the new connection interval
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] interval Interval (in units of 1,25 ms, i.e. 2 slots)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_tx_len_update_for_intv(uint8_t link_id, uint16_t interval);
+
+/**
+ ****************************************************************************************
+ * @brief Update TX length as per the new TX rate
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] tx_rate Transmit rate to be set (@see enum lld_rate)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_tx_len_update_for_rate(uint8_t link_id, uint8_t tx_rate);
+
+/**
+ ****************************************************************************************
+ * @brief Gets current event counter
+ *
+ * @param[in] link_id Link identifier
+ *
+ * @return Current event counter value
+ ****************************************************************************************
+ */
+uint16_t lld_con_event_counter_get(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * Compute offset between a connection instant and another activity event with provided
+ * interval reference that follows
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] evt_cnt Reference connection event counter
+ * @param[in] interval Activity interval (1.25ms unit)
+ * @param[in] act_offset Activity Offset (625us unit)
+ *
+ * @return Computed offset with connection interval and provided interval (us unit)
+ ****************************************************************************************
+ */
+int32_t lld_con_activity_offset_compute(uint8_t link_id, uint16_t evt_cnt, uint16_t interval, uint16_t act_offset);
+
+/**
+ * Compute planning activity offset of the activity to create according to a specific offset range in us.
+ *
+ * @param[in] link_id Link Identifier
+ * @param[in] evt_cnt Reference connection event counter
+ * @param[in] interval Activity interval (1.25ms unit)
+ * @param[in|out] offset_min New activity minimum offset in us after connection reference
+ * @param[in|out] offset_max New activity maximum offset in us after connection reference
+ *
+ * @return Computed Activity offset in slots
+ */
+uint16_t lld_con_activity_act_offset_compute(uint8_t link_id, uint16_t evt_cnt, uint16_t interval,
+ uint32_t *offset_min, uint32_t *offset_max);
+
+/**
+ ****************************************************************************************
+ * @brief Set encryption mode in TX direction
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] enable false: disabled | true: enabled
+ ****************************************************************************************
+ */
+void lld_con_tx_enc(uint8_t link_id, bool enable);
+
+/**
+ ****************************************************************************************
+ * @brief Set encryption mode in RX direction
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] enable false: disabled | true: enabled
+ ****************************************************************************************
+ */
+void lld_con_rx_enc(uint8_t link_id, bool enable);
+
+/**
+ ****************************************************************************************
+ * @brief Load encryption Key
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] key Encryption key
+ * @param[in] iv Initialization Vector (for AES encryption only)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+void lld_con_enc_key_load(uint8_t link_id, struct ltk *key, struct initialization_vector *iv);
+
+/**
+ ****************************************************************************************
+ * @brief Get the current TX power
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] modulation Modulation (1:GFSK | 2:DQPSK | 3:8DPSK)
+ *
+ * @return Current TX power in dBm
+ ****************************************************************************************
+ */
+uint8_t lld_con_current_tx_power_get(uint8_t link_id, uint8_t mod);
+
+/**
+ ****************************************************************************************
+ * @brief Get the received RSSI
+ *
+ * @param[in] link_id Link identifier
+ *
+ * @return rssi RSSI in dBm
+ ****************************************************************************************
+ */
+int8_t lld_con_rssi_get(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * @brief Get the connection offset
+ *
+ * @param[in] link_id Link identifier
+ *
+ * @return con_offset Connection offset in slots (625 us)
+ ****************************************************************************************
+ */
+uint16_t lld_con_offset_get(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * @brief Set peer SCA
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] peer_sca Peer SCA (@see enum SCA)
+ ****************************************************************************************
+ */
+void lld_con_peer_sca_set(uint8_t link_id, uint8_t peer_sca);
+
+/**
+ ****************************************************************************************
+ * @brief Get connection event time
+ *
+ * @param[in] link_id Link identifier
+ * @param[out] con_evt_cnt Connection event counter
+ * @param[out] con_evt_time_hs Time of the connection event, in 312.5 us half-slots
+ * @param[out] con_evt_time_hus Time of the connection event, in half-us
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_time_get(uint8_t link_id, uint16_t* con_evt_cnt, uint32_t* con_evt_time_hs, uint16_t* con_evt_time_hus);
+#endif // (BLE_CENTRAL || BLE_PERIPHERAL)
+
+#if (BLE_PERIPHERAL)
+/**
+ ****************************************************************************************
+ * @brief Set the preferred slave latency
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] latency Preferred slave latency (in number of connection events)
+ ****************************************************************************************
+ */
+void lld_con_pref_slave_latency_set(uint8_t link_id, uint16_t latency);
+
+/**
+ ****************************************************************************************
+ * @brief Set the preferred slave event duration
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] Duration Preferred slave event duration (N * 0.625 ms)
+ ****************************************************************************************
+ */
+void lld_con_pref_slave_evt_dur_set(uint8_t link_id, uint16_t duration, bool single_tx);
+#endif // (BLE_PERIPHERAL)
+
+#if (BLE_ISO_MODE_0)
+
+/**
+ ****************************************************************************************
+ * @brief Inform that Isochronous mode is set-up and mic less encryption is required
+ *
+ * @param[in] link_id Link identifier
+ ****************************************************************************************
+ */
+void lld_con_audio_use_mic_less(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * @brief Start audio
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] iso_channel Isochronous channel
+ * @param[in] params Configuration parameters
+ *
+ * @return Executions status
+ ****************************************************************************************
+ */
+uint8_t lld_con_audio_start(uint8_t link_id, uint8_t iso_channel, struct lld_con_audio_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop audio
+ *
+ * @param[in] link_id Link identifier
+ *
+ * @return Excecutions status
+ ****************************************************************************************
+ */
+uint8_t lld_con_audio_stop(uint8_t link_id);
+
+#endif //(BLE_ISO_MODE_0)
+
+#if BLE_CON_CTE_REQ
+/**
+ ****************************************************************************************
+ * @brief Enable reception of CTE on connection
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] slot_dur Slot durations (1: 1us | 2: 2us)
+ * @param[in] switching_pattern_len Length of switching pattern (number of antenna IDs in the pattern)
+ *****************************************************************************************
+ */
+void lld_con_cte_rx_en(uint8_t link_id, uint8_t slot_dur, uint8_t switching_pattern_len);
+
+/**
+ ****************************************************************************************
+ * @brief Disable reception of CTE on connection
+ *
+ * @param[in] link_id Link identifier
+ *****************************************************************************************
+ */
+void lld_con_cte_rx_dis(uint8_t link_id);
+#endif // BLE_CON_CTE_REQ
+
+#if BLE_CON_CTE_RSP
+/**
+ ****************************************************************************************
+ * @brief Configure antenna switching for connection CTE Tx
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] switching_pattern_len Length of switching pattern (number of antenna IDs in the pattern)
+ * @param[in] cte_types CTE types (bit0: AOA | bit1: AOD-1us | bit2: AOD-2us)
+ *****************************************************************************************
+ */
+void lld_con_cte_tx_ant_switch_config(uint8_t link_id, uint8_t switching_pattern_len, uint8_t cte_types);
+
+/**
+ ****************************************************************************************
+ * @brief Set connection CTE Tx parameters
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] cte_len CTE length in 8 us units (0: No CTE | Range: 0x02 - 0x14)
+ * @param[in] cte_type CTE type (0x00: AOA | 0x01: AOD-1us | 0x02: AOD-2us)
+ *****************************************************************************************
+ */
+void lld_con_cte_tx_param_set(uint8_t link_id, uint8_t cte_len, uint8_t cte_type);
+#endif // BLE_CON_CTE_RSP
+
+/**
+ ****************************************************************************************
+ * @brief Start test mode (RX or TX)
+ *
+ * @param[in] params Pointer to Scanning parameters structure
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_test_start(struct lld_test_params* params);
+
+/**
+ ****************************************************************************************
+ * @brief Stop test mode
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_test_stop(void);
+
+#if (RW_DEBUG)
+/**
+ ****************************************************************************************
+ * @brief Read BLE core register
+ *
+ * @param[in] reg_addr Register address
+ *
+ * @return reg_value Register value
+ ****************************************************************************************
+ */
+uint16_t lld_reg_rd(uint16_t reg_addr);
+
+/**
+ ****************************************************************************************
+ * @brief Write BLE core register
+ *
+ * @param[in] reg_addr Register address
+ * @param[in] reg_value Register value
+ ****************************************************************************************
+ */
+void lld_reg_wr(uint16_t reg_addr, uint16_t reg_value);
+#endif // (RW_DEBUG)
+
+/**
+ ****************************************************************************************
+ * @brief Get connection synchronization information
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] ref_con_evt_cnt Reference connection event count
+ * @param[in] ref_con_evt_ts Reference connection event timestamp (in 312.5 us half-slots)
+ * @param[in] ref_con_evt_bit_off Reference connection event bit offset (in half-us)
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_con_sync_info_get(uint8_t link_id, uint16_t* ref_con_evt_cnt, uint32_t* ref_con_evt_ts, uint16_t* ref_con_evt_bit_off);
+
+/**
+ ****************************************************************************************
+ * @brief Get sync info from a periodic sync activity
+ *
+ * @param[in] act_id Activity ID
+ * @param[out] phy Periodic advertising PHY (@see enum lld_rate)
+ * @param[out] intv Periodic advertising interval in units of 1.25 ms
+ * @param[out] aa Periodic advertising Access Address
+ * @param[out] crcinit Periodic advertising CRC Initialization value
+ * @param[out] sync_ind_ts Timestamp of the AUX_SYNC_IND packet (in 312.5 us half-slots)
+ * @param[out] sync_ind_bit_off Bit offset of the AUX_SYNC_IND packet (in half-us)
+ * @param[out] pa_evt_cnt Corresponding paEventCounter value
+ * @param[out] map Corresponding channel map
+ * @param[out] sca Periodic advertising Sleep Clock Accuracy
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_sync_info_get(uint8_t act_id, uint8_t* phy, uint16_t* intv, struct access_addr* aa, struct crc_init* crcinit, uint32_t* sync_ind_ts, uint16_t* sync_ind_bit_off, uint16_t* pa_evt_cnt, struct le_chnl_map *map, uint8_t* sca);
+
+/// @} LLD
+#endif // LLD_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lld/lld_int.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lld/lld_int.h
new file mode 100755
index 0000000..ac3f6ad
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lld/lld_int.h
@@ -0,0 +1,400 @@
+/**
+****************************************************************************************
+*
+* @file lld_int.h
+*
+* @brief LLD Internal API
+*
+* Copyright (C) RivieraWaves 2009-2016
+*
+****************************************************************************************
+*/
+
+#ifndef LLD_INT_H_
+#define LLD_INT_H_
+
+/**
+ ****************************************************************************************
+ * @addtogroup LLD
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include "rwip_config.h" // stack configuration
+
+#include // integer
+#include // boolean
+
+#include "lld.h"
+
+
+/*
+ * MACROS
+ ****************************************************************************************
+ */
+
+
+/*
+ * CONSTANT DEFINITIONS
+ ****************************************************************************************
+ */
+
+/// Allocate an event with an associated data structure
+#define LLD_ALLOC_EVT(data_struct) (struct data_struct *) kernel_malloc(sizeof(struct data_struct), KERNEL_MEM_ENV);
+
+/// Initialize memory of an event and an associated data structure
+#define LLD_INIT_EVT(evt, data_struct) memset(evt , 0, sizeof(struct data_struct));
+
+#if 0 //(RW_BLE_WLAN_COEX) || (RW_BLE_MWS_COEX)
+/// Coexistence disabled
+#define BLECOEX_DISABLED 0
+/// Coexistence enabled
+#define BLECOEX_ENABLED 1
+
+/// Coexistence Definitions
+#define BLEMPRIO_CONREQ 0
+#define BLEMPRIO_LLCP 1
+#define BLEMPRIO_DATA 2
+#define BLEMPRIO_INITSC 3
+#define BLEMPRIO_ACTSC 4
+#define BLEMPRIO_CONADV 5
+#define BLEMPRIO_NCONADV 6
+#define BLEMPRIO_PASSC 7
+#endif // (RW_BLE_WLAN_COEX) || (RW_BLE_MWS_COEX)
+
+/// Undefined BT clock value
+#define LLD_CLOCK_UNDEF 0xFFFFFFFF
+
+/// Max fine counter value
+#define LLD_FINECNT_MAX (HALF_SLOT_SIZE - 1)
+
+/// Adv packet error masking
+#define LLD_ADV_ERR_MASK (EM_BLE_SYNC_ERR_BIT|EM_BLE_LEN_ERR_BIT|EM_BLE_CRC_ERR_BIT|EM_BLE_PRIV_ERR_BIT|EM_BLE_TYPE_ERR_BIT)
+
+/// ADV_INT (time between two ADV_XXX packets) in us
+#define BLE_ADV_INT_US (729)
+
+/// Minimum scan window size when advertising using legacy PDUs in us
+#define BLE_ADV_MIN_SCAN_WIN_SIZE_US (40)
+
+/// Calculate AUX OFFSET in usecs from AuxPtr AUX Offset and Offset Units fields
+#define AUX_OFFSET_USECS(aux_offset, offset_units) ((aux_offset) * ((offset_units)?300:30))
+
+/// AUX OFFSET Offset Units in usecs
+#define AUX_OFFSET_UNIT_USECS(offset_units) ((offset_units)?300:30)
+
+/// Calculate drift in ppm from local drift and AuxPtr CA field
+#define AUX_DRIFT_PPM(local_drift, ca) ((local_drift) + ((ca)?50:500))
+
+/// Margin for event time reservation (in half-us)
+#define BLE_RESERVATION_TIME_MARGIN_HUS (2 * IP_PREFETCHABORT_TIME_US)
+
+/// AUX_PTR Thresholds, below which HW manages AuxPtr automatically in same event (granularity 16us, 0 disabled)
+#define LLD_TX_AUX_PTR_THR (0xFF) // 255 x 16 = 4080us (max value)
+#define LLD_RX_AUX_PTR_THR (150) // 150 x 16 = 2520us (optimized for SW offload)
+
+/// Maximum supported CTE IQ samples - CTE RX descriptors dimensioned REG_EM_BLE_RX_CTE_DESC_SIZE to accommodate maximum
+// An IQ sample is taken each usec during the reference period (8us) and one each sample slot thereafter.
+// This results in 8 reference IQ samples, 1 to 37 IQ samples with 2 us slots, and 2 to 74 IQ samples with 1 us slots, meaning 9 to 82 samples in total.
+#define LLD_MAX_CTE_IQ_SAMPLES (82)
+
+/// Hoping mode
+enum lld_hop_mode
+{
+ /// Frequency Hopping Scheme #1
+ LLD_HOP_MODE_CHAN_SEL_1 = 0,
+ /// Frequency Hopping Scheme #2
+ LLD_HOP_MODE_CHAN_SEL_2 = 1,
+ /// Primary Advertising Channel randomized order mode
+ LLD_HOP_MODE_RAND_PRIM_ADV_CH = 3,
+};
+
+/*
+ * STRUCTURE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/// LLD environment structure
+struct lld_env_tag
+{
+ /// Channel assessment data
+ struct lld_ch_assess_data ch_assess;
+
+ /// ADV_SIDs bit field for PAL entries
+ uint16_t adv_sids[BLE_WHITELIST_MAX];
+
+ /// Maximum value of the local clock drift (in ppm)
+ uint16_t local_drift;
+
+ /// Local sleep clock accuracy (see @enum SCA)
+ uint16_t local_sca;
+
+ /// Current RX descriptor index [0:N-1]
+ uint8_t curr_rxdesc_index;
+
+ /// LE Coded PHY 500 Kbps selection (false: 125 Kbps, true: 500 Kbps)
+ bool le_coded_phy_500;
+
+ /// Connectionless channel map lookup table (more time-efficient than parsing a bitmap every time)
+ uint8_t ch_map_tab[DATA_CHANNEL_NB];
+
+ /// Number of used channels in the connectionless channel map
+ uint8_t nb_used_ch;
+};
+
+/// LLD Scheduling information for next AUX channel
+struct lld_calc_aux_rx_out
+{
+ /// Timestamp (in half-slots) and delay (in half-us) from slot boundary for AUX offload channel receive
+ rwip_time_t time;
+
+ /// Sync window size for the AUX offload channel (us)
+ uint32_t sync_win_size_us;
+
+ /// Channel index for AUX offload channel
+ uint8_t ch_idx;
+
+ /// PHY rate for AUX offload channel (@see enum lld_rate)
+ uint8_t rate;
+};
+
+/*
+ * VARIABLE DECLARATION
+ *****************************************************************************************
+ */
+
+/// Table indicating the expected sync position depending on the rate used
+extern uint16_t lld_exp_sync_pos_tab[];
+
+/// LLD environment variable
+extern struct lld_env_tag lld_env;
+
+/*
+ * FUNCTIONS DECLARATION
+ ****************************************************************************************
+ */
+
+/**
+ ****************************************************************************************
+ * @brief Free current RX descriptor
+ ****************************************************************************************
+ */
+void lld_rxdesc_free(void);
+
+/**
+ ****************************************************************************************
+ * @brief Check if the current RX descriptor is consumed by a given activity
+ *
+ * @param[in] label representing the activity (as indicated in the CS)
+ *
+ * @return True if current RX descriptor is consumed by the activity identified by label
+ ****************************************************************************************
+ */
+bool lld_rxdesc_check(uint8_t label);
+
+/**
+ ****************************************************************************************
+ * @brief Assess a RF channel
+ *
+ * @param[in] channel Channel index
+ * @param[in] rx_ok True: reception is correct | False: reception is corrupted
+ * @param[in] timestamp Timestamp of the assessment
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+void lld_channel_assess(uint8_t channel, bool rx_ok, uint32_t timestamp);
+
+/**
+ ****************************************************************************************
+ * @brief Search if a device is in resolving address list
+ *
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random)
+ *
+ * @return position of the device in the list (Max value if not found)
+ ****************************************************************************************
+ */
+uint8_t lld_ral_search(const struct bd_addr *bd_addr, uint8_t bd_addr_type);
+
+#if (BLE_BROADCASTER)
+/**
+ ****************************************************************************************
+ * @brief Initialize advertising driver
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void lld_adv_init(uint8_t init_type);
+
+/**
+ ****************************************************************************************
+ * @brief Initialize periodic advertising driver
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void lld_per_adv_init(uint8_t init_type);
+
+/**
+ ****************************************************************************************
+ * @brief Get sync info from a periodic advertiser
+ *
+ * @param[in] act_id Activity ID
+ * @param[out] sync_ind_ts Timestamp of the AUX_SYNC_IND packet
+ * @param[out] pa_evt_cnt Corresponding paEventCounter value
+ * @param[out] map Corresponding channel map
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_sync_info_get(uint8_t act_id, uint32_t* sync_ind_ts, uint16_t* pa_evt_cnt, struct le_chnl_map *map);
+
+/**
+ ****************************************************************************************
+ * @brief Get initialization info from a periodic advertiser
+ *
+ * @param[in] act_id Activity ID
+ * @param[out] aa Periodic advertising Access Address
+ * @param[out] crcinit Periodic advertising CRC Initialization value
+ * @param[out] chm Periodic advertising Channel Map
+ *
+ * @return status 0: success | 1-255: error
+ ****************************************************************************************
+ */
+uint8_t lld_per_adv_init_info_get(uint8_t act_id, struct access_addr* aa, struct crc_init* crcinit, struct le_chnl_map* chm);
+
+/**
+ ****************************************************************************************
+ * @brief Select an auxiliary channel index
+ *
+ * @return ch_idx Selected channel index
+ ****************************************************************************************
+ */
+uint8_t lld_ch_idx_get(void);
+#endif // (BLE_BROADCASTER)
+
+/**
+ ****************************************************************************************
+ * @brief Generating the Access Address for a new Link.
+ *
+ * The function will generate the following 4 bytes:
+ * |Byte 3 | Byte 2 | Byte 1 | Byte 0 |
+ * |CT1 | PRAND_4MSB | CT2 | PRAND_4LSB | CT2 | INCRAND_4MSB | CT2 | INCRAND_4LSB|
+ *
+ * The AA shall be a random 32-bit value, generated by the device in the Initiating State.
+ * It shall have no more than six consecutive zeros or ones.
+ * It shall not be the advertising channel packets Access Address.
+ * It shall not be a sequence that differs from the advertising channel packets Access Address by only one bit.
+ * It shall not have all four octets equal.
+ * It shall have no more than 24 transitions.
+ * It shall have a minimum of two transitions in the most significant six bits
+ *
+ * For each new generated AA,
+ * - PRAND is a pseudo random 1 byte number.
+ * - INCRAND is an initially generated random number, increased by 1 for each AA
+ * - CT2 is toggled between the two values
+ * - CT1 is again toggled between the 3 possible values
+ *
+ * Considering the formats of CT1 and CT2, the rules for AA generation are respected:
+ * - since CT2 is put between bytes, and has two equal bits on each half,
+ * it ensures no more than 6 consecutive bits inside the address. CT1 also.
+ *
+ * - CT2 and CT1 ensure that the newly generated address is different and at least 1 bit
+ * different from the advertising access address
+ *
+ * - since CT1 != CT2 , the four bytes of the AA can never be equal
+ *
+ * - Since in a 32 bit number there are 31 transitions, and the neighboring equal bits
+ * in CT1 and CT2 represent 7 transitions, there can never be more than 31-7=24
+ * transitions in the AA
+ *
+ * - The format of CT1 ensures at least two transitions in the most significant 6 bits.
+ *
+ * BT5.0 Requirements:
+ *
+ * 1/ On an implementation that also supports the LE Coded PHY the Access Address shall also
+ * meet the following requirements:
+ * It shall have at least three ones in the least significant 8 bits.
+ * It shall have no more than eleven transitions in the least significant 16 bits.
+ * - CT2 format selected to satisfy these requirements.
+ *
+ * 2/ It shall not be the Access Address for any enabled periodic advertising.
+ * - The act_id is now passed as an arguemnt to AA generation to ensure unique values.
+ *
+ * @param acc_addr Pointer to the 4 byte array space for the AA.
+ *
+ *
+ *****************************************************************************************
+ */
+void lld_aa_gen(uint8_t *acc_addr, uint8_t act_id);
+
+/**
+ ****************************************************************************************
+ * @brief Calculate an AUX RX activity
+ *
+ * @param[in] ux_rx_out Scheduling information for next AUX channel
+ * @param[out] index_pkt current RX descriptor index
+ * @param[out] aux_data received Aux data
+ *
+ * @return offload true: offload. false: no offload
+ ****************************************************************************************
+ */
+bool lld_calc_aux_rx(struct lld_calc_aux_rx_out* aux_rx_out, uint8_t index_pkt, uint32_t aux_data);
+
+
+#if (BLE_OBSERVER)
+/**
+ ****************************************************************************************
+ * @brief Initialize scanning driver
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+
+void lld_scan_init(uint8_t init_type);
+
+/**
+****************************************************************************************
+* @brief Initialize periodic advertising Rx driver
+* @param[in] init_type Type of initialization (@see enum rwip_init_type)
+****************************************************************************************
+*/
+void lld_sync_init(uint8_t init_type);
+
+#endif // (BLE_OBSERVER)
+
+#if (BLE_CENTRAL)
+/**
+ ****************************************************************************************
+ * @brief Initialize initiating driver
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void lld_init_init(uint8_t init_type);
+#endif // (BLE_CENTRAL)
+
+#if (BLE_CENTRAL || BLE_PERIPHERAL)
+/**
+ ****************************************************************************************
+ * @brief Initialize connection driver
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void lld_con_init(uint8_t init_type);
+
+#endif // (BLE_CENTRAL || BLE_PERIPHERAL)
+
+/**
+ ****************************************************************************************
+ * @brief Initialize test driver
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void lld_test_init(uint8_t init_type);
+
+
+/// @} LLD
+#endif // LLD_INT_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lli.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lli.h
new file mode 100755
index 0000000..6e7db46
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/lli.h
@@ -0,0 +1,101 @@
+/**
+ ****************************************************************************************
+ *
+ * @file lli.h
+ *
+ * @brief Main API file for the Link Layer ISO
+ *
+ * Copyright (C) RivieraWaves 2009-2015
+ *
+ ****************************************************************************************
+ */
+
+#ifndef LLI_H_
+#define LLI_H_
+
+/**
+ ****************************************************************************************
+ * @defgroup LLI Link Layer ISO
+ * @ingroup ROOT
+ * @brief BLE Lower Layers
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include "rwip_config.h"
+
+#if (BLE_ISO_PRESENT)
+
+#include "rwip_task.h" // Task definitions
+#include "common_bt.h" // BLE standard definitions
+#include "common_llcp.h" // Definition of LL_CIS_REQ PDU
+#include "lld.h" // LLD Definitions
+
+/*
+ * DEFINES
+ ****************************************************************************************
+ */
+
+/*
+ * TYPE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+
+/**
+ ****************************************************************************************
+ * @brief Initialization of the BLE LLI task
+ *
+ * This function initializes the the LLI task.
+ *
+ * @param[in] reset True: reset | False: init
+ ****************************************************************************************
+ */
+void lli_init(bool reset);
+
+/**
+ ****************************************************************************************
+ * @brief Inform that a link has terminated to immediately stop corresponding ISO channels
+ *
+ * @param[in] link_id Link identifier
+ * @param[in] reason Link termination reason
+ ****************************************************************************************
+ */
+void lli_link_stop_ind(uint8_t link_id, uint8_t reason);
+
+#if (BLE_ISO_MODE_0)
+/**
+ ****************************************************************************************
+ * @brief Check if link is used for audio mode 0
+ *
+ * @param[in] link_id Link identifier
+ *
+ * @return True if link is used for audio mode 0
+ ****************************************************************************************
+ */
+bool lli_am0_check(uint8_t link_id);
+#endif // (BLE_ISO_MODE_0)
+
+/**
+ ****************************************************************************************
+ * @brief Retrieve number of available channels
+ *
+ * @return Number of channel that can be allocated
+ ****************************************************************************************
+ */
+uint8_t lli_nb_chan_ava_get(void);
+
+#endif //(BLE_ISO_PRESENT)
+
+/// @} LLI
+
+#endif // LLI_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llm.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llm.h
new file mode 100755
index 0000000..2b22f6e
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llm.h
@@ -0,0 +1,402 @@
+/**
+ ****************************************************************************************
+ *
+ * @file llm.h
+ *
+ * @brief Main API file for the Link Layer manager
+ *
+ * Copyright (C) RivieraWaves 2009-2015
+ *
+ ****************************************************************************************
+ */
+
+#ifndef LLM_H_
+#define LLM_H_
+
+/**
+ ****************************************************************************************
+ * @defgroup LLM Link Layer Manager
+ * @ingroup ROOT
+ * @brief BLE Lower Layers
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include "rwip_task.h" // Task definitions
+#include "common_bt.h" // BLE standard definitions
+
+/*
+ * TYPE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/// Parameters for syncing to a periodic advertiser
+struct llm_per_adv_sync_params
+{
+ /// Activity identifier
+ uint8_t act_id;
+
+ /// SyncInfo
+ struct sync_info syncinfo;
+
+ /// The clock value of the reference time (in half-slot)
+ uint32_t base_cnt;
+
+ /// The fine timer value the reference time (in half-us)
+ uint16_t fine_cnt;
+
+ /// ID (provided by the Host)
+ uint16_t id;
+
+ /// The bit rate of periodic advertising (@see enum lld_rate)
+ uint8_t rate;
+
+ /// Advertising SID
+ uint8_t adv_sid;
+
+ /// Advertising address type (0: Public / 1: Random)
+ uint8_t adv_addr_type;
+
+ /// Advertiser address
+ struct bd_addr adv_addr;
+
+ /// Advertiser RPA (unresolved RPA if advertiser address is a resolved identity address, 0 otherwise)
+ struct bd_addr adv_rpa;
+
+ /// max Skip after receive
+ uint16_t skip;
+
+ /// Sync timeout (Time=N*10ms)
+ uint16_t sync_to;
+
+ /// Additional drift to consider on given time reference (in half-us)
+ uint16_t add_drift;
+
+ /// Advertising report initial state (enable/disable)
+ bool adv_rep_en;
+
+ /// Specifies whether to only synchronize to periodic advertising with certain types of CTE (@see enum sync_cte_type)
+ uint8_t sync_cte_type;
+};
+
+
+/*
+ * MESSAGES
+ ****************************************************************************************
+ */
+
+/// Message API of the LLM task
+/*@TRACE
+ * llm_pub_key_gen_ind = ecc_result_ind
+ * llm_dh_key_gen_ind = ecc_result_ind
+ * llm_encrypt_ind = ble_aes_func_res_ind*/
+enum llm_msg_id
+{
+ LLM_MSG_ID_FIRST = TASK_BLE_FIRST_MSG(TASK_BLE_ID_LLM),//!< LLM_MSG_ID_FIRST
+
+ #if (BLE_OBSERVER)
+ /// Send ACAD Data information
+ LLM_ACAD_DATA_IND, //!< LLM_ACAD_DATA_IND
+ #endif // (BLE_OBSERVER)
+
+ /*
+ * ************** Msg LLM->LLC****************
+ */
+ #if (BLE_CENTRAL || BLE_PERIPHERAL)
+ /// Indicate that the channel map has to be updated on link connection
+ LLM_CH_MAP_UPDATE_IND, //!< LLM_CH_MAP_UPDATE_IND
+ #endif //(BLE_CENTRAL || BLE_PERIPHERAL)
+
+ /*
+ * ************** Msg LLM->LLM****************
+ */
+ LLM_SCAN_PERIOD_TO, //!< LLM_SCAN_PERIOD_TO
+ LLM_CH_MAP_TO, //!< LLM_CH_MAP_TO
+ #if (BLE_CENTRAL || BLE_BROADCASTER)
+ LLM_NEW_HOST_CLASS_TO,
+ #endif //(BLE_CENTRAL || BLE_BROADCASTER)
+ LLM_RPA_RENEW_TO, //!< LLM_RPA_RENEW_TO
+ /// Inform that encryption has been performed
+ LLM_ENCRYPT_IND, //!< LLM_ENCRYPT_IND
+
+ LLM_PUB_KEY_GEN_IND, //!< LLM_PUB_KEY_GEN_IND
+ LLM_DH_KEY_GEN_IND, //!< LLM_DH_KEY_GEN_IND
+};
+
+/// LLM Encryption Request parameters structure
+/*@TRACE*/
+struct llm_encrypt_req
+{
+ ///Long term key structure
+ struct ltk key;
+ ///Pointer to buffer with plain data to encrypt - 16 bytes
+ uint8_t plain_data[ENC_DATA_LEN];
+};
+
+/// LLM Encryption indication structure
+/*@TRACE*/
+struct llm_encrypt_rsp
+{
+ /// Status of the encryption
+ uint8_t status;
+ ///Encrypted data
+ uint8_t encrypted_data[ENC_DATA_LEN];
+};
+
+
+/// AES function execution result
+/*@TRACE*/
+struct llm_encrypt_ind
+{
+ /// Status of AES execution
+ uint8_t status;
+ /// Result of the
+ uint8_t result[KEY_LEN];
+};
+
+
+#if (BLE_OBSERVER)
+/// LLM ACAD data indication structure
+/*@TRACE*/
+struct llm_acad_data_ind
+{
+ /// Sync handle
+ uint16_t sync_handle;
+ /// Status the indication - use to detect loss of periodic sync
+ uint8_t status;
+ /// ADV Data Type
+ uint8_t ad_type;
+ /// Reference event counter of the periodic advertiser when report received
+ uint16_t ref_evt_cnt;
+
+ /// length of the data field
+ uint8_t data_len;
+ /// ACAD Data
+ uint8_t data[__ARRAY_EMPTY];
+};
+#endif // (BLE_OBSERVER)
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+
+/**
+ ****************************************************************************************
+ * @brief Initialization of the BLE LLM task
+ *
+ * This function initializes the the LLM task, as well as the environment of the LLM
+ *
+ * @param[in] init_type Type of initialization (@see enum rwip_init_type)
+ ****************************************************************************************
+ */
+void llm_init(uint8_t init_type);
+
+#if (BLE_CENTRAL || BLE_PERIPHERAL)
+/**
+ ****************************************************************************************
+ * @brief This function handles LE link disconnection.
+ *
+ * @param[in] link_id Link Identifier
+ ****************************************************************************************
+ */
+void llm_link_disc(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * @brief Indicate activity requires accurate clock
+ *
+ * @param[in] act_id Activity ID
+ * @param[in] clk_acc True if activity requires accurate clock
+ ****************************************************************************************
+ */
+void llm_clk_acc_set(uint8_t act_id, bool clk_acc);
+#endif // (BLE_CENTRAL || BLE_PERIPHERAL)
+
+/**
+ ****************************************************************************************
+ * @brief This function is used to get the master channel map
+ *
+ * @return Pointer to master channel map
+ ****************************************************************************************
+ */
+struct le_chnl_map* llm_master_ch_map_get(void);
+
+/**
+ ****************************************************************************************
+ * @brief This function is used to check if an event is unmasked/masked
+ *
+ * @param[in] event_id Bit position of the event in the mask (see standard specification part II.E.7.8.1)
+ *
+ * @return True: event allowed | False: event masked
+ ****************************************************************************************
+ */
+bool llm_le_evt_mask_check(uint8_t event_id);
+
+/**
+ ****************************************************************************************
+ * @brief Retrieve LE Local Supported features
+ *
+ * @return Local feature mask
+ ****************************************************************************************
+ */
+const struct le_features* llm_le_features_get(void);
+
+/**
+ ****************************************************************************************
+ * @brief This function is used to get the RF Tx path compensation value
+ *
+ * @return RF Tx path compensation value (Range: -128.0 dB <= N <= 128.0 dB, Units: 0.1 dB)
+ ****************************************************************************************
+ */
+int16_t llm_tx_path_comp_get(void);
+
+/**
+ ****************************************************************************************
+ * @brief This function is used to get the RF Rx path compensation value
+ *
+ * @return RF Rx path compensation value (Range: -128.0 dB <= N <= 128.0 dB, Units: 0.1 dB)
+ ****************************************************************************************
+ */
+int16_t llm_rx_path_comp_get(void);
+
+/**
+ ****************************************************************************************
+ * @brief This function returns a pointer to the interval element of the link_id provided.
+ *
+ * @param[in] link_id Link Identifier
+ *
+ * @return Pointer to the associated interval element
+ ****************************************************************************************
+ */
+struct sch_plan_elt_tag *llm_plan_elt_get(uint8_t link_id);
+
+/**
+ ****************************************************************************************
+ * @brief Get available activity index
+ *
+ * @param[out] act_id Activity Identifier allocated
+ *
+ * @return - COMMON_ERROR_NO_ERROR: if succeed
+ * - COMMON_ERROR_CON_LIMIT_EXCEED: if no activity available
+ ****************************************************************************************
+ */
+uint8_t llm_activity_free_get(uint8_t* act_id);
+/**
+ ****************************************************************************************
+ * @brief Free activity handle related to the activity
+ *
+ * @param[in] act_id Activity Identifier
+ ****************************************************************************************
+ */
+void llm_activity_free_set(uint8_t act_id);
+
+/**
+ ****************************************************************************************
+ * @brief Get advertising activity identifiers
+ *
+ * @param[in] adv_hdl Advertising handle
+ * @param[out] ext_adv_id Extended advertising ID
+ * @param[out] per_adv_id Periodic advertising ID
+ *
+ * @return - COMMON_ERROR_NO_ERROR: if succeed
+ * - COMMON_ERROR_UNKNOWN_ADVERTISING_ID: if no advertising set exists
+ * - COMMON_ERROR_COMMAND_DISALLOWED: if periodic advertising not in progress
+ ****************************************************************************************
+ */
+uint8_t llm_adv_act_id_get(uint8_t adv_hdl, uint8_t* ext_adv_id, uint8_t* per_adv_id);
+
+/**
+ ****************************************************************************************
+ * @brief Get periodic advertising train identifiers
+ *
+ * @param[in] act_id Activity ID of extended advertising
+ * @param[out] sid Advertising SID
+ * @param[out] atype Advertising address type (0: public, 1: random)
+ * @param[out] adva Advertising address (RPA if address is resolvable)
+ *
+ * @return - COMMON_ERROR_NO_ERROR: if succeed
+ * - COMMON_ERROR_COMMAND_DISALLOWED: if periodic advertising not in progress
+ ****************************************************************************************
+ */
+uint8_t llm_adv_set_id_get(uint8_t act_id, uint8_t* sid, uint8_t* atype, struct bd_addr* adva);
+
+#if (BLE_ISO_MODE_0)
+/**
+ ****************************************************************************************
+ * @brief Get if Activity is an active link
+ *
+ * @param[out] act_id Activity Identifier
+ *
+ * @return true if in connected state, false else
+ ****************************************************************************************
+ */
+bool llm_iso_link_active(uint8_t act_id);
+#endif // (BLE_ISO_MODE_0)
+
+
+/**
+ ****************************************************************************************
+ * @brief Get if Activity is ongoing
+ *
+ * @return true if active
+ ****************************************************************************************
+ */
+bool llm_activity_ongoing_check(void);
+
+/**
+ ****************************************************************************************
+ * @brief Attach a task with a periodic scanner to receive specific AD Type data
+ *
+ * @param[in] sync_act_id Sync activity ID
+ * @param[in] ad_type AD Type to retrieve in ACAD data
+ * @param[in] task Task that expect the LLM_ACAD_DATA_IND message
+ *
+ * @return COMMON_ERROR_NO_ERROR if the periodic sync is found
+ ****************************************************************************************
+ */
+uint8_t llm_scan_sync_acad_attach(uint8_t sync_act_id, uint8_t ad_type, uint16_t task);
+
+/**
+ ****************************************************************************************
+ * @brief Get periodic sync information
+ *
+ * @param[in] sync_act_id Sync activity ID
+ * @param[out] sid Extended advertising set identifier
+ * @param[out] atype Extended advertiser address type (0: public | 1: random)
+ * @param[out] adva Extended advertiser address (for resolvable addresses, this is the unresolved version)
+ *
+ * @return - COMMON_ERROR_NO_ERROR: if succeed
+ * - COMMON_ERROR_UNKNOWN_ADVERTISING_ID: if the sync activity does not exist
+ ****************************************************************************************
+ */
+uint8_t llm_scan_sync_info_get(uint8_t sync_act_id, uint8_t* sid, uint8_t* atype, struct bd_addr* adva);
+
+/**
+ ****************************************************************************************
+ * @brief Synchronize to a periodic advertising
+ *
+ * param[in] params Input parameters (@see llm_per_adv_sync_params)
+ *
+ * @return 0 if synchronization attempt is started, >0 if issue
+ ****************************************************************************************
+ */
+uint8_t llm_per_adv_sync(struct llm_per_adv_sync_params * params);
+
+/**
+ ****************************************************************************************
+ * @brief Get pointer of the RAL table in RAM
+ *
+ * @return pointer of the RAL table in RAM
+ ****************************************************************************************
+ */
+struct ral_entry* llm_ral_get(void);
+
+/// @} LLM
+
+#endif // LLM_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llm/llm_int.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llm/llm_int.h
new file mode 100755
index 0000000..e08d557
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/ble/ll/src/llm/llm_int.h
@@ -0,0 +1,634 @@
+/**
+ ****************************************************************************************
+ *
+ * @file llm.h
+ *
+ * @brief Link layer manager internal definition
+ *
+ * Copyright (C) RivieraWaves 2009-2016
+ *
+ ****************************************************************************************
+ */
+
+#ifndef LLM_INT_H_
+#define LLM_INT_H_
+
+/**
+ ****************************************************************************************
+ * @addtogroup LLM Link layer Manager
+ * @{
+ ****************************************************************************************
+ */
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include // standard integer
+#include // standard boolean
+
+#include "common_bt.h" // BT defines
+#include "sch_plan.h" // Scheduling Planner
+
+/*
+ * DEFINES
+ ****************************************************************************************
+ */
+
+/// Maximum number of instances of the LLM task
+#define LLM_IDX_MAX 1
+
+/// Invalid activity identifier
+#define LLM_ACT_IDX_INVL 0xFF
+
+/// Invalid advertising handle (assigned to legacy advertising for internal management)
+#define LLM_ADV_HDL_INVL 0xFF
+
+/*
+ * ENUMERATIONS
+ ****************************************************************************************
+ */
+
+/**
+ * Information bit field for advertising duplicate filtering
+ * 15:10 9:8 7:6 5:4 3:2 1 0
+ * +---------------------------------------+--------------+--------------+--------------+--------------+------+------+
+ * | | CHAIN2_CODED | CHAIN2_1M | CHAIN1_CODED | CHAIN1_1M | RST | EN |
+ * +---------------------------------------+--------------+--------------+--------------+--------------+------+------+
+ */
+enum adv_dup_filt_info
+{
+ /// Duplicate filtering enabled
+ LLM_ADV_DUP_FILT_EN_POS = 0,
+ LLM_ADV_DUP_FILT_EN_BIT = (1 << 0),
+
+ /// Duplicate filtering reset at each scan period
+ LLM_ADV_DUP_FILT_RST_POS = 1,
+ LLM_ADV_DUP_FILT_RST_BIT = (1 << 1),
+
+ /// Advertising report chain status from 1M scan
+ LLM_ADV_DUP_FILT_CHAIN1_1M_LSB = 2,
+ LLM_ADV_DUP_FILT_CHAIN1_1M_MASK = (0x3 << 2),
+
+ /// Advertising report chain status from coded scan
+ LLM_ADV_DUP_FILT_CHAIN1_CODED_LSB = 4,
+ LLM_ADV_DUP_FILT_CHAIN1_CODED_MASK = (0x3 << 4),
+
+ /// Advertising report chain status from 1M scan
+ LLM_ADV_DUP_FILT_CHAIN2_1M_LSB = 6,
+ LLM_ADV_DUP_FILT_CHAIN2_1M_MASK = (0x3 << 6),
+
+ /// Advertising report chain status from coded scan
+ LLM_ADV_DUP_FILT_CHAIN2_CODED_LSB = 8,
+ LLM_ADV_DUP_FILT_CHAIN2_CODED_MASK = (0x3 << 8),
+
+ /**
+ * 0: No chain
+ * 1: A valid advertising report chain is ongoing
+ * 2: A filtered advertising report chain is ongoing
+ */
+ LLM_ADV_CHAIN_NO = 0,
+ LLM_ADV_CHAIN_VALID = 1,
+ LLM_ADV_CHAIN_FILTERED = 2,
+};
+
+/// Status bits for a device list entry
+///
+/// 7 6 5 4 3 2 1 0
+/// +------+------+------+------+------+-------+-------+------+
+/// | | | | | | IN_PL | IN_WL | USED |
+/// +------+------+------+------+------+-------+-------+------+
+///
+enum dev_list_stat
+{
+ /// Device list entry is used
+ LLM_DEV_LIST_ENTRY_USED_POS = 0,
+ LLM_DEV_LIST_ENTRY_USED_BIT = (1 << 0),
+
+ /// Device is in white list
+ LLM_DEV_IN_WL_POS = 1,
+ LLM_DEV_IN_WL_BIT = (1 << 1),
+
+ /// Device is in periodic advertiser list
+ LLM_DEV_IN_PL_POS = 2,
+ LLM_DEV_IN_PL_BIT = (1 << 2),
+};
+
+/// Advertising interface version, see HCI:3.1.1
+enum adv_itf_version
+{
+ /// Interface not yet detected
+ LLM_ADV_ITF_UNKNOWN = 0,
+ /// Legacy interface
+ LLM_ADV_ITF_LEGACY,
+ /// Extended interface
+ LLM_ADV_ITF_EXTENDED,
+};
+
+/**
+ * Periodic advertising reports enable/disable (only used for periodic sync)
+ *
+ * 7..3 2 1 0
+ * +--------------+-------+--------+------+
+ * | RSVD | CHAIN | SWITCH | EN |
+ * +--------------+-------+--------+------+
+ */
+enum per_adv_rep_en
+{
+ /// Reports enable/disable
+ LLM_PER_ADV_REP_EN_EN_POS = 0,
+ LLM_PER_ADV_REP_EN_EN_BIT = (1 << 0),
+
+ /// Indicate a chain is ongoing
+ LLM_PER_ADV_REP_EN_CHAIN_POS = 1,
+ LLM_PER_ADV_REP_EN_CHAIN_BIT = (1 << 1),
+
+ /// Reports enable/disable
+ LLM_PER_ADV_REP_EN_SWITCH_POS = 2,
+ LLM_PER_ADV_REP_EN_SWITCH_BIT = (1 << 2),
+};
+
+/// States of an activity
+enum LLM_ACTIVITY_STATE
+{
+ LLM_FREE,
+ LLM_ADV_RSVD,
+ LLM_ADV_EN,
+ LLM_ADV_STOPPING,
+ LLM_CON_RSVD,
+ LLM_INITIATING,
+ LLM_SCAN_RSVD,
+ LLM_SCAN_EN,
+ LLM_SCAN_STOPPING,
+ LLM_CONNECTED,
+ LLM_PER_ADV_RSVD,
+ LLM_PER_ADV_PENDING, // This state means that the host has enabled per adv but the driver has not been started yet
+ LLM_PER_ADV_EN,
+ LLM_PER_ADV_STOPPING,
+ LLM_PER_SCAN_SYNCING,
+ LLM_PER_SCAN_SYNCED,
+ LLM_PER_SCAN_STOPPING,
+ LLM_PER_SCAN_SYNCING_FROM_SYNC_TRANSF,
+};
+
+
+/*
+ * TYPE DEFINITIONS
+ ****************************************************************************************
+ */
+
+/// Device list entry structure
+struct dev_list_entry
+{
+ /// BD address
+ struct bd_addr addr;
+
+ /// Advertising Set IDs (for periodic advertiser list), 1 bit per ADV_SID
+ uint16_t adv_sids;
+
+ /** Address type
+ * 0x00 Public Device Address or Public Identity Address
+ * 0x01 Random Device Address or Random (static) Identity Address
+ * 0xFF Address type of devices sending anonymous advertisements
+ */
+ uint8_t addr_type;
+
+ /** Bit field indicating:
+ * bit 0: entry is used
+ * bit 1: device is in white list
+ * bit 2: device is in periodic advertiser list
+ */
+ uint8_t status;
+};
+
+/// Information about one single advertiser discovered
+struct adv_dup_filt_entry
+{
+ /// Advertising device address
+ struct bd_addr adv_addr;
+
+ /// Advertising Data ID (if Set ID is valid)
+ uint16_t did;
+
+ /// Periodic advertising interval
+ uint16_t per_adv_intv;
+
+ /**
+ * Bit
+ * 0 Connectable advertising
+ * 1 Scannable advertising
+ * 2 Directed advertising
+ * 3 Scan response
+ * 4 Legacy advertising PDUs used
+ */
+ uint8_t adv_evt_type;
+
+ /**
+ * Peer address type
+ * 0x00 Public Device Address
+ * 0x01 Random Device Address
+ * 0x02 Public Identity Address (Corresponds to Resolved Private Address)
+ * 0x03 Random (static) Identity Address (Corresponds to Resolved Private Address)
+ * 0x04-0xFF Reserved for future use
+ */
+ uint8_t addr_type;
+
+ /// Advertising Set ID
+ uint8_t sid;
+};
+
+#if (BLE_OBSERVER)
+/// Advertising duplicate filtering table information structure
+struct adv_dup_filt_tab_info
+{
+ /// Table listing all found advertisers
+ struct adv_dup_filt_entry tab[BLE_DUPLICATE_FILTER_MAX];
+
+ /// Current position in the table for placing the next discovered advertiser
+ uint8_t curr_pos;
+
+ /// Number of discovered advertisers in the table
+ uint8_t nb_adv;
+};
+#endif //(BLE_OBSERVER)
+
+/// Channel map parameters structure
+struct llm_ch_map_info
+{
+ /// Channel classification from Host
+ struct le_chnl_map host_ch_class;
+
+ /// Master channel map (map used for all master links)
+ struct le_chnl_map master_ch_map;
+
+ /// Channel map management state
+ uint8_t active;
+
+ /**
+ * Block the HCI LE Set Host Channel Classification Command during 1 second, as per standard
+ * The interval between two successive commands sent shall be at least one second.
+ */
+ bool new_host_class;
+};
+
+/// Information about extended advertising data or scan response data received from Host
+struct llm_adv_tx_info
+{
+ /// EM buffer containing complete advertising or extended scan response data received from Host
+ uint16_t curr_buf;
+
+ /// Total length of advertising or scan response data in the current buffer
+ uint16_t curr_len;
+
+ /// EM buffer containing advertising data or extended scan response data in construction from Host
+ uint16_t new_buf;
+
+ /// Total length of advertising or scan response data in the new buffer
+ uint16_t new_len;
+};
+
+/// Specific information for advertiser
+struct llm_adv_info
+{
+ /// Information about extended advertising data received from Host
+ struct llm_adv_tx_info adv_data;
+
+ /// Information about extended scan response data received from Host
+ struct llm_adv_tx_info scan_rsp_data;
+
+ /// Local BD address
+ struct bd_addr bd_addr;
+
+ /// Local RPA
+ struct bd_addr local_rpa;
+
+ #if BLE_CONLESS_CTE_TX
+ /// Pointer to CTE parameters received from the Host (field valid for ext adv only, not per adv)
+ struct hci_le_set_conless_cte_tx_param_cmd const *cte_tx_params;
+
+ /// Indicates whether CTE has been enabled (true) or not (false) (field valid for ext adv only, not per adv)
+ bool cte_en;
+ #endif // BLE_CONLESS_CTE_TX
+
+ /// Selected extended advertising Tx power (selected by LLM, applied by LLD)
+ int8_t tx_pwr;
+
+ /// Per adv linked to the set: ID of the periodic advertising
+ uint8_t per_act_id;
+
+ /// The ID of the resulting connection if advertising is connectable
+ uint8_t con_act_id;
+};
+
+/// Specific information for periodic advertiser
+struct llm_per_adv_info
+{
+ /// Information about extended advertising data received from Host
+ struct llm_adv_tx_info adv_data;
+
+ /**
+ * Associated activity ID:
+ */
+ uint8_t ass_act_id;
+};
+
+/// Specific information for periodic synchronization
+struct llm_sync_info
+{
+ #if BLE_CONLESS_CTE_RX
+ /// Pointer to CTE parameters received from the Host (for periodic scanning)
+ struct hci_le_set_conless_iq_sampl_en_cmd const *cte_rx_params;
+ #endif // BLE_CONLESS_CTE_RX
+
+ /// Peer identity BD address
+ struct bd_addr bd_addr;
+
+ /// Peer RPA (used by PAST feature)
+ struct bd_addr peer_rpa;
+
+ /// Service data (value provided by the Host during periodic advertising sync transfer, stored temporarily during sync establishment)
+ uint16_t serv_data;
+
+ /// Advertising SID (for periodic scanning)
+ uint8_t adv_sid;
+
+ /// Periodic advertising PHY (for periodic scanning)
+ uint8_t per_adv_phy;
+
+ // Periodic Sync ACAD data transfer:
+ /// Adv data type to transfer
+ uint8_t ad_type;
+ /// Task identifier that expect the advertising data.
+ /// - TASK_BLE_NONE ==> means no activity expect ACAD data
+ uint16_t dst_id;
+ /**
+ * Associated activity ID:
+ *
+ * Its meaning depends on the activity:
+ * - Scan:
+ * - not used
+ * - Periodic sync
+ * - Only when syncing from a periodic advertising sync transfer, it
+ * links to the connection where the info has been received from. Used
+ * to report synchronization result to the Host
+ */
+ uint8_t ass_act_id;
+
+ /// Periodic advertising reports enable/disable (only used for periodic sync) (@see enum per_adv_rep_en)
+ uint8_t per_adv_rep_en;
+
+ /// Peer device address type (@see enum addr_type)
+ uint8_t addr_type;
+};
+
+/// Specific information for connection
+struct llm_con_info
+{
+ /// Peer BD address (identity)
+ struct bd_addr bd_addr;
+
+ /// Peer device address type (@see enum addr_type)
+ uint8_t addr_type;
+
+ /// Role (0x00: MASTER / 0x01: SLAVE) (for connection)
+ uint8_t role;
+};
+
+/// Specific information for scanning
+struct llm_scan_info
+{
+ ///Scan duration (Time=N*10ms) | 0x0000: Scan continuously until explicitly disable
+ uint16_t duration;
+ ///Scan period (Time=N*1.28sec) | 0x0000: Periodic scanning disabled
+ uint16_t period;
+};
+
+
+/// State for all activities
+struct llm_act_info
+{
+ /// Pointer to parameters received from the Host (advertising, scanning or initiating)
+ void const * host_params;
+
+ /// Interval element linked to this activity
+ struct sch_plan_elt_tag plan_elt;
+
+ union
+ {
+ /// Scanning specific activity info
+ struct llm_scan_info scan;
+ /// Advertising specific activity info
+ struct llm_adv_info adv;
+ /// Periodic advertising specific activity info
+ struct llm_per_adv_info per_adv;
+ /// Periodic sync specific activity info
+ struct llm_sync_info sync;
+ /// Connection specific activity info
+ struct llm_con_info con;
+ } info;
+
+
+ /// State
+ uint8_t state;
+};
+
+/// LLM environment structure
+struct llm_env_tag
+{
+ /// RAL content
+ struct ral_entry ral[BLE_RESOL_ADDR_LIST_MAX];
+
+ /// Bit field indicating the accurate clock is required (for each activity, indexed by activity ID)
+ uint32_t act_clk_acc;
+
+ /// LE Event mask
+ struct evt_mask le_event_mask;
+
+ /// State and parameters for all activities
+ struct llm_act_info act_info[BLE_ACTIVITY_MAX];
+
+ /// Local public BD address
+ struct bd_addr local_pub_addr;
+
+ /// Local random BD address
+ struct bd_addr local_rand_addr;
+
+ /// Channel map management parameters
+ struct llm_ch_map_info ch_map_info;
+
+ /// Device list information table
+ struct dev_list_entry dev_list[BLE_WHITELIST_MAX];
+
+ #if (BLE_CENTRAL || BLE_PERIPHERAL)
+ // Default Data Length parameters
+ /// Suggested value for the Controller's maximum transmitted number of payload octets
+ uint16_t suggested_max_tx_octets;
+ /// Suggested value for the Controller's maximum packet transmission time (in us)
+ uint16_t suggested_max_tx_time;
+
+ // Default PHY parameters
+ /// Phy options indicated by Host (@see enum le_phy_opt) (by default 0 if never set by Host)
+ uint16_t phy_opt;
+ /// Default TX preferred PHY to use (@see enum le_phy_mask)
+ uint8_t tx_phys;
+ /// Default RX preferred PHY to use (@see enum le_phy_mask)
+ uint8_t rx_phys;
+
+ // Default PAST parameters
+ /// Mode (@see enum per_adv_sync_info_rec_mode)
+ uint8_t past_mode;
+ /// The number of periodic advertising packets that can be skipped after a successful receive
+ uint16_t past_skip;
+ /// Sync timeout (Time=N*10ms)
+ uint16_t past_sync_to;
+ /// CTE type (@see enum sync_cte_type)
+ uint8_t past_cte_type;
+ #endif //(BLE_CENTRAL || BLE_PERIPHERAL)
+
+ /// Private P256 key for secure connection
+ uint8_t secret_key256[PRIV_KEY_256_LEN];
+
+ /// Resolvable private addresses renew timeout (in seconds)
+ uint16_t rpa_renew_to;
+ /// Address resolution enabled
+ bool addr_resolution_en;
+
+ /// RF Rx path compensation value (Range: -128.0 dB <= N <= 128.0 dB, Units: 0.1 dB)
+ int16_t rx_path_comp;
+ /// RF Tx path compensation value (Range: -128.0 dB <= N <= 128.0 dB, Units: 0.1 dB)
+ int16_t tx_path_comp;
+
+ #if (BLE_OBSERVER)
+ /// Advertising duplicate filtering table information
+ struct adv_dup_filt_tab_info dup_filt;
+
+ /// Information bit field for duplicate filtering (@see enum adv_dup_filt_info)
+ uint16_t adv_dup_filt_info;
+
+ /// Enable scanning for extended advertising PDUs
+ bool ext_scan;
+ #endif //(BLE_OBSERVER)
+
+ #if (BLE_BROADCASTER)
+ /// Number of extended advertising sets that are stopping
+ uint8_t nb_ext_adv_sets_stopping;
+ #endif //(BLE_BROADCASTER)
+
+ #if (BLE_ADV_LEGACY_ITF)
+ /// Indicate if the interface version the Host is using (legacy/extended), see HCI:3.1.1
+ uint8_t adv_itf_version;
+ #endif //(BLE_ADV_LEGACY_ITF)
+
+ #if (BLE_CENTRAL || BLE_PERIPHERAL)
+ /// Connection move enable
+ uint8_t con_move_en;
+ #endif // (BLE_CENTRAL || BLE_PERIPHERAL)
+
+ /// Enable channel assessment usage when building channel maps
+ bool ch_ass_en;
+};
+
+
+/*
+ * GLOBAL VARIABLE DECLARATIONS
+ *****************************************************************************************
+ */
+
+ /// LLM task message handlers table
+extern const struct kernel_task_desc TASK_BLE_DESC_LLM;
+
+/// LLM environment variable
+extern struct llm_env_tag llm_env;
+
+/// LLM local supported features
+extern uint8_t const llm_local_supp_feats[FEATURE_PAGE_MAX][FEATS_LEN];
+
+
+/*
+ * FUNCTION DECLARATIONS
+ ****************************************************************************************
+ */
+
+#if (BLE_BROADCASTER)
+/**
+ ****************************************************************************************
+ * @brief Retrieve Advertising identifier from advertising handle.
+ *
+ * @param[in] adv_hdl Advertising Handle
+ * @param[out] adv_param if not null, used to return advertising parameter that correspond to the handle.
+ *
+ * @return Activity identifier, or invalid identifier if not found
+ ****************************************************************************************
+ */
+uint8_t llm_adv_hdl_to_id(uint16_t adv_hdl, struct hci_le_set_ext_adv_param_cmd** adv_param);
+#endif // (BLE_BROADCASTER)
+
+/// Send HCI CC event returning a status only
+void llm_cmd_cmp_send(uint16_t opcode, uint8_t status);
+
+/// Send HCI CS event
+void llm_cmd_stat_send(uint16_t opcode, uint8_t status);
+
+#if (BLE_CENTRAL || BLE_PERIPHERAL || BLE_OBSERVER)
+/// Check if a device is already connected
+bool llm_is_dev_connected(struct bd_addr const *peer_addr, uint8_t peer_addr_type);
+#endif //(BLE_CENTRAL || BLE_PERIPHERAL || BLE_OBSERVER)
+
+#if (BLE_OBSERVER)
+/// Check if a device is a synchronized periodic advertiser
+bool llm_is_dev_synced(struct bd_addr const *peer_addr, uint8_t peer_addr_type, uint8_t adv_sid);
+#endif //(BLE_OBSERVER)
+
+/**
+ ****************************************************************************************
+ * @brief Find an empty entry in device list
+ *
+ * @return position of an empty entry in the list (Max value if not found)
+ ****************************************************************************************
+ */
+uint8_t llm_dev_list_empty_entry(void);
+
+/**
+ ****************************************************************************************
+ * @brief Search if a device is in device list
+ *
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random)
+ *
+ * @return position of the device in the list (Max value if not found)
+ ****************************************************************************************
+ */
+uint8_t llm_dev_list_search(const struct bd_addr *bd_addr, uint8_t bd_addr_type);
+
+/**
+ ****************************************************************************************
+ * @brief Search if a device is in resolving address list
+ *
+ * @param[in] bd_addr BD Address
+ * @param[in] bd_addr_type BD Address type (0: public | 1: random)
+ *
+ * @return position of the device in the list (Max value if not found)
+ ****************************************************************************************
+ */
+uint8_t llm_ral_search(const struct bd_addr *bd_addr, uint8_t bd_addr_type);
+
+/**
+ ****************************************************************************************
+ * @brief Check if resolving list is empty
+ *
+ * @return True: empty | False: not empty
+ ****************************************************************************************
+ */
+bool llm_ral_is_empty(void);
+
+/**
+ ****************************************************************************************
+ * @brief Entry point to update the channel map
+ ****************************************************************************************
+ */
+void llm_ch_map_update(void);
+
+/// @} LLM
+
+#endif // LLM_INT_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/em/api/em_map.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/em/api/em_map.h
new file mode 100755
index 0000000..752aa85
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/em/api/em_map.h
@@ -0,0 +1,272 @@
+/**
+ ****************************************************************************************
+ *
+ * @file em_map.h
+ *
+ * @brief Mapping of the exchange memory
+ *
+ * Copyright (C) RivieraWaves 2009-2015
+ *
+ ****************************************************************************************
+ */
+
+#ifndef EM_MAP_H_
+#define EM_MAP_H_
+
+/**
+ ****************************************************************************************
+ * @addtogroup EM EM
+ * @ingroup IP
+ * @brief Mapping of the different common area in the exchange memory
+ *
+ * @{
+ ****************************************************************************************
+ */
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+#include "rwip_config.h"
+#include
+#include
+#include
+#include "common_math.h" // For use of COMMON_ALIGN4_HI
+
+#include "_reg_em_et.h"
+
+/// Retrieve Exchange memory address to set into HW interface
+#define REG_EM_ADDR_GET(elem, idx) (REG_EM_##elem##_ADDR_GET(idx) >> 2)
+/// Retrieve Exchange index from address load from HW interface
+#define REG_EM_IDX_GET(elem, addr) ((((addr)<<2) - (EM_##elem##_OFFSET))/(REG_EM_##elem##_SIZE))
+
+/// Exchange memory base address
+#define EM_BASE_ADDR REG_EM_ET_BASE_ADDR
+
+/// Null pointer in EM offset space
+#define EM_PTR_NULL (0x0000)
+
+
+/*
+ ****************************************************************************************
+ ********************** Common EM part **********************
+ ****************************************************************************************
+ */
+/// Start of the common EM part
+#define EM_COMMON_OFFSET (0)
+
+/*
+ * EXCHANGE TABLE
+ ****************************************************************************************
+ */
+
+/// Exchange table area definition
+#define EM_EXCH_TABLE_LEN 16
+#define EM_ET_OFFSET (EM_COMMON_OFFSET)
+#define EM_ET_END (EM_ET_OFFSET + EM_EXCH_TABLE_LEN * REG_EM_ET_SIZE)
+
+/**
+ * MODEn[3:0]
+ *
+ * 0x0: No mode selected, nothing to be performed
+ * 0x1: BR/EDR Mode
+ * 0x2: BLE Mode
+ * 0x3-0xF: Reserved for future use -
+ */
+#define EM_ET_MODE_NONE 0x00
+#define EM_ET_MODE_BREDR 0x01
+#define EM_ET_MODE_BLE 0x02
+
+/// exchange table entry status
+enum em_et_status
+{
+ /// 000: Exchange Table entry associated event is ready for processing.
+ EM_ET_STATUS_READY = 0x00,//!< EM_ET_STATUS_READY
+ /// 001: Exchange Table entry is waiting for start (already read by Event Scheduler)
+ EM_ET_STATUS_UNDER_PROCESS = 0x01,//!< EM_ET_STATUS_UNDER_PROCESS
+ /// 010: Exchange Table entry associated event is started
+ EM_ET_STATUS_STARTED = 0x02,//!< EM_ET_STATUS_STARTED
+ /// 011: Exchange Table entry associated event is terminated (normal termination)
+ EM_ET_STATUS_TERM_NORMAL = 0x03,//!< EM_ET_STATUS_TERM_NORMAL
+ /// 100: Exchange Table entry associated event is terminated (abort termination under prio bandwidth)
+ EM_ET_STATUS_TERM_ABORT_IN_PRIO_BW = 0x04,//!< EM_ET_STATUS_TERM_ABORT_IN_PRIO_BW
+ /// 101: Exchange Table entry associated event is terminated (abort termination after prio bandwidth)
+ EM_ET_STATUS_TERM_ABORT = 0x05,//!< EM_ET_STATUS_TERM_ABORT
+ /// 110: Exchange Table entry associated event is skipped
+ EM_ET_STATUS_SKIPPED = 0x06,//!< EM_ET_STATUS_SKIPPED
+ /// 111: Reserved for future use
+};
+
+/**
+ * ISOBUFSELn
+ * Used to select Isochronous channel Buffer Pointer
+ * 0x0: Uses ISO<0/1/2>PTR0
+ * 0x1: Uses ISO<0/1/2>PTR1
+ */
+#define EM_ET_ISO_PTR0 0x00
+#define EM_ET_ISO_PTR1 0x01
+
+/**
+ * ISOn
+ * Indicates a Isochronous connection event is programmed
+ * 0x0: Not an Isochronous Channel event
+ * 0x1: Isochronous Channel event
+ */
+#define EM_ET_ISO_NOTPROGRAMMED 0x00
+#define EM_ET_ISO_PROGRAMMED 0x01
+
+/**
+ * ISOCHANn[1:0]
+ * Meaningful if ISOn = 1
+ * 00: Select Isochronous channel 0.
+ * 01: Select Isochronous channel 1.
+ * 10: Select Isochronous channel 2.
+ * 11: Trash received isochronous packet / Sent null length packet if ET-ISO = 1 / No Tx if ET-ISO = 0
+ */
+#define EM_ET_ISO_CHANNEL_0 0x00
+#define EM_ET_ISO_CHANNEL_1 0x01
+#define EM_ET_ISO_CHANNEL_2 0x02
+#define EM_ET_ISO_NOCHANNEL 0x03
+
+
+/**
+ * RSVDn
+ * Indicates a reserved event
+ * 0x0: Not a reserved event (ISO connection re-Tx)
+ * 0x1: Reserved event (ISO connection primary event)
+ */
+#define EM_ET_ISO_NOT_RSVD 0x00
+#define EM_ET_ISO_RSVD 0x01
+/*
+ * FREQUENCY TABLE
+ ****************************************************************************************
+ */
+
+/// Frequency table area definition
+#define EM_FT_OFFSET (EM_ET_END)
+
+/// number of frequencies / Depends on RF target
+#if defined(CFG_RF_ATLAS)
+ /// IcyTRx requires 40 x 32-bit words for Frequency table + 40 byte for VCO sub-band table
+ #define EM_RF_FREQ_TABLE_LEN 160
+ #define EM_RF_VCO_TABLE_LEN 40
+#else
+ #if BT_EMB_PRESENT
+ /// Ripple/ExtRC requires 80 x 8-bit words for Frequency table / No VCO sub-band table
+ #define EM_RF_FREQ_TABLE_LEN 80
+ #define EM_RF_VCO_TABLE_LEN 0
+ #elif BLE_EMB_PRESENT
+ /// Ripple/ExtRC requires 40 x 8-bit words for Frequency table / No VCO sub-band table
+ #define EM_RF_FREQ_TABLE_LEN 40
+ #define EM_RF_VCO_TABLE_LEN 0
+ #endif // BT_EMB_PRESENT/BLE_EMB_PRESENT
+#endif
+
+#define EM_FT_END (EM_FT_OFFSET + (EM_RF_VCO_TABLE_LEN + EM_RF_FREQ_TABLE_LEN) * sizeof(uint8_t))
+
+/*
+ * RF SW SPI
+ ****************************************************************************************
+ */
+/// RF SW-Driven SPI transfers area definition
+#if defined(CFG_RF_ATLAS)
+ /// IcyTYRx (Former Atlas) SW Driven SPI space
+ #define EM_RF_SW_SPI_OFFSET (EM_FT_END)
+ #define EM_RF_SW_SPI_SIZE_MAX 136
+ #define EM_RF_SW_SPI_END (EM_RF_SW_SPI_OFFSET + EM_RF_SW_SPI_SIZE_MAX)
+
+#elif defined(CFG_RF_BTIPT)
+ /// BTIPT RF SW Driven SPI space
+ #define EM_RF_SW_SPI_OFFSET (EM_FT_END)
+ #define EM_RF_SW_SPI_SIZE_MAX 100
+ #define EM_RF_SW_SPI_END (EM_RF_SW_SPI_OFFSET + EM_RF_SW_SPI_SIZE_MAX)
+#else
+ /// Ripple SW Driven SPI space
+ /// RF-SW-SPI transfers area definition
+ #define EM_RF_SW_SPI_OFFSET (EM_FT_END)
+ #define EM_RF_SW_SPI_SIZE_MAX 8
+ #define EM_RF_SW_SPI_END (EM_RF_SW_SPI_OFFSET + EM_RF_SW_SPI_SIZE_MAX)
+#endif
+
+
+
+/*
+ * RF HW SPI
+ ****************************************************************************************
+ */
+/// RF HW-Driven SPI transfers area definition
+#if defined(CFG_RF_ATLAS)
+ /// IcyTYRx (Former Atlas) SW Driven SPI space
+ #define EM_RF_HW_SPI_OFFSET (EM_RF_SW_SPI_END)
+ #define EM_RF_HW_SPI_SIZE_MAX 100
+ #define EM_RF_HW_SPI_END (EM_RF_HW_SPI_OFFSET + EM_RF_HW_SPI_SIZE_MAX)
+
+#elif defined(CFG_RF_BTIPT)
+ /// BTIPT RF SW Driven SPI space
+ #define EM_RF_HW_SPI_OFFSET (EM_RF_SW_SPI_END)
+ #define EM_RF_HW_SPI_SIZE_MAX 0x100
+ #define EM_RF_HW_SPI_END (EM_RF_HW_SPI_OFFSET + EM_RF_HW_SPI_SIZE_MAX)
+
+#else
+ /// Ripple SW Driven SPI space
+ /// RF-SW-SPI transfers area definition
+ #define EM_RF_HW_SPI_OFFSET (EM_RF_SW_SPI_END)
+ #define EM_RF_HW_SPI_SIZE_MAX 0
+ #define EM_RF_HW_SPI_END (EM_RF_HW_SPI_OFFSET + EM_RF_HW_SPI_SIZE_MAX)
+#endif
+
+
+/// End of the common EM part
+#define EM_COMMON_END (EM_RF_HW_SPI_END)
+
+#if (BLE_EMB_PRESENT || BT_EMB_PRESENT)
+/*
+ * ENCRYPTION
+ ****************************************************************************************
+ */
+
+/// Encryption area definition
+#define EM_ENC_OFFSET COMMON_ALIGN4_HI(EM_COMMON_END)
+#define EM_ENC_IN_OFFSET (EM_ENC_OFFSET)
+#define EM_ENC_IN_SIZE (16)
+#define EM_ENC_OUT_OFFSET (EM_ENC_IN_OFFSET + EM_ENC_IN_SIZE)
+#define EM_ENC_OUT_SIZE (16)
+#define EM_ENC_END (EM_ENC_OFFSET + EM_ENC_IN_SIZE + EM_ENC_OUT_SIZE)
+
+#endif // (BLE_EMB_PRESENT || BT_EMB_PRESENT)
+
+/*
+ ****************************************************************************************
+ ********************** BLE EM part **********************
+ ****************************************************************************************
+ */
+
+#define EM_BLE_OFFSET COMMON_ALIGN4_HI(EM_ENC_END)
+#if BLE_EMB_PRESENT
+#include "em_map_ble.h"
+#else // BLE_EMB_PRESENT
+#define EM_BLE_END (EM_BLE_OFFSET)
+#endif // BLE_EMB_PRESENT
+
+/*
+ ****************************************************************************************
+ ********************** BT EM part **********************
+ ****************************************************************************************
+ */
+
+#define EM_BT_OFFSET COMMON_ALIGN4_HI(EM_BLE_END)
+#if BT_EMB_PRESENT
+#include "em_map_bt.h"
+#else // BT_EMB_PRESENT
+#define EM_BT_END (EM_BT_OFFSET)
+#endif //BT_EMB_PRESENT
+
+
+/*
+ * RF SPI part
+ ****************************************************************************************
+ */
+
+
+/// @} IPDEXMEM
+
+#endif // EM_MAP_H_
diff --git a/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/hci/api/hci.h b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/hci/api/hci.h
new file mode 100755
index 0000000..16f9cd2
--- /dev/null
+++ b/beken_os/beken378/driver/ble_5_x_rw/ble_lib/ip/hci/api/hci.h
@@ -0,0 +1,848 @@
+#if (CFG_USE_BK_HOST)
+/**
+ ****************************************************************************************
+ *
+ * @file hci.h
+ *
+ * @brief This file contains definitions related to the HCI module.
+ *
+ * Copyright (C) RivieraWaves 2009-2015
+ *
+ *
+ ****************************************************************************************
+ */
+
+#ifndef HCI_H_
+#define HCI_H_
+
+/**
+ ****************************************************************************************
+ * @addtogroup HCI Host Controller Interface
+ * @ingroup ROOT
+ * @brief HCI module handling communication between lower and higher layers in split
+ * architecture.
+ * @{
+ ****************************************************************************************
+ */
+
+
+/*
+ * INCLUDE FILES
+ ****************************************************************************************
+ */
+
+#include "rwip_config.h" // SW configuration
+
+#if (HCI_PRESENT)
+
+#include // standard definition
+#include