diff --git a/doc/example_list.h b/doc/example_list.h index a0fde7a2..04c4e13a 100644 --- a/doc/example_list.h +++ b/doc/example_list.h @@ -3,5 +3,5 @@ * @example knx-demo.ino * @example knx-hdc1008.ino * @example knx-bme680.ino - * + * **/ \ No newline at end of file diff --git a/examples/knx-cc1310/CC1310_LAUNCHXL.h b/examples/knx-cc1310/CC1310_LAUNCHXL.h index 737e4489..66b7df5f 100644 --- a/examples/knx-cc1310/CC1310_LAUNCHXL.h +++ b/examples/knx-cc1310/CC1310_LAUNCHXL.h @@ -164,7 +164,8 @@ void CC1310_LAUNCHXL_wakeUpExtFlash(void); * @def CC1310_LAUNCHXL_ADCBufName * @brief Enum of ADCBufs */ -typedef enum CC1310_LAUNCHXL_ADCBufName { +typedef enum CC1310_LAUNCHXL_ADCBufName +{ CC1310_LAUNCHXL_ADCBUF0 = 0, CC1310_LAUNCHXL_ADCBUFCOUNT @@ -174,7 +175,8 @@ typedef enum CC1310_LAUNCHXL_ADCBufName { * @def CC1310_LAUNCHXL_ADCBuf0SourceName * @brief Enum of ADCBuf channels */ -typedef enum CC1310_LAUNCHXL_ADCBuf0ChannelName { +typedef enum CC1310_LAUNCHXL_ADCBuf0ChannelName +{ CC1310_LAUNCHXL_ADCBUF0CHANNEL0 = 0, CC1310_LAUNCHXL_ADCBUF0CHANNEL1, CC1310_LAUNCHXL_ADCBUF0CHANNEL2, @@ -194,7 +196,8 @@ typedef enum CC1310_LAUNCHXL_ADCBuf0ChannelName { * @def CC1310_LAUNCHXL_ADCName * @brief Enum of ADCs */ -typedef enum CC1310_LAUNCHXL_ADCName { +typedef enum CC1310_LAUNCHXL_ADCName +{ CC1310_LAUNCHXL_ADC0 = 0, CC1310_LAUNCHXL_ADC1, CC1310_LAUNCHXL_ADC2, @@ -214,7 +217,8 @@ typedef enum CC1310_LAUNCHXL_ADCName { * @def CC1310_LAUNCHXL_CryptoName * @brief Enum of Crypto names */ -typedef enum CC1310_LAUNCHXL_CryptoName { +typedef enum CC1310_LAUNCHXL_CryptoName +{ CC1310_LAUNCHXL_CRYPTO0 = 0, CC1310_LAUNCHXL_CRYPTOCOUNT @@ -224,7 +228,8 @@ typedef enum CC1310_LAUNCHXL_CryptoName { * @def CC1310_LAUNCHXL_AESCCMName * @brief Enum of AESCCM names */ -typedef enum CC1310_LAUNCHXL_AESCCMName { +typedef enum CC1310_LAUNCHXL_AESCCMName +{ CC1310_LAUNCHXL_AESCCM0 = 0, CC1310_LAUNCHXL_AESCCMCOUNT @@ -234,7 +239,8 @@ typedef enum CC1310_LAUNCHXL_AESCCMName { * @def CC1310_LAUNCHXL_AESGCMName * @brief Enum of AESGCM names */ -typedef enum CC1310_LAUNCHXL_AESGCMName { +typedef enum CC1310_LAUNCHXL_AESGCMName +{ CC1310_LAUNCHXL_AESGCM0 = 0, CC1310_LAUNCHXL_AESGCMCOUNT @@ -244,7 +250,8 @@ typedef enum CC1310_LAUNCHXL_AESGCMName { * @def CC1310_LAUNCHXL_AESCBCName * @brief Enum of AESCBC names */ -typedef enum CC1310_LAUNCHXL_AESCBCName { +typedef enum CC1310_LAUNCHXL_AESCBCName +{ CC1310_LAUNCHXL_AESCBC0 = 0, CC1310_LAUNCHXL_AESCBCCOUNT @@ -254,7 +261,8 @@ typedef enum CC1310_LAUNCHXL_AESCBCName { * @def CC1310_LAUNCHXL_AESCTRName * @brief Enum of AESCTR names */ -typedef enum CC1310_LAUNCHXL_AESCTRName { +typedef enum CC1310_LAUNCHXL_AESCTRName +{ CC1310_LAUNCHXL_AESCTR0 = 0, CC1310_LAUNCHXL_AESCTRCOUNT @@ -264,7 +272,8 @@ typedef enum CC1310_LAUNCHXL_AESCTRName { * @def CC1310_LAUNCHXL_AESECBName * @brief Enum of AESECB names */ -typedef enum CC1310_LAUNCHXL_AESECBName { +typedef enum CC1310_LAUNCHXL_AESECBName +{ CC1310_LAUNCHXL_AESECB0 = 0, CC1310_LAUNCHXL_AESECBCOUNT @@ -274,7 +283,8 @@ typedef enum CC1310_LAUNCHXL_AESECBName { * @def CC1310_LAUNCHXL_AESCTRDRBGName * @brief Enum of AESCTRDRBG names */ -typedef enum CC1310_LAUNCHXL_AESCTRDRBGName { +typedef enum CC1310_LAUNCHXL_AESCTRDRBGName +{ CC1310_LAUNCHXL_AESCTRDRBG0 = 0, CC1310_LAUNCHXL_AESCTRDRBGCOUNT @@ -284,7 +294,8 @@ typedef enum CC1310_LAUNCHXL_AESCTRDRBGName { * @def CC1310_LAUNCHXL_TRNGName * @brief Enum of TRNG names */ -typedef enum CC1310_LAUNCHXL_TRNGName { +typedef enum CC1310_LAUNCHXL_TRNGName +{ CC1310_LAUNCHXL_TRNG0 = 0, CC1310_LAUNCHXL_TRNGCOUNT @@ -294,7 +305,8 @@ typedef enum CC1310_LAUNCHXL_TRNGName { * @def CC1310_LAUNCHXL_GPIOName * @brief Enum of GPIO names */ -typedef enum CC1310_LAUNCHXL_GPIOName { +typedef enum CC1310_LAUNCHXL_GPIOName +{ CC1310_LAUNCHXL_GPIO_S1 = 0, CC1310_LAUNCHXL_GPIO_S2, CC1310_LAUNCHXL_SPI_MASTER_READY, @@ -314,7 +326,8 @@ typedef enum CC1310_LAUNCHXL_GPIOName { * @def CC1310_LAUNCHXL_GPTimerName * @brief Enum of GPTimer parts */ -typedef enum CC1310_LAUNCHXL_GPTimerName { +typedef enum CC1310_LAUNCHXL_GPTimerName +{ CC1310_LAUNCHXL_GPTIMER0A = 0, CC1310_LAUNCHXL_GPTIMER0B, CC1310_LAUNCHXL_GPTIMER1A, @@ -331,7 +344,8 @@ typedef enum CC1310_LAUNCHXL_GPTimerName { * @def CC1310_LAUNCHXL_GPTimers * @brief Enum of GPTimers */ -typedef enum CC1310_LAUNCHXL_GPTimers { +typedef enum CC1310_LAUNCHXL_GPTimers +{ CC1310_LAUNCHXL_GPTIMER0 = 0, CC1310_LAUNCHXL_GPTIMER1, CC1310_LAUNCHXL_GPTIMER2, @@ -344,7 +358,8 @@ typedef enum CC1310_LAUNCHXL_GPTimers { * @def CC1310_LAUNCHXL_I2CName * @brief Enum of I2C names */ -typedef enum CC1310_LAUNCHXL_I2CName { +typedef enum CC1310_LAUNCHXL_I2CName +{ CC1310_LAUNCHXL_I2C0 = 0, CC1310_LAUNCHXL_I2CCOUNT @@ -354,7 +369,8 @@ typedef enum CC1310_LAUNCHXL_I2CName { * @def CC1310_LAUNCHXL_I2SName * @brief Enum of I2S names */ -typedef enum CC1310_LAUNCHXL_I2SName { +typedef enum CC1310_LAUNCHXL_I2SName +{ CC1310_LAUNCHXL_I2S0 = 0, CC1310_LAUNCHXL_I2SCOUNT @@ -364,7 +380,8 @@ typedef enum CC1310_LAUNCHXL_I2SName { * @def CC1310_LAUNCHXL_NVSName * @brief Enum of NVS names */ -typedef enum CC1310_LAUNCHXL_NVSName { +typedef enum CC1310_LAUNCHXL_NVSName +{ #ifndef Board_EXCLUDE_NVS_INTERNAL_FLASH CC1310_LAUNCHXL_NVSCC26XX0 = 0, #endif @@ -379,7 +396,8 @@ typedef enum CC1310_LAUNCHXL_NVSName { * @def CC1310_LAUNCHXL_PWM * @brief Enum of PWM outputs */ -typedef enum CC1310_LAUNCHXL_PWMName { +typedef enum CC1310_LAUNCHXL_PWMName +{ CC1310_LAUNCHXL_PWM0 = 0, CC1310_LAUNCHXL_PWM1, CC1310_LAUNCHXL_PWM2, @@ -396,7 +414,8 @@ typedef enum CC1310_LAUNCHXL_PWMName { * @def CC1310_LAUNCHXL_SDName * @brief Enum of SD names */ -typedef enum CC1310_LAUNCHXL_SDName { +typedef enum CC1310_LAUNCHXL_SDName +{ CC1310_LAUNCHXL_SDSPI0 = 0, CC1310_LAUNCHXL_SDCOUNT @@ -406,7 +425,8 @@ typedef enum CC1310_LAUNCHXL_SDName { * @def CC1310_LAUNCHXL_SPIName * @brief Enum of SPI names */ -typedef enum CC1310_LAUNCHXL_SPIName { +typedef enum CC1310_LAUNCHXL_SPIName +{ CC1310_LAUNCHXL_SPI0 = 0, CC1310_LAUNCHXL_SPI1, @@ -417,7 +437,8 @@ typedef enum CC1310_LAUNCHXL_SPIName { * @def CC1310_LAUNCHXL_UARTName * @brief Enum of UARTs */ -typedef enum CC1310_LAUNCHXL_UARTName { +typedef enum CC1310_LAUNCHXL_UARTName +{ CC1310_LAUNCHXL_UART0 = 0, CC1310_LAUNCHXL_UARTCOUNT @@ -427,7 +448,8 @@ typedef enum CC1310_LAUNCHXL_UARTName { * @def CC1310_LAUNCHXL_UDMAName * @brief Enum of DMA buffers */ -typedef enum CC1310_LAUNCHXL_UDMAName { +typedef enum CC1310_LAUNCHXL_UDMAName +{ CC1310_LAUNCHXL_UDMA0 = 0, CC1310_LAUNCHXL_UDMACOUNT @@ -437,7 +459,8 @@ typedef enum CC1310_LAUNCHXL_UDMAName { * @def CC1310_LAUNCHXL_WatchdogName * @brief Enum of Watchdogs */ -typedef enum CC1310_LAUNCHXL_WatchdogName { +typedef enum CC1310_LAUNCHXL_WatchdogName +{ CC1310_LAUNCHXL_WATCHDOG0 = 0, CC1310_LAUNCHXL_WATCHDOGCOUNT diff --git a/examples/knx-cc1310/RTT/SEGGER_RTT.h b/examples/knx-cc1310/RTT/SEGGER_RTT.h index 2e83f3f5..96a2429d 100644 --- a/examples/knx-cc1310/RTT/SEGGER_RTT.h +++ b/examples/knx-cc1310/RTT/SEGGER_RTT.h @@ -44,7 +44,7 @@ ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT.h Purpose : Implementation of SEGGER real-time transfer which allows - real-time communication on targets which support debugger + real-time communication on targets which support debugger memory accesses while the CPU is running. Revision: $Rev: 20159 $ ---------------------------------------------------------------------- @@ -64,84 +64,84 @@ Revision: $Rev: 20159 $ ********************************************************************** */ #ifndef RTT_USE_ASM - #if (defined __SES_ARM) // SEGGER Embedded Studio - #define _CC_HAS_RTT_ASM_SUPPORT 1 - #elif (defined __CROSSWORKS_ARM) // Rowley Crossworks - #define _CC_HAS_RTT_ASM_SUPPORT 1 - #elif (defined __ARMCC_VERSION) - #define _CC_HAS_RTT_ASM_SUPPORT 0 - #elif (defined __GNUC__) // GCC - #define _CC_HAS_RTT_ASM_SUPPORT 1 - #elif (defined __clang__) // Clang compiler - #define _CC_HAS_RTT_ASM_SUPPORT 1 - #elif ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler - #define _CC_HAS_RTT_ASM_SUPPORT 1 - #else - #define _CC_HAS_RTT_ASM_SUPPORT 0 - #endif - #if ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler - // - // IAR assembler / compiler - // - #if (defined __ARM7M__) // Needed for old versions that do not know the define yet - #if (__CORE__ == __ARM7M__) // Cortex-M3 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #endif - #endif - #if (defined __ARM7EM__) // Needed for old versions that do not know the define yet - #if (__CORE__ == __ARM7EM__) // Cortex-M4/M7 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() asm("DMB"); - #endif - #endif - #if (defined __ARM8M_BASELINE__) // Needed for old versions that do not know the define yet - #if (__CORE__ == __ARM8M_BASELINE__) // Cortex-M23 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() asm("DMB"); - #endif + #if (defined __SES_ARM) // SEGGER Embedded Studio + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __CROSSWORKS_ARM) // Rowley Crossworks + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __ARMCC_VERSION) + #define _CC_HAS_RTT_ASM_SUPPORT 0 + #elif (defined __GNUC__) // GCC + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __clang__) // Clang compiler + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #else + #define _CC_HAS_RTT_ASM_SUPPORT 0 #endif - #if (defined __ARM8M_MAINLINE__) // Needed for old versions that do not know the define yet - #if (__CORE__ == __ARM8M_MAINLINE__) // Cortex-M33 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() asm("DMB"); - #endif + #if ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler + // + // IAR assembler / compiler + // + #if (defined __ARM7M__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM7M__) // Cortex-M3 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #endif + #endif + #if (defined __ARM7EM__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM7EM__) // Cortex-M4/M7 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm("DMB"); + #endif + #endif + #if (defined __ARM8M_BASELINE__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM8M_BASELINE__) // Cortex-M23 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm("DMB"); + #endif + #endif + #if (defined __ARM8M_MAINLINE__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM8M_MAINLINE__) // Cortex-M33 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm("DMB"); + #endif + #endif + #else + // + // GCC / Clang + // + #if (defined __ARM_ARCH_7M__) // Cortex-M3 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #else + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #endif #endif - #else // - // GCC / Clang + // If IDE and core support the ASM version, enable ASM version by default // - #if (defined __ARM_ARCH_7M__) // Cortex-M3 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() __asm volatile ("dmb\n" : : :); - #elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() __asm volatile ("dmb\n" : : :); - #elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33 - #define _CORE_HAS_RTT_ASM_SUPPORT 1 - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #ifndef _CORE_HAS_RTT_ASM_SUPPORT + #define _CORE_HAS_RTT_ASM_SUPPORT 0 // Default for unknown cores + #endif + #if (_CC_HAS_RTT_ASM_SUPPORT && _CORE_HAS_RTT_ASM_SUPPORT) + #define RTT_USE_ASM (1) #else - #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #define RTT_USE_ASM (0) #endif - #endif - // - // If IDE and core support the ASM version, enable ASM version by default - // - #ifndef _CORE_HAS_RTT_ASM_SUPPORT - #define _CORE_HAS_RTT_ASM_SUPPORT 0 // Default for unknown cores - #endif - #if (_CC_HAS_RTT_ASM_SUPPORT && _CORE_HAS_RTT_ASM_SUPPORT) - #define RTT_USE_ASM (1) - #else - #define RTT_USE_ASM (0) - #endif #endif // @@ -150,15 +150,15 @@ Revision: $Rev: 20159 $ // Needed for: Cortex-M7, Cortex-M23, Cortex-M33 // #ifndef _CORE_NEEDS_DMB - #define _CORE_NEEDS_DMB 0 + #define _CORE_NEEDS_DMB 0 #endif #ifndef RTT__DMB - #if _CORE_NEEDS_DMB - #error "Don't know how to place inline assembly for DMB" - #else - #define RTT__DMB() - #endif + #if _CORE_NEEDS_DMB + #error "Don't know how to place inline assembly for DMB" + #else + #define RTT__DMB() + #endif #endif #ifndef SEGGER_RTT_ASM // defined when SEGGER_RTT.h is included from assembly file @@ -183,26 +183,28 @@ Revision: $Rev: 20159 $ // Description for a circular buffer (also called "ring buffer") // which is used as up-buffer (T->H) // -typedef struct { - const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" - char* pBuffer; // Pointer to start of buffer - unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. - unsigned WrOff; // Position of next item to be written by either target. - volatile unsigned RdOff; // Position of next item to be read by host. Must be volatile since it may be modified by host. - unsigned Flags; // Contains configuration flags +typedef struct +{ + const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" + char* pBuffer; // Pointer to start of buffer + unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. + unsigned WrOff; // Position of next item to be written by either target. + volatile unsigned RdOff; // Position of next item to be read by host. Must be volatile since it may be modified by host. + unsigned Flags; // Contains configuration flags } SEGGER_RTT_BUFFER_UP; // // Description for a circular buffer (also called "ring buffer") // which is used as down-buffer (H->T) // -typedef struct { - const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" - char* pBuffer; // Pointer to start of buffer - unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. - volatile unsigned WrOff; // Position of next item to be written by host. Must be volatile since it may be modified by host. - unsigned RdOff; // Position of next item to be read by target (down-buffer). - unsigned Flags; // Contains configuration flags +typedef struct +{ + const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" + char* pBuffer; // Pointer to start of buffer + unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. + volatile unsigned WrOff; // Position of next item to be written by host. Must be volatile since it may be modified by host. + unsigned RdOff; // Position of next item to be read by target (down-buffer). + unsigned Flags; // Contains configuration flags } SEGGER_RTT_BUFFER_DOWN; // @@ -210,12 +212,13 @@ typedef struct { // as well as the configuration for each buffer // // -typedef struct { - char acID[16]; // Initialized to "SEGGER RTT" - int MaxNumUpBuffers; // Initialized to SEGGER_RTT_MAX_NUM_UP_BUFFERS (type. 2) - int MaxNumDownBuffers; // Initialized to SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (type. 2) - SEGGER_RTT_BUFFER_UP aUp[SEGGER_RTT_MAX_NUM_UP_BUFFERS]; // Up buffers, transferring information up from target via debug probe to host - SEGGER_RTT_BUFFER_DOWN aDown[SEGGER_RTT_MAX_NUM_DOWN_BUFFERS]; // Down buffers, transferring information down from host via debug probe to target +typedef struct +{ + char acID[16]; // Initialized to "SEGGER RTT" + int MaxNumUpBuffers; // Initialized to SEGGER_RTT_MAX_NUM_UP_BUFFERS (type. 2) + int MaxNumDownBuffers; // Initialized to SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (type. 2) + SEGGER_RTT_BUFFER_UP aUp[SEGGER_RTT_MAX_NUM_UP_BUFFERS]; // Up buffers, transferring information up from target via debug probe to host + SEGGER_RTT_BUFFER_DOWN aDown[SEGGER_RTT_MAX_NUM_DOWN_BUFFERS]; // Down buffers, transferring information down from host via debug probe to target } SEGGER_RTT_CB; /********************************************************************* @@ -233,7 +236,7 @@ extern SEGGER_RTT_CB _SEGGER_RTT; ********************************************************************** */ #ifdef __cplusplus - extern "C" { +extern "C" { #endif int SEGGER_RTT_AllocDownBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); int SEGGER_RTT_AllocUpBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); @@ -268,7 +271,7 @@ unsigned SEGGER_RTT_GetBytesInBuffer (unsigned BufferIndex); #define SEGGER_RTT_HASDATA(n) (_SEGGER_RTT.aDown[n].WrOff - _SEGGER_RTT.aDown[n].RdOff) #if RTT_USE_ASM - #define SEGGER_RTT_WriteSkipNoLock SEGGER_RTT_ASM_WriteSkipNoLock +#define SEGGER_RTT_WriteSkipNoLock SEGGER_RTT_ASM_WriteSkipNoLock #endif /********************************************************************* @@ -299,11 +302,11 @@ int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s); * ********************************************************************** */ -int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...); -int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList); +int SEGGER_RTT_printf(unsigned BufferIndex, const char* sFormat, ...); +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char* sFormat, va_list* pParamList); #ifdef __cplusplus - } +} #endif #endif // ifndef(SEGGER_RTT_ASM) diff --git a/examples/knx-cc1310/RTT/SEGGER_RTT_Conf.h b/examples/knx-cc1310/RTT/SEGGER_RTT_Conf.h index 48f8abdc..2a155c8e 100644 --- a/examples/knx-cc1310/RTT/SEGGER_RTT_Conf.h +++ b/examples/knx-cc1310/RTT/SEGGER_RTT_Conf.h @@ -54,7 +54,7 @@ Revision: $Rev: 18601 $ #define SEGGER_RTT_CONF_H #ifdef __IAR_SYSTEMS_ICC__ - #include + #include #endif /********************************************************************* @@ -64,48 +64,48 @@ Revision: $Rev: 18601 $ ********************************************************************** */ #ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS - #define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3) + #define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3) #endif #ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS - #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3) + #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3) #endif #ifndef BUFFER_SIZE_UP - #define BUFFER_SIZE_UP (128) // Size of the buffer for terminal output of target, up to host (Default: 1k) + #define BUFFER_SIZE_UP (128) // Size of the buffer for terminal output of target, up to host (Default: 1k) #endif #ifndef BUFFER_SIZE_DOWN - #define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16) + #define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16) #endif #ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE - #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64) + #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64) #endif #ifndef SEGGER_RTT_MODE_DEFAULT - #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0) + #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0) #endif /********************************************************************* * * RTT memcpy configuration * -* memcpy() is good for large amounts of data, +* memcpy() is good for large amounts of data, * but the overhead is big for small amounts, which are usually stored via RTT. * With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead. * * SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions. -* This is may be required with memory access restrictions, +* This is may be required with memory access restrictions, * such as on Cortex-A devices with MMU. */ #ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP - #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop + #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop #endif // // Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets // -//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__)) +//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__)) // #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) SEGGER_memcpy((pDest), (pSrc), (NumBytes)) //#endif @@ -124,7 +124,7 @@ Revision: $Rev: 18601 $ // or define SEGGER_RTT_LOCK() to completely disable interrupts. // #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20) + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20) #endif /********************************************************************* @@ -133,90 +133,90 @@ Revision: $Rev: 18601 $ * Rowley CrossStudio and GCC */ #if ((defined(__SES_ARM) || defined(__SES_RISCV) || defined(__CROSSWORKS_ARM) || defined(__GNUC__) || defined(__clang__)) && !defined (__CC_ARM) && !defined(WIN32)) - #if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__)) - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - __asm volatile ("mrs %0, primask \n\t" \ - "movs r1, $1 \n\t" \ - "msr primask, r1 \n\t" \ - : "=r" (LockState) \ - : \ - : "r1" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("msr primask, %0 \n\t" \ - : \ - : "r" (LockState) \ - : \ - ); \ - } - #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - __asm volatile ("mrs %0, basepri \n\t" \ - "mov r1, %1 \n\t" \ - "msr basepri, r1 \n\t" \ - : "=r" (LockState) \ - : "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY) \ - : "r1" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("msr basepri, %0 \n\t" \ - : \ - : "r" (LockState) \ - : \ - ); \ - } - - #elif defined(__ARM_ARCH_7A__) - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - __asm volatile ("mrs r1, CPSR \n\t" \ - "mov %0, r1 \n\t" \ - "orr r1, r1, #0xC0 \n\t" \ - "msr CPSR_c, r1 \n\t" \ - : "=r" (LockState) \ - : \ - : "r1" \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ - "mrs r1, CPSR \n\t" \ - "bic r1, r1, #0xC0 \n\t" \ - "and r0, r0, #0xC0 \n\t" \ - "orr r1, r1, r0 \n\t" \ - "msr CPSR_c, r1 \n\t" \ - : \ - : "r" (LockState) \ - : "r0", "r1" \ - ); \ - } - #elif defined(__riscv) || defined(__riscv_xlen) - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - __asm volatile ("csrr %0, mstatus \n\t" \ - "csrci mstatus, 8 \n\t" \ - "andi %0, %0, 8 \n\t" \ - : "=r" (LockState) \ - : \ - : \ - ); - - #define SEGGER_RTT_UNLOCK() __asm volatile ("csrr a1, mstatus \n\t" \ - "or %0, %0, a1 \n\t" \ - "csrs mstatus, %0 \n\t" \ - : \ - : "r" (LockState) \ - : "a1" \ - ); \ - } - #else - #define SEGGER_RTT_LOCK() - #define SEGGER_RTT_UNLOCK() - #endif +#if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__)) +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + __asm volatile ("mrs %0, primask \n\t" \ + "movs r1, $1 \n\t" \ + "msr primask, r1 \n\t" \ + : "=r" (LockState) \ + : \ + : "r1" \ + ); + +#define SEGGER_RTT_UNLOCK() __asm volatile ("msr primask, %0 \n\t" \ + : \ + : "r" (LockState) \ + : \ + ); \ +} +#elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) +#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) +#endif +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + __asm volatile ("mrs %0, basepri \n\t" \ + "mov r1, %1 \n\t" \ + "msr basepri, r1 \n\t" \ + : "=r" (LockState) \ + : "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY) \ + : "r1" \ + ); + +#define SEGGER_RTT_UNLOCK() __asm volatile ("msr basepri, %0 \n\t" \ + : \ + : "r" (LockState) \ + : \ + ); \ +} + +#elif defined(__ARM_ARCH_7A__) +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + __asm volatile ("mrs r1, CPSR \n\t" \ + "mov %0, r1 \n\t" \ + "orr r1, r1, #0xC0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : "=r" (LockState) \ + : \ + : "r1" \ + ); + +#define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ + "mrs r1, CPSR \n\t" \ + "bic r1, r1, #0xC0 \n\t" \ + "and r0, r0, #0xC0 \n\t" \ + "orr r1, r1, r0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : \ + : "r" (LockState) \ + : "r0", "r1" \ + ); \ +} +#elif defined(__riscv) || defined(__riscv_xlen) +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + __asm volatile ("csrr %0, mstatus \n\t" \ + "csrci mstatus, 8 \n\t" \ + "andi %0, %0, 8 \n\t" \ + : "=r" (LockState) \ + : \ + : \ + ); + +#define SEGGER_RTT_UNLOCK() __asm volatile ("csrr a1, mstatus \n\t" \ + "or %0, %0, a1 \n\t" \ + "csrs mstatus, %0 \n\t" \ + : \ + : "r" (LockState) \ + : "a1" \ + ); \ +} +#else +#define SEGGER_RTT_LOCK() +#define SEGGER_RTT_UNLOCK() +#endif #endif /********************************************************************* @@ -224,30 +224,30 @@ Revision: $Rev: 18601 $ * RTT lock configuration for IAR EWARM */ #ifdef __ICCARM__ - #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) || \ +#if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) || \ (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - LockState = __get_PRIMASK(); \ - __set_PRIMASK(1); - - #define SEGGER_RTT_UNLOCK() __set_PRIMASK(LockState); \ - } - #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || \ +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + LockState = __get_PRIMASK(); \ + __set_PRIMASK(1); + +#define SEGGER_RTT_UNLOCK() __set_PRIMASK(LockState); \ + } +#elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || \ (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) || \ (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) || \ (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - LockState = __get_BASEPRI(); \ - __set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); - - #define SEGGER_RTT_UNLOCK() __set_BASEPRI(LockState); \ - } - #endif +#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) +#endif +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + LockState = __get_BASEPRI(); \ + __set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); + +#define SEGGER_RTT_UNLOCK() __set_BASEPRI(LockState); \ + } +#endif #endif /********************************************************************* @@ -255,13 +255,13 @@ Revision: $Rev: 18601 $ * RTT lock configuration for IAR RX */ #ifdef __ICCRX__ - #define SEGGER_RTT_LOCK() { \ - unsigned long LockState; \ - LockState = __get_interrupt_state(); \ - __disable_interrupt(); +#define SEGGER_RTT_LOCK() { \ + unsigned long LockState; \ + LockState = __get_interrupt_state(); \ + __disable_interrupt(); - #define SEGGER_RTT_UNLOCK() __set_interrupt_state(LockState); \ - } +#define SEGGER_RTT_UNLOCK() __set_interrupt_state(LockState); \ + } #endif /********************************************************************* @@ -269,13 +269,13 @@ Revision: $Rev: 18601 $ * RTT lock configuration for IAR RL78 */ #ifdef __ICCRL78__ - #define SEGGER_RTT_LOCK() { \ - __istate_t LockState; \ - LockState = __get_interrupt_state(); \ - __disable_interrupt(); +#define SEGGER_RTT_LOCK() { \ + __istate_t LockState; \ + LockState = __get_interrupt_state(); \ + __disable_interrupt(); - #define SEGGER_RTT_UNLOCK() __set_interrupt_state(LockState); \ - } +#define SEGGER_RTT_UNLOCK() __set_interrupt_state(LockState); \ + } #endif /********************************************************************* @@ -283,32 +283,32 @@ Revision: $Rev: 18601 $ * RTT lock configuration for KEIL ARM */ #ifdef __CC_ARM - #if (defined __TARGET_ARCH_6S_M) - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - register unsigned char PRIMASK __asm( "primask"); \ - LockState = PRIMASK; \ - PRIMASK = 1u; \ - __schedule_barrier(); - - #define SEGGER_RTT_UNLOCK() PRIMASK = LockState; \ - __schedule_barrier(); \ - } - #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - register unsigned char BASEPRI __asm( "basepri"); \ - LockState = BASEPRI; \ - BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY; \ - __schedule_barrier(); - - #define SEGGER_RTT_UNLOCK() BASEPRI = LockState; \ - __schedule_barrier(); \ - } - #endif +#if (defined __TARGET_ARCH_6S_M) +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + register unsigned char PRIMASK __asm( "primask"); \ + LockState = PRIMASK; \ + PRIMASK = 1u; \ + __schedule_barrier(); + +#define SEGGER_RTT_UNLOCK() PRIMASK = LockState; \ + __schedule_barrier(); \ + } +#elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) +#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) +#endif +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + register unsigned char BASEPRI __asm( "basepri"); \ + LockState = BASEPRI; \ + BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY; \ + __schedule_barrier(); + +#define SEGGER_RTT_UNLOCK() BASEPRI = LockState; \ + __schedule_barrier(); \ + } +#endif #endif /********************************************************************* @@ -316,25 +316,25 @@ Revision: $Rev: 18601 $ * RTT lock configuration for TI ARM */ #ifdef __TI_ARM__ - #if defined (__TI_ARM_V6M0__) - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - LockState = __get_PRIMASK(); \ - __set_PRIMASK(1); - - #define SEGGER_RTT_UNLOCK() __set_PRIMASK(LockState); \ - } - #elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__)) - #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY - #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) - #endif - #define SEGGER_RTT_LOCK() { \ - unsigned int LockState; \ - LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); - - #define SEGGER_RTT_UNLOCK() _set_interrupt_priority(LockState); \ - } - #endif +#if defined (__TI_ARM_V6M0__) +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + LockState = __get_PRIMASK(); \ + __set_PRIMASK(1); + +#define SEGGER_RTT_UNLOCK() __set_PRIMASK(LockState); \ + } +#elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__)) +#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) +#endif +#define SEGGER_RTT_LOCK() { \ + unsigned int LockState; \ + LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); + +#define SEGGER_RTT_UNLOCK() _set_interrupt_priority(LockState); \ + } +#endif #endif /********************************************************************* @@ -342,13 +342,13 @@ Revision: $Rev: 18601 $ * RTT lock configuration for CCRX */ #ifdef __RX - #define SEGGER_RTT_LOCK() { \ - unsigned long LockState; \ - LockState = get_psw() & 0x010000; \ - clrpsw_i(); - - #define SEGGER_RTT_UNLOCK() set_psw(get_psw() | LockState); \ - } +#define SEGGER_RTT_LOCK() { \ + unsigned long LockState; \ + LockState = get_psw() & 0x010000; \ + clrpsw_i(); + +#define SEGGER_RTT_UNLOCK() set_psw(get_psw() | LockState); \ + } #endif /********************************************************************* @@ -362,10 +362,10 @@ void OS_SIM_EnterCriticalSection(void); void OS_SIM_LeaveCriticalSection(void); #define SEGGER_RTT_LOCK() { \ - OS_SIM_EnterCriticalSection(); + OS_SIM_EnterCriticalSection(); #define SEGGER_RTT_UNLOCK() OS_SIM_LeaveCriticalSection(); \ - } + } #endif /********************************************************************* @@ -373,11 +373,11 @@ void OS_SIM_LeaveCriticalSection(void); * RTT lock configuration fallback */ #ifndef SEGGER_RTT_LOCK - #define SEGGER_RTT_LOCK() // Lock RTT (nestable) (i.e. disable interrupts) + #define SEGGER_RTT_LOCK() // Lock RTT (nestable) (i.e. disable interrupts) #endif #ifndef SEGGER_RTT_UNLOCK - #define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) + #define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/NoRTOS.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/NoRTOS.h index e5ebebbd..1868cb0d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/NoRTOS.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/NoRTOS.h @@ -153,7 +153,8 @@ * changed should be set and given to the NoRTOS framework by calling * NoRTOS_setConfig(). */ -typedef struct _NoRTOS_Config { +typedef struct _NoRTOS_Config +{ /*! Function that is called when a TI Driver "suspends" its operation */ void (*idleCallback)(void); @@ -171,7 +172,7 @@ typedef struct _NoRTOS_Config { * @param cfg Pointer to a NoRTOS_Config structure in which to store * the current configuration values */ -void NoRTOS_getConfig(NoRTOS_Config *cfg); +void NoRTOS_getConfig(NoRTOS_Config* cfg); /*! * @brief Function to set or modify NoRTOS configuration values @@ -179,7 +180,7 @@ void NoRTOS_getConfig(NoRTOS_Config *cfg); * @param cfg Pointer to a NoRTOS_Config structure from which NoRTOS * configuration values are set */ -void NoRTOS_setConfig(NoRTOS_Config *cfg); +void NoRTOS_setConfig(NoRTOS_Config* cfg); /* * @brief Function to call for enabling NoRTOS system operation diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/QueueP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/QueueP.h index 276c3d38..f19a8bf5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/QueueP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/QueueP.h @@ -33,22 +33,24 @@ * ======== QueueP.h ======== */ -typedef struct _QueueP_Elem { - struct _QueueP_Elem *volatile next; - struct _QueueP_Elem *volatile prev; +typedef struct _QueueP_Elem +{ + struct _QueueP_Elem* volatile next; + struct _QueueP_Elem* volatile prev; } QueueP_Elem; -typedef struct _QueueP_Obj { +typedef struct _QueueP_Obj +{ QueueP_Elem elem; } QueueP_Obj; -typedef QueueP_Obj *QueueP_Handle; +typedef QueueP_Obj* QueueP_Handle; -void QueueP_init(QueueP_Obj *obj); -uintptr_t QueueP_head(QueueP_Obj *obj); -uintptr_t QueueP_next(QueueP_Elem *qelem); -uintptr_t QueueP_prev(QueueP_Elem *qelem); -uintptr_t QueueP_get(QueueP_Obj *obj); -void QueueP_put(QueueP_Obj *obj, QueueP_Elem *elem); -void QueueP_remove(QueueP_Elem *qelem) ; -bool QueueP_empty(QueueP_Obj *obj); +void QueueP_init(QueueP_Obj* obj); +uintptr_t QueueP_head(QueueP_Obj* obj); +uintptr_t QueueP_next(QueueP_Elem* qelem); +uintptr_t QueueP_prev(QueueP_Elem* qelem); +uintptr_t QueueP_get(QueueP_Obj* obj); +void QueueP_put(QueueP_Obj* obj, QueueP_Elem* elem); +void QueueP_remove(QueueP_Elem* qelem) ; +bool QueueP_empty(QueueP_Obj* obj); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/TimerP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/TimerP.h index 526a9cf9..69cf1c11 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/TimerP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/kernel/nortos/dpl/TimerP.h @@ -33,41 +33,46 @@ * ======== TimerP.h ======== */ -typedef void *TimerP_Handle; +typedef void* TimerP_Handle; typedef void (*TimerP_Fxn)(uintptr_t arg); #define TimerP_STRUCT_SIZE 60 -typedef enum { +typedef enum +{ TimerP_Status_INUSE, TimerP_Status_FREE, } TimerP_Status; -typedef enum { +typedef enum +{ TimerP_StartMode_AUTO, TimerP_StartMode_USER, } TimerP_StartMode; -typedef struct _TimerP_FreqHz { +typedef struct _TimerP_FreqHz +{ uint32_t hi; uint32_t lo; } TimerP_FreqHz; -typedef struct _TimerP_Params { +typedef struct _TimerP_Params +{ TimerP_StartMode startMode; uintptr_t arg; uint32_t period; /* in microseconds */ } TimerP_Params; -typedef union _TimerP_Struct { +typedef union _TimerP_Struct +{ uint64_t dummy; char data[TimerP_STRUCT_SIZE]; } TimerP_Struct; -void TimerP_Params_init(TimerP_Params *params); -TimerP_Handle TimerP_construct(TimerP_Struct *handle, TimerP_Fxn timerFxn, TimerP_Params *params); -TimerP_Handle TimerP_create(TimerP_Fxn timerFxn, TimerP_Params *params); -void TimerP_getFreq(TimerP_Handle handle, TimerP_FreqHz *freq); +void TimerP_Params_init(TimerP_Params* params); +TimerP_Handle TimerP_construct(TimerP_Struct* handle, TimerP_Fxn timerFxn, TimerP_Params* params); +TimerP_Handle TimerP_create(TimerP_Fxn timerFxn, TimerP_Params* params); +void TimerP_getFreq(TimerP_Handle handle, TimerP_FreqHz* freq); uint32_t TimerP_getMaxTicks(TimerP_Handle handle); void TimerP_setThreshold(TimerP_Handle handle, uint32_t next, bool wrap); void TimerP_setNextTick(TimerP_Handle handle, uint32_t ticks); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/DeviceFamily.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/DeviceFamily.h index 68ecb2fd..8930d836 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/DeviceFamily.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/DeviceFamily.h @@ -92,85 +92,85 @@ extern "C" { * multiple DeviceFamily_XYZ are defined, the first one encountered is used. */ #if defined(DeviceFamily_CC13X0) - #define DeviceFamily_ID DeviceFamily_ID_CC13X0 - #define DeviceFamily_DIRECTORY cc13x0 - #define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X0_CC26X0 +#define DeviceFamily_ID DeviceFamily_ID_CC13X0 +#define DeviceFamily_DIRECTORY cc13x0 +#define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X0_CC26X0 #elif defined(DeviceFamily_CC13X2) - #define DeviceFamily_ID DeviceFamily_ID_CC13X2 - #define DeviceFamily_DIRECTORY cc13x2_cc26x2 - #define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X2_CC26X2 +#define DeviceFamily_ID DeviceFamily_ID_CC13X2 +#define DeviceFamily_DIRECTORY cc13x2_cc26x2 +#define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X2_CC26X2 #elif defined(DeviceFamily_CC26X0) - #define DeviceFamily_ID DeviceFamily_ID_CC26X0 - #define DeviceFamily_DIRECTORY cc26x0 - #define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X0_CC26X0 +#define DeviceFamily_ID DeviceFamily_ID_CC26X0 +#define DeviceFamily_DIRECTORY cc26x0 +#define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X0_CC26X0 #elif defined(DeviceFamily_CC26X0R2) - #define DeviceFamily_ID DeviceFamily_ID_CC26X0R2 - #define DeviceFamily_DIRECTORY cc26x0r2 - #define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X0_CC26X0 +#define DeviceFamily_ID DeviceFamily_ID_CC26X0R2 +#define DeviceFamily_DIRECTORY cc26x0r2 +#define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X0_CC26X0 #elif defined(DeviceFamily_CC26X2) - #define DeviceFamily_ID DeviceFamily_ID_CC26X2 - #define DeviceFamily_DIRECTORY cc13x2_cc26x2 - #define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X2_CC26X2 +#define DeviceFamily_ID DeviceFamily_ID_CC26X2 +#define DeviceFamily_DIRECTORY cc13x2_cc26x2 +#define DeviceFamily_PARENT DeviceFamily_PARENT_CC13X2_CC26X2 #elif defined(DeviceFamily_CC3200) - #define DeviceFamily_ID DeviceFamily_ID_CC3200 - #define DeviceFamily_DIRECTORY cc32xx +#define DeviceFamily_ID DeviceFamily_ID_CC3200 +#define DeviceFamily_DIRECTORY cc32xx #elif defined(DeviceFamily_CC3220) - #define DeviceFamily_ID DeviceFamily_ID_CC3220 - #define DeviceFamily_DIRECTORY cc32xx +#define DeviceFamily_ID DeviceFamily_ID_CC3220 +#define DeviceFamily_DIRECTORY cc32xx #elif defined(DeviceFamily_MSP432P401x) || defined(__MSP432P401R__) - #define DeviceFamily_ID DeviceFamily_ID_MSP432P401x - #define DeviceFamily_DIRECTORY msp432p4xx - #define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P401R - #if !defined(__MSP432P401R__) - #define __MSP432P401R__ - #endif +#define DeviceFamily_ID DeviceFamily_ID_MSP432P401x +#define DeviceFamily_DIRECTORY msp432p4xx +#define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P401R +#if !defined(__MSP432P401R__) +#define __MSP432P401R__ +#endif #elif defined(DeviceFamily_MSP432P4x1xI) - #define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xI - #define DeviceFamily_DIRECTORY msp432p4xx - #define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P4111 - #if !defined(__MSP432P4111__) - #define __MSP432P4111__ - #endif +#define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xI +#define DeviceFamily_DIRECTORY msp432p4xx +#define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P4111 +#if !defined(__MSP432P4111__) +#define __MSP432P4111__ +#endif #elif defined(DeviceFamily_MSP432P4x1xT) - #define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xT - #define DeviceFamily_DIRECTORY msp432p4xx - #define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P4111 - #if !defined(__MSP432P4111__) - #define __MSP432P4111__ - #endif +#define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xT +#define DeviceFamily_DIRECTORY msp432p4xx +#define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P4111 +#if !defined(__MSP432P4111__) +#define __MSP432P4111__ +#endif #elif defined(DeviceFamily_MSP432E401Y) - #define DeviceFamily_ID DeviceFamily_ID_MSP432E401Y - #define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432E4X1Y - #define DeviceFamily_DIRECTORY msp432e4 - #if !defined(__MSP432E401Y__) - #define __MSP432E401Y__ - #endif +#define DeviceFamily_ID DeviceFamily_ID_MSP432E401Y +#define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432E4X1Y +#define DeviceFamily_DIRECTORY msp432e4 +#if !defined(__MSP432E401Y__) +#define __MSP432E401Y__ +#endif #elif defined(DeviceFamily_MSP432E411Y) - #define DeviceFamily_ID DeviceFamily_ID_MSP432E411Y - #define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432E4X1Y - #define DeviceFamily_DIRECTORY msp432e4 - #if !defined(__MSP432E411Y__) - #define __MSP432E411Y__ - #endif +#define DeviceFamily_ID DeviceFamily_ID_MSP432E411Y +#define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432E4X1Y +#define DeviceFamily_DIRECTORY msp432e4 +#if !defined(__MSP432E411Y__) +#define __MSP432E411Y__ +#endif #elif defined(DeviceFamily_MTL) - #define DeviceFamily_ID DeviceFamily_ID_MTL - #define DeviceFamily_DIRECTORY mtxx - #if !defined(__MTL__) - #define __MTL__ - #endif +#define DeviceFamily_ID DeviceFamily_ID_MTL +#define DeviceFamily_DIRECTORY mtxx +#if !defined(__MTL__) +#define __MTL__ +#endif #else - #error "DeviceFamily_XYZ undefined. You must define a DeviceFamily_XYZ!" +#error "DeviceFamily_XYZ undefined. You must define a DeviceFamily_XYZ!" #endif /* Ensure that only one DeviceFamily was specified */ @@ -183,7 +183,7 @@ extern "C" { + defined(DeviceFamily_MSP432E411Y) \ + defined(DeviceFamily_MTL) \ ) > 1 - #error More then one DeviceFamily has been defined! +#error More then one DeviceFamily has been defined! #endif /*! diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/adi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/adi.h index a204232f..03de7e23 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/adi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/adi.h @@ -109,8 +109,8 @@ extern "C" static bool ADIBaseValid(uint32_t ui32Base) { - return(ui32Base == ADI2_BASE || ui32Base == ADI3_BASE || - ui32Base == AUX_ADI4_BASE); + return (ui32Base == ADI2_BASE || ui32Base == ADI3_BASE || + ui32Base == AUX_ADI4_BASE); } #endif @@ -153,9 +153,12 @@ ADI8RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Write the value to the register. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32Reg, ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32Reg) = ui8Val; } } @@ -199,9 +202,12 @@ ADI16RegWrite(uint32_t ui32Base, uint32_t ui32Reg, ASSERT(ui32Reg < ADI_SLAVE_REGS); // Write the value to the register. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFE), ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + (ui32Reg & 0xFE)) = ui16Val; } } @@ -244,9 +250,12 @@ ADI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Write the value to the register. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFC), ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + (ui32Reg & 0xFC)) = ui32Val; } } @@ -280,10 +289,13 @@ ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the register and return the value. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { return AuxAdiDdiSafeRead(ui32Base + ui32Reg, 1); - } else { - return(HWREGB(ui32Base + ui32Reg)); + } + else + { + return (HWREGB(ui32Base + ui32Reg)); } } @@ -319,10 +331,13 @@ ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the registers and return the value. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFE), 2); - } else { - return(HWREGH(ui32Base + (ui32Reg & 0xFE))); + } + else + { + return (HWREGH(ui32Base + (ui32Reg & 0xFE))); } } @@ -356,10 +371,13 @@ ADI32RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the registers and return the value. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFC), 4); - } else { - return(HWREG(ui32Base + (ui32Reg & 0xFC))); + } + else + { + return (HWREG(ui32Base + (ui32Reg & 0xFC))); } } @@ -407,9 +425,12 @@ ADI8BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) ui32RegOffset = ADI_O_SET; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32RegOffset + ui32Reg) = ui8Val; } } @@ -458,9 +479,12 @@ ADI16BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) ui32RegOffset = ADI_O_SET; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + ui32RegOffset + (ui32Reg & 0xFE)) = ui16Val; } } @@ -509,9 +533,12 @@ ADI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) ui32RegOffset = ADI_O_SET; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + ui32RegOffset + (ui32Reg & 0xFC)) = ui32Val; } } @@ -560,9 +587,12 @@ ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) ui32RegOffset = ADI_O_CLR; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32RegOffset + ui32Reg) = ui8Val; } } @@ -611,9 +641,12 @@ ADI16BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) ui32RegOffset = ADI_O_CLR; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + ui32RegOffset + (ui32Reg & 0xFE)) = ui16Val; } } @@ -662,9 +695,12 @@ ADI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) ui32RegOffset = ADI_O_CLR; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + ui32RegOffset + (ui32Reg & 0xFC)) = ui32Val; } } @@ -719,9 +755,12 @@ ADI4SetValBit(uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh, ui32RegOffset = ADI_O_MASK4B + (ui32Reg << 1) + (bWriteHigh ? 1 : 0); // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui8Mask << 4) | ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32RegOffset) = (ui8Mask << 4) | ui8Val; } } @@ -771,9 +810,12 @@ ADI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Mask, ui32RegOffset = ADI_O_MASK8B + (ui32Reg << 1); // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui16Mask << 8) | ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + ui32RegOffset) = (ui16Mask << 8) | ui16Val; } } @@ -824,9 +866,12 @@ ADI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, ui32RegOffset = ADI_O_MASK16B + ((ui32Reg << 1) & 0xFC); // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui32Mask << 16) | ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + ui32RegOffset) = (ui32Mask << 16) | ui32Val; } } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aes.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aes.h index eb199a42..2f21964b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aes.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aes.h @@ -84,15 +84,15 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AESStartDMAOperation NOROM_AESStartDMAOperation - #define AESSetInitializationVector NOROM_AESSetInitializationVector - #define AESWriteCCMInitializationVector NOROM_AESWriteCCMInitializationVector - #define AESReadTag NOROM_AESReadTag - #define AESVerifyTag NOROM_AESVerifyTag - #define AESWriteToKeyStore NOROM_AESWriteToKeyStore - #define AESReadFromKeyStore NOROM_AESReadFromKeyStore - #define AESWaitForIRQFlags NOROM_AESWaitForIRQFlags - #define AESConfigureCCMCtrl NOROM_AESConfigureCCMCtrl +#define AESStartDMAOperation NOROM_AESStartDMAOperation +#define AESSetInitializationVector NOROM_AESSetInitializationVector +#define AESWriteCCMInitializationVector NOROM_AESWriteCCMInitializationVector +#define AESReadTag NOROM_AESReadTag +#define AESVerifyTag NOROM_AESVerifyTag +#define AESWriteToKeyStore NOROM_AESWriteToKeyStore +#define AESReadFromKeyStore NOROM_AESReadFromKeyStore +#define AESWaitForIRQFlags NOROM_AESWaitForIRQFlags +#define AESConfigureCCMCtrl NOROM_AESConfigureCCMCtrl #endif @@ -213,7 +213,7 @@ extern "C" //! \return None // //***************************************************************************** -extern void AESStartDMAOperation(const uint8_t *channel0Addr, uint32_t channel0Length, uint8_t *channel1Addr, uint32_t channel1Length); +extern void AESStartDMAOperation(const uint8_t* channel0Addr, uint32_t channel0Length, uint8_t* channel1Addr, uint32_t channel1Length); //***************************************************************************** // @@ -254,7 +254,7 @@ extern void AESStartDMAOperation(const uint8_t *channel0Addr, uint32_t channel0L //! \return None // //***************************************************************************** -extern void AESSetInitializationVector(const uint32_t *initializationVector); +extern void AESSetInitializationVector(const uint32_t* initializationVector); //***************************************************************************** // @@ -269,7 +269,7 @@ extern void AESSetInitializationVector(const uint32_t *initializationVector); //! \return None // //***************************************************************************** -extern void AESWriteCCMInitializationVector(const uint8_t *nonce, uint32_t nonceLength); +extern void AESWriteCCMInitializationVector(const uint8_t* nonce, uint32_t nonceLength); //***************************************************************************** // @@ -287,7 +287,7 @@ extern void AESWriteCCMInitializationVector(const uint8_t *nonce, uint32_t nonce //! - \ref AES_SUCCESS otherwise // //***************************************************************************** -extern uint32_t AESReadTag(uint8_t *tag, uint32_t tagLength); +extern uint32_t AESReadTag(uint8_t* tag, uint32_t tagLength); //***************************************************************************** // @@ -308,7 +308,7 @@ extern uint32_t AESReadTag(uint8_t *tag, uint32_t tagLength); //! - \ref AES_SUCCESS otherwise // //***************************************************************************** -extern uint32_t AESVerifyTag(const uint8_t *tag, uint32_t tagLength); +extern uint32_t AESVerifyTag(const uint8_t* tag, uint32_t tagLength); //***************************************************************************** // @@ -367,7 +367,7 @@ extern uint32_t AESVerifyTag(const uint8_t *tag, uint32_t tagLength); //! \sa AESReadFromKeyStore // //***************************************************************************** -extern uint32_t AESWriteToKeyStore(const uint8_t *aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea); +extern uint32_t AESWriteToKeyStore(const uint8_t* aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea); //***************************************************************************** // @@ -666,7 +666,7 @@ __STATIC_INLINE uint32_t AESIntStatusMasked(void) // Return the masked interrupt status mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -688,7 +688,7 @@ __STATIC_INLINE uint32_t AESIntStatusMasked(void) __STATIC_INLINE uint32_t AESIntStatusRaw(void) { // Return either the raw interrupt status - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -784,43 +784,43 @@ __STATIC_INLINE void AESIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AESStartDMAOperation - #undef AESStartDMAOperation - #define AESStartDMAOperation ROM_AESStartDMAOperation - #endif - #ifdef ROM_AESSetInitializationVector - #undef AESSetInitializationVector - #define AESSetInitializationVector ROM_AESSetInitializationVector - #endif - #ifdef ROM_AESWriteCCMInitializationVector - #undef AESWriteCCMInitializationVector - #define AESWriteCCMInitializationVector ROM_AESWriteCCMInitializationVector - #endif - #ifdef ROM_AESReadTag - #undef AESReadTag - #define AESReadTag ROM_AESReadTag - #endif - #ifdef ROM_AESVerifyTag - #undef AESVerifyTag - #define AESVerifyTag ROM_AESVerifyTag - #endif - #ifdef ROM_AESWriteToKeyStore - #undef AESWriteToKeyStore - #define AESWriteToKeyStore ROM_AESWriteToKeyStore - #endif - #ifdef ROM_AESReadFromKeyStore - #undef AESReadFromKeyStore - #define AESReadFromKeyStore ROM_AESReadFromKeyStore - #endif - #ifdef ROM_AESWaitForIRQFlags - #undef AESWaitForIRQFlags - #define AESWaitForIRQFlags ROM_AESWaitForIRQFlags - #endif - #ifdef ROM_AESConfigureCCMCtrl - #undef AESConfigureCCMCtrl - #define AESConfigureCCMCtrl ROM_AESConfigureCCMCtrl - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AESStartDMAOperation +#undef AESStartDMAOperation +#define AESStartDMAOperation ROM_AESStartDMAOperation +#endif +#ifdef ROM_AESSetInitializationVector +#undef AESSetInitializationVector +#define AESSetInitializationVector ROM_AESSetInitializationVector +#endif +#ifdef ROM_AESWriteCCMInitializationVector +#undef AESWriteCCMInitializationVector +#define AESWriteCCMInitializationVector ROM_AESWriteCCMInitializationVector +#endif +#ifdef ROM_AESReadTag +#undef AESReadTag +#define AESReadTag ROM_AESReadTag +#endif +#ifdef ROM_AESVerifyTag +#undef AESVerifyTag +#define AESVerifyTag ROM_AESVerifyTag +#endif +#ifdef ROM_AESWriteToKeyStore +#undef AESWriteToKeyStore +#define AESWriteToKeyStore ROM_AESWriteToKeyStore +#endif +#ifdef ROM_AESReadFromKeyStore +#undef AESReadFromKeyStore +#define AESReadFromKeyStore ROM_AESReadFromKeyStore +#endif +#ifdef ROM_AESWaitForIRQFlags +#undef AESWaitForIRQFlags +#define AESWaitForIRQFlags ROM_AESWaitForIRQFlags +#endif +#ifdef ROM_AESConfigureCCMCtrl +#undef AESConfigureCCMCtrl +#define AESConfigureCCMCtrl ROM_AESConfigureCCMCtrl +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_batmon.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_batmon.h index ce7d3238..0a186b63 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_batmon.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_batmon.h @@ -81,7 +81,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONBatMonTemperatureGetDegC NOROM_AONBatMonTemperatureGetDegC +#define AONBatMonTemperatureGetDegC NOROM_AONBatMonTemperatureGetDegC #endif @@ -224,7 +224,7 @@ AONBatMonNewBatteryMeasureReady(void) AON_BATMON_BATUPD_STAT ? true : false; // Clear status bit if set. - if(bStatus) + if (bStatus) { HWREG(AON_BATMON_BASE + AON_BATMON_O_BATUPD) = 1; } @@ -263,7 +263,7 @@ AONBatMonNewTempMeasureReady(void) AON_BATMON_TEMPUPD_STAT ? true : false; // Clear status bit if set. - if(bStatus) + if (bStatus) { HWREG(AON_BATMON_BASE + AON_BATMON_O_TEMPUPD) = 1; } @@ -279,11 +279,11 @@ AONBatMonNewTempMeasureReady(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONBatMonTemperatureGetDegC - #undef AONBatMonTemperatureGetDegC - #define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONBatMonTemperatureGetDegC +#undef AONBatMonTemperatureGetDegC +#define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_event.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_event.h index cdceba44..47925624 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_event.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_event.h @@ -81,12 +81,12 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet - #define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet - #define AONEventAuxWakeUpSet NOROM_AONEventAuxWakeUpSet - #define AONEventAuxWakeUpGet NOROM_AONEventAuxWakeUpGet - #define AONEventMcuSet NOROM_AONEventMcuSet - #define AONEventMcuGet NOROM_AONEventMcuGet +#define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet +#define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet +#define AONEventAuxWakeUpSet NOROM_AONEventAuxWakeUpSet +#define AONEventAuxWakeUpGet NOROM_AONEventAuxWakeUpGet +#define AONEventMcuSet NOROM_AONEventMcuSet +#define AONEventMcuGet NOROM_AONEventMcuGet #endif //***************************************************************************** @@ -99,8 +99,8 @@ extern "C" // ... // ... // AON_EVENT_DIO31 // Edge detect on DIO31. See hw_device.h #define AON_EVENT_IO 32 // Edge detect on any DIO. Edge detect is enabled and configured in IOC. - // Event ID 33 is reserved for future use - // Event ID 34 is reserved for future use +// Event ID 33 is reserved for future use +// Event ID 34 is reserved for future use #define AON_EVENT_RTC_CH0 35 // RTC channel 0 #define AON_EVENT_RTC_CH1 36 // RTC channel 1 #define AON_EVENT_RTC_CH2 37 // RTC channel 2 @@ -123,7 +123,7 @@ extern "C" #define AON_EVENT_BATMON_VOLT 54 // BATMON voltage update event #define AON_EVENT_AUX_COMPB_ASYNC 55 // Comparator B triggered. Asynchronous signal directly from the AUX Comparator B #define AON_EVENT_AUX_COMPB_ASYNC_N 56 // Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B - // Event ID 57-62 is reserved for future use +// Event ID 57-62 is reserved for future use #define AON_EVENT_NONE 63 // No event, always low // Keeping backward compatibility until major revision number is incremented @@ -573,31 +573,31 @@ AONEventRtcGet(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONEventMcuWakeUpSet - #undef AONEventMcuWakeUpSet - #define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet - #endif - #ifdef ROM_AONEventMcuWakeUpGet - #undef AONEventMcuWakeUpGet - #define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet - #endif - #ifdef ROM_AONEventAuxWakeUpSet - #undef AONEventAuxWakeUpSet - #define AONEventAuxWakeUpSet ROM_AONEventAuxWakeUpSet - #endif - #ifdef ROM_AONEventAuxWakeUpGet - #undef AONEventAuxWakeUpGet - #define AONEventAuxWakeUpGet ROM_AONEventAuxWakeUpGet - #endif - #ifdef ROM_AONEventMcuSet - #undef AONEventMcuSet - #define AONEventMcuSet ROM_AONEventMcuSet - #endif - #ifdef ROM_AONEventMcuGet - #undef AONEventMcuGet - #define AONEventMcuGet ROM_AONEventMcuGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONEventMcuWakeUpSet +#undef AONEventMcuWakeUpSet +#define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet +#endif +#ifdef ROM_AONEventMcuWakeUpGet +#undef AONEventMcuWakeUpGet +#define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet +#endif +#ifdef ROM_AONEventAuxWakeUpSet +#undef AONEventAuxWakeUpSet +#define AONEventAuxWakeUpSet ROM_AONEventAuxWakeUpSet +#endif +#ifdef ROM_AONEventAuxWakeUpGet +#undef AONEventAuxWakeUpGet +#define AONEventAuxWakeUpGet ROM_AONEventAuxWakeUpGet +#endif +#ifdef ROM_AONEventMcuSet +#undef AONEventMcuSet +#define AONEventMcuSet ROM_AONEventMcuSet +#endif +#ifdef ROM_AONEventMcuGet +#undef AONEventMcuGet +#define AONEventMcuGet ROM_AONEventMcuGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_ioc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_ioc.h index 513e0e2d..f60cb031 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_ioc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_ioc.h @@ -186,7 +186,7 @@ AONIOCDriveStrengthGet(uint32_t ui32DriveLevel) (ui32DriveLevel == AONIOC_DRV_LVL_MAX)); // Return the drive strength value. - return( HWREG(AON_IOC_BASE + ui32DriveLevel) ); + return ( HWREG(AON_IOC_BASE + ui32DriveLevel) ); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_rtc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_rtc.h index eb98dec9..569fe222 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_rtc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_rtc.h @@ -80,8 +80,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONRTCCurrentCompareValueGet NOROM_AONRTCCurrentCompareValueGet - #define AONRTCCurrent64BitValueGet NOROM_AONRTCCurrent64BitValueGet +#define AONRTCCurrentCompareValueGet NOROM_AONRTCCurrentCompareValueGet +#define AONRTCCurrent64BitValueGet NOROM_AONRTCCurrent64BitValueGet #endif //***************************************************************************** @@ -227,7 +227,7 @@ __STATIC_INLINE bool AONRTCActive(void) { // Read if RTC is enabled - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN)); } //***************************************************************************** @@ -250,22 +250,22 @@ AONRTCChannelActive(uint32_t ui32Channel) { uint32_t uint32Status = 0; - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN); } - return(uint32Status); + return (uint32Status); } //***************************************************************************** @@ -372,17 +372,17 @@ AONRTCEventClear(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH0; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH1; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH2; } @@ -415,22 +415,22 @@ AONRTCEventGet(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH0_BITN); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH1_BITN); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH2_BITN); } - return(uint32Event); + return (uint32Event); } //***************************************************************************** @@ -458,7 +458,7 @@ AONRTCSecGet(void) { // The following read gets the seconds, but also latches the fractional // part. - return(HWREG(AON_RTC_BASE + AON_RTC_O_SEC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SEC)); } //***************************************************************************** @@ -490,7 +490,7 @@ AONRTCFractionGet(void) // consistent reading. // Note3: Interrupts must be disabled between the call to AONRTCSecGet() and this // call since there are interrupt functions that reads AON_RTC_O_SEC - return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC)); } //***************************************************************************** @@ -514,7 +514,7 @@ AONRTCFractionGet(void) __STATIC_INLINE uint32_t AONRTCSubSecIncrGet(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSECINC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SUBSECINC)); } //***************************************************************************** @@ -565,7 +565,7 @@ AONRTCModeCh1Set(uint32_t ui32Mode) __STATIC_INLINE uint32_t AONRTCModeCh1Get(void) { - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_CAPT_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_CAPT_EN_BITN)); } //***************************************************************************** @@ -622,7 +622,7 @@ AONRTCModeCh2Set(uint32_t ui32Mode) __STATIC_INLINE uint32_t AONRTCModeCh2Get(void) { - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_CONT_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_CONT_EN_BITN)); } //***************************************************************************** @@ -652,17 +652,17 @@ AONRTCChannelEnable(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN) = 1; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN) = 1; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN) = 1; } @@ -695,17 +695,17 @@ AONRTCChannelDisable(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN) = 0; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN) = 0; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN) = 0; } @@ -742,17 +742,17 @@ AONRTCCompareValueSet(uint32_t ui32Channel, uint32_t ui32CompValue) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREG(AON_RTC_BASE + AON_RTC_O_CH0CMP) = ui32CompValue; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREG(AON_RTC_BASE + AON_RTC_O_CH1CMP) = ui32CompValue; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMP) = ui32CompValue; } @@ -783,22 +783,22 @@ AONRTCCompareValueGet(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH0CMP); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH1CMP); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMP); } - return(ui32Value); + return (ui32Value); } //***************************************************************************** @@ -877,7 +877,7 @@ AONRTCIncValueCh2Set(uint32_t ui32IncValue) __STATIC_INLINE uint32_t AONRTCIncValueCh2Get(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMPINC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMPINC)); } //***************************************************************************** @@ -895,7 +895,7 @@ AONRTCIncValueCh2Get(void) __STATIC_INLINE uint32_t AONRTCCaptureValueCh1Get(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_CH1CAPT)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_CH1CAPT)); } //***************************************************************************** @@ -905,15 +905,15 @@ AONRTCCaptureValueCh1Get(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONRTCCurrentCompareValueGet - #undef AONRTCCurrentCompareValueGet - #define AONRTCCurrentCompareValueGet ROM_AONRTCCurrentCompareValueGet - #endif - #ifdef ROM_AONRTCCurrent64BitValueGet - #undef AONRTCCurrent64BitValueGet - #define AONRTCCurrent64BitValueGet ROM_AONRTCCurrent64BitValueGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONRTCCurrentCompareValueGet +#undef AONRTCCurrentCompareValueGet +#define AONRTCCurrentCompareValueGet ROM_AONRTCCurrentCompareValueGet +#endif +#ifdef ROM_AONRTCCurrent64BitValueGet +#undef AONRTCCurrent64BitValueGet +#define AONRTCCurrent64BitValueGet ROM_AONRTCCurrent64BitValueGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_wuc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_wuc.h index bb8dd13e..a915840c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_wuc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aon_wuc.h @@ -83,9 +83,9 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONWUCAuxReset NOROM_AONWUCAuxReset - #define AONWUCRechargeCtrlConfigSet NOROM_AONWUCRechargeCtrlConfigSet - #define AONWUCOscConfig NOROM_AONWUCOscConfig +#define AONWUCAuxReset NOROM_AONWUCAuxReset +#define AONWUCRechargeCtrlConfigSet NOROM_AONWUCRechargeCtrlConfigSet +#define AONWUCOscConfig NOROM_AONWUCOscConfig #endif //***************************************************************************** @@ -94,11 +94,11 @@ extern "C" // //***************************************************************************** #define AONWUC_CLOCK_SRC_HF 0x00000003 // System clock high frequency - - // 48 MHz. +// 48 MHz. #define AONWUC_CLOCK_SRC_LF 0x00000001 // System clock low frequency - - // 32 kHz. +// 32 kHz. #define AONWUC_NO_CLOCK 0x00000000 // System clock low frequency - - // 32 kHz. +// 32 kHz. //***************************************************************************** // @@ -186,15 +186,15 @@ extern "C" //***************************************************************************** #define RC_RATE_MAX 768 // Maximum recharge rate for the - // recharge controller. +// recharge controller. #define RC_RATE_MIN 2 // Minimum recharge rate for the - // recharge controller. +// recharge controller. //***************************************************************************** #define AONWUC_MCU_RESET_SRC 0x00000002 // MCU reset source can be SW or - // JTAG +// JTAG #define AONWUC_MCU_WARM_RESET 0x00000001 // MCU reset type and can be warm - // or not warm. +// or not warm. //***************************************************************************** // @@ -235,8 +235,8 @@ AONWUCMcuPowerDownConfig(uint32_t ui32ClkSrc) ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_MCUCLK); ui32Reg &= ~AON_WUC_MCUCLK_PWR_DWN_SRC_M; HWREG(AON_WUC_BASE + AON_WUC_O_MCUCLK) = ui32Reg | - (ui32ClkSrc << - AON_WUC_MCUCLK_PWR_DWN_SRC_S); + (ui32ClkSrc << + AON_WUC_MCUCLK_PWR_DWN_SRC_S); } //***************************************************************************** @@ -365,7 +365,7 @@ AONWUCAuxClockConfigGet(void) // Return the clock divider value. return ((HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK) & AON_WUC_AUXCLK_SCLK_HF_DIV_M) >> - AON_WUC_AUXCLK_SCLK_HF_DIV_S); + AON_WUC_AUXCLK_SCLK_HF_DIV_S); } //***************************************************************************** @@ -399,8 +399,8 @@ AONWUCAuxPowerDownConfig(uint32_t ui32ClkSrc) ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK); ui32Reg &= ~AON_WUC_AUXCLK_PWR_DWN_SRC_M; HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK) = ui32Reg | - (ui32ClkSrc << - AON_WUC_AUXCLK_PWR_DWN_SRC_S); + (ui32ClkSrc << + AON_WUC_AUXCLK_PWR_DWN_SRC_S); } @@ -734,7 +734,7 @@ __STATIC_INLINE uint32_t AONWUCRechargeCtrlConfigGet(void) { // Return the current configuration. - return(HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG)); + return (HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG)); } //***************************************************************************** @@ -803,19 +803,19 @@ AONWUCJtagPowerOff(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONWUCAuxReset - #undef AONWUCAuxReset - #define AONWUCAuxReset ROM_AONWUCAuxReset - #endif - #ifdef ROM_AONWUCRechargeCtrlConfigSet - #undef AONWUCRechargeCtrlConfigSet - #define AONWUCRechargeCtrlConfigSet ROM_AONWUCRechargeCtrlConfigSet - #endif - #ifdef ROM_AONWUCOscConfig - #undef AONWUCOscConfig - #define AONWUCOscConfig ROM_AONWUCOscConfig - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONWUCAuxReset +#undef AONWUCAuxReset +#define AONWUCAuxReset ROM_AONWUCAuxReset +#endif +#ifdef ROM_AONWUCRechargeCtrlConfigSet +#undef AONWUCRechargeCtrlConfigSet +#define AONWUCRechargeCtrlConfigSet ROM_AONWUCRechargeCtrlConfigSet +#endif +#ifdef ROM_AONWUCOscConfig +#undef AONWUCOscConfig +#define AONWUCOscConfig ROM_AONWUCOscConfig +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_adc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_adc.h index 55631d7d..34a0557d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_adc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_adc.h @@ -84,19 +84,19 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXADCDisable NOROM_AUXADCDisable - #define AUXADCEnableAsync NOROM_AUXADCEnableAsync - #define AUXADCEnableSync NOROM_AUXADCEnableSync - #define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling - #define AUXADCFlushFifo NOROM_AUXADCFlushFifo - #define AUXADCReadFifo NOROM_AUXADCReadFifo - #define AUXADCPopFifo NOROM_AUXADCPopFifo - #define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain - #define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset - #define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts - #define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue - #define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset - #define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset +#define AUXADCDisable NOROM_AUXADCDisable +#define AUXADCEnableAsync NOROM_AUXADCEnableAsync +#define AUXADCEnableSync NOROM_AUXADCEnableSync +#define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling +#define AUXADCFlushFifo NOROM_AUXADCFlushFifo +#define AUXADCReadFifo NOROM_AUXADCReadFifo +#define AUXADCPopFifo NOROM_AUXADCPopFifo +#define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain +#define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset +#define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts +#define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue +#define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset +#define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset #endif //***************************************************************************** @@ -515,59 +515,59 @@ extern int32_t AUXADCUnadjustValueForGainAndOffset(int32_t adcValue, int32_t gai // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXADCDisable - #undef AUXADCDisable - #define AUXADCDisable ROM_AUXADCDisable - #endif - #ifdef ROM_AUXADCEnableAsync - #undef AUXADCEnableAsync - #define AUXADCEnableAsync ROM_AUXADCEnableAsync - #endif - #ifdef ROM_AUXADCEnableSync - #undef AUXADCEnableSync - #define AUXADCEnableSync ROM_AUXADCEnableSync - #endif - #ifdef ROM_AUXADCDisableInputScaling - #undef AUXADCDisableInputScaling - #define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling - #endif - #ifdef ROM_AUXADCFlushFifo - #undef AUXADCFlushFifo - #define AUXADCFlushFifo ROM_AUXADCFlushFifo - #endif - #ifdef ROM_AUXADCReadFifo - #undef AUXADCReadFifo - #define AUXADCReadFifo ROM_AUXADCReadFifo - #endif - #ifdef ROM_AUXADCPopFifo - #undef AUXADCPopFifo - #define AUXADCPopFifo ROM_AUXADCPopFifo - #endif - #ifdef ROM_AUXADCGetAdjustmentGain - #undef AUXADCGetAdjustmentGain - #define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain - #endif - #ifdef ROM_AUXADCGetAdjustmentOffset - #undef AUXADCGetAdjustmentOffset - #define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset - #endif - #ifdef ROM_AUXADCValueToMicrovolts - #undef AUXADCValueToMicrovolts - #define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts - #endif - #ifdef ROM_AUXADCMicrovoltsToValue - #undef AUXADCMicrovoltsToValue - #define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue - #endif - #ifdef ROM_AUXADCAdjustValueForGainAndOffset - #undef AUXADCAdjustValueForGainAndOffset - #define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset - #endif - #ifdef ROM_AUXADCUnadjustValueForGainAndOffset - #undef AUXADCUnadjustValueForGainAndOffset - #define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXADCDisable +#undef AUXADCDisable +#define AUXADCDisable ROM_AUXADCDisable +#endif +#ifdef ROM_AUXADCEnableAsync +#undef AUXADCEnableAsync +#define AUXADCEnableAsync ROM_AUXADCEnableAsync +#endif +#ifdef ROM_AUXADCEnableSync +#undef AUXADCEnableSync +#define AUXADCEnableSync ROM_AUXADCEnableSync +#endif +#ifdef ROM_AUXADCDisableInputScaling +#undef AUXADCDisableInputScaling +#define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling +#endif +#ifdef ROM_AUXADCFlushFifo +#undef AUXADCFlushFifo +#define AUXADCFlushFifo ROM_AUXADCFlushFifo +#endif +#ifdef ROM_AUXADCReadFifo +#undef AUXADCReadFifo +#define AUXADCReadFifo ROM_AUXADCReadFifo +#endif +#ifdef ROM_AUXADCPopFifo +#undef AUXADCPopFifo +#define AUXADCPopFifo ROM_AUXADCPopFifo +#endif +#ifdef ROM_AUXADCGetAdjustmentGain +#undef AUXADCGetAdjustmentGain +#define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain +#endif +#ifdef ROM_AUXADCGetAdjustmentOffset +#undef AUXADCGetAdjustmentOffset +#define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset +#endif +#ifdef ROM_AUXADCValueToMicrovolts +#undef AUXADCValueToMicrovolts +#define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts +#endif +#ifdef ROM_AUXADCMicrovoltsToValue +#undef AUXADCMicrovoltsToValue +#define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue +#endif +#ifdef ROM_AUXADCAdjustValueForGainAndOffset +#undef AUXADCAdjustValueForGainAndOffset +#define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset +#endif +#ifdef ROM_AUXADCUnadjustValueForGainAndOffset +#undef AUXADCUnadjustValueForGainAndOffset +#define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_smph.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_smph.h index 4ff13143..a83b6198 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_smph.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_smph.h @@ -137,7 +137,7 @@ AUXSMPHAcquire(uint32_t ui32Semaphore) // Wait for semaphore to be released such that it can be claimed // Semaphore register reads 1 when lock was acquired otherwise 0 // (i.e. AUX_SMPH_CLAIMED). - while(HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) == + while (HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) == AUX_SMPH_CLAIMED) { } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_tdc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_tdc.h index a8f567fe..4a6691c2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_tdc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_tdc.h @@ -81,8 +81,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXTDCConfigSet NOROM_AUXTDCConfigSet - #define AUXTDCMeasurementDone NOROM_AUXTDCMeasurementDone +#define AUXTDCConfigSet NOROM_AUXTDCConfigSet +#define AUXTDCMeasurementDone NOROM_AUXTDCMeasurementDone #endif //***************************************************************************** @@ -240,7 +240,7 @@ extern "C" static bool AUXTDCBaseValid(uint32_t ui32Base) { - return(ui32Base == AUX_TDC_BASE); + return (ui32Base == AUX_TDC_BASE); } #endif @@ -274,8 +274,8 @@ AUXTDCStatusGet(uint32_t ui32Base) ASSERT(AUXTDCBaseValid(ui32Base)); // Return the status value for the correct ADI Slave. - return((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >> - AUX_TDC_STAT_STATE_S); + return ((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >> + AUX_TDC_STAT_STATE_S); } //***************************************************************************** @@ -620,7 +620,7 @@ AUXTDCCounterEnable(uint32_t ui32Base) // Check if the AUX TDC is in idle mode. If not in Idle mode, the counter // will not be enabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -656,7 +656,7 @@ AUXTDCCounterDisable(uint32_t ui32Base) // Check if the AUX TDC is in Idle mode. If not in Idle mode, the counter // will not be disabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -697,7 +697,7 @@ AUXTDCCounterSet(uint32_t ui32Base, uint32_t ui32Events) // Check if the AUX TDC is in idle mode. If not in idle mode, the counter // will not be disabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -745,15 +745,15 @@ AUXTDCCounterGet(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXTDCConfigSet - #undef AUXTDCConfigSet - #define AUXTDCConfigSet ROM_AUXTDCConfigSet - #endif - #ifdef ROM_AUXTDCMeasurementDone - #undef AUXTDCMeasurementDone - #define AUXTDCMeasurementDone ROM_AUXTDCMeasurementDone - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXTDCConfigSet +#undef AUXTDCConfigSet +#define AUXTDCConfigSet ROM_AUXTDCConfigSet +#endif +#ifdef ROM_AUXTDCMeasurementDone +#undef AUXTDCMeasurementDone +#define AUXTDCMeasurementDone ROM_AUXTDCMeasurementDone +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_timer.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_timer.h index b3266dde..45289b71 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_timer.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_timer.h @@ -82,11 +82,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXTimerConfigure NOROM_AUXTimerConfigure - #define AUXTimerStart NOROM_AUXTimerStart - #define AUXTimerStop NOROM_AUXTimerStop - #define AUXTimerPrescaleSet NOROM_AUXTimerPrescaleSet - #define AUXTimerPrescaleGet NOROM_AUXTimerPrescaleGet +#define AUXTimerConfigure NOROM_AUXTimerConfigure +#define AUXTimerStart NOROM_AUXTimerStart +#define AUXTimerStop NOROM_AUXTimerStop +#define AUXTimerPrescaleSet NOROM_AUXTimerPrescaleSet +#define AUXTimerPrescaleGet NOROM_AUXTimerPrescaleGet #endif //***************************************************************************** @@ -355,9 +355,9 @@ AUXTimerTargetValGet(uint32_t ui32Timer) // Check the arguments. ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1)); - return(HWREG((ui32Timer & AUX_TIMER_0) ? - (AUX_TIMER_BASE + AUX_TIMER_O_T0TARGET) : - (AUX_TIMER_BASE + AUX_TIMER_O_T1TARGET))); + return (HWREG((ui32Timer & AUX_TIMER_0) ? + (AUX_TIMER_BASE + AUX_TIMER_O_T0TARGET) : + (AUX_TIMER_BASE + AUX_TIMER_O_T1TARGET))); } //***************************************************************************** @@ -439,27 +439,27 @@ extern uint32_t AUXTimerPrescaleGet(uint32_t ui32Timer); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXTimerConfigure - #undef AUXTimerConfigure - #define AUXTimerConfigure ROM_AUXTimerConfigure - #endif - #ifdef ROM_AUXTimerStart - #undef AUXTimerStart - #define AUXTimerStart ROM_AUXTimerStart - #endif - #ifdef ROM_AUXTimerStop - #undef AUXTimerStop - #define AUXTimerStop ROM_AUXTimerStop - #endif - #ifdef ROM_AUXTimerPrescaleSet - #undef AUXTimerPrescaleSet - #define AUXTimerPrescaleSet ROM_AUXTimerPrescaleSet - #endif - #ifdef ROM_AUXTimerPrescaleGet - #undef AUXTimerPrescaleGet - #define AUXTimerPrescaleGet ROM_AUXTimerPrescaleGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXTimerConfigure +#undef AUXTimerConfigure +#define AUXTimerConfigure ROM_AUXTimerConfigure +#endif +#ifdef ROM_AUXTimerStart +#undef AUXTimerStart +#define AUXTimerStart ROM_AUXTimerStart +#endif +#ifdef ROM_AUXTimerStop +#undef AUXTimerStop +#define AUXTimerStop ROM_AUXTimerStop +#endif +#ifdef ROM_AUXTimerPrescaleSet +#undef AUXTimerPrescaleSet +#define AUXTimerPrescaleSet ROM_AUXTimerPrescaleSet +#endif +#ifdef ROM_AUXTimerPrescaleGet +#undef AUXTimerPrescaleGet +#define AUXTimerPrescaleGet ROM_AUXTimerPrescaleGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_wuc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_wuc.h index 532d1e99..a8125361 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_wuc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/aux_wuc.h @@ -80,10 +80,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXWUCClockEnable NOROM_AUXWUCClockEnable - #define AUXWUCClockDisable NOROM_AUXWUCClockDisable - #define AUXWUCClockStatus NOROM_AUXWUCClockStatus - #define AUXWUCPowerCtrl NOROM_AUXWUCPowerCtrl +#define AUXWUCClockEnable NOROM_AUXWUCClockEnable +#define AUXWUCClockDisable NOROM_AUXWUCClockDisable +#define AUXWUCClockStatus NOROM_AUXWUCClockStatus +#define AUXWUCPowerCtrl NOROM_AUXWUCPowerCtrl #endif //***************************************************************************** @@ -308,23 +308,23 @@ AUXWUCFreezeDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXWUCClockEnable - #undef AUXWUCClockEnable - #define AUXWUCClockEnable ROM_AUXWUCClockEnable - #endif - #ifdef ROM_AUXWUCClockDisable - #undef AUXWUCClockDisable - #define AUXWUCClockDisable ROM_AUXWUCClockDisable - #endif - #ifdef ROM_AUXWUCClockStatus - #undef AUXWUCClockStatus - #define AUXWUCClockStatus ROM_AUXWUCClockStatus - #endif - #ifdef ROM_AUXWUCPowerCtrl - #undef AUXWUCPowerCtrl - #define AUXWUCPowerCtrl ROM_AUXWUCPowerCtrl - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXWUCClockEnable +#undef AUXWUCClockEnable +#define AUXWUCClockEnable ROM_AUXWUCClockEnable +#endif +#ifdef ROM_AUXWUCClockDisable +#undef AUXWUCClockDisable +#define AUXWUCClockDisable ROM_AUXWUCClockDisable +#endif +#ifdef ROM_AUXWUCClockStatus +#undef AUXWUCClockStatus +#define AUXWUCClockStatus ROM_AUXWUCClockStatus +#endif +#ifdef ROM_AUXWUCPowerCtrl +#undef AUXWUCPowerCtrl +#define AUXWUCPowerCtrl ROM_AUXWUCPowerCtrl +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ccfgread.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ccfgread.h index e3397e93..3dec1eb5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ccfgread.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ccfgread.h @@ -89,8 +89,8 @@ __STATIC_INLINE bool CCFGRead_DIS_GPRAM( void ) { return (( HWREG( CCFG_BASE + CCFG_O_SIZE_AND_DIS_FLAGS ) & - CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_M ) >> - CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_S ) ; + CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_M ) >> + CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_S ) ; } //***************************************************************************** @@ -104,8 +104,8 @@ __STATIC_INLINE bool CCFGRead_EXT_LF_CLK_DIO( void ) { return (( HWREG( CCFG_BASE + CCFG_O_EXT_LF_CLK ) & - CCFG_EXT_LF_CLK_DIO_M ) >> - CCFG_EXT_LF_CLK_DIO_S ) ; + CCFG_EXT_LF_CLK_DIO_M ) >> + CCFG_EXT_LF_CLK_DIO_S ) ; } //***************************************************************************** @@ -134,8 +134,8 @@ __STATIC_INLINE uint32_t CCFGRead_SCLK_LF_OPTION( void ) { return (( HWREG( CCFG_BASE + CCFG_O_MODE_CONF ) & - CCFG_MODE_CONF_SCLK_LF_OPTION_M ) >> - CCFG_MODE_CONF_SCLK_LF_OPTION_S ) ; + CCFG_MODE_CONF_SCLK_LF_OPTION_M ) >> + CCFG_MODE_CONF_SCLK_LF_OPTION_S ) ; } //***************************************************************************** @@ -163,8 +163,8 @@ __STATIC_INLINE uint32_t CCFGRead_XOSC_FREQ( void ) { return (( HWREG( CCFG_BASE + CCFG_O_MODE_CONF ) & - CCFG_MODE_CONF_XOSC_FREQ_M ) >> - CCFG_MODE_CONF_XOSC_FREQ_S ) ; + CCFG_MODE_CONF_XOSC_FREQ_M ) >> + CCFG_MODE_CONF_XOSC_FREQ_S ) ; } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/chipinfo.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/chipinfo.h index 38dd113d..9efd02c7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/chipinfo.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/chipinfo.h @@ -79,12 +79,12 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV - #define ChipInfo_GetPackageType NOROM_ChipInfo_GetPackageType - #define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType - #define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily - #define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision - #define ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated +#define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV +#define ChipInfo_GetPackageType NOROM_ChipInfo_GetPackageType +#define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType +#define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily +#define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision +#define ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated #endif //***************************************************************************** @@ -96,11 +96,12 @@ extern "C" //! E.g: 0x06 means that the chip supports both BLE and IEEE 802.15.4 // //***************************************************************************** -typedef enum { - PROTOCOL_Unknown = 0 , //!< None of the known protocols are supported. - PROTOCOLBIT_BLE = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported. - PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported. - PROTOCOLBIT_Proprietary = 0x08 //!< Bit[3] set, indicates that proprietary protocols are supported. +typedef enum +{ + PROTOCOL_Unknown = 0, //!< None of the known protocols are supported. + PROTOCOLBIT_BLE = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported. + PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported. + PROTOCOLBIT_Proprietary = 0x08 //!< Bit[3] set, indicates that proprietary protocols are supported. } ProtocolBitVector_t; //***************************************************************************** @@ -124,7 +125,7 @@ extern ProtocolBitVector_t ChipInfo_GetSupportedProtocol_BV( void ); __STATIC_INLINE bool ChipInfo_SupportsBLE( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 ); } //***************************************************************************** @@ -138,7 +139,7 @@ ChipInfo_SupportsBLE( void ) __STATIC_INLINE bool ChipInfo_SupportsIEEE_802_15_4( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 ); } //***************************************************************************** @@ -152,7 +153,7 @@ ChipInfo_SupportsIEEE_802_15_4( void ) __STATIC_INLINE bool ChipInfo_SupportsPROPRIETARY( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 ); } //***************************************************************************** @@ -163,14 +164,15 @@ ChipInfo_SupportsPROPRIETARY( void ) //! Packages available for a specific device are shown in the device datasheet. // //***************************************************************************** -typedef enum { - PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown. - PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package. - PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package. - PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package. - PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die). - PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV). - PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks. +typedef enum +{ + PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown. + PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package. + PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package. + PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package. + PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die). + PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV). + PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks. } PackageType_t; //***************************************************************************** @@ -194,7 +196,7 @@ extern PackageType_t ChipInfo_GetPackageType( void ); __STATIC_INLINE bool ChipInfo_PackageTypeIs4x4( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_4x4 ); + return ( ChipInfo_GetPackageType() == PACKAGE_4x4 ); } //***************************************************************************** @@ -208,7 +210,7 @@ ChipInfo_PackageTypeIs4x4( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs5x5( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_5x5 ); + return ( ChipInfo_GetPackageType() == PACKAGE_5x5 ); } //***************************************************************************** @@ -222,7 +224,7 @@ ChipInfo_PackageTypeIs5x5( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs7x7( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_7x7 ); + return ( ChipInfo_GetPackageType() == PACKAGE_7x7 ); } //***************************************************************************** @@ -236,7 +238,7 @@ ChipInfo_PackageTypeIs7x7( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIsWAFER( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_WAFER ); + return ( ChipInfo_GetPackageType() == PACKAGE_WAFER ); } //***************************************************************************** @@ -250,7 +252,7 @@ ChipInfo_PackageTypeIsWAFER( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIsWCSP( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_WCSP ); + return ( ChipInfo_GetPackageType() == PACKAGE_WCSP ); } //***************************************************************************** @@ -264,7 +266,7 @@ ChipInfo_PackageTypeIsWCSP( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs7x7Q1( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 ); + return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 ); } //***************************************************************************** @@ -277,8 +279,8 @@ ChipInfo_PackageTypeIs7x7Q1( void ) __STATIC_INLINE uint32_t ChipInfo_GetDeviceIdHwRevCode( void ) { - // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28] - return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 ); + // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28] + return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 ); } //***************************************************************************** @@ -295,15 +297,16 @@ ChipInfo_GetDeviceIdHwRevCode( void ) __STATIC_INLINE uint32_t ChipInfo_GetMinorHwRev( void ) { - uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) & - FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >> - FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ; + uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) & + FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >> + FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ; - if ( minorRev >= 0x80 ) { - minorRev = 0; - } + if ( minorRev >= 0x80 ) + { + minorRev = 0; + } - return( minorRev ); + return ( minorRev ); } //***************************************************************************** @@ -319,7 +322,7 @@ ChipInfo_GetMinorHwRev( void ) __STATIC_INLINE uint32_t ChipInfo_GetUserId( void ) { - return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID )); + return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID )); } //***************************************************************************** @@ -327,23 +330,24 @@ ChipInfo_GetUserId( void ) //! \brief Chip type enumeration // //***************************************************************************** -typedef enum { - CHIP_TYPE_Unknown = -1, //!< -1 means that the chip type is unknown. - CHIP_TYPE_CC1310 = 0, //!< 0 means that this is a CC1310 chip. - CHIP_TYPE_CC1350 = 1, //!< 1 means that this is a CC1350 chip. - CHIP_TYPE_CC2620 = 2, //!< 2 means that this is a CC2620 chip. - CHIP_TYPE_CC2630 = 3, //!< 3 means that this is a CC2630 chip. - CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip. - CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip. - CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip. - CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip. - CHIP_TYPE_CC2640R2 = 8, //!< 8 means that this is a CC2640R2 chip. - CHIP_TYPE_CC2642 = 9, //!< 9 means that this is a CC2642 chip. - CHIP_TYPE_unused = 10,//!< 10 unused value - CHIP_TYPE_CC2652 = 11,//!< 11 means that this is a CC2652 chip. - CHIP_TYPE_CC1312 = 12,//!< 12 means that this is a CC1312 chip. - CHIP_TYPE_CC1352 = 13,//!< 13 means that this is a CC1352 chip. - CHIP_TYPE_CC1352P = 14 //!< 14 means that this is a CC1352P chip. +typedef enum +{ + CHIP_TYPE_Unknown = -1, //!< -1 means that the chip type is unknown. + CHIP_TYPE_CC1310 = 0, //!< 0 means that this is a CC1310 chip. + CHIP_TYPE_CC1350 = 1, //!< 1 means that this is a CC1350 chip. + CHIP_TYPE_CC2620 = 2, //!< 2 means that this is a CC2620 chip. + CHIP_TYPE_CC2630 = 3, //!< 3 means that this is a CC2630 chip. + CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip. + CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip. + CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip. + CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip. + CHIP_TYPE_CC2640R2 = 8, //!< 8 means that this is a CC2640R2 chip. + CHIP_TYPE_CC2642 = 9, //!< 9 means that this is a CC2642 chip. + CHIP_TYPE_unused = 10,//!< 10 unused value + CHIP_TYPE_CC2652 = 11,//!< 11 means that this is a CC2652 chip. + CHIP_TYPE_CC1312 = 12,//!< 12 means that this is a CC1312 chip. + CHIP_TYPE_CC1352 = 13,//!< 13 means that this is a CC1352 chip. + CHIP_TYPE_CC1352P = 14 //!< 14 means that this is a CC1352P chip. } ChipType_t; //***************************************************************************** @@ -361,13 +365,14 @@ extern ChipType_t ChipInfo_GetChipType( void ); //! \brief Chip family enumeration // //***************************************************************************** -typedef enum { - FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown. - FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member. - FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member. - FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member. - FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents). - FAMILY_CC13x2_CC26x2 = 4 //!< 4 means that the chip is a CC13x2, CC26x2 family member. +typedef enum +{ + FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown. + FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member. + FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member. + FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member. + FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents). + FAMILY_CC13x2_CC26x2 = 4 //!< 4 means that the chip is a CC13x2, CC26x2 family member. } ChipFamily_t; //***************************************************************************** @@ -411,7 +416,7 @@ extern ChipFamily_t ChipInfo_GetChipFamily( void ); __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC13x0( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 ); } //***************************************************************************** @@ -425,7 +430,7 @@ ChipInfo_ChipFamilyIs_CC13x0( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x0( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 ); } //***************************************************************************** @@ -439,7 +444,7 @@ ChipInfo_ChipFamilyIs_CC26x0( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x0R2( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 ); } //***************************************************************************** @@ -453,7 +458,7 @@ ChipInfo_ChipFamilyIs_CC26x0R2( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x1( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 ); } //***************************************************************************** @@ -467,7 +472,7 @@ ChipInfo_ChipFamilyIs_CC26x1( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 ); } //***************************************************************************** @@ -475,15 +480,16 @@ ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void ) //! \brief HW revision enumeration. // //***************************************************************************** -typedef enum { - HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown. - HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0 - HWREV_1_1 = 11, //!< 11 means that the chip's HW revision is 1.1 - HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0 - HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1 - HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2 - HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3 - HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4 +typedef enum +{ + HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown. + HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0 + HWREV_1_1 = 11, //!< 11 means that the chip's HW revision is 1.1 + HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0 + HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1 + HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2 + HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3 + HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4 } HwRevision_t; //***************************************************************************** @@ -507,7 +513,7 @@ extern HwRevision_t ChipInfo_GetHwRevision( void ); __STATIC_INLINE bool ChipInfo_HwRevisionIs_1_0( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_1_0 ); + return ( ChipInfo_GetHwRevision() == HWREV_1_0 ); } //***************************************************************************** @@ -521,7 +527,7 @@ ChipInfo_HwRevisionIs_1_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_0( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_0 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_0 ); } //***************************************************************************** @@ -535,7 +541,7 @@ ChipInfo_HwRevisionIs_2_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_0( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_0 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_0 ); } //***************************************************************************** @@ -549,7 +555,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_1( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_1 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_1 ); } //***************************************************************************** @@ -563,7 +569,7 @@ ChipInfo_HwRevisionIs_2_1( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_1( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_1 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_1 ); } //***************************************************************************** @@ -577,7 +583,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_1( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_2( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_2 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_2 ); } //***************************************************************************** @@ -591,7 +597,7 @@ ChipInfo_HwRevisionIs_2_2( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_2( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_2 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_2 ); } //***************************************************************************** @@ -605,7 +611,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_2( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_3( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_3 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_3 ); } //***************************************************************************** @@ -619,7 +625,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_3( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_4( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_4 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_4 ); } //***************************************************************************** @@ -638,31 +644,31 @@ extern void ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated( void ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_ChipInfo_GetSupportedProtocol_BV - #undef ChipInfo_GetSupportedProtocol_BV - #define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV - #endif - #ifdef ROM_ChipInfo_GetPackageType - #undef ChipInfo_GetPackageType - #define ChipInfo_GetPackageType ROM_ChipInfo_GetPackageType - #endif - #ifdef ROM_ChipInfo_GetChipType - #undef ChipInfo_GetChipType - #define ChipInfo_GetChipType ROM_ChipInfo_GetChipType - #endif - #ifdef ROM_ChipInfo_GetChipFamily - #undef ChipInfo_GetChipFamily - #define ChipInfo_GetChipFamily ROM_ChipInfo_GetChipFamily - #endif - #ifdef ROM_ChipInfo_GetHwRevision - #undef ChipInfo_GetHwRevision - #define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision - #endif - #ifdef ROM_ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated - #undef ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated - #define ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated - #endif +#include "../driverlib/rom.h" +#ifdef ROM_ChipInfo_GetSupportedProtocol_BV +#undef ChipInfo_GetSupportedProtocol_BV +#define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV +#endif +#ifdef ROM_ChipInfo_GetPackageType +#undef ChipInfo_GetPackageType +#define ChipInfo_GetPackageType ROM_ChipInfo_GetPackageType +#endif +#ifdef ROM_ChipInfo_GetChipType +#undef ChipInfo_GetChipType +#define ChipInfo_GetChipType ROM_ChipInfo_GetChipType +#endif +#ifdef ROM_ChipInfo_GetChipFamily +#undef ChipInfo_GetChipFamily +#define ChipInfo_GetChipFamily ROM_ChipInfo_GetChipFamily +#endif +#ifdef ROM_ChipInfo_GetHwRevision +#undef ChipInfo_GetHwRevision +#define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision +#endif +#ifdef ROM_ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated +#undef ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated +#define ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC13x0_HwRev20AndLater_HaltIfViolated +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/cpu.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/cpu.h index e2b0561a..947687f1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/cpu.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/cpu.h @@ -80,11 +80,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define CPUcpsid NOROM_CPUcpsid - #define CPUprimask NOROM_CPUprimask - #define CPUcpsie NOROM_CPUcpsie - #define CPUbasepriGet NOROM_CPUbasepriGet - #define CPUdelay NOROM_CPUdelay +#define CPUcpsid NOROM_CPUcpsid +#define CPUprimask NOROM_CPUprimask +#define CPUcpsie NOROM_CPUcpsie +#define CPUbasepriGet NOROM_CPUbasepriGet +#define CPUdelay NOROM_CPUdelay #endif //***************************************************************************** @@ -423,27 +423,27 @@ CPU_WriteBufferEnable( void ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_CPUcpsid - #undef CPUcpsid - #define CPUcpsid ROM_CPUcpsid - #endif - #ifdef ROM_CPUprimask - #undef CPUprimask - #define CPUprimask ROM_CPUprimask - #endif - #ifdef ROM_CPUcpsie - #undef CPUcpsie - #define CPUcpsie ROM_CPUcpsie - #endif - #ifdef ROM_CPUbasepriGet - #undef CPUbasepriGet - #define CPUbasepriGet ROM_CPUbasepriGet - #endif - #ifdef ROM_CPUdelay - #undef CPUdelay - #define CPUdelay ROM_CPUdelay - #endif +#include "../driverlib/rom.h" +#ifdef ROM_CPUcpsid +#undef CPUcpsid +#define CPUcpsid ROM_CPUcpsid +#endif +#ifdef ROM_CPUprimask +#undef CPUprimask +#define CPUprimask ROM_CPUprimask +#endif +#ifdef ROM_CPUcpsie +#undef CPUcpsie +#define CPUcpsie ROM_CPUcpsie +#endif +#ifdef ROM_CPUbasepriGet +#undef CPUbasepriGet +#define CPUbasepriGet ROM_CPUbasepriGet +#endif +#ifdef ROM_CPUdelay +#undef CPUdelay +#define CPUdelay ROM_CPUdelay +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/crypto.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/crypto.h index bb411ec8..11760a6f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/crypto.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/crypto.h @@ -83,19 +83,19 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define CRYPTOAesLoadKey NOROM_CRYPTOAesLoadKey - #define CRYPTOAesCbc NOROM_CRYPTOAesCbc - #define CRYPTOAesCbcStatus NOROM_CRYPTOAesCbcStatus - #define CRYPTOAesEcb NOROM_CRYPTOAesEcb - #define CRYPTOAesEcbStatus NOROM_CRYPTOAesEcbStatus - #define CRYPTOCcmAuthEncrypt NOROM_CRYPTOCcmAuthEncrypt - #define CRYPTOCcmAuthEncryptStatus NOROM_CRYPTOCcmAuthEncryptStatus - #define CRYPTOCcmAuthEncryptResultGet NOROM_CRYPTOCcmAuthEncryptResultGet - #define CRYPTOCcmInvAuthDecrypt NOROM_CRYPTOCcmInvAuthDecrypt - #define CRYPTOCcmInvAuthDecryptStatus NOROM_CRYPTOCcmInvAuthDecryptStatus - #define CRYPTOCcmInvAuthDecryptResultGet NOROM_CRYPTOCcmInvAuthDecryptResultGet - #define CRYPTODmaEnable NOROM_CRYPTODmaEnable - #define CRYPTODmaDisable NOROM_CRYPTODmaDisable +#define CRYPTOAesLoadKey NOROM_CRYPTOAesLoadKey +#define CRYPTOAesCbc NOROM_CRYPTOAesCbc +#define CRYPTOAesCbcStatus NOROM_CRYPTOAesCbcStatus +#define CRYPTOAesEcb NOROM_CRYPTOAesEcb +#define CRYPTOAesEcbStatus NOROM_CRYPTOAesEcbStatus +#define CRYPTOCcmAuthEncrypt NOROM_CRYPTOCcmAuthEncrypt +#define CRYPTOCcmAuthEncryptStatus NOROM_CRYPTOCcmAuthEncryptStatus +#define CRYPTOCcmAuthEncryptResultGet NOROM_CRYPTOCcmAuthEncryptResultGet +#define CRYPTOCcmInvAuthDecrypt NOROM_CRYPTOCcmInvAuthDecrypt +#define CRYPTOCcmInvAuthDecryptStatus NOROM_CRYPTOCcmInvAuthDecryptStatus +#define CRYPTOCcmInvAuthDecryptResultGet NOROM_CRYPTOCcmInvAuthDecryptResultGet +#define CRYPTODmaEnable NOROM_CRYPTODmaEnable +#define CRYPTODmaDisable NOROM_CRYPTODmaDisable #endif //***************************************************************************** @@ -227,7 +227,7 @@ extern "C" //! - \ref AES_KEYSTORE_READ_ERROR // //***************************************************************************** -extern uint32_t CRYPTOAesLoadKey(uint32_t *pui32AesKey, +extern uint32_t CRYPTOAesLoadKey(uint32_t* pui32AesKey, uint32_t ui32KeyLocation); //***************************************************************************** @@ -263,8 +263,8 @@ extern uint32_t CRYPTOAesLoadKey(uint32_t *pui32AesKey, //! \sa \ref CRYPTOAesCbcStatus() // //***************************************************************************** -extern uint32_t CRYPTOAesCbc(uint32_t *pui32MsgIn, uint32_t *pui32MsgOut, - uint32_t ui32MsgLength, uint32_t *pui32Nonce, +extern uint32_t CRYPTOAesCbc(uint32_t* pui32MsgIn, uint32_t* pui32MsgOut, + uint32_t ui32MsgLength, uint32_t* pui32Nonce, uint32_t ui32KeyLocation, bool bEncrypt, bool bIntEnable); @@ -315,7 +315,7 @@ extern uint32_t CRYPTOAesCbcStatus(void); //! \sa \ref CRYPTOAesEcbStatus() // //***************************************************************************** -extern uint32_t CRYPTOAesEcb(uint32_t *pui32MsgIn, uint32_t *pui32MsgOut, +extern uint32_t CRYPTOAesEcb(uint32_t* pui32MsgIn, uint32_t* pui32MsgOut, uint32_t ui32KeyLocation, bool bEncrypt, bool bIntEnable); @@ -416,10 +416,10 @@ CRYPTOAesCbcFinish(void) // //***************************************************************************** extern uint32_t CRYPTOCcmAuthEncrypt(bool bEncrypt, uint32_t ui32AuthLength, - uint32_t *pui32Nonce, - uint32_t *pui32PlainText, + uint32_t* pui32Nonce, + uint32_t* pui32PlainText, uint32_t ui32PlainTextLength, - uint32_t *pui32Header, + uint32_t* pui32Header, uint32_t ui32HeaderLength, uint32_t ui32KeyLocation, uint32_t ui32FieldLength, @@ -457,7 +457,7 @@ extern uint32_t CRYPTOCcmAuthEncryptStatus(void); // //***************************************************************************** extern uint32_t CRYPTOCcmAuthEncryptResultGet(uint32_t ui32TagLength, - uint32_t *pui32CcmTag); + uint32_t* pui32CcmTag); //***************************************************************************** // @@ -495,10 +495,10 @@ extern uint32_t CRYPTOCcmAuthEncryptResultGet(uint32_t ui32TagLength, // //***************************************************************************** extern uint32_t CRYPTOCcmInvAuthDecrypt(bool bDecrypt, uint32_t ui32AuthLength, - uint32_t *pui32Nonce, - uint32_t *pui32CipherText, + uint32_t* pui32Nonce, + uint32_t* pui32CipherText, uint32_t ui32CipherTextLength, - uint32_t *pui32Header, + uint32_t* pui32Header, uint32_t ui32HeaderLength, uint32_t ui32KeyLocation, uint32_t ui32FieldLength, @@ -530,9 +530,9 @@ extern uint32_t CRYPTOCcmInvAuthDecryptStatus(void); // //***************************************************************************** extern uint32_t CRYPTOCcmInvAuthDecryptResultGet(uint32_t ui32AuthLength, - uint32_t *pui32CipherText, - uint32_t ui32CipherTextLength, - uint32_t *pui32CcmTag); + uint32_t* pui32CipherText, + uint32_t ui32CipherTextLength, + uint32_t* pui32CcmTag); //***************************************************************************** // @@ -666,14 +666,14 @@ CRYPTOIntStatus(bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(ui32Mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (ui32Mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } else { - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT) & 0x00000003); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT) & 0x00000003); } } @@ -781,59 +781,59 @@ CRYPTOIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_CRYPTOAesLoadKey - #undef CRYPTOAesLoadKey - #define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey - #endif - #ifdef ROM_CRYPTOAesCbc - #undef CRYPTOAesCbc - #define CRYPTOAesCbc ROM_CRYPTOAesCbc - #endif - #ifdef ROM_CRYPTOAesCbcStatus - #undef CRYPTOAesCbcStatus - #define CRYPTOAesCbcStatus ROM_CRYPTOAesCbcStatus - #endif - #ifdef ROM_CRYPTOAesEcb - #undef CRYPTOAesEcb - #define CRYPTOAesEcb ROM_CRYPTOAesEcb - #endif - #ifdef ROM_CRYPTOAesEcbStatus - #undef CRYPTOAesEcbStatus - #define CRYPTOAesEcbStatus ROM_CRYPTOAesEcbStatus - #endif - #ifdef ROM_CRYPTOCcmAuthEncrypt - #undef CRYPTOCcmAuthEncrypt - #define CRYPTOCcmAuthEncrypt ROM_CRYPTOCcmAuthEncrypt - #endif - #ifdef ROM_CRYPTOCcmAuthEncryptStatus - #undef CRYPTOCcmAuthEncryptStatus - #define CRYPTOCcmAuthEncryptStatus ROM_CRYPTOCcmAuthEncryptStatus - #endif - #ifdef ROM_CRYPTOCcmAuthEncryptResultGet - #undef CRYPTOCcmAuthEncryptResultGet - #define CRYPTOCcmAuthEncryptResultGet ROM_CRYPTOCcmAuthEncryptResultGet - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecrypt - #undef CRYPTOCcmInvAuthDecrypt - #define CRYPTOCcmInvAuthDecrypt ROM_CRYPTOCcmInvAuthDecrypt - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecryptStatus - #undef CRYPTOCcmInvAuthDecryptStatus - #define CRYPTOCcmInvAuthDecryptStatus ROM_CRYPTOCcmInvAuthDecryptStatus - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecryptResultGet - #undef CRYPTOCcmInvAuthDecryptResultGet - #define CRYPTOCcmInvAuthDecryptResultGet ROM_CRYPTOCcmInvAuthDecryptResultGet - #endif - #ifdef ROM_CRYPTODmaEnable - #undef CRYPTODmaEnable - #define CRYPTODmaEnable ROM_CRYPTODmaEnable - #endif - #ifdef ROM_CRYPTODmaDisable - #undef CRYPTODmaDisable - #define CRYPTODmaDisable ROM_CRYPTODmaDisable - #endif +#include "../driverlib/rom.h" +#ifdef ROM_CRYPTOAesLoadKey +#undef CRYPTOAesLoadKey +#define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey +#endif +#ifdef ROM_CRYPTOAesCbc +#undef CRYPTOAesCbc +#define CRYPTOAesCbc ROM_CRYPTOAesCbc +#endif +#ifdef ROM_CRYPTOAesCbcStatus +#undef CRYPTOAesCbcStatus +#define CRYPTOAesCbcStatus ROM_CRYPTOAesCbcStatus +#endif +#ifdef ROM_CRYPTOAesEcb +#undef CRYPTOAesEcb +#define CRYPTOAesEcb ROM_CRYPTOAesEcb +#endif +#ifdef ROM_CRYPTOAesEcbStatus +#undef CRYPTOAesEcbStatus +#define CRYPTOAesEcbStatus ROM_CRYPTOAesEcbStatus +#endif +#ifdef ROM_CRYPTOCcmAuthEncrypt +#undef CRYPTOCcmAuthEncrypt +#define CRYPTOCcmAuthEncrypt ROM_CRYPTOCcmAuthEncrypt +#endif +#ifdef ROM_CRYPTOCcmAuthEncryptStatus +#undef CRYPTOCcmAuthEncryptStatus +#define CRYPTOCcmAuthEncryptStatus ROM_CRYPTOCcmAuthEncryptStatus +#endif +#ifdef ROM_CRYPTOCcmAuthEncryptResultGet +#undef CRYPTOCcmAuthEncryptResultGet +#define CRYPTOCcmAuthEncryptResultGet ROM_CRYPTOCcmAuthEncryptResultGet +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecrypt +#undef CRYPTOCcmInvAuthDecrypt +#define CRYPTOCcmInvAuthDecrypt ROM_CRYPTOCcmInvAuthDecrypt +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecryptStatus +#undef CRYPTOCcmInvAuthDecryptStatus +#define CRYPTOCcmInvAuthDecryptStatus ROM_CRYPTOCcmInvAuthDecryptStatus +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecryptResultGet +#undef CRYPTOCcmInvAuthDecryptResultGet +#define CRYPTOCcmInvAuthDecryptResultGet ROM_CRYPTOCcmInvAuthDecryptResultGet +#endif +#ifdef ROM_CRYPTODmaEnable +#undef CRYPTODmaEnable +#define CRYPTODmaEnable ROM_CRYPTODmaEnable +#endif +#ifdef ROM_CRYPTODmaDisable +#undef CRYPTODmaDisable +#define CRYPTODmaDisable ROM_CRYPTODmaDisable +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ddi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ddi.h index e3b63a06..e0a3036b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ddi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ddi.h @@ -82,11 +82,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define DDI32RegWrite NOROM_DDI32RegWrite - #define DDI16BitWrite NOROM_DDI16BitWrite - #define DDI16BitfieldWrite NOROM_DDI16BitfieldWrite - #define DDI16BitRead NOROM_DDI16BitRead - #define DDI16BitfieldRead NOROM_DDI16BitfieldRead +#define DDI32RegWrite NOROM_DDI32RegWrite +#define DDI16BitWrite NOROM_DDI16BitWrite +#define DDI16BitfieldWrite NOROM_DDI16BitfieldWrite +#define DDI16BitRead NOROM_DDI16BitRead +#define DDI16BitfieldRead NOROM_DDI16BitfieldRead #endif //***************************************************************************** @@ -138,16 +138,31 @@ AuxAdiDdiSafeWrite(uint32_t nAddr, uint32_t nData, uint32_t nSize) { // Disable interrupts and remember whether to re-enable bool bIrqEnabled = !CPUcpsid(); + // Acquire semaphore for accessing ADI/DDI in AUX, perform access, release semaphore while (!HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0)); - switch (nSize) { - case 1: HWREGB(nAddr) = (uint8_t)nData; break; - case 2: HWREGH(nAddr) = (uint16_t)nData; break; - case 4: default: HWREG(nAddr) = nData; break; + + switch (nSize) + { + case 1: + HWREGB(nAddr) = (uint8_t)nData; + break; + + case 2: + HWREGH(nAddr) = (uint16_t)nData; + break; + + case 4: + default: + HWREG(nAddr) = nData; + break; } + HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0) = 1; + // Restore interrupt enable - if (bIrqEnabled) { + if (bIrqEnabled) + { CPUcpsie(); } } @@ -171,18 +186,34 @@ AuxAdiDdiSafeRead(uint32_t nAddr, uint32_t nSize) uint32_t nRet; // Disable interrupts and remember whether to re-enable bool bIrqEnabled = !CPUcpsid(); + // Acquire semaphore for accessing ADI/DDI in AUX, perform access, release semaphore while (!HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0)); - switch (nSize) { - case 1: nRet = HWREGB(nAddr); break; - case 2: nRet = HWREGH(nAddr); break; - case 4: default: nRet = HWREG(nAddr); break; + + switch (nSize) + { + case 1: + nRet = HWREGB(nAddr); + break; + + case 2: + nRet = HWREGH(nAddr); + break; + + case 4: + default: + nRet = HWREG(nAddr); + break; } + HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0) = 1; + // Restore interrupt enable - if (bIrqEnabled) { + if (bIrqEnabled) + { CPUcpsie(); } + return nRet; } @@ -206,7 +237,7 @@ AuxAdiDdiSafeRead(uint32_t nAddr, uint32_t nSize) static bool DDIBaseValid(uint32_t ui32Base) { - return(ui32Base == AUX_DDI0_OSC_BASE); + return (ui32Base == AUX_DDI0_OSC_BASE); } #endif @@ -516,27 +547,27 @@ extern uint16_t DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg, // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_DDI32RegWrite - #undef DDI32RegWrite - #define DDI32RegWrite ROM_DDI32RegWrite - #endif - #ifdef ROM_DDI16BitWrite - #undef DDI16BitWrite - #define DDI16BitWrite ROM_DDI16BitWrite - #endif - #ifdef ROM_DDI16BitfieldWrite - #undef DDI16BitfieldWrite - #define DDI16BitfieldWrite ROM_DDI16BitfieldWrite - #endif - #ifdef ROM_DDI16BitRead - #undef DDI16BitRead - #define DDI16BitRead ROM_DDI16BitRead - #endif - #ifdef ROM_DDI16BitfieldRead - #undef DDI16BitfieldRead - #define DDI16BitfieldRead ROM_DDI16BitfieldRead - #endif +#include "../driverlib/rom.h" +#ifdef ROM_DDI32RegWrite +#undef DDI32RegWrite +#define DDI32RegWrite ROM_DDI32RegWrite +#endif +#ifdef ROM_DDI16BitWrite +#undef DDI16BitWrite +#define DDI16BitWrite ROM_DDI16BitWrite +#endif +#ifdef ROM_DDI16BitfieldWrite +#undef DDI16BitfieldWrite +#define DDI16BitfieldWrite ROM_DDI16BitfieldWrite +#endif +#ifdef ROM_DDI16BitRead +#undef DDI16BitRead +#define DDI16BitRead ROM_DDI16BitRead +#endif +#ifdef ROM_DDI16BitfieldRead +#undef DDI16BitfieldRead +#define DDI16BitfieldRead ROM_DDI16BitfieldRead +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/debug.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/debug.h index 704fd5c7..cbd45279 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/debug.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/debug.h @@ -53,7 +53,7 @@ //! Function stub for allowing compile with DRIVERLIB_DEBUG flag asserted. // //***************************************************************************** -extern void __error__(char *pcFilename, uint32_t ui32Line); +extern void __error__(char* pcFilename, uint32_t ui32Line); //***************************************************************************** // @@ -63,11 +63,11 @@ extern void __error__(char *pcFilename, uint32_t ui32Line); //***************************************************************************** #ifdef DRIVERLIB_DEBUG #define ASSERT(expr) { \ - if(!(expr)) \ - { \ - __error__(__FILE__, __LINE__); \ - } \ - } + if(!(expr)) \ + { \ + __error__(__FILE__, __LINE__); \ + } \ + } #else #define ASSERT(expr) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/event.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/event.h index 2f849027..f8f0c215 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/event.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/event.h @@ -244,7 +244,7 @@ EventSwEventGet(uint32_t ui32SwEvent) ASSERT( ui32SwEvent <= 3 ); // Each software event is byte accessible - return( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent)); + return ( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent)); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/flash.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/flash.h index 75b7da4d..d9c3aadb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/flash.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/flash.h @@ -84,15 +84,15 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define FlashPowerModeSet NOROM_FlashPowerModeSet - #define FlashPowerModeGet NOROM_FlashPowerModeGet - #define FlashProtectionSet NOROM_FlashProtectionSet - #define FlashProtectionGet NOROM_FlashProtectionGet - #define FlashProtectionSave NOROM_FlashProtectionSave - #define FlashSectorErase NOROM_FlashSectorErase - #define FlashProgram NOROM_FlashProgram - #define FlashEfuseReadRow NOROM_FlashEfuseReadRow - #define FlashDisableSectorsForWrite NOROM_FlashDisableSectorsForWrite +#define FlashPowerModeSet NOROM_FlashPowerModeSet +#define FlashPowerModeGet NOROM_FlashPowerModeGet +#define FlashProtectionSet NOROM_FlashProtectionSet +#define FlashProtectionGet NOROM_FlashProtectionGet +#define FlashProtectionSave NOROM_FlashProtectionSave +#define FlashSectorErase NOROM_FlashSectorErase +#define FlashProgram NOROM_FlashProgram +#define FlashEfuseReadRow NOROM_FlashEfuseReadRow +#define FlashDisableSectorsForWrite NOROM_FlashDisableSectorsForWrite #endif //***************************************************************************** @@ -104,7 +104,7 @@ extern "C" #define FAPI_STATUS_FSM_BUSY 0x00000001 // FSM is Busy #define FAPI_STATUS_FSM_READY 0x00000002 // FSM is Ready #define FAPI_STATUS_INCORRECT_DATABUFFER_LENGTH \ - 0x00000003 // Incorrect parameter value + 0x00000003 // Incorrect parameter value #define FAPI_STATUS_FSM_ERROR 0x00000004 // Operation failed //***************************************************************************** @@ -124,7 +124,7 @@ extern "C" #define FLASH_PWR_ACTIVE_MODE 0x00000000 #define FLASH_PWR_OFF_MODE 0x00000001 #define FLASH_PWR_DEEP_STDBY_MODE \ - 0x00000002 + 0x00000002 //***************************************************************************** // @@ -133,7 +133,7 @@ extern "C" //***************************************************************************** #define FLASH_NO_PROTECT 0x00000000 // Sector not protected #define FLASH_WRITE_PROTECT 0x00000001 // Sector erase and program - // protected +// protected //***************************************************************************** // @@ -255,7 +255,7 @@ FlashSectorSizeGet(void) FLASH_FCFG_B0_SSIZE0_B0_SECT_SIZE_S; // Return flash sector size in number of bytes. - return(ui32SectorSizeInKbyte * 1024); + return (ui32SectorSizeInKbyte * 1024); } //***************************************************************************** @@ -278,7 +278,7 @@ FlashSizeGet(void) FLASH_FLASH_SIZE_SECTORS_S; // Return flash size in number of bytes - return(ui32NoOfSectors * FlashSectorSizeGet()); + return (ui32NoOfSectors * FlashSectorSizeGet()); } //***************************************************************************** @@ -419,13 +419,13 @@ extern uint32_t FlashProtectionSave(uint32_t ui32SectorAddress); __STATIC_INLINE uint32_t FlashCheckFsmForError(void) { - if(HWREG(FLASH_BASE + FLASH_O_FMSTAT) & FLASH_FMSTAT_CSTAT) + if (HWREG(FLASH_BASE + FLASH_O_FMSTAT) & FLASH_FMSTAT_CSTAT) { - return(FAPI_STATUS_FSM_ERROR); + return (FAPI_STATUS_FSM_ERROR); } else { - return(FAPI_STATUS_SUCCESS); + return (FAPI_STATUS_SUCCESS); } } @@ -449,13 +449,13 @@ FlashCheckFsmForError(void) __STATIC_INLINE uint32_t FlashCheckFsmForReady(void) { - if(HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_BUSY) + if (HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_BUSY) { - return(FAPI_STATUS_FSM_BUSY); + return (FAPI_STATUS_FSM_BUSY); } else { - return(FAPI_STATUS_FSM_READY); + return (FAPI_STATUS_FSM_READY); } } @@ -577,18 +577,18 @@ FlashIntStatus(void) ui32IntFlags = 0; // Check if FSM_DONE interrupt status is set. - if(HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_FSM_DONE) + if (HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_FSM_DONE) { ui32IntFlags = FLASH_INT_FSM_DONE; } // Check if RVF_INT interrupt status is set. - if(HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_RVF_INT) + if (HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_RVF_INT) { ui32IntFlags |= FLASH_INT_RV; } - return(ui32IntFlags); + return (ui32IntFlags); } //***************************************************************************** @@ -629,12 +629,12 @@ FlashIntClear(uint32_t ui32IntFlags) ui32TempVal = 0; - if(ui32IntFlags & FLASH_INT_FSM_DONE) + if (ui32IntFlags & FLASH_INT_FSM_DONE) { ui32TempVal = FLASH_FEDACSTAT_FSM_DONE; } - if(ui32IntFlags & FLASH_INT_RV) + if (ui32IntFlags & FLASH_INT_RV) { ui32TempVal |= FLASH_FEDACSTAT_RVF_INT; } @@ -711,7 +711,7 @@ extern uint32_t FlashSectorErase(uint32_t ui32SectorAddress); //! - \ref FAPI_STATUS_FSM_ERROR : A programming error is encountered. // //***************************************************************************** -extern uint32_t FlashProgram(uint8_t *pui8DataBuffer, +extern uint32_t FlashProgram(uint8_t* pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count); //***************************************************************************** @@ -730,7 +730,7 @@ extern uint32_t FlashProgram(uint8_t *pui8DataBuffer, //! - \c true : Error status // //***************************************************************************** -extern bool FlashEfuseReadRow(uint32_t *pui32EfuseData, +extern bool FlashEfuseReadRow(uint32_t* pui32EfuseData, uint32_t ui32RowAddress); //***************************************************************************** @@ -758,43 +758,43 @@ extern void FlashDisableSectorsForWrite(void); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_FlashPowerModeSet - #undef FlashPowerModeSet - #define FlashPowerModeSet ROM_FlashPowerModeSet - #endif - #ifdef ROM_FlashPowerModeGet - #undef FlashPowerModeGet - #define FlashPowerModeGet ROM_FlashPowerModeGet - #endif - #ifdef ROM_FlashProtectionSet - #undef FlashProtectionSet - #define FlashProtectionSet ROM_FlashProtectionSet - #endif - #ifdef ROM_FlashProtectionGet - #undef FlashProtectionGet - #define FlashProtectionGet ROM_FlashProtectionGet - #endif - #ifdef ROM_FlashProtectionSave - #undef FlashProtectionSave - #define FlashProtectionSave ROM_FlashProtectionSave - #endif - #ifdef ROM_FlashSectorErase - #undef FlashSectorErase - #define FlashSectorErase ROM_FlashSectorErase - #endif - #ifdef ROM_FlashProgram - #undef FlashProgram - #define FlashProgram ROM_FlashProgram - #endif - #ifdef ROM_FlashEfuseReadRow - #undef FlashEfuseReadRow - #define FlashEfuseReadRow ROM_FlashEfuseReadRow - #endif - #ifdef ROM_FlashDisableSectorsForWrite - #undef FlashDisableSectorsForWrite - #define FlashDisableSectorsForWrite ROM_FlashDisableSectorsForWrite - #endif +#include "../driverlib/rom.h" +#ifdef ROM_FlashPowerModeSet +#undef FlashPowerModeSet +#define FlashPowerModeSet ROM_FlashPowerModeSet +#endif +#ifdef ROM_FlashPowerModeGet +#undef FlashPowerModeGet +#define FlashPowerModeGet ROM_FlashPowerModeGet +#endif +#ifdef ROM_FlashProtectionSet +#undef FlashProtectionSet +#define FlashProtectionSet ROM_FlashProtectionSet +#endif +#ifdef ROM_FlashProtectionGet +#undef FlashProtectionGet +#define FlashProtectionGet ROM_FlashProtectionGet +#endif +#ifdef ROM_FlashProtectionSave +#undef FlashProtectionSave +#define FlashProtectionSave ROM_FlashProtectionSave +#endif +#ifdef ROM_FlashSectorErase +#undef FlashSectorErase +#define FlashSectorErase ROM_FlashSectorErase +#endif +#ifdef ROM_FlashProgram +#undef FlashProgram +#define FlashProgram ROM_FlashProgram +#endif +#ifdef ROM_FlashEfuseReadRow +#undef FlashEfuseReadRow +#define FlashEfuseReadRow ROM_FlashEfuseReadRow +#endif +#ifdef ROM_FlashDisableSectorsForWrite +#undef FlashDisableSectorsForWrite +#define FlashDisableSectorsForWrite ROM_FlashDisableSectorsForWrite +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/gpio.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/gpio.h index 9a4bf16a..ffc16ef0 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/gpio.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/gpio.h @@ -79,8 +79,8 @@ dioNumberLegal( uint32_t dioNumber ) { uint32_t ioCount = (( HWREG( FCFG1_BASE + FCFG1_O_IOCONF ) & - FCFG1_IOCONF_GPIO_CNT_M ) >> - FCFG1_IOCONF_GPIO_CNT_S ) ; + FCFG1_IOCONF_GPIO_CNT_M ) >> + FCFG1_IOCONF_GPIO_CNT_S ) ; // CC13x2 + CC26x2 if ( ChipInfo_ChipFamilyIs_CC13x2_CC26x2() ) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2c.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2c.h index d1e29698..c4ece780 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2c.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2c.h @@ -84,10 +84,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define I2CMasterInitExpClk NOROM_I2CMasterInitExpClk - #define I2CMasterErr NOROM_I2CMasterErr - #define I2CIntRegister NOROM_I2CIntRegister - #define I2CIntUnregister NOROM_I2CIntUnregister +#define I2CMasterInitExpClk NOROM_I2CMasterInitExpClk +#define I2CMasterErr NOROM_I2CMasterErr +#define I2CIntRegister NOROM_I2CIntRegister +#define I2CIntUnregister NOROM_I2CIntUnregister #endif //***************************************************************************** @@ -96,25 +96,25 @@ extern "C" // //***************************************************************************** #define I2C_MASTER_CMD_SINGLE_SEND \ - 0x00000007 + 0x00000007 #define I2C_MASTER_CMD_SINGLE_RECEIVE \ - 0x00000007 + 0x00000007 #define I2C_MASTER_CMD_BURST_SEND_START \ - 0x00000003 + 0x00000003 #define I2C_MASTER_CMD_BURST_SEND_CONT \ - 0x00000001 + 0x00000001 #define I2C_MASTER_CMD_BURST_SEND_FINISH \ - 0x00000005 + 0x00000005 #define I2C_MASTER_CMD_BURST_SEND_ERROR_STOP \ - 0x00000004 + 0x00000004 #define I2C_MASTER_CMD_BURST_RECEIVE_START \ - 0x0000000b + 0x0000000b #define I2C_MASTER_CMD_BURST_RECEIVE_CONT \ - 0x00000009 + 0x00000009 #define I2C_MASTER_CMD_BURST_RECEIVE_FINISH \ - 0x00000005 + 0x00000005 #define I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP \ - 0x00000004 + 0x00000004 //***************************************************************************** // @@ -169,7 +169,7 @@ extern "C" static bool I2CBaseValid(uint32_t ui32Base) { - return(ui32Base == I2C0_BASE); + return (ui32Base == I2C0_BASE); } #endif @@ -226,7 +226,7 @@ I2CMasterControl(uint32_t ui32Base, uint32_t ui32Cmd) // Check the arguments. ASSERT(I2CBaseValid(ui32Base)); ASSERT((ui32Cmd == I2C_MASTER_CMD_SINGLE_SEND) || - // (ui32Cmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || -> Equal to SINGLE_SEND + // (ui32Cmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || -> Equal to SINGLE_SEND (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_START) || (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_CONT) || (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_FINISH) || @@ -344,13 +344,13 @@ I2CMasterBusy(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the busy status. - if(HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSY) + if (HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSY) { - return(true); + return (true); } else { - return(false); + return (false); } } @@ -376,13 +376,13 @@ I2CMasterBusBusy(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the bus busy status. - if(HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSBSY) + if (HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSBSY) { - return(true); + return (true); } else { - return(false); + return (false); } } @@ -405,7 +405,7 @@ I2CMasterDataGet(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Read a byte. - return(HWREG(I2C0_BASE + I2C_O_MDR)); + return (HWREG(I2C0_BASE + I2C_O_MDR)); } //***************************************************************************** @@ -554,13 +554,13 @@ I2CMasterIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return((HWREG(I2C0_BASE + I2C_O_MMIS)) ? true : false); + return ((HWREG(I2C0_BASE + I2C_O_MMIS)) ? true : false); } else { - return((HWREG(I2C0_BASE + I2C_O_MRIS)) ? true : false); + return ((HWREG(I2C0_BASE + I2C_O_MRIS)) ? true : false); } } @@ -689,7 +689,7 @@ I2CSlaveStatus(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the slave status. - return(HWREG(I2C0_BASE + I2C_O_SSTAT)); + return (HWREG(I2C0_BASE + I2C_O_SSTAT)); } //***************************************************************************** @@ -711,7 +711,7 @@ I2CSlaveDataGet(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Read a byte. - return(HWREG(I2C0_BASE + I2C_O_SDR)); + return (HWREG(I2C0_BASE + I2C_O_SDR)); } //***************************************************************************** @@ -874,13 +874,13 @@ I2CSlaveIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(I2C0_BASE + I2C_O_SMIS)); + return (HWREG(I2C0_BASE + I2C_O_SMIS)); } else { - return(HWREG(I2C0_BASE + I2C_O_SRIS)); + return (HWREG(I2C0_BASE + I2C_O_SRIS)); } } @@ -935,23 +935,23 @@ extern void I2CIntUnregister(uint32_t ui32Base); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_I2CMasterInitExpClk - #undef I2CMasterInitExpClk - #define I2CMasterInitExpClk ROM_I2CMasterInitExpClk - #endif - #ifdef ROM_I2CMasterErr - #undef I2CMasterErr - #define I2CMasterErr ROM_I2CMasterErr - #endif - #ifdef ROM_I2CIntRegister - #undef I2CIntRegister - #define I2CIntRegister ROM_I2CIntRegister - #endif - #ifdef ROM_I2CIntUnregister - #undef I2CIntUnregister - #define I2CIntUnregister ROM_I2CIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_I2CMasterInitExpClk +#undef I2CMasterInitExpClk +#define I2CMasterInitExpClk ROM_I2CMasterInitExpClk +#endif +#ifdef ROM_I2CMasterErr +#undef I2CMasterErr +#define I2CMasterErr ROM_I2CMasterErr +#endif +#ifdef ROM_I2CIntRegister +#undef I2CIntRegister +#define I2CIntRegister ROM_I2CIntRegister +#endif +#ifdef ROM_I2CIntUnregister +#undef I2CIntUnregister +#define I2CIntUnregister ROM_I2CIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2s.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2s.h index ab50cd61..116b252e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2s.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/i2s.h @@ -82,14 +82,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define I2SEnable NOROM_I2SEnable - #define I2SAudioFormatConfigure NOROM_I2SAudioFormatConfigure - #define I2SChannelConfigure NOROM_I2SChannelConfigure - #define I2SBufferConfig NOROM_I2SBufferConfig - #define I2SPointerUpdate NOROM_I2SPointerUpdate - #define I2SPointerSet NOROM_I2SPointerSet - #define I2SSampleStampConfigure NOROM_I2SSampleStampConfigure - #define I2SSampleStampGet NOROM_I2SSampleStampGet +#define I2SEnable NOROM_I2SEnable +#define I2SAudioFormatConfigure NOROM_I2SAudioFormatConfigure +#define I2SChannelConfigure NOROM_I2SChannelConfigure +#define I2SBufferConfig NOROM_I2SBufferConfig +#define I2SPointerUpdate NOROM_I2SPointerUpdate +#define I2SPointerSet NOROM_I2SPointerSet +#define I2SSampleStampConfigure NOROM_I2SSampleStampConfigure +#define I2SSampleStampGet NOROM_I2SSampleStampGet #endif //***************************************************************************** @@ -142,7 +142,7 @@ typedef struct // //***************************************************************************** #ifndef DEPRECATED -extern I2SControlTable *g_pControlTable; +extern I2SControlTable* g_pControlTable; #endif //***************************************************************************** @@ -233,7 +233,7 @@ extern I2SControlTable *g_pControlTable; #define I2S_STMP1 0x00000002 // Sample stamp counter channel 1 #endif #define I2S_STMP_SATURATION 0x0000FFFF // The saturation value used when - // calculating the sample stamp +// calculating the sample stamp //***************************************************************************** // @@ -272,7 +272,7 @@ extern I2SControlTable *g_pControlTable; static bool I2SBaseValid(uint32_t ui32Base) { - return(ui32Base == I2S0_BASE); + return (ui32Base == I2S0_BASE); } #endif @@ -459,8 +459,8 @@ I2SClockConfigure(uint32_t ui32Base, uint32_t ui32ClkConfig) // Setup register WCLK Source. HWREG(I2S0_BASE + I2S_O_AIFWCLKSRC) = ui32ClkConfig & - (I2S_AIFWCLKSRC_WCLK_INV_M | - I2S_AIFWCLKSRC_WCLK_SRC_M); + (I2S_AIFWCLKSRC_WCLK_INV_M | + I2S_AIFWCLKSRC_WCLK_SRC_M); } #endif @@ -550,7 +550,7 @@ extern void I2SPointerUpdate(uint32_t ui32Base, bool bInput); // //**************************************************************************** #ifndef DEPRECATED -extern void I2SPointerSet(uint32_t ui32Base, bool bInput, void * pNextPointer); +extern void I2SPointerSet(uint32_t ui32Base, bool bInput, void* pNextPointer); #endif //***************************************************************************** @@ -742,14 +742,14 @@ I2SIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(I2S0_BASE + I2S_O_IRQFLAGS); - return(ui32Mask & HWREG(I2S0_BASE + I2S_O_IRQMASK)); + return (ui32Mask & HWREG(I2S0_BASE + I2S_O_IRQMASK)); } else { - return(HWREG(I2S0_BASE + I2S_O_IRQFLAGS)); + return (HWREG(I2S0_BASE + I2S_O_IRQFLAGS)); } } @@ -969,11 +969,11 @@ I2SFormatConfigure(uint32_t ui32Base, // Setup register AIFFMTCFG Source. HWREGH(I2S0_BASE + I2S_O_AIFFMTCFG) = - (ui8iDataDelay << I2S_AIFFMTCFG_DATA_DELAY_S) | - (ui8iMemory24Bits << I2S_AIFFMTCFG_MEM_LEN_24_S) | - (ui8iSamplingEdge << I2S_AIFFMTCFG_SMPL_EDGE_S ) | - (boolDualPhase << I2S_AIFFMTCFG_DUAL_PHASE_S) | - (ui8BitsPerSample << I2S_AIFFMTCFG_WORD_LEN_S ); + (ui8iDataDelay << I2S_AIFFMTCFG_DATA_DELAY_S) | + (ui8iMemory24Bits << I2S_AIFFMTCFG_MEM_LEN_24_S) | + (ui8iSamplingEdge << I2S_AIFFMTCFG_SMPL_EDGE_S ) | + (boolDualPhase << I2S_AIFFMTCFG_DUAL_PHASE_S) | + (ui8BitsPerSample << I2S_AIFFMTCFG_WORD_LEN_S ); // Number of WCLK periods before the first read / write HWREGH(I2S0_BASE + I2S_O_STMPWPER) = ui16transmissionDelay; @@ -1071,8 +1071,8 @@ I2SWclkConfigure(uint32_t ui32Base, // Setup register WCLK Source. HWREGB(I2S0_BASE + I2S_O_AIFWCLKSRC) = - ((ui8ClkSource << I2S_AIFWCLKSRC_WCLK_SRC_S) | - (boolWCLKInvert << I2S_AIFWCLKSRC_WCLK_INV_S )); + ((ui8ClkSource << I2S_AIFWCLKSRC_WCLK_SRC_S) | + (boolWCLKInvert << I2S_AIFWCLKSRC_WCLK_INV_S )); } //**************************************************************************** @@ -1304,39 +1304,39 @@ I2SWclkCounterReset(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_I2SEnable - #undef I2SEnable - #define I2SEnable ROM_I2SEnable - #endif - #ifdef ROM_I2SAudioFormatConfigure - #undef I2SAudioFormatConfigure - #define I2SAudioFormatConfigure ROM_I2SAudioFormatConfigure - #endif - #ifdef ROM_I2SChannelConfigure - #undef I2SChannelConfigure - #define I2SChannelConfigure ROM_I2SChannelConfigure - #endif - #ifdef ROM_I2SBufferConfig - #undef I2SBufferConfig - #define I2SBufferConfig ROM_I2SBufferConfig - #endif - #ifdef ROM_I2SPointerUpdate - #undef I2SPointerUpdate - #define I2SPointerUpdate ROM_I2SPointerUpdate - #endif - #ifdef ROM_I2SPointerSet - #undef I2SPointerSet - #define I2SPointerSet ROM_I2SPointerSet - #endif - #ifdef ROM_I2SSampleStampConfigure - #undef I2SSampleStampConfigure - #define I2SSampleStampConfigure ROM_I2SSampleStampConfigure - #endif - #ifdef ROM_I2SSampleStampGet - #undef I2SSampleStampGet - #define I2SSampleStampGet ROM_I2SSampleStampGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_I2SEnable +#undef I2SEnable +#define I2SEnable ROM_I2SEnable +#endif +#ifdef ROM_I2SAudioFormatConfigure +#undef I2SAudioFormatConfigure +#define I2SAudioFormatConfigure ROM_I2SAudioFormatConfigure +#endif +#ifdef ROM_I2SChannelConfigure +#undef I2SChannelConfigure +#define I2SChannelConfigure ROM_I2SChannelConfigure +#endif +#ifdef ROM_I2SBufferConfig +#undef I2SBufferConfig +#define I2SBufferConfig ROM_I2SBufferConfig +#endif +#ifdef ROM_I2SPointerUpdate +#undef I2SPointerUpdate +#define I2SPointerUpdate ROM_I2SPointerUpdate +#endif +#ifdef ROM_I2SPointerSet +#undef I2SPointerSet +#define I2SPointerSet ROM_I2SPointerSet +#endif +#ifdef ROM_I2SSampleStampConfigure +#undef I2SSampleStampConfigure +#define I2SSampleStampConfigure ROM_I2SSampleStampConfigure +#endif +#ifdef ROM_I2SSampleStampGet +#undef I2SSampleStampGet +#define I2SSampleStampGet ROM_I2SSampleStampGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/interrupt.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/interrupt.h index 3cb39699..c297aebe 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/interrupt.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/interrupt.h @@ -81,17 +81,17 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define IntRegister NOROM_IntRegister - #define IntUnregister NOROM_IntUnregister - #define IntPriorityGroupingSet NOROM_IntPriorityGroupingSet - #define IntPriorityGroupingGet NOROM_IntPriorityGroupingGet - #define IntPrioritySet NOROM_IntPrioritySet - #define IntPriorityGet NOROM_IntPriorityGet - #define IntEnable NOROM_IntEnable - #define IntDisable NOROM_IntDisable - #define IntPendSet NOROM_IntPendSet - #define IntPendGet NOROM_IntPendGet - #define IntPendClear NOROM_IntPendClear +#define IntRegister NOROM_IntRegister +#define IntUnregister NOROM_IntUnregister +#define IntPriorityGroupingSet NOROM_IntPriorityGroupingSet +#define IntPriorityGroupingGet NOROM_IntPriorityGroupingGet +#define IntPrioritySet NOROM_IntPrioritySet +#define IntPriorityGet NOROM_IntPriorityGet +#define IntEnable NOROM_IntEnable +#define IntDisable NOROM_IntDisable +#define IntPendSet NOROM_IntPendSet +#define IntPendGet NOROM_IntPendGet +#define IntPendClear NOROM_IntPendClear #endif //***************************************************************************** @@ -549,7 +549,7 @@ __STATIC_INLINE bool IntMasterEnable(void) { // Enable CPU interrupts. - return(CPUcpsie()); + return (CPUcpsie()); } //***************************************************************************** @@ -569,7 +569,7 @@ __STATIC_INLINE bool IntMasterDisable(void) { // Disable CPU interrupts. - return(CPUcpsid()); + return (CPUcpsid()); } //***************************************************************************** @@ -625,7 +625,7 @@ IntPriorityMaskSet(uint32_t ui32PriorityMask) __STATIC_INLINE uint32_t IntPriorityMaskGet(void) { - return(CPUbasepriGet()); + return (CPUbasepriGet()); } //***************************************************************************** @@ -635,51 +635,51 @@ IntPriorityMaskGet(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_IntRegister - #undef IntRegister - #define IntRegister ROM_IntRegister - #endif - #ifdef ROM_IntUnregister - #undef IntUnregister - #define IntUnregister ROM_IntUnregister - #endif - #ifdef ROM_IntPriorityGroupingSet - #undef IntPriorityGroupingSet - #define IntPriorityGroupingSet ROM_IntPriorityGroupingSet - #endif - #ifdef ROM_IntPriorityGroupingGet - #undef IntPriorityGroupingGet - #define IntPriorityGroupingGet ROM_IntPriorityGroupingGet - #endif - #ifdef ROM_IntPrioritySet - #undef IntPrioritySet - #define IntPrioritySet ROM_IntPrioritySet - #endif - #ifdef ROM_IntPriorityGet - #undef IntPriorityGet - #define IntPriorityGet ROM_IntPriorityGet - #endif - #ifdef ROM_IntEnable - #undef IntEnable - #define IntEnable ROM_IntEnable - #endif - #ifdef ROM_IntDisable - #undef IntDisable - #define IntDisable ROM_IntDisable - #endif - #ifdef ROM_IntPendSet - #undef IntPendSet - #define IntPendSet ROM_IntPendSet - #endif - #ifdef ROM_IntPendGet - #undef IntPendGet - #define IntPendGet ROM_IntPendGet - #endif - #ifdef ROM_IntPendClear - #undef IntPendClear - #define IntPendClear ROM_IntPendClear - #endif +#include "../driverlib/rom.h" +#ifdef ROM_IntRegister +#undef IntRegister +#define IntRegister ROM_IntRegister +#endif +#ifdef ROM_IntUnregister +#undef IntUnregister +#define IntUnregister ROM_IntUnregister +#endif +#ifdef ROM_IntPriorityGroupingSet +#undef IntPriorityGroupingSet +#define IntPriorityGroupingSet ROM_IntPriorityGroupingSet +#endif +#ifdef ROM_IntPriorityGroupingGet +#undef IntPriorityGroupingGet +#define IntPriorityGroupingGet ROM_IntPriorityGroupingGet +#endif +#ifdef ROM_IntPrioritySet +#undef IntPrioritySet +#define IntPrioritySet ROM_IntPrioritySet +#endif +#ifdef ROM_IntPriorityGet +#undef IntPriorityGet +#define IntPriorityGet ROM_IntPriorityGet +#endif +#ifdef ROM_IntEnable +#undef IntEnable +#define IntEnable ROM_IntEnable +#endif +#ifdef ROM_IntDisable +#undef IntDisable +#define IntDisable ROM_IntDisable +#endif +#ifdef ROM_IntPendSet +#undef IntPendSet +#define IntPendSet ROM_IntPendSet +#endif +#ifdef ROM_IntPendGet +#undef IntPendGet +#define IntPendGet ROM_IntPendGet +#endif +#ifdef ROM_IntPendClear +#undef IntPendClear +#define IntPendClear ROM_IntPendClear +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ioc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ioc.h index 1b852a81..b6124102 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ioc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ioc.h @@ -83,26 +83,26 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define IOCPortConfigureSet NOROM_IOCPortConfigureSet - #define IOCPortConfigureGet NOROM_IOCPortConfigureGet - #define IOCIOShutdownSet NOROM_IOCIOShutdownSet - #define IOCIOModeSet NOROM_IOCIOModeSet - #define IOCIOIntSet NOROM_IOCIOIntSet - #define IOCIOPortPullSet NOROM_IOCIOPortPullSet - #define IOCIOHystSet NOROM_IOCIOHystSet - #define IOCIOInputSet NOROM_IOCIOInputSet - #define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet - #define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet - #define IOCIOPortIdSet NOROM_IOCIOPortIdSet - #define IOCIntEnable NOROM_IOCIntEnable - #define IOCIntDisable NOROM_IOCIntDisable - #define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput - #define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput - #define IOCPinTypeUart NOROM_IOCPinTypeUart - #define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster - #define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave - #define IOCPinTypeI2c NOROM_IOCPinTypeI2c - #define IOCPinTypeAux NOROM_IOCPinTypeAux +#define IOCPortConfigureSet NOROM_IOCPortConfigureSet +#define IOCPortConfigureGet NOROM_IOCPortConfigureGet +#define IOCIOShutdownSet NOROM_IOCIOShutdownSet +#define IOCIOModeSet NOROM_IOCIOModeSet +#define IOCIOIntSet NOROM_IOCIOIntSet +#define IOCIOPortPullSet NOROM_IOCIOPortPullSet +#define IOCIOHystSet NOROM_IOCIOHystSet +#define IOCIOInputSet NOROM_IOCIOInputSet +#define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet +#define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet +#define IOCIOPortIdSet NOROM_IOCIOPortIdSet +#define IOCIntEnable NOROM_IOCIntEnable +#define IOCIntDisable NOROM_IOCIntDisable +#define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput +#define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput +#define IOCPinTypeUart NOROM_IOCPinTypeUart +#define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster +#define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave +#define IOCPinTypeI2c NOROM_IOCPinTypeI2c +#define IOCPinTypeAux NOROM_IOCPinTypeAux #endif //***************************************************************************** @@ -237,15 +237,15 @@ extern "C" #define IOC_IOMODE_NORMAL 0x00000000 // Normal Input/Output #define IOC_IOMODE_INV 0x01000000 // Inverted Input/Output #define IOC_IOMODE_OPEN_DRAIN_NORMAL \ - 0x04000000 // Open Drain, Normal Input/Output + 0x04000000 // Open Drain, Normal Input/Output #define IOC_IOMODE_OPEN_DRAIN_INV \ - 0x05000000 // Open Drain, Inverted - // Input/Output + 0x05000000 // Open Drain, Inverted +// Input/Output #define IOC_IOMODE_OPEN_SRC_NORMAL \ - 0x06000000 // Open Source, Normal Input/Output + 0x06000000 // Open Source, Normal Input/Output #define IOC_IOMODE_OPEN_SRC_INV \ - 0x07000000 // Open Source, Inverted - // Input/Output + 0x07000000 // Open Source, Inverted +// Input/Output //***************************************************************************** // @@ -281,13 +281,13 @@ extern "C" #define IOC_CURRENT_8MA 0x00000800 // 4 or 8mA drive strength #define IOC_STRENGTH_AUTO 0x00000000 // Automatic Drive Strength - // (2/4/8 mA @ VVDS) +// (2/4/8 mA @ VVDS) #define IOC_STRENGTH_MAX 0x00000300 // Maximum Drive Strength - // (2/4/8 mA @ 1.8V) +// (2/4/8 mA @ 1.8V) #define IOC_STRENGTH_MED 0x00000200 // Medium Drive Strength - // (2/4/8 mA @ 2.5V) +// (2/4/8 mA @ 2.5V) #define IOC_STRENGTH_MIN 0x00000100 // Minimum Drive Strength - // (2/4/8 mA @ 3.3V) +// (2/4/8 mA @ 3.3V) //***************************************************************************** // @@ -1051,87 +1051,87 @@ extern void IOCPinTypeAux(uint32_t ui32IOId); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_IOCPortConfigureSet - #undef IOCPortConfigureSet - #define IOCPortConfigureSet ROM_IOCPortConfigureSet - #endif - #ifdef ROM_IOCPortConfigureGet - #undef IOCPortConfigureGet - #define IOCPortConfigureGet ROM_IOCPortConfigureGet - #endif - #ifdef ROM_IOCIOShutdownSet - #undef IOCIOShutdownSet - #define IOCIOShutdownSet ROM_IOCIOShutdownSet - #endif - #ifdef ROM_IOCIOModeSet - #undef IOCIOModeSet - #define IOCIOModeSet ROM_IOCIOModeSet - #endif - #ifdef ROM_IOCIOIntSet - #undef IOCIOIntSet - #define IOCIOIntSet ROM_IOCIOIntSet - #endif - #ifdef ROM_IOCIOPortPullSet - #undef IOCIOPortPullSet - #define IOCIOPortPullSet ROM_IOCIOPortPullSet - #endif - #ifdef ROM_IOCIOHystSet - #undef IOCIOHystSet - #define IOCIOHystSet ROM_IOCIOHystSet - #endif - #ifdef ROM_IOCIOInputSet - #undef IOCIOInputSet - #define IOCIOInputSet ROM_IOCIOInputSet - #endif - #ifdef ROM_IOCIOSlewCtrlSet - #undef IOCIOSlewCtrlSet - #define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet - #endif - #ifdef ROM_IOCIODrvStrengthSet - #undef IOCIODrvStrengthSet - #define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet - #endif - #ifdef ROM_IOCIOPortIdSet - #undef IOCIOPortIdSet - #define IOCIOPortIdSet ROM_IOCIOPortIdSet - #endif - #ifdef ROM_IOCIntEnable - #undef IOCIntEnable - #define IOCIntEnable ROM_IOCIntEnable - #endif - #ifdef ROM_IOCIntDisable - #undef IOCIntDisable - #define IOCIntDisable ROM_IOCIntDisable - #endif - #ifdef ROM_IOCPinTypeGpioInput - #undef IOCPinTypeGpioInput - #define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput - #endif - #ifdef ROM_IOCPinTypeGpioOutput - #undef IOCPinTypeGpioOutput - #define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput - #endif - #ifdef ROM_IOCPinTypeUart - #undef IOCPinTypeUart - #define IOCPinTypeUart ROM_IOCPinTypeUart - #endif - #ifdef ROM_IOCPinTypeSsiMaster - #undef IOCPinTypeSsiMaster - #define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster - #endif - #ifdef ROM_IOCPinTypeSsiSlave - #undef IOCPinTypeSsiSlave - #define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave - #endif - #ifdef ROM_IOCPinTypeI2c - #undef IOCPinTypeI2c - #define IOCPinTypeI2c ROM_IOCPinTypeI2c - #endif - #ifdef ROM_IOCPinTypeAux - #undef IOCPinTypeAux - #define IOCPinTypeAux ROM_IOCPinTypeAux - #endif +#include "../driverlib/rom.h" +#ifdef ROM_IOCPortConfigureSet +#undef IOCPortConfigureSet +#define IOCPortConfigureSet ROM_IOCPortConfigureSet +#endif +#ifdef ROM_IOCPortConfigureGet +#undef IOCPortConfigureGet +#define IOCPortConfigureGet ROM_IOCPortConfigureGet +#endif +#ifdef ROM_IOCIOShutdownSet +#undef IOCIOShutdownSet +#define IOCIOShutdownSet ROM_IOCIOShutdownSet +#endif +#ifdef ROM_IOCIOModeSet +#undef IOCIOModeSet +#define IOCIOModeSet ROM_IOCIOModeSet +#endif +#ifdef ROM_IOCIOIntSet +#undef IOCIOIntSet +#define IOCIOIntSet ROM_IOCIOIntSet +#endif +#ifdef ROM_IOCIOPortPullSet +#undef IOCIOPortPullSet +#define IOCIOPortPullSet ROM_IOCIOPortPullSet +#endif +#ifdef ROM_IOCIOHystSet +#undef IOCIOHystSet +#define IOCIOHystSet ROM_IOCIOHystSet +#endif +#ifdef ROM_IOCIOInputSet +#undef IOCIOInputSet +#define IOCIOInputSet ROM_IOCIOInputSet +#endif +#ifdef ROM_IOCIOSlewCtrlSet +#undef IOCIOSlewCtrlSet +#define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet +#endif +#ifdef ROM_IOCIODrvStrengthSet +#undef IOCIODrvStrengthSet +#define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet +#endif +#ifdef ROM_IOCIOPortIdSet +#undef IOCIOPortIdSet +#define IOCIOPortIdSet ROM_IOCIOPortIdSet +#endif +#ifdef ROM_IOCIntEnable +#undef IOCIntEnable +#define IOCIntEnable ROM_IOCIntEnable +#endif +#ifdef ROM_IOCIntDisable +#undef IOCIntDisable +#define IOCIntDisable ROM_IOCIntDisable +#endif +#ifdef ROM_IOCPinTypeGpioInput +#undef IOCPinTypeGpioInput +#define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput +#endif +#ifdef ROM_IOCPinTypeGpioOutput +#undef IOCPinTypeGpioOutput +#define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput +#endif +#ifdef ROM_IOCPinTypeUart +#undef IOCPinTypeUart +#define IOCPinTypeUart ROM_IOCPinTypeUart +#endif +#ifdef ROM_IOCPinTypeSsiMaster +#undef IOCPinTypeSsiMaster +#define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster +#endif +#ifdef ROM_IOCPinTypeSsiSlave +#undef IOCPinTypeSsiSlave +#define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave +#endif +#ifdef ROM_IOCPinTypeI2c +#undef IOCPinTypeI2c +#define IOCPinTypeI2c ROM_IOCPinTypeI2c +#endif +#ifdef ROM_IOCPinTypeAux +#undef IOCPinTypeAux +#define IOCPinTypeAux ROM_IOCPinTypeAux +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/osc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/osc.h index 4281a961..3bfb71c4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/osc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/osc.h @@ -84,17 +84,17 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define OSCClockSourceSet NOROM_OSCClockSourceSet - #define OSCClockSourceGet NOROM_OSCClockSourceGet - #define OSCHF_GetStartupTime NOROM_OSCHF_GetStartupTime - #define OSCHF_TurnOnXosc NOROM_OSCHF_TurnOnXosc - #define OSCHF_AttemptToSwitchToXosc NOROM_OSCHF_AttemptToSwitchToXosc - #define OSCHF_SwitchToRcOscTurnOffXosc NOROM_OSCHF_SwitchToRcOscTurnOffXosc - #define OSCHF_DebugGetCrystalAmplitude NOROM_OSCHF_DebugGetCrystalAmplitude - #define OSCHF_DebugGetExpectedAverageCrystalAmplitude NOROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #define OSC_HPOSCRelativeFrequencyOffsetGet NOROM_OSC_HPOSCRelativeFrequencyOffsetGet - #define OSC_AdjustXoscHfCapArray NOROM_OSC_AdjustXoscHfCapArray - #define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert NOROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#define OSCClockSourceSet NOROM_OSCClockSourceSet +#define OSCClockSourceGet NOROM_OSCClockSourceGet +#define OSCHF_GetStartupTime NOROM_OSCHF_GetStartupTime +#define OSCHF_TurnOnXosc NOROM_OSCHF_TurnOnXosc +#define OSCHF_AttemptToSwitchToXosc NOROM_OSCHF_AttemptToSwitchToXosc +#define OSCHF_SwitchToRcOscTurnOffXosc NOROM_OSCHF_SwitchToRcOscTurnOffXosc +#define OSCHF_DebugGetCrystalAmplitude NOROM_OSCHF_DebugGetCrystalAmplitude +#define OSCHF_DebugGetExpectedAverageCrystalAmplitude NOROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#define OSC_HPOSCRelativeFrequencyOffsetGet NOROM_OSC_HPOSCRelativeFrequencyOffsetGet +#define OSC_AdjustXoscHfCapArray NOROM_OSC_AdjustXoscHfCapArray +#define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert NOROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert #endif //***************************************************************************** @@ -178,8 +178,8 @@ __STATIC_INLINE void OSCClockLossEventEnable( void ) { DDI16BitfieldWrite( AUX_DDI0_OSC_BASE, DDI_0_OSC_O_CTL0, - DDI_0_OSC_CTL0_CLK_LOSS_EN_M, - DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 1 ); + DDI_0_OSC_CTL0_CLK_LOSS_EN_M, + DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 1 ); } //***************************************************************************** @@ -201,8 +201,8 @@ __STATIC_INLINE void OSCClockLossEventDisable( void ) { DDI16BitfieldWrite( AUX_DDI0_OSC_BASE, DDI_0_OSC_O_CTL0, - DDI_0_OSC_CTL0_CLK_LOSS_EN_M, - DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 0 ); + DDI_0_OSC_CTL0_CLK_LOSS_EN_M, + DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 0 ); } //***************************************************************************** @@ -290,7 +290,7 @@ OSCHfSourceReady(void) return (DDI16BitfieldRead(AUX_DDI0_OSC_BASE, DDI_0_OSC_O_STAT0, DDI_0_OSC_STAT0_PENDINGSCLKHFSWITCHING_M, DDI_0_OSC_STAT0_PENDINGSCLKHFSWITCHING_S)) ? - true : false; + true : false; } //***************************************************************************** @@ -495,51 +495,51 @@ extern int16_t OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert( int32_t HP // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_OSCClockSourceSet - #undef OSCClockSourceSet - #define OSCClockSourceSet ROM_OSCClockSourceSet - #endif - #ifdef ROM_OSCClockSourceGet - #undef OSCClockSourceGet - #define OSCClockSourceGet ROM_OSCClockSourceGet - #endif - #ifdef ROM_OSCHF_GetStartupTime - #undef OSCHF_GetStartupTime - #define OSCHF_GetStartupTime ROM_OSCHF_GetStartupTime - #endif - #ifdef ROM_OSCHF_TurnOnXosc - #undef OSCHF_TurnOnXosc - #define OSCHF_TurnOnXosc ROM_OSCHF_TurnOnXosc - #endif - #ifdef ROM_OSCHF_AttemptToSwitchToXosc - #undef OSCHF_AttemptToSwitchToXosc - #define OSCHF_AttemptToSwitchToXosc ROM_OSCHF_AttemptToSwitchToXosc - #endif - #ifdef ROM_OSCHF_SwitchToRcOscTurnOffXosc - #undef OSCHF_SwitchToRcOscTurnOffXosc - #define OSCHF_SwitchToRcOscTurnOffXosc ROM_OSCHF_SwitchToRcOscTurnOffXosc - #endif - #ifdef ROM_OSCHF_DebugGetCrystalAmplitude - #undef OSCHF_DebugGetCrystalAmplitude - #define OSCHF_DebugGetCrystalAmplitude ROM_OSCHF_DebugGetCrystalAmplitude - #endif - #ifdef ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #undef OSCHF_DebugGetExpectedAverageCrystalAmplitude - #define OSCHF_DebugGetExpectedAverageCrystalAmplitude ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #endif - #ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetGet - #undef OSC_HPOSCRelativeFrequencyOffsetGet - #define OSC_HPOSCRelativeFrequencyOffsetGet ROM_OSC_HPOSCRelativeFrequencyOffsetGet - #endif - #ifdef ROM_OSC_AdjustXoscHfCapArray - #undef OSC_AdjustXoscHfCapArray - #define OSC_AdjustXoscHfCapArray ROM_OSC_AdjustXoscHfCapArray - #endif - #ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #undef OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #endif +#include "../driverlib/rom.h" +#ifdef ROM_OSCClockSourceSet +#undef OSCClockSourceSet +#define OSCClockSourceSet ROM_OSCClockSourceSet +#endif +#ifdef ROM_OSCClockSourceGet +#undef OSCClockSourceGet +#define OSCClockSourceGet ROM_OSCClockSourceGet +#endif +#ifdef ROM_OSCHF_GetStartupTime +#undef OSCHF_GetStartupTime +#define OSCHF_GetStartupTime ROM_OSCHF_GetStartupTime +#endif +#ifdef ROM_OSCHF_TurnOnXosc +#undef OSCHF_TurnOnXosc +#define OSCHF_TurnOnXosc ROM_OSCHF_TurnOnXosc +#endif +#ifdef ROM_OSCHF_AttemptToSwitchToXosc +#undef OSCHF_AttemptToSwitchToXosc +#define OSCHF_AttemptToSwitchToXosc ROM_OSCHF_AttemptToSwitchToXosc +#endif +#ifdef ROM_OSCHF_SwitchToRcOscTurnOffXosc +#undef OSCHF_SwitchToRcOscTurnOffXosc +#define OSCHF_SwitchToRcOscTurnOffXosc ROM_OSCHF_SwitchToRcOscTurnOffXosc +#endif +#ifdef ROM_OSCHF_DebugGetCrystalAmplitude +#undef OSCHF_DebugGetCrystalAmplitude +#define OSCHF_DebugGetCrystalAmplitude ROM_OSCHF_DebugGetCrystalAmplitude +#endif +#ifdef ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#undef OSCHF_DebugGetExpectedAverageCrystalAmplitude +#define OSCHF_DebugGetExpectedAverageCrystalAmplitude ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#endif +#ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetGet +#undef OSC_HPOSCRelativeFrequencyOffsetGet +#define OSC_HPOSCRelativeFrequencyOffsetGet ROM_OSC_HPOSCRelativeFrequencyOffsetGet +#endif +#ifdef ROM_OSC_AdjustXoscHfCapArray +#undef OSC_AdjustXoscHfCapArray +#define OSC_AdjustXoscHfCapArray ROM_OSC_AdjustXoscHfCapArray +#endif +#ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#undef OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/prcm.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/prcm.h index 663afd19..becf1cd9 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/prcm.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/prcm.h @@ -86,22 +86,22 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet - #define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet - #define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet - #define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride - #define PRCMAudioClockInternalSource NOROM_PRCMAudioClockInternalSource - #define PRCMAudioClockExternalSource NOROM_PRCMAudioClockExternalSource - #define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn - #define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff - #define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable - #define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable - #define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable - #define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable - #define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable - #define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable - #define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus - #define PRCMDeepSleep NOROM_PRCMDeepSleep +#define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet +#define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet +#define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet +#define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride +#define PRCMAudioClockInternalSource NOROM_PRCMAudioClockInternalSource +#define PRCMAudioClockExternalSource NOROM_PRCMAudioClockExternalSource +#define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn +#define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff +#define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable +#define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable +#define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable +#define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable +#define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable +#define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable +#define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus +#define PRCMDeepSleep NOROM_PRCMDeepSleep #endif //***************************************************************************** @@ -135,28 +135,28 @@ extern "C" // //***************************************************************************** #define PRCM_DOMAIN_RFCORE 0x00000001 // RF Core domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_SERIAL 0x00000002 // Serial domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_PERIPH 0x00000004 // Peripheral domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_SYSBUS 0x00000008 // Bus domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_VIMS 0x00000010 // VIMS domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_CPU 0x00000020 // CPU domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_TIMER 0x00000040 // GPT domain ID for clock - // control. +// control. #define PRCM_DOMAIN_CLKCTRL 0x00000080 // Clock Control domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_MCU 0x00000100 // Reset control for entire MCU - // domain. +// domain. #define PRCM_DOMAIN_POWER_OFF 0x00000002 // The domain is powered off #define PRCM_DOMAIN_POWER_ON 0x00000001 // The domain is powered on #define PRCM_DOMAIN_POWER_DOWN_READY \ - 0x00000000 // The domain is ready to be - // powered down. + 0x00000000 // The domain is ready to be +// powered down. //***************************************************************************** // @@ -224,19 +224,19 @@ extern "C" static bool PRCMPeripheralValid(uint32_t ui32Peripheral) { - return((ui32Peripheral == PRCM_PERIPH_TIMER0) || - (ui32Peripheral == PRCM_PERIPH_TIMER1) || - (ui32Peripheral == PRCM_PERIPH_TIMER2) || - (ui32Peripheral == PRCM_PERIPH_TIMER3) || - (ui32Peripheral == PRCM_PERIPH_SSI0) || - (ui32Peripheral == PRCM_PERIPH_SSI1) || - (ui32Peripheral == PRCM_PERIPH_UART0) || - (ui32Peripheral == PRCM_PERIPH_I2C0) || - (ui32Peripheral == PRCM_PERIPH_CRYPTO) || - (ui32Peripheral == PRCM_PERIPH_TRNG) || - (ui32Peripheral == PRCM_PERIPH_UDMA) || - (ui32Peripheral == PRCM_PERIPH_GPIO) || - (ui32Peripheral == PRCM_PERIPH_I2S)); + return ((ui32Peripheral == PRCM_PERIPH_TIMER0) || + (ui32Peripheral == PRCM_PERIPH_TIMER1) || + (ui32Peripheral == PRCM_PERIPH_TIMER2) || + (ui32Peripheral == PRCM_PERIPH_TIMER3) || + (ui32Peripheral == PRCM_PERIPH_SSI0) || + (ui32Peripheral == PRCM_PERIPH_SSI1) || + (ui32Peripheral == PRCM_PERIPH_UART0) || + (ui32Peripheral == PRCM_PERIPH_I2C0) || + (ui32Peripheral == PRCM_PERIPH_CRYPTO) || + (ui32Peripheral == PRCM_PERIPH_TRNG) || + (ui32Peripheral == PRCM_PERIPH_UDMA) || + (ui32Peripheral == PRCM_PERIPH_GPIO) || + (ui32Peripheral == PRCM_PERIPH_I2S)); } #endif @@ -530,7 +530,7 @@ extern void PRCMAudioClockConfigSet(uint32_t ui32ClkConfig, //***************************************************************************** #ifndef DEPRECATED extern void PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui32MstDiv, - uint32_t ui32BitDiv, uint32_t ui32WordDiv); + uint32_t ui32BitDiv, uint32_t ui32WordDiv); #endif //***************************************************************************** @@ -555,11 +555,11 @@ extern void PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui3 //! //***************************************************************************** extern void PRCMAudioClockConfigOverride - (uint8_t ui8SamplingEdge, - uint8_t ui8WCLKPhase, - uint32_t ui32MstDiv, - uint32_t ui32BitDiv, - uint32_t ui32WordDiv); +(uint8_t ui8SamplingEdge, + uint8_t ui8WCLKPhase, + uint32_t ui32MstDiv, + uint32_t ui32BitDiv, + uint32_t ui32WordDiv); //***************************************************************************** // @@ -668,11 +668,12 @@ PRCMDomainEnable(uint32_t ui32Domains) (ui32Domains & PRCM_DOMAIN_VIMS)); // Enable the clock domain(s). - if(ui32Domains & PRCM_DOMAIN_RFCORE) + if (ui32Domains & PRCM_DOMAIN_RFCORE) { HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = PRCM_RFCCLKG_CLK_EN; } - if(ui32Domains & PRCM_DOMAIN_VIMS) + + if (ui32Domains & PRCM_DOMAIN_VIMS) { HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = PRCM_VIMSCLKG_CLK_EN_M; } @@ -707,11 +708,12 @@ PRCMDomainDisable(uint32_t ui32Domains) (ui32Domains & PRCM_DOMAIN_VIMS)); // Disable the power domains. - if(ui32Domains & PRCM_DOMAIN_RFCORE) + if (ui32Domains & PRCM_DOMAIN_RFCORE) { HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = 0x0; } - if(ui32Domains & PRCM_DOMAIN_VIMS) + + if (ui32Domains & PRCM_DOMAIN_VIMS) { HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = 0x0; } @@ -1139,7 +1141,7 @@ extern void PRCMDeepSleep(void); __STATIC_INLINE void PRCMCacheRetentionEnable( void ) { - HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) |= PRCM_RAMRETEN_VIMS_M; + HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) |= PRCM_RAMRETEN_VIMS_M; } //***************************************************************************** @@ -1154,7 +1156,7 @@ PRCMCacheRetentionEnable( void ) __STATIC_INLINE void PRCMCacheRetentionDisable( void ) { - HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) &= ~PRCM_RAMRETEN_VIMS_M; + HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) &= ~PRCM_RAMRETEN_VIMS_M; } @@ -1165,71 +1167,71 @@ PRCMCacheRetentionDisable( void ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PRCMInfClockConfigureSet - #undef PRCMInfClockConfigureSet - #define PRCMInfClockConfigureSet ROM_PRCMInfClockConfigureSet - #endif - #ifdef ROM_PRCMInfClockConfigureGet - #undef PRCMInfClockConfigureGet - #define PRCMInfClockConfigureGet ROM_PRCMInfClockConfigureGet - #endif - #ifdef ROM_PRCMAudioClockConfigSet - #undef PRCMAudioClockConfigSet - #define PRCMAudioClockConfigSet ROM_PRCMAudioClockConfigSet - #endif - #ifdef ROM_PRCMAudioClockConfigSetOverride - #undef PRCMAudioClockConfigSetOverride - #define PRCMAudioClockConfigSetOverride ROM_PRCMAudioClockConfigSetOverride - #endif - #ifdef ROM_PRCMAudioClockInternalSource - #undef PRCMAudioClockInternalSource - #define PRCMAudioClockInternalSource ROM_PRCMAudioClockInternalSource - #endif - #ifdef ROM_PRCMAudioClockExternalSource - #undef PRCMAudioClockExternalSource - #define PRCMAudioClockExternalSource ROM_PRCMAudioClockExternalSource - #endif - #ifdef ROM_PRCMPowerDomainOn - #undef PRCMPowerDomainOn - #define PRCMPowerDomainOn ROM_PRCMPowerDomainOn - #endif - #ifdef ROM_PRCMPowerDomainOff - #undef PRCMPowerDomainOff - #define PRCMPowerDomainOff ROM_PRCMPowerDomainOff - #endif - #ifdef ROM_PRCMPeripheralRunEnable - #undef PRCMPeripheralRunEnable - #define PRCMPeripheralRunEnable ROM_PRCMPeripheralRunEnable - #endif - #ifdef ROM_PRCMPeripheralRunDisable - #undef PRCMPeripheralRunDisable - #define PRCMPeripheralRunDisable ROM_PRCMPeripheralRunDisable - #endif - #ifdef ROM_PRCMPeripheralSleepEnable - #undef PRCMPeripheralSleepEnable - #define PRCMPeripheralSleepEnable ROM_PRCMPeripheralSleepEnable - #endif - #ifdef ROM_PRCMPeripheralSleepDisable - #undef PRCMPeripheralSleepDisable - #define PRCMPeripheralSleepDisable ROM_PRCMPeripheralSleepDisable - #endif - #ifdef ROM_PRCMPeripheralDeepSleepEnable - #undef PRCMPeripheralDeepSleepEnable - #define PRCMPeripheralDeepSleepEnable ROM_PRCMPeripheralDeepSleepEnable - #endif - #ifdef ROM_PRCMPeripheralDeepSleepDisable - #undef PRCMPeripheralDeepSleepDisable - #define PRCMPeripheralDeepSleepDisable ROM_PRCMPeripheralDeepSleepDisable - #endif - #ifdef ROM_PRCMPowerDomainStatus - #undef PRCMPowerDomainStatus - #define PRCMPowerDomainStatus ROM_PRCMPowerDomainStatus - #endif - #ifdef ROM_PRCMDeepSleep - #undef PRCMDeepSleep - #define PRCMDeepSleep ROM_PRCMDeepSleep - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PRCMInfClockConfigureSet +#undef PRCMInfClockConfigureSet +#define PRCMInfClockConfigureSet ROM_PRCMInfClockConfigureSet +#endif +#ifdef ROM_PRCMInfClockConfigureGet +#undef PRCMInfClockConfigureGet +#define PRCMInfClockConfigureGet ROM_PRCMInfClockConfigureGet +#endif +#ifdef ROM_PRCMAudioClockConfigSet +#undef PRCMAudioClockConfigSet +#define PRCMAudioClockConfigSet ROM_PRCMAudioClockConfigSet +#endif +#ifdef ROM_PRCMAudioClockConfigSetOverride +#undef PRCMAudioClockConfigSetOverride +#define PRCMAudioClockConfigSetOverride ROM_PRCMAudioClockConfigSetOverride +#endif +#ifdef ROM_PRCMAudioClockInternalSource +#undef PRCMAudioClockInternalSource +#define PRCMAudioClockInternalSource ROM_PRCMAudioClockInternalSource +#endif +#ifdef ROM_PRCMAudioClockExternalSource +#undef PRCMAudioClockExternalSource +#define PRCMAudioClockExternalSource ROM_PRCMAudioClockExternalSource +#endif +#ifdef ROM_PRCMPowerDomainOn +#undef PRCMPowerDomainOn +#define PRCMPowerDomainOn ROM_PRCMPowerDomainOn +#endif +#ifdef ROM_PRCMPowerDomainOff +#undef PRCMPowerDomainOff +#define PRCMPowerDomainOff ROM_PRCMPowerDomainOff +#endif +#ifdef ROM_PRCMPeripheralRunEnable +#undef PRCMPeripheralRunEnable +#define PRCMPeripheralRunEnable ROM_PRCMPeripheralRunEnable +#endif +#ifdef ROM_PRCMPeripheralRunDisable +#undef PRCMPeripheralRunDisable +#define PRCMPeripheralRunDisable ROM_PRCMPeripheralRunDisable +#endif +#ifdef ROM_PRCMPeripheralSleepEnable +#undef PRCMPeripheralSleepEnable +#define PRCMPeripheralSleepEnable ROM_PRCMPeripheralSleepEnable +#endif +#ifdef ROM_PRCMPeripheralSleepDisable +#undef PRCMPeripheralSleepDisable +#define PRCMPeripheralSleepDisable ROM_PRCMPeripheralSleepDisable +#endif +#ifdef ROM_PRCMPeripheralDeepSleepEnable +#undef PRCMPeripheralDeepSleepEnable +#define PRCMPeripheralDeepSleepEnable ROM_PRCMPeripheralDeepSleepEnable +#endif +#ifdef ROM_PRCMPeripheralDeepSleepDisable +#undef PRCMPeripheralDeepSleepDisable +#define PRCMPeripheralDeepSleepDisable ROM_PRCMPeripheralDeepSleepDisable +#endif +#ifdef ROM_PRCMPowerDomainStatus +#undef PRCMPowerDomainStatus +#define PRCMPowerDomainStatus ROM_PRCMPowerDomainStatus +#endif +#ifdef ROM_PRCMDeepSleep +#undef PRCMDeepSleep +#define PRCMDeepSleep ROM_PRCMDeepSleep +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/pwr_ctrl.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/pwr_ctrl.h index 4cbff1b6..e0ac7cee 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/pwr_ctrl.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/pwr_ctrl.h @@ -90,7 +90,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet +#define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet #endif //***************************************************************************** @@ -183,7 +183,8 @@ PowerCtrlSourceGet(void) // Return the current power source ui32PowerConfig = HWREG(AON_SYSCTL_BASE + AON_SYSCTL_O_PWRCTL); - if(ui32PowerConfig & AON_SYSCTL_PWRCTL_DCDC_ACTIVE) + + if (ui32PowerConfig & AON_SYSCTL_PWRCTL_DCDC_ACTIVE) { return (PWRCTRL_PWRSRC_DCDC); } @@ -223,8 +224,8 @@ PowerCtrlResetSourceGet(void) { // Get the reset source. return (( HWREG( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL ) & - AON_SYSCTL_RESETCTL_RESET_SRC_M ) >> - AON_SYSCTL_RESETCTL_RESET_SRC_S ) ; + AON_SYSCTL_RESETCTL_RESET_SRC_M ) >> + AON_SYSCTL_RESETCTL_RESET_SRC_S ) ; } //***************************************************************************** @@ -269,11 +270,11 @@ PowerCtrlPadSleepDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PowerCtrlSourceSet - #undef PowerCtrlSourceSet - #define PowerCtrlSourceSet ROM_PowerCtrlSourceSet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PowerCtrlSourceSet +#undef PowerCtrlSourceSet +#define PowerCtrlSourceSet ROM_PowerCtrlSourceSet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_ble_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_ble_cmd.h index 2dabdcbf..0a61048f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_ble_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_ble_cmd.h @@ -40,17 +40,17 @@ #define __BLE_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -95,39 +95,43 @@ typedef struct __RFC_STRUCT rfc_bleRxStatus_s rfc_bleRxStatus_t; //! \addtogroup bleRadioOp //! @{ -struct __RFC_STRUCT rfc_bleRadioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - uint8_t* pParams; //!< Pointer to command specific parameter structure - uint8_t* pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_bleRadioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + uint8_t* pParams; //!< Pointer to command specific parameter structure + uint8_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -136,39 +140,43 @@ struct __RFC_STRUCT rfc_bleRadioOp_s { //! @{ #define CMD_BLE_SLAVE 0x1801 //! BLE Slave Command -struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s { - uint16_t commandNo; //!< The command ID number 0x1801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleSlavePar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s +{ + uint16_t commandNo; //!< The command ID number 0x1801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleSlavePar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -177,39 +185,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s { //! @{ #define CMD_BLE_MASTER 0x1802 //! BLE Master Command -struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s { - uint16_t commandNo; //!< The command ID number 0x1802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleMasterPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s +{ + uint16_t commandNo; //!< The command ID number 0x1802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleMasterPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -218,39 +230,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s { //! @{ #define CMD_BLE_ADV 0x1803 //! BLE Connectable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_s { - uint16_t commandNo; //!< The command ID number 0x1803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x1803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -259,39 +275,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_s { //! @{ #define CMD_BLE_ADV_DIR 0x1804 //! BLE Connectable Directed Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s { - uint16_t commandNo; //!< The command ID number 0x1804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s +{ + uint16_t commandNo; //!< The command ID number 0x1804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -300,39 +320,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s { //! @{ #define CMD_BLE_ADV_NC 0x1805 //! BLE Non-Connectable Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s { - uint16_t commandNo; //!< The command ID number 0x1805 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s +{ + uint16_t commandNo; //!< The command ID number 0x1805 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -341,39 +365,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s { //! @{ #define CMD_BLE_ADV_SCAN 0x1806 //! BLE Scannable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s { - uint16_t commandNo; //!< The command ID number 0x1806 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s +{ + uint16_t commandNo; //!< The command ID number 0x1806 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -382,39 +410,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s { //! @{ #define CMD_BLE_SCANNER 0x1807 //! BLE Scanner Command -struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s { - uint16_t commandNo; //!< The command ID number 0x1807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleScannerPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleScannerOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s +{ + uint16_t commandNo; //!< The command ID number 0x1807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleScannerPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleScannerOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -423,39 +455,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s { //! @{ #define CMD_BLE_INITIATOR 0x1808 //! BLE Initiator Command -struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s { - uint16_t commandNo; //!< The command ID number 0x1808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleInitiatorPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleInitiatorOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s +{ + uint16_t commandNo; //!< The command ID number 0x1808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleInitiatorPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleInitiatorOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -464,39 +500,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s { //! @{ #define CMD_BLE_GENERIC_RX 0x1809 //! BLE Generic Receiver Command -struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s { - uint16_t commandNo; //!< The command ID number 0x1809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleGenericRxPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleGenericRxOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x1809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleGenericRxPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleGenericRxOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -505,39 +545,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s { //! @{ #define CMD_BLE_TX_TEST 0x180A //! BLE PHY Test Transmitter Command -struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x180A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleTxTestPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleTxTestOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x180A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleTxTestPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleTxTestOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -546,13 +590,14 @@ struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s { //! @{ #define CMD_BLE_ADV_PAYLOAD 0x1001 //! BLE Update Advertising Payload Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s { - uint16_t commandNo; //!< The command ID number 0x1001 - uint8_t payloadType; //!< \brief 0: Advertising data
- //!< 1: Scan response data - uint8_t newLen; //!< Length of the new payload - uint8_t* pNewData; //!< Pointer to the buffer containing the new data - rfc_bleAdvPar_t *pParams; //!< Pointer to the parameter structure to update +struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s +{ + uint16_t commandNo; //!< The command ID number 0x1001 + uint8_t payloadType; //!< \brief 0: Advertising data
+ //!< 1: Scan response data + uint8_t newLen; //!< Length of the new payload + uint8_t* pNewData; //!< Pointer to the buffer containing the new data + rfc_bleAdvPar_t* pParams; //!< Pointer to the parameter structure to update } __RFC_STRUCT_ATTR; //! @} @@ -561,43 +606,47 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s { //! @{ #define CMD_BLE5_RADIO_SETUP 0x1820 //! Define only for compatibility with CC26XXR2F family. Command will result in error if sent. -struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s { - uint8_t dummy0; +struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s +{ + uint8_t dummy0; } __RFC_STRUCT_ATTR; //! @} //! \addtogroup bleMasterSlavePar //! @{ -struct __RFC_STRUCT rfc_bleMasterSlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte +struct __RFC_STRUCT rfc_bleMasterSlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte } __RFC_STRUCT_ATTR; //! @} @@ -606,45 +655,49 @@ struct __RFC_STRUCT rfc_bleMasterSlavePar_s { //! @{ //! Parameter structure for master (CMD_BLE_MASTER) -struct __RFC_STRUCT rfc_bleMasterPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_bleMasterPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -653,57 +706,62 @@ struct __RFC_STRUCT rfc_bleMasterPar_s { //! @{ //! Parameter structure for slave (CMD_BLE_SLAVE) -struct __RFC_STRUCT rfc_bleSlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first - //!< receive operation - uint16_t __dummy0; - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_bleSlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first + //!< receive operation + uint16_t __dummy0; + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -712,53 +770,57 @@ struct __RFC_STRUCT rfc_bleSlavePar_s { //! @{ //! Parameter structure for advertiser (CMD_BLE_ADV*) -struct __RFC_STRUCT rfc_bleAdvPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t advFilterPolicy:2; //!< \brief Advertiser filter policy
- //!< 0: Process scan and connect requests from all devices
- //!< 1: Process connect requests from all devices and only scan requests from - //!< devices that are in the white list
- //!< 2: Process scan requests from all devices and only connect requests from - //!< devices that are in the white list
- //!< 3: Process scan and connect requests only from devices in the white list - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< Directed advertiser: The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t :2; - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } advConfig; - uint8_t advLen; //!< Size of advertiser data - uint8_t scanRspLen; //!< Size of scan response data - uint8_t* pAdvData; //!< Pointer to buffer containing ADV*_IND data - uint8_t* pScanRspData; //!< Pointer to buffer containing SCAN_RSP data - uint16_t* pDeviceAddress; //!< Pointer to device address used for this device - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list or peer address (directed advertiser) - uint16_t __dummy0; - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the advertiser event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< advertiser event as soon as allowed +struct __RFC_STRUCT rfc_bleAdvPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t advFilterPolicy: 2; //!< \brief Advertiser filter policy
+ //!< 0: Process scan and connect requests from all devices
+ //!< 1: Process connect requests from all devices and only scan requests from + //!< devices that are in the white list
+ //!< 2: Process scan requests from all devices and only connect requests from + //!< devices that are in the white list
+ //!< 3: Process scan and connect requests only from devices in the white list + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< Directed advertiser: The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t : 2; + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } advConfig; + uint8_t advLen; //!< Size of advertiser data + uint8_t scanRspLen; //!< Size of scan response data + uint8_t* pAdvData; //!< Pointer to buffer containing ADV*_IND data + uint8_t* pScanRspData; //!< Pointer to buffer containing SCAN_RSP data + uint16_t* pDeviceAddress; //!< Pointer to device address used for this device + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list or peer address (directed advertiser) + uint16_t __dummy0; + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the advertiser event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< advertiser event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -767,70 +829,76 @@ struct __RFC_STRUCT rfc_bleAdvPar_s { //! @{ //! Parameter structure for scanner (CMD_BLE_SCANNER) -struct __RFC_STRUCT rfc_bleScannerPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t scanFilterPolicy:1; //!< \brief Scanning filter policy
- //!< 0: Accept all advertisement packets
- //!< 1: Accept only advertisement packets from devices where the advertiser's address - //!< is in the White list. - uint8_t bActiveScan:1; //!< \brief 0: Passive scan
- //!< 1: Active scan - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t :1; - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t bAutoWlIgnore:1; //!< 1: Automatically set ignore bit in white list - uint8_t bEndOnRpt:1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
- //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } scanConfig; - uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure - uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth 4.0 spec - struct { - uint8_t logUpperLimit:4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure - uint8_t bLastSucceeded:1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit - //!< not changed - uint8_t bLastFailed:1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not - //!< changed - } backoffPar; - uint8_t scanReqLen; //!< Size of scan request data - uint8_t* pScanReqData; //!< Pointer to buffer containing SCAN_REQ data - uint16_t* pDeviceAddress; //!< Pointer to device address used for this device - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list - uint16_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED +struct __RFC_STRUCT rfc_bleScannerPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t scanFilterPolicy: 1; //!< \brief Scanning filter policy
+ //!< 0: Accept all advertisement packets
+ //!< 1: Accept only advertisement packets from devices where the advertiser's address + //!< is in the White list. + uint8_t bActiveScan: 1; //!< \brief 0: Passive scan
+ //!< 1: Active scan + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t : 1; + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t bAutoWlIgnore: 1; //!< 1: Automatically set ignore bit in white list + uint8_t bEndOnRpt: 1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
+ //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } scanConfig; + uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure + uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth 4.0 spec + struct + { + uint8_t logUpperLimit: 4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure + uint8_t bLastSucceeded: 1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit + //!< not changed + uint8_t bLastFailed: 1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not + //!< changed + } backoffPar; + uint8_t scanReqLen; //!< Size of scan request data + uint8_t* pScanReqData; //!< Pointer to buffer containing SCAN_REQ data + uint16_t* pDeviceAddress; //!< Pointer to device address used for this device + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list + uint16_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED } __RFC_STRUCT_ATTR; //! @} @@ -839,58 +907,63 @@ struct __RFC_STRUCT rfc_bleScannerPar_s { //! @{ //! Parameter structure for initiator (CMD_BLE_INITIATOR) -struct __RFC_STRUCT rfc_bleInitiatorPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t bUseWhiteList:1; //!< \brief Initiator filter policy
- //!< 0: Use specific peer address
- //!< 1: Use white list - uint8_t bDynamicWinOffset:1; //!< \brief 0: No dynamic WinOffset insertion
- //!< 1: Use dynamic WinOffset insertion - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - } initConfig; - uint8_t __dummy0; - uint8_t connectReqLen; //!< Size of connect request data - uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_REQ - uint16_t* pDeviceAddress; //!< Pointer to device address used for this device - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list or peer address - ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. - //!< Set to the calculated value if a connection is made and to the next possible connection - //!< time if not. - uint16_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED +struct __RFC_STRUCT rfc_bleInitiatorPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t bUseWhiteList: 1; //!< \brief Initiator filter policy
+ //!< 0: Use specific peer address
+ //!< 1: Use white list + uint8_t bDynamicWinOffset: 1; //!< \brief 0: No dynamic WinOffset insertion
+ //!< 1: Use dynamic WinOffset insertion + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + } initConfig; + uint8_t __dummy0; + uint8_t connectReqLen; //!< Size of connect request data + uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_REQ + uint16_t* pDeviceAddress; //!< Pointer to device address used for this device + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list or peer address + ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. + //!< Set to the calculated value if a connection is made and to the next possible connection + //!< time if not. + uint16_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED } __RFC_STRUCT_ATTR; //! @} @@ -899,35 +972,38 @@ struct __RFC_STRUCT rfc_bleInitiatorPar_s { //! @{ //! Parameter structure for generic Rx (CMD_BLE_GENERIC_RX) -struct __RFC_STRUCT rfc_bleGenericRxPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue. May be NULL; if so, received packets are not stored - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - uint8_t bRepeat; //!< \brief 0: End operation after receiving a packet
- //!< 1: Restart receiver after receiving a packet - uint16_t __dummy0; - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< Rx operation +struct __RFC_STRUCT rfc_bleGenericRxPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue. May be NULL; if so, received packets are not stored + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + uint8_t bRepeat; //!< \brief 0: End operation after receiving a packet
+ //!< 1: Restart receiver after receiving a packet + uint16_t __dummy0; + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< Rx operation } __RFC_STRUCT_ATTR; //! @} @@ -936,33 +1012,36 @@ struct __RFC_STRUCT rfc_bleGenericRxPar_s { //! @{ //! Parameter structure for Tx test (CMD_BLE_TX_TEST) -struct __RFC_STRUCT rfc_bleTxTestPar_s { - uint16_t numPackets; //!< \brief Number of packets to transmit
- //!< 0: Transmit unlimited number of packets - uint8_t payloadLength; //!< The number of payload bytes in each packet. - uint8_t packetType; //!< \brief The packet type to be used, encoded according to the Bluetooth 4.0 spec, Volume 2, Part E, - //!< Section 7.8.29 - ratmr_t period; //!< Number of radio timer cycles between the start of each packet - struct { - uint8_t bOverrideDefault:1; //!< \brief 0: Use default packet encoding
- //!< 1: Override packet contents - uint8_t bUsePrbs9:1; //!< \brief If bOverride is 1:
- //!< 1: Use PRBS9 encoding of packet - uint8_t bUsePrbs15:1; //!< \brief If bOverride is 1:
- //!< 1: Use PRBS15 encoding of packet - } config; - uint8_t byteVal; //!< If config.bOverride is 1, value of each byte to be sent - uint8_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Test Tx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< Test Tx operation +struct __RFC_STRUCT rfc_bleTxTestPar_s +{ + uint16_t numPackets; //!< \brief Number of packets to transmit
+ //!< 0: Transmit unlimited number of packets + uint8_t payloadLength; //!< The number of payload bytes in each packet. + uint8_t packetType; //!< \brief The packet type to be used, encoded according to the Bluetooth 4.0 spec, Volume 2, Part E, + //!< Section 7.8.29 + ratmr_t period; //!< Number of radio timer cycles between the start of each packet + struct + { + uint8_t bOverrideDefault: 1; //!< \brief 0: Use default packet encoding
+ //!< 1: Override packet contents + uint8_t bUsePrbs9: 1; //!< \brief If bOverride is 1:
+ //!< 1: Use PRBS9 encoding of packet + uint8_t bUsePrbs15: 1; //!< \brief If bOverride is 1:
+ //!< 1: Use PRBS15 encoding of packet + } config; + uint8_t byteVal; //!< If config.bOverride is 1, value of each byte to be sent + uint8_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Test Tx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< Test Tx operation } __RFC_STRUCT_ATTR; //! @} @@ -971,37 +1050,39 @@ struct __RFC_STRUCT rfc_bleTxTestPar_s { //! @{ //! Output structure for master and slave (CMD_BLE_MASTER and CMD_BLE_SLAVE) -struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s { - uint8_t nTx; //!< \brief Total number of packets (including auto-empty and retransmissions) that have been - //!< transmitted - uint8_t nTxAck; //!< Total number of transmitted packets (including auto-empty) that have been ACK'ed - uint8_t nTxCtrl; //!< Number of unique LL control packets from the Tx queue that have been transmitted - uint8_t nTxCtrlAck; //!< Number of LL control packets from the Tx queue that have been finished (ACK'ed) - uint8_t nTxCtrlAckAck; //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in - //!< response - uint8_t nTxRetrans; //!< Number of retransmissions that has been done - uint8_t nTxEntryDone; //!< Number of packets from the Tx queue that have been finished (ACK'ed) - uint8_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored - uint8_t nRxCtrl; //!< Number of LL control packets that have been received with CRC OK and not ignored - uint8_t nRxCtrlAck; //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and - //!< then ACK'ed - uint8_t nRxNok; //!< Number of packets that have been received with CRC error - uint8_t nRxIgnored; //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated - //!< sequence number - uint8_t nRxEmpty; //!< Number of packets that have been received with CRC OK and no payload - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - struct { - uint8_t bTimeStampValid:1; //!< 1 if a valid time stamp has been written to timeStamp; 0 otherwise - uint8_t bLastCrcErr:1; //!< 1 if the last received packet had CRC error; 0 otherwise - uint8_t bLastIgnored:1; //!< 1 if the last received packet with CRC OK was ignored; 0 otherwise - uint8_t bLastEmpty:1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise - uint8_t bLastCtrl:1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise - uint8_t bLastMd:1; //!< 1 if the last received packet with CRC OK had MD = 1; 0 otherwise - uint8_t bLastAck:1; //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet; - //!< 0 otherwise - } pktStatus; - ratmr_t timeStamp; //!< Slave operation: Time stamp of first received packet +struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s +{ + uint8_t nTx; //!< \brief Total number of packets (including auto-empty and retransmissions) that have been + //!< transmitted + uint8_t nTxAck; //!< Total number of transmitted packets (including auto-empty) that have been ACK'ed + uint8_t nTxCtrl; //!< Number of unique LL control packets from the Tx queue that have been transmitted + uint8_t nTxCtrlAck; //!< Number of LL control packets from the Tx queue that have been finished (ACK'ed) + uint8_t nTxCtrlAckAck; //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in + //!< response + uint8_t nTxRetrans; //!< Number of retransmissions that has been done + uint8_t nTxEntryDone; //!< Number of packets from the Tx queue that have been finished (ACK'ed) + uint8_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored + uint8_t nRxCtrl; //!< Number of LL control packets that have been received with CRC OK and not ignored + uint8_t nRxCtrlAck; //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and + //!< then ACK'ed + uint8_t nRxNok; //!< Number of packets that have been received with CRC error + uint8_t nRxIgnored; //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated + //!< sequence number + uint8_t nRxEmpty; //!< Number of packets that have been received with CRC OK and no payload + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + struct + { + uint8_t bTimeStampValid: 1; //!< 1 if a valid time stamp has been written to timeStamp; 0 otherwise + uint8_t bLastCrcErr: 1; //!< 1 if the last received packet had CRC error; 0 otherwise + uint8_t bLastIgnored: 1; //!< 1 if the last received packet with CRC OK was ignored; 0 otherwise + uint8_t bLastEmpty: 1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise + uint8_t bLastCtrl: 1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise + uint8_t bLastMd: 1; //!< 1 if the last received packet with CRC OK had MD = 1; 0 otherwise + uint8_t bLastAck: 1; //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet; + //!< 0 otherwise + } pktStatus; + ratmr_t timeStamp; //!< Slave operation: Time stamp of first received packet } __RFC_STRUCT_ATTR; //! @} @@ -1010,17 +1091,18 @@ struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s { //! @{ //! Output structure for advertiser (CMD_BLE_ADV*) -struct __RFC_STRUCT rfc_bleAdvOutput_s { - uint16_t nTxAdvInd; //!< Number of ADV*_IND packets completely transmitted - uint8_t nTxScanRsp; //!< Number of SCAN_RSP packets transmitted - uint8_t nRxScanReq; //!< Number of SCAN_REQ packets received OK and not ignored - uint8_t nRxConnectReq; //!< Number of CONNECT_REQ packets received OK and not ignored - uint8_t __dummy0; - uint16_t nRxNok; //!< Number of packets received with CRC error - uint16_t nRxIgnored; //!< Number of packets received with CRC OK, but ignored - uint8_t nRxBufFull; //!< Number of packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet - ratmr_t timeStamp; //!< Time stamp of the last received packet +struct __RFC_STRUCT rfc_bleAdvOutput_s +{ + uint16_t nTxAdvInd; //!< Number of ADV*_IND packets completely transmitted + uint8_t nTxScanRsp; //!< Number of SCAN_RSP packets transmitted + uint8_t nRxScanReq; //!< Number of SCAN_REQ packets received OK and not ignored + uint8_t nRxConnectReq; //!< Number of CONNECT_REQ packets received OK and not ignored + uint8_t __dummy0; + uint16_t nRxNok; //!< Number of packets received with CRC error + uint16_t nRxIgnored; //!< Number of packets received with CRC OK, but ignored + uint8_t nRxBufFull; //!< Number of packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet + ratmr_t timeStamp; //!< Time stamp of the last received packet } __RFC_STRUCT_ATTR; //! @} @@ -1029,20 +1111,21 @@ struct __RFC_STRUCT rfc_bleAdvOutput_s { //! @{ //! Output structure for scanner (CMD_BLE_SCANNER) -struct __RFC_STRUCT rfc_bleScannerOutput_s { - uint16_t nTxScanReq; //!< Number of transmitted SCAN_REQ packets - uint16_t nBackedOffScanReq; //!< Number of SCAN_REQ packets not sent due to backoff procedure - uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint16_t nRxScanRspOk; //!< Number of SCAN_RSP packets received with CRC OK and not ignored - uint16_t nRxScanRspIgnored; //!< Number of SCAN_RSP packets received with CRC OK, but ignored - uint16_t nRxScanRspNok; //!< Number of SCAN_RSP packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - uint8_t nRxScanRspBufFull; //!< Number of SCAN_RSP packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last successfully received ADV*_IND packet that was not ignored +struct __RFC_STRUCT rfc_bleScannerOutput_s +{ + uint16_t nTxScanReq; //!< Number of transmitted SCAN_REQ packets + uint16_t nBackedOffScanReq; //!< Number of SCAN_REQ packets not sent due to backoff procedure + uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint16_t nRxScanRspOk; //!< Number of SCAN_RSP packets received with CRC OK and not ignored + uint16_t nRxScanRspIgnored; //!< Number of SCAN_RSP packets received with CRC OK, but ignored + uint16_t nRxScanRspNok; //!< Number of SCAN_RSP packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + uint8_t nRxScanRspBufFull; //!< Number of SCAN_RSP packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last successfully received ADV*_IND packet that was not ignored } __RFC_STRUCT_ATTR; //! @} @@ -1051,14 +1134,15 @@ struct __RFC_STRUCT rfc_bleScannerOutput_s { //! @{ //! Output structure for initiator (CMD_BLE_INITIATOR) -struct __RFC_STRUCT rfc_bleInitiatorOutput_s { - uint8_t nTxConnectReq; //!< Number of transmitted CONNECT_REQ packets - uint8_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet - ratmr_t timeStamp; //!< Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_REQ +struct __RFC_STRUCT rfc_bleInitiatorOutput_s +{ + uint8_t nTxConnectReq; //!< Number of transmitted CONNECT_REQ packets + uint8_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet + ratmr_t timeStamp; //!< Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_REQ } __RFC_STRUCT_ATTR; //! @} @@ -1067,13 +1151,14 @@ struct __RFC_STRUCT rfc_bleInitiatorOutput_s { //! @{ //! Output structure for generic Rx (CMD_BLE_GENERIC_RX) -struct __RFC_STRUCT rfc_bleGenericRxOutput_s { - uint16_t nRxOk; //!< Number of packets received with CRC OK - uint16_t nRxNok; //!< Number of packets received with CRC error - uint16_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< The RSSI of the last received packet - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last received packet +struct __RFC_STRUCT rfc_bleGenericRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets received with CRC OK + uint16_t nRxNok; //!< Number of packets received with CRC error + uint16_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< The RSSI of the last received packet + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last received packet } __RFC_STRUCT_ATTR; //! @} @@ -1082,8 +1167,9 @@ struct __RFC_STRUCT rfc_bleGenericRxOutput_s { //! @{ //! Output structure for Tx test (CMD_BLE_TX_TEST) -struct __RFC_STRUCT rfc_bleTxTestOutput_s { - uint16_t nTx; //!< Number of packets transmitted +struct __RFC_STRUCT rfc_bleTxTestOutput_s +{ + uint16_t nTx; //!< Number of packets transmitted } __RFC_STRUCT_ATTR; //! @} @@ -1092,19 +1178,21 @@ struct __RFC_STRUCT rfc_bleTxTestOutput_s { //! @{ //! White list entry structure -struct __RFC_STRUCT rfc_bleWhiteListEntry_s { - uint8_t size; //!< Number of while list entries. Used in the first entry of the list only - struct { - uint8_t bEnable:1; //!< 1 if the entry is in use, 0 if the entry is not in use - uint8_t addrType:1; //!< The type address in the entry -- public (0) or random (1) - uint8_t bWlIgn:1; //!< \brief 1 if the entry is to be ignored by a scanner, 0 otherwise. Used to mask out - //!< entries that have already been scanned and reported. - uint8_t :1; - uint8_t bIrkValid:1; //!< \brief 1 if a valid IRK exists, so that the entry is to be ignored by an initiator, - //!< 0 otherwise - } conf; - uint16_t address; //!< Least significant 16 bits of the address contained in the entry - uint32_t addressHi; //!< Most significant 32 bits of the address contained in the entry +struct __RFC_STRUCT rfc_bleWhiteListEntry_s +{ + uint8_t size; //!< Number of while list entries. Used in the first entry of the list only + struct + { + uint8_t bEnable: 1; //!< 1 if the entry is in use, 0 if the entry is not in use + uint8_t addrType: 1; //!< The type address in the entry -- public (0) or random (1) + uint8_t bWlIgn: 1; //!< \brief 1 if the entry is to be ignored by a scanner, 0 otherwise. Used to mask out + //!< entries that have already been scanned and reported. + uint8_t : 1; + uint8_t bIrkValid: 1; //!< \brief 1 if a valid IRK exists, so that the entry is to be ignored by an initiator, + //!< 0 otherwise + } conf; + uint16_t address; //!< Least significant 16 bits of the address contained in the entry + uint32_t addressHi; //!< Most significant 32 bits of the address contained in the entry } __RFC_STRUCT_ATTR; //! @} @@ -1113,13 +1201,15 @@ struct __RFC_STRUCT rfc_bleWhiteListEntry_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_bleRxStatus_s { - struct { - uint8_t channel:6; //!< \brief The channel on which the packet was received, provided channel is in the range - //!< 0--39; otherwise 0x3F - uint8_t bIgnore:1; //!< 1 if the packet is marked as ignored, 0 otherwise - uint8_t bCrcErr:1; //!< 1 if the packet was received with CRC error, 0 otherwise - } status; +struct __RFC_STRUCT rfc_bleRxStatus_s +{ + struct + { + uint8_t channel: 6; //!< \brief The channel on which the packet was received, provided channel is in the range + //!< 0--39; otherwise 0x3F + uint8_t bIgnore: 1; //!< 1 if the packet is marked as ignored, 0 otherwise + uint8_t bCrcErr: 1; //!< 1 if the packet was received with CRC error, 0 otherwise + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_common_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_common_cmd.h index 0495d1c5..2eade2bf 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_common_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_common_cmd.h @@ -40,17 +40,17 @@ #define __COMMON_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -104,8 +104,9 @@ typedef struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s rfc_CMD_BUS_REQUEST_t; //! \addtogroup command //! @{ -struct __RFC_STRUCT rfc_command_s { - uint16_t commandNo; //!< The command ID number +struct __RFC_STRUCT rfc_command_s +{ + uint16_t commandNo; //!< The command ID number } __RFC_STRUCT_ATTR; //! @} @@ -114,25 +115,28 @@ struct __RFC_STRUCT rfc_command_s { //! @{ //! Common definition for radio operation commands -struct __RFC_STRUCT rfc_radioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_radioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -141,25 +145,28 @@ struct __RFC_STRUCT rfc_radioOp_s { //! @{ #define CMD_NOP 0x0801 //! No Operation Command -struct __RFC_STRUCT rfc_CMD_NOP_s { - uint16_t commandNo; //!< The command ID number 0x0801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_NOP_s +{ + uint16_t commandNo; //!< The command ID number 0x0801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -168,57 +175,61 @@ struct __RFC_STRUCT rfc_CMD_NOP_s { //! @{ #define CMD_RADIO_SETUP 0x0802 //! Radio Setup Command for Pre-Defined Schemes -struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x0802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t mode; //!< \brief The main mode to use
- //!< 0x00: BLE
- //!< 0x01: IEEE 802.15.4
- //!< 0x02: 2 Mbps GFSK
- //!< 0x05: 5 Mbps coded 8-FSK
- //!< 0xFF: Keep existing mode; update overrides only
- //!< Others: Reserved - uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0 (equivalent to 2), 2, - //!< 5, 6, 10, 12, 15, and 30.
- //!< Value of 0 or 2 only supported for CC1350 - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. +struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x0802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t mode; //!< \brief The main mode to use
+ //!< 0x00: BLE
+ //!< 0x01: IEEE 802.15.4
+ //!< 0x02: 2 Mbps GFSK
+ //!< 0x05: 5 Mbps coded 8-FSK
+ //!< 0xFF: Keep existing mode; update overrides only
+ //!< Others: Reserved + uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0 (equivalent to 2), 2, + //!< 5, 6, 10, 12, 15, and 30.
+ //!< Value of 0 or 2 only supported for CC1350 + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. } __RFC_STRUCT_ATTR; //! @} @@ -227,37 +238,41 @@ struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { //! @{ #define CMD_FS 0x0803 //! Frequency Synthesizer Programming Command -struct __RFC_STRUCT rfc_CMD_FS_s { - uint16_t commandNo; //!< The command ID number 0x0803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t frequency; //!< The frequency in MHz to tune to - uint16_t fractFreq; //!< Fractional part of the frequency to tune to - struct { - uint8_t bTxMode:1; //!< \brief 0: Start synth in RX mode
- //!< 1: Start synth in TX mode - uint8_t refFreq:6; //!< \brief 0: Use default reference frequency
- //!< Others: Use reference frequency 24 MHz/refFreq - } synthConf; - uint8_t __dummy0; //!< Reserved, always write 0 - uint8_t __dummy1; //!< Reserved - uint8_t __dummy2; //!< Reserved - uint16_t __dummy3; //!< Reserved +struct __RFC_STRUCT rfc_CMD_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t frequency; //!< The frequency in MHz to tune to + uint16_t fractFreq; //!< Fractional part of the frequency to tune to + struct + { + uint8_t bTxMode: 1; //!< \brief 0: Start synth in RX mode
+ //!< 1: Start synth in TX mode + uint8_t refFreq: 6; //!< \brief 0: Use default reference frequency
+ //!< Others: Use reference frequency 24 MHz/refFreq + } synthConf; + uint8_t __dummy0; //!< Reserved, always write 0 + uint8_t __dummy1; //!< Reserved + uint8_t __dummy2; //!< Reserved + uint16_t __dummy3; //!< Reserved } __RFC_STRUCT_ATTR; //! @} @@ -266,25 +281,28 @@ struct __RFC_STRUCT rfc_CMD_FS_s { //! @{ #define CMD_FS_OFF 0x0804 //! Command for Turning off Frequency Synthesizer -struct __RFC_STRUCT rfc_CMD_FS_OFF_s { - uint16_t commandNo; //!< The command ID number 0x0804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_FS_OFF_s +{ + uint16_t commandNo; //!< The command ID number 0x0804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -293,43 +311,48 @@ struct __RFC_STRUCT rfc_CMD_FS_OFF_s { //! @{ #define CMD_RX_TEST 0x0807 //! Receiver Test Command -struct __RFC_STRUCT rfc_CMD_RX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x0807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bEnaFifo:1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available
- //!< 1: Enable FIFO in modem -- the data must be read out by the application - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bNoSync:1; //!< \brief 0: Run sync search as normal for the configured mode
- //!< 1: Write correlation thresholds to the maximum value to avoid getting sync - } config; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - uint32_t syncWord; //!< Sync word to use for receiver - ratmr_t endTime; //!< Time to end the operation +struct __RFC_STRUCT rfc_CMD_RX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x0807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bEnaFifo: 1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available
+ //!< 1: Enable FIFO in modem -- the data must be read out by the application + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bNoSync: 1; //!< \brief 0: Run sync search as normal for the configured mode
+ //!< 1: Write correlation thresholds to the maximum value to avoid getting sync + } config; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + uint32_t syncWord; //!< Sync word to use for receiver + ratmr_t endTime; //!< Time to end the operation } __RFC_STRUCT_ATTR; //! @} @@ -338,48 +361,53 @@ struct __RFC_STRUCT rfc_CMD_RX_TEST_s { //! @{ #define CMD_TX_TEST 0x0808 //! Transmitter Test Command -struct __RFC_STRUCT rfc_CMD_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x0808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bUseCw:1; //!< \brief 0: Send modulated signal
- //!< 1: Send continuous wave - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t whitenMode:2; //!< \brief 0: No whitening
- //!< 1: Default whitening
- //!< 2: PRBS-15
- //!< 3: PRBS-32 - } config; - uint8_t __dummy0; - uint16_t txWord; //!< Value to send to the modem before whitening - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - uint32_t syncWord; //!< Sync word to use for transmitter - ratmr_t endTime; //!< Time to end the operation +struct __RFC_STRUCT rfc_CMD_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x0808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bUseCw: 1; //!< \brief 0: Send modulated signal
+ //!< 1: Send continuous wave + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t whitenMode: 2; //!< \brief 0: No whitening
+ //!< 1: Default whitening
+ //!< 2: PRBS-15
+ //!< 3: PRBS-32 + } config; + uint8_t __dummy0; + uint16_t txWord; //!< Value to send to the modem before whitening + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + uint32_t syncWord; //!< Sync word to use for transmitter + ratmr_t endTime; //!< Time to end the operation } __RFC_STRUCT_ATTR; //! @} @@ -388,28 +416,31 @@ struct __RFC_STRUCT rfc_CMD_TX_TEST_s { //! @{ #define CMD_SYNC_STOP_RAT 0x0809 //! Synchronize and Stop Radio Timer Command -struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero +struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero } __RFC_STRUCT_ATTR; //! @} @@ -418,28 +449,31 @@ struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { //! @{ #define CMD_SYNC_START_RAT 0x080A //! Synchrously Start Radio Timer Command -struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { - uint16_t commandNo; //!< The command ID number 0x080A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT +struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x080A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT } __RFC_STRUCT_ATTR; //! @} @@ -448,27 +482,30 @@ struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { //! @{ #define CMD_COUNT 0x080B //! Counter Command -struct __RFC_STRUCT rfc_CMD_COUNT_s { - uint16_t commandNo; //!< The command ID number 0x080B - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation - //!< differs if the result is zero +struct __RFC_STRUCT rfc_CMD_COUNT_s +{ + uint16_t commandNo; //!< The command ID number 0x080B + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation + //!< differs if the result is zero } __RFC_STRUCT_ATTR; //! @} @@ -477,27 +514,30 @@ struct __RFC_STRUCT rfc_CMD_COUNT_s { //! @{ #define CMD_FS_POWERUP 0x080C //! Power up Frequency Syntheszier Command -struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { - uint16_t commandNo; //!< The command ID number 0x080C - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. +struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s +{ + uint16_t commandNo; //!< The command ID number 0x080C + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. } __RFC_STRUCT_ATTR; //! @} @@ -506,25 +546,28 @@ struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { //! @{ #define CMD_FS_POWERDOWN 0x080D //! Power down Frequency Syntheszier Command -struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { - uint16_t commandNo; //!< The command ID number 0x080D - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s +{ + uint16_t commandNo; //!< The command ID number 0x080D + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -533,28 +576,31 @@ struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { //! @{ #define CMD_SCH_IMM 0x0810 //! Run Immidiate Command as Radio Operation Command -struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { - uint16_t commandNo; //!< The command ID number 0x0810 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - uint32_t cmdrVal; //!< Value as would be written to CMDR - uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA +struct __RFC_STRUCT rfc_CMD_SCH_IMM_s +{ + uint16_t commandNo; //!< The command ID number 0x0810 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + uint32_t cmdrVal; //!< Value as would be written to CMDR + uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA } __RFC_STRUCT_ATTR; //! @} @@ -563,28 +609,31 @@ struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { //! @{ #define CMD_COUNT_BRANCH 0x0812 //! Counter Command with Branch of Command Chain -struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { - uint16_t commandNo; //!< The command ID number 0x0812 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation - //!< differs if the result is zero - rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if counter did not expire +struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s +{ + uint16_t commandNo; //!< The command ID number 0x0812 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation + //!< differs if the result is zero + rfc_radioOp_t* pNextOpIfOk; //!< Pointer to next operation if counter did not expire } __RFC_STRUCT_ATTR; //! @} @@ -593,45 +642,49 @@ struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { //! @{ #define CMD_PATTERN_CHECK 0x0813 //! Command for Checking a Value in Memory aginst a Pattern -struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { - uint16_t commandNo; //!< The command ID number 0x0813 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t operation:2; //!< \brief Operation to perform
- //!< 0: True if value == compareVal
- //!< 1: True if value < compareVal
- //!< 2: True if value > compareVal
- //!< 3: Reserved - uint16_t bByteRev:1; //!< \brief If 1, interchange the four bytes of the value, so that they are read - //!< most-significant-byte-first. - uint16_t bBitRev:1; //!< If 1, perform bit reversal of the value - uint16_t signExtend:5; //!< \brief 0: Treat value and compareVal as unsigned
- //!< 1--31: Treat value and compareVal as signed, where the value - //!< gives the number of the most significant bit in the signed number. - uint16_t bRxVal:1; //!< \brief 0: Use pValue as a pointer
- //!< 1: Use pValue as a signed offset to the start of the last - //!< committed RX entry element - } patternOpt; //!< Options for comparison - rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if comparison result was true - uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if patternOpt.bRxVal == 1 - uint32_t mask; //!< Bit mask to apply before comparison - uint32_t compareVal; //!< Value to compare to +struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s +{ + uint16_t commandNo; //!< The command ID number 0x0813 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t operation: 2; //!< \brief Operation to perform
+ //!< 0: True if value == compareVal
+ //!< 1: True if value < compareVal
+ //!< 2: True if value > compareVal
+ //!< 3: Reserved + uint16_t bByteRev: 1; //!< \brief If 1, interchange the four bytes of the value, so that they are read + //!< most-significant-byte-first. + uint16_t bBitRev: 1; //!< If 1, perform bit reversal of the value + uint16_t signExtend: 5; //!< \brief 0: Treat value and compareVal as unsigned
+ //!< 1--31: Treat value and compareVal as signed, where the value + //!< gives the number of the most significant bit in the signed number. + uint16_t bRxVal: 1; //!< \brief 0: Use pValue as a pointer
+ //!< 1: Use pValue as a signed offset to the start of the last + //!< committed RX entry element + } patternOpt; //!< Options for comparison + rfc_radioOp_t* pNextOpIfOk; //!< Pointer to next operation if comparison result was true + uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if patternOpt.bRxVal == 1 + uint32_t mask; //!< Bit mask to apply before comparison + uint32_t compareVal; //!< Value to compare to } __RFC_STRUCT_ATTR; //! @} @@ -640,8 +693,9 @@ struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { //! @{ #define CMD_ABORT 0x0401 //! Abort Running Radio Operation Command -struct __RFC_STRUCT rfc_CMD_ABORT_s { - uint16_t commandNo; //!< The command ID number 0x0401 +struct __RFC_STRUCT rfc_CMD_ABORT_s +{ + uint16_t commandNo; //!< The command ID number 0x0401 } __RFC_STRUCT_ATTR; //! @} @@ -650,8 +704,9 @@ struct __RFC_STRUCT rfc_CMD_ABORT_s { //! @{ #define CMD_STOP 0x0402 //! Stop Running Radio Operation Command Gracefully -struct __RFC_STRUCT rfc_CMD_STOP_s { - uint16_t commandNo; //!< The command ID number 0x0402 +struct __RFC_STRUCT rfc_CMD_STOP_s +{ + uint16_t commandNo; //!< The command ID number 0x0402 } __RFC_STRUCT_ATTR; //! @} @@ -660,8 +715,9 @@ struct __RFC_STRUCT rfc_CMD_STOP_s { //! @{ #define CMD_GET_RSSI 0x0403 //! Read RSSI Command -struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { - uint16_t commandNo; //!< The command ID number 0x0403 +struct __RFC_STRUCT rfc_CMD_GET_RSSI_s +{ + uint16_t commandNo; //!< The command ID number 0x0403 } __RFC_STRUCT_ATTR; //! @} @@ -670,10 +726,11 @@ struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { //! @{ #define CMD_UPDATE_RADIO_SETUP 0x0001 //! Update Radio Settings Command -struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x0001 - uint16_t __dummy0; - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override +struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x0001 + uint16_t __dummy0; + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override } __RFC_STRUCT_ATTR; //! @} @@ -682,9 +739,10 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { //! @{ #define CMD_TRIGGER 0x0404 //! Generate Command Trigger -struct __RFC_STRUCT rfc_CMD_TRIGGER_s { - uint16_t commandNo; //!< The command ID number 0x0404 - uint8_t triggerNo; //!< Command trigger number +struct __RFC_STRUCT rfc_CMD_TRIGGER_s +{ + uint16_t commandNo; //!< The command ID number 0x0404 + uint8_t triggerNo; //!< Command trigger number } __RFC_STRUCT_ATTR; //! @} @@ -693,12 +751,13 @@ struct __RFC_STRUCT rfc_CMD_TRIGGER_s { //! @{ #define CMD_GET_FW_INFO 0x0002 //! Request Information on the RF Core ROM Firmware -struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { - uint16_t commandNo; //!< The command ID number 0x0002 - uint16_t versionNo; //!< Firmware version number - uint16_t startOffset; //!< The start of free RAM - uint16_t freeRamSz; //!< The size of free RAM - uint16_t availRatCh; //!< Bitmap of available RAT channels +struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s +{ + uint16_t commandNo; //!< The command ID number 0x0002 + uint16_t versionNo; //!< Firmware version number + uint16_t startOffset; //!< The start of free RAM + uint16_t freeRamSz; //!< The size of free RAM + uint16_t availRatCh; //!< Bitmap of available RAT channels } __RFC_STRUCT_ATTR; //! @} @@ -707,8 +766,9 @@ struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { //! @{ #define CMD_START_RAT 0x0405 //! Asynchronously Start Radio Timer Command -struct __RFC_STRUCT rfc_CMD_START_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0405 +struct __RFC_STRUCT rfc_CMD_START_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0405 } __RFC_STRUCT_ATTR; //! @} @@ -717,8 +777,9 @@ struct __RFC_STRUCT rfc_CMD_START_RAT_s { //! @{ #define CMD_PING 0x0406 //! Respond with Command ACK Only -struct __RFC_STRUCT rfc_CMD_PING_s { - uint16_t commandNo; //!< The command ID number 0x0406 +struct __RFC_STRUCT rfc_CMD_PING_s +{ + uint16_t commandNo; //!< The command ID number 0x0406 } __RFC_STRUCT_ATTR; //! @} @@ -727,10 +788,11 @@ struct __RFC_STRUCT rfc_CMD_PING_s { //! @{ #define CMD_READ_RFREG 0x0601 //! Read RF Core Hardware Register -struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { - uint16_t commandNo; //!< The command ID number 0x0601 - uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) - uint32_t value; //!< Returned value of the register +struct __RFC_STRUCT rfc_CMD_READ_RFREG_s +{ + uint16_t commandNo; //!< The command ID number 0x0601 + uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) + uint32_t value; //!< Returned value of the register } __RFC_STRUCT_ATTR; //! @} @@ -739,11 +801,12 @@ struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { //! @{ #define CMD_ADD_DATA_ENTRY 0x0005 //! Add Data Entry to Queue -struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { - uint16_t commandNo; //!< The command ID number 0x0005 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added - uint8_t* pEntry; //!< Pointer to the entry +struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s +{ + uint16_t commandNo; //!< The command ID number 0x0005 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added + uint8_t* pEntry; //!< Pointer to the entry } __RFC_STRUCT_ATTR; //! @} @@ -752,11 +815,12 @@ struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { //! @{ #define CMD_REMOVE_DATA_ENTRY 0x0006 //! Remove First Data Entry from Queue -struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { - uint16_t commandNo; //!< The command ID number 0x0006 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed - uint8_t* pEntry; //!< Pointer to the entry that was removed +struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s +{ + uint16_t commandNo; //!< The command ID number 0x0006 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed + uint8_t* pEntry; //!< Pointer to the entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -765,11 +829,12 @@ struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { //! @{ #define CMD_FLUSH_QUEUE 0x0007 //! Flush Data Queue -struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { - uint16_t commandNo; //!< The command ID number 0x0007 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed - uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed +struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s +{ + uint16_t commandNo; //!< The command ID number 0x0007 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed + uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -778,10 +843,11 @@ struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { //! @{ #define CMD_CLEAR_RX 0x0008 //! Clear all RX Queue Entries -struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { - uint16_t commandNo; //!< The command ID number 0x0008 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared +struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x0008 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared } __RFC_STRUCT_ATTR; //! @} @@ -790,11 +856,12 @@ struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { //! @{ #define CMD_REMOVE_PENDING_ENTRIES 0x0009 //! Remove Pending Entries from Queue -struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { - uint16_t commandNo; //!< The command ID number 0x0009 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed - uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed +struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s +{ + uint16_t commandNo; //!< The command ID number 0x0009 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed + uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -803,11 +870,12 @@ struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { //! @{ #define CMD_SET_RAT_CMP 0x000A //! Set Radio Timer Channel in Compare Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { - uint16_t commandNo; //!< The command ID number 0x000A - uint8_t ratCh; //!< The radio timer channel number - uint8_t __dummy0; - ratmr_t compareTime; //!< The time at which the compare occurs +struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s +{ + uint16_t commandNo; //!< The command ID number 0x000A + uint8_t ratCh; //!< The radio timer channel number + uint8_t __dummy0; + ratmr_t compareTime; //!< The time at which the compare occurs } __RFC_STRUCT_ATTR; //! @} @@ -816,20 +884,22 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { //! @{ #define CMD_SET_RAT_CPT 0x0603 //! Set Radio Timer Channel in Capture Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { - uint16_t commandNo; //!< The command ID number 0x0603 - struct { - uint16_t :3; - uint16_t inputSrc:5; //!< Input source indicator - uint16_t ratCh:4; //!< The radio timer channel number - uint16_t bRepeated:1; //!< \brief 0: Single capture mode
- //!< 1: Repeated capture mode - uint16_t inputMode:2; //!< \brief Input mode:
- //!< 0: Capture on rising edge
- //!< 1: Capture on falling edge
- //!< 2: Capture on both edges
- //!< 3: Reserved - } config; +struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s +{ + uint16_t commandNo; //!< The command ID number 0x0603 + struct + { + uint16_t : 3; + uint16_t inputSrc: 5; //!< Input source indicator + uint16_t ratCh: 4; //!< The radio timer channel number + uint16_t bRepeated: 1; //!< \brief 0: Single capture mode
+ //!< 1: Repeated capture mode + uint16_t inputMode: 2; //!< \brief Input mode:
+ //!< 0: Capture on rising edge
+ //!< 1: Capture on falling edge
+ //!< 2: Capture on both edges
+ //!< 3: Reserved + } config; } __RFC_STRUCT_ATTR; //! @} @@ -838,9 +908,10 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { //! @{ #define CMD_DISABLE_RAT_CH 0x0408 //! Disable Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x0408 - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x0408 + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -849,20 +920,22 @@ struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { //! @{ #define CMD_SET_RAT_OUTPUT 0x0604 //! Set Radio Timer Output to a Specified Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { - uint16_t commandNo; //!< The command ID number 0x0604 - struct { - uint16_t :2; - uint16_t outputSel:3; //!< Output event indicator - uint16_t outputMode:3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).
- //!< 1: Set output line high on event
- //!< 2: Set output line low on event
- //!< 3: Toggle (invert) output line state on event
- //!< 4: Immediately set output line to low (does not change upon event)
- //!< 5: Immediately set output line to high (does not change upon event)
- //!< Others: Reserved - uint16_t ratCh:4; //!< The radio timer channel number - } config; +struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s +{ + uint16_t commandNo; //!< The command ID number 0x0604 + struct + { + uint16_t : 2; + uint16_t outputSel: 3; //!< Output event indicator + uint16_t outputMode: 3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).
+ //!< 1: Set output line high on event
+ //!< 2: Set output line low on event
+ //!< 3: Toggle (invert) output line state on event
+ //!< 4: Immediately set output line to low (does not change upon event)
+ //!< 5: Immediately set output line to high (does not change upon event)
+ //!< Others: Reserved + uint16_t ratCh: 4; //!< The radio timer channel number + } config; } __RFC_STRUCT_ATTR; //! @} @@ -871,9 +944,10 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { //! @{ #define CMD_ARM_RAT_CH 0x0409 //! Arm Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x0409 - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x0409 + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -882,9 +956,10 @@ struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { //! @{ #define CMD_DISARM_RAT_CH 0x040A //! Disarm Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x040A - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x040A + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -893,9 +968,10 @@ struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { //! @{ #define CMD_SET_TX_POWER 0x0010 //! Set Transmit Power -struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { - uint16_t commandNo; //!< The command ID number 0x0010 - uint16_t txPower; //!< New TX power setting +struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s +{ + uint16_t commandNo; //!< The command ID number 0x0010 + uint16_t txPower; //!< New TX power setting } __RFC_STRUCT_ATTR; //! @} @@ -904,14 +980,15 @@ struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { //! @{ #define CMD_UPDATE_FS 0x0011 //! Set New Synthesizer Frequency without Recalibration -struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { - uint16_t commandNo; //!< The command ID number 0x0011 - uint16_t __dummy0; - uint32_t __dummy1; - uint32_t __dummy2; - uint16_t __dummy3; - uint16_t frequency; //!< The frequency in MHz to tune to, compensated for LO divider setting - uint16_t fractFreq; //!< Fractional part of the frequency to tune to +struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0011 + uint16_t __dummy0; + uint32_t __dummy1; + uint32_t __dummy2; + uint16_t __dummy3; + uint16_t frequency; //!< The frequency in MHz to tune to, compensated for LO divider setting + uint16_t fractFreq; //!< Fractional part of the frequency to tune to } __RFC_STRUCT_ATTR; //! @} @@ -920,10 +997,11 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { //! @{ #define CMD_BUS_REQUEST 0x040E //! Request System Bus to be Availbale -struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s { - uint16_t commandNo; //!< The command ID number 0x040E - uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep
- //!< 1: System bus access needed +struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s +{ + uint16_t commandNo; //!< The command ID number 0x040E + uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep
+ //!< 1: System bus access needed } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_data_entry.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_data_entry.h index 026ba9db..137b7b4b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_data_entry.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_data_entry.h @@ -40,17 +40,17 @@ #define __DATA_ENTRY_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -70,25 +70,27 @@ typedef struct __RFC_STRUCT rfc_dataEntryPartial_s rfc_dataEntryPartial_t; //! \addtogroup dataEntry //! @{ -struct __RFC_STRUCT rfc_dataEntry_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field +struct __RFC_STRUCT rfc_dataEntry_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field } __RFC_STRUCT_ATTR; //! @} @@ -97,26 +99,28 @@ struct __RFC_STRUCT rfc_dataEntry_s { //! @{ //! General data entry structure (type = 0) -struct __RFC_STRUCT rfc_dataEntryGeneral_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint8_t data; //!< First byte of the data array to be received or transmitted +struct __RFC_STRUCT rfc_dataEntryGeneral_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint8_t data; //!< First byte of the data array to be received or transmitted } __RFC_STRUCT_ATTR; //! @} @@ -125,28 +129,30 @@ struct __RFC_STRUCT rfc_dataEntryGeneral_s { //! @{ //! Multi-element data entry structure (type = 1) -struct __RFC_STRUCT rfc_dataEntryMulti_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint16_t numElements; //!< Number of entry elements committed in the entry - uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU - uint8_t rxData; //!< First byte of the data array of received data entry elements +struct __RFC_STRUCT rfc_dataEntryMulti_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint16_t numElements; //!< Number of entry elements committed in the entry + uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU + uint8_t rxData; //!< First byte of the data array of received data entry elements } __RFC_STRUCT_ATTR; //! @} @@ -155,26 +161,28 @@ struct __RFC_STRUCT rfc_dataEntryMulti_s { //! @{ //! Pointer data entry structure (type = 2) -struct __RFC_STRUCT rfc_dataEntryPointer_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted +struct __RFC_STRUCT rfc_dataEntryPointer_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted } __RFC_STRUCT_ATTR; //! @} @@ -183,33 +191,36 @@ struct __RFC_STRUCT rfc_dataEntryPointer_s { //! @{ //! Partial read data entry structure (type = 3) -struct __RFC_STRUCT rfc_dataEntryPartial_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - struct { - uint16_t numElements:13; //!< Number of entry elements committed in the entry - uint16_t bEntryOpen:1; //!< 1 if the entry contains an element that is still open for appending data - uint16_t bFirstCont:1; //!< 1 if the first element is a continuation of the last packet from the previous entry - uint16_t bLastCont:1; //!< 1 if the packet in the last element continues in the next entry - } pktStatus; - uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU - uint8_t rxData; //!< First byte of the data array of received data entry elements +struct __RFC_STRUCT rfc_dataEntryPartial_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + struct + { + uint16_t numElements: 13; //!< Number of entry elements committed in the entry + uint16_t bEntryOpen: 1; //!< 1 if the entry contains an element that is still open for appending data + uint16_t bFirstCont: 1; //!< 1 if the first element is a continuation of the last packet from the previous entry + uint16_t bLastCont: 1; //!< 1 if the packet in the last element continues in the next entry + } pktStatus; + uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU + uint8_t rxData; //!< First byte of the data array of received data entry elements } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_hs_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_hs_cmd.h index ce010159..78390e46 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_hs_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_hs_cmd.h @@ -40,17 +40,17 @@ #define __HS_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -72,37 +72,41 @@ typedef struct __RFC_STRUCT rfc_hsRxStatus_s rfc_hsRxStatus_t; //! @{ #define CMD_HS_TX 0x3841 //! High-Speed Transmit Command -struct __RFC_STRUCT rfc_CMD_HS_TX_s { - uint16_t commandNo; //!< The command ID number 0x3841 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Transmit length as first half-word - uint8_t bCheckQAtEnd:1; //!< \brief 0: Always end with HS_DONE_OK when packet has been transmitted
- //!< 1: Check if Tx queue is empty when packet has been transmitted - } pktConf; - uint8_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to Tx queue +struct __RFC_STRUCT rfc_CMD_HS_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x3841 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Transmit length as first half-word + uint8_t bCheckQAtEnd: 1; //!< \brief 0: Always end with HS_DONE_OK when packet has been transmitted
+ //!< 1: Check if Tx queue is empty when packet has been transmitted + } pktConf; + uint8_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to Tx queue } __RFC_STRUCT_ATTR; //! @} @@ -111,63 +115,69 @@ struct __RFC_STRUCT rfc_CMD_HS_TX_s { //! @{ #define CMD_HS_RX 0x3842 //! High-Speed Receive Command -struct __RFC_STRUCT rfc_CMD_HS_RX_s { - uint16_t commandNo; //!< The command ID number 0x3842 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bUseCrc:1; //!< \brief 0: Do not receive or check CRC
- //!< 1: Receive and check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t addressMode:2; //!< \brief 0: No address check
- //!< 1: Accept address0 and address1
- //!< 2: Accept address0, address1, and 0x0000
- //!< 3: Accept address0, address1, 0x0000, and 0xFFFF - } pktConf; - struct { - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bIncludeLen:1; //!< If 1, include the received length field in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise 3scard it - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConf; - uint16_t maxPktLen; //!< Packet length for fixed length; maximum packet length for variable length - uint16_t address0; //!< Address - uint16_t address1; //!< Address (set equal to address0 to accept only one address) - uint8_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - rfc_hsRxOutput_t *pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_HS_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3842 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bUseCrc: 1; //!< \brief 0: Do not receive or check CRC
+ //!< 1: Receive and check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t addressMode: 2; //!< \brief 0: No address check
+ //!< 1: Accept address0 and address1
+ //!< 2: Accept address0, address1, and 0x0000
+ //!< 3: Accept address0, address1, 0x0000, and 0xFFFF + } pktConf; + struct + { + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bIncludeLen: 1; //!< If 1, include the received length field in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise 3scard it + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConf; + uint16_t maxPktLen; //!< Packet length for fixed length; maximum packet length for variable length + uint16_t address0; //!< Address + uint16_t address1; //!< Address (set equal to address0 to accept only one address) + uint8_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + rfc_hsRxOutput_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -176,13 +186,14 @@ struct __RFC_STRUCT rfc_CMD_HS_RX_s { //! @{ //! Output structure for CMD_HS_RX -struct __RFC_STRUCT rfc_hsRxOutput_s { - uint16_t nRxOk; //!< Number of packets that have been received with CRC OK - uint16_t nRxNok; //!< Number of packets that have been received with CRC error - uint16_t nRxAborted; //!< Number of packets not received due to illegal length or address mismatch - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - ratmr_t timeStamp; //!< Time stamp of last received packet +struct __RFC_STRUCT rfc_hsRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets that have been received with CRC OK + uint16_t nRxNok; //!< Number of packets that have been received with CRC error + uint16_t nRxAborted; //!< Number of packets not received due to illegal length or address mismatch + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + ratmr_t timeStamp; //!< Time stamp of last received packet } __RFC_STRUCT_ATTR; //! @} @@ -191,16 +202,18 @@ struct __RFC_STRUCT rfc_hsRxOutput_s { //! @{ //! Receive status word that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_hsRxStatus_s { - struct { - uint16_t rssi:8; //!< RSSI of the received packet in dBm (signed) - uint16_t bCrcErr:1; //!< \brief 0: Packet received OK
- //!< 1: Packet received with CRC error - uint16_t addressInd:2; //!< \brief 0: Received address0 (or no address check)
- //!< 1: Received address1
- //!< 2: Received address 0x0000
- //!< 3: Received address 0xFFFF - } status; +struct __RFC_STRUCT rfc_hsRxStatus_s +{ + struct + { + uint16_t rssi: 8; //!< RSSI of the received packet in dBm (signed) + uint16_t bCrcErr: 1; //!< \brief 0: Packet received OK
+ //!< 1: Packet received with CRC error + uint16_t addressInd: 2; //!< \brief 0: Received address0 (or no address check)
+ //!< 1: Received address1
+ //!< 2: Received address 0x0000
+ //!< 3: Received address 0xFFFF + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_mailbox.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_mailbox.h index e22eef15..043fc4d5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_mailbox.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_mailbox.h @@ -61,9 +61,10 @@ typedef uint32_t ratmr_t; /// Type definition for a data queue -typedef struct { - uint8_t *pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue - uint8_t *pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue +typedef struct +{ + uint8_t* pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue + uint8_t* pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue } dataQueue_t; @@ -145,17 +146,17 @@ typedef struct { #define CMDSTA_IllegalPointer 0x81 ///< The pointer signaled in CMDR is not valid #define CMDSTA_UnknownCommand 0x82 ///< The command number in the command structure is unknown #define CMDSTA_UnknownDirCommand 0x83 ///< The command number for a direct command is unknown, or the - ///< command is not a direct command +///< command is not a direct command #define CMDSTA_ContextError 0x85 ///< An immediate or direct command was issued in a context - ///< where it is not supported +///< where it is not supported #define CMDSTA_SchedulingError 0x86 ///< A radio operation command was attempted to be scheduled - ///< while another operation was already running in the RF core +///< while another operation was already running in the RF core #define CMDSTA_ParError 0x87 ///< There were errors in the command parameters that are parsed - ///< on submission. +///< on submission. #define CMDSTA_QueueError 0x88 ///< An operation on a data entry queue was attempted that was - ///< not supported by the queue in its current state +///< not supported by the queue in its current state #define CMDSTA_QueueBusy 0x89 ///< An operation on a data entry was attempted while that entry - ///< was busy +///< was busy ///@} @@ -189,7 +190,7 @@ typedef struct { #define TRIG_REL_EVT2 9 ///< Trigs at a time relative to the context defined "Event 2" #define TRIG_EXTERNAL 10 ///< Trigs at an external event to the radio timer #define TRIG_PAST_BM 0x80 ///< Bitmask for setting pastTrig bit in order to trig immediately if - ///< trigger happened in the past +///< trigger happened in the past ///@} @@ -198,13 +199,13 @@ typedef struct { #define COND_ALWAYS 0 ///< Always run next command (except in case of Abort) #define COND_NEVER 1 ///< Never run next command #define COND_STOP_ON_FALSE 2 ///< Run next command if this command returned True, stop if it returned - ///< False +///< False #define COND_STOP_ON_TRUE 3 ///< Stop if this command returned True, run next command if it returned - ///< False +///< False #define COND_SKIP_ON_FALSE 4 ///< Run next command if this command returned True, skip a number of - ///< commands if it returned False +///< commands if it returned False #define COND_SKIP_ON_TRUE 5 ///< Skip a number of commands if this command returned True, run next - ///< command if it returned False +///< command if it returned False ///@} @@ -236,7 +237,7 @@ typedef struct { #define ERROR_PAR 0x0803 ///< Error in a command specific parameter #define ERROR_POINTER 0x0804 ///< Invalid pointer to next operation #define ERROR_CMDID 0x0805 ///< Next operation has a command ID that is undefined or not a radio - ///< operation command +///< operation command #define ERROR_WRONG_BG 0x0806 ///< FG level command not compatible with running BG level command #define ERROR_NO_SETUP 0x0807 ///< Operation using Rx or Tx attemted without CMD_RADIO_SETUP #define ERROR_NO_FS 0x0808 ///< Operation using Rx or Tx attemted without frequency synth configured @@ -273,56 +274,56 @@ typedef struct { ///@{ /// Macro for ADI half-size value-mask combination #define ADI_VAL_MASK(addr, mask, value) \ -(((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \ - ((((mask) & 0x0F) << 4) | ((value) & 0x0F))) + (((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \ + ((((mask) & 0x0F) << 4) | ((value) & 0x0F))) /// 32-bit write of 16-bit value #define HW_REG_OVERRIDE(addr, val) ((((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(val) << 16)) /// ADI register, full-size write #define ADI_REG_OVERRIDE(adiNo, addr, val) (2 | ((uint32_t)(val) << 16) | \ -(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) + (((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) /// 2 ADI registers, full-size write #define ADI_2REG_OVERRIDE(adiNo, addr, val, addr2, val2) \ -(2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \ -(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) + (2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \ + (((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) /// ADI register, half-size read-modify-write #define ADI_HALFREG_OVERRIDE(adiNo, addr, mask, val) (2 | (ADI_VAL_MASK(addr, mask, val) << 16) | \ -(((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) + (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) /// 2 ADI registers, half-size read-modify-write #define ADI_2HALFREG_OVERRIDE(adiNo, addr, mask, val, addr2, mask2, val2) \ -(2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \ -(ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) + (2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \ + (ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) /// 16-bit SW register as defined in radio_par_def.txt #define SW_REG_OVERRIDE(cmd, field, val) (3 | ((_POSITION_##cmd##_##field) << 4) | ((uint32_t)(val) << 16)) /// SW register as defined in radio_par_def.txt with added index (for use with registers > 16 bits). #define SW_REG_IND_OVERRIDE(cmd, field, offset, val) (3 | \ -(((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16)) + (((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16)) /// 8-bit SW register as defined in radio_par_def.txt #define SW_REG_BYTE_OVERRIDE(cmd, field, val) (0x8003 | ((_POSITION_##cmd##_##field) << 4) | \ -((uint32_t)(val) << 16)) + ((uint32_t)(val) << 16)) /// Two 8-bit SW registers as defined in radio_par_def.txt; the one given by field and the next byte. #define SW_REG_2BYTE_OVERRIDE(cmd, field, val0, val1) (3 | (((_POSITION_##cmd##_##field) & 0xFFFE) << 4) | \ - (((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24)) + (((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24)) #define HW16_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(length) << 16)) #define HW32_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | \ -((uint32_t)(length) << 16) | (1U << 30)) + ((uint32_t)(length) << 16) | (1U << 30)) #define ADI_ARRAY_OVERRIDE(adiNo, addr, bHalfSize, length) (1 | ((((addr) & 0x3F) << 2)) | \ -((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30)) + ((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30)) #define SW_ARRAY_OVERRIDE(cmd, firstfield, length) (1 | (((_POSITION_##cmd##_##firstfield)) << 2) | \ -((uint32_t)(length) << 16) | (3U << 30)) + ((uint32_t)(length) << 16) | (3U << 30)) #define MCE_RFE_OVERRIDE(bMceRam, mceRomBank, mceMode, bRfeRam, rfeRomBank, rfeMode) \ - (7 | ((!!(bMceRam)) << 8) | (((mceRomBank) & 0x07) << 9) | ((!!(bRfeRam)) << 12) | (((rfeRomBank) & 0x07) << 13) | \ - (((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24)) + (7 | ((!!(bMceRam)) << 8) | (((mceRomBank) & 0x07) << 9) | ((!!(bRfeRam)) << 12) | (((rfeRomBank) & 0x07) << 13) | \ + (((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24)) #define NEW_OVERRIDE_SEGMENT(address) (((((uintptr_t)(address)) & 0x03FFFFFC) << 6) | 0x000F | \ - (((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \ - (((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \ - (((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \ - (((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \ - (((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \ - (((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \ - (((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \ - (((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \ - 0x09) << 4)) // Use illegal value for illegal address range + (((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \ + (((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \ + (((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \ + (((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \ + (((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \ + (((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \ + (((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \ + (((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \ + 0x09) << 4)) // Use illegal value for illegal address range /// End of string for override register #define END_OVERRIDE 0xFFFFFFFF diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_prop_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_prop_cmd.h index 1e9280ff..173043bc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_prop_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rf_prop_cmd.h @@ -40,17 +40,17 @@ #define __PROP_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -80,41 +80,45 @@ typedef struct __RFC_STRUCT rfc_propRxStatus_s rfc_propRxStatus_t; //! \addtogroup carrierSense //! @{ -struct __RFC_STRUCT rfc_carrierSense_s { - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_carrierSense_s +{ + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -123,37 +127,41 @@ struct __RFC_STRUCT rfc_carrierSense_s { //! @{ #define CMD_PROP_TX 0x3801 //! Proprietary Mode Transmit Command -struct __RFC_STRUCT rfc_CMD_PROP_TX_s { - uint16_t commandNo; //!< The command ID number 0x3801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t :2; - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Transmit length as first byte - } pktConf; - uint8_t pktLen; //!< Packet length - uint32_t syncWord; //!< Sync word to transmit - uint8_t* pPkt; //!< Pointer to packet +struct __RFC_STRUCT rfc_CMD_PROP_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x3801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t : 2; + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Transmit length as first byte + } pktConf; + uint8_t pktLen; //!< Packet length + uint32_t syncWord; //!< Sync word to transmit + uint8_t* pPkt; //!< Pointer to packet } __RFC_STRUCT_ATTR; //! @} @@ -162,70 +170,76 @@ struct __RFC_STRUCT rfc_CMD_PROP_TX_s { //! @{ #define CMD_PROP_RX 0x3802 //! Proprietary Mode Receive Command -struct __RFC_STRUCT rfc_CMD_PROP_RX_s { - uint16_t commandNo; //!< The command ID number 0x3802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bChkAddress:1; //!< \brief 0: No address check
- //!< 1: Check address - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord; //!< Sync word to listen for - uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - uint8_t address0; //!< Address - uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept - //!< 0x00 as well) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_PROP_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bChkAddress: 1; //!< \brief 0: No address check
+ //!< 1: Check address + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord; //!< Sync word to listen for + uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + uint8_t address0; //!< Address + uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept + //!< 0x00 as well) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -234,62 +248,68 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_s { //! @{ #define CMD_PROP_TX_ADV 0x3803 //! Proprietary Mode Advanced Transmit Command -struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s { - uint16_t commandNo; //!< The command ID number 0x3803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t :2; - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bCrcIncSw:1; //!< \brief 0:Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - } pktConf; - uint8_t numHdrBits; //!< Number of bits in header (0--32) - uint16_t pktLen; //!< Packet length. 0: Unlimited - struct { - uint8_t bExtTxTrig:1; //!< \brief 0: Start packet on a fixed time from the command start trigger
- //!< 1: Start packet on an external trigger (input event to RAT) - uint8_t inputMode:2; //!< \brief Input mode if external trigger is used for TX start
- //!< 0: Rising edge
- //!< 1: Falling edge
- //!< 2: Both edges
- //!< 3: Reserved - uint8_t source:5; //!< RAT input event number used for capture if external trigger is used for TX start - } startConf; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } preTrigger; //!< Trigger for transition from preamble to sync word - ratmr_t preTime; //!< \brief Time used together with preTrigger for transition from preamble to sync - //!< word. If preTrigger.triggerType is set to "now", one preamble as - //!< configured in the setup will be sent. Otherwise, the preamble will be repeated until - //!< this trigger is observed. - uint32_t syncWord; //!< Sync word to transmit - uint8_t* pPkt; //!< Pointer to packet, or TX queue for unlimited length +struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x3803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t : 2; + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bCrcIncSw: 1; //!< \brief 0:Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + } pktConf; + uint8_t numHdrBits; //!< Number of bits in header (0--32) + uint16_t pktLen; //!< Packet length. 0: Unlimited + struct + { + uint8_t bExtTxTrig: 1; //!< \brief 0: Start packet on a fixed time from the command start trigger
+ //!< 1: Start packet on an external trigger (input event to RAT) + uint8_t inputMode: 2; //!< \brief Input mode if external trigger is used for TX start
+ //!< 0: Rising edge
+ //!< 1: Falling edge
+ //!< 2: Both edges
+ //!< 3: Reserved + uint8_t source: 5; //!< RAT input event number used for capture if external trigger is used for TX start + } startConf; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } preTrigger; //!< Trigger for transition from preamble to sync word + ratmr_t preTime; //!< \brief Time used together with preTrigger for transition from preamble to sync + //!< word. If preTrigger.triggerType is set to "now", one preamble as + //!< configured in the setup will be sent. Otherwise, the preamble will be repeated until + //!< this trigger is observed. + uint32_t syncWord; //!< Sync word to transmit + uint8_t* pPkt; //!< Pointer to packet, or TX queue for unlimited length } __RFC_STRUCT_ATTR; //! @} @@ -298,84 +318,92 @@ struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s { //! @{ #define CMD_PROP_RX_ADV 0x3804 //! Proprietary Mode Advanced Receive Command -struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s { - uint16_t commandNo; //!< The command ID number 0x3804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bCrcIncSw:1; //!< \brief 0: Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord0; //!< Sync word to listen for - uint32_t syncWord1; //!< Alternative sync word if non-zero - uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - struct { - uint16_t numHdrBits:6; //!< Number of bits in header (0--32) - uint16_t lenPos:5; //!< Position of length field in header (0--31) - uint16_t numLenBits:5; //!< Number of bits in length field (0--16) - } hdrConf; - struct { - uint16_t addrType:1; //!< \brief 0: Address after header
- //!< 1: Address in header - uint16_t addrSize:5; //!< \brief If addrType = 0: Address size in bytes
- //!< If addrType = 1: Address size in bits - uint16_t addrPos:5; //!< \brief If addrType = 1: Bit position of address in header
- //!< If addrType = 0: Non-zero to extend address with sync word identifier - uint16_t numAddr:5; //!< Number of addresses in address list - } addrConf; - int8_t lenOffset; //!< Signed value to add to length field - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - uint8_t* pAddr; //!< Pointer to address list - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x3804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bCrcIncSw: 1; //!< \brief 0: Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord0; //!< Sync word to listen for + uint32_t syncWord1; //!< Alternative sync word if non-zero + uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + struct + { + uint16_t numHdrBits: 6; //!< Number of bits in header (0--32) + uint16_t lenPos: 5; //!< Position of length field in header (0--31) + uint16_t numLenBits: 5; //!< Number of bits in length field (0--16) + } hdrConf; + struct + { + uint16_t addrType: 1; //!< \brief 0: Address after header
+ //!< 1: Address in header + uint16_t addrSize: 5; //!< \brief If addrType = 0: Address size in bytes
+ //!< If addrType = 1: Address size in bits + uint16_t addrPos: 5; //!< \brief If addrType = 1: Bit position of address in header
+ //!< If addrType = 0: Non-zero to extend address with sync word identifier + uint16_t numAddr: 5; //!< Number of addresses in address list + } addrConf; + int8_t lenOffset; //!< Signed value to add to length field + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + uint8_t* pAddr; //!< Pointer to address list + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -384,66 +412,73 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s { //! @{ #define CMD_PROP_CS 0x3805 //! Carrier Sense Command -struct __RFC_STRUCT rfc_CMD_PROP_CS_s { - uint16_t commandNo; //!< The command ID number 0x3805 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOffIdle:1; //!< \brief 0: Keep synth running if command ends with channel Idle
- //!< 1: Turn off synth if command ends with channel Idle - uint8_t bFsOffBusy:1; //!< \brief 0: Keep synth running if command ends with channel Busy
- //!< 1: Turn off synth if command ends with channel Busy - } csFsConf; - uint8_t __dummy0; - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_CMD_PROP_CS_s +{ + uint16_t commandNo; //!< The command ID number 0x3805 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOffIdle: 1; //!< \brief 0: Keep synth running if command ends with channel Idle
+ //!< 1: Turn off synth if command ends with channel Idle + uint8_t bFsOffBusy: 1; //!< \brief 0: Keep synth running if command ends with channel Busy
+ //!< 1: Turn off synth if command ends with channel Busy + } csFsConf; + uint8_t __dummy0; + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -452,97 +487,105 @@ struct __RFC_STRUCT rfc_CMD_PROP_CS_s { //! @{ #define CMD_PROP_RADIO_SETUP 0x3806 //! Proprietary Mode Radio Setup Command for 2.4 GHz (CC1350 Only) -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x3806 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< Others: Reserved - uint16_t deviation:13; //!< Deviation (250 Hz steps) - } modulation; - struct { - uint32_t preScale:4; //!< Prescaler value - uint32_t :4; - uint32_t rateWord:21; //!< Rate word - uint32_t decimMode:3; //!< \brief 0: Use automatic PDIF decimation
- //!< 1: Force PDIF decimation to 0
- //!< 3: Force PDIF decimation to 1
- //!< 5: Force PDIF decimation to 2
- //!< Others: Reserved - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< 8: Long range mode
- //!< 10: Manchester coded binary modulation
- //!< Others: Reserved - uint16_t :1; - uint16_t whitenMode:3; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved
- //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
- //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
- //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
- //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x3806 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< Others: Reserved + uint16_t deviation: 13; //!< Deviation (250 Hz steps) + } modulation; + struct + { + uint32_t preScale: 4; //!< Prescaler value + uint32_t : 4; + uint32_t rateWord: 21; //!< Rate word + uint32_t decimMode: 3; //!< \brief 0: Use automatic PDIF decimation
+ //!< 1: Force PDIF decimation to 0
+ //!< 3: Force PDIF decimation to 1
+ //!< 5: Force PDIF decimation to 2
+ //!< Others: Reserved + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< 8: Long range mode
+ //!< 10: Manchester coded binary modulation
+ //!< Others: Reserved + uint16_t : 1; + uint16_t whitenMode: 3; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved
+ //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
+ //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
+ //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
+ //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. } __RFC_STRUCT_ATTR; //! @} @@ -551,105 +594,113 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s { //! @{ #define CMD_PROP_RADIO_DIV_SETUP 0x3807 //! Proprietary Mode Radio Setup Command for All Frequency Bands -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x3807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< Others: Reserved - uint16_t deviation:13; //!< Deviation (250 Hz steps) - } modulation; - struct { - uint32_t preScale:4; //!< Prescaler value - uint32_t :4; - uint32_t rateWord:21; //!< Rate word - uint32_t decimMode:3; //!< \brief 0: Use automatic PDIF decimation
- //!< 1: Force PDIF decimation to 0
- //!< 3: Force PDIF decimation to 1
- //!< 5: Force PDIF decimation to 2
- //!< Others: Reserved - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< 8: Long range mode
- //!< 10: Manchester coded binary modulation
- //!< Others: Reserved - uint16_t :1; - uint16_t whitenMode:3; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved
- //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
- //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
- //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
- //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. - uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters. - //!< For a single channel RF system, this should be set equal to the RF frequency used. - //!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal - //!< to the center frequency of the frequency band used. - int16_t intFreq; //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same - //!< intermediate frequency if supported, otherwise 0.
- //!< 0x8000: Use default. - uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 2 (CC1350 only), 5, 6, 10, 12, 15, and 30 +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x3807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< Others: Reserved + uint16_t deviation: 13; //!< Deviation (250 Hz steps) + } modulation; + struct + { + uint32_t preScale: 4; //!< Prescaler value + uint32_t : 4; + uint32_t rateWord: 21; //!< Rate word + uint32_t decimMode: 3; //!< \brief 0: Use automatic PDIF decimation
+ //!< 1: Force PDIF decimation to 0
+ //!< 3: Force PDIF decimation to 1
+ //!< 5: Force PDIF decimation to 2
+ //!< Others: Reserved + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< 8: Long range mode
+ //!< 10: Manchester coded binary modulation
+ //!< Others: Reserved + uint16_t : 1; + uint16_t whitenMode: 3; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved
+ //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
+ //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
+ //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
+ //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. + uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters. + //!< For a single channel RF system, this should be set equal to the RF frequency used. + //!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal + //!< to the center frequency of the frequency band used. + int16_t intFreq; //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same + //!< intermediate frequency if supported, otherwise 0.
+ //!< 0x8000: Use default. + uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 2 (CC1350 only), 5, 6, 10, 12, 15, and 30 } __RFC_STRUCT_ATTR; //! @} @@ -658,104 +709,113 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s { //! @{ #define CMD_PROP_RX_SNIFF 0x3808 //! Proprietary Mode Receive Command with Sniff Mode -struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s { - uint16_t commandNo; //!< The command ID number 0x3808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bChkAddress:1; //!< \brief 0: No address check
- //!< 1: Check address - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord; //!< Sync word to listen for - uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - uint8_t address0; //!< Address - uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept - //!< 0x00 as well) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s +{ + uint16_t commandNo; //!< The command ID number 0x3808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bChkAddress: 1; //!< \brief 0: No address check
+ //!< 1: Check address + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord; //!< Sync word to listen for + uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + uint8_t address0; //!< Address + uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept + //!< 0x00 as well) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -764,118 +824,129 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s { //! @{ #define CMD_PROP_RX_ADV_SNIFF 0x3809 //! Proprietary Mode Advanced Receive Command with Sniff Mode -struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s { - uint16_t commandNo; //!< The command ID number 0x3809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bCrcIncSw:1; //!< \brief 0: Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord0; //!< Sync word to listen for - uint32_t syncWord1; //!< Alternative sync word if non-zero - uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - struct { - uint16_t numHdrBits:6; //!< Number of bits in header (0--32) - uint16_t lenPos:5; //!< Position of length field in header (0--31) - uint16_t numLenBits:5; //!< Number of bits in length field (0--16) - } hdrConf; - struct { - uint16_t addrType:1; //!< \brief 0: Address after header
- //!< 1: Address in header - uint16_t addrSize:5; //!< \brief If addrType = 0: Address size in bytes
- //!< If addrType = 1: Address size in bits - uint16_t addrPos:5; //!< \brief If addrType = 1: Bit position of address in header
- //!< If addrType = 0: Non-zero to extend address with sync word identifier - uint16_t numAddr:5; //!< Number of addresses in address list - } addrConf; - int8_t lenOffset; //!< Signed value to add to length field - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - uint8_t* pAddr; //!< Pointer to address list - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s +{ + uint16_t commandNo; //!< The command ID number 0x3809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bCrcIncSw: 1; //!< \brief 0: Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord0; //!< Sync word to listen for + uint32_t syncWord1; //!< Alternative sync word if non-zero + uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + struct + { + uint16_t numHdrBits: 6; //!< Number of bits in header (0--32) + uint16_t lenPos: 5; //!< Position of length field in header (0--31) + uint16_t numLenBits: 5; //!< Number of bits in length field (0--16) + } hdrConf; + struct + { + uint16_t addrType: 1; //!< \brief 0: Address after header
+ //!< 1: Address in header + uint16_t addrSize: 5; //!< \brief If addrType = 0: Address size in bytes
+ //!< If addrType = 1: Address size in bits + uint16_t addrPos: 5; //!< \brief If addrType = 1: Bit position of address in header
+ //!< If addrType = 0: Non-zero to extend address with sync word identifier + uint16_t numAddr: 5; //!< Number of addresses in address list + } addrConf; + int8_t lenOffset; //!< Signed value to add to length field + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + uint8_t* pAddr; //!< Pointer to address list + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -884,9 +955,10 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s { //! @{ #define CMD_PROP_SET_LEN 0x3401 //! Set Packet Length Command -struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s { - uint16_t commandNo; //!< The command ID number 0x3401 - uint16_t rxLen; //!< Payload length to use +struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s +{ + uint16_t commandNo; //!< The command ID number 0x3401 + uint16_t rxLen; //!< Payload length to use } __RFC_STRUCT_ATTR; //! @} @@ -895,8 +967,9 @@ struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s { //! @{ #define CMD_PROP_RESTART_RX 0x3402 //! Restart Packet Command -struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s { - uint16_t commandNo; //!< The command ID number 0x3402 +struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3402 } __RFC_STRUCT_ATTR; //! @} @@ -905,14 +978,15 @@ struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s { //! @{ //! Output structure for RX operations -struct __RFC_STRUCT rfc_propRxOutput_s { - uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored - uint16_t nRxNok; //!< Number of packets that have been received with CRC error - uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch - uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1 - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - ratmr_t timeStamp; //!< Time stamp of last received packet +struct __RFC_STRUCT rfc_propRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored + uint16_t nRxNok; //!< Number of packets that have been received with CRC error + uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch + uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1 + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + ratmr_t timeStamp; //!< Time stamp of last received packet } __RFC_STRUCT_ATTR; //! @} @@ -921,15 +995,17 @@ struct __RFC_STRUCT rfc_propRxOutput_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_propRxStatus_s { - struct { - uint8_t addressInd:5; //!< Index of address found (0 if not applicable) - uint8_t syncWordId:1; //!< 0 for primary sync word, 1 for alternate sync word - uint8_t result:2; //!< \brief 0: Packet received correctly, not ignored
- //!< 1: Packet received with CRC error
- //!< 2: Packet received correctly, but can be ignored
- //!< 3: Packet reception was aborted - } status; +struct __RFC_STRUCT rfc_propRxStatus_s +{ + struct + { + uint8_t addressInd: 5; //!< Index of address found (0 if not applicable) + uint8_t syncWordId: 1; //!< 0 for primary sync word, 1 for alternate sync word + uint8_t result: 2; //!< \brief 0: Packet received correctly, not ignored
+ //!< 1: Packet received with CRC error
+ //!< 2: Packet received correctly, but can be ignored
+ //!< 3: Packet reception was aborted + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rfc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rfc.h index 6ad3a442..a2377ced 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rfc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rfc.h @@ -71,11 +71,12 @@ extern "C" #include "rf_ble_cmd.h" // Definition of RFTRIM container -typedef struct { - uint32_t configIfAdc; - uint32_t configRfFrontend; - uint32_t configSynth; - uint32_t configMiscAdc; +typedef struct +{ + uint32_t configIfAdc; + uint32_t configRfFrontend; + uint32_t configSynth; + uint32_t configMiscAdc; } rfTrim_t; // Definition of maximum search depth used by the RFCOverrideUpdate function @@ -95,17 +96,17 @@ typedef struct { // //***************************************************************************** #if !defined(DOXYGEN) - #define RFCCpeIntGetAndClear NOROM_RFCCpeIntGetAndClear - #define RFCDoorbellSendTo NOROM_RFCDoorbellSendTo - #define RFCSynthPowerDown NOROM_RFCSynthPowerDown - #define RFCCpePatchReset NOROM_RFCCpePatchReset - #define RFCOverrideSearch NOROM_RFCOverrideSearch - #define RFCOverrideUpdate NOROM_RFCOverrideUpdate - #define RFCHwIntGetAndClear NOROM_RFCHwIntGetAndClear - #define RFCRfTrimRead NOROM_RFCRfTrimRead - #define RFCRfTrimSet NOROM_RFCRfTrimSet - #define RFCRTrim NOROM_RFCRTrim - #define RFCAdi3VcoLdoVoltageMode NOROM_RFCAdi3VcoLdoVoltageMode +#define RFCCpeIntGetAndClear NOROM_RFCCpeIntGetAndClear +#define RFCDoorbellSendTo NOROM_RFCDoorbellSendTo +#define RFCSynthPowerDown NOROM_RFCSynthPowerDown +#define RFCCpePatchReset NOROM_RFCCpePatchReset +#define RFCOverrideSearch NOROM_RFCOverrideSearch +#define RFCOverrideUpdate NOROM_RFCOverrideUpdate +#define RFCHwIntGetAndClear NOROM_RFCHwIntGetAndClear +#define RFCRfTrimRead NOROM_RFCRfTrimRead +#define RFCRfTrimSet NOROM_RFCRfTrimSet +#define RFCRTrim NOROM_RFCRTrim +#define RFCAdi3VcoLdoVoltageMode NOROM_RFCAdi3VcoLdoVoltageMode #endif //***************************************************************************** @@ -130,8 +131,8 @@ RFCClockEnable(void) { // Enable basic clocks to get the CPE run HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = RFC_PWR_PWMCLKEN_CPERAM - | RFC_PWR_PWMCLKEN_CPE - | RFC_PWR_PWMCLKEN_RFC; + | RFC_PWR_PWMCLKEN_CPE + | RFC_PWR_PWMCLKEN_RFC; } @@ -170,7 +171,7 @@ RFCCpeIntClear(uint32_t ui32Mask) do { HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) = ~ui32Mask; - }while(HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) & ui32Mask); + } while (HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) & ui32Mask); } @@ -353,7 +354,7 @@ extern void RFCCpePatchReset(void); // Function to search an override list for the provided pattern within the search depth. // //***************************************************************************** -extern uint8_t RFCOverrideSearch(const uint32_t *pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth); +extern uint8_t RFCOverrideSearch(const uint32_t* pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth); //***************************************************************************** @@ -361,7 +362,7 @@ extern uint8_t RFCOverrideSearch(const uint32_t *pOverride, const uint32_t patte //! Function to update override list // //***************************************************************************** -extern uint8_t RFCOverrideUpdate(rfc_radioOp_t *pOpSetup, uint32_t *pParams); +extern uint8_t RFCOverrideUpdate(rfc_radioOp_t* pOpSetup, uint32_t* pParams); //***************************************************************************** @@ -384,7 +385,7 @@ extern uint32_t RFCHwIntGetAndClear(uint32_t ui32Mask); //! Read RF trim from flash using CM3. // //***************************************************************************** -extern void RFCRfTrimRead(rfc_radioOp_t *pOpSetup, rfTrim_t* rfTrim); +extern void RFCRfTrimRead(rfc_radioOp_t* pOpSetup, rfTrim_t* rfTrim); //***************************************************************************** @@ -400,7 +401,7 @@ extern void RFCRfTrimSet(rfTrim_t* rfTrim); //! Check Override RTrim vs FCFG RTrim. // //***************************************************************************** -extern uint8_t RFCRTrim(rfc_radioOp_t *pOpSetup); +extern uint8_t RFCRTrim(rfc_radioOp_t* pOpSetup); //***************************************************************************** @@ -417,51 +418,51 @@ extern void RFCAdi3VcoLdoVoltageMode(bool bEnable); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_RFCCpeIntGetAndClear - #undef RFCCpeIntGetAndClear - #define RFCCpeIntGetAndClear ROM_RFCCpeIntGetAndClear - #endif - #ifdef ROM_RFCDoorbellSendTo - #undef RFCDoorbellSendTo - #define RFCDoorbellSendTo ROM_RFCDoorbellSendTo - #endif - #ifdef ROM_RFCSynthPowerDown - #undef RFCSynthPowerDown - #define RFCSynthPowerDown ROM_RFCSynthPowerDown - #endif - #ifdef ROM_RFCCpePatchReset - #undef RFCCpePatchReset - #define RFCCpePatchReset ROM_RFCCpePatchReset - #endif - #ifdef ROM_RFCOverrideSearch - #undef RFCOverrideSearch - #define RFCOverrideSearch ROM_RFCOverrideSearch - #endif - #ifdef ROM_RFCOverrideUpdate - #undef RFCOverrideUpdate - #define RFCOverrideUpdate ROM_RFCOverrideUpdate - #endif - #ifdef ROM_RFCHwIntGetAndClear - #undef RFCHwIntGetAndClear - #define RFCHwIntGetAndClear ROM_RFCHwIntGetAndClear - #endif - #ifdef ROM_RFCRfTrimRead - #undef RFCRfTrimRead - #define RFCRfTrimRead ROM_RFCRfTrimRead - #endif - #ifdef ROM_RFCRfTrimSet - #undef RFCRfTrimSet - #define RFCRfTrimSet ROM_RFCRfTrimSet - #endif - #ifdef ROM_RFCRTrim - #undef RFCRTrim - #define RFCRTrim ROM_RFCRTrim - #endif - #ifdef ROM_RFCAdi3VcoLdoVoltageMode - #undef RFCAdi3VcoLdoVoltageMode - #define RFCAdi3VcoLdoVoltageMode ROM_RFCAdi3VcoLdoVoltageMode - #endif +#include "../driverlib/rom.h" +#ifdef ROM_RFCCpeIntGetAndClear +#undef RFCCpeIntGetAndClear +#define RFCCpeIntGetAndClear ROM_RFCCpeIntGetAndClear +#endif +#ifdef ROM_RFCDoorbellSendTo +#undef RFCDoorbellSendTo +#define RFCDoorbellSendTo ROM_RFCDoorbellSendTo +#endif +#ifdef ROM_RFCSynthPowerDown +#undef RFCSynthPowerDown +#define RFCSynthPowerDown ROM_RFCSynthPowerDown +#endif +#ifdef ROM_RFCCpePatchReset +#undef RFCCpePatchReset +#define RFCCpePatchReset ROM_RFCCpePatchReset +#endif +#ifdef ROM_RFCOverrideSearch +#undef RFCOverrideSearch +#define RFCOverrideSearch ROM_RFCOverrideSearch +#endif +#ifdef ROM_RFCOverrideUpdate +#undef RFCOverrideUpdate +#define RFCOverrideUpdate ROM_RFCOverrideUpdate +#endif +#ifdef ROM_RFCHwIntGetAndClear +#undef RFCHwIntGetAndClear +#define RFCHwIntGetAndClear ROM_RFCHwIntGetAndClear +#endif +#ifdef ROM_RFCRfTrimRead +#undef RFCRfTrimRead +#define RFCRfTrimRead ROM_RFCRfTrimRead +#endif +#ifdef ROM_RFCRfTrimSet +#undef RFCRfTrimSet +#define RFCRfTrimSet ROM_RFCRfTrimSet +#endif +#ifdef ROM_RFCRTrim +#undef RFCRTrim +#define RFCRTrim ROM_RFCRTrim +#endif +#ifdef ROM_RFCAdi3VcoLdoVoltageMode +#undef RFCAdi3VcoLdoVoltageMode +#define RFCAdi3VcoLdoVoltageMode ROM_RFCAdi3VcoLdoVoltageMode +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom.h index 5206bd51..885b07ee 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom.h @@ -59,9 +59,9 @@ extern "C" #define ROM_HAPI_TABLE_ADDR 0x10000048 // ROM Hard-API function interface types -typedef uint32_t (* FPTR_CRC32_T) ( uint8_t* /* pui8Data */,\ - uint32_t /* ui32ByteCount */,\ - uint32_t /* ui32RepeatCount */); +typedef uint32_t (* FPTR_CRC32_T) ( uint8_t* /* pui8Data */, \ + uint32_t /* ui32ByteCount */, \ + uint32_t /* ui32RepeatCount */); typedef uint32_t (* FPTR_GETFLSIZE_T) ( void ); @@ -71,26 +71,26 @@ typedef uint32_t (* FPTR_RESERVED1_T) ( uint32_t ); typedef uint32_t (* FPTR_RESERVED2_T) ( void ); -typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t* ,\ - uint32_t ,\ - uint32_t ); +typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t*, \ + uint32_t, \ + uint32_t ); typedef void (* FPTR_RESETDEV_T) ( void ); -typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */,\ - uint16_t /* ui16WordCount */,\ - uint16_t /* ui16RepeatCount */); +typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */, \ + uint16_t /* ui16WordCount */, \ + uint16_t /* ui16RepeatCount */); -typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); typedef void (* FPTR_HFSOURCESAFESWITCH_T) ( void ); @@ -106,9 +106,9 @@ typedef void (* FPTR_ADCCOMPBIN_T) ( uint8_t /* ut8Signal typedef void (* FPTR_COMPBREF_T) ( uint8_t /* ut8Signal */); -extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer, - uint32_t ui32Address, - uint32_t ui32Count); +extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t* pui8DataBuffer, + uint32_t ui32Address, + uint32_t ui32Count); extern uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address); @@ -273,423 +273,423 @@ extern void SafeHapiAuxAdiSelect( FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal ); // AON_EVENT FUNCTIONS #define ROM_AONEventMcuWakeUpSet \ ((void (*)(uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[0]) + ROM_API_AON_EVENT_TABLE[0]) #define ROM_AONEventMcuWakeUpGet \ ((uint32_t (*)(uint32_t ui32MCUWUEvent)) \ - ROM_API_AON_EVENT_TABLE[1]) + ROM_API_AON_EVENT_TABLE[1]) #define ROM_AONEventAuxWakeUpSet \ ((void (*)(uint32_t ui32AUXWUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[2]) + ROM_API_AON_EVENT_TABLE[2]) #define ROM_AONEventAuxWakeUpGet \ ((uint32_t (*)(uint32_t ui32AUXWUEvent)) \ - ROM_API_AON_EVENT_TABLE[3]) + ROM_API_AON_EVENT_TABLE[3]) #define ROM_AONEventMcuSet \ ((void (*)(uint32_t ui32MCUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[4]) + ROM_API_AON_EVENT_TABLE[4]) #define ROM_AONEventMcuGet \ ((uint32_t (*)(uint32_t ui32MCUEvent)) \ - ROM_API_AON_EVENT_TABLE[5]) + ROM_API_AON_EVENT_TABLE[5]) // AON_WUC FUNCTIONS #define ROM_AONWUCAuxReset \ ((void (*)(void)) \ - ROM_API_AON_WUC_TABLE[3]) + ROM_API_AON_WUC_TABLE[3]) #define ROM_AONWUCRechargeCtrlConfigSet \ ((void (*)(bool bAdaptEnable, uint32_t ui32AdaptRate, uint32_t ui32Period, uint32_t ui32MaxPeriod)) \ - ROM_API_AON_WUC_TABLE[4]) + ROM_API_AON_WUC_TABLE[4]) #define ROM_AONWUCOscConfig \ ((void (*)(uint32_t ui32Period)) \ - ROM_API_AON_WUC_TABLE[5]) + ROM_API_AON_WUC_TABLE[5]) // AUX_TDC FUNCTIONS #define ROM_AUXTDCConfigSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32StartCondition, uint32_t ui32StopCondition)) \ - ROM_API_AUX_TDC_TABLE[0]) + ROM_API_AUX_TDC_TABLE[0]) #define ROM_AUXTDCMeasurementDone \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_AUX_TDC_TABLE[1]) + ROM_API_AUX_TDC_TABLE[1]) // AUX_WUC FUNCTIONS #define ROM_AUXWUCClockEnable \ ((void (*)(uint32_t ui32Clocks)) \ - ROM_API_AUX_WUC_TABLE[0]) + ROM_API_AUX_WUC_TABLE[0]) #define ROM_AUXWUCClockDisable \ ((void (*)(uint32_t ui32Clocks)) \ - ROM_API_AUX_WUC_TABLE[1]) + ROM_API_AUX_WUC_TABLE[1]) #define ROM_AUXWUCClockStatus \ ((uint32_t (*)(uint32_t ui32Clocks)) \ - ROM_API_AUX_WUC_TABLE[2]) + ROM_API_AUX_WUC_TABLE[2]) #define ROM_AUXWUCPowerCtrl \ ((void (*)(uint32_t ui32PowerMode)) \ - ROM_API_AUX_WUC_TABLE[3]) + ROM_API_AUX_WUC_TABLE[3]) // DDI FUNCTIONS #define ROM_DDI16BitWrite \ ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32WrData)) \ - ROM_API_DDI_TABLE[0]) + ROM_API_DDI_TABLE[0]) #define ROM_DDI16BitfieldWrite \ ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift, uint16_t ui32Data)) \ - ROM_API_DDI_TABLE[1]) + ROM_API_DDI_TABLE[1]) #define ROM_DDI16BitRead \ ((uint16_t (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask)) \ - ROM_API_DDI_TABLE[2]) + ROM_API_DDI_TABLE[2]) #define ROM_DDI16BitfieldRead \ ((uint16_t (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift)) \ - ROM_API_DDI_TABLE[3]) + ROM_API_DDI_TABLE[3]) // FLASH FUNCTIONS #define ROM_FlashPowerModeGet \ ((uint32_t (*)(void)) \ - ROM_API_FLASH_TABLE[1]) + ROM_API_FLASH_TABLE[1]) #define ROM_FlashProtectionSet \ ((void (*)(uint32_t ui32SectorAddress, uint32_t ui32ProtectMode)) \ - ROM_API_FLASH_TABLE[2]) + ROM_API_FLASH_TABLE[2]) #define ROM_FlashProtectionGet \ ((uint32_t (*)(uint32_t ui32SectorAddress)) \ - ROM_API_FLASH_TABLE[3]) + ROM_API_FLASH_TABLE[3]) #define ROM_FlashProtectionSave \ ((uint32_t (*)(uint32_t ui32SectorAddress)) \ - ROM_API_FLASH_TABLE[4]) + ROM_API_FLASH_TABLE[4]) #define ROM_FlashEfuseReadRow \ ((bool (*)(uint32_t *pui32EfuseData, uint32_t ui32RowAddress)) \ - ROM_API_FLASH_TABLE[8]) + ROM_API_FLASH_TABLE[8]) #define ROM_FlashDisableSectorsForWrite \ ((void (*)(void)) \ - ROM_API_FLASH_TABLE[9]) + ROM_API_FLASH_TABLE[9]) // I2C FUNCTIONS #define ROM_I2CMasterInitExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32I2CClk, bool bFast)) \ - ROM_API_I2C_TABLE[0]) + ROM_API_I2C_TABLE[0]) #define ROM_I2CMasterErr \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_I2C_TABLE[1]) + ROM_API_I2C_TABLE[1]) // INTERRUPT FUNCTIONS #define ROM_IntPriorityGroupingSet \ ((void (*)(uint32_t ui32Bits)) \ - ROM_API_INTERRUPT_TABLE[0]) + ROM_API_INTERRUPT_TABLE[0]) #define ROM_IntPriorityGroupingGet \ ((uint32_t (*)(void)) \ - ROM_API_INTERRUPT_TABLE[1]) + ROM_API_INTERRUPT_TABLE[1]) #define ROM_IntPrioritySet \ ((void (*)(uint32_t ui32Interrupt, uint8_t ui8Priority)) \ - ROM_API_INTERRUPT_TABLE[2]) + ROM_API_INTERRUPT_TABLE[2]) #define ROM_IntPriorityGet \ ((int32_t (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[3]) + ROM_API_INTERRUPT_TABLE[3]) #define ROM_IntEnable \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[4]) + ROM_API_INTERRUPT_TABLE[4]) #define ROM_IntDisable \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[5]) + ROM_API_INTERRUPT_TABLE[5]) #define ROM_IntPendSet \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[6]) + ROM_API_INTERRUPT_TABLE[6]) #define ROM_IntPendGet \ ((bool (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[7]) + ROM_API_INTERRUPT_TABLE[7]) #define ROM_IntPendClear \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[8]) + ROM_API_INTERRUPT_TABLE[8]) // IOC FUNCTIONS #define ROM_IOCPortConfigureSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId, uint32_t ui32IOConfig)) \ - ROM_API_IOC_TABLE[0]) + ROM_API_IOC_TABLE[0]) #define ROM_IOCPortConfigureGet \ ((uint32_t (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[1]) + ROM_API_IOC_TABLE[1]) #define ROM_IOCIOShutdownSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOShutdown)) \ - ROM_API_IOC_TABLE[2]) + ROM_API_IOC_TABLE[2]) #define ROM_IOCIOModeSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOMode)) \ - ROM_API_IOC_TABLE[4]) + ROM_API_IOC_TABLE[4]) #define ROM_IOCIOIntSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Int, uint32_t ui32EdgeDet)) \ - ROM_API_IOC_TABLE[5]) + ROM_API_IOC_TABLE[5]) #define ROM_IOCIOPortPullSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Pull)) \ - ROM_API_IOC_TABLE[6]) + ROM_API_IOC_TABLE[6]) #define ROM_IOCIOHystSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Hysteresis)) \ - ROM_API_IOC_TABLE[7]) + ROM_API_IOC_TABLE[7]) #define ROM_IOCIOInputSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Input)) \ - ROM_API_IOC_TABLE[8]) + ROM_API_IOC_TABLE[8]) #define ROM_IOCIOSlewCtrlSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32SlewEnable)) \ - ROM_API_IOC_TABLE[9]) + ROM_API_IOC_TABLE[9]) #define ROM_IOCIODrvStrengthSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOCurrent, uint32_t ui32DrvStrength)) \ - ROM_API_IOC_TABLE[10]) + ROM_API_IOC_TABLE[10]) #define ROM_IOCIOPortIdSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId)) \ - ROM_API_IOC_TABLE[11]) + ROM_API_IOC_TABLE[11]) #define ROM_IOCIntEnable \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[12]) + ROM_API_IOC_TABLE[12]) #define ROM_IOCIntDisable \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[13]) + ROM_API_IOC_TABLE[13]) #define ROM_IOCPinTypeGpioInput \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[14]) + ROM_API_IOC_TABLE[14]) #define ROM_IOCPinTypeGpioOutput \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[15]) + ROM_API_IOC_TABLE[15]) #define ROM_IOCPinTypeUart \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Cts, uint32_t ui32Rts)) \ - ROM_API_IOC_TABLE[16]) + ROM_API_IOC_TABLE[16]) #define ROM_IOCPinTypeSsiMaster \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[17]) + ROM_API_IOC_TABLE[17]) #define ROM_IOCPinTypeSsiSlave \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[18]) + ROM_API_IOC_TABLE[18]) #define ROM_IOCPinTypeI2c \ ((void (*)(uint32_t ui32Base, uint32_t ui32Data, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[19]) + ROM_API_IOC_TABLE[19]) #define ROM_IOCPinTypeAux \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[21]) + ROM_API_IOC_TABLE[21]) // PRCM FUNCTIONS #define ROM_PRCMInfClockConfigureSet \ ((void (*)(uint32_t ui32ClkDiv, uint32_t ui32PowerMode)) \ - ROM_API_PRCM_TABLE[0]) + ROM_API_PRCM_TABLE[0]) #define ROM_PRCMInfClockConfigureGet \ ((uint32_t (*)(uint32_t ui32PowerMode)) \ - ROM_API_PRCM_TABLE[1]) + ROM_API_PRCM_TABLE[1]) #define ROM_PRCMAudioClockConfigSet \ ((void (*)(uint32_t ui32ClkConfig, uint32_t ui32SampleRate)) \ - ROM_API_PRCM_TABLE[4]) + ROM_API_PRCM_TABLE[4]) #define ROM_PRCMPowerDomainOn \ ((void (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[5]) + ROM_API_PRCM_TABLE[5]) #define ROM_PRCMPowerDomainOff \ ((void (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[6]) + ROM_API_PRCM_TABLE[6]) #define ROM_PRCMPeripheralRunEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[7]) + ROM_API_PRCM_TABLE[7]) #define ROM_PRCMPeripheralRunDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[8]) + ROM_API_PRCM_TABLE[8]) #define ROM_PRCMPeripheralSleepEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[9]) + ROM_API_PRCM_TABLE[9]) #define ROM_PRCMPeripheralSleepDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[10]) + ROM_API_PRCM_TABLE[10]) #define ROM_PRCMPeripheralDeepSleepEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[11]) + ROM_API_PRCM_TABLE[11]) #define ROM_PRCMPeripheralDeepSleepDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[12]) + ROM_API_PRCM_TABLE[12]) #define ROM_PRCMPowerDomainStatus \ ((uint32_t (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[13]) + ROM_API_PRCM_TABLE[13]) #define ROM_PRCMDeepSleep \ ((void (*)(void)) \ - ROM_API_PRCM_TABLE[14]) + ROM_API_PRCM_TABLE[14]) // SMPH FUNCTIONS #define ROM_SMPHAcquire \ ((void (*)(uint32_t ui32Semaphore)) \ - ROM_API_SMPH_TABLE[0]) + ROM_API_SMPH_TABLE[0]) // SSI FUNCTIONS #define ROM_SSIConfigSetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32SSIClk, uint32_t ui32Protocol, uint32_t ui32Mode, uint32_t ui32BitRate, uint32_t ui32DataWidth)) \ - ROM_API_SSI_TABLE[0]) + ROM_API_SSI_TABLE[0]) #define ROM_SSIDataPut \ ((void (*)(uint32_t ui32Base, uint32_t ui32Data)) \ - ROM_API_SSI_TABLE[1]) + ROM_API_SSI_TABLE[1]) #define ROM_SSIDataPutNonBlocking \ ((int32_t (*)(uint32_t ui32Base, uint32_t ui32Data)) \ - ROM_API_SSI_TABLE[2]) + ROM_API_SSI_TABLE[2]) #define ROM_SSIDataGet \ ((void (*)(uint32_t ui32Base, uint32_t *pui32Data)) \ - ROM_API_SSI_TABLE[3]) + ROM_API_SSI_TABLE[3]) #define ROM_SSIDataGetNonBlocking \ ((int32_t (*)(uint32_t ui32Base, uint32_t *pui32Data)) \ - ROM_API_SSI_TABLE[4]) + ROM_API_SSI_TABLE[4]) // TIMER FUNCTIONS #define ROM_TimerConfigure \ ((void (*)(uint32_t ui32Base, uint32_t ui32Config)) \ - ROM_API_TIMER_TABLE[0]) + ROM_API_TIMER_TABLE[0]) #define ROM_TimerLevelControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bInvert)) \ - ROM_API_TIMER_TABLE[1]) + ROM_API_TIMER_TABLE[1]) #define ROM_TimerStallControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bStall)) \ - ROM_API_TIMER_TABLE[3]) + ROM_API_TIMER_TABLE[3]) #define ROM_TimerWaitOnTriggerControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bWait)) \ - ROM_API_TIMER_TABLE[4]) + ROM_API_TIMER_TABLE[4]) // TRNG FUNCTIONS #define ROM_TRNGNumberGet \ ((uint32_t (*)(uint32_t ui32Word)) \ - ROM_API_TRNG_TABLE[1]) + ROM_API_TRNG_TABLE[1]) // UART FUNCTIONS #define ROM_UARTFIFOLevelGet \ ((void (*)(uint32_t ui32Base, uint32_t *pui32TxLevel, uint32_t *pui32RxLevel)) \ - ROM_API_UART_TABLE[0]) + ROM_API_UART_TABLE[0]) #define ROM_UARTConfigSetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t ui32Baud, uint32_t ui32Config)) \ - ROM_API_UART_TABLE[1]) + ROM_API_UART_TABLE[1]) #define ROM_UARTConfigGetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t *pui32Baud, uint32_t *pui32Config)) \ - ROM_API_UART_TABLE[2]) + ROM_API_UART_TABLE[2]) #define ROM_UARTDisable \ ((void (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[3]) + ROM_API_UART_TABLE[3]) #define ROM_UARTCharGetNonBlocking \ ((int32_t (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[4]) + ROM_API_UART_TABLE[4]) #define ROM_UARTCharGet \ ((int32_t (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[5]) + ROM_API_UART_TABLE[5]) #define ROM_UARTCharPutNonBlocking \ ((bool (*)(uint32_t ui32Base, uint8_t ui8Data)) \ - ROM_API_UART_TABLE[6]) + ROM_API_UART_TABLE[6]) #define ROM_UARTCharPut \ ((void (*)(uint32_t ui32Base, uint8_t ui8Data)) \ - ROM_API_UART_TABLE[7]) + ROM_API_UART_TABLE[7]) // UDMA FUNCTIONS #define ROM_uDMAChannelAttributeEnable \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \ - ROM_API_UDMA_TABLE[0]) + ROM_API_UDMA_TABLE[0]) #define ROM_uDMAChannelAttributeDisable \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \ - ROM_API_UDMA_TABLE[1]) + ROM_API_UDMA_TABLE[1]) #define ROM_uDMAChannelAttributeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelNum)) \ - ROM_API_UDMA_TABLE[2]) + ROM_API_UDMA_TABLE[2]) #define ROM_uDMAChannelControlSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, uint32_t ui32Control)) \ - ROM_API_UDMA_TABLE[3]) + ROM_API_UDMA_TABLE[3]) #define ROM_uDMAChannelScatterGatherSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, void *pvTaskList, uint32_t ui32IsPeriphSG)) \ - ROM_API_UDMA_TABLE[5]) + ROM_API_UDMA_TABLE[5]) #define ROM_uDMAChannelSizeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \ - ROM_API_UDMA_TABLE[6]) + ROM_API_UDMA_TABLE[6]) #define ROM_uDMAChannelModeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \ - ROM_API_UDMA_TABLE[7]) + ROM_API_UDMA_TABLE[7]) // VIMS FUNCTIONS #define ROM_VIMSConfigure \ ((void (*)(uint32_t ui32Base, bool bRoundRobin, bool bPrefetch)) \ - ROM_API_VIMS_TABLE[0]) + ROM_API_VIMS_TABLE[0]) #define ROM_VIMSModeSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32Mode)) \ - ROM_API_VIMS_TABLE[1]) + ROM_API_VIMS_TABLE[1]) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom_crypto.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom_crypto.h index cfec1dbe..89744069 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom_crypto.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/rom_crypto.h @@ -67,7 +67,7 @@ extern "C" * \return None */ //***************************************************************************** -extern void AES_ECB_EncryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey); +extern void AES_ECB_EncryptData(uint8_t* text, uint16_t textLen, uint8_t* aesKey); //***************************************************************************** /*! @@ -81,7 +81,7 @@ extern void AES_ECB_EncryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey * \return None */ //***************************************************************************** -extern void AES_ECB_DecryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey); +extern void AES_ECB_DecryptData(uint8_t* text, uint16_t textLen, uint8_t* aesKey); //***************************************************************************** /*! @@ -103,10 +103,10 @@ extern void AES_ECB_DecryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey * \return Zero when successful. */ //***************************************************************************** -extern int8_t AES_CCM_EncryptData(uint8_t encryptFlag, uint8_t MACLen, uint8_t *nonce, - uint8_t *plainText, uint16_t textLen, - uint8_t *addDataBuf, uint16_t addBufLen, - uint8_t *aesKey, uint8_t *MAC, uint8_t ccmLVal); +extern int8_t AES_CCM_EncryptData(uint8_t encryptFlag, uint8_t MACLen, uint8_t* nonce, + uint8_t* plainText, uint16_t textLen, + uint8_t* addDataBuf, uint16_t addBufLen, + uint8_t* aesKey, uint8_t* MAC, uint8_t ccmLVal); //***************************************************************************** /*! @@ -128,10 +128,10 @@ extern int8_t AES_CCM_EncryptData(uint8_t encryptFlag, uint8_t MACLen, uint8_t * * \return Zero when Successful. */ //***************************************************************************** -extern int8_t AES_CCM_DecryptData(uint8_t decryptFlag, uint8_t MACLen, uint8_t *nonce, - uint8_t *cipherText, uint16_t textLen, - uint8_t *addDataBuf, uint16_t addBufLen, - uint8_t *aesKey, uint8_t *MAC, uint8_t ccmLVal); +extern int8_t AES_CCM_DecryptData(uint8_t decryptFlag, uint8_t MACLen, uint8_t* nonce, + uint8_t* cipherText, uint16_t textLen, + uint8_t* addDataBuf, uint16_t addBufLen, + uint8_t* aesKey, uint8_t* MAC, uint8_t ccmLVal); //***************************************************************************** /*! @@ -146,9 +146,9 @@ extern int8_t AES_CCM_DecryptData(uint8_t decryptFlag, uint8_t MACLen, uint8_t * * \return None */ //***************************************************************************** -extern uint8_t AES_CTR_EncryptData(uint8_t *plainText, uint16_t textLen, - uint8_t *aesKey, uint8_t *nonce, - uint8_t *initVector); +extern uint8_t AES_CTR_EncryptData(uint8_t* plainText, uint16_t textLen, + uint8_t* aesKey, uint8_t* nonce, + uint8_t* initVector); //***************************************************************************** /*! @@ -163,9 +163,9 @@ extern uint8_t AES_CTR_EncryptData(uint8_t *plainText, uint16_t textLen, * \return None */ //***************************************************************************** -extern uint8_t AES_CTR_DecryptData(uint8_t *cipherText, uint16_t textLen, - uint8_t *aesKey, uint8_t *nonce, - uint8_t *initVector); +extern uint8_t AES_CTR_DecryptData(uint8_t* cipherText, uint16_t textLen, + uint8_t* aesKey, uint8_t* nonce, + uint8_t* initVector); ////////////////////////////////////* ECC *///////////////////////////////////// @@ -239,24 +239,24 @@ extern uint8_t AES_CTR_DecryptData(uint8_t *cipherText, uint16_t textLen, * \return None */ //***************************************************************************** - extern void ECC_initialize(uint32_t *pWorkzone); +extern void ECC_initialize(uint32_t* pWorkzone); //***************************************************************************** - /*! - * \brief Generate a key. - * - * This is used for both ECDH and ECDSA. - * - * \param randString Pointer to random string, input. - * \param privateKey Pointer to the private key, output. - * \param publicKey_x Pointer to public key X-coordinate, output. - * \param publicKey_y Pointer to public key Y-coordinate, output. - * - * \return Status - */ +/*! +* \brief Generate a key. +* +* This is used for both ECDH and ECDSA. +* +* \param randString Pointer to random string, input. +* \param privateKey Pointer to the private key, output. +* \param publicKey_x Pointer to public key X-coordinate, output. +* \param publicKey_y Pointer to public key Y-coordinate, output. +* +* \return Status +*/ //***************************************************************************** -extern uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey, - uint32_t *publicKey_x, uint32_t *publicKey_y); +extern uint8_t ECC_generateKey(uint32_t* randString, uint32_t* privateKey, + uint32_t* publicKey_x, uint32_t* publicKey_y); //***************************************************************************** /*! @@ -271,8 +271,8 @@ extern uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey, * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *randString, - uint32_t *sign1, uint32_t *sign2); +extern uint8_t ECC_ECDSA_sign(uint32_t* secretKey, uint32_t* text, uint32_t* randString, + uint32_t* sign1, uint32_t* sign2); //***************************************************************************** /*! @@ -287,8 +287,8 @@ extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *ran * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y, - uint32_t *text, uint32_t *sign1, uint32_t *sign2); +extern uint8_t ECC_ECDSA_verify(uint32_t* publicKey_x, uint32_t* publicKey_y, + uint32_t* text, uint32_t* sign1, uint32_t* sign2); //***************************************************************************** /*! @@ -303,11 +303,11 @@ extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y, * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t *privateKey, - uint32_t *publicKey_x, - uint32_t *publicKey_y, - uint32_t *sharedSecret_x, - uint32_t *sharedSecret_y); +extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t* privateKey, + uint32_t* publicKey_x, + uint32_t* publicKey_y, + uint32_t* sharedSecret_x, + uint32_t* sharedSecret_y); ///////////////////////////////////* SHA-256 *////////////////////////////////// @@ -316,9 +316,9 @@ extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t *privateKey, //! SHA256 functions. typedef struct { - uint32_t state[8]; - uint32_t textLen[2]; - uint32_t W[16]; + uint32_t state[8]; + uint32_t textLen[2]; + uint32_t W[16]; } SHA256_memory_t; //***************************************************************************** @@ -337,8 +337,8 @@ typedef struct * \return Status */ //***************************************************************************** -extern uint8_t SHA256_runFullAlgorithm(SHA256_memory_t *memory, uint8_t *pBufIn, - uint32_t bufLen, uint8_t *pBufOut); +extern uint8_t SHA256_runFullAlgorithm(SHA256_memory_t* memory, uint8_t* pBufIn, + uint32_t bufLen, uint8_t* pBufOut); //***************************************************************************** /*! @@ -352,7 +352,7 @@ extern uint8_t SHA256_runFullAlgorithm(SHA256_memory_t *memory, uint8_t *pBufIn, * \return Status */ //***************************************************************************** -extern uint8_t SHA256_initialize(SHA256_memory_t *workZone); +extern uint8_t SHA256_initialize(SHA256_memory_t* workZone); //***************************************************************************** /*! @@ -367,7 +367,7 @@ extern uint8_t SHA256_initialize(SHA256_memory_t *workZone); * \return Status */ //***************************************************************************** -extern uint8_t SHA256_execute(SHA256_memory_t *config, uint8_t *pBufIn, +extern uint8_t SHA256_execute(SHA256_memory_t* config, uint8_t* pBufIn, uint32_t bufLen); //***************************************************************************** @@ -380,7 +380,7 @@ extern uint8_t SHA256_execute(SHA256_memory_t *config, uint8_t *pBufIn, * \return Status */ //***************************************************************************** -extern uint8_t SHA256_output(SHA256_memory_t *memory, uint8_t *pBufOut); +extern uint8_t SHA256_output(SHA256_memory_t* memory, uint8_t* pBufOut); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup.h index 496b17a6..923bc710 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup.h @@ -78,7 +78,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SetupTrimDevice NOROM_SetupTrimDevice +#define SetupTrimDevice NOROM_SetupTrimDevice #endif //***************************************************************************** @@ -114,11 +114,11 @@ extern void SetupTrimDevice( void ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SetupTrimDevice - #undef SetupTrimDevice - #define SetupTrimDevice ROM_SetupTrimDevice - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SetupTrimDevice +#undef SetupTrimDevice +#define SetupTrimDevice ROM_SetupTrimDevice +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup_rom.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup_rom.h index 43cfc38e..74c75dad 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup_rom.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/setup_rom.h @@ -78,26 +78,26 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn - #define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn - #define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl - #define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1 - #define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2 - #define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1 - #define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage - #define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg - #define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim - #define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl - #define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart - #define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm - #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting - #define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc - #define SetupSetVddrLevel NOROM_SetupSetVddrLevel +#define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn +#define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn +#define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl +#define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1 +#define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2 +#define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1 +#define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage +#define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg +#define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim +#define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl +#define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart +#define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm +#define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting +#define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc +#define SetupSetVddrLevel NOROM_SetupSetVddrLevel #endif //***************************************************************************** @@ -319,9 +319,12 @@ SetupSignExtendVddrTrimValue( uint32_t ui32VddrTrimVal ) // The VDDR trim value is 5 bits representing the range from -10 to +21 // (where -10=0x16, -1=0x1F, 0=0x00, 1=0x01 and +21=0x15) int32_t i32SignedVddrVal = ui32VddrTrimVal; - if ( i32SignedVddrVal > 0x15 ) { + + if ( i32SignedVddrVal > 0x15 ) + { i32SignedVddrVal -= 0x20; } + return ( i32SignedVddrVal ); } @@ -364,87 +367,87 @@ extern void SetupSetVddrLevel( uint32_t ccfg_ModeConfReg ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #undef SetupAfterColdResetWakeupFromShutDownCfg1 - #define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #endif - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #undef SetupAfterColdResetWakeupFromShutDownCfg2 - #define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #endif - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #undef SetupAfterColdResetWakeupFromShutDownCfg3 - #define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #endif - #ifdef ROM_SetupGetTrimForAdcShModeEn - #undef SetupGetTrimForAdcShModeEn - #define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn - #endif - #ifdef ROM_SetupGetTrimForAdcShVbufEn - #undef SetupGetTrimForAdcShVbufEn - #define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn - #endif - #ifdef ROM_SetupGetTrimForAmpcompCtrl - #undef SetupGetTrimForAmpcompCtrl - #define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl - #endif - #ifdef ROM_SetupGetTrimForAmpcompTh1 - #undef SetupGetTrimForAmpcompTh1 - #define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1 - #endif - #ifdef ROM_SetupGetTrimForAmpcompTh2 - #undef SetupGetTrimForAmpcompTh2 - #define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2 - #endif - #ifdef ROM_SetupGetTrimForAnabypassValue1 - #undef SetupGetTrimForAnabypassValue1 - #define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1 - #endif - #ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage - #undef SetupGetTrimForDblrLoopFilterResetVoltage - #define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage - #endif - #ifdef ROM_SetupGetTrimForRadcExtCfg - #undef SetupGetTrimForRadcExtCfg - #define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg - #endif - #ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim - #undef SetupGetTrimForRcOscLfIBiasTrim - #define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim - #endif - #ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #undef SetupGetTrimForRcOscLfRtuneCtuneTrim - #define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #endif - #ifdef ROM_SetupGetTrimForXoscHfCtl - #undef SetupGetTrimForXoscHfCtl - #define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl - #endif - #ifdef ROM_SetupGetTrimForXoscHfFastStart - #undef SetupGetTrimForXoscHfFastStart - #define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart - #endif - #ifdef ROM_SetupGetTrimForXoscHfIbiastherm - #undef SetupGetTrimForXoscHfIbiastherm - #define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm - #endif - #ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #endif - #ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting - #undef SetupSetCacheModeAccordingToCcfgSetting - #define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting - #endif - #ifdef ROM_SetupSetAonRtcSubSecInc - #undef SetupSetAonRtcSubSecInc - #define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc - #endif - #ifdef ROM_SetupSetVddrLevel - #undef SetupSetVddrLevel - #define SetupSetVddrLevel ROM_SetupSetVddrLevel - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#undef SetupAfterColdResetWakeupFromShutDownCfg1 +#define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#endif +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#undef SetupAfterColdResetWakeupFromShutDownCfg2 +#define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#endif +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#undef SetupAfterColdResetWakeupFromShutDownCfg3 +#define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#endif +#ifdef ROM_SetupGetTrimForAdcShModeEn +#undef SetupGetTrimForAdcShModeEn +#define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn +#endif +#ifdef ROM_SetupGetTrimForAdcShVbufEn +#undef SetupGetTrimForAdcShVbufEn +#define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn +#endif +#ifdef ROM_SetupGetTrimForAmpcompCtrl +#undef SetupGetTrimForAmpcompCtrl +#define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl +#endif +#ifdef ROM_SetupGetTrimForAmpcompTh1 +#undef SetupGetTrimForAmpcompTh1 +#define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1 +#endif +#ifdef ROM_SetupGetTrimForAmpcompTh2 +#undef SetupGetTrimForAmpcompTh2 +#define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2 +#endif +#ifdef ROM_SetupGetTrimForAnabypassValue1 +#undef SetupGetTrimForAnabypassValue1 +#define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1 +#endif +#ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage +#undef SetupGetTrimForDblrLoopFilterResetVoltage +#define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage +#endif +#ifdef ROM_SetupGetTrimForRadcExtCfg +#undef SetupGetTrimForRadcExtCfg +#define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg +#endif +#ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim +#undef SetupGetTrimForRcOscLfIBiasTrim +#define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim +#endif +#ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#undef SetupGetTrimForRcOscLfRtuneCtuneTrim +#define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#endif +#ifdef ROM_SetupGetTrimForXoscHfCtl +#undef SetupGetTrimForXoscHfCtl +#define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl +#endif +#ifdef ROM_SetupGetTrimForXoscHfFastStart +#undef SetupGetTrimForXoscHfFastStart +#define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart +#endif +#ifdef ROM_SetupGetTrimForXoscHfIbiastherm +#undef SetupGetTrimForXoscHfIbiastherm +#define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm +#endif +#ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#endif +#ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting +#undef SetupSetCacheModeAccordingToCcfgSetting +#define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting +#endif +#ifdef ROM_SetupSetAonRtcSubSecInc +#undef SetupSetAonRtcSubSecInc +#define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc +#endif +#ifdef ROM_SetupSetVddrLevel +#undef SetupSetVddrLevel +#define SetupSetVddrLevel ROM_SetupSetVddrLevel +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/smph.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/smph.h index 636979d1..e1bfc445 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/smph.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/smph.h @@ -80,7 +80,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SMPHAcquire NOROM_SMPHAcquire +#define SMPHAcquire NOROM_SMPHAcquire #endif //***************************************************************************** @@ -285,11 +285,11 @@ SMPHRelease(uint32_t ui32Semaphore) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SMPHAcquire - #undef SMPHAcquire - #define SMPHAcquire ROM_SMPHAcquire - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SMPHAcquire +#undef SMPHAcquire +#define SMPHAcquire ROM_SMPHAcquire +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ssi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ssi.h index 87a97454..74eaa08c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ssi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/ssi.h @@ -82,13 +82,13 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SSIConfigSetExpClk NOROM_SSIConfigSetExpClk - #define SSIDataPut NOROM_SSIDataPut - #define SSIDataPutNonBlocking NOROM_SSIDataPutNonBlocking - #define SSIDataGet NOROM_SSIDataGet - #define SSIDataGetNonBlocking NOROM_SSIDataGetNonBlocking - #define SSIIntRegister NOROM_SSIIntRegister - #define SSIIntUnregister NOROM_SSIIntUnregister +#define SSIConfigSetExpClk NOROM_SSIConfigSetExpClk +#define SSIDataPut NOROM_SSIDataPut +#define SSIDataPutNonBlocking NOROM_SSIDataPutNonBlocking +#define SSIDataGet NOROM_SSIDataGet +#define SSIDataGetNonBlocking NOROM_SSIDataGetNonBlocking +#define SSIIntRegister NOROM_SSIIntRegister +#define SSIIntUnregister NOROM_SSIIntUnregister #endif //***************************************************************************** @@ -161,7 +161,7 @@ extern "C" static bool SSIBaseValid(uint32_t ui32Base) { - return(ui32Base == SSI0_BASE || ui32Base == SSI1_BASE); + return (ui32Base == SSI0_BASE || ui32Base == SSI1_BASE); } #endif @@ -331,7 +331,7 @@ extern int32_t SSIDataPutNonBlocking(uint32_t ui32Base, uint32_t ui32Data); //! \return None // //***************************************************************************** -extern void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data); +extern void SSIDataGet(uint32_t ui32Base, uint32_t* pui32Data); //***************************************************************************** // @@ -355,7 +355,7 @@ extern void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data); //! \return Returns the number of elements read from the SSI receive FIFO. // //***************************************************************************** -extern int32_t SSIDataGetNonBlocking(uint32_t ui32Base, uint32_t *pui32Data); +extern int32_t SSIDataGetNonBlocking(uint32_t ui32Base, uint32_t* pui32Data); //***************************************************************************** // @@ -380,7 +380,7 @@ SSIBusy(uint32_t ui32Base) ASSERT(SSIBaseValid(ui32Base)); // Determine if the SSI is busy. - return((HWREG(ui32Base + SSI_O_SR) & SSI_SR_BSY) ? true : false); + return ((HWREG(ui32Base + SSI_O_SR) & SSI_SR_BSY) ? true : false); } //***************************************************************************** @@ -577,13 +577,13 @@ SSIIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(ui32Base + SSI_O_MIS)); + return (HWREG(ui32Base + SSI_O_MIS)); } else { - return(HWREG(ui32Base + SSI_O_RIS)); + return (HWREG(ui32Base + SSI_O_RIS)); } } @@ -649,35 +649,35 @@ SSIDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SSIConfigSetExpClk - #undef SSIConfigSetExpClk - #define SSIConfigSetExpClk ROM_SSIConfigSetExpClk - #endif - #ifdef ROM_SSIDataPut - #undef SSIDataPut - #define SSIDataPut ROM_SSIDataPut - #endif - #ifdef ROM_SSIDataPutNonBlocking - #undef SSIDataPutNonBlocking - #define SSIDataPutNonBlocking ROM_SSIDataPutNonBlocking - #endif - #ifdef ROM_SSIDataGet - #undef SSIDataGet - #define SSIDataGet ROM_SSIDataGet - #endif - #ifdef ROM_SSIDataGetNonBlocking - #undef SSIDataGetNonBlocking - #define SSIDataGetNonBlocking ROM_SSIDataGetNonBlocking - #endif - #ifdef ROM_SSIIntRegister - #undef SSIIntRegister - #define SSIIntRegister ROM_SSIIntRegister - #endif - #ifdef ROM_SSIIntUnregister - #undef SSIIntUnregister - #define SSIIntUnregister ROM_SSIIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SSIConfigSetExpClk +#undef SSIConfigSetExpClk +#define SSIConfigSetExpClk ROM_SSIConfigSetExpClk +#endif +#ifdef ROM_SSIDataPut +#undef SSIDataPut +#define SSIDataPut ROM_SSIDataPut +#endif +#ifdef ROM_SSIDataPutNonBlocking +#undef SSIDataPutNonBlocking +#define SSIDataPutNonBlocking ROM_SSIDataPutNonBlocking +#endif +#ifdef ROM_SSIDataGet +#undef SSIDataGet +#define SSIDataGet ROM_SSIDataGet +#endif +#ifdef ROM_SSIDataGetNonBlocking +#undef SSIDataGetNonBlocking +#define SSIDataGetNonBlocking ROM_SSIDataGetNonBlocking +#endif +#ifdef ROM_SSIIntRegister +#undef SSIIntRegister +#define SSIIntRegister ROM_SSIIntRegister +#endif +#ifdef ROM_SSIIntUnregister +#undef SSIIntUnregister +#define SSIIntUnregister ROM_SSIIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-config.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-config.h index e8885f72..2b338bda 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-config.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-config.h @@ -18,45 +18,45 @@ * The LITTLE endian machines: */ #if ( ! defined(ECRYPT_LITTLE_ENDIAN)) -#if defined(__ultrix) /* Older MIPS */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__alpha) /* Alpha */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_M_IX86) /* x86 (MSC, Borland) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_MSC_VER) /* x86 (surely MSC) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ -#define ECRYPT_LITTLE_ENDIAN - -/* - * The BIG endian machines: - */ -#elif defined(sun) /* Newer Sparc's */ -#define ECRYPT_BIG_ENDIAN -#elif defined(__ppc__) /* PowerPC */ -#define ECRYPT_BIG_ENDIAN - -/* - * Finally machines with UNKNOWN endianness: - */ -#elif defined (_AIX) /* RS6000 */ -#define ECRYPT_UNKNOWN -#elif defined(__hpux) /* HP-PA */ -#define ECRYPT_UNKNOWN -#elif defined(__aux) /* 68K */ -#define ECRYPT_UNKNOWN -#elif defined(__dgux) /* 88K (but P6 in latest boxes) */ -#define ECRYPT_UNKNOWN -#elif defined(__sgi) /* Newer MIPS */ -#define ECRYPT_UNKNOWN -#else /* Any other processor */ -#define ECRYPT_UNKNOWN -#endif + #if defined(__ultrix) /* Older MIPS */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__alpha) /* Alpha */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(i386) /* x86 (gcc) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__i386) /* x86 (gcc) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(_M_IX86) /* x86 (MSC, Borland) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(_MSC_VER) /* x86 (surely MSC) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ + #define ECRYPT_LITTLE_ENDIAN + + /* + * The BIG endian machines: + */ + #elif defined(sun) /* Newer Sparc's */ + #define ECRYPT_BIG_ENDIAN + #elif defined(__ppc__) /* PowerPC */ + #define ECRYPT_BIG_ENDIAN + + /* + * Finally machines with UNKNOWN endianness: + */ + #elif defined (_AIX) /* RS6000 */ + #define ECRYPT_UNKNOWN + #elif defined(__hpux) /* HP-PA */ + #define ECRYPT_UNKNOWN + #elif defined(__aux) /* 68K */ + #define ECRYPT_UNKNOWN + #elif defined(__dgux) /* 88K (but P6 in latest boxes) */ + #define ECRYPT_UNKNOWN + #elif defined(__sgi) /* Newer MIPS */ + #define ECRYPT_UNKNOWN + #else /* Any other processor */ + #define ECRYPT_UNKNOWN + #endif #endif /* ------------------------------------------------------------------------- */ @@ -75,188 +75,188 @@ /* --- check char --- */ #if (UCHAR_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T char -#define U8C(v) (v##U) + #ifndef I8T + #define I8T char + #define U8C(v) (v##U) -#if (UCHAR_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (UCHAR_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (UCHAR_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T char -#define U16C(v) (v##U) -#endif + #if (UCHAR_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T char + #define U16C(v) (v##U) + #endif -#if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T char -#define U32C(v) (v##U) -#endif + #if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T char + #define U32C(v) (v##U) + #endif -#if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T char -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T char + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check short --- */ #if (USHRT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T short -#define U8C(v) (v##U) + #ifndef I8T + #define I8T short + #define U8C(v) (v##U) -#if (USHRT_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (USHRT_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (USHRT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T short -#define U16C(v) (v##U) -#endif + #if (USHRT_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T short + #define U16C(v) (v##U) + #endif -#if (USHRT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T short -#define U32C(v) (v##U) -#endif + #if (USHRT_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T short + #define U32C(v) (v##U) + #endif -#if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T short -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T short + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check int --- */ #if (UINT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T int -#define U8C(v) (v##U) + #ifndef I8T + #define I8T int + #define U8C(v) (v##U) -#if (ULONG_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULONG_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (UINT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T int -#define U16C(v) (v##U) -#endif + #if (UINT_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T int + #define U16C(v) (v##U) + #endif -#if (UINT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T int -#define U32C(v) (v##U) -#endif + #if (UINT_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T int + #define U32C(v) (v##U) + #endif -#if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T int -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T int + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check long --- */ #if (ULONG_MAX / 0xFUL > 0xFUL) -#ifndef I8T -#define I8T long -#define U8C(v) (v##UL) + #ifndef I8T + #define I8T long + #define U8C(v) (v##UL) -#if (ULONG_MAX == 0xFFUL) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULONG_MAX == 0xFFUL) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (ULONG_MAX / 0xFFUL > 0xFFUL) -#ifndef I16T -#define I16T long -#define U16C(v) (v##UL) -#endif + #if (ULONG_MAX / 0xFFUL > 0xFFUL) + #ifndef I16T + #define I16T long + #define U16C(v) (v##UL) + #endif -#if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) -#ifndef I32T -#define I32T long -#define U32C(v) (v##UL) -#endif + #if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) + #ifndef I32T + #define I32T long + #define U32C(v) (v##UL) + #endif -#if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) -#ifndef I64T -#define I64T long -#define U64C(v) (v##UL) -#define ECRYPT_NATIVE64 -#endif + #if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) + #ifndef I64T + #define I64T long + #define U64C(v) (v##UL) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check long long --- */ #ifdef ULLONG_MAX -#if (ULLONG_MAX / 0xFULL > 0xFULL) -#ifndef I8T -#define I8T long long -#define U8C(v) (v##ULL) + #if (ULLONG_MAX / 0xFULL > 0xFULL) + #ifndef I8T + #define I8T long long + #define U8C(v) (v##ULL) -#if (ULLONG_MAX == 0xFFULL) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULLONG_MAX == 0xFFULL) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (ULLONG_MAX / 0xFFULL > 0xFFULL) -#ifndef I16T -#define I16T long long -#define U16C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFULL > 0xFFULL) + #ifndef I16T + #define I16T long long + #define U16C(v) (v##ULL) + #endif -#if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) -#ifndef I32T -#define I32T long long -#define U32C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) + #ifndef I32T + #define I32T long long + #define U32C(v) (v##ULL) + #endif -#if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) -#ifndef I64T -#define I64T long long -#define U64C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) + #ifndef I64T + #define I64T long long + #define U64C(v) (v##ULL) + #endif -#endif -#endif -#endif -#endif + #endif + #endif + #endif + #endif #endif @@ -264,13 +264,13 @@ #ifdef _UI64_MAX -#if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) -#ifndef I64T -#define I64T __int64 -#define U64C(v) (v##ui64) -#endif + #if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) + #ifndef I64T + #define I64T __int64 + #define U64C(v) (v##ui64) + #endif -#endif + #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-machine.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-machine.h index 4d2a2e55..a3eba887 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-machine.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-machine.h @@ -16,23 +16,23 @@ #if (defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT)) -#define ECRYPT_MACHINE_ROT + #define ECRYPT_MACHINE_ROT -#if (defined(WIN32) && defined(_MSC_VER)) + #if (defined(WIN32) && defined(_MSC_VER)) -#undef ROTL32 -#undef ROTR32 -#undef ROTL64 -#undef ROTR64 + #undef ROTL32 + #undef ROTR32 + #undef ROTL64 + #undef ROTR64 -#include + #include -#define ROTL32(v, n) _lrotl(v, n) -#define ROTR32(v, n) _lrotr(v, n) -#define ROTL64(v, n) _rotl64(v, n) -#define ROTR64(v, n) _rotr64(v, n) + #define ROTL32(v, n) _lrotl(v, n) + #define ROTR32(v, n) _lrotr(v, n) + #define ROTL64(v, n) _rotl64(v, n) + #define ROTR64(v, n) _rotr64(v, n) -#endif + #endif #endif @@ -40,11 +40,11 @@ #if (defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP)) -#define ECRYPT_MACHINE_SWAP + #define ECRYPT_MACHINE_SWAP -/* - * If you want to overwrite the default swap macros, put it here. And so on. - */ + /* + * If you want to overwrite the default swap macros, put it here. And so on. + */ #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-portable.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-portable.h index 8ce940d9..600c7186 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-portable.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-portable.h @@ -46,23 +46,23 @@ */ #ifdef I8T -typedef signed I8T s8; -typedef unsigned I8T u8; + typedef signed I8T s8; + typedef unsigned I8T u8; #endif #ifdef I16T -typedef signed I16T s16; -typedef unsigned I16T u16; + typedef signed I16T s16; + typedef unsigned I16T u16; #endif #ifdef I32T -typedef signed I32T s32; -typedef unsigned I32T u32; + typedef signed I32T s32; + typedef unsigned I32T u32; #endif #ifdef I64T -typedef signed I64T s64; -typedef unsigned I64T u64; + typedef signed I64T s64; + typedef unsigned I64T u64; #endif /* @@ -84,16 +84,16 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_ROT #define ROTL8(v, n) \ - (U8V((v) << (n)) | ((v) >> (8 - (n)))) + (U8V((v) << (n)) | ((v) >> (8 - (n)))) #define ROTL16(v, n) \ - (U16V((v) << (n)) | ((v) >> (16 - (n)))) + (U16V((v) << (n)) | ((v) >> (16 - (n)))) #define ROTL32(v, n) \ - (U32V((v) << (n)) | ((v) >> (32 - (n)))) + (U32V((v) << (n)) | ((v) >> (32 - (n)))) #define ROTL64(v, n) \ - (U64V((v) << (n)) | ((v) >> (64 - (n)))) + (U64V((v) << (n)) | ((v) >> (64 - (n)))) #define ROTR8(v, n) ROTL8(v, 8 - (n)) #define ROTR16(v, n) ROTL16(v, 16 - (n)) @@ -111,21 +111,21 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_SWAP #define SWAP16(v) \ - ROTL16(v, 8) + ROTL16(v, 8) #define SWAP32(v) \ - ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ - (ROTL32(v, 24) & U32C(0xFF00FF00))) + ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ + (ROTL32(v, 24) & U32C(0xFF00FF00))) #ifdef ECRYPT_NATIVE64 #define SWAP64(v) \ - ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ - (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ - (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ - (ROTL64(v, 56) & U64C(0xFF000000FF000000))) + ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ + (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ + (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ + (ROTL64(v, 56) & U64C(0xFF000000FF000000))) #else #define SWAP64(v) \ - (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) + (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) #endif #include "sw_ecrypt-machine.h" @@ -133,23 +133,23 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_WTOW #ifdef ECRYPT_LITTLE_ENDIAN -#define U16TO16_LITTLE(v) (v) -#define U32TO32_LITTLE(v) (v) -#define U64TO64_LITTLE(v) (v) + #define U16TO16_LITTLE(v) (v) + #define U32TO32_LITTLE(v) (v) + #define U64TO64_LITTLE(v) (v) -#define U16TO16_BIG(v) SWAP16(v) -#define U32TO32_BIG(v) SWAP32(v) -#define U64TO64_BIG(v) SWAP64(v) + #define U16TO16_BIG(v) SWAP16(v) + #define U32TO32_BIG(v) SWAP32(v) + #define U64TO64_BIG(v) SWAP64(v) #endif #ifdef ECRYPT_BIG_ENDIAN -#define U16TO16_LITTLE(v) SWAP16(v) -#define U32TO32_LITTLE(v) SWAP32(v) -#define U64TO64_LITTLE(v) SWAP64(v) + #define U16TO16_LITTLE(v) SWAP16(v) + #define U32TO32_LITTLE(v) SWAP32(v) + #define U64TO64_LITTLE(v) SWAP64(v) -#define U16TO16_BIG(v) (v) -#define U32TO32_BIG(v) (v) -#define U64TO64_BIG(v) (v) + #define U16TO16_BIG(v) (v) + #define U32TO32_BIG(v) (v) + #define U64TO64_BIG(v) (v) #endif #include "sw_ecrypt-machine.h" @@ -182,121 +182,121 @@ typedef unsigned I64T u64; #else #define U8TO16_LITTLE(p) \ - (((u16)((p)[0]) ) | \ - ((u16)((p)[1]) << 8)) + (((u16)((p)[0]) ) | \ + ((u16)((p)[1]) << 8)) #define U8TO32_LITTLE(p) \ - (((u32)((p)[0]) ) | \ - ((u32)((p)[1]) << 8) | \ - ((u32)((p)[2]) << 16) | \ - ((u32)((p)[3]) << 24)) + (((u32)((p)[0]) ) | \ + ((u32)((p)[1]) << 8) | \ + ((u32)((p)[2]) << 16) | \ + ((u32)((p)[3]) << 24)) #ifdef ECRYPT_NATIVE64 #define U8TO64_LITTLE(p) \ - (((u64)((p)[0]) ) | \ - ((u64)((p)[1]) << 8) | \ - ((u64)((p)[2]) << 16) | \ - ((u64)((p)[3]) << 24) | \ - ((u64)((p)[4]) << 32) | \ - ((u64)((p)[5]) << 40) | \ - ((u64)((p)[6]) << 48) | \ - ((u64)((p)[7]) << 56)) + (((u64)((p)[0]) ) | \ + ((u64)((p)[1]) << 8) | \ + ((u64)((p)[2]) << 16) | \ + ((u64)((p)[3]) << 24) | \ + ((u64)((p)[4]) << 32) | \ + ((u64)((p)[5]) << 40) | \ + ((u64)((p)[6]) << 48) | \ + ((u64)((p)[7]) << 56)) #else #define U8TO64_LITTLE(p) \ - ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) + ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) #endif #define U8TO16_BIG(p) \ - (((u16)((p)[0]) << 8) | \ - ((u16)((p)[1]) )) + (((u16)((p)[0]) << 8) | \ + ((u16)((p)[1]) )) #define U8TO32_BIG(p) \ - (((u32)((p)[0]) << 24) | \ - ((u32)((p)[1]) << 16) | \ - ((u32)((p)[2]) << 8) | \ - ((u32)((p)[3]) )) + (((u32)((p)[0]) << 24) | \ + ((u32)((p)[1]) << 16) | \ + ((u32)((p)[2]) << 8) | \ + ((u32)((p)[3]) )) #ifdef ECRYPT_NATIVE64 #define U8TO64_BIG(p) \ - (((u64)((p)[0]) << 56) | \ - ((u64)((p)[1]) << 48) | \ - ((u64)((p)[2]) << 40) | \ - ((u64)((p)[3]) << 32) | \ - ((u64)((p)[4]) << 24) | \ - ((u64)((p)[5]) << 16) | \ - ((u64)((p)[6]) << 8) | \ - ((u64)((p)[7]) )) + (((u64)((p)[0]) << 56) | \ + ((u64)((p)[1]) << 48) | \ + ((u64)((p)[2]) << 40) | \ + ((u64)((p)[3]) << 32) | \ + ((u64)((p)[4]) << 24) | \ + ((u64)((p)[5]) << 16) | \ + ((u64)((p)[6]) << 8) | \ + ((u64)((p)[7]) )) #else #define U8TO64_BIG(p) \ - (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) + (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) #endif #define U16TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) #define U32TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - (p)[2] = U8V((v) >> 16); \ - (p)[3] = U8V((v) >> 24); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + } while (0) #ifdef ECRYPT_NATIVE64 #define U64TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - (p)[2] = U8V((v) >> 16); \ - (p)[3] = U8V((v) >> 24); \ - (p)[4] = U8V((v) >> 32); \ - (p)[5] = U8V((v) >> 40); \ - (p)[6] = U8V((v) >> 48); \ - (p)[7] = U8V((v) >> 56); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + (p)[4] = U8V((v) >> 32); \ + (p)[5] = U8V((v) >> 40); \ + (p)[6] = U8V((v) >> 48); \ + (p)[7] = U8V((v) >> 56); \ + } while (0) #else #define U64TO8_LITTLE(p, v) \ - do { \ - U32TO8_LITTLE((p), U32V((v) )); \ - U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ - } while (0) + do { \ + U32TO8_LITTLE((p), U32V((v) )); \ + U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ + } while (0) #endif #define U16TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) #define U32TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) >> 24); \ - (p)[1] = U8V((v) >> 16); \ - (p)[2] = U8V((v) >> 8); \ - (p)[3] = U8V((v) ); \ - } while (0) + do { \ + (p)[0] = U8V((v) >> 24); \ + (p)[1] = U8V((v) >> 16); \ + (p)[2] = U8V((v) >> 8); \ + (p)[3] = U8V((v) ); \ + } while (0) #ifdef ECRYPT_NATIVE64 #define U64TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) >> 56); \ - (p)[1] = U8V((v) >> 48); \ - (p)[2] = U8V((v) >> 40); \ - (p)[3] = U8V((v) >> 32); \ - (p)[4] = U8V((v) >> 24); \ - (p)[5] = U8V((v) >> 16); \ - (p)[6] = U8V((v) >> 8); \ - (p)[7] = U8V((v) ); \ - } while (0) + do { \ + (p)[0] = U8V((v) >> 56); \ + (p)[1] = U8V((v) >> 48); \ + (p)[2] = U8V((v) >> 40); \ + (p)[3] = U8V((v) >> 32); \ + (p)[4] = U8V((v) >> 24); \ + (p)[5] = U8V((v) >> 16); \ + (p)[6] = U8V((v) >> 8); \ + (p)[7] = U8V((v) ); \ + } while (0) #else #define U64TO8_BIG(p, v) \ - do { \ - U32TO8_BIG((p), U32V((v) >> 32)); \ - U32TO8_BIG((p) + 4, U32V((v) )); \ - } while (0) + do { \ + U32TO8_BIG((p), U32V((v) >> 32)); \ + U32TO8_BIG((p) + 4, U32V((v) )); \ + } while (0) #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-sync.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-sync.h index dddb384e..7d9a344c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-sync.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_ecrypt-sync.h @@ -59,12 +59,12 @@ typedef struct { - u32 input[16]; /* could be compressed */ - /* - * [edit] - * - * Put here all state variable needed during the encryption process. - */ + u32 input[16]; /* could be compressed */ + /* + * [edit] + * + * Put here all state variable needed during the encryption process. + */ } ECRYPT_ctx; /* ------------------------------------------------------------------------- */ @@ -84,10 +84,10 @@ void ECRYPT_init(void); * above. */ void ECRYPT_keysetup( - ECRYPT_ctx* ctx, - const u8* key, - u32 keysize, /* Key size in bits. */ - u32 ivsize); /* IV size in bits. */ + ECRYPT_ctx* ctx, + const u8* key, + u32 keysize, /* Key size in bits. */ + u32 ivsize); /* IV size in bits. */ /* * IV setup. After having called ECRYPT_keysetup(), the user is @@ -96,8 +96,8 @@ void ECRYPT_keysetup( * IV's. */ void ECRYPT_ivsetup( - ECRYPT_ctx* ctx, - const u8* iv); + ECRYPT_ctx* ctx, + const u8* iv); /* * Encryption/decryption of arbitrary length messages. @@ -138,16 +138,16 @@ void ECRYPT_ivsetup( */ void ECRYPT_encrypt_bytes( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 msglen); /* Message length in bytes. */ void ECRYPT_decrypt_bytes( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* Message length in bytes. */ /* ------------------------------------------------------------------------- */ @@ -165,9 +165,9 @@ void ECRYPT_decrypt_bytes( #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_bytes( - ECRYPT_ctx* ctx, - u8* keystream, - u32 length); /* Length of keystream in bytes. */ + ECRYPT_ctx* ctx, + u8* keystream, + u32 length); /* Length of keystream in bytes. */ #endif @@ -191,18 +191,18 @@ void ECRYPT_keystream_bytes( #define ECRYPT_USES_DEFAULT_ALL_IN_ONE /* [edit] */ void ECRYPT_encrypt_packet( - ECRYPT_ctx* ctx, - const u8* iv, - const u8* plaintext, - u8* ciphertext, - u32 msglen); + ECRYPT_ctx* ctx, + const u8* iv, + const u8* plaintext, + u8* ciphertext, + u32 msglen); void ECRYPT_decrypt_packet( - ECRYPT_ctx* ctx, - const u8* iv, - const u8* ciphertext, - u8* plaintext, - u32 msglen); + ECRYPT_ctx* ctx, + const u8* iv, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* * Encryption/decryption of blocks. @@ -219,41 +219,41 @@ void ECRYPT_decrypt_packet( #ifdef ECRYPT_USES_DEFAULT_BLOCK_MACROS #define ECRYPT_encrypt_blocks(ctx, plaintext, ciphertext, blocks) \ - ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ + (blocks) * ECRYPT_BLOCKLENGTH) #define ECRYPT_decrypt_blocks(ctx, ciphertext, plaintext, blocks) \ - ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ + (blocks) * ECRYPT_BLOCKLENGTH) #ifdef ECRYPT_GENERATES_KEYSTREAM #define ECRYPT_keystream_blocks(ctx, keystream, blocks) \ - ECRYPT_keystream_bytes(ctx, keystream, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_keystream_bytes(ctx, keystream, \ + (blocks) * ECRYPT_BLOCKLENGTH) #endif #else void ECRYPT_encrypt_blocks( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 blocks); /* Message length in blocks. */ void ECRYPT_decrypt_blocks( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 blocks); /* Message length in blocks. */ #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_blocks( - ECRYPT_ctx* ctx, - const u8* keystream, - u32 blocks); /* Keystream length in blocks. */ + ECRYPT_ctx* ctx, + const u8* keystream, + u32 blocks); /* Keystream length in blocks. */ #endif @@ -272,11 +272,11 @@ void ECRYPT_keystream_blocks( #define ECRYPT_MAXVARIANT 1 /* [edit] */ #ifndef ECRYPT_VARIANT -#define ECRYPT_VARIANT 1 + #define ECRYPT_VARIANT 1 #endif #if (ECRYPT_VARIANT > ECRYPT_MAXVARIANT) -#error this variant does not exist + #error this variant does not exist #endif /* ------------------------------------------------------------------------- */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna-32.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna-32.h index 2aa2eeb6..3e4eb10f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna-32.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna-32.h @@ -8,216 +8,253 @@ */ #if defined(_MSC_VER) - #define POLY1305_NOINLINE __declspec(noinline) + #define POLY1305_NOINLINE __declspec(noinline) #elif defined(__GNUC__) - #define POLY1305_NOINLINE __attribute__((noinline)) + #define POLY1305_NOINLINE __attribute__((noinline)) #else - #define POLY1305_NOINLINE + #define POLY1305_NOINLINE #endif #define poly1305_block_size 16 /* 17 + sizeof(size_t) + 14*sizeof(unsigned long) */ -typedef struct { - unsigned long r[5]; - unsigned long h[5]; - unsigned long pad[4]; - size_t leftover; - unsigned char buffer[poly1305_block_size]; - unsigned char final; +typedef struct +{ + unsigned long r[5]; + unsigned long h[5]; + unsigned long pad[4]; + size_t leftover; + unsigned char buffer[poly1305_block_size]; + unsigned char final; } poly1305_state_internal_t; /* interpret four 8 bit unsigned integers as a 32 bit unsigned integer in little endian */ -static unsigned long -U8TO32(const unsigned char *p) { - return - (((unsigned long)(p[0] & 0xff) ) | - ((unsigned long)(p[1] & 0xff) << 8) | - ((unsigned long)(p[2] & 0xff) << 16) | - ((unsigned long)(p[3] & 0xff) << 24)); +static unsigned long U8TO32(const unsigned char* p) +{ + return + (((unsigned long)(p[0] & 0xff) ) | + ((unsigned long)(p[1] & 0xff) << 8) | + ((unsigned long)(p[2] & 0xff) << 16) | + ((unsigned long)(p[3] & 0xff) << 24)); } /* store a 32 bit unsigned integer as four 8 bit unsigned integers in little endian */ -static void -U32TO8(unsigned char *p, unsigned long v) { - p[0] = (v ) & 0xff; - p[1] = (v >> 8) & 0xff; - p[2] = (v >> 16) & 0xff; - p[3] = (v >> 24) & 0xff; +static void U32TO8(unsigned char* p, unsigned long v) +{ + p[0] = (v ) & 0xff; + p[1] = (v >> 8) & 0xff; + p[2] = (v >> 16) & 0xff; + p[3] = (v >> 24) & 0xff; } -void -poly1305_init(poly1305_context *ctx, const unsigned char key[32]) { - poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx; - - /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ - st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff; - st->r[1] = (U8TO32(&key[ 3]) >> 2) & 0x3ffff03; - st->r[2] = (U8TO32(&key[ 6]) >> 4) & 0x3ffc0ff; - st->r[3] = (U8TO32(&key[ 9]) >> 6) & 0x3f03fff; - st->r[4] = (U8TO32(&key[12]) >> 8) & 0x00fffff; - - /* h = 0 */ - st->h[0] = 0; - st->h[1] = 0; - st->h[2] = 0; - st->h[3] = 0; - st->h[4] = 0; - - /* save pad for later */ - st->pad[0] = U8TO32(&key[16]); - st->pad[1] = U8TO32(&key[20]); - st->pad[2] = U8TO32(&key[24]); - st->pad[3] = U8TO32(&key[28]); - - st->leftover = 0; - st->final = 0; +void poly1305_init(poly1305_context* ctx, const unsigned char key[32]) +{ + poly1305_state_internal_t* st = (poly1305_state_internal_t*)ctx; + + /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ + st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff; + st->r[1] = (U8TO32(&key[ 3]) >> 2) & 0x3ffff03; + st->r[2] = (U8TO32(&key[ 6]) >> 4) & 0x3ffc0ff; + st->r[3] = (U8TO32(&key[ 9]) >> 6) & 0x3f03fff; + st->r[4] = (U8TO32(&key[12]) >> 8) & 0x00fffff; + + /* h = 0 */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + + /* save pad for later */ + st->pad[0] = U8TO32(&key[16]); + st->pad[1] = U8TO32(&key[20]); + st->pad[2] = U8TO32(&key[24]); + st->pad[3] = U8TO32(&key[28]); + + st->leftover = 0; + st->final = 0; } -static void -poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m, size_t bytes) { - const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ - unsigned long r0,r1,r2,r3,r4; - unsigned long s1,s2,s3,s4; - unsigned long h0,h1,h2,h3,h4; - unsigned long long d0,d1,d2,d3,d4; - unsigned long c; - - r0 = st->r[0]; - r1 = st->r[1]; - r2 = st->r[2]; - r3 = st->r[3]; - r4 = st->r[4]; - - s1 = r1 * 5; - s2 = r2 * 5; - s3 = r3 * 5; - s4 = r4 * 5; - - h0 = st->h[0]; - h1 = st->h[1]; - h2 = st->h[2]; - h3 = st->h[3]; - h4 = st->h[4]; - - while (bytes >= poly1305_block_size) { - /* h += m[i] */ - h0 += (U8TO32(m+ 0) ) & 0x3ffffff; - h1 += (U8TO32(m+ 3) >> 2) & 0x3ffffff; - h2 += (U8TO32(m+ 6) >> 4) & 0x3ffffff; - h3 += (U8TO32(m+ 9) >> 6) & 0x3ffffff; - h4 += (U8TO32(m+12) >> 8) | hibit; - - /* h *= r */ - d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1); - d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2); - d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3); - d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4); - d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0); - - /* (partial) h %= p */ - c = (unsigned long)(d0 >> 26); h0 = (unsigned long)d0 & 0x3ffffff; - d1 += c; c = (unsigned long)(d1 >> 26); h1 = (unsigned long)d1 & 0x3ffffff; - d2 += c; c = (unsigned long)(d2 >> 26); h2 = (unsigned long)d2 & 0x3ffffff; - d3 += c; c = (unsigned long)(d3 >> 26); h3 = (unsigned long)d3 & 0x3ffffff; - d4 += c; c = (unsigned long)(d4 >> 26); h4 = (unsigned long)d4 & 0x3ffffff; - h0 += c * 5; c = (h0 >> 26); h0 = h0 & 0x3ffffff; - h1 += c; - - m += poly1305_block_size; - bytes -= poly1305_block_size; - } - - st->h[0] = h0; - st->h[1] = h1; - st->h[2] = h2; - st->h[3] = h3; - st->h[4] = h4; +static void poly1305_blocks(poly1305_state_internal_t* st, const unsigned char* m, size_t bytes) +{ + const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ + unsigned long r0, r1, r2, r3, r4; + unsigned long s1, s2, s3, s4; + unsigned long h0, h1, h2, h3, h4; + unsigned long long d0, d1, d2, d3, d4; + unsigned long c; + + r0 = st->r[0]; + r1 = st->r[1]; + r2 = st->r[2]; + r3 = st->r[3]; + r4 = st->r[4]; + + s1 = r1 * 5; + s2 = r2 * 5; + s3 = r3 * 5; + s4 = r4 * 5; + + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + while (bytes >= poly1305_block_size) + { + /* h += m[i] */ + h0 += (U8TO32(m + 0) ) & 0x3ffffff; + h1 += (U8TO32(m + 3) >> 2) & 0x3ffffff; + h2 += (U8TO32(m + 6) >> 4) & 0x3ffffff; + h3 += (U8TO32(m + 9) >> 6) & 0x3ffffff; + h4 += (U8TO32(m + 12) >> 8) | hibit; + + /* h *= r */ + d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1); + d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2); + d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3); + d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4); + d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0); + + /* (partial) h %= p */ + c = (unsigned long)(d0 >> 26); + h0 = (unsigned long)d0 & 0x3ffffff; + d1 += c; + c = (unsigned long)(d1 >> 26); + h1 = (unsigned long)d1 & 0x3ffffff; + d2 += c; + c = (unsigned long)(d2 >> 26); + h2 = (unsigned long)d2 & 0x3ffffff; + d3 += c; + c = (unsigned long)(d3 >> 26); + h3 = (unsigned long)d3 & 0x3ffffff; + d4 += c; + c = (unsigned long)(d4 >> 26); + h4 = (unsigned long)d4 & 0x3ffffff; + h0 += c * 5; + c = (h0 >> 26); + h0 = h0 & 0x3ffffff; + h1 += c; + + m += poly1305_block_size; + bytes -= poly1305_block_size; + } + + st->h[0] = h0; + st->h[1] = h1; + st->h[2] = h2; + st->h[3] = h3; + st->h[4] = h4; } -POLY1305_NOINLINE void -poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) { - poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx; - unsigned long h0,h1,h2,h3,h4,c; - unsigned long g0,g1,g2,g3,g4; - unsigned long long f; - unsigned long mask; - - /* process the remaining block */ - if (st->leftover) { - size_t i = st->leftover; - st->buffer[i++] = 1; - for (; i < poly1305_block_size; i++) - st->buffer[i] = 0; - st->final = 1; - poly1305_blocks(st, st->buffer, poly1305_block_size); - } - - /* fully carry h */ - h0 = st->h[0]; - h1 = st->h[1]; - h2 = st->h[2]; - h3 = st->h[3]; - h4 = st->h[4]; - - c = h1 >> 26; h1 = h1 & 0x3ffffff; - h2 += c; c = h2 >> 26; h2 = h2 & 0x3ffffff; - h3 += c; c = h3 >> 26; h3 = h3 & 0x3ffffff; - h4 += c; c = h4 >> 26; h4 = h4 & 0x3ffffff; - h0 += c * 5; c = h0 >> 26; h0 = h0 & 0x3ffffff; - h1 += c; - - /* compute h + -p */ - g0 = h0 + 5; c = g0 >> 26; g0 &= 0x3ffffff; - g1 = h1 + c; c = g1 >> 26; g1 &= 0x3ffffff; - g2 = h2 + c; c = g2 >> 26; g2 &= 0x3ffffff; - g3 = h3 + c; c = g3 >> 26; g3 &= 0x3ffffff; - g4 = h4 + c - (1UL << 26); - - /* select h if h < p, or h + -p if h >= p */ - mask = (g4 >> ((sizeof(unsigned long) * 8) - 1)) - 1; - g0 &= mask; - g1 &= mask; - g2 &= mask; - g3 &= mask; - g4 &= mask; - mask = ~mask; - h0 = (h0 & mask) | g0; - h1 = (h1 & mask) | g1; - h2 = (h2 & mask) | g2; - h3 = (h3 & mask) | g3; - h4 = (h4 & mask) | g4; - - /* h = h % (2^128) */ - h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; - h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; - h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; - h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; - - /* mac = (h + pad) % (2^128) */ - f = (unsigned long long)h0 + st->pad[0] ; h0 = (unsigned long)f; - f = (unsigned long long)h1 + st->pad[1] + (f >> 32); h1 = (unsigned long)f; - f = (unsigned long long)h2 + st->pad[2] + (f >> 32); h2 = (unsigned long)f; - f = (unsigned long long)h3 + st->pad[3] + (f >> 32); h3 = (unsigned long)f; - - U32TO8(mac + 0, h0); - U32TO8(mac + 4, h1); - U32TO8(mac + 8, h2); - U32TO8(mac + 12, h3); - - /* zero out the state */ - st->h[0] = 0; - st->h[1] = 0; - st->h[2] = 0; - st->h[3] = 0; - st->h[4] = 0; - st->r[0] = 0; - st->r[1] = 0; - st->r[2] = 0; - st->r[3] = 0; - st->r[4] = 0; - st->pad[0] = 0; - st->pad[1] = 0; - st->pad[2] = 0; - st->pad[3] = 0; +POLY1305_NOINLINE void poly1305_finish(poly1305_context* ctx, unsigned char mac[16]) +{ + poly1305_state_internal_t* st = (poly1305_state_internal_t*)ctx; + unsigned long h0, h1, h2, h3, h4, c; + unsigned long g0, g1, g2, g3, g4; + unsigned long long f; + unsigned long mask; + + /* process the remaining block */ + if (st->leftover) + { + size_t i = st->leftover; + st->buffer[i++] = 1; + + for (; i < poly1305_block_size; i++) + st->buffer[i] = 0; + + st->final = 1; + poly1305_blocks(st, st->buffer, poly1305_block_size); + } + + /* fully carry h */ + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + c = h1 >> 26; + h1 = h1 & 0x3ffffff; + h2 += c; + c = h2 >> 26; + h2 = h2 & 0x3ffffff; + h3 += c; + c = h3 >> 26; + h3 = h3 & 0x3ffffff; + h4 += c; + c = h4 >> 26; + h4 = h4 & 0x3ffffff; + h0 += c * 5; + c = h0 >> 26; + h0 = h0 & 0x3ffffff; + h1 += c; + + /* compute h + -p */ + g0 = h0 + 5; + c = g0 >> 26; + g0 &= 0x3ffffff; + g1 = h1 + c; + c = g1 >> 26; + g1 &= 0x3ffffff; + g2 = h2 + c; + c = g2 >> 26; + g2 &= 0x3ffffff; + g3 = h3 + c; + c = g3 >> 26; + g3 &= 0x3ffffff; + g4 = h4 + c - (1UL << 26); + + /* select h if h < p, or h + -p if h >= p */ + mask = (g4 >> ((sizeof(unsigned long) * 8) - 1)) - 1; + g0 &= mask; + g1 &= mask; + g2 &= mask; + g3 &= mask; + g4 &= mask; + mask = ~mask; + h0 = (h0 & mask) | g0; + h1 = (h1 & mask) | g1; + h2 = (h2 & mask) | g2; + h3 = (h3 & mask) | g3; + h4 = (h4 & mask) | g4; + + /* h = h % (2^128) */ + h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; + h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; + h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; + h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; + + /* mac = (h + pad) % (2^128) */ + f = (unsigned long long)h0 + st->pad[0] ; + h0 = (unsigned long)f; + f = (unsigned long long)h1 + st->pad[1] + (f >> 32); + h1 = (unsigned long)f; + f = (unsigned long long)h2 + st->pad[2] + (f >> 32); + h2 = (unsigned long)f; + f = (unsigned long long)h3 + st->pad[3] + (f >> 32); + h3 = (unsigned long)f; + + U32TO8(mac + 0, h0); + U32TO8(mac + 4, h1); + U32TO8(mac + 8, h2); + U32TO8(mac + 12, h3); + + /* zero out the state */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + st->r[0] = 0; + st->r[1] = 0; + st->r[2] = 0; + st->r[3] = 0; + st->r[4] = 0; + st->pad[0] = 0; + st->pad[1] = 0; + st->pad[2] = 0; + st->pad[3] = 0; } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna.h index 574efabd..a5449272 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sw_poly1305-donna.h @@ -9,15 +9,16 @@ #include -typedef struct { - size_t aligner; - unsigned char opaque[136]; +typedef struct +{ + size_t aligner; + unsigned char opaque[136]; } poly1305_context; -void poly1305_init(poly1305_context *ctx, const unsigned char key[32]); -void poly1305_update(poly1305_context *ctx, const unsigned char *m, size_t bytes); -void poly1305_finish(poly1305_context *ctx, unsigned char mac[16]); -void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, const unsigned char key[32]); +void poly1305_init(poly1305_context* ctx, const unsigned char key[32]); +void poly1305_update(poly1305_context* ctx, const unsigned char* m, size_t bytes); +void poly1305_finish(poly1305_context* ctx, unsigned char mac[16]); +void poly1305_auth(unsigned char mac[16], const unsigned char* m, size_t bytes, const unsigned char key[32]); int poly1305_verify(const unsigned char mac1[16], const unsigned char mac2[16]); int poly1305_power_on_self_test(void); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sys_ctrl.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sys_ctrl.h index 02d37896..7ecddc4d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sys_ctrl.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/sys_ctrl.h @@ -103,10 +103,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SysCtrlSetRechargeBeforePowerDown NOROM_SysCtrlSetRechargeBeforePowerDown - #define SysCtrlAdjustRechargeAfterPowerDown NOROM_SysCtrlAdjustRechargeAfterPowerDown - #define SysCtrl_DCDC_VoltageConditionalControl NOROM_SysCtrl_DCDC_VoltageConditionalControl - #define SysCtrlResetSourceGet NOROM_SysCtrlResetSourceGet +#define SysCtrlSetRechargeBeforePowerDown NOROM_SysCtrlSetRechargeBeforePowerDown +#define SysCtrlAdjustRechargeAfterPowerDown NOROM_SysCtrlAdjustRechargeAfterPowerDown +#define SysCtrl_DCDC_VoltageConditionalControl NOROM_SysCtrl_DCDC_VoltageConditionalControl +#define SysCtrlResetSourceGet NOROM_SysCtrlResetSourceGet #endif //***************************************************************************** @@ -156,7 +156,7 @@ __STATIC_INLINE uint32_t SysCtrlClockGet( void ) { // Return fixed clock speed - return( GET_MCU_CLOCK ); + return ( GET_MCU_CLOCK ); } //***************************************************************************** @@ -318,14 +318,16 @@ extern uint32_t SysCtrlResetSourceGet( void ); __STATIC_INLINE void SysCtrlSystemReset( void ) { - // Disable CPU interrupts - CPUcpsid(); - // Write reset register - HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1; - // Finally, wait until the above write propagates - while ( 1 ) { - // Do nothing, just wait for the reset (and never return from here) - } + // Disable CPU interrupts + CPUcpsid(); + // Write reset register + HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1; + + // Finally, wait until the above write propagates + while ( 1 ) + { + // Do nothing, just wait for the reset (and never return from here) + } } //***************************************************************************** @@ -379,23 +381,23 @@ SysCtrlClockLossResetDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SysCtrlSetRechargeBeforePowerDown - #undef SysCtrlSetRechargeBeforePowerDown - #define SysCtrlSetRechargeBeforePowerDown ROM_SysCtrlSetRechargeBeforePowerDown - #endif - #ifdef ROM_SysCtrlAdjustRechargeAfterPowerDown - #undef SysCtrlAdjustRechargeAfterPowerDown - #define SysCtrlAdjustRechargeAfterPowerDown ROM_SysCtrlAdjustRechargeAfterPowerDown - #endif - #ifdef ROM_SysCtrl_DCDC_VoltageConditionalControl - #undef SysCtrl_DCDC_VoltageConditionalControl - #define SysCtrl_DCDC_VoltageConditionalControl ROM_SysCtrl_DCDC_VoltageConditionalControl - #endif - #ifdef ROM_SysCtrlResetSourceGet - #undef SysCtrlResetSourceGet - #define SysCtrlResetSourceGet ROM_SysCtrlResetSourceGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SysCtrlSetRechargeBeforePowerDown +#undef SysCtrlSetRechargeBeforePowerDown +#define SysCtrlSetRechargeBeforePowerDown ROM_SysCtrlSetRechargeBeforePowerDown +#endif +#ifdef ROM_SysCtrlAdjustRechargeAfterPowerDown +#undef SysCtrlAdjustRechargeAfterPowerDown +#define SysCtrlAdjustRechargeAfterPowerDown ROM_SysCtrlAdjustRechargeAfterPowerDown +#endif +#ifdef ROM_SysCtrl_DCDC_VoltageConditionalControl +#undef SysCtrl_DCDC_VoltageConditionalControl +#define SysCtrl_DCDC_VoltageConditionalControl ROM_SysCtrl_DCDC_VoltageConditionalControl +#endif +#ifdef ROM_SysCtrlResetSourceGet +#undef SysCtrlResetSourceGet +#define SysCtrlResetSourceGet ROM_SysCtrlResetSourceGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/systick.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/systick.h index 735171df..d0654401 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/systick.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/systick.h @@ -247,7 +247,7 @@ __STATIC_INLINE uint32_t SysTickPeriodGet(void) { // Return the period of the SysTick counter. - return(HWREG(NVIC_ST_RELOAD) + 1); + return (HWREG(NVIC_ST_RELOAD) + 1); } //***************************************************************************** @@ -264,7 +264,7 @@ __STATIC_INLINE uint32_t SysTickValueGet(void) { // Return the current value of the SysTick counter. - return(HWREG(NVIC_ST_CURRENT)); + return (HWREG(NVIC_ST_CURRENT)); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/timer.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/timer.h index da130749..b010b3b3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/timer.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/timer.h @@ -80,14 +80,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define TimerConfigure NOROM_TimerConfigure - #define TimerLevelControl NOROM_TimerLevelControl - #define TimerStallControl NOROM_TimerStallControl - #define TimerWaitOnTriggerControl NOROM_TimerWaitOnTriggerControl - #define TimerIntRegister NOROM_TimerIntRegister - #define TimerIntUnregister NOROM_TimerIntUnregister - #define TimerMatchUpdateMode NOROM_TimerMatchUpdateMode - #define TimerIntervalLoadMode NOROM_TimerIntervalLoadMode +#define TimerConfigure NOROM_TimerConfigure +#define TimerLevelControl NOROM_TimerLevelControl +#define TimerStallControl NOROM_TimerStallControl +#define TimerWaitOnTriggerControl NOROM_TimerWaitOnTriggerControl +#define TimerIntRegister NOROM_TimerIntRegister +#define TimerIntUnregister NOROM_TimerIntUnregister +#define TimerMatchUpdateMode NOROM_TimerMatchUpdateMode +#define TimerIntervalLoadMode NOROM_TimerIntervalLoadMode #endif //***************************************************************************** @@ -210,8 +210,8 @@ extern "C" static bool TimerBaseValid(uint32_t ui32Base) { - return((ui32Base == GPT0_BASE) || (ui32Base == GPT1_BASE) || - (ui32Base == GPT2_BASE) || (ui32Base == GPT3_BASE)); + return ((ui32Base == GPT0_BASE) || (ui32Base == GPT1_BASE) || + (ui32Base == GPT2_BASE) || (ui32Base == GPT3_BASE)); } #endif @@ -474,13 +474,13 @@ TimerPrescaleSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) ASSERT(ui32Value < 256); // Set the timer A prescaler if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAPR) = ui32Value; } // Set the timer B prescaler if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBPR) = ui32Value; } @@ -522,8 +522,8 @@ TimerPrescaleGet(uint32_t ui32Base, uint32_t ui32Timer) (ui32Timer == TIMER_BOTH)); // Return the appropriate prescale value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPR) : - HWREG(ui32Base + GPT_O_TBPR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPR) : + HWREG(ui32Base + GPT_O_TBPR)); } //***************************************************************************** @@ -558,13 +558,13 @@ TimerPrescaleMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) ASSERT(ui32Value < 256); // Set the timer A prescale match if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAPMR) = ui32Value; } // Set the timer B prescale match if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBPMR) = ui32Value; } @@ -597,8 +597,8 @@ TimerPrescaleMatchGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate prescale match value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPMR) : - HWREG(ui32Base + GPT_O_TBPMR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPMR) : + HWREG(ui32Base + GPT_O_TBPMR)); } //***************************************************************************** @@ -633,13 +633,13 @@ TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) (ui32Timer == TIMER_BOTH)); // Set the timer A load value if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAILR) = ui32Value; } // Set the timer B load value if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBILR) = ui32Value; } @@ -674,8 +674,8 @@ TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate load value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAILR) : - HWREG(ui32Base + GPT_O_TBILR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAILR) : + HWREG(ui32Base + GPT_O_TBILR)); } //***************************************************************************** @@ -706,8 +706,8 @@ TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate timer value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAR) : - HWREG(ui32Base + GPT_O_TBR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAR) : + HWREG(ui32Base + GPT_O_TBR)); } //***************************************************************************** @@ -745,13 +745,13 @@ TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) (ui32Timer == TIMER_BOTH)); // Set the timer A match value if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAMATCHR) = ui32Value; } // Set the timer B match value if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBMATCHR) = ui32Value; } @@ -786,8 +786,8 @@ TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate match value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAMATCHR) : - HWREG(ui32Base + GPT_O_TBMATCHR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAMATCHR) : + HWREG(ui32Base + GPT_O_TBMATCHR)); } //***************************************************************************** @@ -936,8 +936,8 @@ TimerIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - return(bMasked ? HWREG(ui32Base + GPT_O_MIS) : - HWREG(ui32Base + GPT_O_RIS)); + return (bMasked ? HWREG(ui32Base + GPT_O_MIS) : + HWREG(ui32Base + GPT_O_RIS)); } //***************************************************************************** @@ -1121,39 +1121,39 @@ extern void TimerIntervalLoadMode(uint32_t ui32Base, uint32_t ui32Timer, uint32_ // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_TimerConfigure - #undef TimerConfigure - #define TimerConfigure ROM_TimerConfigure - #endif - #ifdef ROM_TimerLevelControl - #undef TimerLevelControl - #define TimerLevelControl ROM_TimerLevelControl - #endif - #ifdef ROM_TimerStallControl - #undef TimerStallControl - #define TimerStallControl ROM_TimerStallControl - #endif - #ifdef ROM_TimerWaitOnTriggerControl - #undef TimerWaitOnTriggerControl - #define TimerWaitOnTriggerControl ROM_TimerWaitOnTriggerControl - #endif - #ifdef ROM_TimerIntRegister - #undef TimerIntRegister - #define TimerIntRegister ROM_TimerIntRegister - #endif - #ifdef ROM_TimerIntUnregister - #undef TimerIntUnregister - #define TimerIntUnregister ROM_TimerIntUnregister - #endif - #ifdef ROM_TimerMatchUpdateMode - #undef TimerMatchUpdateMode - #define TimerMatchUpdateMode ROM_TimerMatchUpdateMode - #endif - #ifdef ROM_TimerIntervalLoadMode - #undef TimerIntervalLoadMode - #define TimerIntervalLoadMode ROM_TimerIntervalLoadMode - #endif +#include "../driverlib/rom.h" +#ifdef ROM_TimerConfigure +#undef TimerConfigure +#define TimerConfigure ROM_TimerConfigure +#endif +#ifdef ROM_TimerLevelControl +#undef TimerLevelControl +#define TimerLevelControl ROM_TimerLevelControl +#endif +#ifdef ROM_TimerStallControl +#undef TimerStallControl +#define TimerStallControl ROM_TimerStallControl +#endif +#ifdef ROM_TimerWaitOnTriggerControl +#undef TimerWaitOnTriggerControl +#define TimerWaitOnTriggerControl ROM_TimerWaitOnTriggerControl +#endif +#ifdef ROM_TimerIntRegister +#undef TimerIntRegister +#define TimerIntRegister ROM_TimerIntRegister +#endif +#ifdef ROM_TimerIntUnregister +#undef TimerIntUnregister +#define TimerIntUnregister ROM_TimerIntUnregister +#endif +#ifdef ROM_TimerMatchUpdateMode +#undef TimerMatchUpdateMode +#define TimerMatchUpdateMode ROM_TimerMatchUpdateMode +#endif +#ifdef ROM_TimerIntervalLoadMode +#undef TimerIntervalLoadMode +#define TimerIntervalLoadMode ROM_TimerIntervalLoadMode +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/trng.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/trng.h index 08a485b4..e3cfd1e4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/trng.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/trng.h @@ -83,8 +83,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define TRNGConfigure NOROM_TRNGConfigure - #define TRNGNumberGet NOROM_TRNGNumberGet +#define TRNGConfigure NOROM_TRNGConfigure +#define TRNGNumberGet NOROM_TRNGNumberGet #endif //***************************************************************************** @@ -304,14 +304,14 @@ TRNGIntStatus(bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(TRNG_BASE + TRNG_O_IRQFLAGMASK); - return(ui32Mask & HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT)); + return (ui32Mask & HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT)); } else { - return(HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT) & 0x00000003); + return (HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT) & 0x00000003); } } @@ -420,15 +420,15 @@ TRNGIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_TRNGConfigure - #undef TRNGConfigure - #define TRNGConfigure ROM_TRNGConfigure - #endif - #ifdef ROM_TRNGNumberGet - #undef TRNGNumberGet - #define TRNGNumberGet ROM_TRNGNumberGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_TRNGConfigure +#undef TRNGConfigure +#define TRNGConfigure ROM_TRNGConfigure +#endif +#ifdef ROM_TRNGNumberGet +#undef TRNGNumberGet +#define TRNGNumberGet ROM_TRNGNumberGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/uart.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/uart.h index e9e71cad..05cd2eb8 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/uart.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/uart.h @@ -82,16 +82,16 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define UARTFIFOLevelGet NOROM_UARTFIFOLevelGet - #define UARTConfigSetExpClk NOROM_UARTConfigSetExpClk - #define UARTConfigGetExpClk NOROM_UARTConfigGetExpClk - #define UARTDisable NOROM_UARTDisable - #define UARTCharGetNonBlocking NOROM_UARTCharGetNonBlocking - #define UARTCharGet NOROM_UARTCharGet - #define UARTCharPutNonBlocking NOROM_UARTCharPutNonBlocking - #define UARTCharPut NOROM_UARTCharPut - #define UARTIntRegister NOROM_UARTIntRegister - #define UARTIntUnregister NOROM_UARTIntUnregister +#define UARTFIFOLevelGet NOROM_UARTFIFOLevelGet +#define UARTConfigSetExpClk NOROM_UARTConfigSetExpClk +#define UARTConfigGetExpClk NOROM_UARTConfigGetExpClk +#define UARTDisable NOROM_UARTDisable +#define UARTCharGetNonBlocking NOROM_UARTCharGetNonBlocking +#define UARTCharGet NOROM_UARTCharGet +#define UARTCharPutNonBlocking NOROM_UARTCharPutNonBlocking +#define UARTCharPut NOROM_UARTCharPut +#define UARTIntRegister NOROM_UARTIntRegister +#define UARTIntUnregister NOROM_UARTIntUnregister #endif //***************************************************************************** @@ -208,7 +208,7 @@ extern "C" static bool UARTBaseValid(uint32_t ui32Base) { - return(( ui32Base == UART0_BASE ) || ( ui32Base == UART0_NONBUF_BASE )); + return (( ui32Base == UART0_BASE ) || ( ui32Base == UART0_NONBUF_BASE )); } #endif @@ -273,8 +273,8 @@ UARTParityModeGet(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the current parity setting - return(HWREG(ui32Base + UART_O_LCRH) & - (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); + return (HWREG(ui32Base + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); } //***************************************************************************** @@ -348,8 +348,8 @@ UARTFIFOLevelSet(uint32_t ui32Base, uint32_t ui32TxLevel, //! \return None // //***************************************************************************** -extern void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t *pui32TxLevel, - uint32_t *pui32RxLevel); +extern void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t* pui32TxLevel, + uint32_t* pui32RxLevel); //***************************************************************************** // @@ -412,7 +412,7 @@ extern void UARTConfigSetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, // //***************************************************************************** extern void UARTConfigGetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, - uint32_t *pui32Baud, uint32_t *pui32Config); + uint32_t* pui32Baud, uint32_t* pui32Config); //***************************************************************************** // @@ -517,7 +517,7 @@ UARTCharsAvail(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the availability of characters. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); } //***************************************************************************** @@ -541,7 +541,7 @@ UARTSpaceAvail(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the availability of space. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); } //***************************************************************************** @@ -639,8 +639,8 @@ UARTBusy(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Determine if the UART is busy. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? - UART_BUSY : UART_IDLE); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? + UART_BUSY : UART_IDLE); } //***************************************************************************** @@ -666,7 +666,7 @@ UARTBreakCtl(uint32_t ui32Base, bool bBreakState) // Set the break condition as requested. HWREG(ui32Base + UART_O_LCRH) = - (bBreakState ? + (bBreakState ? (HWREG(ui32Base + UART_O_LCRH) | UART_LCRH_BRK) : (HWREG(ui32Base + UART_O_LCRH) & ~(UART_LCRH_BRK))); } @@ -811,13 +811,13 @@ UARTIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(ui32Base + UART_O_MIS)); + return (HWREG(ui32Base + UART_O_MIS)); } else { - return(HWREG(ui32Base + UART_O_RIS)); + return (HWREG(ui32Base + UART_O_RIS)); } } @@ -952,7 +952,7 @@ UARTRxErrorGet(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the current value of the receive status register. - return(HWREG(ui32Base + UART_O_RSR) & 0x0000000F); + return (HWREG(ui32Base + UART_O_RSR) & 0x0000000F); } //***************************************************************************** @@ -1028,47 +1028,47 @@ UARTHwFlowControlDisable( uint32_t ui32Base ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_UARTFIFOLevelGet - #undef UARTFIFOLevelGet - #define UARTFIFOLevelGet ROM_UARTFIFOLevelGet - #endif - #ifdef ROM_UARTConfigSetExpClk - #undef UARTConfigSetExpClk - #define UARTConfigSetExpClk ROM_UARTConfigSetExpClk - #endif - #ifdef ROM_UARTConfigGetExpClk - #undef UARTConfigGetExpClk - #define UARTConfigGetExpClk ROM_UARTConfigGetExpClk - #endif - #ifdef ROM_UARTDisable - #undef UARTDisable - #define UARTDisable ROM_UARTDisable - #endif - #ifdef ROM_UARTCharGetNonBlocking - #undef UARTCharGetNonBlocking - #define UARTCharGetNonBlocking ROM_UARTCharGetNonBlocking - #endif - #ifdef ROM_UARTCharGet - #undef UARTCharGet - #define UARTCharGet ROM_UARTCharGet - #endif - #ifdef ROM_UARTCharPutNonBlocking - #undef UARTCharPutNonBlocking - #define UARTCharPutNonBlocking ROM_UARTCharPutNonBlocking - #endif - #ifdef ROM_UARTCharPut - #undef UARTCharPut - #define UARTCharPut ROM_UARTCharPut - #endif - #ifdef ROM_UARTIntRegister - #undef UARTIntRegister - #define UARTIntRegister ROM_UARTIntRegister - #endif - #ifdef ROM_UARTIntUnregister - #undef UARTIntUnregister - #define UARTIntUnregister ROM_UARTIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_UARTFIFOLevelGet +#undef UARTFIFOLevelGet +#define UARTFIFOLevelGet ROM_UARTFIFOLevelGet +#endif +#ifdef ROM_UARTConfigSetExpClk +#undef UARTConfigSetExpClk +#define UARTConfigSetExpClk ROM_UARTConfigSetExpClk +#endif +#ifdef ROM_UARTConfigGetExpClk +#undef UARTConfigGetExpClk +#define UARTConfigGetExpClk ROM_UARTConfigGetExpClk +#endif +#ifdef ROM_UARTDisable +#undef UARTDisable +#define UARTDisable ROM_UARTDisable +#endif +#ifdef ROM_UARTCharGetNonBlocking +#undef UARTCharGetNonBlocking +#define UARTCharGetNonBlocking ROM_UARTCharGetNonBlocking +#endif +#ifdef ROM_UARTCharGet +#undef UARTCharGet +#define UARTCharGet ROM_UARTCharGet +#endif +#ifdef ROM_UARTCharPutNonBlocking +#undef UARTCharPutNonBlocking +#define UARTCharPutNonBlocking ROM_UARTCharPutNonBlocking +#endif +#ifdef ROM_UARTCharPut +#undef UARTCharPut +#define UARTCharPut ROM_UARTCharPut +#endif +#ifdef ROM_UARTIntRegister +#undef UARTIntRegister +#define UARTIntRegister ROM_UARTIntRegister +#endif +#ifdef ROM_UARTIntUnregister +#undef UARTIntUnregister +#define UARTIntUnregister ROM_UARTIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/udma.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/udma.h index 443da6ef..0ac722a5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/udma.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/udma.h @@ -82,14 +82,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define uDMAChannelAttributeEnable NOROM_uDMAChannelAttributeEnable - #define uDMAChannelAttributeDisable NOROM_uDMAChannelAttributeDisable - #define uDMAChannelAttributeGet NOROM_uDMAChannelAttributeGet - #define uDMAChannelControlSet NOROM_uDMAChannelControlSet - #define uDMAChannelTransferSet NOROM_uDMAChannelTransferSet - #define uDMAChannelScatterGatherSet NOROM_uDMAChannelScatterGatherSet - #define uDMAChannelSizeGet NOROM_uDMAChannelSizeGet - #define uDMAChannelModeGet NOROM_uDMAChannelModeGet +#define uDMAChannelAttributeEnable NOROM_uDMAChannelAttributeEnable +#define uDMAChannelAttributeDisable NOROM_uDMAChannelAttributeDisable +#define uDMAChannelAttributeGet NOROM_uDMAChannelAttributeGet +#define uDMAChannelControlSet NOROM_uDMAChannelControlSet +#define uDMAChannelTransferSet NOROM_uDMAChannelTransferSet +#define uDMAChannelScatterGatherSet NOROM_uDMAChannelScatterGatherSet +#define uDMAChannelSizeGet NOROM_uDMAChannelSizeGet +#define uDMAChannelModeGet NOROM_uDMAChannelModeGet #endif //***************************************************************************** @@ -102,8 +102,8 @@ extern "C" //***************************************************************************** typedef struct { - volatile void *pvSrcEndAddr; //!< The ending source address of the data transfer. - volatile void *pvDstEndAddr; //!< The ending destination address of the data transfer. + volatile void* pvSrcEndAddr; //!< The ending source address of the data transfer. + volatile void* pvDstEndAddr; //!< The ending destination address of the data transfer. volatile uint32_t ui32Control; //!< The channel control mode. volatile uint32_t ui32Spare; //!< An unused location. } @@ -185,19 +185,19 @@ tDMAControlTable; pvDstAddr, \ ui32ArbSize, \ ui32Mode) \ - { \ - (((ui32SrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ - ((void *)(&((uint8_t *)(pvSrcAddr))[((ui32TransferCount) << \ - ((ui32SrcIncrement) >> 26)) - 1]))), \ - (((ui32DstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ - ((void *)(&((uint8_t *)(pvDstAddr))[((ui32TransferCount) << \ - ((ui32DstIncrement) >> 30)) - 1]))), \ - (ui32SrcIncrement) | (ui32DstIncrement) | (ui32ItemSize) | \ - (ui32ArbSize) | (((ui32TransferCount) - 1) << 4) | \ - ((((ui32Mode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ - ((ui32Mode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ - (ui32Mode) | UDMA_MODE_ALT_SELECT : (ui32Mode)), 0 \ - } +{ \ + (((ui32SrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ + ((void *)(&((uint8_t *)(pvSrcAddr))[((ui32TransferCount) << \ + ((ui32SrcIncrement) >> 26)) - 1]))), \ + (((ui32DstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ + ((void *)(&((uint8_t *)(pvDstAddr))[((ui32TransferCount) << \ + ((ui32DstIncrement) >> 30)) - 1]))), \ + (ui32SrcIncrement) | (ui32DstIncrement) | (ui32ItemSize) | \ + (ui32ArbSize) | (((ui32TransferCount) - 1) << 4) | \ + ((((ui32Mode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ + ((ui32Mode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ + (ui32Mode) | UDMA_MODE_ALT_SELECT : (ui32Mode)), 0 \ +} //***************************************************************************** // @@ -237,9 +237,9 @@ tDMAControlTable; #define UDMA_MODE_AUTO 0x00000002 #define UDMA_MODE_PINGPONG 0x00000003 #define UDMA_MODE_MEM_SCATTER_GATHER \ - 0x00000004 + 0x00000004 #define UDMA_MODE_PER_SCATTER_GATHER \ - 0x00000006 + 0x00000006 #define UDMA_MODE_M 0x00000007 // uDMA Transfer Mode #define UDMA_MODE_ALT_SELECT 0x00000001 @@ -342,7 +342,7 @@ tDMAControlTable; static bool uDMABaseValid(uint32_t ui32Base) { - return(ui32Base == UDMA0_BASE); + return (ui32Base == UDMA0_BASE); } #endif @@ -410,7 +410,7 @@ uDMAErrorStatusGet(uint32_t ui32Base) ASSERT(uDMABaseValid(ui32Base)); // Return the uDMA error status. - return(HWREG(ui32Base + UDMA_O_ERROR)); + return (HWREG(ui32Base + UDMA_O_ERROR)); } //***************************************************************************** @@ -514,8 +514,8 @@ uDMAChannelIsEnabled(uint32_t ui32Base, uint32_t ui32ChannelNum) // AND the specified channel bit with the enable register, and return the // result. - return((HWREG(ui32Base + UDMA_O_SETCHANNELEN) & (1 << ui32ChannelNum)) ? - true : false); + return ((HWREG(ui32Base + UDMA_O_SETCHANNELEN) & (1 << ui32ChannelNum)) ? + true : false); } //***************************************************************************** @@ -547,7 +547,7 @@ uDMAChannelIsEnabled(uint32_t ui32Base, uint32_t ui32ChannelNum) // //***************************************************************************** __STATIC_INLINE void -uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) +uDMAControlBaseSet(uint32_t ui32Base, void* pControlTable) { // Check the arguments. ASSERT(uDMABaseValid(ui32Base)); @@ -572,7 +572,7 @@ uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) //! \return Returns a pointer to the base address of the channel control table. // //***************************************************************************** -__STATIC_INLINE void * +__STATIC_INLINE void* uDMAControlBaseGet(uint32_t ui32Base) { // Check the arguments. @@ -580,7 +580,7 @@ uDMAControlBaseGet(uint32_t ui32Base) ASSERT(uDMABaseValid(ui32Base)); // Read the current value of the control base register, and return it to // the caller. - return((void *)HWREG(ui32Base + UDMA_O_CTRL)); + return ((void*)HWREG(ui32Base + UDMA_O_CTRL)); } //***************************************************************************** @@ -596,7 +596,7 @@ uDMAControlBaseGet(uint32_t ui32Base) //! channel control table. // //***************************************************************************** -__STATIC_INLINE void * +__STATIC_INLINE void* uDMAControlAlternateBaseGet(uint32_t ui32Base) { // Check the arguments. @@ -604,7 +604,7 @@ uDMAControlAlternateBaseGet(uint32_t ui32Base) // Read the current value of the control base register, and return it to // the caller. - return((void *)HWREG(ui32Base + UDMA_O_ALTCTRL)); + return ((void*)HWREG(ui32Base + UDMA_O_ALTCTRL)); } //***************************************************************************** @@ -818,8 +818,8 @@ extern void uDMAChannelControlSet(uint32_t ui32Base, //***************************************************************************** extern void uDMAChannelTransferSet(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, - uint32_t ui32Mode, void *pvSrcAddr, - void *pvDstAddr, uint32_t ui32TransferSize); + uint32_t ui32Mode, void* pvSrcAddr, + void* pvDstAddr, uint32_t ui32TransferSize); //***************************************************************************** // @@ -852,7 +852,7 @@ extern void uDMAChannelTransferSet(uint32_t ui32Base, extern void uDMAChannelScatterGatherSet(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, - void *pvTaskList, + void* pvTaskList, uint32_t ui32IsPeriphSG); //***************************************************************************** @@ -1150,8 +1150,8 @@ uDMAChannelPriorityGet(uint32_t ui32Base, uint32_t ui32ChannelNum) ASSERT(ui32ChannelNum < UDMA_NUM_CHANNELS); // Return the channel priority. - return(HWREG(ui32Base + UDMA_O_SETCHNLPRIORITY) & (1 << ui32ChannelNum) ? - UDMA_PRIORITY_HIGH : UDMA_PRIORITY_LOW); + return (HWREG(ui32Base + UDMA_O_SETCHNLPRIORITY) & (1 << ui32ChannelNum) ? + UDMA_PRIORITY_HIGH : UDMA_PRIORITY_LOW); } //***************************************************************************** @@ -1185,39 +1185,39 @@ uDMAChannelPriorityClear(uint32_t ui32Base, uint32_t ui32ChannelNum) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_uDMAChannelAttributeEnable - #undef uDMAChannelAttributeEnable - #define uDMAChannelAttributeEnable ROM_uDMAChannelAttributeEnable - #endif - #ifdef ROM_uDMAChannelAttributeDisable - #undef uDMAChannelAttributeDisable - #define uDMAChannelAttributeDisable ROM_uDMAChannelAttributeDisable - #endif - #ifdef ROM_uDMAChannelAttributeGet - #undef uDMAChannelAttributeGet - #define uDMAChannelAttributeGet ROM_uDMAChannelAttributeGet - #endif - #ifdef ROM_uDMAChannelControlSet - #undef uDMAChannelControlSet - #define uDMAChannelControlSet ROM_uDMAChannelControlSet - #endif - #ifdef ROM_uDMAChannelTransferSet - #undef uDMAChannelTransferSet - #define uDMAChannelTransferSet ROM_uDMAChannelTransferSet - #endif - #ifdef ROM_uDMAChannelScatterGatherSet - #undef uDMAChannelScatterGatherSet - #define uDMAChannelScatterGatherSet ROM_uDMAChannelScatterGatherSet - #endif - #ifdef ROM_uDMAChannelSizeGet - #undef uDMAChannelSizeGet - #define uDMAChannelSizeGet ROM_uDMAChannelSizeGet - #endif - #ifdef ROM_uDMAChannelModeGet - #undef uDMAChannelModeGet - #define uDMAChannelModeGet ROM_uDMAChannelModeGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_uDMAChannelAttributeEnable +#undef uDMAChannelAttributeEnable +#define uDMAChannelAttributeEnable ROM_uDMAChannelAttributeEnable +#endif +#ifdef ROM_uDMAChannelAttributeDisable +#undef uDMAChannelAttributeDisable +#define uDMAChannelAttributeDisable ROM_uDMAChannelAttributeDisable +#endif +#ifdef ROM_uDMAChannelAttributeGet +#undef uDMAChannelAttributeGet +#define uDMAChannelAttributeGet ROM_uDMAChannelAttributeGet +#endif +#ifdef ROM_uDMAChannelControlSet +#undef uDMAChannelControlSet +#define uDMAChannelControlSet ROM_uDMAChannelControlSet +#endif +#ifdef ROM_uDMAChannelTransferSet +#undef uDMAChannelTransferSet +#define uDMAChannelTransferSet ROM_uDMAChannelTransferSet +#endif +#ifdef ROM_uDMAChannelScatterGatherSet +#undef uDMAChannelScatterGatherSet +#define uDMAChannelScatterGatherSet ROM_uDMAChannelScatterGatherSet +#endif +#ifdef ROM_uDMAChannelSizeGet +#undef uDMAChannelSizeGet +#define uDMAChannelSizeGet ROM_uDMAChannelSizeGet +#endif +#ifdef ROM_uDMAChannelModeGet +#undef uDMAChannelModeGet +#define uDMAChannelModeGet ROM_uDMAChannelModeGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/vims.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/vims.h index 9e6ecaf7..ac48eaf1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/vims.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/vims.h @@ -80,10 +80,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define VIMSConfigure NOROM_VIMSConfigure - #define VIMSModeSet NOROM_VIMSModeSet - #define VIMSModeGet NOROM_VIMSModeGet - #define VIMSModeSafeSet NOROM_VIMSModeSafeSet +#define VIMSConfigure NOROM_VIMSConfigure +#define VIMSModeSet NOROM_VIMSModeSet +#define VIMSModeGet NOROM_VIMSModeGet +#define VIMSModeSafeSet NOROM_VIMSModeSafeSet #endif //***************************************************************************** @@ -93,7 +93,7 @@ extern "C" // //***************************************************************************** #define VIMS_MODE_CHANGING 0x4 // VIMS mode is changing now and VIMS_MODE - // can not be changed at moment. +// can not be changed at moment. #define VIMS_MODE_DISABLED (VIMS_CTL_MODE_GPRAM) // Disabled mode (GPRAM enabled). #define VIMS_MODE_ENABLED (VIMS_CTL_MODE_CACHE) // Enabled mode, only USERCODE is cached. #define VIMS_MODE_OFF (VIMS_CTL_MODE_OFF) // VIMS Cache RAM is off @@ -120,7 +120,7 @@ extern "C" static bool VIMSBaseValid(uint32_t ui32Base) { - return(ui32Base == VIMS_BASE); + return (ui32Base == VIMS_BASE); } #endif @@ -277,8 +277,8 @@ extern uint32_t VIMSModeGet(uint32_t ui32Base); //! \sa \ref VIMSModeSet() and \ref VIMSModeGet() // //***************************************************************************** -extern void VIMSModeSafeSet( uint32_t ui32Base , - uint32_t ui32NewMode , +extern void VIMSModeSafeSet( uint32_t ui32Base, + uint32_t ui32NewMode, bool blocking ); //***************************************************************************** @@ -300,7 +300,7 @@ VIMSLineBufDisable(uint32_t ui32Base) { // Disable line buffers HWREG(ui32Base + VIMS_O_CTL) |= VIMS_CTL_IDCODE_LB_DIS_M | - VIMS_CTL_SYSBUS_LB_DIS_M; + VIMS_CTL_SYSBUS_LB_DIS_M; } //***************************************************************************** @@ -322,7 +322,7 @@ VIMSLineBufEnable(uint32_t ui32Base) { // Enable linebuffers HWREG(ui32Base + VIMS_O_CTL) &= ~(VIMS_CTL_IDCODE_LB_DIS_M | - VIMS_CTL_SYSBUS_LB_DIS_M); + VIMS_CTL_SYSBUS_LB_DIS_M); } //***************************************************************************** @@ -332,23 +332,23 @@ VIMSLineBufEnable(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_VIMSConfigure - #undef VIMSConfigure - #define VIMSConfigure ROM_VIMSConfigure - #endif - #ifdef ROM_VIMSModeSet - #undef VIMSModeSet - #define VIMSModeSet ROM_VIMSModeSet - #endif - #ifdef ROM_VIMSModeGet - #undef VIMSModeGet - #define VIMSModeGet ROM_VIMSModeGet - #endif - #ifdef ROM_VIMSModeSafeSet - #undef VIMSModeSafeSet - #define VIMSModeSafeSet ROM_VIMSModeSafeSet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_VIMSConfigure +#undef VIMSConfigure +#define VIMSConfigure ROM_VIMSConfigure +#endif +#ifdef ROM_VIMSModeSet +#undef VIMSModeSet +#define VIMSModeSet ROM_VIMSModeSet +#endif +#ifdef ROM_VIMSModeGet +#undef VIMSModeGet +#define VIMSModeGet ROM_VIMSModeGet +#endif +#ifdef ROM_VIMSModeSafeSet +#undef VIMSModeSafeSet +#define VIMSModeSafeSet ROM_VIMSModeSafeSet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/watchdog.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/watchdog.h index 373fb528..a964eb38 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/watchdog.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/driverlib/watchdog.h @@ -114,7 +114,7 @@ __STATIC_INLINE bool WatchdogRunning(void) { // See if the watchdog timer module is enabled, and return. - return((HWREG(WDT_BASE + WDT_O_CTL) & WDT_CTL_INTEN) ? true : false); + return ((HWREG(WDT_BASE + WDT_O_CTL) & WDT_CTL_INTEN) ? true : false); } //***************************************************************************** @@ -231,8 +231,8 @@ __STATIC_INLINE bool WatchdogLockState(void) { // Get the lock state. - return((HWREG(WDT_BASE + WDT_O_LOCK) == WATCHDOG_LOCK_LOCKED) ? - true : false); + return ((HWREG(WDT_BASE + WDT_O_LOCK) == WATCHDOG_LOCK_LOCKED) ? + true : false); } //***************************************************************************** @@ -277,7 +277,7 @@ __STATIC_INLINE uint32_t WatchdogReloadGet(void) { // Get the load register. - return(HWREG(WDT_BASE + WDT_O_LOAD)); + return (HWREG(WDT_BASE + WDT_O_LOAD)); } //***************************************************************************** @@ -293,7 +293,7 @@ __STATIC_INLINE uint32_t WatchdogValueGet(void) { // Get the current watchdog timer register value. - return(HWREG(WDT_BASE + WDT_O_VALUE)); + return (HWREG(WDT_BASE + WDT_O_VALUE)); } //***************************************************************************** @@ -397,7 +397,7 @@ WatchdogIntStatus(void) { // Return either the interrupt status or the raw interrupt status as // requested. - return(HWREG(WDT_BASE + WDT_O_RIS)); + return (HWREG(WDT_BASE + WDT_O_RIS)); } //***************************************************************************** @@ -458,7 +458,7 @@ WatchdogIntTypeSet(uint32_t ui32Type) (ui32Type == WATCHDOG_INT_TYPE_NMI)); // Set the interrupt type. - HWREGBITW(WDT_BASE + WDT_O_CTL, WDT_CTL_INTTYPE_BITN) = (ui32Type == WATCHDOG_INT_TYPE_INT)? 0 : 1; + HWREGBITW(WDT_BASE + WDT_O_CTL, WDT_CTL_INTTYPE_BITN) = (ui32Type == WATCHDOG_INT_TYPE_INT) ? 0 : 1; } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/asmdefs.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/asmdefs.h index 1768b4c4..ddb53153 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/asmdefs.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/asmdefs.h @@ -46,27 +46,27 @@ //***************************************************************************** #ifdef __IAR_SYSTEMS_ICC__ -// -// Section headers. -// -#define __LIBRARY__ module -#define __TEXT__ rseg CODE:CODE(2) -#define __DATA__ rseg DATA:DATA(2) -#define __BSS__ rseg DATA:DATA(2) -#define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) - -// -// Assembler mnemonics. -// -#define __ALIGN__ alignrom 2 -#define __END__ end -#define __EXPORT__ export -#define __IMPORT__ import -#define __LABEL__ -#define __STR__ dcb -#define __THUMB_LABEL__ thumb -#define __WORD__ dcd -#define __INLINE_DATA__ data + // + // Section headers. + // + #define __LIBRARY__ module + #define __TEXT__ rseg CODE:CODE(2) + #define __DATA__ rseg DATA:DATA(2) + #define __BSS__ rseg DATA:DATA(2) + #define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) + + // + // Assembler mnemonics. + // + #define __ALIGN__ alignrom 2 + #define __END__ end + #define __EXPORT__ export + #define __IMPORT__ import + #define __LABEL__ + #define __STR__ dcb + #define __THUMB_LABEL__ thumb + #define __WORD__ dcd + #define __INLINE_DATA__ data #endif // __IAR_SYSTEMS_ICC__ @@ -77,34 +77,34 @@ //***************************************************************************** #if defined(__GNUC__) -// -// The assembly code preamble required to put the assembler into the correct -// configuration. -// + // + // The assembly code preamble required to put the assembler into the correct + // configuration. + // .syntax unified .thumb -// -// Section headers. -// -#define __LIBRARY__ @ -#define __TEXT__ .text -#define __DATA__ .data -#define __BSS__ .bss -#define __TEXT_NOROOT__ .text - -// -// Assembler mnemonics. -// -#define __ALIGN__ .balign 4 -#define __END__ .end -#define __EXPORT__ .globl -#define __IMPORT__ .extern -#define __LABEL__ : -#define __STR__ .ascii -#define __THUMB_LABEL__ .thumb_func -#define __WORD__ .word -#define __INLINE_DATA__ + // + // Section headers. + // + #define __LIBRARY__ @ + #define __TEXT__ .text + #define __DATA__ .data + #define __BSS__ .bss + #define __TEXT_NOROOT__ .text + + // + // Assembler mnemonics. + // + #define __ALIGN__ .balign 4 + #define __END__ .end + #define __EXPORT__ .globl + #define __IMPORT__ .extern + #define __LABEL__ : + #define __STR__ .ascii + #define __THUMB_LABEL__ .thumb_func + #define __WORD__ .word + #define __INLINE_DATA__ #endif // __GNUC__ @@ -115,35 +115,35 @@ //***************************************************************************** #if defined(__CC_ARM) -// -// The assembly code preamble required to put the assembler into the correct -// configuration. -// + // + // The assembly code preamble required to put the assembler into the correct + // configuration. + // thumb require8 preserve8 -// -// Section headers. -// -#define __LIBRARY__ ; -#define __TEXT__ area ||.text||, code, readonly, align=2 -#define __DATA__ area ||.data||, data, align=2 -#define __BSS__ area ||.bss||, noinit, align=2 -#define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 - -// -// Assembler mnemonics. -// -#define __ALIGN__ align 4 -#define __END__ end -#define __EXPORT__ export -#define __IMPORT__ import -#define __LABEL__ -#define __STR__ dcb -#define __THUMB_LABEL__ -#define __WORD__ dcd -#define __INLINE_DATA__ + // + // Section headers. + // + #define __LIBRARY__ ; + #define __TEXT__ area ||.text||, code, readonly, align=2 + #define __DATA__ area ||.data||, data, align=2 + #define __BSS__ area ||.bss||, noinit, align=2 + #define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 + + // + // Assembler mnemonics. + // + #define __ALIGN__ align 4 + #define __END__ end + #define __EXPORT__ export + #define __IMPORT__ import + #define __LABEL__ + #define __STR__ dcb + #define __THUMB_LABEL__ + #define __WORD__ dcd + #define __INLINE_DATA__ #endif // __CC_ARM diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_adi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_adi.h index d55fe0fd..7e7b603c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_adi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_adi.h @@ -155,24 +155,24 @@ // //***************************************************************************** #define ADI_O_DIR 0x00000000 // Offset for the direct access - // instruction +// instruction #define ADI_O_SET 0x00000010 // Offset for 'Set' instruction. #define ADI_O_CLR 0x00000020 // Offset for 'Clear' instruction. #define ADI_O_MASK4B 0x00000040 // Offset for 4-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). - // Bits 7:4 are mask. Bits 3:0 are data. - // Requires 'byte' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). +// Bits 7:4 are mask. Bits 3:0 are data. +// Requires 'byte' write. #define ADI_O_MASK8B 0x00000060 // Offset for 8-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). Bits 15:8 are - // mask. Bits 7:0 are data. Requires - // 'short' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). Bits 15:8 are +// mask. Bits 7:0 are data. Requires +// 'short' write. #define ADI_O_MASK16B 0x00000080 // Offset for 16-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). Bits 31:16 - // are mask. Bits 15:0 are data. - // Requires 'long' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). Bits 31:16 +// are mask. Bits 15:0 are data. +// Requires 'long' write. //***************************************************************************** // @@ -189,16 +189,16 @@ // //***************************************************************************** #define ADI_SLAVESTAT_DI_REQ 0x00000002 // Read current value of DI_REQ - // signal. Writing 0 to this bit - // forces a sync with slave, - // ensuring that req will be 0. It - // is recommended to write 0 to - // this register before power down - // of the master. +// signal. Writing 0 to this bit +// forces a sync with slave, +// ensuring that req will be 0. It +// is recommended to write 0 to +// this register before power down +// of the master. #define ADI_SLAVESTAT_DI_REQ_M 0x00000002 #define ADI_SLAVESTAT_DI_REQ_S 1 #define ADI_SLAVESTAT_DI_ACK 0x00000001 // Read current value of DI_ACK - // signal +// signal #define ADI_SLAVESTAT_DI_ACK_M 0x00000001 #define ADI_SLAVESTAT_DI_ACK_S 0 //***************************************************************************** @@ -208,38 +208,38 @@ // //***************************************************************************** #define ADI_SLAVECONF_CONFLOCK 0x00000080 // This register is no longer - // accessible when this bit is set. - // (unless sticky_bit_overwrite is - // asserted on top module) +// accessible when this bit is set. +// (unless sticky_bit_overwrite is +// asserted on top module) #define ADI_SLAVECONF_CONFLOCK_M \ - 0x00000080 + 0x00000080 #define ADI_SLAVECONF_CONFLOCK_S 7 #define ADI_SLAVECONF_WAITFORACK \ - 0x00000004 // A transaction on the ADI - // interface does not end until ack - // has been received from the slave - // when this bit is set. + 0x00000004 // A transaction on the ADI +// interface does not end until ack +// has been received from the slave +// when this bit is set. #define ADI_SLAVECONF_WAITFORACK_M \ - 0x00000004 + 0x00000004 #define ADI_SLAVECONF_WAITFORACK_S 2 #define ADI_SLAVECONF_ADICLKSPEED_M \ - 0x00000003 // Sets the period of an ADI - // transactions. All transactions - // takes an even number of clock - // cycles,- ADI clock rising edge - // occurs in the middle of the - // period. Data and ctrl to slave - // is set up in beginning of cycle, - // and data from slave is read in - // after the transaction 00: An ADI - // transaction takes 2 master clock - // cyclkes 01: An ADI transaction - // takes 4 master clock cycles 10: - // And ADI Transaction takes 8 - // master clock cycles 11: An ADI - // transaction takes 16 master - // clock cycles + 0x00000003 // Sets the period of an ADI +// transactions. All transactions +// takes an even number of clock +// cycles,- ADI clock rising edge +// occurs in the middle of the +// period. Data and ctrl to slave +// is set up in beginning of cycle, +// and data from slave is read in +// after the transaction 00: An ADI +// transaction takes 2 master clock +// cyclkes 01: An ADI transaction +// takes 4 master clock cycles 10: +// And ADI Transaction takes 8 +// master clock cycles 11: An ADI +// transaction takes 16 master +// clock cycles #define ADI_SLAVECONF_ADICLKSPEED_S 0 @@ -251,104 +251,104 @@ // //***************************************************************************** #define ADI_O_DIR03 0x00000000 // Direct access for adi byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_DIR47 0x00000004 // Direct access for adi byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_DIR811 0x00000008 // Direct access for adi byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_DIR1215 0x0000000C // Direct access for adi byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_SET03 0x00000010 // Set register for ADI byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_SET47 0x00000014 // Set register for ADI byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_SET811 0x00000018 // Set register for ADI byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_SET1215 0x0000001C // Set register for ADI byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_CLR03 0x00000020 // Clear register for ADI byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_CLR47 0x00000024 // Clear register for ADI byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_CLR811 0x00000028 // Clear register for ADI byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_CLR1215 0x0000002C // Clear register for ADI byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_SLAVESTAT 0x00000030 // ADI Slave status register #define ADI_O_SLAVECONF 0x00000038 // ADI Master configuration - // register +// register #define ADI_O_MASK4B01 0x00000040 // Masked access (4m/4d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK4B23 0x00000044 // Masked access (4m/4d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK4B45 0x00000048 // Masked access (4m/4d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK4B67 0x0000004C // Masked access (4m/4d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK4B89 0x00000050 // Masked access (4m/4d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK4B1011 0x00000054 // Masked access (4m/4d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK4B1213 0x00000058 // Masked access (4m/4d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK4B1415 0x0000005C // Masked access (4m/4d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 #define ADI_O_MASK8B01 0x00000060 // Masked access (8m/8d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK8B23 0x00000064 // Masked access (8m/8d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK8B45 0x00000068 // Masked access (8m/8d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK8B67 0x0000006C // Masked access (8m/8d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK8B89 0x00000070 // Masked access (8m/8d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK8B1011 0x00000074 // Masked access (8m/8d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK8B1213 0x00000078 // Masked access (8m/8d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK8B1415 0x0000007C // Masked access (8m/8d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 #define ADI_O_MASK16B01 0x00000080 // Masked access (16m/16d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK16B23 0x00000084 // Masked access (16m/16d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK16B45 0x00000088 // Masked access (16m/16d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK16B67 0x0000008C // Masked access (16m/16d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK16B89 0x00000090 // Masked access (16m/16d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK16B1011 0x00000094 // Masked access (16m/16d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK16B1213 0x00000098 // Masked access (16m/16d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK16B1415 0x0000009C // Masked access (16m/16d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 //***************************************************************************** // @@ -382,10 +382,10 @@ // //***************************************************************************** #define ADI_DIR811_B3_M 0xFF000000 // Direct access to ADI register - // 11 +// 11 #define ADI_DIR811_B3_S 24 #define ADI_DIR811_B2_M 0x00FF0000 // Direct access to ADI register - // 10 +// 10 #define ADI_DIR811_B2_S 16 #define ADI_DIR811_B1_M 0x0000FF00 // Direct access to ADI register 9 #define ADI_DIR811_B1_S 8 @@ -397,16 +397,16 @@ // //***************************************************************************** #define ADI_DIR1215_B3_M 0xFF000000 // Direct access to ADI register - // 15 +// 15 #define ADI_DIR1215_B3_S 24 #define ADI_DIR1215_B2_M 0x00FF0000 // Direct access to ADI register - // 14 +// 14 #define ADI_DIR1215_B2_S 16 #define ADI_DIR1215_B1_M 0x0000FF00 // Direct access to ADI register - // 13 +// 13 #define ADI_DIR1215_B1_S 8 #define ADI_DIR1215_B0_M 0x000000FF // Direct access to ADI register - // 12 +// 12 #define ADI_DIR1215_B0_S 0 //***************************************************************************** // @@ -414,20 +414,20 @@ // //***************************************************************************** #define ADI_SET03_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 3. Read returns 0. +// corresponding bit in ADI +// register 3. Read returns 0. #define ADI_SET03_S3_S 24 #define ADI_SET03_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 2. Read returns 0. +// corresponding bit in ADI +// register 2. Read returns 0. #define ADI_SET03_S2_S 16 #define ADI_SET03_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 1. Read returns 0. +// corresponding bit in ADI +// register 1. Read returns 0. #define ADI_SET03_S1_S 8 #define ADI_SET03_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 0. Read returns 0. +// corresponding bit in ADI +// register 0. Read returns 0. #define ADI_SET03_S0_S 0 //***************************************************************************** // @@ -435,20 +435,20 @@ // //***************************************************************************** #define ADI_SET47_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 7. Read returns 0. +// corresponding bit in ADI +// register 7. Read returns 0. #define ADI_SET47_S3_S 24 #define ADI_SET47_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 6. Read returns 0. +// corresponding bit in ADI +// register 6. Read returns 0. #define ADI_SET47_S2_S 16 #define ADI_SET47_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 5. Read returns 0. +// corresponding bit in ADI +// register 5. Read returns 0. #define ADI_SET47_S1_S 8 #define ADI_SET47_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 4. Read returns 0. +// corresponding bit in ADI +// register 4. Read returns 0. #define ADI_SET47_S0_S 0 //***************************************************************************** // @@ -456,20 +456,20 @@ // //***************************************************************************** #define ADI_SET811_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 11. Read returns 0. +// corresponding bit in ADI +// register 11. Read returns 0. #define ADI_SET811_S3_S 24 #define ADI_SET811_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 10. Read returns 0. +// corresponding bit in ADI +// register 10. Read returns 0. #define ADI_SET811_S2_S 16 #define ADI_SET811_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 9. Read returns 0. +// corresponding bit in ADI +// register 9. Read returns 0. #define ADI_SET811_S1_S 8 #define ADI_SET811_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 8. Read returns 0. +// corresponding bit in ADI +// register 8. Read returns 0. #define ADI_SET811_S0_S 0 //***************************************************************************** // @@ -477,20 +477,20 @@ // //***************************************************************************** #define ADI_SET1215_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 15. Read returns 0. +// corresponding bit in ADI +// register 15. Read returns 0. #define ADI_SET1215_S3_S 24 #define ADI_SET1215_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 14. Read returns 0. +// corresponding bit in ADI +// register 14. Read returns 0. #define ADI_SET1215_S2_S 16 #define ADI_SET1215_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 13. Read returns 0. +// corresponding bit in ADI +// register 13. Read returns 0. #define ADI_SET1215_S1_S 8 #define ADI_SET1215_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 12. Read returns 0. +// corresponding bit in ADI +// register 12. Read returns 0. #define ADI_SET1215_S0_S 0 //***************************************************************************** // @@ -498,20 +498,20 @@ // //***************************************************************************** #define ADI_CLR03_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 3 +// corresponding bit in ADI +// register 3 #define ADI_CLR03_S3_S 24 #define ADI_CLR03_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 2 +// corresponding bit in ADI +// register 2 #define ADI_CLR03_S2_S 16 #define ADI_CLR03_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 1 +// corresponding bit in ADI +// register 1 #define ADI_CLR03_S1_S 8 #define ADI_CLR03_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 0 +// corresponding bit in ADI +// register 0 #define ADI_CLR03_S0_S 0 //***************************************************************************** // @@ -519,20 +519,20 @@ // //***************************************************************************** #define ADI_CLR47_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 7 +// corresponding bit in ADI +// register 7 #define ADI_CLR47_S3_S 24 #define ADI_CLR47_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 6 +// corresponding bit in ADI +// register 6 #define ADI_CLR47_S2_S 16 #define ADI_CLR47_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 5 +// corresponding bit in ADI +// register 5 #define ADI_CLR47_S1_S 8 #define ADI_CLR47_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 4 +// corresponding bit in ADI +// register 4 #define ADI_CLR47_S0_S 0 //***************************************************************************** // @@ -540,20 +540,20 @@ // //***************************************************************************** #define ADI_CLR811_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 11 +// corresponding bit in ADI +// register 11 #define ADI_CLR811_S3_S 24 #define ADI_CLR811_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 10 +// corresponding bit in ADI +// register 10 #define ADI_CLR811_S2_S 16 #define ADI_CLR811_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 9 +// corresponding bit in ADI +// register 9 #define ADI_CLR811_S1_S 8 #define ADI_CLR811_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 8 +// corresponding bit in ADI +// register 8 #define ADI_CLR811_S0_S 0 //***************************************************************************** // @@ -561,20 +561,20 @@ // //***************************************************************************** #define ADI_CLR1215_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 15 +// corresponding bit in ADI +// register 15 #define ADI_CLR1215_S3_S 24 #define ADI_CLR1215_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 14 +// corresponding bit in ADI +// register 14 #define ADI_CLR1215_S2_S 16 #define ADI_CLR1215_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 13 +// corresponding bit in ADI +// register 13 #define ADI_CLR1215_S1_S 8 #define ADI_CLR1215_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 12 +// corresponding bit in ADI +// register 12 #define ADI_CLR1215_S0_S 0 //***************************************************************************** // @@ -583,16 +583,16 @@ // //***************************************************************************** #define ADI_SLAVESTAT_DI_REQ 0x00000002 // Read current value of DI_REQ - // signal. Writing 0 to this bit - // forces a sync with slave, - // ensuring that req will be 0. It - // is recommended to write 0 to - // this register before power down - // of the master. +// signal. Writing 0 to this bit +// forces a sync with slave, +// ensuring that req will be 0. It +// is recommended to write 0 to +// this register before power down +// of the master. #define ADI_SLAVESTAT_DI_REQ_M 0x00000002 #define ADI_SLAVESTAT_DI_REQ_S 1 #define ADI_SLAVESTAT_DI_ACK 0x00000001 // Read current value of DI_ACK - // signal +// signal #define ADI_SLAVESTAT_DI_ACK_M 0x00000001 #define ADI_SLAVESTAT_DI_ACK_S 0 //***************************************************************************** @@ -602,38 +602,38 @@ // //***************************************************************************** #define ADI_SLAVECONF_CONFLOCK 0x00000080 // This register is no longer - // accessible when this bit is set. - // (unless sticky_bit_overwrite is - // asserted on top module) +// accessible when this bit is set. +// (unless sticky_bit_overwrite is +// asserted on top module) #define ADI_SLAVECONF_CONFLOCK_M \ - 0x00000080 + 0x00000080 #define ADI_SLAVECONF_CONFLOCK_S 7 #define ADI_SLAVECONF_WAITFORACK \ - 0x00000004 // A transaction on the ADI - // interface does not end until ack - // has been received from the slave - // when this bit is set. + 0x00000004 // A transaction on the ADI +// interface does not end until ack +// has been received from the slave +// when this bit is set. #define ADI_SLAVECONF_WAITFORACK_M \ - 0x00000004 + 0x00000004 #define ADI_SLAVECONF_WAITFORACK_S 2 #define ADI_SLAVECONF_ADICLKSPEED_M \ - 0x00000003 // Sets the period of an ADI - // transactions. All transactions - // takes an even number of clock - // cycles,- ADI clock rising edge - // occurs in the middle of the - // period. Data and ctrl to slave - // is set up in beginning of cycle, - // and data from slave is read in - // after the transaction 00: An ADI - // transaction takes 2 master clock - // cyclkes 01: An ADI transaction - // takes 4 master clock cycles 10: - // And ADI Transaction takes 8 - // master clock cycles 11: An ADI - // transaction takes 16 master - // clock cycles + 0x00000003 // Sets the period of an ADI +// transactions. All transactions +// takes an even number of clock +// cycles,- ADI clock rising edge +// occurs in the middle of the +// period. Data and ctrl to slave +// is set up in beginning of cycle, +// and data from slave is read in +// after the transaction 00: An ADI +// transaction takes 2 master clock +// cyclkes 01: An ADI transaction +// takes 4 master clock cycles 10: +// And ADI Transaction takes 8 +// master clock cycles 11: An ADI +// transaction takes 16 master +// clock cycles #define ADI_SLAVECONF_ADICLKSPEED_S 0 //***************************************************************************** @@ -642,36 +642,36 @@ // //***************************************************************************** #define ADI_MASK4B01_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 1 +// register 1 #define ADI_MASK4B01_M1H_S 28 #define ADI_MASK4B01_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 1, - only bits selected - // by mask M1H will be affected by - // access +// register 1, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B01_D1H_S 24 #define ADI_MASK4B01_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 1 +// register 1 #define ADI_MASK4B01_M1L_S 20 #define ADI_MASK4B01_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 1, - only bits selected - // by mask M1L will be affected by - // access +// register 1, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B01_D1L_S 16 #define ADI_MASK4B01_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 0 +// register 0 #define ADI_MASK4B01_M0H_S 12 #define ADI_MASK4B01_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 0, - only bits selected - // by mask M0H will be affected by - // access +// register 0, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B01_D0H_S 8 #define ADI_MASK4B01_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 0 +// register 0 #define ADI_MASK4B01_M0L_S 4 #define ADI_MASK4B01_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 0, - only bits selected - // by mask M0L will be affected by - // access +// register 0, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B01_D0L_S 0 //***************************************************************************** // @@ -679,36 +679,36 @@ // //***************************************************************************** #define ADI_MASK4B23_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 3 +// register 3 #define ADI_MASK4B23_M1H_S 28 #define ADI_MASK4B23_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 3, - only bits selected - // by mask M1H will be affected by - // access +// register 3, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B23_D1H_S 24 #define ADI_MASK4B23_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 3 +// register 3 #define ADI_MASK4B23_M1L_S 20 #define ADI_MASK4B23_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 3, - only bits selected - // by mask M1L will be affected by - // access +// register 3, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B23_D1L_S 16 #define ADI_MASK4B23_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 2 +// register 2 #define ADI_MASK4B23_M0H_S 12 #define ADI_MASK4B23_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 2, - only bits selected - // by mask M0H will be affected by - // access +// register 2, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B23_D0H_S 8 #define ADI_MASK4B23_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 2 +// register 2 #define ADI_MASK4B23_M0L_S 4 #define ADI_MASK4B23_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 2, - only bits selected - // by mask M0L will be affected by - // access +// register 2, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B23_D0L_S 0 //***************************************************************************** // @@ -716,36 +716,36 @@ // //***************************************************************************** #define ADI_MASK4B45_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 5 +// register 5 #define ADI_MASK4B45_M1H_S 28 #define ADI_MASK4B45_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 5, - only bits selected - // by mask M1H will be affected by - // access +// register 5, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B45_D1H_S 24 #define ADI_MASK4B45_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 5 +// register 5 #define ADI_MASK4B45_M1L_S 20 #define ADI_MASK4B45_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 5, - only bits selected - // by mask M1L will be affected by - // access +// register 5, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B45_D1L_S 16 #define ADI_MASK4B45_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 4 +// register 4 #define ADI_MASK4B45_M0H_S 12 #define ADI_MASK4B45_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 4, - only bits selected - // by mask M0H will be affected by - // access +// register 4, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B45_D0H_S 8 #define ADI_MASK4B45_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 4 +// register 4 #define ADI_MASK4B45_M0L_S 4 #define ADI_MASK4B45_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 4, - only bits selected - // by mask M0L will be affected by - // access +// register 4, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B45_D0L_S 0 //***************************************************************************** // @@ -753,36 +753,36 @@ // //***************************************************************************** #define ADI_MASK4B67_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 7 +// register 7 #define ADI_MASK4B67_M1H_S 28 #define ADI_MASK4B67_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 7, - only bits selected - // by mask M1H will be affected by - // access +// register 7, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B67_D1H_S 24 #define ADI_MASK4B67_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 7 +// register 7 #define ADI_MASK4B67_M1L_S 20 #define ADI_MASK4B67_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 7, - only bits selected - // by mask M1L will be affected by - // access +// register 7, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B67_D1L_S 16 #define ADI_MASK4B67_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 6 +// register 6 #define ADI_MASK4B67_M0H_S 12 #define ADI_MASK4B67_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 6, - only bits selected - // by mask M0H will be affected by - // access +// register 6, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B67_D0H_S 8 #define ADI_MASK4B67_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 6 +// register 6 #define ADI_MASK4B67_M0L_S 4 #define ADI_MASK4B67_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 6, - only bits selected - // by mask M0L will be affected by - // access +// register 6, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B67_D0L_S 0 //***************************************************************************** // @@ -790,36 +790,36 @@ // //***************************************************************************** #define ADI_MASK4B89_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 9 +// register 9 #define ADI_MASK4B89_M1H_S 28 #define ADI_MASK4B89_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 9, - only bits selected - // by mask M1H will be affected by - // access +// register 9, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B89_D1H_S 24 #define ADI_MASK4B89_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 9 +// register 9 #define ADI_MASK4B89_M1L_S 20 #define ADI_MASK4B89_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 9, - only bits selected - // by mask M1L will be affected by - // access +// register 9, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B89_D1L_S 16 #define ADI_MASK4B89_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 8 +// register 8 #define ADI_MASK4B89_M0H_S 12 #define ADI_MASK4B89_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 8, - only bits selected - // by mask M0H will be affected by - // access +// register 8, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B89_D0H_S 8 #define ADI_MASK4B89_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 8 +// register 8 #define ADI_MASK4B89_M0L_S 4 #define ADI_MASK4B89_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 8, - only bits selected - // by mask M0L will be affected by - // access +// register 8, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B89_D0L_S 0 //***************************************************************************** // @@ -828,36 +828,36 @@ // //***************************************************************************** #define ADI_MASK4B1011_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 11 +// register 11 #define ADI_MASK4B1011_M1H_S 28 #define ADI_MASK4B1011_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 11, - only bits - // selected by mask M1H will be - // affected by access +// register 11, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1011_D1H_S 24 #define ADI_MASK4B1011_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 11 +// register 11 #define ADI_MASK4B1011_M1L_S 20 #define ADI_MASK4B1011_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 11, - only bits - // selected by mask M1L will be - // affected by access +// register 11, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1011_D1L_S 16 #define ADI_MASK4B1011_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 10 +// register 10 #define ADI_MASK4B1011_M0H_S 12 #define ADI_MASK4B1011_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 10, - only bits - // selected by mask M0H will be - // affected by access +// register 10, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1011_D0H_S 8 #define ADI_MASK4B1011_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 10 +// register 10 #define ADI_MASK4B1011_M0L_S 4 #define ADI_MASK4B1011_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 10, - only bits - // selected by mask M0L will be - // affected by access +// register 10, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1011_D0L_S 0 //***************************************************************************** // @@ -866,36 +866,36 @@ // //***************************************************************************** #define ADI_MASK4B1213_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 13 +// register 13 #define ADI_MASK4B1213_M1H_S 28 #define ADI_MASK4B1213_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 13, - only bits - // selected by mask M1H will be - // affected by access +// register 13, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1213_D1H_S 24 #define ADI_MASK4B1213_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 13 +// register 13 #define ADI_MASK4B1213_M1L_S 20 #define ADI_MASK4B1213_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 13, - only bits - // selected by mask M1L will be - // affected by access +// register 13, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1213_D1L_S 16 #define ADI_MASK4B1213_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 12 +// register 12 #define ADI_MASK4B1213_M0H_S 12 #define ADI_MASK4B1213_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 12, - only bits - // selected by mask M0H will be - // affected by access +// register 12, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1213_D0H_S 8 #define ADI_MASK4B1213_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 12 +// register 12 #define ADI_MASK4B1213_M0L_S 4 #define ADI_MASK4B1213_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 12, - only bits - // selected by mask M0L will be - // affected by access +// register 12, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1213_D0L_S 0 //***************************************************************************** // @@ -904,36 +904,36 @@ // //***************************************************************************** #define ADI_MASK4B1415_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 15 +// register 15 #define ADI_MASK4B1415_M1H_S 28 #define ADI_MASK4B1415_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 15, - only bits - // selected by mask M1H will be - // affected by access +// register 15, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1415_D1H_S 24 #define ADI_MASK4B1415_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 15 +// register 15 #define ADI_MASK4B1415_M1L_S 20 #define ADI_MASK4B1415_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 15, - only bits - // selected by mask M1L will be - // affected by access +// register 15, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1415_D1L_S 16 #define ADI_MASK4B1415_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 14 +// register 14 #define ADI_MASK4B1415_M0H_S 12 #define ADI_MASK4B1415_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 14, - only bits - // selected by mask M0H will be - // affected by access +// register 14, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1415_D0H_S 8 #define ADI_MASK4B1415_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 14 +// register 14 #define ADI_MASK4B1415_M0L_S 4 #define ADI_MASK4B1415_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 14, - only bits - // selected by mask M0L will be - // affected by access +// register 14, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1415_D0L_S 0 //***************************************************************************** // @@ -943,14 +943,14 @@ #define ADI_MASK8B01_M1_M 0xFF000000 // Mask for ADI register 1 #define ADI_MASK8B01_M1_S 24 #define ADI_MASK8B01_D1_M 0x00FF0000 // Data for ADI register 1, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B01_D1_S 16 #define ADI_MASK8B01_M0_M 0x0000FF00 // Mask for ADI register 0 #define ADI_MASK8B01_M0_S 8 #define ADI_MASK8B01_D0_M 0x000000FF // Data for ADI register 0, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B01_D0_S 0 //***************************************************************************** // @@ -960,14 +960,14 @@ #define ADI_MASK8B23_M1_M 0xFF000000 // Mask for ADI register 3 #define ADI_MASK8B23_M1_S 24 #define ADI_MASK8B23_D1_M 0x00FF0000 // Data for ADI register 3, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B23_D1_S 16 #define ADI_MASK8B23_M0_M 0x0000FF00 // Mask for ADI register 2 #define ADI_MASK8B23_M0_S 8 #define ADI_MASK8B23_D0_M 0x000000FF // Data for ADI register 2, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B23_D0_S 0 //***************************************************************************** // @@ -977,14 +977,14 @@ #define ADI_MASK8B45_M1_M 0xFF000000 // Mask for ADI register 5 #define ADI_MASK8B45_M1_S 24 #define ADI_MASK8B45_D1_M 0x00FF0000 // Data for ADI register 5, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B45_D1_S 16 #define ADI_MASK8B45_M0_M 0x0000FF00 // Mask for ADI register 4 #define ADI_MASK8B45_M0_S 8 #define ADI_MASK8B45_D0_M 0x000000FF // Data for ADI register 4, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B45_D0_S 0 //***************************************************************************** // @@ -994,14 +994,14 @@ #define ADI_MASK8B67_M1_M 0xFF000000 // Mask for ADI register 7 #define ADI_MASK8B67_M1_S 24 #define ADI_MASK8B67_D1_M 0x00FF0000 // Data for ADI register 7, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B67_D1_S 16 #define ADI_MASK8B67_M0_M 0x0000FF00 // Mask for ADI register 6 #define ADI_MASK8B67_M0_S 8 #define ADI_MASK8B67_D0_M 0x000000FF // Data for ADI register 6, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B67_D0_S 0 //***************************************************************************** // @@ -1011,14 +1011,14 @@ #define ADI_MASK8B89_M1_M 0xFF000000 // Mask for ADI register 9 #define ADI_MASK8B89_M1_S 24 #define ADI_MASK8B89_D1_M 0x00FF0000 // Data for ADI register 9, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B89_D1_S 16 #define ADI_MASK8B89_M0_M 0x0000FF00 // Mask for ADI register 8 #define ADI_MASK8B89_M0_S 8 #define ADI_MASK8B89_D0_M 0x000000FF // Data for ADI register 8, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B89_D0_S 0 //***************************************************************************** // @@ -1029,14 +1029,14 @@ #define ADI_MASK8B1011_M1_M 0xFF000000 // Mask for ADI register 11 #define ADI_MASK8B1011_M1_S 24 #define ADI_MASK8B1011_D1_M 0x00FF0000 // Data for ADI register 11, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1011_D1_S 16 #define ADI_MASK8B1011_M0_M 0x0000FF00 // Mask for ADI register 10 #define ADI_MASK8B1011_M0_S 8 #define ADI_MASK8B1011_D0_M 0x000000FF // Data for ADI register 10, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1011_D0_S 0 //***************************************************************************** // @@ -1047,14 +1047,14 @@ #define ADI_MASK8B1213_M1_M 0xFF000000 // Mask for ADI register 13 #define ADI_MASK8B1213_M1_S 24 #define ADI_MASK8B1213_D1_M 0x00FF0000 // Data for ADI register 13, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1213_D1_S 16 #define ADI_MASK8B1213_M0_M 0x0000FF00 // Mask for ADI register 12 #define ADI_MASK8B1213_M0_S 8 #define ADI_MASK8B1213_D0_M 0x000000FF // Data for ADI register 12, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1213_D0_S 0 //***************************************************************************** // @@ -1065,14 +1065,14 @@ #define ADI_MASK8B1415_M1_M 0xFF000000 // Mask for ADI register 15 #define ADI_MASK8B1415_M1_S 24 #define ADI_MASK8B1415_D1_M 0x00FF0000 // Data for ADI register 15, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1415_D1_S 16 #define ADI_MASK8B1415_M0_M 0x0000FF00 // Mask for ADI register 14 #define ADI_MASK8B1415_M0_S 8 #define ADI_MASK8B1415_D0_M 0x000000FF // Data for ADI register 14, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1415_D0_S 0 //***************************************************************************** // @@ -1083,9 +1083,9 @@ #define ADI_MASK16B01_M_M 0xFFFF0000 // Mask for ADI register 0 and 1 #define ADI_MASK16B01_M_S 16 #define ADI_MASK16B01_D_M 0x0000FFFF // Data for ADI register at - // offsets 0 and 1, - only bits - // selected by mask M will be - // affected by access +// offsets 0 and 1, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B01_D_S 0 //***************************************************************************** // @@ -1096,9 +1096,9 @@ #define ADI_MASK16B23_M_M 0xFFFF0000 // Mask for ADI register 2 and 3 #define ADI_MASK16B23_M_S 16 #define ADI_MASK16B23_D_M 0x0000FFFF // Data for ADI register at - // offsets 2 and 3, - only bits - // selected by mask M will be - // affected by access +// offsets 2 and 3, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B23_D_S 0 //***************************************************************************** // @@ -1109,9 +1109,9 @@ #define ADI_MASK16B45_M_M 0xFFFF0000 // Mask for ADI register 4 and 5 #define ADI_MASK16B45_M_S 16 #define ADI_MASK16B45_D_M 0x0000FFFF // Data for ADI register at - // offsets 4 and 5, - only bits - // selected by mask M will be - // affected by access +// offsets 4 and 5, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B45_D_S 0 //***************************************************************************** // @@ -1122,9 +1122,9 @@ #define ADI_MASK16B67_M_M 0xFFFF0000 // Mask for ADI register 6 and 7 #define ADI_MASK16B67_M_S 16 #define ADI_MASK16B67_D_M 0x0000FFFF // Data for ADI register at - // offsets 6 and 7, - only bits - // selected by mask M will be - // affected by access +// offsets 6 and 7, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B67_D_S 0 //***************************************************************************** // @@ -1135,9 +1135,9 @@ #define ADI_MASK16B89_M_M 0xFFFF0000 // Mask for ADI register 8 and 9 #define ADI_MASK16B89_M_S 16 #define ADI_MASK16B89_D_M 0x0000FFFF // Data for ADI register at - // offsets 8 and 9, - only bits - // selected by mask M will be - // affected by access +// offsets 8 and 9, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B89_D_S 0 //***************************************************************************** // @@ -1148,9 +1148,9 @@ #define ADI_MASK16B1011_M_M 0xFFFF0000 // Mask for ADI register 10 and 11 #define ADI_MASK16B1011_M_S 16 #define ADI_MASK16B1011_D_M 0x0000FFFF // Data for ADI register at - // offsets 10 and 11, - only bits - // selected by mask M will be - // affected by access +// offsets 10 and 11, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1011_D_S 0 //***************************************************************************** // @@ -1161,9 +1161,9 @@ #define ADI_MASK16B1213_M_M 0xFFFF0000 // Mask for ADI register 12 and 13 #define ADI_MASK16B1213_M_S 16 #define ADI_MASK16B1213_D_M 0x0000FFFF // Data for ADI register at - // offsets 12 and 13, - only bits - // selected by mask M will be - // affected by access +// offsets 12 and 13, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1213_D_S 0 //***************************************************************************** // @@ -1174,9 +1174,9 @@ #define ADI_MASK16B1415_M_M 0xFFFF0000 // Mask for ADI register 14 and 15 #define ADI_MASK16B1415_M_S 16 #define ADI_MASK16B1415_D_M 0x0000FFFF // Data for ADI register at - // offsets 14 and 15, - only bits - // selected by mask M will be - // affected by access +// offsets 14 and 15, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1415_D_S 0 #endif // __HW_ADI_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ccfg_simple_struct.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ccfg_simple_struct.h index 12cfc019..1a2c740a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ccfg_simple_struct.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ccfg_simple_struct.h @@ -45,7 +45,8 @@ // //***************************************************************************** typedef struct -{ // Mapped to address +{ + // Mapped to address uint32_t CCFG_EXT_LF_CLK ; // 0x50003FA8 uint32_t CCFG_MODE_CONF_1 ; // 0x50003FAC uint32_t CCFG_SIZE_AND_DIS_FLAGS ; // 0x50003FB0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_chip_def.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_chip_def.h index 529cc02f..542a6512 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_chip_def.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_chip_def.h @@ -65,132 +65,132 @@ extern "C" //***************************************************************************** /* CC2620F128 */ #if defined(CC2620F128RGZ_R20) || defined(CC2620F128RGZ_R21) - #define CC_CHIP_ID 0x26200720 +#define CC_CHIP_ID 0x26200720 #elif defined(CC2620F128RHB_R20) || defined(CC2620F128RHB_R21) - #define CC_CHIP_ID 0x26200520 +#define CC_CHIP_ID 0x26200520 #elif defined(CC2620F128RSM_R20) || defined(CC2620F128RSM_R21) - #define CC_CHIP_ID 0x26200420 +#define CC_CHIP_ID 0x26200420 #elif defined(CC2620F128_R20) || defined(CC2620F128_R21) - #define CC_CHIP_ID 0x26200020 +#define CC_CHIP_ID 0x26200020 #elif defined(CC2620F128RGZ_R22) || defined(CC2620F128RGZ) - #define CC_CHIP_ID 0x26200722 +#define CC_CHIP_ID 0x26200722 #elif defined(CC2620F128RHB_R22) || defined(CC2620F128RHB) - #define CC_CHIP_ID 0x26200522 +#define CC_CHIP_ID 0x26200522 #elif defined(CC2620F128RSM_R22) || defined(CC2620F128RSM) - #define CC_CHIP_ID 0x26200422 +#define CC_CHIP_ID 0x26200422 #elif defined(CC2620F128_R22) || defined(CC2620F128) - #define CC_CHIP_ID 0x26200022 +#define CC_CHIP_ID 0x26200022 /* CC2630F128 */ #elif defined(CC2630F128RGZ_R20) || defined(CC2630F128RGZ_R21) - #define CC_CHIP_ID 0x26300720 +#define CC_CHIP_ID 0x26300720 #elif defined(CC2630F128RHB_R20) || defined(CC2630F128RHB_R21) - #define CC_CHIP_ID 0x26300520 +#define CC_CHIP_ID 0x26300520 #elif defined(CC2630F128RSM_R20) || defined(CC2630F128RSM_R21) - #define CC_CHIP_ID 0x26300420 +#define CC_CHIP_ID 0x26300420 #elif defined(CC2630F128_R20) || defined(CC2630F128_R21) - #define CC_CHIP_ID 0x26300020 +#define CC_CHIP_ID 0x26300020 #elif defined(CC2630F128RGZ_R22) || defined(CC2630F128RGZ) - #define CC_CHIP_ID 0x26300722 +#define CC_CHIP_ID 0x26300722 #elif defined(CC2630F128RHB_R22) || defined(CC2630F128RHB) - #define CC_CHIP_ID 0x26300522 +#define CC_CHIP_ID 0x26300522 #elif defined(CC2630F128RSM_R22) || defined(CC2630F128RSM) - #define CC_CHIP_ID 0x26300422 +#define CC_CHIP_ID 0x26300422 #elif defined(CC2630F128_R22) || defined(CC2630F128) - #define CC_CHIP_ID 0x26300022 +#define CC_CHIP_ID 0x26300022 /* CC2640F128 */ #elif defined(CC2640F128RGZ_R20) || defined(CC2640F128RGZ_R21) - #define CC_CHIP_ID 0x26400720 +#define CC_CHIP_ID 0x26400720 #elif defined(CC2640F128RHB_R20) || defined(CC2640F128RHB_R21) - #define CC_CHIP_ID 0x26400520 +#define CC_CHIP_ID 0x26400520 #elif defined(CC2640F128RSM_R20) || defined(CC2640F128RSM_R21) - #define CC_CHIP_ID 0x26400420 +#define CC_CHIP_ID 0x26400420 #elif defined(CC2640F128_R20) || defined(CC2640F128_R21) - #define CC_CHIP_ID 0x26400020 +#define CC_CHIP_ID 0x26400020 #elif defined(CC2640F128RGZ_R22) || defined(CC2640F128RGZ) - #define CC_CHIP_ID 0x26400722 +#define CC_CHIP_ID 0x26400722 #elif defined(CC2640F128RHB_R22) || defined(CC2640F128RHB) - #define CC_CHIP_ID 0x26400522 +#define CC_CHIP_ID 0x26400522 #elif defined(CC2640F128RSM_R22) || defined(CC2640F128RSM) - #define CC_CHIP_ID 0x26400422 +#define CC_CHIP_ID 0x26400422 #elif defined(CC2640F128_R22) || defined(CC2640F128) - #define CC_CHIP_ID 0x26400022 +#define CC_CHIP_ID 0x26400022 /* CC2650F128 */ #elif defined(CC2650F128RGZ_R20) || defined(CC2650F128RGZ_R21) - #define CC_CHIP_ID 0x26500720 +#define CC_CHIP_ID 0x26500720 #elif defined(CC2650F128RHB_R20) || defined(CC2650F128RHB_R21) - #define CC_CHIP_ID 0x26500520 +#define CC_CHIP_ID 0x26500520 #elif defined(CC2650F128RSM_R20) || defined(CC2650F128RSM_R21) - #define CC_CHIP_ID 0x26500420 +#define CC_CHIP_ID 0x26500420 #elif defined(CC2650F128_R20) || defined(CC2650F128_R21) - #define CC_CHIP_ID 0x26500020 +#define CC_CHIP_ID 0x26500020 #elif defined(CC2650F128RGZ_R22) || defined(CC2650F128RGZ) - #define CC_CHIP_ID 0x26500722 +#define CC_CHIP_ID 0x26500722 #elif defined(CC2650F128RHB_R22) || defined(CC2650F128RHB) - #define CC_CHIP_ID 0x26500522 +#define CC_CHIP_ID 0x26500522 #elif defined(CC2650F128RSM_R22) || defined(CC2650F128RSM) - #define CC_CHIP_ID 0x26500422 +#define CC_CHIP_ID 0x26500422 #elif defined(CC2650F128_R22) || defined(CC2650F128) - #define CC_CHIP_ID 0x26500022 +#define CC_CHIP_ID 0x26500022 /* CC2650L128 (OTP) */ #elif defined(CC2650L128) - #define CC_CHIP_ID 0x26501710 +#define CC_CHIP_ID 0x26501710 /* CC1310F128 */ #elif defined(CC1310F128RGZ_R20) || defined(CC1310F128RGZ) - #define CC_CHIP_ID 0x13100720 +#define CC_CHIP_ID 0x13100720 #elif defined(CC1310F128RHB_R20) || defined(CC1310F128RHB) - #define CC_CHIP_ID 0x13100520 +#define CC_CHIP_ID 0x13100520 #elif defined(CC1310F128RSM_R20) || defined(CC1310F128RSM) - #define CC_CHIP_ID 0x13100420 +#define CC_CHIP_ID 0x13100420 #elif defined(CC1310F128_R20) || defined(CC1310F128) - #define CC_CHIP_ID 0x13100020 +#define CC_CHIP_ID 0x13100020 /* CC1350F128 */ #elif defined(CC1350F128RGZ_R20) || defined(CC1350F128RGZ) - #define CC_CHIP_ID 0x13500720 +#define CC_CHIP_ID 0x13500720 #elif defined(CC1350F128RHB_R20) || defined(CC1350F128RHB) - #define CC_CHIP_ID 0x13500520 +#define CC_CHIP_ID 0x13500520 #elif defined(CC1350F128RSM_R20) || defined(CC1350F128RSM) - #define CC_CHIP_ID 0x13500420 +#define CC_CHIP_ID 0x13500420 #elif defined(CC1350F128_R20) || defined(CC1350F128) - #define CC_CHIP_ID 0x13500020 +#define CC_CHIP_ID 0x13500020 /* CC2640R2F */ #elif defined(CC2640R2FRGZ_R25) || defined(CC2640R2FRGZ) - #define CC_CHIP_ID 0x26401710 +#define CC_CHIP_ID 0x26401710 #elif defined(CC2640R2FRHB_R25) || defined(CC2640R2FRHB) - #define CC_CHIP_ID 0x26401510 +#define CC_CHIP_ID 0x26401510 #elif defined(CC2640R2FRSM_R25) || defined(CC2640R2FRSM) - #define CC_CHIP_ID 0x26401410 +#define CC_CHIP_ID 0x26401410 #elif defined(CC2640R2F_R25) || defined(CC2640R2F) - #define CC_CHIP_ID 0x26401010 +#define CC_CHIP_ID 0x26401010 /* CC2652R1F */ #elif defined(CC2652R1FRGZ_R10) || defined(CC2652R1FRGZ) - #define CC_CHIP_ID 0x26523710 +#define CC_CHIP_ID 0x26523710 #elif defined(CC2652R1F_R10) || defined(CC2652R1F) - #define CC_CHIP_ID 0x26523010 +#define CC_CHIP_ID 0x26523010 /* CC2644R1F */ #elif defined(CC2644R1FRGZ_R10) || defined(CC2644R1FRGZ) - #define CC_CHIP_ID 0x26443710 +#define CC_CHIP_ID 0x26443710 #elif defined(CC2644R1F_R10) || defined(CC2644R1F) - #define CC_CHIP_ID 0x26443010 +#define CC_CHIP_ID 0x26443010 /* CC2642R1F */ #elif defined(CC2642R1FRGZ_R10) || defined(CC2642R1FRGZ) - #define CC_CHIP_ID 0x26423710 +#define CC_CHIP_ID 0x26423710 #elif defined(CC2642R1F_R10) || defined(CC2642R1F) - #define CC_CHIP_ID 0x26423010 +#define CC_CHIP_ID 0x26423010 /* CC1354R1F */ #elif defined(CC1354R1FRGZ_R10) || defined(CC1354R1FRGZ) - #define CC_CHIP_ID 0x13543710 +#define CC_CHIP_ID 0x13543710 #elif defined(CC1354R1F_R10) || defined(CC1354R1F) - #define CC_CHIP_ID 0x13543010 +#define CC_CHIP_ID 0x13543010 /* CC1352R1F */ #elif defined(CC1352R1FRGZ_R10) || defined(CC1352R1FRGZ) - #define CC_CHIP_ID 0x13523710 +#define CC_CHIP_ID 0x13523710 #elif defined(CC1352R1F_R10) || defined(CC1352R1F) - #define CC_CHIP_ID 0x13523010 +#define CC_CHIP_ID 0x13523010 /* CC1312R1F */ #elif defined(CC1312R1FRGZ_R10) || defined(CC1312R1FRGZ) - #define CC_CHIP_ID 0x13123710 +#define CC_CHIP_ID 0x13123710 #elif defined(CC1312R1F_R10) || defined(CC1312R1F) - #define CC_CHIP_ID 0x13123010 +#define CC_CHIP_ID 0x13123010 #endif #define CC_GET_CHIP_FAMILY 0x13 @@ -198,24 +198,24 @@ extern "C" #define CC_GET_CHIP_HWREV 0x20 #ifdef CC_CHIP_ID - /* Define chip package only if specified */ - #if (CC_CHIP_ID & 0x00000F00) != 0 - #define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) - #endif +/* Define chip package only if specified */ +#if (CC_CHIP_ID & 0x00000F00) != 0 +#define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) +#endif - /* Define chip device */ - #define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) +/* Define chip device */ +#define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) - /* The chip family, option and package shall match the DriverLib release */ - #if (CC_GET_CHIP_FAMILY != ((CC_CHIP_ID & 0xFF000000) >> 24)) - #error "Specified chip family does not match DriverLib release" - #endif - #if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) - #error "Specified chip option does not match DriverLib release" - #endif - #if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) - #error "Specified chip hardware revision does not match DriverLib release" - #endif +/* The chip family, option and package shall match the DriverLib release */ +#if (CC_GET_CHIP_FAMILY != ((CC_CHIP_ID & 0xFF000000) >> 24)) +#error "Specified chip family does not match DriverLib release" +#endif +#if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) +#error "Specified chip option does not match DriverLib release" +#endif +#if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) +#error "Specified chip hardware revision does not match DriverLib release" +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ddi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ddi.h index a83653f7..d81a93ae 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ddi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ddi.h @@ -180,17 +180,17 @@ #define DDI_O_SET 0x00000040 // Offset for 'Set' instruction. #define DDI_O_CLR 0x00000080 // Offset for 'Clear' instruction. #define DDI_O_MASK4B 0x00000100 // Offset for 4-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 7:4 are mask. Bits 3:0 are data. - // Requires 'byte' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 7:4 are mask. Bits 3:0 are data. +// Requires 'byte' write. #define DDI_O_MASK8B 0x00000180 // Offset for 8-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 15:8 are mask. Bits 7:0 are data. - // Requires 'short' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 15:8 are mask. Bits 7:0 are data. +// Requires 'short' write. #define DDI_O_MASK16B 0x00000200 // Offset for 16-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 31:16 are mask. Bits 15:0 are data. - // Requires 'long' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 31:16 are mask. Bits 15:0 are data. +// Requires 'long' write. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_device.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_device.h index a4155296..c8c3e6c7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_device.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_device.h @@ -41,128 +41,128 @@ #ifdef CC_GET_CHIP_PACKAGE -#if ( CC_GET_CHIP_PACKAGE == 0x7 ) -//***************************************************************************** -// -// The following are defines for edge detection on wake up events for the -// CC26xx 7x7 packaged device. -// -//***************************************************************************** -#define AON_EVENT_DIO0 0x3F -#define AON_EVENT_DIO1 17 -#define AON_EVENT_DIO2 16 -#define AON_EVENT_DIO3 15 -#define AON_EVENT_DIO4 14 -#define AON_EVENT_DIO5 13 -#define AON_EVENT_DIO6 12 -#define AON_EVENT_DIO7 11 -#define AON_EVENT_DIO8 10 -#define AON_EVENT_DIO9 9 -#define AON_EVENT_DIO10 8 -#define AON_EVENT_DIO11 7 -#define AON_EVENT_DIO12 6 -#define AON_EVENT_DIO13 5 -#define AON_EVENT_DIO14 4 -#define AON_EVENT_DIO15 3 -#define AON_EVENT_DIO16 2 -#define AON_EVENT_DIO17 1 -#define AON_EVENT_DIO18 31 -#define AON_EVENT_DIO19 30 -#define AON_EVENT_DIO20 29 -#define AON_EVENT_DIO21 28 -#define AON_EVENT_DIO22 27 -#define AON_EVENT_DIO23 26 -#define AON_EVENT_DIO24 25 -#define AON_EVENT_DIO25 24 -#define AON_EVENT_DIO26 23 -#define AON_EVENT_DIO27 22 -#define AON_EVENT_DIO28 21 -#define AON_EVENT_DIO29 20 -#define AON_EVENT_DIO30 19 -#define AON_EVENT_DIO31 0x3F -#endif // ( CC_GET_CHIP_PACKAGE == 0x7 ) + #if ( CC_GET_CHIP_PACKAGE == 0x7 ) + //***************************************************************************** + // + // The following are defines for edge detection on wake up events for the + // CC26xx 7x7 packaged device. + // + //***************************************************************************** + #define AON_EVENT_DIO0 0x3F + #define AON_EVENT_DIO1 17 + #define AON_EVENT_DIO2 16 + #define AON_EVENT_DIO3 15 + #define AON_EVENT_DIO4 14 + #define AON_EVENT_DIO5 13 + #define AON_EVENT_DIO6 12 + #define AON_EVENT_DIO7 11 + #define AON_EVENT_DIO8 10 + #define AON_EVENT_DIO9 9 + #define AON_EVENT_DIO10 8 + #define AON_EVENT_DIO11 7 + #define AON_EVENT_DIO12 6 + #define AON_EVENT_DIO13 5 + #define AON_EVENT_DIO14 4 + #define AON_EVENT_DIO15 3 + #define AON_EVENT_DIO16 2 + #define AON_EVENT_DIO17 1 + #define AON_EVENT_DIO18 31 + #define AON_EVENT_DIO19 30 + #define AON_EVENT_DIO20 29 + #define AON_EVENT_DIO21 28 + #define AON_EVENT_DIO22 27 + #define AON_EVENT_DIO23 26 + #define AON_EVENT_DIO24 25 + #define AON_EVENT_DIO25 24 + #define AON_EVENT_DIO26 23 + #define AON_EVENT_DIO27 22 + #define AON_EVENT_DIO28 21 + #define AON_EVENT_DIO29 20 + #define AON_EVENT_DIO30 19 + #define AON_EVENT_DIO31 0x3F + #endif // ( CC_GET_CHIP_PACKAGE == 0x7 ) -#if ( CC_GET_CHIP_PACKAGE == 0x5 ) -//***************************************************************************** -// -// The following are defines for edge detection on wake up events for the -// CC26xx 5x5 packaged device. -// -//***************************************************************************** -#define AON_EVENT_DIO0 15 -#define AON_EVENT_DIO1 14 -#define AON_EVENT_DIO2 13 -#define AON_EVENT_DIO3 12 -#define AON_EVENT_DIO4 11 -#define AON_EVENT_DIO5 2 -#define AON_EVENT_DIO6 1 -#define AON_EVENT_DIO7 26 -#define AON_EVENT_DIO8 25 -#define AON_EVENT_DIO9 23 -#define AON_EVENT_DIO10 24 -#define AON_EVENT_DIO11 22 -#define AON_EVENT_DIO12 21 -#define AON_EVENT_DIO13 20 -#define AON_EVENT_DIO14 19 -#define AON_EVENT_DIO15 0x3F -#define AON_EVENT_DIO16 0x3F -#define AON_EVENT_DIO17 0x3F -#define AON_EVENT_DIO18 0x3F -#define AON_EVENT_DIO19 0x3F -#define AON_EVENT_DIO20 0x3F -#define AON_EVENT_DIO21 0x3F -#define AON_EVENT_DIO22 0x3F -#define AON_EVENT_DIO23 0x3F -#define AON_EVENT_DIO24 0x3F -#define AON_EVENT_DIO25 0x3F -#define AON_EVENT_DIO26 0x3F -#define AON_EVENT_DIO27 0x3F -#define AON_EVENT_DIO28 0x3F -#define AON_EVENT_DIO29 0x3F -#define AON_EVENT_DIO30 0x3F -#define AON_EVENT_DIO31 0x3F -#endif // ( CC_GET_CHIP_PACKAGE == 0x5 ) + #if ( CC_GET_CHIP_PACKAGE == 0x5 ) + //***************************************************************************** + // + // The following are defines for edge detection on wake up events for the + // CC26xx 5x5 packaged device. + // + //***************************************************************************** + #define AON_EVENT_DIO0 15 + #define AON_EVENT_DIO1 14 + #define AON_EVENT_DIO2 13 + #define AON_EVENT_DIO3 12 + #define AON_EVENT_DIO4 11 + #define AON_EVENT_DIO5 2 + #define AON_EVENT_DIO6 1 + #define AON_EVENT_DIO7 26 + #define AON_EVENT_DIO8 25 + #define AON_EVENT_DIO9 23 + #define AON_EVENT_DIO10 24 + #define AON_EVENT_DIO11 22 + #define AON_EVENT_DIO12 21 + #define AON_EVENT_DIO13 20 + #define AON_EVENT_DIO14 19 + #define AON_EVENT_DIO15 0x3F + #define AON_EVENT_DIO16 0x3F + #define AON_EVENT_DIO17 0x3F + #define AON_EVENT_DIO18 0x3F + #define AON_EVENT_DIO19 0x3F + #define AON_EVENT_DIO20 0x3F + #define AON_EVENT_DIO21 0x3F + #define AON_EVENT_DIO22 0x3F + #define AON_EVENT_DIO23 0x3F + #define AON_EVENT_DIO24 0x3F + #define AON_EVENT_DIO25 0x3F + #define AON_EVENT_DIO26 0x3F + #define AON_EVENT_DIO27 0x3F + #define AON_EVENT_DIO28 0x3F + #define AON_EVENT_DIO29 0x3F + #define AON_EVENT_DIO30 0x3F + #define AON_EVENT_DIO31 0x3F + #endif // ( CC_GET_CHIP_PACKAGE == 0x5 ) -#if ( CC_GET_CHIP_PACKAGE == 0x4 ) -//***************************************************************************** -// -// The following are defines for edge detection on wake up events for the -// CC26xx 4x4 packaged device. -// -//***************************************************************************** -#define AON_EVENT_DIO0 13 -#define AON_EVENT_DIO1 12 -#define AON_EVENT_DIO2 11 -#define AON_EVENT_DIO3 2 -#define AON_EVENT_DIO4 1 -#define AON_EVENT_DIO5 26 -#define AON_EVENT_DIO6 25 -#define AON_EVENT_DIO7 24 -#define AON_EVENT_DIO8 23 -#define AON_EVENT_DIO9 22 -#define AON_EVENT_DIO10 0x3F -#define AON_EVENT_DIO11 0x3F -#define AON_EVENT_DIO12 0x3F -#define AON_EVENT_DIO13 0x3F -#define AON_EVENT_DIO14 0x3F -#define AON_EVENT_DIO15 0x3F -#define AON_EVENT_DIO16 0x3F -#define AON_EVENT_DIO17 0x3F -#define AON_EVENT_DIO18 0x3F -#define AON_EVENT_DIO19 0x3F -#define AON_EVENT_DIO20 0x3F -#define AON_EVENT_DIO21 0x3F -#define AON_EVENT_DIO22 0x3F -#define AON_EVENT_DIO23 0x3F -#define AON_EVENT_DIO24 0x3F -#define AON_EVENT_DIO25 0x3F -#define AON_EVENT_DIO26 0x3F -#define AON_EVENT_DIO27 0x3F -#define AON_EVENT_DIO28 0x3F -#define AON_EVENT_DIO29 0x3F -#define AON_EVENT_DIO30 0x3F -#define AON_EVENT_DIO31 0x3F -#endif // ( CC_GET_CHIP_PACKAGE == 0x4 ) + #if ( CC_GET_CHIP_PACKAGE == 0x4 ) + //***************************************************************************** + // + // The following are defines for edge detection on wake up events for the + // CC26xx 4x4 packaged device. + // + //***************************************************************************** + #define AON_EVENT_DIO0 13 + #define AON_EVENT_DIO1 12 + #define AON_EVENT_DIO2 11 + #define AON_EVENT_DIO3 2 + #define AON_EVENT_DIO4 1 + #define AON_EVENT_DIO5 26 + #define AON_EVENT_DIO6 25 + #define AON_EVENT_DIO7 24 + #define AON_EVENT_DIO8 23 + #define AON_EVENT_DIO9 22 + #define AON_EVENT_DIO10 0x3F + #define AON_EVENT_DIO11 0x3F + #define AON_EVENT_DIO12 0x3F + #define AON_EVENT_DIO13 0x3F + #define AON_EVENT_DIO14 0x3F + #define AON_EVENT_DIO15 0x3F + #define AON_EVENT_DIO16 0x3F + #define AON_EVENT_DIO17 0x3F + #define AON_EVENT_DIO18 0x3F + #define AON_EVENT_DIO19 0x3F + #define AON_EVENT_DIO20 0x3F + #define AON_EVENT_DIO21 0x3F + #define AON_EVENT_DIO22 0x3F + #define AON_EVENT_DIO23 0x3F + #define AON_EVENT_DIO24 0x3F + #define AON_EVENT_DIO25 0x3F + #define AON_EVENT_DIO26 0x3F + #define AON_EVENT_DIO27 0x3F + #define AON_EVENT_DIO28 0x3F + #define AON_EVENT_DIO29 0x3F + #define AON_EVENT_DIO30 0x3F + #define AON_EVENT_DIO31 0x3F + #endif // ( CC_GET_CHIP_PACKAGE == 0x4 ) #endif // defined( CC_GET_CHIP_PACKAGE ) #endif // __HW_DEVICE_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_fcfg1.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_fcfg1.h index 39899da8..273b87ca 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_fcfg1.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_fcfg1.h @@ -1019,11 +1019,11 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_SHDW_OSC_BIAS_LDO_TRIM_SET_RCOSC_HF_COARSE_RESISTOR_W \ - 2 + 2 #define FCFG1_SHDW_OSC_BIAS_LDO_TRIM_SET_RCOSC_HF_COARSE_RESISTOR_M \ - 0x18000000 + 0x18000000 #define FCFG1_SHDW_OSC_BIAS_LDO_TRIM_SET_RCOSC_HF_COARSE_RESISTOR_S \ - 27 + 27 // Field: [26:23] TRIMMAG // @@ -2328,11 +2328,11 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_W \ - 6 + 6 #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_M \ - 0x0000003F + 0x0000003F #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_S \ - 0 + 0 //***************************************************************************** // diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ints.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ints.h index 3d38283f..8fc6fddd 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ints.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_ints.h @@ -45,28 +45,28 @@ #define INT_NMI_FAULT 2 // NMI Fault #define INT_HARD_FAULT 3 // Hard Fault #define INT_MEMMANAGE_FAULT 4 // Memory Management (MemManage) - // Fault +// Fault #define INT_BUS_FAULT 5 // Bus Fault #define INT_USAGE_FAULT 6 // Usage Fault #define INT_SVCALL 11 // Supervisor Call (SVCall) #define INT_DEBUG 12 // Debug Monitor #define INT_PENDSV 14 // Pending Service Call (PendSV) #define INT_SYSTICK 15 // SysTick Interrupt from the - // System Timer in NVIC. +// System Timer in NVIC. #define INT_AON_GPIO_EDGE 16 // Edge detect event from IOC #define INT_I2C_IRQ 17 // Interrupt event from I2C #define INT_RFC_CPE_1 18 // Combined Interrupt for CPE - // Generated events +// Generated events #define INT_AON_RTC_COMB 20 // Event from AON_RTC #define INT_UART0_COMB 21 // UART0 combined interrupt #define INT_AUX_SWEV0 22 // AUX software event 0 #define INT_SSI0_COMB 23 // SSI0 combined interrupt #define INT_SSI1_COMB 24 // SSI1 combined interrupt #define INT_RFC_CPE_0 25 // Combined Interrupt for CPE - // Generated events +// Generated events #define INT_RFC_HW_COMB 26 // Combined RFC hardware interrupt #define INT_RFC_CMD_ACK 27 // RFC Doorbell Command - // Acknowledgement Interrupt +// Acknowledgement Interrupt #define INT_I2S_IRQ 28 // Interrupt event from I2S #define INT_AUX_SWEV1 29 // AUX software event 1 #define INT_WDT_IRQ 30 // Watchdog interrupt event @@ -79,7 +79,7 @@ #define INT_GPT3A 37 // GPT3A interrupt event #define INT_GPT3B 38 // GPT3B interrupt event #define INT_CRYPTO_RESULT_AVAIL_IRQ 39 // CRYPTO result available interupt - // event +// event #define INT_DMA_DONE_COMB 40 // Combined DMA done #define INT_DMA_ERR 41 // DMA bus error #define INT_FLASH 42 // FLASH controller error event diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_memmap.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_memmap.h index 6377d81e..cfad06d6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_memmap.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_memmap.h @@ -96,7 +96,7 @@ #define FCFG1_BASE 0x50001000 // FCFG1 #define FCFG2_BASE 0x50002000 // FCFG2 #ifndef CCFG_BASE -#define CCFG_BASE 0x50003000 // CCFG + #define CCFG_BASE 0x50003000 // CCFG #endif #define CCFG_BASE_DEFAULT 0x50003000 // CCFG #define SSI0_NONBUF_BASE 0x60000000 // SSI CPU nonbuf base @@ -132,9 +132,9 @@ #define AON_IOC_NONBUF_BASE 0x60094000 // AON_IOC CPU nonbuf base #define AON_BATMON_NONBUF_BASE 0x60095000 // AON_BATMON CPU nonbuf base #define AUX_AIODIO0_NONBUF_BASE \ - 0x600C1000 // AUX_AIODIO CPU nonbuf base + 0x600C1000 // AUX_AIODIO CPU nonbuf base #define AUX_AIODIO1_NONBUF_BASE \ - 0x600C2000 // AUX_AIODIO CPU nonbuf base + 0x600C2000 // AUX_AIODIO CPU nonbuf base #define AUX_TDC_NONBUF_BASE 0x600C4000 // AUX_TDC CPU nonbuf base #define AUX_EVCTL_NONBUF_BASE 0x600C5000 // AUX_EVCTL CPU nonbuf base #define AUX_WUC_NONBUF_BASE 0x600C6000 // AUX_WUC CPU nonbuf base @@ -142,7 +142,7 @@ #define AUX_SMPH_NONBUF_BASE 0x600C8000 // AUX_SMPH CPU nonbuf base #define AUX_ANAIF_NONBUF_BASE 0x600C9000 // AUX_ANAIF CPU nonbuf base #define AUX_DDI0_OSC_NONBUF_BASE \ - 0x600CA000 // DDI CPU nonbuf base + 0x600CA000 // DDI CPU nonbuf base #define AUX_ADI4_NONBUF_BASE 0x600CB000 // ADI CPU nonbuf base #define AUX_RAM_NONBUF_BASE 0x600E0000 // AUX_RAM CPU nonbuf base #define AUX_SCE_NONBUF_BASE 0x600E1000 // AUX_SCE CPU nonbuf base diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_nvic.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_nvic.h index 3bdeb8b7..6f1f2d03 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_nvic.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_nvic.h @@ -45,7 +45,7 @@ #define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg #define NVIC_ACTLR 0xE000E008 // Auxiliary Control #define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status - // Register +// Register #define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register #define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register #define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg @@ -77,7 +77,7 @@ #define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State #define NVIC_VTABLE 0xE000ED08 // Vector Table Offset #define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset - // Control +// Control #define NVIC_SYS_CTRL 0xE000ED10 // System Control #define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control #define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 @@ -96,13 +96,13 @@ #define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size #define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 #define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size - // Alias 1 +// Alias 1 #define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 #define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size - // Alias 2 +// Alias 2 #define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 #define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size - // Alias 3 +// Alias 3 #define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg #define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select #define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data @@ -125,7 +125,7 @@ #define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding #define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer #define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple - // Cycle Instructions +// Cycle Instructions //***************************************************************************** // @@ -735,21 +735,21 @@ #undef NVIC_INT_CTRL_VEC_PEN_M #define NVIC_INT_CTRL_VEC_PEN_M 0x000FF000 // Interrupt Pending Vector Number #define NVIC_INT_CTRL_VEC_PEN_NMI \ - 0x00002000 // NMI + 0x00002000 // NMI #define NVIC_INT_CTRL_VEC_PEN_HARD \ - 0x00003000 // Hard fault + 0x00003000 // Hard fault #define NVIC_INT_CTRL_VEC_PEN_MEM \ - 0x00004000 // Memory management fault + 0x00004000 // Memory management fault #define NVIC_INT_CTRL_VEC_PEN_BUS \ - 0x00005000 // Bus fault + 0x00005000 // Bus fault #define NVIC_INT_CTRL_VEC_PEN_USG \ - 0x00006000 // Usage fault + 0x00006000 // Usage fault #define NVIC_INT_CTRL_VEC_PEN_SVC \ - 0x0000B000 // SVCall + 0x0000B000 // SVCall #define NVIC_INT_CTRL_VEC_PEN_PNDSV \ - 0x0000E000 // PendSV + 0x0000E000 // PendSV #define NVIC_INT_CTRL_VEC_PEN_TICK \ - 0x0000F000 // SysTick + 0x0000F000 // SysTick #define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base #define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number #undef NVIC_INT_CTRL_VEC_ACT_M @@ -806,9 +806,9 @@ // //***************************************************************************** #define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception - // Entry +// Entry #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and - // Fault +// Fault #define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 #define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger @@ -859,7 +859,7 @@ #define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending #define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending #define NVIC_SYS_HND_CTRL_USAGEP \ - 0x00001000 // Usage Fault Pending + 0x00001000 // Usage Fault Pending #define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active #define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active @@ -880,20 +880,20 @@ #define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault #define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault #define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage - // Fault +// Fault #define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid #define NVIC_FAULT_STAT_BLSPERR 0x00002000 // Bus Fault on Floating-Point Lazy - // State Preservation +// State Preservation #define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault #define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault #define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error #define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error #define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error #define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address - // Register Valid +// Register Valid #define NVIC_FAULT_STAT_MLSPERR 0x00000020 // Memory Management Fault on - // Floating-Point Lazy State - // Preservation +// Floating-Point Lazy State +// Preservation #define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation #define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation #define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation @@ -946,16 +946,16 @@ #define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask #define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key #define NVIC_DBG_CTRL_S_RESET_ST \ - 0x02000000 // Core has reset since last read + 0x02000000 // Core has reset since last read #define NVIC_DBG_CTRL_S_RETIRE_ST \ - 0x01000000 // Core has executed insruction - // since last read + 0x01000000 // Core has executed insruction +// since last read #define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up #define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping #define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt #define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available #define NVIC_DBG_CTRL_C_SNAPSTALL \ - 0x00000020 // Breaks a stalled load/store + 0x00000020 // Breaks a stalled load/store #define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping #define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core #define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_types.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_types.h index dfa4281d..142601bc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_types.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/inc/hw_types.h @@ -58,7 +58,7 @@ typedef void (* FPTR_VOID_UINT8_T) (uint8_t); // //***************************************************************************** #ifndef __STATIC_INLINE -#define __STATIC_INLINE static inline + #define __STATIC_INLINE static inline #endif //***************************************************************************** @@ -80,19 +80,19 @@ typedef unsigned int __UINT32; // Read example : my32BitVar = HWREG(base_addr + offset) ; // Write example : HWREG(base_addr + offset) = my32BitVar ; #define HWREG(x) \ - (*((volatile unsigned long *)(x))) + (*((volatile unsigned long *)(x))) // Half word (16 bit) access to address x // Read example : my16BitVar = HWREGH(base_addr + offset) ; // Write example : HWREGH(base_addr + offset) = my16BitVar ; #define HWREGH(x) \ - (*((volatile unsigned short *)(x))) + (*((volatile unsigned short *)(x))) // Byte (8 bit) access to address x // Read example : my8BitVar = HWREGB(base_addr + offset) ; // Write example : HWREGB(base_addr + offset) = my8BitVar ; #define HWREGB(x) \ - (*((volatile unsigned char *)(x))) + (*((volatile unsigned char *)(x))) //***************************************************************************** // @@ -106,18 +106,18 @@ typedef unsigned int __UINT32; //***************************************************************************** // Bit-band access to address x bit number b using word access (32 bit) #define HWREGBITW(x, b) \ - HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) // Bit-band access to address x bit number b using half word access (16 bit) #define HWREGBITH(x, b) \ - HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) // Bit-band access to address x bit number b using byte access (8 bit) #define HWREGBITB(x, b) \ - HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) #endif // __HW_TYPES_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ant_div.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ant_div.h index b4825292..dd9f1e1a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ant_div.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ant_div.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageAntDiv[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageAntDiv[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_ANT_DIV 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageAntDiv[] = { PATCH_FUN_SPEC void enterAntDivCpePatch(void) { #if (_NWORD_PATCHIMAGE_ANT_DIV > 0) - uint32_t *pPatchVec = (uint32_t *) (_ANT_DIV_CPERAM_START + _ANT_DIV_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_ANT_DIV_CPERAM_START + _ANT_DIV_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageAntDiv, sizeof(patchImageAntDiv)); + memcpy(pPatchVec, patchImageAntDiv, sizeof(patchImageAntDiv)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterAntDivSysPatch(void) PATCH_FUN_SPEC void configureAntDivPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_ANT_DIV_CPERAM_START + _ANT_DIV_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_ANT_DIV_CPERAM_START + _ANT_DIV_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_ANT_DIV_CPERAM_START + _ANT_DIV_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_ANT_DIV_CPERAM_START + _ANT_DIV_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_ANT_DIV_CPERAM_START + _ANT_DIV_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_ANT_DIV_CPERAM_START + _ANT_DIV_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyAntDivPatch(void) { - enterAntDivSysPatch(); - enterAntDivCpePatch(); - configureAntDivPatch(); + enterAntDivSysPatch(); + enterAntDivCpePatch(); + configureAntDivPatch(); } PATCH_FUN_SPEC void refreshAntDivPatch(void) { - enterAntDivCpePatch(); - configureAntDivPatch(); + enterAntDivCpePatch(); + configureAntDivPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_ant_div(void) { - applyAntDivPatch(); + applyAntDivPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble.h index 9e245c4e..ff23285e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble.h @@ -70,115 +70,116 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageBle[] = { - 0x21000439, - 0x2100044b, - 0x2100044b, - 0x21000471, - 0x21000551, - 0x21000495, - 0x210005a7, - 0x490b4c0c, - 0x28ff7820, - 0x7ac8d101, - 0x20077020, - 0x4c08e006, - 0x28ff7820, - 0x21ffd007, - 0x49047021, - 0x0224240f, - 0x31604320, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210005c8, - 0xf82ef000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4905b570, - 0xb6724a05, - 0x28017908, - 0x2001dc02, - 0x1d127088, - 0x4710b662, - 0x21000298, - 0x00004a81, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xff8df7ff, - 0xb510bd10, - 0xff84f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x000000ff, +CPE_PATCH_TYPE patchImageBle[] = +{ + 0x21000439, + 0x2100044b, + 0x2100044b, + 0x21000471, + 0x21000551, + 0x21000495, + 0x210005a7, + 0x490b4c0c, + 0x28ff7820, + 0x7ac8d101, + 0x20077020, + 0x4c08e006, + 0x28ff7820, + 0x21ffd007, + 0x49047021, + 0x0224240f, + 0x31604320, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210005c8, + 0xf82ef000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4905b570, + 0xb6724a05, + 0x28017908, + 0x2001dc02, + 0x1d127088, + 0x4710b662, + 0x21000298, + 0x00004a81, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xff8df7ff, + 0xb510bd10, + 0xff84f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_BLE 108 @@ -204,9 +205,9 @@ CPE_PATCH_TYPE patchImageBle[] = { PATCH_FUN_SPEC void enterBleCpePatch(void) { #if (_NWORD_PATCHIMAGE_BLE > 0) - uint32_t *pPatchVec = (uint32_t *) (_BLE_CPERAM_START + _BLE_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_BLE_CPERAM_START + _BLE_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageBle, sizeof(patchImageBle)); + memcpy(pPatchVec, patchImageBle, sizeof(patchImageBle)); #endif } @@ -216,34 +217,34 @@ PATCH_FUN_SPEC void enterBleSysPatch(void) PATCH_FUN_SPEC void configureBlePatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_BLE_CPERAM_START + _BLE_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_BLE_CPERAM_START + _BLE_PATCH_TAB_OFFSET); - pPatchTab[112] = 0; - pPatchTab[104] = 1; - pPatchTab[105] = 2; - pPatchTab[110] = 3; - pPatchTab[65] = 4; - pPatchTab[53] = 5; - pPatchTab[48] = 6; + pPatchTab[112] = 0; + pPatchTab[104] = 1; + pPatchTab[105] = 2; + pPatchTab[110] = 3; + pPatchTab[65] = 4; + pPatchTab[53] = 5; + pPatchTab[48] = 6; } PATCH_FUN_SPEC void applyBlePatch(void) { - enterBleSysPatch(); - enterBleCpePatch(); - configureBlePatch(); + enterBleSysPatch(); + enterBleCpePatch(); + configureBlePatch(); } PATCH_FUN_SPEC void refreshBlePatch(void) { - enterBleCpePatch(); - configureBlePatch(); + enterBleCpePatch(); + configureBlePatch(); } PATCH_FUN_SPEC void rf_patch_cpe_ble(void) { - applyBlePatch(); + applyBlePatch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h index ab371154..8d109557 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h @@ -70,209 +70,210 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageBlePriv12[] = { - 0x210005fd, - 0x2100043d, - 0x2100044f, - 0x2100044f, - 0x21000475, - 0x210006c9, - 0x21000499, - 0x2100071f, - 0x490b4c0c, - 0x28ff7820, - 0x7ac8d101, - 0x20077020, - 0x4c08e006, - 0x28ff7820, - 0x21ffd007, - 0x49047021, - 0x0224240f, - 0x31604320, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x21000740, - 0xf8e8f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4905b570, - 0xb6724a05, - 0x28017908, - 0x2001dc02, - 0x1d127088, - 0x4710b662, - 0x21000298, - 0x00004a81, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4d53b5fe, - 0x462c4628, - 0x90003040, - 0x7e014627, - 0x78383760, - 0xd0022900, - 0xd10707c0, - 0x09c1e050, - 0x07c0d04e, - 0x7d20d14c, - 0xd5490640, - 0x31724629, - 0x20064a48, - 0x98004790, - 0x28007e00, - 0x7d20d007, - 0xd5010640, - 0xe0002003, - 0x26132001, - 0x6f68e008, - 0x28010f80, - 0x2006d002, - 0xe0014606, - 0x26072003, - 0x02312201, - 0x1a890412, - 0x02008a7a, - 0x43020412, - 0x35806f6b, - 0x68a89501, - 0x47a84d37, - 0x2e062201, - 0x2e07d002, - 0xe007d002, - 0xe00543c0, - 0x70797839, - 0x70394311, - 0x61089901, - 0xda012800, - 0x55022039, - 0x7e809800, - 0xd0022800, - 0x201e2106, - 0x6a61e002, - 0x201f1f89, - 0x6ca162a1, - 0x64e04788, - 0xbdfe2000, - 0x47804826, - 0x4822bdfe, - 0x78413060, - 0xd0022900, - 0x21007001, - 0x48217041, - 0x470038b0, - 0x4e1cb5f8, - 0x4635481f, - 0x7fec3540, - 0x09e14637, - 0x6db1d01a, - 0xd0172901, - 0x29007f69, - 0x07a1d002, - 0xe011d502, - 0xd10f07e1, - 0x06497d39, - 0x2103d50c, - 0x77e94321, - 0x6f314780, - 0x29010f89, - 0x2100d002, - 0x76793720, - 0xbdf877ec, - 0xbdf84780, - 0x31404909, - 0x28157508, - 0x281bd008, - 0x281dd008, - 0x490ad008, - 0x18400080, - 0x47706980, - 0x47704808, - 0x47704808, - 0x47704808, - 0x21000144, - 0x000100af, - 0x0000e801, - 0x00010603, - 0x0001018d, - 0x000114c0, - 0x210005b1, - 0x2100059b, - 0x210004d5, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfed3f7ff, - 0xb510bd10, - 0xfecaf7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x000000ff, +CPE_PATCH_TYPE patchImageBlePriv12[] = +{ + 0x210005fd, + 0x2100043d, + 0x2100044f, + 0x2100044f, + 0x21000475, + 0x210006c9, + 0x21000499, + 0x2100071f, + 0x490b4c0c, + 0x28ff7820, + 0x7ac8d101, + 0x20077020, + 0x4c08e006, + 0x28ff7820, + 0x21ffd007, + 0x49047021, + 0x0224240f, + 0x31604320, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x21000740, + 0xf8e8f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4905b570, + 0xb6724a05, + 0x28017908, + 0x2001dc02, + 0x1d127088, + 0x4710b662, + 0x21000298, + 0x00004a81, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4d53b5fe, + 0x462c4628, + 0x90003040, + 0x7e014627, + 0x78383760, + 0xd0022900, + 0xd10707c0, + 0x09c1e050, + 0x07c0d04e, + 0x7d20d14c, + 0xd5490640, + 0x31724629, + 0x20064a48, + 0x98004790, + 0x28007e00, + 0x7d20d007, + 0xd5010640, + 0xe0002003, + 0x26132001, + 0x6f68e008, + 0x28010f80, + 0x2006d002, + 0xe0014606, + 0x26072003, + 0x02312201, + 0x1a890412, + 0x02008a7a, + 0x43020412, + 0x35806f6b, + 0x68a89501, + 0x47a84d37, + 0x2e062201, + 0x2e07d002, + 0xe007d002, + 0xe00543c0, + 0x70797839, + 0x70394311, + 0x61089901, + 0xda012800, + 0x55022039, + 0x7e809800, + 0xd0022800, + 0x201e2106, + 0x6a61e002, + 0x201f1f89, + 0x6ca162a1, + 0x64e04788, + 0xbdfe2000, + 0x47804826, + 0x4822bdfe, + 0x78413060, + 0xd0022900, + 0x21007001, + 0x48217041, + 0x470038b0, + 0x4e1cb5f8, + 0x4635481f, + 0x7fec3540, + 0x09e14637, + 0x6db1d01a, + 0xd0172901, + 0x29007f69, + 0x07a1d002, + 0xe011d502, + 0xd10f07e1, + 0x06497d39, + 0x2103d50c, + 0x77e94321, + 0x6f314780, + 0x29010f89, + 0x2100d002, + 0x76793720, + 0xbdf877ec, + 0xbdf84780, + 0x31404909, + 0x28157508, + 0x281bd008, + 0x281dd008, + 0x490ad008, + 0x18400080, + 0x47706980, + 0x47704808, + 0x47704808, + 0x47704808, + 0x21000144, + 0x000100af, + 0x0000e801, + 0x00010603, + 0x0001018d, + 0x000114c0, + 0x210005b1, + 0x2100059b, + 0x210004d5, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfed3f7ff, + 0xb510bd10, + 0xfecaf7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_BLE_PRIV_1_2 202 @@ -298,9 +299,9 @@ CPE_PATCH_TYPE patchImageBlePriv12[] = { PATCH_FUN_SPEC void enterBlePriv12CpePatch(void) { #if (_NWORD_PATCHIMAGE_BLE_PRIV_1_2 > 0) - uint32_t *pPatchVec = (uint32_t *) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageBlePriv12, sizeof(patchImageBlePriv12)); + memcpy(pPatchVec, patchImageBlePriv12, sizeof(patchImageBlePriv12)); #endif } @@ -310,35 +311,35 @@ PATCH_FUN_SPEC void enterBlePriv12SysPatch(void) PATCH_FUN_SPEC void configureBlePriv12Patch(void) { - uint8_t *pPatchTab = (uint8_t *) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_TAB_OFFSET); - pPatchTab[1] = 0; - pPatchTab[112] = 1; - pPatchTab[104] = 2; - pPatchTab[105] = 3; - pPatchTab[110] = 4; - pPatchTab[65] = 5; - pPatchTab[53] = 6; - pPatchTab[48] = 7; + pPatchTab[1] = 0; + pPatchTab[112] = 1; + pPatchTab[104] = 2; + pPatchTab[105] = 3; + pPatchTab[110] = 4; + pPatchTab[65] = 5; + pPatchTab[53] = 6; + pPatchTab[48] = 7; } PATCH_FUN_SPEC void applyBlePriv12Patch(void) { - enterBlePriv12SysPatch(); - enterBlePriv12CpePatch(); - configureBlePriv12Patch(); + enterBlePriv12SysPatch(); + enterBlePriv12CpePatch(); + configureBlePriv12Patch(); } PATCH_FUN_SPEC void refreshBlePriv12Patch(void) { - enterBlePriv12CpePatch(); - configureBlePriv12Patch(); + enterBlePriv12CpePatch(); + configureBlePriv12Patch(); } PATCH_FUN_SPEC void rf_patch_cpe_ble_priv_1_2(void) { - applyBlePriv12Patch(); + applyBlePriv12Patch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_brepeat.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_brepeat.h index ed418228..46f42c1d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_brepeat.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_brepeat.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageBrepeat[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageBrepeat[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_BREPEAT 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageBrepeat[] = { PATCH_FUN_SPEC void enterBrepeatCpePatch(void) { #if (_NWORD_PATCHIMAGE_BREPEAT > 0) - uint32_t *pPatchVec = (uint32_t *) (_BREPEAT_CPERAM_START + _BREPEAT_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_BREPEAT_CPERAM_START + _BREPEAT_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageBrepeat, sizeof(patchImageBrepeat)); + memcpy(pPatchVec, patchImageBrepeat, sizeof(patchImageBrepeat)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterBrepeatSysPatch(void) PATCH_FUN_SPEC void configureBrepeatPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_BREPEAT_CPERAM_START + _BREPEAT_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_BREPEAT_CPERAM_START + _BREPEAT_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_BREPEAT_CPERAM_START + _BREPEAT_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_BREPEAT_CPERAM_START + _BREPEAT_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_BREPEAT_CPERAM_START + _BREPEAT_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_BREPEAT_CPERAM_START + _BREPEAT_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyBrepeatPatch(void) { - enterBrepeatSysPatch(); - enterBrepeatCpePatch(); - configureBrepeatPatch(); + enterBrepeatSysPatch(); + enterBrepeatCpePatch(); + configureBrepeatPatch(); } PATCH_FUN_SPEC void refreshBrepeatPatch(void) { - enterBrepeatCpePatch(); - configureBrepeatPatch(); + enterBrepeatCpePatch(); + configureBrepeatPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_brepeat(void) { - applyBrepeatPatch(); + applyBrepeatPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genfsk.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genfsk.h index 7d1a396d..cc7f7167 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genfsk.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genfsk.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageGenfsk[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageGenfsk[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_GENFSK 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageGenfsk[] = { PATCH_FUN_SPEC void enterGenfskCpePatch(void) { #if (_NWORD_PATCHIMAGE_GENFSK > 0) - uint32_t *pPatchVec = (uint32_t *) (_GENFSK_CPERAM_START + _GENFSK_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_GENFSK_CPERAM_START + _GENFSK_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageGenfsk, sizeof(patchImageGenfsk)); + memcpy(pPatchVec, patchImageGenfsk, sizeof(patchImageGenfsk)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterGenfskSysPatch(void) PATCH_FUN_SPEC void configureGenfskPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_GENFSK_CPERAM_START + _GENFSK_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_GENFSK_CPERAM_START + _GENFSK_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_GENFSK_CPERAM_START + _GENFSK_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_GENFSK_CPERAM_START + _GENFSK_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_GENFSK_CPERAM_START + _GENFSK_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_GENFSK_CPERAM_START + _GENFSK_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyGenfskPatch(void) { - enterGenfskSysPatch(); - enterGenfskCpePatch(); - configureGenfskPatch(); + enterGenfskSysPatch(); + enterGenfskCpePatch(); + configureGenfskPatch(); } PATCH_FUN_SPEC void refreshGenfskPatch(void) { - enterGenfskCpePatch(); - configureGenfskPatch(); + enterGenfskCpePatch(); + configureGenfskPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_genfsk(void) { - applyGenfskPatch(); + applyGenfskPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genook.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genook.h index ba5f4d2f..4b86f7cf 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genook.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_genook.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageGenook[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageGenook[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_GENOOK 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageGenook[] = { PATCH_FUN_SPEC void enterGenookCpePatch(void) { #if (_NWORD_PATCHIMAGE_GENOOK > 0) - uint32_t *pPatchVec = (uint32_t *) (_GENOOK_CPERAM_START + _GENOOK_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_GENOOK_CPERAM_START + _GENOOK_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageGenook, sizeof(patchImageGenook)); + memcpy(pPatchVec, patchImageGenook, sizeof(patchImageGenook)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterGenookSysPatch(void) PATCH_FUN_SPEC void configureGenookPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_GENOOK_CPERAM_START + _GENOOK_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_GENOOK_CPERAM_START + _GENOOK_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_GENOOK_CPERAM_START + _GENOOK_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_GENOOK_CPERAM_START + _GENOOK_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_GENOOK_CPERAM_START + _GENOOK_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_GENOOK_CPERAM_START + _GENOOK_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyGenookPatch(void) { - enterGenookSysPatch(); - enterGenookCpePatch(); - configureGenookPatch(); + enterGenookSysPatch(); + enterGenookCpePatch(); + configureGenookPatch(); } PATCH_FUN_SPEC void refreshGenookPatch(void) { - enterGenookCpePatch(); - configureGenookPatch(); + enterGenookCpePatch(); + configureGenookPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_genook(void) { - applyGenookPatch(); + applyGenookPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ghs.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ghs.h index faa572b7..7afd497c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ghs.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_ghs.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageGhs[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageGhs[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_GHS 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageGhs[] = { PATCH_FUN_SPEC void enterGhsCpePatch(void) { #if (_NWORD_PATCHIMAGE_GHS > 0) - uint32_t *pPatchVec = (uint32_t *) (_GHS_CPERAM_START + _GHS_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_GHS_CPERAM_START + _GHS_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageGhs, sizeof(patchImageGhs)); + memcpy(pPatchVec, patchImageGhs, sizeof(patchImageGhs)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterGhsSysPatch(void) PATCH_FUN_SPEC void configureGhsPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_GHS_CPERAM_START + _GHS_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_GHS_CPERAM_START + _GHS_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_GHS_CPERAM_START + _GHS_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_GHS_CPERAM_START + _GHS_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_GHS_CPERAM_START + _GHS_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_GHS_CPERAM_START + _GHS_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyGhsPatch(void) { - enterGhsSysPatch(); - enterGhsCpePatch(); - configureGhsPatch(); + enterGhsSysPatch(); + enterGhsCpePatch(); + configureGhsPatch(); } PATCH_FUN_SPEC void refreshGhsPatch(void) { - enterGhsCpePatch(); - configureGhsPatch(); + enterGhsCpePatch(); + configureGhsPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_ghs(void) { - applyGhsPatch(); + applyGhsPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_lrm.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_lrm.h index 17cda8da..480e2350 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_lrm.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_lrm.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageLrm[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageLrm[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_LRM 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageLrm[] = { PATCH_FUN_SPEC void enterLrmCpePatch(void) { #if (_NWORD_PATCHIMAGE_LRM > 0) - uint32_t *pPatchVec = (uint32_t *) (_LRM_CPERAM_START + _LRM_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_LRM_CPERAM_START + _LRM_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageLrm, sizeof(patchImageLrm)); + memcpy(pPatchVec, patchImageLrm, sizeof(patchImageLrm)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterLrmSysPatch(void) PATCH_FUN_SPEC void configureLrmPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_LRM_CPERAM_START + _LRM_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_LRM_CPERAM_START + _LRM_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_LRM_CPERAM_START + _LRM_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_LRM_CPERAM_START + _LRM_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_LRM_CPERAM_START + _LRM_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_LRM_CPERAM_START + _LRM_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyLrmPatch(void) { - enterLrmSysPatch(); - enterLrmCpePatch(); - configureLrmPatch(); + enterLrmSysPatch(); + enterLrmCpePatch(); + configureLrmPatch(); } PATCH_FUN_SPEC void refreshLrmPatch(void) { - enterLrmCpePatch(); - configureLrmPatch(); + enterLrmCpePatch(); + configureLrmPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_lrm(void) { - applyLrmPatch(); + applyLrmPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_sl_longrange.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_sl_longrange.h index c8608ff7..6c3d3501 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_sl_longrange.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_sl_longrange.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageSlLongrange[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageSlLongrange[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_SL_LONGRANGE 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageSlLongrange[] = { PATCH_FUN_SPEC void enterSlLongrangeCpePatch(void) { #if (_NWORD_PATCHIMAGE_SL_LONGRANGE > 0) - uint32_t *pPatchVec = (uint32_t *) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageSlLongrange, sizeof(patchImageSlLongrange)); + memcpy(pPatchVec, patchImageSlLongrange, sizeof(patchImageSlLongrange)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterSlLongrangeSysPatch(void) PATCH_FUN_SPEC void configureSlLongrangePatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_SL_LONGRANGE_CPERAM_START + _SL_LONGRANGE_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applySlLongrangePatch(void) { - enterSlLongrangeSysPatch(); - enterSlLongrangeCpePatch(); - configureSlLongrangePatch(); + enterSlLongrangeSysPatch(); + enterSlLongrangeCpePatch(); + configureSlLongrangePatch(); } PATCH_FUN_SPEC void refreshSlLongrangePatch(void) { - enterSlLongrangeCpePatch(); - configureSlLongrangePatch(); + enterSlLongrangeCpePatch(); + configureSlLongrangePatch(); } PATCH_FUN_SPEC void rf_patch_cpe_sl_longrange(void) { - applySlLongrangePatch(); + applySlLongrangePatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wb_dsss.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wb_dsss.h index 1d9a16cf..5c891852 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wb_dsss.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wb_dsss.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageWbDsss[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageWbDsss[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_WB_DSSS 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageWbDsss[] = { PATCH_FUN_SPEC void enterWbDsssCpePatch(void) { #if (_NWORD_PATCHIMAGE_WB_DSSS > 0) - uint32_t *pPatchVec = (uint32_t *) (_WB_DSSS_CPERAM_START + _WB_DSSS_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_WB_DSSS_CPERAM_START + _WB_DSSS_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageWbDsss, sizeof(patchImageWbDsss)); + memcpy(pPatchVec, patchImageWbDsss, sizeof(patchImageWbDsss)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterWbDsssSysPatch(void) PATCH_FUN_SPEC void configureWbDsssPatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_WB_DSSS_CPERAM_START + _WB_DSSS_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_WB_DSSS_CPERAM_START + _WB_DSSS_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_WB_DSSS_CPERAM_START + _WB_DSSS_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_WB_DSSS_CPERAM_START + _WB_DSSS_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_WB_DSSS_CPERAM_START + _WB_DSSS_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_WB_DSSS_CPERAM_START + _WB_DSSS_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyWbDsssPatch(void) { - enterWbDsssSysPatch(); - enterWbDsssCpePatch(); - configureWbDsssPatch(); + enterWbDsssSysPatch(); + enterWbDsssCpePatch(); + configureWbDsssPatch(); } PATCH_FUN_SPEC void refreshWbDsssPatch(void) { - enterWbDsssCpePatch(); - configureWbDsssPatch(); + enterWbDsssCpePatch(); + configureWbDsssPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_wb_dsss(void) { - applyWbDsssPatch(); + applyWbDsssPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_ctmode.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_ctmode.h index bc2482e2..cd0682bb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_ctmode.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_ctmode.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageWmbusCtmode[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageWmbusCtmode[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_WMBUS_CTMODE 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageWmbusCtmode[] = { PATCH_FUN_SPEC void enterWmbusCtmodeCpePatch(void) { #if (_NWORD_PATCHIMAGE_WMBUS_CTMODE > 0) - uint32_t *pPatchVec = (uint32_t *) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageWmbusCtmode, sizeof(patchImageWmbusCtmode)); + memcpy(pPatchVec, patchImageWmbusCtmode, sizeof(patchImageWmbusCtmode)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterWmbusCtmodeSysPatch(void) PATCH_FUN_SPEC void configureWmbusCtmodePatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_WMBUS_CTMODE_CPERAM_START + _WMBUS_CTMODE_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyWmbusCtmodePatch(void) { - enterWmbusCtmodeSysPatch(); - enterWmbusCtmodeCpePatch(); - configureWmbusCtmodePatch(); + enterWmbusCtmodeSysPatch(); + enterWmbusCtmodeCpePatch(); + configureWmbusCtmodePatch(); } PATCH_FUN_SPEC void refreshWmbusCtmodePatch(void) { - enterWmbusCtmodeCpePatch(); - configureWmbusCtmodePatch(); + enterWmbusCtmodeCpePatch(); + configureWmbusCtmodePatch(); } PATCH_FUN_SPEC void rf_patch_cpe_wmbus_ctmode(void) { - applyWmbusCtmodePatch(); + applyWmbusCtmodePatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_smode.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_smode.h index 2bfe15a3..7a326275 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_smode.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_cpe_wmbus_smode.h @@ -70,254 +70,255 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageWmbusSmode[] = { - 0x21000569, - 0x2100045d, - 0x21000491, - 0x21000495, - 0x210004bd, - 0x2100064d, - 0x210006fd, - 0x21000725, - 0x2100052b, - 0x210004f1, - 0x21000767, - 0x21000789, - 0x4710b5f8, - 0x460eb5f8, - 0x25012100, - 0x473004ad, - 0x7803480a, - 0xf80ff000, - 0xd00b079b, - 0x78204c12, - 0xd00728ff, - 0x702121ff, - 0x240f490e, - 0x43200224, - 0x82c83160, - 0xb5f8bdf8, - 0x47004801, - 0x2100026b, - 0x00004ce5, - 0xe0014809, - 0x0c004808, - 0x49054c06, - 0x2aff7822, - 0x7acad101, - 0x31607022, - 0x467082c8, - 0x47001c80, - 0x40086200, - 0x210007f4, - 0x08080f07, - 0xf886f000, - 0x0a0a9905, - 0xd1092a6c, - 0x61782008, - 0x1c406920, - 0x310a6038, - 0x91056120, - 0x61782000, - 0x0000bdf8, - 0x4708b4f0, - 0x4801b510, - 0x00004700, - 0x00000989, - 0xf818f000, - 0x2950b2e1, - 0x2804d00b, - 0x2806d001, - 0x490dd107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490a2002, - 0x210c780a, - 0xd0024211, - 0x22804908, - 0xbdfe600a, - 0x4907b5fe, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000117, - 0xe000e200, - 0x0000ccf1, - 0x0000d103, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01deb085, - 0x47204c01, - 0x00003ff7, - 0x000041cb, - 0x4603b570, - 0x29014615, - 0x2900d006, - 0x4a11d006, - 0xf7ff4628, - 0xbd70ff67, - 0xe000480f, - 0x2405480f, - 0xd8034283, - 0x1e640840, - 0xdcf92c00, - 0x200140e3, - 0x18180340, - 0x29010b82, - 0x4906d007, - 0x31802300, - 0xf7ff4628, - 0xb2e0ff51, - 0x4902bd70, - 0x316c4b04, - 0x0000e7f6, - 0x00005c83, - 0x2386bca0, - 0x230d8300, - 0x210007c4, - 0x4e1ab5f8, - 0x6b714605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6374, - 0x07c00a40, - 0x2001d00c, - 0x6b310380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x49076331, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x2100029b, - 0x00003f7b, - 0x40044040, - 0x4a22b510, - 0x61512100, - 0x68894921, - 0xd40900c9, - 0x4b204921, - 0x429805ca, - 0xd8016b4b, - 0xe0004313, - 0x634b4393, - 0xf7ff491d, - 0xbd10ff35, - 0x4d1ab538, - 0x28007f28, - 0x481ad127, - 0x09c08800, - 0xd12207c0, - 0x69604c12, - 0xd11e2800, - 0xf0004668, - 0x4668f88f, - 0x28017800, - 0x4668d117, - 0x28107840, - 0x2008d213, - 0x6a686160, - 0x01400940, - 0x4a0e6020, - 0x62d12100, - 0x21024a0d, - 0x21016011, - 0x60204308, - 0x43082103, - 0x60206268, - 0x4809bd38, - 0xbd384780, - 0x40044000, - 0x21000018, - 0x08930000, - 0x21000280, - 0x000068cf, - 0x21000068, - 0x40041100, - 0xe000e280, - 0x00003bc3, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x4c03b510, - 0xfedcf7ff, - 0x28006820, - 0xbd10d1fa, - 0x40041100, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597d49, - 0x689b4b09, - 0xfef9f7ff, - 0xb510bd10, - 0xfef0f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003c7d, - 0x40045080, - 0x21000280, - 0x40044000, - 0x8801b510, - 0x0f93050a, - 0xd1034a08, - 0x0d890589, - 0xd0012911, - 0xbd104790, - 0x46044790, - 0xd1032801, - 0xf7ffb672, - 0xb662ffc5, - 0xbd104620, - 0x00002645, - 0x4801b403, - 0xbd019001, - 0x00006fa5, - 0x00000000, - 0x00030001, - 0x001f000a, - 0x00eb0059, - 0x04ea0239, - 0x129709f9, - 0x32a11feb, - 0x660a4a78, - 0x9e8c82fa, - 0xc917b663, - 0xdeedd664, - 0xe5e0e3c1, - 0x000000ff, +CPE_PATCH_TYPE patchImageWmbusSmode[] = +{ + 0x21000569, + 0x2100045d, + 0x21000491, + 0x21000495, + 0x210004bd, + 0x2100064d, + 0x210006fd, + 0x21000725, + 0x2100052b, + 0x210004f1, + 0x21000767, + 0x21000789, + 0x4710b5f8, + 0x460eb5f8, + 0x25012100, + 0x473004ad, + 0x7803480a, + 0xf80ff000, + 0xd00b079b, + 0x78204c12, + 0xd00728ff, + 0x702121ff, + 0x240f490e, + 0x43200224, + 0x82c83160, + 0xb5f8bdf8, + 0x47004801, + 0x2100026b, + 0x00004ce5, + 0xe0014809, + 0x0c004808, + 0x49054c06, + 0x2aff7822, + 0x7acad101, + 0x31607022, + 0x467082c8, + 0x47001c80, + 0x40086200, + 0x210007f4, + 0x08080f07, + 0xf886f000, + 0x0a0a9905, + 0xd1092a6c, + 0x61782008, + 0x1c406920, + 0x310a6038, + 0x91056120, + 0x61782000, + 0x0000bdf8, + 0x4708b4f0, + 0x4801b510, + 0x00004700, + 0x00000989, + 0xf818f000, + 0x2950b2e1, + 0x2804d00b, + 0x2806d001, + 0x490dd107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490a2002, + 0x210c780a, + 0xd0024211, + 0x22804908, + 0xbdfe600a, + 0x4907b5fe, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000117, + 0xe000e200, + 0x0000ccf1, + 0x0000d103, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01deb085, + 0x47204c01, + 0x00003ff7, + 0x000041cb, + 0x4603b570, + 0x29014615, + 0x2900d006, + 0x4a11d006, + 0xf7ff4628, + 0xbd70ff67, + 0xe000480f, + 0x2405480f, + 0xd8034283, + 0x1e640840, + 0xdcf92c00, + 0x200140e3, + 0x18180340, + 0x29010b82, + 0x4906d007, + 0x31802300, + 0xf7ff4628, + 0xb2e0ff51, + 0x4902bd70, + 0x316c4b04, + 0x0000e7f6, + 0x00005c83, + 0x2386bca0, + 0x230d8300, + 0x210007c4, + 0x4e1ab5f8, + 0x6b714605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6374, + 0x07c00a40, + 0x2001d00c, + 0x6b310380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x49076331, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x2100029b, + 0x00003f7b, + 0x40044040, + 0x4a22b510, + 0x61512100, + 0x68894921, + 0xd40900c9, + 0x4b204921, + 0x429805ca, + 0xd8016b4b, + 0xe0004313, + 0x634b4393, + 0xf7ff491d, + 0xbd10ff35, + 0x4d1ab538, + 0x28007f28, + 0x481ad127, + 0x09c08800, + 0xd12207c0, + 0x69604c12, + 0xd11e2800, + 0xf0004668, + 0x4668f88f, + 0x28017800, + 0x4668d117, + 0x28107840, + 0x2008d213, + 0x6a686160, + 0x01400940, + 0x4a0e6020, + 0x62d12100, + 0x21024a0d, + 0x21016011, + 0x60204308, + 0x43082103, + 0x60206268, + 0x4809bd38, + 0xbd384780, + 0x40044000, + 0x21000018, + 0x08930000, + 0x21000280, + 0x000068cf, + 0x21000068, + 0x40041100, + 0xe000e280, + 0x00003bc3, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x4c03b510, + 0xfedcf7ff, + 0x28006820, + 0xbd10d1fa, + 0x40041100, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597d49, + 0x689b4b09, + 0xfef9f7ff, + 0xb510bd10, + 0xfef0f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003c7d, + 0x40045080, + 0x21000280, + 0x40044000, + 0x8801b510, + 0x0f93050a, + 0xd1034a08, + 0x0d890589, + 0xd0012911, + 0xbd104790, + 0x46044790, + 0xd1032801, + 0xf7ffb672, + 0xb662ffc5, + 0xbd104620, + 0x00002645, + 0x4801b403, + 0xbd019001, + 0x00006fa5, + 0x00000000, + 0x00030001, + 0x001f000a, + 0x00eb0059, + 0x04ea0239, + 0x129709f9, + 0x32a11feb, + 0x660a4a78, + 0x9e8c82fa, + 0xc917b663, + 0xdeedd664, + 0xe5e0e3c1, + 0x000000ff, }; #define _NWORD_PATCHIMAGE_WMBUS_SMODE 247 @@ -344,9 +345,9 @@ CPE_PATCH_TYPE patchImageWmbusSmode[] = { PATCH_FUN_SPEC void enterWmbusSmodeCpePatch(void) { #if (_NWORD_PATCHIMAGE_WMBUS_SMODE > 0) - uint32_t *pPatchVec = (uint32_t *) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageWmbusSmode, sizeof(patchImageWmbusSmode)); + memcpy(pPatchVec, patchImageWmbusSmode, sizeof(patchImageWmbusSmode)); #endif } @@ -356,43 +357,43 @@ PATCH_FUN_SPEC void enterWmbusSmodeSysPatch(void) PATCH_FUN_SPEC void configureWmbusSmodePatch(void) { - uint8_t *pParserPatchTab = (uint8_t *) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_PARSER_PATCH_TAB_OFFSET); - uint8_t *pPatchTab = (uint8_t *) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_IRQPATCH_OFFSET); + uint8_t* pParserPatchTab = (uint8_t*) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_PARSER_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_WMBUS_SMODE_CPERAM_START + _WMBUS_SMODE_IRQPATCH_OFFSET); - pPatchTab[80] = 0; - pPatchTab[57] = 1; - pPatchTab[53] = 2; - pPatchTab[55] = 3; - pPatchTab[110] = 4; - pPatchTab[107] = 5; - pPatchTab[65] = 6; - pPatchTab[13] = 7; - pPatchTab[43] = 8; - pPatchTab[45] = 9; - pPatchTab[48] = 10; - pParserPatchTab[0] = 11; + pPatchTab[80] = 0; + pPatchTab[57] = 1; + pPatchTab[53] = 2; + pPatchTab[55] = 3; + pPatchTab[110] = 4; + pPatchTab[107] = 5; + pPatchTab[65] = 6; + pPatchTab[13] = 7; + pPatchTab[43] = 8; + pPatchTab[45] = 9; + pPatchTab[48] = 10; + pParserPatchTab[0] = 11; - pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[1] = _IRQ_PATCH_0; } PATCH_FUN_SPEC void applyWmbusSmodePatch(void) { - enterWmbusSmodeSysPatch(); - enterWmbusSmodeCpePatch(); - configureWmbusSmodePatch(); + enterWmbusSmodeSysPatch(); + enterWmbusSmodeCpePatch(); + configureWmbusSmodePatch(); } PATCH_FUN_SPEC void refreshWmbusSmodePatch(void) { - enterWmbusSmodeCpePatch(); - configureWmbusSmodePatch(); + enterWmbusSmodeCpePatch(); + configureWmbusSmodePatch(); } PATCH_FUN_SPEC void rf_patch_cpe_wmbus_smode(void) { - applyWmbusSmodePatch(); + applyWmbusSmodePatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_brepeat.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_brepeat.h index 588d54c7..b1fdb58a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_brepeat.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_brepeat.h @@ -43,370 +43,375 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchBrepeatMce[302] = { - 0x2fcf604e, - 0x030c3f9d, - 0x070c680a, - 0x00068080, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xf80007c0, - 0x1f0000f8, - 0xe007003f, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00070003, - 0x00003d1f, - 0x04000000, - 0x0000000f, - 0x000b0387, - 0x004348f4, - 0x80078000, - 0x00000670, - 0x0510091e, - 0x00070054, - 0x1f080100, - 0x00000031, - 0x3030002f, - 0x0000027f, - 0x00000000, - 0x0000aa00, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72487220, - 0x7303a32d, - 0x72037305, - 0x73067304, - 0x73767204, - 0xc7c07276, - 0x00018001, - 0x90109001, - 0x90010801, - 0x720d720c, - 0xb0c0720e, - 0xb0f07100, - 0x7218a0c0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60836c01, - 0x60a06084, - 0x60836178, - 0x60836083, - 0x12106083, - 0x730f7220, - 0x73117310, - 0x00108181, - 0xb0709180, - 0x60796063, - 0x6656c030, - 0xc282c1e1, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0x7830688a, - 0x78409ab0, - 0x78509ac0, - 0xc4829ad0, - 0x1820c5a0, - 0x1203409d, - 0x16126e23, - 0x7870689a, - 0x607997e0, - 0xb1087276, - 0xb0f3b100, - 0xb0d8b0f1, - 0xb1087100, - 0xb200a0d8, - 0x87e0b760, - 0xb0f19780, - 0x7100b0c1, - 0xb0f17276, - 0xb012a0c1, - 0xb013b002, - 0xb484b003, - 0xb101b0d1, - 0x7100722c, - 0x8140b101, - 0x06f03940, - 0x06f38143, - 0x65b18161, - 0x1a133911, - 0x68c04cc3, - 0x22f08140, - 0x814044bd, - 0x16103980, - 0x85e11203, - 0x1a111403, - 0x44d01e01, - 0x1c13c211, - 0xc31148fa, - 0x48eb1c13, - 0x10301813, - 0x1ef08451, - 0xc10040e5, - 0x1a101830, - 0x68e23911, - 0x65b11030, - 0x68e53911, - 0x12f08461, - 0xc21160f7, - 0x10301813, - 0x1ef08461, - 0xc10040f7, - 0x1a101830, - 0x68f43911, - 0x65b11030, - 0x68f73911, - 0x12f08431, - 0x391165b1, - 0x844168fc, - 0x65b112f0, - 0x69013911, - 0x81a1721c, - 0x81e065a4, - 0x41052220, - 0xc040a0d1, - 0xc0309780, - 0xb0c19760, - 0x7100b0f1, - 0xa0c1b0f1, - 0x72487276, - 0xa002a003, - 0x73057248, - 0x73767306, - 0xa2007276, - 0x9010c7c0, - 0xb0066079, - 0xb004b016, - 0xb002b014, - 0x7810b012, - 0x90509030, - 0x90407820, - 0xb2059060, - 0x83038ae2, - 0x65ba9302, - 0xb064857f, - 0xc00bc00c, - 0xb072b011, - 0xa0c0a0c1, - 0xb0e6b116, - 0x22d18ab1, - 0xb0f24141, - 0x7100b0c2, - 0xa760b073, - 0xb7607378, - 0x226080b0, - 0x661c454b, - 0xb88f6141, - 0x18f08960, - 0x100f9550, - 0xa0c2720e, - 0xb0d7b201, - 0x7100b107, - 0x8ad0b041, - 0x415d22e0, - 0x22208210, - 0xb04d4536, - 0xc300b06d, - 0xb2019070, - 0x6656c040, - 0x7000a044, - 0x8180b88c, - 0x392489a4, - 0x00043184, - 0xc0509184, - 0x73766656, - 0x72487276, - 0x72027206, - 0x73057204, - 0x60797306, - 0xb32d721b, - 0x6656c060, - 0x6521b0f8, - 0xb107b0d7, - 0xb1077100, - 0xb1077100, - 0xb1077100, - 0xb1077100, - 0x8090120a, - 0x44632200, - 0x161a6605, - 0x1e0b815b, - 0x85524189, - 0x9862d070, - 0x1cba6656, - 0x18ab4da2, - 0x499e1efb, - 0x1af010b0, - 0x699c6605, - 0xc0f0a205, - 0x69a06605, - 0x6166a0d7, - 0x45a82201, - 0x61a913f2, - 0x92c21212, - 0x710085e2, - 0x1a12b101, - 0x45ab1e02, - 0x22017000, - 0x13f245b5, - 0x121261b6, - 0x710092c2, - 0x7000b101, - 0x39838143, - 0x94732a73, - 0x1a1085e0, - 0x120f1613, - 0x69c2143f, - 0xc200120b, - 0x41c91c0f, - 0x791b61cb, - 0xc40b61cf, - 0x318b18fb, - 0x8400313b, - 0x04107941, - 0x940000b0, - 0xa405b404, - 0x1e4185e1, - 0x1e3141e9, - 0x841041e1, - 0x31103180, - 0x94203980, - 0x841061ee, - 0x39803180, - 0x31101001, - 0x94201410, - 0x841061ee, - 0x39803180, - 0x94203120, - 0x84301201, - 0x87d097c0, - 0x84401401, - 0x87d097c0, - 0xc1001401, - 0x31111801, - 0x70009571, - 0x22011202, - 0x3a324201, - 0x38326202, - 0x69fd3911, - 0x85e37000, - 0x71001202, - 0xb107b88d, - 0x31818b11, - 0x14123d81, - 0x31818b21, - 0x14123d81, - 0x1e031a13, - 0x22f24607, - 0x12124619, - 0x1202621a, - 0x70009192, - 0x22b08ab0, - 0x1e3b4622, - 0x62244654, - 0x46541e7b, - 0xb889c00b, - 0x31808940, - 0x16103d80, - 0x140c3d30, - 0x226080b0, - 0x70004230, - 0x39838ab3, - 0x8ab106f3, - 0x0401cff0, - 0x1c1c3031, - 0x12004e4c, - 0x1c0c1810, - 0x80b04a4e, - 0x42412260, - 0x10c27000, - 0x3c321612, - 0x83208ae1, - 0x42502210, - 0x93016252, - 0x7000b0f2, - 0x623d101c, - 0x623d100c, - 0x62491821, - 0x62491421, - 0x624a161b, - 0x88409850, - 0x46572200, - 0x7000b830 +MCE_PATCH_TYPE patchBrepeatMce[302] = +{ + 0x2fcf604e, + 0x030c3f9d, + 0x070c680a, + 0x00068080, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xf80007c0, + 0x1f0000f8, + 0xe007003f, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00070003, + 0x00003d1f, + 0x04000000, + 0x0000000f, + 0x000b0387, + 0x004348f4, + 0x80078000, + 0x00000670, + 0x0510091e, + 0x00070054, + 0x1f080100, + 0x00000031, + 0x3030002f, + 0x0000027f, + 0x00000000, + 0x0000aa00, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72487220, + 0x7303a32d, + 0x72037305, + 0x73067304, + 0x73767204, + 0xc7c07276, + 0x00018001, + 0x90109001, + 0x90010801, + 0x720d720c, + 0xb0c0720e, + 0xb0f07100, + 0x7218a0c0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60836c01, + 0x60a06084, + 0x60836178, + 0x60836083, + 0x12106083, + 0x730f7220, + 0x73117310, + 0x00108181, + 0xb0709180, + 0x60796063, + 0x6656c030, + 0xc282c1e1, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0x7830688a, + 0x78409ab0, + 0x78509ac0, + 0xc4829ad0, + 0x1820c5a0, + 0x1203409d, + 0x16126e23, + 0x7870689a, + 0x607997e0, + 0xb1087276, + 0xb0f3b100, + 0xb0d8b0f1, + 0xb1087100, + 0xb200a0d8, + 0x87e0b760, + 0xb0f19780, + 0x7100b0c1, + 0xb0f17276, + 0xb012a0c1, + 0xb013b002, + 0xb484b003, + 0xb101b0d1, + 0x7100722c, + 0x8140b101, + 0x06f03940, + 0x06f38143, + 0x65b18161, + 0x1a133911, + 0x68c04cc3, + 0x22f08140, + 0x814044bd, + 0x16103980, + 0x85e11203, + 0x1a111403, + 0x44d01e01, + 0x1c13c211, + 0xc31148fa, + 0x48eb1c13, + 0x10301813, + 0x1ef08451, + 0xc10040e5, + 0x1a101830, + 0x68e23911, + 0x65b11030, + 0x68e53911, + 0x12f08461, + 0xc21160f7, + 0x10301813, + 0x1ef08461, + 0xc10040f7, + 0x1a101830, + 0x68f43911, + 0x65b11030, + 0x68f73911, + 0x12f08431, + 0x391165b1, + 0x844168fc, + 0x65b112f0, + 0x69013911, + 0x81a1721c, + 0x81e065a4, + 0x41052220, + 0xc040a0d1, + 0xc0309780, + 0xb0c19760, + 0x7100b0f1, + 0xa0c1b0f1, + 0x72487276, + 0xa002a003, + 0x73057248, + 0x73767306, + 0xa2007276, + 0x9010c7c0, + 0xb0066079, + 0xb004b016, + 0xb002b014, + 0x7810b012, + 0x90509030, + 0x90407820, + 0xb2059060, + 0x83038ae2, + 0x65ba9302, + 0xb064857f, + 0xc00bc00c, + 0xb072b011, + 0xa0c0a0c1, + 0xb0e6b116, + 0x22d18ab1, + 0xb0f24141, + 0x7100b0c2, + 0xa760b073, + 0xb7607378, + 0x226080b0, + 0x661c454b, + 0xb88f6141, + 0x18f08960, + 0x100f9550, + 0xa0c2720e, + 0xb0d7b201, + 0x7100b107, + 0x8ad0b041, + 0x415d22e0, + 0x22208210, + 0xb04d4536, + 0xc300b06d, + 0xb2019070, + 0x6656c040, + 0x7000a044, + 0x8180b88c, + 0x392489a4, + 0x00043184, + 0xc0509184, + 0x73766656, + 0x72487276, + 0x72027206, + 0x73057204, + 0x60797306, + 0xb32d721b, + 0x6656c060, + 0x6521b0f8, + 0xb107b0d7, + 0xb1077100, + 0xb1077100, + 0xb1077100, + 0xb1077100, + 0x8090120a, + 0x44632200, + 0x161a6605, + 0x1e0b815b, + 0x85524189, + 0x9862d070, + 0x1cba6656, + 0x18ab4da2, + 0x499e1efb, + 0x1af010b0, + 0x699c6605, + 0xc0f0a205, + 0x69a06605, + 0x6166a0d7, + 0x45a82201, + 0x61a913f2, + 0x92c21212, + 0x710085e2, + 0x1a12b101, + 0x45ab1e02, + 0x22017000, + 0x13f245b5, + 0x121261b6, + 0x710092c2, + 0x7000b101, + 0x39838143, + 0x94732a73, + 0x1a1085e0, + 0x120f1613, + 0x69c2143f, + 0xc200120b, + 0x41c91c0f, + 0x791b61cb, + 0xc40b61cf, + 0x318b18fb, + 0x8400313b, + 0x04107941, + 0x940000b0, + 0xa405b404, + 0x1e4185e1, + 0x1e3141e9, + 0x841041e1, + 0x31103180, + 0x94203980, + 0x841061ee, + 0x39803180, + 0x31101001, + 0x94201410, + 0x841061ee, + 0x39803180, + 0x94203120, + 0x84301201, + 0x87d097c0, + 0x84401401, + 0x87d097c0, + 0xc1001401, + 0x31111801, + 0x70009571, + 0x22011202, + 0x3a324201, + 0x38326202, + 0x69fd3911, + 0x85e37000, + 0x71001202, + 0xb107b88d, + 0x31818b11, + 0x14123d81, + 0x31818b21, + 0x14123d81, + 0x1e031a13, + 0x22f24607, + 0x12124619, + 0x1202621a, + 0x70009192, + 0x22b08ab0, + 0x1e3b4622, + 0x62244654, + 0x46541e7b, + 0xb889c00b, + 0x31808940, + 0x16103d80, + 0x140c3d30, + 0x226080b0, + 0x70004230, + 0x39838ab3, + 0x8ab106f3, + 0x0401cff0, + 0x1c1c3031, + 0x12004e4c, + 0x1c0c1810, + 0x80b04a4e, + 0x42412260, + 0x10c27000, + 0x3c321612, + 0x83208ae1, + 0x42502210, + 0x93016252, + 0x7000b0f2, + 0x623d101c, + 0x623d100c, + 0x62491821, + 0x62491421, + 0x624a161b, + 0x88409850, + 0x46572200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_brepeat(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 302; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchBrepeatMce[i]; - } + uint32_t i; + + for (i = 0; i < 302; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchBrepeatMce[i]; + } + #else - const uint32_t *pS = patchBrepeatMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 37; + const uint32_t* pS = patchBrepeatMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 37; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk.h index 9092ccbe..c8378c5f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk.h @@ -43,524 +43,529 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchGenfskMce[460] = { - 0x2fcf602b, - 0x030c3f9d, - 0x070c680a, - 0xfff0003f, - 0xff0000ff, - 0x00030006, - 0x3d1f0007, - 0x00000000, - 0x000f0400, - 0x03870000, - 0x40f4000b, - 0x80000043, - 0x06708082, - 0x091e0000, - 0x00540510, - 0x02000005, - 0x00613e10, - 0x002f0000, - 0x027f3030, - 0x00000000, - 0xaa000000, - 0x72200000, - 0xa32d7248, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x60696068, - 0x635360e5, - 0x60686068, - 0x60686068, - 0x60696068, - 0x635360e5, - 0x60686068, - 0x60686068, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x6040b070, - 0xc030605e, - 0xc0b16792, - 0xc470c282, - 0x6f131820, - 0x16116e23, - 0x686f1612, - 0x9ab07830, - 0x9ac07840, - 0x9ad07850, - 0xc5a0c482, - 0x40821820, - 0x6e231203, - 0x687f1612, - 0x97e078a0, - 0x7276605e, - 0x94908160, - 0x39808140, - 0x10012a70, - 0x84321611, - 0xc0f38444, - 0xc200c0f5, - 0x40aa1c01, - 0x1c10c100, - 0x4ca240a0, - 0x18031013, - 0x1a131830, - 0x39121a10, - 0x60aa689d, - 0x60aa13f3, - 0x101513f3, - 0x1850c100, - 0x1a101a15, - 0x68a83914, - 0x7100b0d8, - 0xa0d8b108, - 0xb760b200, - 0x978087e0, - 0xb0c1b0f1, - 0xb0027100, - 0xb0f1b012, - 0x7276a0c1, - 0xb003b480, - 0x7229b013, - 0x7100b0d0, - 0x8140b100, - 0x71009290, - 0x8140b100, - 0x44c322f0, - 0x1c0313f0, - 0x929340cf, - 0x71009492, - 0x9295b100, - 0x71009494, - 0xb0d0b100, - 0x7000a480, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0xa200a002, - 0x730f7000, - 0xc0407310, - 0xc1006792, - 0x648591c0, - 0xb0f3b483, - 0x7100b0c3, - 0x64d6a0c3, - 0xb006605e, - 0xb004b016, - 0xb002b014, - 0x8400b012, - 0x04207862, - 0x39838143, - 0x94732a73, - 0x1832c1f2, - 0x10213162, - 0x00123151, - 0x94000020, - 0x16101030, - 0x31211001, - 0x22103930, - 0x12204110, - 0x10033150, - 0x00103180, - 0x93501630, - 0x12041202, - 0x41232273, - 0x97c08430, - 0x1a8287d2, - 0x97c08450, - 0x1a8487d4, - 0x22636125, - 0x84404130, - 0x87d097c0, - 0x14021a80, - 0x97c08460, - 0x1a8087d0, - 0x613c1404, - 0x78918440, - 0x97c00410, - 0x1a4287d2, - 0x78918460, - 0x97c00410, - 0x1a4487d4, - 0x31543152, - 0x06333963, - 0x38321613, - 0x31823834, - 0x31843982, - 0x95720042, - 0x90307810, - 0x78209050, - 0x90609040, - 0x8ae2b205, - 0x93028303, - 0xc00bc00c, - 0x31808140, - 0x39403980, - 0xc0f38141, - 0xc0140431, - 0xc0021441, - 0x695e1412, - 0x847d3122, - 0x140dc010, - 0x142d312d, - 0x318e8ace, - 0x397e311e, - 0x31498ac9, - 0x39493979, - 0x109a3129, - 0x720d720c, - 0xb101720e, - 0x7100b0d1, - 0xa0d1b072, - 0xb06ea04e, - 0xb06cb011, - 0x978ab089, - 0xb7647276, - 0xc662a764, - 0xc04f9762, - 0x8ab166d4, - 0x458c22f1, - 0x22f18ad1, - 0x6232458c, - 0xb0737100, - 0x80b7b760, - 0x45c32207, - 0x8ab1a760, - 0x419d22f1, - 0x419d2237, - 0x80b0b113, - 0x45982230, - 0x22e161ab, - 0x809041b0, - 0x41b02250, - 0x8210b0f5, - 0x418c2220, - 0xb7649789, - 0xb0f6a764, - 0x978d618c, - 0xa764b764, - 0x618cb0f6, - 0x22f08ad0, - 0x223741bc, - 0xb07541bc, - 0x80b0b113, - 0x45b62230, - 0x618cb087, - 0x431722d1, - 0x22208090, - 0x669a4317, - 0x978f618c, - 0x8410c7f3, - 0x39803180, - 0x00303183, - 0xb0879410, - 0xb0f2a0e3, - 0xb0f5a0c2, - 0xb0f1a0c5, - 0xa0c6b0c1, - 0xb113b110, - 0x220080b0, - 0x223045d4, - 0x710045d4, - 0x97801260, - 0xb88fb0f1, - 0x85708961, - 0x95511801, - 0x8a718a60, - 0xa487a488, - 0x1801c022, - 0x4df41c21, - 0x49f21412, - 0x1c0161f5, - 0x4df441f5, - 0x61f5b487, - 0xb041b488, - 0x8ad0b061, - 0x41fd22e0, - 0x22208210, - 0x71004570, - 0xb06eb04e, - 0x220180b1, - 0x2231468c, - 0x7276468c, - 0x8471b0f6, - 0xc2603121, - 0x97801410, - 0x9760c7e0, - 0x9760c6f0, - 0xb0c6b0f6, - 0xb7b0a0c1, - 0x8a748a63, - 0x8a948a83, - 0x80b17100, - 0x468c2201, - 0x468c2231, - 0x22c08ab0, - 0x89914624, - 0x41702201, - 0xc00081c1, - 0x847091c0, - 0x6a2881a2, - 0xc30091c1, - 0xb2019070, - 0xa0e3a0e0, - 0x7000a044, - 0xb0737100, - 0x80b7b760, - 0x46512207, - 0x466f2237, - 0x8ab1a760, - 0x424a22e1, - 0x22508090, - 0xb0f5424a, - 0x22208210, - 0x978d4232, - 0xa764b764, - 0x6232b0f6, - 0x431722d1, - 0x22208090, - 0x669a4317, - 0x978f6232, - 0xa0c2b0f2, - 0xa0c5b0f5, - 0xb0c1b0f1, - 0xb110a0c6, - 0x80b0b113, - 0x46592200, - 0x46592230, - 0x12607100, - 0xb0f19780, - 0x8961b88f, - 0x31808570, - 0x18013d80, - 0x8a609551, - 0xa1828a71, - 0x978f61e6, - 0xa0c2b0f2, - 0xa0c5b0f5, - 0xb0c1b0f1, - 0xb110a0c6, - 0x80b0b113, - 0x46772200, - 0x46772230, - 0x12607100, - 0xb0f19780, - 0x8961b88f, - 0x3d808570, - 0x95511801, - 0x8a918a80, - 0x61e6b182, - 0xa760b073, - 0xa7b0b760, - 0xa04eb072, - 0xb011b06e, - 0x22f08ab0, - 0x220145c3, - 0x626f4651, - 0x22b08ab0, - 0x1e3b46a0, - 0x62a246d2, - 0x46d21e7b, - 0xb889c00b, - 0x31808940, - 0x16103d80, - 0x140c3d30, - 0x220080b0, - 0x700042ae, - 0x39838ab3, - 0x8ab106f3, - 0x0401cff0, - 0x1c1c3031, - 0x12004eca, - 0x1c0c1810, - 0x80b04acc, - 0x42bf2200, - 0x10c27000, - 0x3c321612, - 0x83208ae1, - 0x42ce2210, - 0x930162d0, - 0x7000b0f2, - 0x62bb101c, - 0x62bb100c, - 0x62c71821, - 0x62c71421, - 0x62c8161b, - 0xb0f1b0f6, - 0xb113b110, - 0xb0f2b0f5, - 0x720d720c, - 0xb0e0720e, - 0x8ab2b0e3, - 0x42e522f2, - 0xb763b0c6, - 0x8ad062e8, - 0x430822f0, - 0xa404b405, - 0xa429b428, - 0x3180caa0, - 0x0001caa1, - 0x94619451, - 0x31838ad3, - 0x84103983, - 0x39803180, - 0x00303183, - 0x84009410, - 0x39503150, - 0x39838ad3, - 0xc1f406f3, - 0x31841834, - 0x00403134, - 0xb0899400, - 0x431222e2, - 0x394a8aca, - 0x312a398a, - 0xb0c5978a, - 0xb763b0c6, - 0x22d28ab2, - 0xb0c24316, - 0xb20f7000, - 0xa0e3a0e0, - 0xb764978e, - 0xb0f6a764, - 0xb113b110, - 0x22f08210, - 0xb0f54320, - 0xa0048002, - 0xa001a006, - 0x72047203, - 0x6792c050, - 0xb7647100, - 0xb0c5b0f6, - 0x7100a20f, - 0xa0c5b0f5, - 0x90307810, - 0x78209002, - 0x90609040, - 0xa20fb072, - 0x978a66d4, - 0xb0f6a764, - 0xb88c6185, - 0x89a48180, - 0x31843924, - 0x91840004, - 0x6792c060, - 0x72767376, - 0x72067248, - 0x72047202, - 0x73067305, - 0x1300605e, - 0xb32d91b0, - 0x6792c070, - 0x64f3b0f8, - 0x1a101200, - 0xc3809780, - 0xc2809760, - 0xa0c19760, - 0x8090b0c6, - 0x44402200, - 0x1e048154, - 0x97844363, - 0x8552b0f6, - 0x9862d080, - 0x89916792, - 0x43792211, - 0x8a938a82, - 0x9862e090, - 0x67929873, - 0x8a62637f, - 0xe0a08a73, - 0x98739862, - 0x87906792, - 0x1c018781, - 0x18014b8f, - 0x4b8d1ef1, - 0x1af18781, - 0x71009781, - 0x16f1b0f6, - 0xa2059781, - 0xb0f67100, - 0x6341a0c6, - 0x88409850, - 0x47932200, - 0x7000b830 +MCE_PATCH_TYPE patchGenfskMce[460] = +{ + 0x2fcf602b, + 0x030c3f9d, + 0x070c680a, + 0xfff0003f, + 0xff0000ff, + 0x00030006, + 0x3d1f0007, + 0x00000000, + 0x000f0400, + 0x03870000, + 0x40f4000b, + 0x80000043, + 0x06708082, + 0x091e0000, + 0x00540510, + 0x02000005, + 0x00613e10, + 0x002f0000, + 0x027f3030, + 0x00000000, + 0xaa000000, + 0x72200000, + 0xa32d7248, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x60696068, + 0x635360e5, + 0x60686068, + 0x60686068, + 0x60696068, + 0x635360e5, + 0x60686068, + 0x60686068, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x6040b070, + 0xc030605e, + 0xc0b16792, + 0xc470c282, + 0x6f131820, + 0x16116e23, + 0x686f1612, + 0x9ab07830, + 0x9ac07840, + 0x9ad07850, + 0xc5a0c482, + 0x40821820, + 0x6e231203, + 0x687f1612, + 0x97e078a0, + 0x7276605e, + 0x94908160, + 0x39808140, + 0x10012a70, + 0x84321611, + 0xc0f38444, + 0xc200c0f5, + 0x40aa1c01, + 0x1c10c100, + 0x4ca240a0, + 0x18031013, + 0x1a131830, + 0x39121a10, + 0x60aa689d, + 0x60aa13f3, + 0x101513f3, + 0x1850c100, + 0x1a101a15, + 0x68a83914, + 0x7100b0d8, + 0xa0d8b108, + 0xb760b200, + 0x978087e0, + 0xb0c1b0f1, + 0xb0027100, + 0xb0f1b012, + 0x7276a0c1, + 0xb003b480, + 0x7229b013, + 0x7100b0d0, + 0x8140b100, + 0x71009290, + 0x8140b100, + 0x44c322f0, + 0x1c0313f0, + 0x929340cf, + 0x71009492, + 0x9295b100, + 0x71009494, + 0xb0d0b100, + 0x7000a480, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0xa200a002, + 0x730f7000, + 0xc0407310, + 0xc1006792, + 0x648591c0, + 0xb0f3b483, + 0x7100b0c3, + 0x64d6a0c3, + 0xb006605e, + 0xb004b016, + 0xb002b014, + 0x8400b012, + 0x04207862, + 0x39838143, + 0x94732a73, + 0x1832c1f2, + 0x10213162, + 0x00123151, + 0x94000020, + 0x16101030, + 0x31211001, + 0x22103930, + 0x12204110, + 0x10033150, + 0x00103180, + 0x93501630, + 0x12041202, + 0x41232273, + 0x97c08430, + 0x1a8287d2, + 0x97c08450, + 0x1a8487d4, + 0x22636125, + 0x84404130, + 0x87d097c0, + 0x14021a80, + 0x97c08460, + 0x1a8087d0, + 0x613c1404, + 0x78918440, + 0x97c00410, + 0x1a4287d2, + 0x78918460, + 0x97c00410, + 0x1a4487d4, + 0x31543152, + 0x06333963, + 0x38321613, + 0x31823834, + 0x31843982, + 0x95720042, + 0x90307810, + 0x78209050, + 0x90609040, + 0x8ae2b205, + 0x93028303, + 0xc00bc00c, + 0x31808140, + 0x39403980, + 0xc0f38141, + 0xc0140431, + 0xc0021441, + 0x695e1412, + 0x847d3122, + 0x140dc010, + 0x142d312d, + 0x318e8ace, + 0x397e311e, + 0x31498ac9, + 0x39493979, + 0x109a3129, + 0x720d720c, + 0xb101720e, + 0x7100b0d1, + 0xa0d1b072, + 0xb06ea04e, + 0xb06cb011, + 0x978ab089, + 0xb7647276, + 0xc662a764, + 0xc04f9762, + 0x8ab166d4, + 0x458c22f1, + 0x22f18ad1, + 0x6232458c, + 0xb0737100, + 0x80b7b760, + 0x45c32207, + 0x8ab1a760, + 0x419d22f1, + 0x419d2237, + 0x80b0b113, + 0x45982230, + 0x22e161ab, + 0x809041b0, + 0x41b02250, + 0x8210b0f5, + 0x418c2220, + 0xb7649789, + 0xb0f6a764, + 0x978d618c, + 0xa764b764, + 0x618cb0f6, + 0x22f08ad0, + 0x223741bc, + 0xb07541bc, + 0x80b0b113, + 0x45b62230, + 0x618cb087, + 0x431722d1, + 0x22208090, + 0x669a4317, + 0x978f618c, + 0x8410c7f3, + 0x39803180, + 0x00303183, + 0xb0879410, + 0xb0f2a0e3, + 0xb0f5a0c2, + 0xb0f1a0c5, + 0xa0c6b0c1, + 0xb113b110, + 0x220080b0, + 0x223045d4, + 0x710045d4, + 0x97801260, + 0xb88fb0f1, + 0x85708961, + 0x95511801, + 0x8a718a60, + 0xa487a488, + 0x1801c022, + 0x4df41c21, + 0x49f21412, + 0x1c0161f5, + 0x4df441f5, + 0x61f5b487, + 0xb041b488, + 0x8ad0b061, + 0x41fd22e0, + 0x22208210, + 0x71004570, + 0xb06eb04e, + 0x220180b1, + 0x2231468c, + 0x7276468c, + 0x8471b0f6, + 0xc2603121, + 0x97801410, + 0x9760c7e0, + 0x9760c6f0, + 0xb0c6b0f6, + 0xb7b0a0c1, + 0x8a748a63, + 0x8a948a83, + 0x80b17100, + 0x468c2201, + 0x468c2231, + 0x22c08ab0, + 0x89914624, + 0x41702201, + 0xc00081c1, + 0x847091c0, + 0x6a2881a2, + 0xc30091c1, + 0xb2019070, + 0xa0e3a0e0, + 0x7000a044, + 0xb0737100, + 0x80b7b760, + 0x46512207, + 0x466f2237, + 0x8ab1a760, + 0x424a22e1, + 0x22508090, + 0xb0f5424a, + 0x22208210, + 0x978d4232, + 0xa764b764, + 0x6232b0f6, + 0x431722d1, + 0x22208090, + 0x669a4317, + 0x978f6232, + 0xa0c2b0f2, + 0xa0c5b0f5, + 0xb0c1b0f1, + 0xb110a0c6, + 0x80b0b113, + 0x46592200, + 0x46592230, + 0x12607100, + 0xb0f19780, + 0x8961b88f, + 0x31808570, + 0x18013d80, + 0x8a609551, + 0xa1828a71, + 0x978f61e6, + 0xa0c2b0f2, + 0xa0c5b0f5, + 0xb0c1b0f1, + 0xb110a0c6, + 0x80b0b113, + 0x46772200, + 0x46772230, + 0x12607100, + 0xb0f19780, + 0x8961b88f, + 0x3d808570, + 0x95511801, + 0x8a918a80, + 0x61e6b182, + 0xa760b073, + 0xa7b0b760, + 0xa04eb072, + 0xb011b06e, + 0x22f08ab0, + 0x220145c3, + 0x626f4651, + 0x22b08ab0, + 0x1e3b46a0, + 0x62a246d2, + 0x46d21e7b, + 0xb889c00b, + 0x31808940, + 0x16103d80, + 0x140c3d30, + 0x220080b0, + 0x700042ae, + 0x39838ab3, + 0x8ab106f3, + 0x0401cff0, + 0x1c1c3031, + 0x12004eca, + 0x1c0c1810, + 0x80b04acc, + 0x42bf2200, + 0x10c27000, + 0x3c321612, + 0x83208ae1, + 0x42ce2210, + 0x930162d0, + 0x7000b0f2, + 0x62bb101c, + 0x62bb100c, + 0x62c71821, + 0x62c71421, + 0x62c8161b, + 0xb0f1b0f6, + 0xb113b110, + 0xb0f2b0f5, + 0x720d720c, + 0xb0e0720e, + 0x8ab2b0e3, + 0x42e522f2, + 0xb763b0c6, + 0x8ad062e8, + 0x430822f0, + 0xa404b405, + 0xa429b428, + 0x3180caa0, + 0x0001caa1, + 0x94619451, + 0x31838ad3, + 0x84103983, + 0x39803180, + 0x00303183, + 0x84009410, + 0x39503150, + 0x39838ad3, + 0xc1f406f3, + 0x31841834, + 0x00403134, + 0xb0899400, + 0x431222e2, + 0x394a8aca, + 0x312a398a, + 0xb0c5978a, + 0xb763b0c6, + 0x22d28ab2, + 0xb0c24316, + 0xb20f7000, + 0xa0e3a0e0, + 0xb764978e, + 0xb0f6a764, + 0xb113b110, + 0x22f08210, + 0xb0f54320, + 0xa0048002, + 0xa001a006, + 0x72047203, + 0x6792c050, + 0xb7647100, + 0xb0c5b0f6, + 0x7100a20f, + 0xa0c5b0f5, + 0x90307810, + 0x78209002, + 0x90609040, + 0xa20fb072, + 0x978a66d4, + 0xb0f6a764, + 0xb88c6185, + 0x89a48180, + 0x31843924, + 0x91840004, + 0x6792c060, + 0x72767376, + 0x72067248, + 0x72047202, + 0x73067305, + 0x1300605e, + 0xb32d91b0, + 0x6792c070, + 0x64f3b0f8, + 0x1a101200, + 0xc3809780, + 0xc2809760, + 0xa0c19760, + 0x8090b0c6, + 0x44402200, + 0x1e048154, + 0x97844363, + 0x8552b0f6, + 0x9862d080, + 0x89916792, + 0x43792211, + 0x8a938a82, + 0x9862e090, + 0x67929873, + 0x8a62637f, + 0xe0a08a73, + 0x98739862, + 0x87906792, + 0x1c018781, + 0x18014b8f, + 0x4b8d1ef1, + 0x1af18781, + 0x71009781, + 0x16f1b0f6, + 0xa2059781, + 0xb0f67100, + 0x6341a0c6, + 0x88409850, + 0x47932200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_genfsk(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 460; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskMce[i]; - } + uint32_t i; + + for (i = 0; i < 460; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskMce[i]; + } + #else - const uint32_t *pS = patchGenfskMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 57; + const uint32_t* pS = patchGenfskMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 57; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_ant_div_pqt.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_ant_div_pqt.h index 0c3567a7..e6d86ca7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_ant_div_pqt.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_ant_div_pqt.h @@ -43,485 +43,490 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchGenfskAntDivPqtMce[415] = { - 0x2fcf602d, - 0x00003f9d, - 0x470a031a, - 0x000f0387, - 0xff00ffcf, - 0x80000006, - 0x00070003, - 0x00003d1f, - 0x04000000, - 0x0000000f, - 0x000b0387, - 0x004340f4, - 0x80828000, - 0x00000670, - 0x0510091e, - 0x00050054, - 0x3e100200, - 0x00000061, - 0x0c30002f, - 0x0000017f, - 0xaaaa0000, - 0x0000aaaa, - 0x72200000, - 0xa32d7248, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x606c606a, - 0x62cf60e4, - 0x606a606a, - 0x606b606a, - 0x606c606a, - 0x62cf60e4, - 0x606a606a, - 0x606b606a, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x6042b070, - 0x60606060, - 0x6738c030, - 0xc282c0c1, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0x78306872, - 0x78409ab0, - 0x78509ac0, - 0x78609ad0, - 0xc4829ae0, - 0x1820c5a0, - 0x12034087, - 0x16126e23, - 0x60606884, - 0x94908160, - 0x39808140, - 0x10012a70, - 0x84321611, - 0xc0f38444, - 0xc200c0f5, - 0x40ac1c01, - 0x1c10c100, - 0x4ca440a2, - 0x18031013, - 0x1a131830, - 0x39121a10, - 0x60ac689f, - 0x60ac13f3, - 0x101513f3, - 0x1850c100, - 0x1a101a15, - 0x68aa3914, - 0x7100b0d8, - 0xa0d8b108, - 0x85e0b005, - 0x44b51e00, - 0xb24060b7, - 0xb200a005, - 0xb003b480, - 0xb002b013, - 0x7229b012, - 0x7100b0d0, - 0x8140b100, - 0x71009290, - 0x8140b100, - 0x44c322f0, - 0x1c0313f0, - 0x929340cf, - 0x71009492, - 0x9295b100, - 0x71009494, - 0xb0d0b100, - 0x7000a480, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7000a002, - 0x7310730f, - 0xd04085e1, - 0x67389861, - 0x91c0c100, - 0xb4836488, - 0xb0c3b0f3, - 0xa0c37100, - 0x606064d6, - 0xb016b006, - 0xb014b004, - 0xb012b002, - 0x78728400, - 0x81430420, - 0x2a733983, - 0xc1f29473, - 0x31621832, - 0x31511021, - 0x00200012, - 0x3142c022, - 0x94000020, - 0x16101030, - 0x31211001, - 0x22103930, - 0x12204114, - 0x10033150, - 0x00103180, - 0x93501630, - 0x12041202, - 0x41272273, - 0x97c08430, - 0x1a8287d2, - 0x97c08450, - 0x1a8487d4, - 0x22636129, - 0x84404134, - 0x87d097c0, - 0x14021a80, - 0x97c08460, - 0x1a8087d0, - 0x61401404, - 0x78918440, - 0x97c00410, - 0x1a4287d2, - 0x78918460, - 0x97c00410, - 0x1a4487d4, - 0x31543152, - 0x06333963, - 0x38321613, - 0x31823834, - 0x31843982, - 0x95720042, - 0x90307810, - 0x78209050, - 0x90609040, - 0x31808200, - 0x78b13980, - 0x92001410, - 0x8ae2b205, - 0x93028303, - 0x31808140, - 0x39403980, - 0xc0f38141, - 0xc0140431, - 0xc0021441, - 0x69661412, - 0x847d3122, - 0x8ac0161d, - 0x39803180, - 0x312d140d, - 0xc200142d, - 0x180d3120, - 0xa04eb072, - 0xb011b06e, - 0x7276b06c, - 0xa764b764, - 0x9762c662, - 0x7255c04f, - 0xb0f1b0f6, - 0xb113b110, - 0x720d720c, - 0xa0e0720e, - 0xb405b0e3, - 0x8ad3a404, - 0x39833183, - 0x31808410, - 0x31833980, - 0x94100030, - 0x31508400, - 0x8ad33950, - 0x06f33983, - 0x1834c1f4, - 0x31343184, - 0x94000040, - 0xa0e0b089, - 0xb0c1a0e3, - 0xb228b005, - 0x84017880, - 0xc0200401, - 0x00013140, - 0x72769401, - 0x9760c030, - 0x821a6702, - 0x1a1078a0, - 0xa7609780, - 0xb113b760, - 0x672cb0f1, - 0x8ac07100, - 0x97803980, - 0xb760a760, - 0x80b0b0f1, - 0x45cd2230, - 0x10a0b064, - 0x06103920, - 0x45cb1e00, - 0x7100b069, - 0x8ad061a6, - 0x41dc22e0, - 0x392010a0, - 0x1e000610, - 0x10a345dc, - 0x3d833143, - 0x16118611, - 0x61cb9611, - 0x314310a3, - 0xd0503d83, - 0x67389863, - 0x8ac0b064, - 0x78a13980, - 0x97801410, - 0xb760a760, - 0xb0f1b113, - 0x7100672c, - 0x223080b0, - 0x61fd45f2, - 0x31428212, - 0xd0603d82, - 0x67389862, - 0x1c23671b, - 0x67024a16, - 0x67026211, - 0x31428212, - 0xd0703d82, - 0x67389862, - 0x78a0671b, - 0x97801a10, - 0xb760a760, - 0x7100b0f1, - 0xc012b069, - 0x31823172, - 0x10203d82, - 0x10031032, - 0x6217670a, - 0x7276670a, - 0x9760c660, - 0x7880978d, - 0x04018401, - 0xc0509401, - 0xa76393b0, - 0xb0e0b763, - 0xb110a0e3, - 0xb0f6b113, - 0xa0c1b0c6, - 0xb064b0f1, - 0xb0737100, - 0xb0c1879c, - 0xa760a0c6, - 0x80b0b760, - 0x463d2200, - 0x16118601, - 0xd0809601, - 0x67389861, - 0x978f6174, - 0xb0f1a0e3, - 0xa0c6b0c1, - 0x80b0b110, - 0x46422200, - 0x12607100, - 0xb0f19780, - 0x8961b88f, - 0x18018570, - 0x8a609551, - 0xa4888a71, - 0xc022a487, - 0x1c211801, - 0x14124e5f, - 0x62604a5d, - 0x42601c01, - 0xb4874e5f, - 0xb4886260, - 0xb061b041, - 0xb04e7100, - 0x80b1b06e, - 0x46912201, - 0xb0f67276, - 0x31218471, - 0x1410c260, - 0xc7e09780, - 0xc6f09760, - 0xb0f69760, - 0xa0c1b0c6, - 0x8a63b7b0, - 0x71008a74, - 0x220180b1, - 0x8ab04691, - 0x468422c0, - 0x22018991, - 0x62914684, - 0xc00081c1, - 0x847091c0, - 0x6a8881a2, - 0xc30091c1, - 0xb2019070, - 0xa044a0e0, - 0x87907000, - 0xc360140c, - 0x1cdc180c, - 0x86014a9e, - 0x96011611, - 0x9861d090, - 0x61746738, - 0xa760b073, - 0xa7b0b760, - 0xa04eb072, - 0xb011b06e, - 0xb88c623d, - 0x89a48180, - 0x31843924, - 0x91840004, - 0x860385e4, - 0x9864e0a0, - 0x67389873, - 0x46ba1e04, - 0x16108720, - 0x62bd9720, - 0x16108730, - 0x85f29730, - 0x3d821023, - 0x3d833183, - 0x986ce0b0, - 0x6738987d, - 0x72767376, - 0x72067248, - 0x72047202, - 0x73067305, - 0x13006060, - 0xb32d91b0, - 0x6738c0c0, - 0x93b0c030, - 0x64f4b0f8, - 0x1a101200, - 0xc3809780, - 0xc2809760, - 0xa0c19760, - 0x8090b0c6, - 0x44422200, - 0x1e048154, - 0x978442e1, - 0x8552b0f6, - 0x9862d0d0, - 0x8a626738, - 0x87908a73, - 0x1c018781, - 0x18014aff, - 0x4afd1ef1, - 0x1af18781, - 0x71009781, - 0x16f1b0f6, - 0xa2059781, - 0xb0f67100, - 0x62a7a0c6, - 0x22508000, - 0xb0054707, - 0xb2406309, - 0x7000a005, - 0x39833183, - 0x00233182, - 0xa5e095f3, - 0x22548004, - 0xb5e0471a, - 0x102385f2, - 0x31833982, - 0x95f20032, - 0x82007000, - 0x39803180, - 0x4f221c23, - 0x63231021, - 0x31811031, - 0x92001410, - 0x8210a205, - 0x47272210, - 0x7000b205, - 0x8210a205, - 0x472d2210, - 0x31808200, - 0x78b13980, - 0x92001410, - 0x7000b205, - 0x88409850, - 0x47392200, - 0x7000b830 +MCE_PATCH_TYPE patchGenfskAntDivPqtMce[415] = +{ + 0x2fcf602d, + 0x00003f9d, + 0x470a031a, + 0x000f0387, + 0xff00ffcf, + 0x80000006, + 0x00070003, + 0x00003d1f, + 0x04000000, + 0x0000000f, + 0x000b0387, + 0x004340f4, + 0x80828000, + 0x00000670, + 0x0510091e, + 0x00050054, + 0x3e100200, + 0x00000061, + 0x0c30002f, + 0x0000017f, + 0xaaaa0000, + 0x0000aaaa, + 0x72200000, + 0xa32d7248, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x606c606a, + 0x62cf60e4, + 0x606a606a, + 0x606b606a, + 0x606c606a, + 0x62cf60e4, + 0x606a606a, + 0x606b606a, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x6042b070, + 0x60606060, + 0x6738c030, + 0xc282c0c1, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0x78306872, + 0x78409ab0, + 0x78509ac0, + 0x78609ad0, + 0xc4829ae0, + 0x1820c5a0, + 0x12034087, + 0x16126e23, + 0x60606884, + 0x94908160, + 0x39808140, + 0x10012a70, + 0x84321611, + 0xc0f38444, + 0xc200c0f5, + 0x40ac1c01, + 0x1c10c100, + 0x4ca440a2, + 0x18031013, + 0x1a131830, + 0x39121a10, + 0x60ac689f, + 0x60ac13f3, + 0x101513f3, + 0x1850c100, + 0x1a101a15, + 0x68aa3914, + 0x7100b0d8, + 0xa0d8b108, + 0x85e0b005, + 0x44b51e00, + 0xb24060b7, + 0xb200a005, + 0xb003b480, + 0xb002b013, + 0x7229b012, + 0x7100b0d0, + 0x8140b100, + 0x71009290, + 0x8140b100, + 0x44c322f0, + 0x1c0313f0, + 0x929340cf, + 0x71009492, + 0x9295b100, + 0x71009494, + 0xb0d0b100, + 0x7000a480, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7000a002, + 0x7310730f, + 0xd04085e1, + 0x67389861, + 0x91c0c100, + 0xb4836488, + 0xb0c3b0f3, + 0xa0c37100, + 0x606064d6, + 0xb016b006, + 0xb014b004, + 0xb012b002, + 0x78728400, + 0x81430420, + 0x2a733983, + 0xc1f29473, + 0x31621832, + 0x31511021, + 0x00200012, + 0x3142c022, + 0x94000020, + 0x16101030, + 0x31211001, + 0x22103930, + 0x12204114, + 0x10033150, + 0x00103180, + 0x93501630, + 0x12041202, + 0x41272273, + 0x97c08430, + 0x1a8287d2, + 0x97c08450, + 0x1a8487d4, + 0x22636129, + 0x84404134, + 0x87d097c0, + 0x14021a80, + 0x97c08460, + 0x1a8087d0, + 0x61401404, + 0x78918440, + 0x97c00410, + 0x1a4287d2, + 0x78918460, + 0x97c00410, + 0x1a4487d4, + 0x31543152, + 0x06333963, + 0x38321613, + 0x31823834, + 0x31843982, + 0x95720042, + 0x90307810, + 0x78209050, + 0x90609040, + 0x31808200, + 0x78b13980, + 0x92001410, + 0x8ae2b205, + 0x93028303, + 0x31808140, + 0x39403980, + 0xc0f38141, + 0xc0140431, + 0xc0021441, + 0x69661412, + 0x847d3122, + 0x8ac0161d, + 0x39803180, + 0x312d140d, + 0xc200142d, + 0x180d3120, + 0xa04eb072, + 0xb011b06e, + 0x7276b06c, + 0xa764b764, + 0x9762c662, + 0x7255c04f, + 0xb0f1b0f6, + 0xb113b110, + 0x720d720c, + 0xa0e0720e, + 0xb405b0e3, + 0x8ad3a404, + 0x39833183, + 0x31808410, + 0x31833980, + 0x94100030, + 0x31508400, + 0x8ad33950, + 0x06f33983, + 0x1834c1f4, + 0x31343184, + 0x94000040, + 0xa0e0b089, + 0xb0c1a0e3, + 0xb228b005, + 0x84017880, + 0xc0200401, + 0x00013140, + 0x72769401, + 0x9760c030, + 0x821a6702, + 0x1a1078a0, + 0xa7609780, + 0xb113b760, + 0x672cb0f1, + 0x8ac07100, + 0x97803980, + 0xb760a760, + 0x80b0b0f1, + 0x45cd2230, + 0x10a0b064, + 0x06103920, + 0x45cb1e00, + 0x7100b069, + 0x8ad061a6, + 0x41dc22e0, + 0x392010a0, + 0x1e000610, + 0x10a345dc, + 0x3d833143, + 0x16118611, + 0x61cb9611, + 0x314310a3, + 0xd0503d83, + 0x67389863, + 0x8ac0b064, + 0x78a13980, + 0x97801410, + 0xb760a760, + 0xb0f1b113, + 0x7100672c, + 0x223080b0, + 0x61fd45f2, + 0x31428212, + 0xd0603d82, + 0x67389862, + 0x1c23671b, + 0x67024a16, + 0x67026211, + 0x31428212, + 0xd0703d82, + 0x67389862, + 0x78a0671b, + 0x97801a10, + 0xb760a760, + 0x7100b0f1, + 0xc012b069, + 0x31823172, + 0x10203d82, + 0x10031032, + 0x6217670a, + 0x7276670a, + 0x9760c660, + 0x7880978d, + 0x04018401, + 0xc0509401, + 0xa76393b0, + 0xb0e0b763, + 0xb110a0e3, + 0xb0f6b113, + 0xa0c1b0c6, + 0xb064b0f1, + 0xb0737100, + 0xb0c1879c, + 0xa760a0c6, + 0x80b0b760, + 0x463d2200, + 0x16118601, + 0xd0809601, + 0x67389861, + 0x978f6174, + 0xb0f1a0e3, + 0xa0c6b0c1, + 0x80b0b110, + 0x46422200, + 0x12607100, + 0xb0f19780, + 0x8961b88f, + 0x18018570, + 0x8a609551, + 0xa4888a71, + 0xc022a487, + 0x1c211801, + 0x14124e5f, + 0x62604a5d, + 0x42601c01, + 0xb4874e5f, + 0xb4886260, + 0xb061b041, + 0xb04e7100, + 0x80b1b06e, + 0x46912201, + 0xb0f67276, + 0x31218471, + 0x1410c260, + 0xc7e09780, + 0xc6f09760, + 0xb0f69760, + 0xa0c1b0c6, + 0x8a63b7b0, + 0x71008a74, + 0x220180b1, + 0x8ab04691, + 0x468422c0, + 0x22018991, + 0x62914684, + 0xc00081c1, + 0x847091c0, + 0x6a8881a2, + 0xc30091c1, + 0xb2019070, + 0xa044a0e0, + 0x87907000, + 0xc360140c, + 0x1cdc180c, + 0x86014a9e, + 0x96011611, + 0x9861d090, + 0x61746738, + 0xa760b073, + 0xa7b0b760, + 0xa04eb072, + 0xb011b06e, + 0xb88c623d, + 0x89a48180, + 0x31843924, + 0x91840004, + 0x860385e4, + 0x9864e0a0, + 0x67389873, + 0x46ba1e04, + 0x16108720, + 0x62bd9720, + 0x16108730, + 0x85f29730, + 0x3d821023, + 0x3d833183, + 0x986ce0b0, + 0x6738987d, + 0x72767376, + 0x72067248, + 0x72047202, + 0x73067305, + 0x13006060, + 0xb32d91b0, + 0x6738c0c0, + 0x93b0c030, + 0x64f4b0f8, + 0x1a101200, + 0xc3809780, + 0xc2809760, + 0xa0c19760, + 0x8090b0c6, + 0x44422200, + 0x1e048154, + 0x978442e1, + 0x8552b0f6, + 0x9862d0d0, + 0x8a626738, + 0x87908a73, + 0x1c018781, + 0x18014aff, + 0x4afd1ef1, + 0x1af18781, + 0x71009781, + 0x16f1b0f6, + 0xa2059781, + 0xb0f67100, + 0x62a7a0c6, + 0x22508000, + 0xb0054707, + 0xb2406309, + 0x7000a005, + 0x39833183, + 0x00233182, + 0xa5e095f3, + 0x22548004, + 0xb5e0471a, + 0x102385f2, + 0x31833982, + 0x95f20032, + 0x82007000, + 0x39803180, + 0x4f221c23, + 0x63231021, + 0x31811031, + 0x92001410, + 0x8210a205, + 0x47272210, + 0x7000b205, + 0x8210a205, + 0x472d2210, + 0x31808200, + 0x78b13980, + 0x92001410, + 0x7000b205, + 0x88409850, + 0x47392200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_genfsk_ant_div_pqt(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 415; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskAntDivPqtMce[i]; - } + uint32_t i; + + for (i = 0; i < 415; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskAntDivPqtMce[i]; + } + #else - const uint32_t *pS = patchGenfskAntDivPqtMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 51; + const uint32_t* pS = patchGenfskAntDivPqtMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 51; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_fec_cc1101.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_fec_cc1101.h index 6b5ebbbd..d7a8fb02 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_fec_cc1101.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genfsk_fec_cc1101.h @@ -43,541 +43,546 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchGenfskFecMce[471] = { - 0x2fcf6054, - 0x030c0f9d, - 0x070c680a, - 0xff00003f, - 0x07c0d0d0, - 0x130007e0, - 0x50433221, - 0x10037162, - 0x53403122, - 0x00017261, - 0x01000010, - 0x00021000, - 0x02000020, - 0x00042000, - 0x04000040, - 0x00084000, - 0x08000080, - 0x00018000, - 0x00200018, - 0x00200003, - 0x00290011, - 0x0029000a, - 0x00320003, - 0x00320018, - 0x003b000a, - 0x003b0011, - 0x00070003, - 0x00003d1f, - 0x04000000, - 0x0000000f, - 0x000b0387, - 0x004340f4, - 0x80828000, - 0x00000670, - 0x0510091e, - 0x00050054, - 0x3e100200, - 0x00000061, - 0x3030002f, - 0x0000027f, - 0x00000000, - 0x0000aa00, - 0x72487220, - 0x7303a32d, - 0x72037305, - 0x73067304, - 0x73767204, - 0xc7c07276, - 0x00018001, - 0x90109001, - 0x90010801, - 0x720d720c, - 0xb0c0720e, - 0xb0f07100, - 0x7218a0c0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60896c01, - 0x60f0608c, - 0x6089631d, - 0x60896089, - 0x1210608a, - 0x730f7220, - 0x73117310, - 0x00108181, - 0xb0709180, - 0x607f6069, - 0x607f6400, - 0x67a8c030, - 0xc282c341, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0x78306892, - 0x78409ab0, - 0x78509ac0, - 0x83009ad0, - 0xc4829ae0, - 0x1820c5a0, - 0x120340a7, - 0x16126e23, - 0x607f68a4, - 0x94908160, - 0x39808140, - 0x10012a70, - 0x84321611, - 0xc0f38444, - 0xc200c0f5, - 0x40cc1c01, - 0x1c10c100, - 0x4cc440c2, - 0x18031013, - 0x1a131830, - 0x39121a10, - 0x60cc68bf, - 0x60cc13f3, - 0x101513f3, - 0x1850c100, - 0x1a101a15, - 0x68ca3914, - 0x7100b0d8, - 0xa0d8b108, - 0xb480b200, - 0xb013b003, - 0xb012b002, - 0xb0d07229, - 0xb1007100, - 0x92908140, - 0xb1007100, - 0x22f08140, - 0x13f044dc, - 0x40e81c03, - 0x94929293, - 0xb1007100, - 0x94949295, - 0x71006536, - 0xb0d0b100, - 0x7000a480, - 0x7310730f, - 0x67a8c040, - 0x91c0c000, - 0xc0b7c136, - 0xc009c008, - 0xc00bc00a, - 0xc00dc00c, - 0xc10e788f, - 0x9760c030, - 0x9780c000, - 0xb48464a8, - 0x10acc009, - 0x10f010bd, - 0x1e003980, - 0x81e0411c, - 0x41122210, - 0x611581a0, - 0x061010f0, - 0x6523391f, - 0x654c653c, - 0x1ce91619, - 0x6106450d, - 0x654c653c, - 0x1ce91619, - 0x6556451c, - 0x1081607f, - 0x6f121471, - 0x41292200, - 0x10233982, - 0x311a0613, - 0x1023003a, - 0x06133913, - 0x003b311b, - 0x39481028, - 0x700006f8, - 0x652381a0, - 0x1ce91619, - 0x70004536, - 0x14921062, - 0x10c16f23, - 0x41440431, - 0x61451210, - 0x10d113f0, - 0x414a0431, - 0x614b1211, - 0x700013f1, - 0xb10192c1, - 0x7100b0d1, - 0x92c0b101, - 0xb1017100, - 0x7000a0d1, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7000a002, - 0xb016b006, - 0xb014b004, - 0xb012b002, - 0x78628400, - 0x81430420, - 0x2a733983, - 0xc1f29473, - 0x31621832, - 0x31511021, - 0x00200012, - 0x10309400, - 0x39301610, - 0x417f2210, - 0x31501220, - 0x31801003, - 0x93501670, - 0x12041202, - 0x41912273, - 0x97c08430, - 0x1a8287d2, - 0x97c08450, - 0x1a8487d4, - 0x22636193, - 0x8440419e, - 0x87d097c0, - 0x14021a80, - 0x97c08460, - 0x1a8087d0, - 0x61aa1404, - 0x78718440, - 0x97c00410, - 0x1a4287d2, - 0x78718460, - 0x97c00410, - 0x1a4487d4, - 0x31543152, - 0x06333963, - 0x38321613, - 0x31823834, - 0x31843982, - 0x95720042, - 0x90307810, - 0x78209050, - 0x90609040, - 0x8ae2b205, - 0x93028303, - 0xc00bc00c, - 0x31808140, - 0x39403980, - 0xc0f38141, - 0xc0140431, - 0xc0021441, - 0x69cc1412, - 0x847d3122, - 0x140dc010, - 0x142d312d, - 0x318e8ace, - 0x397e311e, - 0x31498ac9, - 0x39493979, - 0x109a3129, - 0x720d720c, - 0xb101720e, - 0x7100b0d1, - 0xa0d1b072, - 0xb06ea04e, - 0xb06cb011, - 0x7276978a, - 0xa764b764, - 0x9762c662, - 0xc088c04f, - 0x8ab166b0, - 0x45fa22f1, - 0x22f18ad1, - 0x626445fa, - 0xb0737100, - 0x80b7b760, - 0x46312207, - 0x8ab1a760, - 0x420b22f1, - 0x420b2237, - 0x80b0b113, - 0x46062230, - 0x22e16219, - 0x8090421e, - 0x421e2250, - 0x8210b0f5, - 0x41fa2220, - 0xb7649789, - 0xb0f6a764, - 0x978d61fa, - 0xa764b764, - 0x61fab0f6, - 0x22f08ad0, - 0x2237422a, - 0xb075422a, - 0x80b0b113, - 0x46242230, - 0x61fab087, - 0x42f322d1, - 0x22208090, - 0x66ae42f3, - 0x978f61fa, - 0xa0e3a0e0, - 0xa0c5a0c2, - 0xb0c1b0f1, - 0x7100a0c6, - 0xb0f19788, - 0x8961b88f, - 0x18018570, - 0x8a609551, - 0xa4888a71, - 0xc062a487, - 0x1c211801, - 0x14124e51, - 0x62524a4f, - 0x42521c01, - 0xb4874e51, - 0xb4886252, - 0xb041b061, - 0x22e08ad0, - 0x8210425a, - 0x45de2220, - 0xb04d7100, - 0xb04fb06d, - 0xb074b06f, - 0x8a73b201, - 0x70008552, - 0xb0737100, - 0x80b7b760, - 0x46832207, - 0x46992237, - 0x8ab1a760, - 0x427c22e1, - 0x22508090, - 0xb0f5427c, - 0x22208210, - 0x978d4264, - 0xa764b764, - 0x6264b0f6, - 0x42f322d1, - 0x22208090, - 0x66ae42f3, - 0x978f6264, - 0xa0e3a0e0, - 0xa0c5a0c2, - 0xb0c1b0f1, - 0x7100a0c6, - 0xb0f19788, - 0x8961b88f, - 0x31808570, - 0x18013d80, - 0x8a609551, - 0xa1828a71, - 0x978f6243, - 0xa0e3a0e0, - 0xa0c5a0c2, - 0xb0c1b0f1, - 0x7100a0c6, - 0xb0f19788, - 0x8961b88f, - 0x3d808570, - 0x95511801, - 0x8a918a80, - 0x6243b182, - 0x7000b0f2, - 0xb0f1b0f6, - 0xb113b110, - 0xb0f2b0f5, - 0x720d720c, - 0xb0e0720e, - 0x8ab2b0e3, - 0x42c122f2, - 0xb763b0c6, - 0x8ad062c4, - 0x42e422f0, - 0xa404b405, - 0xa429b428, - 0x3180caa0, - 0x0001caa1, - 0x94619451, - 0x31838ad3, - 0x84103983, - 0x39803180, - 0x00303183, - 0x84009410, - 0x39503150, - 0x39838ad3, - 0xc1f406f3, - 0x31841834, - 0x00403134, - 0xb0899400, - 0x42ee22e2, - 0x394a8aca, - 0x312a398a, - 0xb0c5978a, - 0xb763b0c6, - 0x22d28ab2, - 0xb0c242f2, - 0xb20f7000, - 0xa0e3a0e0, - 0xb764978e, - 0xb0f6a764, - 0xb113b110, - 0x22f08210, - 0xb0f542fc, - 0xa0048002, - 0xa001a006, - 0x72047203, - 0x67a8c050, - 0xb7647100, - 0xb0c5b0f6, - 0x7100a20f, - 0xa0c5b0f5, - 0x90307810, - 0x78209002, - 0x90609040, - 0xa20fb072, - 0x978a66b0, - 0xb0f6a764, - 0x120061f3, - 0xc06091b0, - 0x7a3067a8, - 0xc10095a0, - 0xc622c241, - 0x6e236f13, - 0x16121611, - 0xb0f86b26, - 0xa0c16564, - 0xb0d7b107, - 0x9760c070, - 0x9780c070, - 0x7100b107, - 0x7100b107, - 0xb107a0d7, - 0xc1071206, - 0xc00d78a8, - 0x31131063, - 0x677e1483, - 0x1c671616, - 0xc02f473e, - 0x78a97898, - 0xb04f120e, - 0x1206b06f, - 0x67a01060, - 0x31131013, - 0x67891493, - 0x31131063, - 0x677e1483, - 0x1c671616, - 0x0a1e474c, - 0x435f1e1e, - 0x78a97898, - 0x78a86361, - 0x162f7899, - 0x1e008150, - 0x3930434b, - 0x1cf01620, - 0x4f4b436a, - 0x10601206, - 0x101367a0, - 0x14933113, - 0x16166789, - 0x476b1c67, - 0x72036798, - 0x73057204, - 0xa0047306, - 0xc7c0a002, - 0x607f9010, - 0xb0c1b0f1, - 0xb0f17100, - 0x87f1a0c1, - 0x6e318802, - 0x6e321613, - 0x6d317000, - 0x95e16d31, - 0x6d311613, - 0x95f16d31, - 0x1efdb5b0, - 0x85d04b96, - 0x91900610, - 0x7000161d, - 0xb5b0c0f0, - 0x85d10a11, - 0x91910611, - 0x70006b99, - 0x06311001, - 0x39203121, - 0x12f10010, - 0x70001801, - 0x88409850, - 0x47a92200, - 0x7000b830 +MCE_PATCH_TYPE patchGenfskFecMce[471] = +{ + 0x2fcf6054, + 0x030c0f9d, + 0x070c680a, + 0xff00003f, + 0x07c0d0d0, + 0x130007e0, + 0x50433221, + 0x10037162, + 0x53403122, + 0x00017261, + 0x01000010, + 0x00021000, + 0x02000020, + 0x00042000, + 0x04000040, + 0x00084000, + 0x08000080, + 0x00018000, + 0x00200018, + 0x00200003, + 0x00290011, + 0x0029000a, + 0x00320003, + 0x00320018, + 0x003b000a, + 0x003b0011, + 0x00070003, + 0x00003d1f, + 0x04000000, + 0x0000000f, + 0x000b0387, + 0x004340f4, + 0x80828000, + 0x00000670, + 0x0510091e, + 0x00050054, + 0x3e100200, + 0x00000061, + 0x3030002f, + 0x0000027f, + 0x00000000, + 0x0000aa00, + 0x72487220, + 0x7303a32d, + 0x72037305, + 0x73067304, + 0x73767204, + 0xc7c07276, + 0x00018001, + 0x90109001, + 0x90010801, + 0x720d720c, + 0xb0c0720e, + 0xb0f07100, + 0x7218a0c0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60896c01, + 0x60f0608c, + 0x6089631d, + 0x60896089, + 0x1210608a, + 0x730f7220, + 0x73117310, + 0x00108181, + 0xb0709180, + 0x607f6069, + 0x607f6400, + 0x67a8c030, + 0xc282c341, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0x78306892, + 0x78409ab0, + 0x78509ac0, + 0x83009ad0, + 0xc4829ae0, + 0x1820c5a0, + 0x120340a7, + 0x16126e23, + 0x607f68a4, + 0x94908160, + 0x39808140, + 0x10012a70, + 0x84321611, + 0xc0f38444, + 0xc200c0f5, + 0x40cc1c01, + 0x1c10c100, + 0x4cc440c2, + 0x18031013, + 0x1a131830, + 0x39121a10, + 0x60cc68bf, + 0x60cc13f3, + 0x101513f3, + 0x1850c100, + 0x1a101a15, + 0x68ca3914, + 0x7100b0d8, + 0xa0d8b108, + 0xb480b200, + 0xb013b003, + 0xb012b002, + 0xb0d07229, + 0xb1007100, + 0x92908140, + 0xb1007100, + 0x22f08140, + 0x13f044dc, + 0x40e81c03, + 0x94929293, + 0xb1007100, + 0x94949295, + 0x71006536, + 0xb0d0b100, + 0x7000a480, + 0x7310730f, + 0x67a8c040, + 0x91c0c000, + 0xc0b7c136, + 0xc009c008, + 0xc00bc00a, + 0xc00dc00c, + 0xc10e788f, + 0x9760c030, + 0x9780c000, + 0xb48464a8, + 0x10acc009, + 0x10f010bd, + 0x1e003980, + 0x81e0411c, + 0x41122210, + 0x611581a0, + 0x061010f0, + 0x6523391f, + 0x654c653c, + 0x1ce91619, + 0x6106450d, + 0x654c653c, + 0x1ce91619, + 0x6556451c, + 0x1081607f, + 0x6f121471, + 0x41292200, + 0x10233982, + 0x311a0613, + 0x1023003a, + 0x06133913, + 0x003b311b, + 0x39481028, + 0x700006f8, + 0x652381a0, + 0x1ce91619, + 0x70004536, + 0x14921062, + 0x10c16f23, + 0x41440431, + 0x61451210, + 0x10d113f0, + 0x414a0431, + 0x614b1211, + 0x700013f1, + 0xb10192c1, + 0x7100b0d1, + 0x92c0b101, + 0xb1017100, + 0x7000a0d1, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7000a002, + 0xb016b006, + 0xb014b004, + 0xb012b002, + 0x78628400, + 0x81430420, + 0x2a733983, + 0xc1f29473, + 0x31621832, + 0x31511021, + 0x00200012, + 0x10309400, + 0x39301610, + 0x417f2210, + 0x31501220, + 0x31801003, + 0x93501670, + 0x12041202, + 0x41912273, + 0x97c08430, + 0x1a8287d2, + 0x97c08450, + 0x1a8487d4, + 0x22636193, + 0x8440419e, + 0x87d097c0, + 0x14021a80, + 0x97c08460, + 0x1a8087d0, + 0x61aa1404, + 0x78718440, + 0x97c00410, + 0x1a4287d2, + 0x78718460, + 0x97c00410, + 0x1a4487d4, + 0x31543152, + 0x06333963, + 0x38321613, + 0x31823834, + 0x31843982, + 0x95720042, + 0x90307810, + 0x78209050, + 0x90609040, + 0x8ae2b205, + 0x93028303, + 0xc00bc00c, + 0x31808140, + 0x39403980, + 0xc0f38141, + 0xc0140431, + 0xc0021441, + 0x69cc1412, + 0x847d3122, + 0x140dc010, + 0x142d312d, + 0x318e8ace, + 0x397e311e, + 0x31498ac9, + 0x39493979, + 0x109a3129, + 0x720d720c, + 0xb101720e, + 0x7100b0d1, + 0xa0d1b072, + 0xb06ea04e, + 0xb06cb011, + 0x7276978a, + 0xa764b764, + 0x9762c662, + 0xc088c04f, + 0x8ab166b0, + 0x45fa22f1, + 0x22f18ad1, + 0x626445fa, + 0xb0737100, + 0x80b7b760, + 0x46312207, + 0x8ab1a760, + 0x420b22f1, + 0x420b2237, + 0x80b0b113, + 0x46062230, + 0x22e16219, + 0x8090421e, + 0x421e2250, + 0x8210b0f5, + 0x41fa2220, + 0xb7649789, + 0xb0f6a764, + 0x978d61fa, + 0xa764b764, + 0x61fab0f6, + 0x22f08ad0, + 0x2237422a, + 0xb075422a, + 0x80b0b113, + 0x46242230, + 0x61fab087, + 0x42f322d1, + 0x22208090, + 0x66ae42f3, + 0x978f61fa, + 0xa0e3a0e0, + 0xa0c5a0c2, + 0xb0c1b0f1, + 0x7100a0c6, + 0xb0f19788, + 0x8961b88f, + 0x18018570, + 0x8a609551, + 0xa4888a71, + 0xc062a487, + 0x1c211801, + 0x14124e51, + 0x62524a4f, + 0x42521c01, + 0xb4874e51, + 0xb4886252, + 0xb041b061, + 0x22e08ad0, + 0x8210425a, + 0x45de2220, + 0xb04d7100, + 0xb04fb06d, + 0xb074b06f, + 0x8a73b201, + 0x70008552, + 0xb0737100, + 0x80b7b760, + 0x46832207, + 0x46992237, + 0x8ab1a760, + 0x427c22e1, + 0x22508090, + 0xb0f5427c, + 0x22208210, + 0x978d4264, + 0xa764b764, + 0x6264b0f6, + 0x42f322d1, + 0x22208090, + 0x66ae42f3, + 0x978f6264, + 0xa0e3a0e0, + 0xa0c5a0c2, + 0xb0c1b0f1, + 0x7100a0c6, + 0xb0f19788, + 0x8961b88f, + 0x31808570, + 0x18013d80, + 0x8a609551, + 0xa1828a71, + 0x978f6243, + 0xa0e3a0e0, + 0xa0c5a0c2, + 0xb0c1b0f1, + 0x7100a0c6, + 0xb0f19788, + 0x8961b88f, + 0x3d808570, + 0x95511801, + 0x8a918a80, + 0x6243b182, + 0x7000b0f2, + 0xb0f1b0f6, + 0xb113b110, + 0xb0f2b0f5, + 0x720d720c, + 0xb0e0720e, + 0x8ab2b0e3, + 0x42c122f2, + 0xb763b0c6, + 0x8ad062c4, + 0x42e422f0, + 0xa404b405, + 0xa429b428, + 0x3180caa0, + 0x0001caa1, + 0x94619451, + 0x31838ad3, + 0x84103983, + 0x39803180, + 0x00303183, + 0x84009410, + 0x39503150, + 0x39838ad3, + 0xc1f406f3, + 0x31841834, + 0x00403134, + 0xb0899400, + 0x42ee22e2, + 0x394a8aca, + 0x312a398a, + 0xb0c5978a, + 0xb763b0c6, + 0x22d28ab2, + 0xb0c242f2, + 0xb20f7000, + 0xa0e3a0e0, + 0xb764978e, + 0xb0f6a764, + 0xb113b110, + 0x22f08210, + 0xb0f542fc, + 0xa0048002, + 0xa001a006, + 0x72047203, + 0x67a8c050, + 0xb7647100, + 0xb0c5b0f6, + 0x7100a20f, + 0xa0c5b0f5, + 0x90307810, + 0x78209002, + 0x90609040, + 0xa20fb072, + 0x978a66b0, + 0xb0f6a764, + 0x120061f3, + 0xc06091b0, + 0x7a3067a8, + 0xc10095a0, + 0xc622c241, + 0x6e236f13, + 0x16121611, + 0xb0f86b26, + 0xa0c16564, + 0xb0d7b107, + 0x9760c070, + 0x9780c070, + 0x7100b107, + 0x7100b107, + 0xb107a0d7, + 0xc1071206, + 0xc00d78a8, + 0x31131063, + 0x677e1483, + 0x1c671616, + 0xc02f473e, + 0x78a97898, + 0xb04f120e, + 0x1206b06f, + 0x67a01060, + 0x31131013, + 0x67891493, + 0x31131063, + 0x677e1483, + 0x1c671616, + 0x0a1e474c, + 0x435f1e1e, + 0x78a97898, + 0x78a86361, + 0x162f7899, + 0x1e008150, + 0x3930434b, + 0x1cf01620, + 0x4f4b436a, + 0x10601206, + 0x101367a0, + 0x14933113, + 0x16166789, + 0x476b1c67, + 0x72036798, + 0x73057204, + 0xa0047306, + 0xc7c0a002, + 0x607f9010, + 0xb0c1b0f1, + 0xb0f17100, + 0x87f1a0c1, + 0x6e318802, + 0x6e321613, + 0x6d317000, + 0x95e16d31, + 0x6d311613, + 0x95f16d31, + 0x1efdb5b0, + 0x85d04b96, + 0x91900610, + 0x7000161d, + 0xb5b0c0f0, + 0x85d10a11, + 0x91910611, + 0x70006b99, + 0x06311001, + 0x39203121, + 0x12f10010, + 0x70001801, + 0x88409850, + 0x47a92200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_genfsk_fec_cc1101(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 471; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskFecMce[i]; - } + uint32_t i; + + for (i = 0; i < 471; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskFecMce[i]; + } + #else - const uint32_t *pS = patchGenfskFecMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 58; + const uint32_t* pS = patchGenfskFecMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 58; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genook.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genook.h index 58853c00..2921b2a4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genook.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_genook.h @@ -43,533 +43,538 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchGenookMce[463] = { - 0x00006030, - 0x01952fcf, - 0x7fff0001, - 0x030c003f, - 0x070c680a, - 0x00010000, - 0xaaaa000f, - 0x00fc00aa, - 0x00170003, - 0x0000001f, - 0x04000000, - 0x0000000f, - 0x00020387, - 0x00434074, - 0x20028000, - 0x000006f0, - 0x0500091e, - 0x00000054, - 0x50140000, - 0x00000050, - 0x7f30000f, - 0x0000007f, - 0x00000000, - 0x00000000, - 0x72487220, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x9862d030, - 0x10206798, - 0x1e000670, - 0x1e104074, - 0x1e204075, - 0x3982405f, - 0x163206f2, - 0x14211101, - 0x61826c01, - 0x63186182, - 0x3982632e, - 0x16323942, - 0x14211101, - 0x60e36c01, - 0x610d60e3, - 0x606b1220, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x6044b070, - 0xc101606a, - 0xc470c282, - 0x6f131820, - 0x16116e23, - 0x68791612, - 0x9ab07870, - 0x9ac07880, - 0x9ad07890, - 0x981078b0, - 0xc5a0c482, - 0x408e1820, - 0x6e231203, - 0x688b1612, - 0x9ae078a0, - 0x8160606a, - 0x81409490, - 0x2a703980, - 0x16111001, - 0x84448432, - 0xc0f5c0f3, - 0x1c01c200, - 0xc10040b5, - 0x40ab1c10, - 0x10134cad, - 0x18301803, - 0x1a101a13, - 0x68a83912, - 0x13f360b5, - 0x13f360b5, - 0xc1001015, - 0x1a151850, - 0x39141a10, - 0xb0d868b3, - 0xb1087100, - 0xb200a0d8, - 0xb012b002, - 0x22168216, - 0x814640bc, - 0x06f63d46, - 0x81408165, - 0x105106f0, - 0x65570611, - 0x68c53d15, - 0x22f08140, - 0x1a1644bf, - 0x8ae14cc2, - 0x9861d040, - 0x13f06798, - 0x40dc1c03, - 0x1021c0f0, - 0x65570611, - 0x68d73d12, - 0x1041c0f0, - 0x65570611, - 0x68dd3d14, - 0x72207000, - 0x7310730f, - 0x91c0c000, - 0xb0c1b0f1, - 0x9760c050, - 0x9780c010, - 0x6491c008, - 0x39838ad3, - 0x06133953, - 0x221081e0, - 0x81a14104, - 0x10170831, - 0x81306557, - 0x39403980, - 0x45031e10, - 0x0a111071, - 0x60f46557, - 0x65571201, - 0xa0c1b204, - 0xa0c3b0f1, - 0x6798c050, - 0x7220606a, - 0x7310730f, - 0x91c0c000, - 0xb0c1b0f1, - 0x9760c050, - 0x9780c010, - 0x8216b200, - 0x41192216, - 0xb012b002, - 0xc030c008, - 0x10a178ca, - 0x65570611, - 0x6921391a, - 0x78dac0f0, - 0x061110a1, - 0x391a6557, - 0xc0706928, - 0x10a178ea, - 0x65570611, - 0x692f391a, - 0x78fac090, - 0x061110a1, - 0x391a6557, - 0x8ad36936, - 0x39533983, - 0x81e00613, - 0x414c2210, - 0x0831c011, - 0x81a16557, - 0x65576793, - 0x0831c001, - 0x613f6557, - 0x6557c011, - 0x6557c001, - 0xa0c1b204, - 0xa0c3b0f1, - 0x6798c060, - 0xc029606a, - 0x455d2208, - 0x41732201, - 0x2201616c, - 0x8aef4573, - 0x416c22ff, - 0x31116578, - 0x39119201, - 0x80fe1018, - 0x456bc019, - 0x6173c029, - 0x7100b0f1, - 0x92013111, - 0x10183911, - 0xb0f1c019, - 0x1a197100, - 0x70004573, - 0x785f10f9, - 0x100004f9, - 0x10001000, - 0x1a191000, - 0x7000457b, - 0xc0706750, - 0x847d6798, - 0x140dc010, - 0x142d312d, - 0x318e8ace, - 0x397e311e, - 0x31498ac9, - 0x39493979, - 0x10903129, - 0x72769780, - 0xa764b764, - 0x9762c662, - 0xb012b002, - 0x986be080, - 0x6798987f, - 0x6699b485, - 0x8ab1a182, - 0x45aa22f1, - 0x22f18ad1, - 0x61df45aa, - 0x80b77100, - 0x45fd2207, - 0x22b08090, - 0x105441b6, - 0x662d858c, - 0x61aa668e, - 0x22f18ab1, - 0x223741c0, - 0xb11341c0, - 0x223080b0, - 0x61ce45bb, - 0x41d322e1, - 0x22508090, - 0xb0f541d3, - 0x22108210, - 0x978941aa, - 0xa764b764, - 0x61aab0f6, - 0xb764978d, - 0xb0f6a764, - 0x8ad061aa, - 0x42da22f0, - 0x42da2237, - 0xb113b075, - 0x223080b0, - 0xb08745d9, - 0x710061aa, - 0x220780b7, - 0x223745fd, - 0x809045fc, - 0x41ee22b0, - 0x858c1054, - 0x668e662d, - 0x8ab161df, - 0x41df22e1, - 0x22508090, - 0xb0f541df, - 0x22108210, - 0x978d41df, - 0xa764b764, - 0x61dfb0f6, - 0xb110b182, - 0xb113a0e0, - 0xb074a0e3, - 0xa044b201, - 0x986ad090, - 0x10806798, - 0x1c0a1610, - 0x1cfa4a0e, - 0x66704e0e, - 0xc00ec00f, - 0x80907100, - 0x44442200, - 0x1054858c, - 0x668e662d, - 0x39808130, - 0x1e1006f0, - 0x667a461f, - 0x66646220, - 0x1e008150, - 0x1a104210, - 0x4e101cf0, - 0x62106228, - 0xb0f6a0c6, - 0xb0fba0cb, - 0xb8846306, - 0x881188c2, - 0x1e010631, - 0x1e21424a, - 0x1e31423c, - 0x10564243, - 0x39161426, - 0x624b1065, - 0x31261056, - 0x14261856, - 0x10653926, - 0x1056624b, - 0x18563136, - 0x39361426, - 0x624b1065, - 0x82121026, - 0x1c263922, - 0x18624e59, - 0x1c12c101, - 0x12014e57, - 0x31211821, - 0xcc016261, - 0x18266261, - 0x1c16c101, - 0x10614e60, - 0x62613121, - 0x9581c401, - 0x7000b0fb, - 0x466f1c8a, - 0x39208210, - 0x4e6c1c04, - 0x626dc001, - 0x9191c011, - 0x7000161f, - 0x39208210, - 0x4e761c04, - 0x6277c001, - 0x9191c011, - 0x7000c01f, - 0x468d1c8a, - 0x31808580, - 0x10013d80, - 0x10171870, - 0x468c1e1e, - 0x39703980, - 0x39818ad1, - 0x08103951, - 0x161f9190, - 0x70000a1e, - 0x10c08581, - 0x22700810, - 0x120a4295, - 0x1cba6298, - 0x161a4293, - 0xb0fb7000, - 0xb0f1b0f6, - 0xb113b110, - 0xb0f2b0f5, - 0x720d720c, - 0xb0cb720e, - 0xb0e3b0e0, - 0x22f28ab2, - 0xb0c642ac, - 0x62afb763, - 0x22f08ad0, - 0xb40542cf, - 0xa428a404, - 0xcaa0a429, - 0xcaa13180, - 0x94510001, - 0x8ad39461, - 0x39833183, - 0x31808410, - 0x31833980, - 0x94100030, - 0x31508400, - 0x8ad33950, - 0x06f33983, - 0x1834c1f4, - 0x31343184, - 0x94000040, - 0x22e2b089, - 0x8aca42d9, - 0x398a394a, - 0x978a312a, - 0xb0c6b0c5, - 0x7000b763, - 0xa0e0b20f, - 0xa0cba0e3, - 0xb764978e, - 0xb0f6a764, - 0xb113b110, - 0x8210b0fb, - 0x42e52200, - 0x8002b0f5, - 0xa006a004, - 0x7203a001, - 0xc0a07204, - 0x71006798, - 0xb0f6b764, - 0xa20fb0c5, - 0xb0f57100, - 0x7820a0c5, - 0x90029030, - 0x90407830, - 0xb0729060, - 0x6699a20f, - 0xa764978a, - 0x61a3b0f6, - 0x8180b88c, - 0x392489a4, - 0x00043184, - 0xc0b09184, - 0x73766798, - 0x72487276, - 0x72027206, - 0x73057204, - 0x606a7306, - 0xc0c06750, - 0xb0f86798, - 0xb0fbb0cb, - 0xb228b005, - 0xb0fb7100, - 0x22e08ad0, - 0x82104328, - 0x43202210, - 0x8580662d, - 0x0a103970, - 0x63206789, - 0xc0d06750, - 0xb0cb6798, - 0x120cb074, - 0x398e881e, - 0x433e1e0e, - 0x30e01210, - 0x71001a20, - 0x6b3b662d, - 0x8ad07100, - 0x434522e0, - 0x22108210, - 0x662d4336, - 0x0a113971, - 0x81549191, - 0x43361e04, - 0x1cc4161c, - 0x63364306, - 0x91b01200, - 0xb006b0f8, - 0xb004b016, - 0xb002b014, - 0x8400b012, - 0x04207862, - 0x39838143, - 0x94732a73, - 0x1832c1f2, - 0x10213162, - 0x00123151, - 0x94000020, - 0x90307820, - 0x78309050, - 0x90609040, - 0x8330c04b, - 0x06303930, - 0x43751e00, - 0x10b8300b, - 0x39181a1b, - 0x108fc00a, - 0xa203a204, - 0x22408330, - 0x165f4382, - 0x6386b204, - 0x43862230, - 0xb203163f, - 0xb072b205, - 0x22007000, - 0xb005478d, - 0x80006392, - 0x43922250, - 0xa005b240, - 0x82a27000, - 0x06123972, - 0x70000821, - 0x88409850, - 0x47992200, - 0x7000b830 +MCE_PATCH_TYPE patchGenookMce[463] = +{ + 0x00006030, + 0x01952fcf, + 0x7fff0001, + 0x030c003f, + 0x070c680a, + 0x00010000, + 0xaaaa000f, + 0x00fc00aa, + 0x00170003, + 0x0000001f, + 0x04000000, + 0x0000000f, + 0x00020387, + 0x00434074, + 0x20028000, + 0x000006f0, + 0x0500091e, + 0x00000054, + 0x50140000, + 0x00000050, + 0x7f30000f, + 0x0000007f, + 0x00000000, + 0x00000000, + 0x72487220, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x9862d030, + 0x10206798, + 0x1e000670, + 0x1e104074, + 0x1e204075, + 0x3982405f, + 0x163206f2, + 0x14211101, + 0x61826c01, + 0x63186182, + 0x3982632e, + 0x16323942, + 0x14211101, + 0x60e36c01, + 0x610d60e3, + 0x606b1220, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x6044b070, + 0xc101606a, + 0xc470c282, + 0x6f131820, + 0x16116e23, + 0x68791612, + 0x9ab07870, + 0x9ac07880, + 0x9ad07890, + 0x981078b0, + 0xc5a0c482, + 0x408e1820, + 0x6e231203, + 0x688b1612, + 0x9ae078a0, + 0x8160606a, + 0x81409490, + 0x2a703980, + 0x16111001, + 0x84448432, + 0xc0f5c0f3, + 0x1c01c200, + 0xc10040b5, + 0x40ab1c10, + 0x10134cad, + 0x18301803, + 0x1a101a13, + 0x68a83912, + 0x13f360b5, + 0x13f360b5, + 0xc1001015, + 0x1a151850, + 0x39141a10, + 0xb0d868b3, + 0xb1087100, + 0xb200a0d8, + 0xb012b002, + 0x22168216, + 0x814640bc, + 0x06f63d46, + 0x81408165, + 0x105106f0, + 0x65570611, + 0x68c53d15, + 0x22f08140, + 0x1a1644bf, + 0x8ae14cc2, + 0x9861d040, + 0x13f06798, + 0x40dc1c03, + 0x1021c0f0, + 0x65570611, + 0x68d73d12, + 0x1041c0f0, + 0x65570611, + 0x68dd3d14, + 0x72207000, + 0x7310730f, + 0x91c0c000, + 0xb0c1b0f1, + 0x9760c050, + 0x9780c010, + 0x6491c008, + 0x39838ad3, + 0x06133953, + 0x221081e0, + 0x81a14104, + 0x10170831, + 0x81306557, + 0x39403980, + 0x45031e10, + 0x0a111071, + 0x60f46557, + 0x65571201, + 0xa0c1b204, + 0xa0c3b0f1, + 0x6798c050, + 0x7220606a, + 0x7310730f, + 0x91c0c000, + 0xb0c1b0f1, + 0x9760c050, + 0x9780c010, + 0x8216b200, + 0x41192216, + 0xb012b002, + 0xc030c008, + 0x10a178ca, + 0x65570611, + 0x6921391a, + 0x78dac0f0, + 0x061110a1, + 0x391a6557, + 0xc0706928, + 0x10a178ea, + 0x65570611, + 0x692f391a, + 0x78fac090, + 0x061110a1, + 0x391a6557, + 0x8ad36936, + 0x39533983, + 0x81e00613, + 0x414c2210, + 0x0831c011, + 0x81a16557, + 0x65576793, + 0x0831c001, + 0x613f6557, + 0x6557c011, + 0x6557c001, + 0xa0c1b204, + 0xa0c3b0f1, + 0x6798c060, + 0xc029606a, + 0x455d2208, + 0x41732201, + 0x2201616c, + 0x8aef4573, + 0x416c22ff, + 0x31116578, + 0x39119201, + 0x80fe1018, + 0x456bc019, + 0x6173c029, + 0x7100b0f1, + 0x92013111, + 0x10183911, + 0xb0f1c019, + 0x1a197100, + 0x70004573, + 0x785f10f9, + 0x100004f9, + 0x10001000, + 0x1a191000, + 0x7000457b, + 0xc0706750, + 0x847d6798, + 0x140dc010, + 0x142d312d, + 0x318e8ace, + 0x397e311e, + 0x31498ac9, + 0x39493979, + 0x10903129, + 0x72769780, + 0xa764b764, + 0x9762c662, + 0xb012b002, + 0x986be080, + 0x6798987f, + 0x6699b485, + 0x8ab1a182, + 0x45aa22f1, + 0x22f18ad1, + 0x61df45aa, + 0x80b77100, + 0x45fd2207, + 0x22b08090, + 0x105441b6, + 0x662d858c, + 0x61aa668e, + 0x22f18ab1, + 0x223741c0, + 0xb11341c0, + 0x223080b0, + 0x61ce45bb, + 0x41d322e1, + 0x22508090, + 0xb0f541d3, + 0x22108210, + 0x978941aa, + 0xa764b764, + 0x61aab0f6, + 0xb764978d, + 0xb0f6a764, + 0x8ad061aa, + 0x42da22f0, + 0x42da2237, + 0xb113b075, + 0x223080b0, + 0xb08745d9, + 0x710061aa, + 0x220780b7, + 0x223745fd, + 0x809045fc, + 0x41ee22b0, + 0x858c1054, + 0x668e662d, + 0x8ab161df, + 0x41df22e1, + 0x22508090, + 0xb0f541df, + 0x22108210, + 0x978d41df, + 0xa764b764, + 0x61dfb0f6, + 0xb110b182, + 0xb113a0e0, + 0xb074a0e3, + 0xa044b201, + 0x986ad090, + 0x10806798, + 0x1c0a1610, + 0x1cfa4a0e, + 0x66704e0e, + 0xc00ec00f, + 0x80907100, + 0x44442200, + 0x1054858c, + 0x668e662d, + 0x39808130, + 0x1e1006f0, + 0x667a461f, + 0x66646220, + 0x1e008150, + 0x1a104210, + 0x4e101cf0, + 0x62106228, + 0xb0f6a0c6, + 0xb0fba0cb, + 0xb8846306, + 0x881188c2, + 0x1e010631, + 0x1e21424a, + 0x1e31423c, + 0x10564243, + 0x39161426, + 0x624b1065, + 0x31261056, + 0x14261856, + 0x10653926, + 0x1056624b, + 0x18563136, + 0x39361426, + 0x624b1065, + 0x82121026, + 0x1c263922, + 0x18624e59, + 0x1c12c101, + 0x12014e57, + 0x31211821, + 0xcc016261, + 0x18266261, + 0x1c16c101, + 0x10614e60, + 0x62613121, + 0x9581c401, + 0x7000b0fb, + 0x466f1c8a, + 0x39208210, + 0x4e6c1c04, + 0x626dc001, + 0x9191c011, + 0x7000161f, + 0x39208210, + 0x4e761c04, + 0x6277c001, + 0x9191c011, + 0x7000c01f, + 0x468d1c8a, + 0x31808580, + 0x10013d80, + 0x10171870, + 0x468c1e1e, + 0x39703980, + 0x39818ad1, + 0x08103951, + 0x161f9190, + 0x70000a1e, + 0x10c08581, + 0x22700810, + 0x120a4295, + 0x1cba6298, + 0x161a4293, + 0xb0fb7000, + 0xb0f1b0f6, + 0xb113b110, + 0xb0f2b0f5, + 0x720d720c, + 0xb0cb720e, + 0xb0e3b0e0, + 0x22f28ab2, + 0xb0c642ac, + 0x62afb763, + 0x22f08ad0, + 0xb40542cf, + 0xa428a404, + 0xcaa0a429, + 0xcaa13180, + 0x94510001, + 0x8ad39461, + 0x39833183, + 0x31808410, + 0x31833980, + 0x94100030, + 0x31508400, + 0x8ad33950, + 0x06f33983, + 0x1834c1f4, + 0x31343184, + 0x94000040, + 0x22e2b089, + 0x8aca42d9, + 0x398a394a, + 0x978a312a, + 0xb0c6b0c5, + 0x7000b763, + 0xa0e0b20f, + 0xa0cba0e3, + 0xb764978e, + 0xb0f6a764, + 0xb113b110, + 0x8210b0fb, + 0x42e52200, + 0x8002b0f5, + 0xa006a004, + 0x7203a001, + 0xc0a07204, + 0x71006798, + 0xb0f6b764, + 0xa20fb0c5, + 0xb0f57100, + 0x7820a0c5, + 0x90029030, + 0x90407830, + 0xb0729060, + 0x6699a20f, + 0xa764978a, + 0x61a3b0f6, + 0x8180b88c, + 0x392489a4, + 0x00043184, + 0xc0b09184, + 0x73766798, + 0x72487276, + 0x72027206, + 0x73057204, + 0x606a7306, + 0xc0c06750, + 0xb0f86798, + 0xb0fbb0cb, + 0xb228b005, + 0xb0fb7100, + 0x22e08ad0, + 0x82104328, + 0x43202210, + 0x8580662d, + 0x0a103970, + 0x63206789, + 0xc0d06750, + 0xb0cb6798, + 0x120cb074, + 0x398e881e, + 0x433e1e0e, + 0x30e01210, + 0x71001a20, + 0x6b3b662d, + 0x8ad07100, + 0x434522e0, + 0x22108210, + 0x662d4336, + 0x0a113971, + 0x81549191, + 0x43361e04, + 0x1cc4161c, + 0x63364306, + 0x91b01200, + 0xb006b0f8, + 0xb004b016, + 0xb002b014, + 0x8400b012, + 0x04207862, + 0x39838143, + 0x94732a73, + 0x1832c1f2, + 0x10213162, + 0x00123151, + 0x94000020, + 0x90307820, + 0x78309050, + 0x90609040, + 0x8330c04b, + 0x06303930, + 0x43751e00, + 0x10b8300b, + 0x39181a1b, + 0x108fc00a, + 0xa203a204, + 0x22408330, + 0x165f4382, + 0x6386b204, + 0x43862230, + 0xb203163f, + 0xb072b205, + 0x22007000, + 0xb005478d, + 0x80006392, + 0x43922250, + 0xa005b240, + 0x82a27000, + 0x06123972, + 0x70000821, + 0x88409850, + 0x47992200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_genook(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 463; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenookMce[i]; - } + uint32_t i; + + for (i = 0; i < 463; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenookMce[i]; + } + #else - const uint32_t *pS = patchGenookMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 57; + const uint32_t* pS = patchGenookMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 57; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_ghs.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_ghs.h index 0d0edc55..81d20004 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_ghs.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_ghs.h @@ -43,367 +43,372 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchGhsMce[301] = { - 0x2fcf603c, - 0x00f03f9d, - 0x0f30003d, - 0x003f0ff0, - 0x0000ff00, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00070003, - 0x31fd31fd, - 0x04000000, - 0x001d000f, - 0x000b0387, - 0x004340f4, - 0x80828000, - 0x00000f90, - 0x0510091e, - 0x00050054, - 0x11010000, - 0x0000003c, - 0x3030002f, - 0x0000027f, - 0xd3910000, - 0x0000193d, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72487220, - 0x7303a32d, - 0x72037305, - 0x73067304, - 0x73767204, - 0xc7c07276, - 0x00018001, - 0x90109001, - 0x90010801, - 0x720d720c, - 0xb0c0720e, - 0xb0f07100, - 0x7218a0c0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60796c01, - 0x60f4607c, - 0x607961da, - 0x60796079, - 0x6079607a, - 0x60f4607c, - 0x607961da, - 0x60796079, - 0x1210607a, - 0x730f7220, - 0x73117310, - 0x00108181, - 0xb0709180, - 0x606f6051, - 0x606f6646, - 0x663cc030, - 0xc282c141, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0x78306882, - 0x78409ac0, - 0xc4829ad0, - 0x1820c5a0, - 0x12034093, - 0x16126e23, - 0x83606890, - 0x606f97e0, - 0x94908160, - 0x39808140, - 0x10012a70, - 0x84321611, - 0xc0f38444, - 0xc200c0f5, - 0x40ba1c01, - 0x1c10c100, - 0x4cb240b0, - 0x18031013, - 0x1a131830, - 0x39121a10, - 0x60ba68ad, - 0x60ba13f3, - 0x101513f3, - 0x1850c100, - 0x1a101a15, - 0x68b83914, - 0x7100b0d8, - 0xa0d8b108, - 0xb760b200, - 0x97808ac0, - 0xb0c1b0f1, - 0xb0f17100, - 0x7276a0c1, - 0xb003b480, - 0xb002b013, - 0x7229b012, - 0x7100b0d0, - 0x8140b100, - 0x71009290, - 0x8140b100, - 0x44d322f0, - 0x1c0313f0, - 0x929340df, - 0x71009492, - 0x9295b100, - 0x71009494, - 0xb0d0b100, - 0x7000a480, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7000a002, - 0x7310730f, - 0x663cc040, - 0x92f0c000, - 0x92a08ad0, - 0x91c0c110, - 0xb2f06496, - 0x92a082b0, - 0xb0f3b483, - 0x7100b0c3, - 0x64e6a0c3, - 0xb006606f, - 0xb004b016, - 0xb002b014, - 0x8400b012, - 0x04207872, - 0x39838143, - 0x94732a73, - 0x1832c1f2, - 0x10213162, - 0x00123151, - 0x94000020, - 0x16101030, - 0x22103930, - 0x12204124, - 0x10033150, - 0x16a03180, - 0x12029350, - 0x22731204, - 0x84304136, - 0x87d297c0, - 0x84501a82, - 0x87d497c0, - 0x61381a84, - 0x41432263, - 0x97c08440, - 0x1a8087d0, - 0x84601402, - 0x87d097c0, - 0x14041a80, - 0x8440614f, - 0x04107881, - 0x87d297c0, - 0x84601a42, - 0x04107881, - 0x87d497c0, - 0x31521a44, - 0x39633154, - 0x16130633, - 0x38343832, - 0x39823182, - 0x00423184, - 0x78509572, - 0x78109360, - 0x90509030, - 0x90407820, - 0xb2059060, - 0x6965cb40, - 0x936087e0, - 0xa0c5b0f5, - 0x83038ae2, - 0xc00c9302, - 0x8140c00b, - 0x39803180, - 0x81413940, - 0x0431c0f3, - 0x1441c014, - 0x1412c002, - 0x31226979, - 0xb0d1b101, - 0xb0727100, - 0xa04ea0d1, - 0xb011b06e, - 0xa041b06c, - 0xa487a488, - 0x720d720c, - 0x7276720e, - 0xa764b764, - 0x9760c440, - 0xc020c062, - 0xc07e9780, - 0xb0e0c07f, - 0xb0c1b0f1, - 0xb0f5b0c5, - 0xb7607100, - 0xa0c5a0e0, - 0x220080b0, - 0x621345a2, - 0x7100b88f, - 0x978eb073, - 0xb201b074, - 0x85708961, - 0x95511801, - 0x8a718a60, - 0x1c211801, - 0x14124db9, - 0x61ba49b7, - 0x41ba1c01, - 0xb4874db9, - 0xb48861ba, - 0xb0f1b061, - 0xb0417100, - 0xb0f1978f, - 0xb04e7100, - 0x8a73b06e, - 0x70008552, - 0x8180b88c, - 0x392489a4, - 0x00043184, - 0xc0509184, - 0x7850663c, - 0x73769360, - 0x72487276, - 0x72027206, - 0x73057204, - 0x606f7306, - 0x91b01300, - 0xc060b32d, - 0xb0f8663c, - 0x78606509, - 0x12009360, - 0x97801a10, - 0x9760c380, - 0x9760c280, - 0xb0c6a0c1, - 0x22008090, - 0x81544451, - 0x41ec1e04, - 0x16943914, - 0xb0f69784, - 0xd0708552, - 0x663c9862, - 0x8a738a62, - 0x9862e080, - 0x663c9873, - 0x87818790, - 0x4a101c01, - 0x1ef11801, - 0x87814a0e, - 0x97811af1, - 0xb0f67100, - 0x978116f1, - 0x7100a205, - 0xa0c6b0f6, - 0x821d61c6, - 0x418b1e0d, - 0x9880c030, - 0x88a48893, - 0x31343133, - 0x422522fd, - 0x3d343d33, - 0x30d32afd, - 0x821230d4, - 0x163d622b, - 0x3cd43cd3, - 0x82121a3d, - 0x94e3622b, - 0xb05394f4, - 0xc030618b, - 0x88929880, - 0x3d323132, - 0x313388a3, - 0xe0903d33, - 0x98739862, - 0x7000663c, - 0x88409850, - 0x463d2200, - 0x7000b830, - 0x22f08150, - 0xb0704259, - 0x3162c102, - 0x8150c001, - 0x42521e00, - 0x425322f0, - 0x3160e5a0, - 0x62533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006a54 +MCE_PATCH_TYPE patchGhsMce[301] = +{ + 0x2fcf603c, + 0x00f03f9d, + 0x0f30003d, + 0x003f0ff0, + 0x0000ff00, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00070003, + 0x31fd31fd, + 0x04000000, + 0x001d000f, + 0x000b0387, + 0x004340f4, + 0x80828000, + 0x00000f90, + 0x0510091e, + 0x00050054, + 0x11010000, + 0x0000003c, + 0x3030002f, + 0x0000027f, + 0xd3910000, + 0x0000193d, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72487220, + 0x7303a32d, + 0x72037305, + 0x73067304, + 0x73767204, + 0xc7c07276, + 0x00018001, + 0x90109001, + 0x90010801, + 0x720d720c, + 0xb0c0720e, + 0xb0f07100, + 0x7218a0c0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60796c01, + 0x60f4607c, + 0x607961da, + 0x60796079, + 0x6079607a, + 0x60f4607c, + 0x607961da, + 0x60796079, + 0x1210607a, + 0x730f7220, + 0x73117310, + 0x00108181, + 0xb0709180, + 0x606f6051, + 0x606f6646, + 0x663cc030, + 0xc282c141, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0x78306882, + 0x78409ac0, + 0xc4829ad0, + 0x1820c5a0, + 0x12034093, + 0x16126e23, + 0x83606890, + 0x606f97e0, + 0x94908160, + 0x39808140, + 0x10012a70, + 0x84321611, + 0xc0f38444, + 0xc200c0f5, + 0x40ba1c01, + 0x1c10c100, + 0x4cb240b0, + 0x18031013, + 0x1a131830, + 0x39121a10, + 0x60ba68ad, + 0x60ba13f3, + 0x101513f3, + 0x1850c100, + 0x1a101a15, + 0x68b83914, + 0x7100b0d8, + 0xa0d8b108, + 0xb760b200, + 0x97808ac0, + 0xb0c1b0f1, + 0xb0f17100, + 0x7276a0c1, + 0xb003b480, + 0xb002b013, + 0x7229b012, + 0x7100b0d0, + 0x8140b100, + 0x71009290, + 0x8140b100, + 0x44d322f0, + 0x1c0313f0, + 0x929340df, + 0x71009492, + 0x9295b100, + 0x71009494, + 0xb0d0b100, + 0x7000a480, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7000a002, + 0x7310730f, + 0x663cc040, + 0x92f0c000, + 0x92a08ad0, + 0x91c0c110, + 0xb2f06496, + 0x92a082b0, + 0xb0f3b483, + 0x7100b0c3, + 0x64e6a0c3, + 0xb006606f, + 0xb004b016, + 0xb002b014, + 0x8400b012, + 0x04207872, + 0x39838143, + 0x94732a73, + 0x1832c1f2, + 0x10213162, + 0x00123151, + 0x94000020, + 0x16101030, + 0x22103930, + 0x12204124, + 0x10033150, + 0x16a03180, + 0x12029350, + 0x22731204, + 0x84304136, + 0x87d297c0, + 0x84501a82, + 0x87d497c0, + 0x61381a84, + 0x41432263, + 0x97c08440, + 0x1a8087d0, + 0x84601402, + 0x87d097c0, + 0x14041a80, + 0x8440614f, + 0x04107881, + 0x87d297c0, + 0x84601a42, + 0x04107881, + 0x87d497c0, + 0x31521a44, + 0x39633154, + 0x16130633, + 0x38343832, + 0x39823182, + 0x00423184, + 0x78509572, + 0x78109360, + 0x90509030, + 0x90407820, + 0xb2059060, + 0x6965cb40, + 0x936087e0, + 0xa0c5b0f5, + 0x83038ae2, + 0xc00c9302, + 0x8140c00b, + 0x39803180, + 0x81413940, + 0x0431c0f3, + 0x1441c014, + 0x1412c002, + 0x31226979, + 0xb0d1b101, + 0xb0727100, + 0xa04ea0d1, + 0xb011b06e, + 0xa041b06c, + 0xa487a488, + 0x720d720c, + 0x7276720e, + 0xa764b764, + 0x9760c440, + 0xc020c062, + 0xc07e9780, + 0xb0e0c07f, + 0xb0c1b0f1, + 0xb0f5b0c5, + 0xb7607100, + 0xa0c5a0e0, + 0x220080b0, + 0x621345a2, + 0x7100b88f, + 0x978eb073, + 0xb201b074, + 0x85708961, + 0x95511801, + 0x8a718a60, + 0x1c211801, + 0x14124db9, + 0x61ba49b7, + 0x41ba1c01, + 0xb4874db9, + 0xb48861ba, + 0xb0f1b061, + 0xb0417100, + 0xb0f1978f, + 0xb04e7100, + 0x8a73b06e, + 0x70008552, + 0x8180b88c, + 0x392489a4, + 0x00043184, + 0xc0509184, + 0x7850663c, + 0x73769360, + 0x72487276, + 0x72027206, + 0x73057204, + 0x606f7306, + 0x91b01300, + 0xc060b32d, + 0xb0f8663c, + 0x78606509, + 0x12009360, + 0x97801a10, + 0x9760c380, + 0x9760c280, + 0xb0c6a0c1, + 0x22008090, + 0x81544451, + 0x41ec1e04, + 0x16943914, + 0xb0f69784, + 0xd0708552, + 0x663c9862, + 0x8a738a62, + 0x9862e080, + 0x663c9873, + 0x87818790, + 0x4a101c01, + 0x1ef11801, + 0x87814a0e, + 0x97811af1, + 0xb0f67100, + 0x978116f1, + 0x7100a205, + 0xa0c6b0f6, + 0x821d61c6, + 0x418b1e0d, + 0x9880c030, + 0x88a48893, + 0x31343133, + 0x422522fd, + 0x3d343d33, + 0x30d32afd, + 0x821230d4, + 0x163d622b, + 0x3cd43cd3, + 0x82121a3d, + 0x94e3622b, + 0xb05394f4, + 0xc030618b, + 0x88929880, + 0x3d323132, + 0x313388a3, + 0xe0903d33, + 0x98739862, + 0x7000663c, + 0x88409850, + 0x463d2200, + 0x7000b830, + 0x22f08150, + 0xb0704259, + 0x3162c102, + 0x8150c001, + 0x42521e00, + 0x425322f0, + 0x3160e5a0, + 0x62533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006a54 }; PATCH_FUN_SPEC void rf_patch_mce_ghs(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 301; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchGhsMce[i]; - } + uint32_t i; + + for (i = 0; i < 301; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchGhsMce[i]; + } + #else - const uint32_t *pS = patchGhsMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 37; + const uint32_t* pS = patchGhsMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 37; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_hsp_4mbps.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_hsp_4mbps.h index 660f2cca..e8612f63 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_hsp_4mbps.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_hsp_4mbps.h @@ -43,316 +43,321 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchHsp4mbpsMce[252] = { - 0x00036075, - 0x0079000f, - 0x00000000, - 0x000c8000, - 0x0000000a, - 0x00780002, - 0x80000000, - 0x06700808, - 0x0b000000, - 0x00500104, - 0x00000000, - 0x01ff0000, - 0x04030000, - 0x017f7f26, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x05952fc8, - 0x00ff2f8f, - 0x00ff00ff, - 0x00ff00ff, - 0x00ff00ff, - 0x00faf320, - 0xaaaa0000, - 0xaaaaaaaa, - 0xaaaaaaaa, - 0x2000faf3, - 0x00580200, - 0x0f700288, - 0x00010fd0, - 0x0a400000, - 0x0d100002, - 0x0f590b08, - 0x04340f9a, - 0x067d0b08, - 0x09820f9a, - 0x0bcb0b08, - 0x00a60f9a, - 0x02ef0b08, - 0x00000f9a, - 0x00000000, - 0x00000000, - 0xc1020000, - 0xc0013162, - 0x1e008150, - 0x1a10406d, - 0x1020606f, - 0x6f131a10, - 0x16116e23, - 0x686f1612, - 0x72207000, - 0x7310730f, - 0x720c7311, - 0x720e720d, - 0x73057248, - 0x73767306, - 0xc7c07276, - 0xb0c09010, - 0xb0f07100, - 0x7218a0c0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60b16c01, - 0x60de60c3, - 0x60b1611b, - 0x60b160b1, - 0x60b160b2, - 0x60de60c3, - 0x60b1611b, - 0x60b160b1, - 0x60b160b2, - 0x60de60c3, - 0x60b1611b, - 0x60b160b1, - 0x60b160b2, - 0x60de60c3, - 0x60b1611b, - 0x60b160b1, - 0x60b660b2, - 0x60b66465, - 0x60b71220, - 0x72201210, - 0x00108181, - 0xb0709180, - 0x00006083, - 0x00000000, - 0x00000000, - 0xc0110000, - 0xc560c282, - 0x6f131820, - 0x16116e23, - 0x68c71612, - 0x95a07ce0, - 0xc4f1c100, - 0x6f13c622, - 0x16116e23, - 0x68d11612, - 0x000060b6, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc3517220, - 0x9290c0f0, - 0x94926f12, - 0xb1081611, - 0x7100b0d8, - 0xa0d8b108, - 0xb480b200, - 0x91c0c140, - 0xb012b002, - 0xb013b003, - 0xb100c0c0, - 0x7100b0d0, - 0x6f12b100, - 0x94921611, - 0xa0d068f5, - 0xb483a480, - 0xb0c3b0f3, - 0x1220b0f1, - 0xc0c09760, - 0x71009780, - 0xb482a0c3, - 0xb0c1b760, - 0xb0f17100, - 0xa483a0c1, - 0xa003a760, - 0xc7c0a002, - 0x60b69010, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72200000, - 0x91b0c140, - 0x94327c52, - 0x94427c42, - 0x94027c62, - 0x93227c72, - 0x7cd07cc6, - 0xc00093b0, - 0xc3f09370, - 0xc3f13180, - 0x95f10001, - 0x96119601, - 0x7ce095e0, - 0xb00695a0, - 0xb004b016, - 0xb002b014, - 0xb107b012, - 0x7100b0d7, - 0xb072a0d7, - 0x90307b20, - 0x7b309050, - 0x90609040, - 0x72767b44, - 0x9762c022, - 0x9780c0e0, - 0x1e108210, - 0xc030454c, - 0xcb4065f2, - 0x65d36952, - 0xa0c5b0f5, - 0xb0f8b201, - 0xb0e0b110, - 0xb0737100, - 0xb072b760, - 0xb0619044, - 0xa0e0b110, - 0xb202a0c5, - 0x7ca2b074, - 0xb0c19362, - 0x7100b0f1, - 0x9780c080, - 0x88907388, - 0x88a194e0, - 0x936694f1, - 0x7100b0f1, - 0x9780c310, - 0xb0f1b3b5, - 0xc0307100, - 0x7c809780, - 0xb0f19320, - 0xc0207100, - 0xb0459780, - 0xb0f1b065, - 0xb04f7100, - 0xb0f1b06f, - 0x7276a0c1, - 0x97701240, - 0x9780fff0, - 0x9760c380, - 0xb0c8a764, - 0x7100b889, - 0xa0c8b0f8, - 0xd0408152, - 0x65f29862, - 0x97823112, - 0xb0c6b0f6, - 0xb0f67100, - 0xb107a0c6, - 0x7100b0d7, - 0x7100b107, - 0x7276b107, - 0x7100c0f0, - 0x7100b107, - 0xb5b0b107, - 0xa0d769a9, - 0x8a738a62, - 0x9862e050, - 0x65f29873, - 0xa202a201, - 0x31828942, - 0x84e73d82, - 0x313784f8, - 0x31383d37, - 0xe0603d38, - 0x98789867, - 0xc00065f2, - 0x93609370, - 0x94f094e0, - 0x73067305, - 0x72047203, - 0xa002a004, - 0x9010c7c0, - 0x7cb260b6, - 0x12f09362, - 0x738869d6, - 0x94e08890, - 0x94f188a1, - 0x7c929366, - 0xb0539362, - 0x31371007, - 0x10183d37, - 0x3d383138, - 0x9867e070, - 0x65f29878, - 0x00007000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x88409850, - 0x45f32200, - 0x7000b830 +MCE_PATCH_TYPE patchHsp4mbpsMce[252] = +{ + 0x00036075, + 0x0079000f, + 0x00000000, + 0x000c8000, + 0x0000000a, + 0x00780002, + 0x80000000, + 0x06700808, + 0x0b000000, + 0x00500104, + 0x00000000, + 0x01ff0000, + 0x04030000, + 0x017f7f26, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x05952fc8, + 0x00ff2f8f, + 0x00ff00ff, + 0x00ff00ff, + 0x00ff00ff, + 0x00faf320, + 0xaaaa0000, + 0xaaaaaaaa, + 0xaaaaaaaa, + 0x2000faf3, + 0x00580200, + 0x0f700288, + 0x00010fd0, + 0x0a400000, + 0x0d100002, + 0x0f590b08, + 0x04340f9a, + 0x067d0b08, + 0x09820f9a, + 0x0bcb0b08, + 0x00a60f9a, + 0x02ef0b08, + 0x00000f9a, + 0x00000000, + 0x00000000, + 0xc1020000, + 0xc0013162, + 0x1e008150, + 0x1a10406d, + 0x1020606f, + 0x6f131a10, + 0x16116e23, + 0x686f1612, + 0x72207000, + 0x7310730f, + 0x720c7311, + 0x720e720d, + 0x73057248, + 0x73767306, + 0xc7c07276, + 0xb0c09010, + 0xb0f07100, + 0x7218a0c0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60b16c01, + 0x60de60c3, + 0x60b1611b, + 0x60b160b1, + 0x60b160b2, + 0x60de60c3, + 0x60b1611b, + 0x60b160b1, + 0x60b160b2, + 0x60de60c3, + 0x60b1611b, + 0x60b160b1, + 0x60b160b2, + 0x60de60c3, + 0x60b1611b, + 0x60b160b1, + 0x60b660b2, + 0x60b66465, + 0x60b71220, + 0x72201210, + 0x00108181, + 0xb0709180, + 0x00006083, + 0x00000000, + 0x00000000, + 0xc0110000, + 0xc560c282, + 0x6f131820, + 0x16116e23, + 0x68c71612, + 0x95a07ce0, + 0xc4f1c100, + 0x6f13c622, + 0x16116e23, + 0x68d11612, + 0x000060b6, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc3517220, + 0x9290c0f0, + 0x94926f12, + 0xb1081611, + 0x7100b0d8, + 0xa0d8b108, + 0xb480b200, + 0x91c0c140, + 0xb012b002, + 0xb013b003, + 0xb100c0c0, + 0x7100b0d0, + 0x6f12b100, + 0x94921611, + 0xa0d068f5, + 0xb483a480, + 0xb0c3b0f3, + 0x1220b0f1, + 0xc0c09760, + 0x71009780, + 0xb482a0c3, + 0xb0c1b760, + 0xb0f17100, + 0xa483a0c1, + 0xa003a760, + 0xc7c0a002, + 0x60b69010, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72200000, + 0x91b0c140, + 0x94327c52, + 0x94427c42, + 0x94027c62, + 0x93227c72, + 0x7cd07cc6, + 0xc00093b0, + 0xc3f09370, + 0xc3f13180, + 0x95f10001, + 0x96119601, + 0x7ce095e0, + 0xb00695a0, + 0xb004b016, + 0xb002b014, + 0xb107b012, + 0x7100b0d7, + 0xb072a0d7, + 0x90307b20, + 0x7b309050, + 0x90609040, + 0x72767b44, + 0x9762c022, + 0x9780c0e0, + 0x1e108210, + 0xc030454c, + 0xcb4065f2, + 0x65d36952, + 0xa0c5b0f5, + 0xb0f8b201, + 0xb0e0b110, + 0xb0737100, + 0xb072b760, + 0xb0619044, + 0xa0e0b110, + 0xb202a0c5, + 0x7ca2b074, + 0xb0c19362, + 0x7100b0f1, + 0x9780c080, + 0x88907388, + 0x88a194e0, + 0x936694f1, + 0x7100b0f1, + 0x9780c310, + 0xb0f1b3b5, + 0xc0307100, + 0x7c809780, + 0xb0f19320, + 0xc0207100, + 0xb0459780, + 0xb0f1b065, + 0xb04f7100, + 0xb0f1b06f, + 0x7276a0c1, + 0x97701240, + 0x9780fff0, + 0x9760c380, + 0xb0c8a764, + 0x7100b889, + 0xa0c8b0f8, + 0xd0408152, + 0x65f29862, + 0x97823112, + 0xb0c6b0f6, + 0xb0f67100, + 0xb107a0c6, + 0x7100b0d7, + 0x7100b107, + 0x7276b107, + 0x7100c0f0, + 0x7100b107, + 0xb5b0b107, + 0xa0d769a9, + 0x8a738a62, + 0x9862e050, + 0x65f29873, + 0xa202a201, + 0x31828942, + 0x84e73d82, + 0x313784f8, + 0x31383d37, + 0xe0603d38, + 0x98789867, + 0xc00065f2, + 0x93609370, + 0x94f094e0, + 0x73067305, + 0x72047203, + 0xa002a004, + 0x9010c7c0, + 0x7cb260b6, + 0x12f09362, + 0x738869d6, + 0x94e08890, + 0x94f188a1, + 0x7c929366, + 0xb0539362, + 0x31371007, + 0x10183d37, + 0x3d383138, + 0x9867e070, + 0x65f29878, + 0x00007000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x88409850, + 0x45f32200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_hsp_4mbps(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 252; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchHsp4mbpsMce[i]; - } + uint32_t i; + + for (i = 0; i < 252; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchHsp4mbpsMce[i]; + } + #else - const uint32_t *pS = patchHsp4mbpsMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 31; + const uint32_t* pS = patchHsp4mbpsMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 31; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_iqdump.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_iqdump.h index 8c4915c0..6babc9ea 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_iqdump.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_iqdump.h @@ -43,399 +43,404 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchIqdumpMce[333] = { - 0x0000602d, - 0x3f9d2fcf, - 0x003f0001, - 0x0fffff00, - 0xf80007ff, - 0x00000300, - 0x00170003, - 0x00003d1f, - 0x08000000, - 0x0000000f, - 0x00000387, - 0x00434074, - 0x80828000, - 0x000006f0, - 0x0510091e, - 0x00070054, - 0x50140000, - 0x00000050, - 0x0c30c02f, - 0x0000017f, - 0x00000000, - 0x0000aa00, - 0x72200000, - 0xa32d7248, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x6081607e, - 0x60fa60ec, - 0x607e607e, - 0x607e607e, - 0x6081607e, - 0x619e60ec, - 0x607e607e, - 0x607e607e, - 0x6081607e, - 0x610a60ec, - 0x607e607e, - 0x607e607e, - 0x6081607e, - 0x61ba60ec, - 0x607e607e, - 0x607e607e, - 0x6081607e, - 0x614260ec, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x6042b070, - 0x66896074, - 0xc0306074, - 0xc0c16674, - 0xc470c282, - 0x6f131820, - 0x16116e23, - 0x68871612, - 0x98107840, - 0xc5a0c482, - 0x40961820, - 0x6e231203, - 0x68931612, - 0x81606074, - 0x81409490, - 0x2a703980, - 0x16111001, - 0x84448432, - 0xc0f5c0f3, - 0x1c01c200, - 0xc10040bb, - 0x40b11c10, - 0x10134cb3, - 0x18301803, - 0x1a101a13, - 0x68ae3912, - 0x13f360bb, - 0x13f360bb, - 0xc1001015, - 0x1a151850, - 0x39141a10, - 0xb0d868b9, - 0xb1087100, - 0xb200a0d8, - 0xb003b480, - 0xb002b013, - 0x7229b012, - 0x7100b0d0, - 0x8140b100, - 0x71009290, - 0x8140b100, - 0x44cb22f0, - 0x1c0313f0, - 0x929340d7, - 0x71009492, - 0x9295b100, - 0x71009494, - 0xb0d0b100, - 0x7000a480, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7000a002, - 0x7310730f, - 0x6674c040, - 0x91c0c100, - 0xb4836497, - 0xb0c3b0f3, - 0xa0c37100, - 0x607464de, - 0xa0e0a0c2, - 0x730fa0e3, - 0x65fe7310, - 0x6674c050, - 0xc035b0c2, - 0x99c57100, - 0xb074b888, - 0x6104b0f2, - 0xa0e0a0c2, - 0x730fa0e3, - 0x65fe7310, - 0xc000c18b, - 0x120c91b0, - 0x787a1218, - 0x789e788d, - 0xb07410a9, - 0xc020b0c2, - 0x7100b0f2, - 0xc060691c, - 0xc0356674, - 0x7100b0f2, - 0x8a3099c5, - 0x8ad16593, - 0x412f2201, - 0x1ca81080, - 0x1208452e, - 0x658a1618, - 0x65938a40, - 0x22018ad1, - 0x1090413a, - 0x1e091a19, - 0x10a9453a, - 0x8154658a, - 0x41221e04, - 0x1c4c14bc, - 0x61224e5d, - 0xa0e0a0c2, - 0x730fa0e3, - 0x65fe7310, - 0x120c721b, - 0xb0741205, - 0xc020b0c2, - 0x7100b0f2, - 0xc070694e, - 0x78ad6674, - 0xb0f2881e, - 0x8ac07100, - 0x415e2200, - 0x22108200, - 0xb201455e, - 0x8902988d, - 0x3d823182, - 0x31808940, - 0x18023d80, - 0x1e0e063e, - 0x1e2e4180, - 0x1e3e4172, - 0x10564179, - 0x3d161426, - 0x61811065, - 0x31261056, - 0x14261856, - 0x10653d26, - 0x10566181, - 0x18563136, - 0x3d361426, - 0x61811065, - 0x39761026, - 0x81549196, - 0x41551e04, - 0x1c4c161c, - 0x61554e5d, - 0xc0b01001, - 0x39119191, - 0x10001000, - 0x698c1000, - 0x31307000, - 0x1cd03d30, - 0x1ce04d9a, - 0x7000499c, - 0x700010d0, - 0x700010e0, - 0x6674c080, - 0xa0e0a0c2, - 0x730fa0e3, - 0x65fe7310, - 0xb0e0b110, - 0x80b07100, - 0x45ad2200, - 0xb20161a8, - 0x6674c090, - 0xa0e0b110, - 0xc035b0c2, - 0x99c57100, - 0xb074b888, - 0x61b4b0f2, - 0x6674c0a0, - 0xa0e0a0c2, - 0x730fa0e3, - 0x65fe7310, - 0xc000c18b, - 0x120c91b0, - 0x787a1218, - 0x789e788d, - 0xb11010a9, - 0x7100b0e0, - 0x220080b0, - 0x61cd45d2, - 0xb201b074, - 0x6674c0b0, - 0xa0e0b110, - 0xc020b0c2, - 0x7100b0f2, - 0xc03569da, - 0x7100b0f2, - 0x8a3099c5, - 0x8ad16593, - 0x41eb2201, - 0x1ca81080, - 0x120845ea, - 0x658a1618, - 0x65938a40, - 0x22018ad1, - 0x109041f6, - 0x1e091a19, - 0x10a945f6, - 0x8154658a, - 0x41de1e04, - 0x1c4c14bc, - 0x61de4e5d, - 0x6674c0c0, - 0xb006b0f8, - 0xb004b016, - 0xb002b014, - 0x8400b012, - 0x04207852, - 0x39838143, - 0x94732a73, - 0x1832c1f2, - 0x10213162, - 0x00123151, - 0x94000020, - 0x16101030, - 0x22103930, - 0x1220421c, - 0x10033150, - 0x16303180, - 0x12029350, - 0x22731204, - 0x8430422e, - 0x87d297c0, - 0x84501a82, - 0x87d497c0, - 0x62301a84, - 0x423b2263, - 0x97c08440, - 0x1a8087d0, - 0x84601402, - 0x87d097c0, - 0x14041a80, - 0x84406247, - 0x04107861, - 0x87d297c0, - 0x84601a42, - 0x04107861, - 0x87d497c0, - 0x31521a44, - 0x39633154, - 0x16130633, - 0x38343832, - 0x39823182, - 0x00423184, - 0x78209572, - 0x90509030, - 0x90407830, - 0xb2059060, - 0x9140cd90, - 0xa2057000, - 0x7100b0f2, - 0xb0f2a0c2, - 0x8180b88c, - 0x392489a4, - 0x00043184, - 0xc0d09184, - 0x73766674, - 0x72487276, - 0x72027206, - 0x73057204, - 0x60747306, - 0x88409850, - 0x46752200, - 0x7000b830, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc1020000, - 0xc0013162, - 0x1e008150, - 0x1a104291, - 0x10206293, - 0x6f131a10, - 0x16116e23, - 0x6a931612, - 0x00007000 +MCE_PATCH_TYPE patchIqdumpMce[333] = +{ + 0x0000602d, + 0x3f9d2fcf, + 0x003f0001, + 0x0fffff00, + 0xf80007ff, + 0x00000300, + 0x00170003, + 0x00003d1f, + 0x08000000, + 0x0000000f, + 0x00000387, + 0x00434074, + 0x80828000, + 0x000006f0, + 0x0510091e, + 0x00070054, + 0x50140000, + 0x00000050, + 0x0c30c02f, + 0x0000017f, + 0x00000000, + 0x0000aa00, + 0x72200000, + 0xa32d7248, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x6081607e, + 0x60fa60ec, + 0x607e607e, + 0x607e607e, + 0x6081607e, + 0x619e60ec, + 0x607e607e, + 0x607e607e, + 0x6081607e, + 0x610a60ec, + 0x607e607e, + 0x607e607e, + 0x6081607e, + 0x61ba60ec, + 0x607e607e, + 0x607e607e, + 0x6081607e, + 0x614260ec, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x6042b070, + 0x66896074, + 0xc0306074, + 0xc0c16674, + 0xc470c282, + 0x6f131820, + 0x16116e23, + 0x68871612, + 0x98107840, + 0xc5a0c482, + 0x40961820, + 0x6e231203, + 0x68931612, + 0x81606074, + 0x81409490, + 0x2a703980, + 0x16111001, + 0x84448432, + 0xc0f5c0f3, + 0x1c01c200, + 0xc10040bb, + 0x40b11c10, + 0x10134cb3, + 0x18301803, + 0x1a101a13, + 0x68ae3912, + 0x13f360bb, + 0x13f360bb, + 0xc1001015, + 0x1a151850, + 0x39141a10, + 0xb0d868b9, + 0xb1087100, + 0xb200a0d8, + 0xb003b480, + 0xb002b013, + 0x7229b012, + 0x7100b0d0, + 0x8140b100, + 0x71009290, + 0x8140b100, + 0x44cb22f0, + 0x1c0313f0, + 0x929340d7, + 0x71009492, + 0x9295b100, + 0x71009494, + 0xb0d0b100, + 0x7000a480, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7000a002, + 0x7310730f, + 0x6674c040, + 0x91c0c100, + 0xb4836497, + 0xb0c3b0f3, + 0xa0c37100, + 0x607464de, + 0xa0e0a0c2, + 0x730fa0e3, + 0x65fe7310, + 0x6674c050, + 0xc035b0c2, + 0x99c57100, + 0xb074b888, + 0x6104b0f2, + 0xa0e0a0c2, + 0x730fa0e3, + 0x65fe7310, + 0xc000c18b, + 0x120c91b0, + 0x787a1218, + 0x789e788d, + 0xb07410a9, + 0xc020b0c2, + 0x7100b0f2, + 0xc060691c, + 0xc0356674, + 0x7100b0f2, + 0x8a3099c5, + 0x8ad16593, + 0x412f2201, + 0x1ca81080, + 0x1208452e, + 0x658a1618, + 0x65938a40, + 0x22018ad1, + 0x1090413a, + 0x1e091a19, + 0x10a9453a, + 0x8154658a, + 0x41221e04, + 0x1c4c14bc, + 0x61224e5d, + 0xa0e0a0c2, + 0x730fa0e3, + 0x65fe7310, + 0x120c721b, + 0xb0741205, + 0xc020b0c2, + 0x7100b0f2, + 0xc070694e, + 0x78ad6674, + 0xb0f2881e, + 0x8ac07100, + 0x415e2200, + 0x22108200, + 0xb201455e, + 0x8902988d, + 0x3d823182, + 0x31808940, + 0x18023d80, + 0x1e0e063e, + 0x1e2e4180, + 0x1e3e4172, + 0x10564179, + 0x3d161426, + 0x61811065, + 0x31261056, + 0x14261856, + 0x10653d26, + 0x10566181, + 0x18563136, + 0x3d361426, + 0x61811065, + 0x39761026, + 0x81549196, + 0x41551e04, + 0x1c4c161c, + 0x61554e5d, + 0xc0b01001, + 0x39119191, + 0x10001000, + 0x698c1000, + 0x31307000, + 0x1cd03d30, + 0x1ce04d9a, + 0x7000499c, + 0x700010d0, + 0x700010e0, + 0x6674c080, + 0xa0e0a0c2, + 0x730fa0e3, + 0x65fe7310, + 0xb0e0b110, + 0x80b07100, + 0x45ad2200, + 0xb20161a8, + 0x6674c090, + 0xa0e0b110, + 0xc035b0c2, + 0x99c57100, + 0xb074b888, + 0x61b4b0f2, + 0x6674c0a0, + 0xa0e0a0c2, + 0x730fa0e3, + 0x65fe7310, + 0xc000c18b, + 0x120c91b0, + 0x787a1218, + 0x789e788d, + 0xb11010a9, + 0x7100b0e0, + 0x220080b0, + 0x61cd45d2, + 0xb201b074, + 0x6674c0b0, + 0xa0e0b110, + 0xc020b0c2, + 0x7100b0f2, + 0xc03569da, + 0x7100b0f2, + 0x8a3099c5, + 0x8ad16593, + 0x41eb2201, + 0x1ca81080, + 0x120845ea, + 0x658a1618, + 0x65938a40, + 0x22018ad1, + 0x109041f6, + 0x1e091a19, + 0x10a945f6, + 0x8154658a, + 0x41de1e04, + 0x1c4c14bc, + 0x61de4e5d, + 0x6674c0c0, + 0xb006b0f8, + 0xb004b016, + 0xb002b014, + 0x8400b012, + 0x04207852, + 0x39838143, + 0x94732a73, + 0x1832c1f2, + 0x10213162, + 0x00123151, + 0x94000020, + 0x16101030, + 0x22103930, + 0x1220421c, + 0x10033150, + 0x16303180, + 0x12029350, + 0x22731204, + 0x8430422e, + 0x87d297c0, + 0x84501a82, + 0x87d497c0, + 0x62301a84, + 0x423b2263, + 0x97c08440, + 0x1a8087d0, + 0x84601402, + 0x87d097c0, + 0x14041a80, + 0x84406247, + 0x04107861, + 0x87d297c0, + 0x84601a42, + 0x04107861, + 0x87d497c0, + 0x31521a44, + 0x39633154, + 0x16130633, + 0x38343832, + 0x39823182, + 0x00423184, + 0x78209572, + 0x90509030, + 0x90407830, + 0xb2059060, + 0x9140cd90, + 0xa2057000, + 0x7100b0f2, + 0xb0f2a0c2, + 0x8180b88c, + 0x392489a4, + 0x00043184, + 0xc0d09184, + 0x73766674, + 0x72487276, + 0x72027206, + 0x73057204, + 0x60747306, + 0x88409850, + 0x46752200, + 0x7000b830, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc1020000, + 0xc0013162, + 0x1e008150, + 0x1a104291, + 0x10206293, + 0x6f131a10, + 0x16116e23, + 0x6a931612, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_mce_iqdump(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 333; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchIqdumpMce[i]; - } + uint32_t i; + + for (i = 0; i < 333; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchIqdumpMce[i]; + } + #else - const uint32_t *pS = patchIqdumpMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 41; + const uint32_t* pS = patchIqdumpMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 41; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_sl_longrange.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_sl_longrange.h index 27cc2c35..4807acc7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_sl_longrange.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_sl_longrange.h @@ -43,311 +43,317 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchSl_longrangeMce[256] = { - 0x146f603e, - 0x333c3c33, - 0x3cc3cccc, - 0x2fcf0005, - 0xdb3e0f9d, - 0x00007f7f, - 0x00020001, - 0x00000003, - 0x000c0003, - 0x00cc000f, - 0x003c00c3, - 0xcccc0033, - 0x33cccc33, - 0x0f003333, - 0x00000f0f, - 0x00070003, - 0x0000001f, - 0x04000000, - 0x0000000f, - 0x00010387, - 0x004348c0, - 0x80048000, - 0x000006f0, - 0x0524091e, - 0x00050054, - 0x48200800, - 0x00000048, - 0x7f7f001f, - 0x3c33014c, - 0xcccc333c, - 0x00003cc3, - 0x72487220, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x60766074, - 0x610e608a, - 0x60746074, - 0x60756074, - 0x606b1220, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x6052b070, - 0x606a606a, - 0xc282c1e1, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0xc482687a, - 0x1820c810, - 0x12034087, - 0x16126e23, - 0xd0006884, - 0x606a9170, - 0x7310730f, - 0x91c0c000, - 0x8170c009, - 0x06703980, - 0x1e101610, - 0xc0b74499, - 0xc01ec008, - 0x1e2060aa, - 0xc0f7449f, - 0xc03ec018, - 0x1e4060aa, - 0xc13744a5, - 0xc07ec038, - 0x1e8060aa, - 0xc1774468, - 0xc0fec078, - 0x65f9c030, - 0x7100b0d8, - 0xa0d8b108, - 0xb480b200, - 0xb013b003, - 0xb012b002, - 0x39468146, - 0x0446c0f4, - 0xb0d01616, - 0xc13cc004, - 0x9290c070, - 0xc0707811, - 0x06321012, - 0x6f2314c2, - 0x71009493, - 0x3921b100, - 0x161468c2, - 0x44c01c64, - 0x0bf17811, - 0x1012c070, - 0x14c20632, - 0x94936f23, - 0xb1007100, - 0x68d13921, - 0xc6d5c4f4, - 0x81afc066, - 0x81e064f7, - 0x40e32210, - 0xc07060dd, - 0xc00f1610, - 0x68e564f7, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7220a002, - 0x061f606a, - 0x00f9316f, - 0x04411091, - 0x87da97c1, - 0x1091061a, - 0x97c10451, - 0x061b87db, - 0x14ba311b, - 0x147a3919, - 0x94936fa3, - 0x7100929e, - 0x7000b100, - 0x8ae4b0f8, - 0x93044112, - 0x9400c1f0, - 0x941078a0, - 0x8177721b, - 0x39871076, - 0x97c70677, - 0x161887d8, - 0x9867d040, - 0x782065f9, - 0x78309430, - 0x78409440, - 0x78509450, - 0x655a9460, - 0x98107890, - 0xb007656d, - 0xb104b017, - 0xc205b0d4, - 0x65e1c004, - 0x1c5465f2, - 0x91904938, - 0x81511614, - 0x41331e01, - 0x1c411671, - 0xa0d74d33, - 0x79cf79be, - 0x95ff95ee, - 0x65f21204, - 0x1c541614, - 0x9190414b, - 0xa2056145, - 0x65f9c050, - 0xa0d4a0d7, - 0x72027206, - 0x72037204, - 0x73057204, - 0x73767306, - 0x606a7276, - 0x3181c061, - 0xcff3c002, - 0x16116e12, - 0x16116e12, - 0x6e13c7e0, - 0x6e121611, - 0x69631611, - 0x6e12cff0, - 0x69691611, - 0xb0067000, - 0xb004b016, - 0xb002b014, - 0x7870b012, - 0x90509030, - 0x90407880, - 0xb2059060, - 0xc090b072, - 0xb11793b0, - 0xb116b0e7, - 0x7100b0e6, - 0xb107b073, - 0xa0e7a0e7, - 0x227080b0, - 0xa0e645a2, - 0xb0d7a0e7, - 0x7100b88e, - 0xb107b116, - 0xb061b041, - 0x93b0c0f0, - 0x8964b88f, - 0x95543114, - 0x7100a044, - 0xb04db107, - 0xb074b06d, - 0x7100b201, - 0x7000b107, - 0xb889b0d7, - 0x31848944, - 0x97243d84, - 0x97307860, - 0x69abc050, - 0xc2018740, - 0x3d601410, - 0x31648304, - 0x18043d64, - 0x3520cff0, - 0x93040404, - 0x93b0c0b0, - 0xd060b069, - 0x65f99864, - 0xb1077100, - 0x617da0d7, - 0x120a1209, - 0x140965d7, - 0x1e17141a, - 0x65d741d4, - 0x140a1419, - 0x41d41e37, - 0x140965d7, - 0x65d7141a, - 0x140a1419, - 0x3c8a3c89, - 0x71007000, - 0x7100b107, - 0x87f0b107, - 0x39803180, - 0x39818801, - 0x65c27000, - 0x10ac109b, - 0x10bd65c2, - 0x14db318d, - 0x318d10cd, - 0x318a14dc, - 0x149b14a9, - 0x95eb149c, - 0x700095fc, - 0xb079a0d7, - 0xb1047100, - 0x8820b0d7, - 0x98507000, - 0x22008840, - 0xb83045fa, - 0x00007000 +MCE_PATCH_TYPE patchSl_longrangeMce[256] = +{ + 0x146f603e, + 0x333c3c33, + 0x3cc3cccc, + 0x2fcf0005, + 0xdb3e0f9d, + 0x00007f7f, + 0x00020001, + 0x00000003, + 0x000c0003, + 0x00cc000f, + 0x003c00c3, + 0xcccc0033, + 0x33cccc33, + 0x0f003333, + 0x00000f0f, + 0x00070003, + 0x0000001f, + 0x04000000, + 0x0000000f, + 0x00010387, + 0x004348c0, + 0x80048000, + 0x000006f0, + 0x0524091e, + 0x00050054, + 0x48200800, + 0x00000048, + 0x7f7f001f, + 0x3c33014c, + 0xcccc333c, + 0x00003cc3, + 0x72487220, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x60766074, + 0x610e608a, + 0x60746074, + 0x60756074, + 0x606b1220, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x6052b070, + 0x606a606a, + 0xc282c1e1, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0xc482687a, + 0x1820c810, + 0x12034087, + 0x16126e23, + 0xd0006884, + 0x606a9170, + 0x7310730f, + 0x91c0c000, + 0x8170c009, + 0x06703980, + 0x1e101610, + 0xc0b74499, + 0xc01ec008, + 0x1e2060aa, + 0xc0f7449f, + 0xc03ec018, + 0x1e4060aa, + 0xc13744a5, + 0xc07ec038, + 0x1e8060aa, + 0xc1774468, + 0xc0fec078, + 0x65f9c030, + 0x7100b0d8, + 0xa0d8b108, + 0xb480b200, + 0xb013b003, + 0xb012b002, + 0x39468146, + 0x0446c0f4, + 0xb0d01616, + 0xc13cc004, + 0x9290c070, + 0xc0707811, + 0x06321012, + 0x6f2314c2, + 0x71009493, + 0x3921b100, + 0x161468c2, + 0x44c01c64, + 0x0bf17811, + 0x1012c070, + 0x14c20632, + 0x94936f23, + 0xb1007100, + 0x68d13921, + 0xc6d5c4f4, + 0x81afc066, + 0x81e064f7, + 0x40e32210, + 0xc07060dd, + 0xc00f1610, + 0x68e564f7, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7220a002, + 0x061f606a, + 0x00f9316f, + 0x04411091, + 0x87da97c1, + 0x1091061a, + 0x97c10451, + 0x061b87db, + 0x14ba311b, + 0x147a3919, + 0x94936fa3, + 0x7100929e, + 0x7000b100, + 0x8ae4b0f8, + 0x93044112, + 0x9400c1f0, + 0x941078a0, + 0x8177721b, + 0x39871076, + 0x97c70677, + 0x161887d8, + 0x9867d040, + 0x782065f9, + 0x78309430, + 0x78409440, + 0x78509450, + 0x655a9460, + 0x98107890, + 0xb007656d, + 0xb104b017, + 0xc205b0d4, + 0x65e1c004, + 0x1c5465f2, + 0x91904938, + 0x81511614, + 0x41331e01, + 0x1c411671, + 0xa0d74d33, + 0x79cf79be, + 0x95ff95ee, + 0x65f21204, + 0x1c541614, + 0x9190414b, + 0xa2056145, + 0x65f9c050, + 0xa0d4a0d7, + 0x72027206, + 0x72037204, + 0x73057204, + 0x73767306, + 0x606a7276, + 0x3181c061, + 0xcff3c002, + 0x16116e12, + 0x16116e12, + 0x6e13c7e0, + 0x6e121611, + 0x69631611, + 0x6e12cff0, + 0x69691611, + 0xb0067000, + 0xb004b016, + 0xb002b014, + 0x7870b012, + 0x90509030, + 0x90407880, + 0xb2059060, + 0xc090b072, + 0xb11793b0, + 0xb116b0e7, + 0x7100b0e6, + 0xb107b073, + 0xa0e7a0e7, + 0x227080b0, + 0xa0e645a2, + 0xb0d7a0e7, + 0x7100b88e, + 0xb107b116, + 0xb061b041, + 0x93b0c0f0, + 0x8964b88f, + 0x95543114, + 0x7100a044, + 0xb04db107, + 0xb074b06d, + 0x7100b201, + 0x7000b107, + 0xb889b0d7, + 0x31848944, + 0x97243d84, + 0x97307860, + 0x69abc050, + 0xc2018740, + 0x3d601410, + 0x31648304, + 0x18043d64, + 0x3520cff0, + 0x93040404, + 0x93b0c0b0, + 0xd060b069, + 0x65f99864, + 0xb1077100, + 0x617da0d7, + 0x120a1209, + 0x140965d7, + 0x1e17141a, + 0x65d741d4, + 0x140a1419, + 0x41d41e37, + 0x140965d7, + 0x65d7141a, + 0x140a1419, + 0x3c8a3c89, + 0x71007000, + 0x7100b107, + 0x87f0b107, + 0x39803180, + 0x39818801, + 0x65c27000, + 0x10ac109b, + 0x10bd65c2, + 0x14db318d, + 0x318d10cd, + 0x318a14dc, + 0x149b14a9, + 0x95eb149c, + 0x700095fc, + 0xb079a0d7, + 0xb1047100, + 0x8820b0d7, + 0x98507000, + 0x22008840, + 0xb83045fa, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_mce_sl_longrange(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 256; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchSl_longrangeMce[i]; - } + uint32_t i; + + for (i = 0; i < 256; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchSl_longrangeMce[i]; + } + #else - const uint32_t *pS = patchSl_longrangeMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 32; + const uint32_t* pS = patchSl_longrangeMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 32; + + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wb_dsss.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wb_dsss.h index e534430a..aa4b009f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wb_dsss.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wb_dsss.h @@ -43,349 +43,354 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchWbDsssMce[279] = { - 0x2fcf6068, - 0xdb3e0f9d, - 0x7f7f0303, - 0x00010000, - 0x00030002, - 0x00030000, - 0x000f000c, - 0x00c300cc, - 0x0033003c, - 0xcc33cccc, - 0x333333cc, - 0x0f0f0f00, - 0x03050404, - 0x01070206, - 0x00090008, - 0x000b000a, - 0x0b000c00, - 0x09000a00, - 0x07010800, - 0x05030602, - 0x03030404, - 0x01010202, - 0x00000000, - 0x00000000, - 0x0b0b0c0c, - 0x09090a0a, - 0x07070808, - 0x05050606, - 0x05050404, - 0x07070606, - 0x09090808, - 0x0b0b0a0a, - 0x00000000, - 0x00000000, - 0x01010000, - 0x03030202, - 0x00070003, - 0x0000001f, - 0x04000000, - 0x0000000f, - 0x00010387, - 0x004348c9, - 0x80048000, - 0x000006f0, - 0x0524091e, - 0x00070054, - 0x280a0000, - 0x00000028, - 0x7f7f001f, - 0x3c33013e, - 0xcccc333c, - 0x00003cc3, - 0x72487220, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x60a0609e, - 0x613260b4, - 0x609e609e, - 0x609f609e, - 0x60951220, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x607cb070, - 0x60946094, - 0xc282c481, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0xc48268a4, - 0x1820c810, - 0x120340b1, - 0x16126e23, - 0x784068ae, - 0x60949ab0, - 0x7310730f, - 0x91c0c000, - 0x8ab0c009, - 0x06703980, - 0xc0f41610, - 0xc036c0b5, - 0x44c61e10, - 0xc008c067, - 0x60d7c01e, - 0x44cc1e20, - 0xc018c0a7, - 0x60d7c03e, - 0x44d21e40, - 0xc038c0e7, - 0x60d7c07e, - 0x44921e80, - 0xc078c127, - 0x1062c0fe, - 0xe0301612, - 0x98789862, - 0x8160657c, - 0x81409490, - 0xb0d89290, - 0xb1087100, - 0xb200a0d8, - 0xb003b480, - 0xb002b013, - 0xb0d0b012, - 0xb1007100, - 0x22f08140, - 0xc0f044eb, - 0x84509290, - 0x71009490, - 0x8460b100, - 0x71009490, - 0x8430b100, - 0x71009490, - 0x8440b100, - 0x81af9490, - 0x81e0651b, - 0x41072210, - 0x10606101, - 0xc00f1620, - 0x6909651b, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7220a002, - 0x061f6094, - 0x00f9306f, - 0x04411091, - 0x87da97c1, - 0x1091061a, - 0x97c10451, - 0x061b87db, - 0x14ba311b, - 0x147a3919, - 0x71006fa3, - 0x9493b100, - 0x7000929e, - 0xc1f0b0f8, - 0x78509400, - 0x721b9410, - 0x10768ab7, - 0x06773987, - 0x87d897c7, - 0x1e071618, - 0xc0064543, - 0x1e17614e, - 0xc0064547, - 0x1e37614e, - 0xc036454b, - 0x1e77614e, - 0xc3364492, - 0xb0066182, - 0xb004b016, - 0xb002b014, - 0x7810b012, - 0x90509030, - 0x90407820, - 0xb2059060, - 0xc0b0b072, - 0xb11693b0, - 0x7100b0e6, - 0xb107b073, - 0xa0e6b116, - 0xb88eb0d7, - 0xb1077100, - 0xb061b041, - 0x93b0c0f0, - 0x8964b88f, - 0x95543114, - 0x7100a044, - 0xb04db107, - 0xb074b06d, - 0x7100b201, - 0x7000b107, - 0x88409850, - 0x457d2200, - 0x7000b830, - 0x9867d040, - 0xe1d1657c, - 0x95a06f10, - 0xe1e1c100, - 0x6f13c622, - 0x16116e23, - 0x698b1612, - 0x41e41e07, - 0xb04f654f, - 0xc0f5b06f, - 0x65d4c004, - 0x85d0b5b0, - 0x1c543920, - 0x9190499e, - 0x81511614, - 0x41971e01, - 0x1c411621, - 0xa0d74d97, - 0x797f796e, - 0x95ff95ee, - 0xb5b01204, - 0x392085d0, - 0x1c541614, - 0x919041b3, - 0xa20561ab, - 0x657cc050, - 0xa0d4a0d7, - 0x72027206, - 0x72037204, - 0x73057204, - 0x73767306, - 0x60947276, - 0x12091070, - 0xb1077100, - 0x89b3b88d, - 0x3d833183, - 0x41cd2006, - 0x14390bf3, - 0x3c8969c4, - 0x3d391649, - 0x700006f9, - 0xc28a65c2, - 0x6fab149a, - 0x149ac38a, - 0xc18a6fac, - 0x149a65c2, - 0x14db6fad, - 0x95ec14dc, - 0x700095fb, - 0x657cc060, - 0xb04f654f, - 0xc0f5b06f, - 0x7100c004, - 0x7100b107, - 0x87fcb107, - 0x95ec880b, - 0xb5b095fb, - 0x392085d0, - 0x49f91c54, - 0x16149190, - 0x1e018151, - 0x162141eb, - 0x4deb1c41, - 0x796ea0d7, - 0x95ee797f, - 0x120495ff, - 0x85d0b5b0, - 0x16143920, - 0x420e1c54, - 0x62069190, - 0xc070a205, - 0xa0d7657c, - 0x7206a0d4, - 0x72047202, - 0x72047203, - 0x73067305, - 0x72767376, - 0x00016094, - 0x00080018, - 0x001a0003, - 0x002c000a, - 0x003e0011, - 0x00080003, - 0x001a0018, - 0x002c0011, - 0x003e000a +MCE_PATCH_TYPE patchWbDsssMce[279] = +{ + 0x2fcf6068, + 0xdb3e0f9d, + 0x7f7f0303, + 0x00010000, + 0x00030002, + 0x00030000, + 0x000f000c, + 0x00c300cc, + 0x0033003c, + 0xcc33cccc, + 0x333333cc, + 0x0f0f0f00, + 0x03050404, + 0x01070206, + 0x00090008, + 0x000b000a, + 0x0b000c00, + 0x09000a00, + 0x07010800, + 0x05030602, + 0x03030404, + 0x01010202, + 0x00000000, + 0x00000000, + 0x0b0b0c0c, + 0x09090a0a, + 0x07070808, + 0x05050606, + 0x05050404, + 0x07070606, + 0x09090808, + 0x0b0b0a0a, + 0x00000000, + 0x00000000, + 0x01010000, + 0x03030202, + 0x00070003, + 0x0000001f, + 0x04000000, + 0x0000000f, + 0x00010387, + 0x004348c9, + 0x80048000, + 0x000006f0, + 0x0524091e, + 0x00070054, + 0x280a0000, + 0x00000028, + 0x7f7f001f, + 0x3c33013e, + 0xcccc333c, + 0x00003cc3, + 0x72487220, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x60a0609e, + 0x613260b4, + 0x609e609e, + 0x609f609e, + 0x60951220, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x607cb070, + 0x60946094, + 0xc282c481, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0xc48268a4, + 0x1820c810, + 0x120340b1, + 0x16126e23, + 0x784068ae, + 0x60949ab0, + 0x7310730f, + 0x91c0c000, + 0x8ab0c009, + 0x06703980, + 0xc0f41610, + 0xc036c0b5, + 0x44c61e10, + 0xc008c067, + 0x60d7c01e, + 0x44cc1e20, + 0xc018c0a7, + 0x60d7c03e, + 0x44d21e40, + 0xc038c0e7, + 0x60d7c07e, + 0x44921e80, + 0xc078c127, + 0x1062c0fe, + 0xe0301612, + 0x98789862, + 0x8160657c, + 0x81409490, + 0xb0d89290, + 0xb1087100, + 0xb200a0d8, + 0xb003b480, + 0xb002b013, + 0xb0d0b012, + 0xb1007100, + 0x22f08140, + 0xc0f044eb, + 0x84509290, + 0x71009490, + 0x8460b100, + 0x71009490, + 0x8430b100, + 0x71009490, + 0x8440b100, + 0x81af9490, + 0x81e0651b, + 0x41072210, + 0x10606101, + 0xc00f1620, + 0x6909651b, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7220a002, + 0x061f6094, + 0x00f9306f, + 0x04411091, + 0x87da97c1, + 0x1091061a, + 0x97c10451, + 0x061b87db, + 0x14ba311b, + 0x147a3919, + 0x71006fa3, + 0x9493b100, + 0x7000929e, + 0xc1f0b0f8, + 0x78509400, + 0x721b9410, + 0x10768ab7, + 0x06773987, + 0x87d897c7, + 0x1e071618, + 0xc0064543, + 0x1e17614e, + 0xc0064547, + 0x1e37614e, + 0xc036454b, + 0x1e77614e, + 0xc3364492, + 0xb0066182, + 0xb004b016, + 0xb002b014, + 0x7810b012, + 0x90509030, + 0x90407820, + 0xb2059060, + 0xc0b0b072, + 0xb11693b0, + 0x7100b0e6, + 0xb107b073, + 0xa0e6b116, + 0xb88eb0d7, + 0xb1077100, + 0xb061b041, + 0x93b0c0f0, + 0x8964b88f, + 0x95543114, + 0x7100a044, + 0xb04db107, + 0xb074b06d, + 0x7100b201, + 0x7000b107, + 0x88409850, + 0x457d2200, + 0x7000b830, + 0x9867d040, + 0xe1d1657c, + 0x95a06f10, + 0xe1e1c100, + 0x6f13c622, + 0x16116e23, + 0x698b1612, + 0x41e41e07, + 0xb04f654f, + 0xc0f5b06f, + 0x65d4c004, + 0x85d0b5b0, + 0x1c543920, + 0x9190499e, + 0x81511614, + 0x41971e01, + 0x1c411621, + 0xa0d74d97, + 0x797f796e, + 0x95ff95ee, + 0xb5b01204, + 0x392085d0, + 0x1c541614, + 0x919041b3, + 0xa20561ab, + 0x657cc050, + 0xa0d4a0d7, + 0x72027206, + 0x72037204, + 0x73057204, + 0x73767306, + 0x60947276, + 0x12091070, + 0xb1077100, + 0x89b3b88d, + 0x3d833183, + 0x41cd2006, + 0x14390bf3, + 0x3c8969c4, + 0x3d391649, + 0x700006f9, + 0xc28a65c2, + 0x6fab149a, + 0x149ac38a, + 0xc18a6fac, + 0x149a65c2, + 0x14db6fad, + 0x95ec14dc, + 0x700095fb, + 0x657cc060, + 0xb04f654f, + 0xc0f5b06f, + 0x7100c004, + 0x7100b107, + 0x87fcb107, + 0x95ec880b, + 0xb5b095fb, + 0x392085d0, + 0x49f91c54, + 0x16149190, + 0x1e018151, + 0x162141eb, + 0x4deb1c41, + 0x796ea0d7, + 0x95ee797f, + 0x120495ff, + 0x85d0b5b0, + 0x16143920, + 0x420e1c54, + 0x62069190, + 0xc070a205, + 0xa0d7657c, + 0x7206a0d4, + 0x72047202, + 0x72047203, + 0x73067305, + 0x72767376, + 0x00016094, + 0x00080018, + 0x001a0003, + 0x002c000a, + 0x003e0011, + 0x00080003, + 0x001a0018, + 0x002c0011, + 0x003e000a }; PATCH_FUN_SPEC void rf_patch_mce_wb_dsss(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 279; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchWbDsssMce[i]; - } + uint32_t i; + + for (i = 0; i < 279; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchWbDsssMce[i]; + } + #else - const uint32_t *pS = patchWbDsssMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 34; + const uint32_t* pS = patchWbDsssMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 34; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_ctmode.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_ctmode.h index c9349702..9e442d1d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_ctmode.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_ctmode.h @@ -43,567 +43,573 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchWmbusTmodeMce[512] = { - 0x2fcf60b3, - 0xff803f9d, - 0x02b30666, - 0x0fff00ff, - 0x5555003f, - 0x05140510, - 0x0004002a, - 0x00310018, - 0x00610047, - 0x0092007a, - 0x00ba00a8, - 0x00d000c7, - 0x00d600d4, - 0x001f0045, - 0x00e800f8, - 0x00c000d0, - 0x008800a8, - 0x00600078, - 0x00440057, - 0x00180031, - 0x00250004, - 0x05b205a2, - 0x05d305c3, - 0x05f405e3, - 0x06140604, - 0x06350625, - 0x06560646, - 0x06770666, - 0x06980687, - 0x06b806a8, - 0x06c906b8, - 0x06e906d9, - 0x070a06fa, - 0x0016071b, - 0x001c002c, - 0x000e0034, - 0x001a0026, - 0x000d0032, - 0x00190025, - 0x000b0031, - 0x00130023, - 0x00060029, - 0x0006000e, - 0x0002000e, - 0x00040008, - 0x0006000e, - 0x0006000a, - 0x0002000c, - 0x00040008, - 0x0006000c, - 0x0006000e, - 0x0002000e, - 0x0000000e, - 0x0006000e, - 0x0006000a, - 0x0002000e, - 0x0006000a, - 0x0007000e, - 0x0007000f, - 0x0003000d, - 0x00050009, - 0x0001000d, - 0x0007000f, - 0x0001000f, - 0x0005000f, - 0x0007000f, - 0x0007000b, - 0x0003000b, - 0x0007000b, - 0x0007000b, - 0x0007000f, - 0x0003000f, - 0x0007000f, - 0x0003000f, - 0x3d1f0007, - 0x00000000, - 0x000f0400, - 0x03840000, - 0x00f4000b, - 0x80000043, - 0x06702801, - 0x091e0000, - 0x00040514, - 0x02000000, - 0x00613e10, - 0x842f0000, - 0x007f177f, - 0xaaaaaaaa, - 0x2abcaaaa, - 0x72200000, - 0xa32d7248, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72767376, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720c9001, - 0x720e720d, - 0x7100b0c0, - 0xa0c0b0f0, - 0x81327218, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x60ea60e8, - 0x61a66152, - 0x60e860e8, - 0x60e960e8, - 0x72201210, - 0x7310730f, - 0x81817311, - 0x91800010, - 0x60c8b070, - 0x60de60de, - 0xc282c931, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0x72ad68ee, - 0xc5a0c482, - 0x40fc1820, - 0x6e231203, - 0x68f91612, - 0x816060de, - 0x81409490, - 0x2a703980, - 0x16111001, - 0x84448432, - 0xc0f5c0f3, - 0x1c01c200, - 0xc1004121, - 0x41171c10, - 0x10134d19, - 0x18301803, - 0x1a101a13, - 0x69143912, - 0x13f36121, - 0x13f36121, - 0xc1001015, - 0x1a151850, - 0x39141a10, - 0xb0d8691f, - 0xb1087100, - 0xb200a0d8, - 0xb003b480, - 0xb002b013, - 0x7229b012, - 0x7100b0d0, - 0x8140b100, - 0x71009290, - 0x8140b100, - 0x453122f0, - 0x1c0313f0, - 0x9293413d, - 0x71009492, - 0x9295b100, - 0x71009494, - 0xb0d0b100, - 0x7000a480, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7000a002, - 0x7310730f, - 0x39818ad1, - 0x06113961, - 0x9861d030, - 0xc10067f9, - 0x64fd91c0, - 0x22e08ad0, - 0xb4834587, - 0xb0c3b0f3, - 0xc030b484, - 0xb10191c0, - 0x8ad5b0d1, - 0x416d22d5, - 0x809012f5, - 0x45822230, - 0x085081a0, - 0x1401c431, - 0xc0636f12, - 0x417a2252, - 0x617b1211, - 0x92c113f1, - 0x7100b101, - 0x1a133112, - 0x616d4576, - 0xb101a0d1, - 0x6544a0c3, - 0xb0d060de, - 0xc070b480, - 0x78c09290, - 0xb1009490, - 0xb1007100, - 0xa480a0d0, - 0xb0f3b483, - 0x7100b0c3, - 0x6544a0c3, - 0x861160de, - 0x9861d040, - 0x737667f9, - 0x72487276, - 0x72027206, - 0x73057204, - 0x60de7306, - 0x91b01230, - 0x939078b0, - 0xb0f8b32d, - 0xb016b006, - 0xb014b004, - 0xb012b002, - 0x90307810, - 0x78209050, - 0x90609040, - 0x31808140, - 0x39403980, - 0xc0f38141, - 0xc0140431, - 0x82e01441, - 0x04107831, - 0x1410c7c1, - 0x727892e0, - 0x72557276, - 0x93008ae0, - 0xc030a311, - 0xb06993b0, - 0xb0f6b064, - 0xb101a0c6, - 0xb0f1a0d1, - 0xb0f2a0c1, - 0xb486b0c2, - 0x12008441, - 0x08011a10, - 0x1012c0f0, - 0x311e0612, - 0x3911142e, - 0x789c69df, - 0xc00a67ee, - 0x1a1fc00f, - 0x1a1bc00b, - 0x9780c1b0, - 0x9760c020, - 0x789d7878, - 0xc024048d, - 0xc006c005, - 0xb0f2b205, - 0xb88d7100, - 0x46311e2a, - 0x39708af0, - 0x140b311b, - 0x1ccb8210, - 0x22204605, - 0x22204640, - 0xb7604209, - 0xa760620b, - 0x8b10b0f1, - 0x08018b21, - 0x42142271, - 0x31163315, - 0x61f7c00a, - 0x42101e3a, - 0x61f7161a, - 0x22208210, - 0xb760421d, - 0xa760621f, - 0x8b10b0f1, - 0x08018b21, - 0x422d2271, - 0x46291e0a, - 0x33163115, - 0x3115622b, - 0xc00a3116, - 0x1e3a61f7, - 0x161a422b, - 0x809061f7, - 0x42182210, - 0x22c08ad0, - 0x10b14640, - 0x08d10481, - 0x87d197c1, - 0x4e1f1c41, - 0x67f9c050, - 0x72767278, - 0xb0f1a0c1, - 0x93b0c070, - 0x3135b201, - 0x87da97c5, - 0x97c63136, - 0x189a87d9, - 0xb88995fa, - 0x31808940, - 0x16203d80, - 0x8ae83d20, - 0xc1501808, - 0x1e4185f1, - 0xc0614a5d, - 0xc00b1810, - 0x673cc00c, - 0x79ba79a9, - 0xc10010a8, - 0x85f11808, - 0x4e711e11, - 0x467a1e01, - 0x4e7a18b9, - 0x10c510b5, - 0x4a7a1ca5, - 0x1a896283, - 0x18b9108a, - 0x10b54e93, - 0x1ca518c5, - 0x62834a93, - 0x18c07a90, - 0x10c54e93, - 0xc00018b5, - 0x4a931c05, - 0xc0dc628b, - 0x671fc0d0, - 0x1ac510d5, - 0x185d120d, - 0x10cb6295, - 0xc0d0c1cc, - 0x10d5671f, - 0x185d120d, - 0xc00d6295, - 0xa4866295, - 0x67d0a5e0, - 0xc00ac00b, - 0xc007c006, - 0x8ad0c009, - 0x46a122d0, - 0x78687889, - 0x789d048e, - 0xc010048d, - 0xb7649780, - 0x9760c2b0, - 0xb0f1b0f6, - 0xb0f2b069, - 0xb88d7100, - 0x46ba1e2a, - 0x39708af0, - 0x140b311b, - 0x1ceb048b, - 0x62ca42de, - 0x22608090, - 0x221046c0, - 0x62c646d5, - 0x9760c030, - 0xb0f1b0f6, - 0x9780c1c0, - 0x46ca1cdb, - 0xb760a760, - 0x8b218b10, - 0x22710801, - 0x120a42d1, - 0x1e3a62d4, - 0x161a42cf, - 0x722062ad, - 0xb0f2c060, - 0x6ad77100, - 0x16118601, - 0x61c79601, - 0x7276b889, - 0x78c4161a, - 0xc00ec00b, - 0xb113b074, - 0x7100b0f2, - 0x1e2ab88d, - 0x8af046f7, - 0x311b3970, - 0x161e140b, - 0x470c1e6e, - 0x43581c4b, - 0xc00ec016, - 0x1066630c, - 0xc5304301, - 0x14b0089b, - 0x91916f01, - 0xc017c006, - 0x1077630c, - 0x164f430c, - 0xc007c00b, - 0x1e008150, - 0x1cf0430c, - 0x63174f0c, - 0x8b218b10, - 0x22710801, - 0xc00a4313, - 0x1e3a62e6, - 0x161a4311, - 0xa20562e6, - 0xb0f2a0c2, - 0xb0f1a0c1, - 0x67eeb113, - 0x1a106199, - 0xc0c2c001, - 0x161c6fcd, - 0x673410b3, - 0x1a101051, - 0x161c6fcd, - 0x1c156734, - 0x6b284b2f, - 0x10516332, - 0x6b281002, - 0x7000102d, - 0x4b391cd3, - 0x18d51035, - 0x10d57000, - 0x70001835, - 0x7100b0f2, - 0x8911b88e, - 0x4f441012, - 0x18211201, - 0x1c1b3131, - 0x101b4f48, - 0x10128921, - 0x12014f4d, - 0x31311821, - 0x4f511c1c, - 0xc172101c, - 0x4f561c20, - 0xb3119308, - 0x70006b3c, - 0x7276b113, - 0x9780c070, - 0x78a09760, - 0xb0f29390, - 0x80b07100, - 0x476a2230, - 0x22108090, - 0x635f4768, - 0x67f9c060, - 0x7276b073, - 0x9780c040, - 0x9760c070, - 0x8a8367ee, - 0xc0018a94, - 0x1c1f1a11, - 0xc040437a, - 0x4b7b1cf0, - 0x8940b011, - 0x3d803180, - 0x8a809550, - 0xa4888a91, - 0xc022a487, - 0x1c211801, - 0x14124f8f, - 0x63904b8d, - 0x43901c01, - 0xb4874f8f, - 0xb4886390, - 0xb041a04e, - 0xb5e0b061, - 0x80b0b113, - 0x47942230, - 0xb0f1b0c1, - 0xb0f2a0c2, - 0x7100b113, - 0xb06eb04e, - 0xc090a760, - 0x97803120, - 0x91b01300, - 0xb0f1b760, - 0x72767100, - 0xb0c6b0f6, - 0xa0c1b0f1, - 0x1a101200, - 0xc3809780, - 0xc2809760, - 0x80909760, - 0x44c82200, - 0x1e048154, - 0x978443b5, - 0x8790b0f6, - 0x1c018781, - 0x18014bcd, - 0x4bcb1ef1, - 0x1af18781, - 0x71009781, - 0x16f1b0f6, - 0xa2059781, - 0xb0f67100, - 0x6199a0c6, - 0xc2a1961d, - 0x141d16c1, - 0x101d6fd1, - 0x82e03151, - 0x14013980, - 0x83329721, - 0x06711021, - 0x06323952, - 0x16111421, - 0x43e5c1b0, - 0x97303010, - 0x6be71270, - 0x874092dd, - 0x875094a0, - 0x700094b0, - 0x1e0087e0, - 0x84a047f3, - 0x94a097e0, - 0x92d07840, - 0x94b07850, - 0x98507000, - 0x22008840, - 0xb83047fa, - 0x00007000 +MCE_PATCH_TYPE patchWmbusTmodeMce[512] = +{ + 0x2fcf60b3, + 0xff803f9d, + 0x02b30666, + 0x0fff00ff, + 0x5555003f, + 0x05140510, + 0x0004002a, + 0x00310018, + 0x00610047, + 0x0092007a, + 0x00ba00a8, + 0x00d000c7, + 0x00d600d4, + 0x001f0045, + 0x00e800f8, + 0x00c000d0, + 0x008800a8, + 0x00600078, + 0x00440057, + 0x00180031, + 0x00250004, + 0x05b205a2, + 0x05d305c3, + 0x05f405e3, + 0x06140604, + 0x06350625, + 0x06560646, + 0x06770666, + 0x06980687, + 0x06b806a8, + 0x06c906b8, + 0x06e906d9, + 0x070a06fa, + 0x0016071b, + 0x001c002c, + 0x000e0034, + 0x001a0026, + 0x000d0032, + 0x00190025, + 0x000b0031, + 0x00130023, + 0x00060029, + 0x0006000e, + 0x0002000e, + 0x00040008, + 0x0006000e, + 0x0006000a, + 0x0002000c, + 0x00040008, + 0x0006000c, + 0x0006000e, + 0x0002000e, + 0x0000000e, + 0x0006000e, + 0x0006000a, + 0x0002000e, + 0x0006000a, + 0x0007000e, + 0x0007000f, + 0x0003000d, + 0x00050009, + 0x0001000d, + 0x0007000f, + 0x0001000f, + 0x0005000f, + 0x0007000f, + 0x0007000b, + 0x0003000b, + 0x0007000b, + 0x0007000b, + 0x0007000f, + 0x0003000f, + 0x0007000f, + 0x0003000f, + 0x3d1f0007, + 0x00000000, + 0x000f0400, + 0x03840000, + 0x00f4000b, + 0x80000043, + 0x06702801, + 0x091e0000, + 0x00040514, + 0x02000000, + 0x00613e10, + 0x842f0000, + 0x007f177f, + 0xaaaaaaaa, + 0x2abcaaaa, + 0x72200000, + 0xa32d7248, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72767376, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720c9001, + 0x720e720d, + 0x7100b0c0, + 0xa0c0b0f0, + 0x81327218, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x60ea60e8, + 0x61a66152, + 0x60e860e8, + 0x60e960e8, + 0x72201210, + 0x7310730f, + 0x81817311, + 0x91800010, + 0x60c8b070, + 0x60de60de, + 0xc282c931, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0x72ad68ee, + 0xc5a0c482, + 0x40fc1820, + 0x6e231203, + 0x68f91612, + 0x816060de, + 0x81409490, + 0x2a703980, + 0x16111001, + 0x84448432, + 0xc0f5c0f3, + 0x1c01c200, + 0xc1004121, + 0x41171c10, + 0x10134d19, + 0x18301803, + 0x1a101a13, + 0x69143912, + 0x13f36121, + 0x13f36121, + 0xc1001015, + 0x1a151850, + 0x39141a10, + 0xb0d8691f, + 0xb1087100, + 0xb200a0d8, + 0xb003b480, + 0xb002b013, + 0x7229b012, + 0x7100b0d0, + 0x8140b100, + 0x71009290, + 0x8140b100, + 0x453122f0, + 0x1c0313f0, + 0x9293413d, + 0x71009492, + 0x9295b100, + 0x71009494, + 0xb0d0b100, + 0x7000a480, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7000a002, + 0x7310730f, + 0x39818ad1, + 0x06113961, + 0x9861d030, + 0xc10067f9, + 0x64fd91c0, + 0x22e08ad0, + 0xb4834587, + 0xb0c3b0f3, + 0xc030b484, + 0xb10191c0, + 0x8ad5b0d1, + 0x416d22d5, + 0x809012f5, + 0x45822230, + 0x085081a0, + 0x1401c431, + 0xc0636f12, + 0x417a2252, + 0x617b1211, + 0x92c113f1, + 0x7100b101, + 0x1a133112, + 0x616d4576, + 0xb101a0d1, + 0x6544a0c3, + 0xb0d060de, + 0xc070b480, + 0x78c09290, + 0xb1009490, + 0xb1007100, + 0xa480a0d0, + 0xb0f3b483, + 0x7100b0c3, + 0x6544a0c3, + 0x861160de, + 0x9861d040, + 0x737667f9, + 0x72487276, + 0x72027206, + 0x73057204, + 0x60de7306, + 0x91b01230, + 0x939078b0, + 0xb0f8b32d, + 0xb016b006, + 0xb014b004, + 0xb012b002, + 0x90307810, + 0x78209050, + 0x90609040, + 0x31808140, + 0x39403980, + 0xc0f38141, + 0xc0140431, + 0x82e01441, + 0x04107831, + 0x1410c7c1, + 0x727892e0, + 0x72557276, + 0x93008ae0, + 0xc030a311, + 0xb06993b0, + 0xb0f6b064, + 0xb101a0c6, + 0xb0f1a0d1, + 0xb0f2a0c1, + 0xb486b0c2, + 0x12008441, + 0x08011a10, + 0x1012c0f0, + 0x311e0612, + 0x3911142e, + 0x789c69df, + 0xc00a67ee, + 0x1a1fc00f, + 0x1a1bc00b, + 0x9780c1b0, + 0x9760c020, + 0x789d7878, + 0xc024048d, + 0xc006c005, + 0xb0f2b205, + 0xb88d7100, + 0x46311e2a, + 0x39708af0, + 0x140b311b, + 0x1ccb8210, + 0x22204605, + 0x22204640, + 0xb7604209, + 0xa760620b, + 0x8b10b0f1, + 0x08018b21, + 0x42142271, + 0x31163315, + 0x61f7c00a, + 0x42101e3a, + 0x61f7161a, + 0x22208210, + 0xb760421d, + 0xa760621f, + 0x8b10b0f1, + 0x08018b21, + 0x422d2271, + 0x46291e0a, + 0x33163115, + 0x3115622b, + 0xc00a3116, + 0x1e3a61f7, + 0x161a422b, + 0x809061f7, + 0x42182210, + 0x22c08ad0, + 0x10b14640, + 0x08d10481, + 0x87d197c1, + 0x4e1f1c41, + 0x67f9c050, + 0x72767278, + 0xb0f1a0c1, + 0x93b0c070, + 0x3135b201, + 0x87da97c5, + 0x97c63136, + 0x189a87d9, + 0xb88995fa, + 0x31808940, + 0x16203d80, + 0x8ae83d20, + 0xc1501808, + 0x1e4185f1, + 0xc0614a5d, + 0xc00b1810, + 0x673cc00c, + 0x79ba79a9, + 0xc10010a8, + 0x85f11808, + 0x4e711e11, + 0x467a1e01, + 0x4e7a18b9, + 0x10c510b5, + 0x4a7a1ca5, + 0x1a896283, + 0x18b9108a, + 0x10b54e93, + 0x1ca518c5, + 0x62834a93, + 0x18c07a90, + 0x10c54e93, + 0xc00018b5, + 0x4a931c05, + 0xc0dc628b, + 0x671fc0d0, + 0x1ac510d5, + 0x185d120d, + 0x10cb6295, + 0xc0d0c1cc, + 0x10d5671f, + 0x185d120d, + 0xc00d6295, + 0xa4866295, + 0x67d0a5e0, + 0xc00ac00b, + 0xc007c006, + 0x8ad0c009, + 0x46a122d0, + 0x78687889, + 0x789d048e, + 0xc010048d, + 0xb7649780, + 0x9760c2b0, + 0xb0f1b0f6, + 0xb0f2b069, + 0xb88d7100, + 0x46ba1e2a, + 0x39708af0, + 0x140b311b, + 0x1ceb048b, + 0x62ca42de, + 0x22608090, + 0x221046c0, + 0x62c646d5, + 0x9760c030, + 0xb0f1b0f6, + 0x9780c1c0, + 0x46ca1cdb, + 0xb760a760, + 0x8b218b10, + 0x22710801, + 0x120a42d1, + 0x1e3a62d4, + 0x161a42cf, + 0x722062ad, + 0xb0f2c060, + 0x6ad77100, + 0x16118601, + 0x61c79601, + 0x7276b889, + 0x78c4161a, + 0xc00ec00b, + 0xb113b074, + 0x7100b0f2, + 0x1e2ab88d, + 0x8af046f7, + 0x311b3970, + 0x161e140b, + 0x470c1e6e, + 0x43581c4b, + 0xc00ec016, + 0x1066630c, + 0xc5304301, + 0x14b0089b, + 0x91916f01, + 0xc017c006, + 0x1077630c, + 0x164f430c, + 0xc007c00b, + 0x1e008150, + 0x1cf0430c, + 0x63174f0c, + 0x8b218b10, + 0x22710801, + 0xc00a4313, + 0x1e3a62e6, + 0x161a4311, + 0xa20562e6, + 0xb0f2a0c2, + 0xb0f1a0c1, + 0x67eeb113, + 0x1a106199, + 0xc0c2c001, + 0x161c6fcd, + 0x673410b3, + 0x1a101051, + 0x161c6fcd, + 0x1c156734, + 0x6b284b2f, + 0x10516332, + 0x6b281002, + 0x7000102d, + 0x4b391cd3, + 0x18d51035, + 0x10d57000, + 0x70001835, + 0x7100b0f2, + 0x8911b88e, + 0x4f441012, + 0x18211201, + 0x1c1b3131, + 0x101b4f48, + 0x10128921, + 0x12014f4d, + 0x31311821, + 0x4f511c1c, + 0xc172101c, + 0x4f561c20, + 0xb3119308, + 0x70006b3c, + 0x7276b113, + 0x9780c070, + 0x78a09760, + 0xb0f29390, + 0x80b07100, + 0x476a2230, + 0x22108090, + 0x635f4768, + 0x67f9c060, + 0x7276b073, + 0x9780c040, + 0x9760c070, + 0x8a8367ee, + 0xc0018a94, + 0x1c1f1a11, + 0xc040437a, + 0x4b7b1cf0, + 0x8940b011, + 0x3d803180, + 0x8a809550, + 0xa4888a91, + 0xc022a487, + 0x1c211801, + 0x14124f8f, + 0x63904b8d, + 0x43901c01, + 0xb4874f8f, + 0xb4886390, + 0xb041a04e, + 0xb5e0b061, + 0x80b0b113, + 0x47942230, + 0xb0f1b0c1, + 0xb0f2a0c2, + 0x7100b113, + 0xb06eb04e, + 0xc090a760, + 0x97803120, + 0x91b01300, + 0xb0f1b760, + 0x72767100, + 0xb0c6b0f6, + 0xa0c1b0f1, + 0x1a101200, + 0xc3809780, + 0xc2809760, + 0x80909760, + 0x44c82200, + 0x1e048154, + 0x978443b5, + 0x8790b0f6, + 0x1c018781, + 0x18014bcd, + 0x4bcb1ef1, + 0x1af18781, + 0x71009781, + 0x16f1b0f6, + 0xa2059781, + 0xb0f67100, + 0x6199a0c6, + 0xc2a1961d, + 0x141d16c1, + 0x101d6fd1, + 0x82e03151, + 0x14013980, + 0x83329721, + 0x06711021, + 0x06323952, + 0x16111421, + 0x43e5c1b0, + 0x97303010, + 0x6be71270, + 0x874092dd, + 0x875094a0, + 0x700094b0, + 0x1e0087e0, + 0x84a047f3, + 0x94a097e0, + 0x92d07840, + 0x94b07850, + 0x98507000, + 0x22008840, + 0xb83047fa, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_mce_wmbus_ctmode(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 512; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchWmbusTmodeMce[i]; - } + uint32_t i; + + for (i = 0; i < 512; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchWmbusTmodeMce[i]; + } + #else - const uint32_t *pS = patchWmbusTmodeMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 64; + const uint32_t* pS = patchWmbusTmodeMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 64; + + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_smode.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_smode.h index 2bf4aa31..cd50c0c3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_smode.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_mce_wmbus_smode.h @@ -43,567 +43,573 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchWmbusSmodeMce[512] = { - 0x2fcf602e, - 0x030c3f9d, - 0x070c680a, - 0xff00003f, - 0x00000014, - 0x00000000, - 0x00000000, - 0x00070003, - 0x00003d1f, - 0x04000000, - 0x0000000f, - 0x000b0387, - 0x004340f4, - 0x80828000, - 0x00000670, - 0x0510091e, - 0x00050004, - 0x3e100200, - 0x00000061, - 0x3030002f, - 0x0000027f, - 0x00000000, - 0x0000aa00, - 0x72487220, - 0x7303a32d, - 0x72037305, - 0x73067304, - 0x73767204, - 0xc7c07276, - 0x00018001, - 0x90109001, - 0x90010801, - 0x720d720c, - 0xb0c0720e, - 0xb0f07100, - 0x7218a0c0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60636c01, - 0x60d76066, - 0x606362f6, - 0x60636063, - 0x12106064, - 0x730f7220, - 0x73117310, - 0x00108181, - 0xb0709180, - 0x60596043, - 0x605967ef, - 0x6791c030, - 0xc282c0e1, - 0x1820c470, - 0x6e236f13, - 0x16121611, - 0x7830686c, - 0x78409ab0, - 0x78509ac0, - 0x83009ad0, - 0xc4829ae0, - 0x1820c5a0, - 0x12034081, - 0x16126e23, - 0x6059687e, - 0x94908160, - 0x39808140, - 0x10012a70, - 0x84321611, - 0xc0f38444, - 0xc200c0f5, - 0x40a61c01, - 0x1c10c100, - 0x4c9e409c, - 0x18031013, - 0x1a131830, - 0x39121a10, - 0x60a66899, - 0x60a613f3, - 0x101513f3, - 0x1850c100, - 0x1a101a15, - 0x68a43914, - 0x7100b0d8, - 0xa0d8b108, - 0xb480b200, - 0xb013b003, - 0xb012b002, - 0xb0d07229, - 0xb1007100, - 0x92908140, - 0xb1007100, - 0x22f08140, - 0x13f044b6, - 0x40c21c03, - 0x94929293, - 0xb1007100, - 0x94949295, - 0xb1007100, - 0xa480b0d0, - 0xa0d17000, - 0x9760c030, - 0x9780c040, - 0xb0c1b0f1, - 0xb0f17100, - 0x7276a0c1, - 0xa002a003, - 0x730f7000, - 0xc0407310, - 0xc1006791, - 0x648291c0, - 0xb0f3b483, - 0xb484b0c3, - 0x91c0c000, - 0xb0d1b101, - 0x39858ad5, - 0x06153955, - 0x22308090, - 0x81a044ff, - 0x06100850, - 0x13f040f4, - 0x60f61211, - 0x13f11210, - 0x101b100a, - 0xb10192c0, - 0x92c17100, - 0x7100b101, - 0xa0d160ea, - 0xa0c3b101, - 0x605964c9, - 0xb016b006, - 0xb014b004, - 0xb012b002, - 0x78628400, - 0x81430420, - 0x2a733983, - 0xc1f29473, - 0x31621832, - 0x31511021, - 0x00200012, - 0x10309400, - 0x39301610, - 0x411f2210, - 0x31501220, - 0x31801003, - 0x93501630, - 0x12041202, - 0x41312273, - 0x97c08430, - 0x1a8287d2, - 0x97c08450, - 0x1a8487d4, - 0x22636133, - 0x8440413e, - 0x87d097c0, - 0x14021a80, - 0x97c08460, - 0x1a8087d0, - 0x614a1404, - 0x78718440, - 0x97c00410, - 0x1a4287d2, - 0x78718460, - 0x97c00410, - 0x1a4487d4, - 0x31543152, - 0x06333963, - 0x38321613, - 0x31823834, - 0x31843982, - 0x95720042, - 0x90307810, - 0x78209050, - 0x90609040, - 0x8ae2b205, - 0x93028303, - 0x9862e050, - 0x67919873, - 0xc00bc00c, - 0x31808140, - 0x39403980, - 0xc0f38141, - 0xc0140431, - 0xc0021441, - 0x69701412, - 0x847d3122, - 0x140dc010, - 0x142d312d, - 0x318e8ace, - 0x397e311e, - 0x31498ac9, - 0x39493979, - 0x109a3129, - 0xa04eb072, - 0xb011b06e, - 0x978ab06c, - 0xb7647276, - 0xc662a764, - 0xc04f9762, - 0x6677c028, - 0x22f18ab1, - 0x8ad14597, - 0x459722f1, - 0x710061f0, - 0xb760b073, - 0x220780b7, - 0xa76045ce, - 0x22f18ab1, - 0x223741a8, - 0xb11341a8, - 0x223080b0, - 0x61b645a3, - 0x41bb22e1, - 0x22508090, - 0xb0f541bb, - 0x22208210, - 0x97894197, - 0xa764b764, - 0x6197b0f6, - 0xb764978d, - 0xb0f6a764, - 0x8ad06197, - 0x41c722f0, - 0x41c72237, - 0xb113b075, - 0x223080b0, - 0xb08745c1, - 0x22d16197, - 0x809042ba, - 0x42ba2220, - 0x6197663a, - 0xa0e0978f, - 0xa0c2a0e3, - 0xb0f1a0c5, - 0xa0c6b0c1, - 0x97887100, - 0xb88fb0f1, - 0x85708961, - 0x95511801, - 0x8a718a60, - 0xa487a488, - 0x22e08ad0, - 0x821041e8, - 0x45822220, - 0xb04e7100, - 0xb074b06e, - 0x8a73b201, - 0x70008552, - 0xb0737100, - 0x80b7b760, - 0x460f2207, - 0x46252237, - 0x8ab1a760, - 0x420822e1, - 0x22508090, - 0xb0f54208, - 0x22208210, - 0x978d41f0, - 0xa764b764, - 0x61f0b0f6, - 0x42ba22d1, - 0x22208090, - 0x663a42ba, - 0x978f61f0, - 0xa0e3a0e0, - 0xa0c5a0c2, - 0xb0c1b0f1, - 0x7100a0c6, - 0xb0f19788, - 0x8961b88f, - 0x31808570, - 0x18013d80, - 0x8a609551, - 0xa1828a71, - 0x978f61e0, - 0xa0e3a0e0, - 0xa0c5a0c2, - 0xb0c1b0f1, - 0x7100a0c6, - 0xb0f19788, - 0x8961b88f, - 0x3d808570, - 0x95511801, - 0x8a918a80, - 0x61e0b182, - 0x22b08ab0, - 0x1e3b4640, - 0x62424675, - 0x46751e7b, - 0xb889c00b, - 0x31808940, - 0x16403d80, - 0x140c3d30, - 0x220080b0, - 0x7000424e, - 0x39838ab3, - 0x8ab106f3, - 0x0401cff0, - 0x1c1c3031, - 0x12004e6d, - 0x1c0c1810, - 0x80b04a6f, - 0x425f2200, - 0x10c27000, - 0x3c321612, - 0x83208ae1, - 0x42712210, - 0x93016273, - 0x9861d060, - 0xb0f26791, - 0x101c7000, - 0x100c625b, - 0x1821625b, - 0x14216267, - 0x161b6267, - 0xb0f6626b, - 0xb110b0f1, - 0xb0f5b113, - 0x720cb0f2, - 0x720e720d, - 0xb0e3b0e0, - 0x22f28ab2, - 0xb0c64288, - 0x628bb763, - 0x22f08ad0, - 0xb40542ab, - 0xb428a404, - 0xcaa0a429, - 0xcaa13180, - 0x94510001, - 0x8ad39461, - 0x39833183, - 0x31808410, - 0x31833980, - 0x94100030, - 0x31508400, - 0x8ad33950, - 0x06f33983, - 0x1834c1f4, - 0x31343184, - 0x94000040, - 0x22e2b089, - 0x8aca42b5, - 0x398a394a, - 0x978a312a, - 0xb0c6b0c5, - 0x8ab2b763, - 0x42b922d2, - 0x7000b0c2, - 0xa0e0b20f, - 0x978ea0e3, - 0xa764b764, - 0xb110b0f6, - 0x8210b113, - 0x42c322f0, - 0x8002b0f5, - 0xa006a004, - 0x7203a001, - 0xc0707204, - 0x71006791, - 0xb0f6b764, - 0xa20fb0c5, - 0xb0f57100, - 0x7810a0c5, - 0x90029030, - 0x90407820, - 0xb0729060, - 0x6677a20f, - 0xa764978a, - 0x6190b0f6, - 0x8180b88c, - 0x392489a4, - 0x00043184, - 0xc0809184, - 0x73766791, - 0x72487276, - 0x72027206, - 0x73057204, - 0x60597306, - 0x91b01200, - 0xc090b32d, - 0xb0f86791, - 0xb0f16504, - 0xb88eb0c1, - 0xe0a08a73, - 0x98729863, - 0x71006791, - 0xb0f1a0c1, - 0xb0c2b0f2, - 0x120ac00f, - 0x1a1f120f, - 0x12031204, - 0x39888ad8, - 0x06183958, - 0xb0f27100, - 0x8b10b88d, - 0x3d803180, - 0x6320100b, - 0x121a120b, - 0x16131a14, - 0xb0f27100, - 0x8b10b88d, - 0x3d803180, - 0x7100140b, - 0xb88db0f2, - 0x31808b10, - 0x140b3d80, - 0x7100100d, - 0xb88db0f2, - 0x31808b10, - 0x140b3d80, - 0x100c140d, - 0x4f3d22fd, - 0x120d10d0, - 0x7100180d, - 0xb88db0f2, - 0x31808b10, - 0x180b3d80, - 0x100e140c, - 0x4f4b22fc, - 0x120c10c0, - 0x7100180c, - 0xb88db0f2, - 0x31808b10, - 0x180b3d80, - 0x22fe140e, - 0x10e04f58, - 0x180e120e, - 0xb0f27100, - 0x8b10b88d, - 0x3d803180, - 0x7100180b, - 0xb88db0f2, - 0x31808b10, - 0x180b3d80, - 0x398b10b6, - 0x088b397b, - 0x161f919b, - 0x1e008150, - 0x1a104373, - 0x4f731cf0, - 0x6785637e, - 0x437d1e1a, - 0x431c1e4a, - 0xb0f27100, - 0x1614121a, - 0x63141613, - 0x9863e0b0, - 0x67919874, - 0xb0f2a0c2, - 0xc01a62e4, - 0x140d7880, - 0x1cec140e, - 0xc03a4b8d, - 0x1cdc10ec, - 0xc04a4b90, - 0x98507000, - 0x22008840, - 0xb8304792, - 0x00007000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc1020000, - 0xc0013162, - 0x1e008150, - 0x1a1043f7, - 0x102063f9, - 0x6f131a10, - 0x16116e23, - 0x6bf91612, - 0x00007000 +MCE_PATCH_TYPE patchWmbusSmodeMce[512] = +{ + 0x2fcf602e, + 0x030c3f9d, + 0x070c680a, + 0xff00003f, + 0x00000014, + 0x00000000, + 0x00000000, + 0x00070003, + 0x00003d1f, + 0x04000000, + 0x0000000f, + 0x000b0387, + 0x004340f4, + 0x80828000, + 0x00000670, + 0x0510091e, + 0x00050004, + 0x3e100200, + 0x00000061, + 0x3030002f, + 0x0000027f, + 0x00000000, + 0x0000aa00, + 0x72487220, + 0x7303a32d, + 0x72037305, + 0x73067304, + 0x73767204, + 0xc7c07276, + 0x00018001, + 0x90109001, + 0x90010801, + 0x720d720c, + 0xb0c0720e, + 0xb0f07100, + 0x7218a0c0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60636c01, + 0x60d76066, + 0x606362f6, + 0x60636063, + 0x12106064, + 0x730f7220, + 0x73117310, + 0x00108181, + 0xb0709180, + 0x60596043, + 0x605967ef, + 0x6791c030, + 0xc282c0e1, + 0x1820c470, + 0x6e236f13, + 0x16121611, + 0x7830686c, + 0x78409ab0, + 0x78509ac0, + 0x83009ad0, + 0xc4829ae0, + 0x1820c5a0, + 0x12034081, + 0x16126e23, + 0x6059687e, + 0x94908160, + 0x39808140, + 0x10012a70, + 0x84321611, + 0xc0f38444, + 0xc200c0f5, + 0x40a61c01, + 0x1c10c100, + 0x4c9e409c, + 0x18031013, + 0x1a131830, + 0x39121a10, + 0x60a66899, + 0x60a613f3, + 0x101513f3, + 0x1850c100, + 0x1a101a15, + 0x68a43914, + 0x7100b0d8, + 0xa0d8b108, + 0xb480b200, + 0xb013b003, + 0xb012b002, + 0xb0d07229, + 0xb1007100, + 0x92908140, + 0xb1007100, + 0x22f08140, + 0x13f044b6, + 0x40c21c03, + 0x94929293, + 0xb1007100, + 0x94949295, + 0xb1007100, + 0xa480b0d0, + 0xa0d17000, + 0x9760c030, + 0x9780c040, + 0xb0c1b0f1, + 0xb0f17100, + 0x7276a0c1, + 0xa002a003, + 0x730f7000, + 0xc0407310, + 0xc1006791, + 0x648291c0, + 0xb0f3b483, + 0xb484b0c3, + 0x91c0c000, + 0xb0d1b101, + 0x39858ad5, + 0x06153955, + 0x22308090, + 0x81a044ff, + 0x06100850, + 0x13f040f4, + 0x60f61211, + 0x13f11210, + 0x101b100a, + 0xb10192c0, + 0x92c17100, + 0x7100b101, + 0xa0d160ea, + 0xa0c3b101, + 0x605964c9, + 0xb016b006, + 0xb014b004, + 0xb012b002, + 0x78628400, + 0x81430420, + 0x2a733983, + 0xc1f29473, + 0x31621832, + 0x31511021, + 0x00200012, + 0x10309400, + 0x39301610, + 0x411f2210, + 0x31501220, + 0x31801003, + 0x93501630, + 0x12041202, + 0x41312273, + 0x97c08430, + 0x1a8287d2, + 0x97c08450, + 0x1a8487d4, + 0x22636133, + 0x8440413e, + 0x87d097c0, + 0x14021a80, + 0x97c08460, + 0x1a8087d0, + 0x614a1404, + 0x78718440, + 0x97c00410, + 0x1a4287d2, + 0x78718460, + 0x97c00410, + 0x1a4487d4, + 0x31543152, + 0x06333963, + 0x38321613, + 0x31823834, + 0x31843982, + 0x95720042, + 0x90307810, + 0x78209050, + 0x90609040, + 0x8ae2b205, + 0x93028303, + 0x9862e050, + 0x67919873, + 0xc00bc00c, + 0x31808140, + 0x39403980, + 0xc0f38141, + 0xc0140431, + 0xc0021441, + 0x69701412, + 0x847d3122, + 0x140dc010, + 0x142d312d, + 0x318e8ace, + 0x397e311e, + 0x31498ac9, + 0x39493979, + 0x109a3129, + 0xa04eb072, + 0xb011b06e, + 0x978ab06c, + 0xb7647276, + 0xc662a764, + 0xc04f9762, + 0x6677c028, + 0x22f18ab1, + 0x8ad14597, + 0x459722f1, + 0x710061f0, + 0xb760b073, + 0x220780b7, + 0xa76045ce, + 0x22f18ab1, + 0x223741a8, + 0xb11341a8, + 0x223080b0, + 0x61b645a3, + 0x41bb22e1, + 0x22508090, + 0xb0f541bb, + 0x22208210, + 0x97894197, + 0xa764b764, + 0x6197b0f6, + 0xb764978d, + 0xb0f6a764, + 0x8ad06197, + 0x41c722f0, + 0x41c72237, + 0xb113b075, + 0x223080b0, + 0xb08745c1, + 0x22d16197, + 0x809042ba, + 0x42ba2220, + 0x6197663a, + 0xa0e0978f, + 0xa0c2a0e3, + 0xb0f1a0c5, + 0xa0c6b0c1, + 0x97887100, + 0xb88fb0f1, + 0x85708961, + 0x95511801, + 0x8a718a60, + 0xa487a488, + 0x22e08ad0, + 0x821041e8, + 0x45822220, + 0xb04e7100, + 0xb074b06e, + 0x8a73b201, + 0x70008552, + 0xb0737100, + 0x80b7b760, + 0x460f2207, + 0x46252237, + 0x8ab1a760, + 0x420822e1, + 0x22508090, + 0xb0f54208, + 0x22208210, + 0x978d41f0, + 0xa764b764, + 0x61f0b0f6, + 0x42ba22d1, + 0x22208090, + 0x663a42ba, + 0x978f61f0, + 0xa0e3a0e0, + 0xa0c5a0c2, + 0xb0c1b0f1, + 0x7100a0c6, + 0xb0f19788, + 0x8961b88f, + 0x31808570, + 0x18013d80, + 0x8a609551, + 0xa1828a71, + 0x978f61e0, + 0xa0e3a0e0, + 0xa0c5a0c2, + 0xb0c1b0f1, + 0x7100a0c6, + 0xb0f19788, + 0x8961b88f, + 0x3d808570, + 0x95511801, + 0x8a918a80, + 0x61e0b182, + 0x22b08ab0, + 0x1e3b4640, + 0x62424675, + 0x46751e7b, + 0xb889c00b, + 0x31808940, + 0x16403d80, + 0x140c3d30, + 0x220080b0, + 0x7000424e, + 0x39838ab3, + 0x8ab106f3, + 0x0401cff0, + 0x1c1c3031, + 0x12004e6d, + 0x1c0c1810, + 0x80b04a6f, + 0x425f2200, + 0x10c27000, + 0x3c321612, + 0x83208ae1, + 0x42712210, + 0x93016273, + 0x9861d060, + 0xb0f26791, + 0x101c7000, + 0x100c625b, + 0x1821625b, + 0x14216267, + 0x161b6267, + 0xb0f6626b, + 0xb110b0f1, + 0xb0f5b113, + 0x720cb0f2, + 0x720e720d, + 0xb0e3b0e0, + 0x22f28ab2, + 0xb0c64288, + 0x628bb763, + 0x22f08ad0, + 0xb40542ab, + 0xb428a404, + 0xcaa0a429, + 0xcaa13180, + 0x94510001, + 0x8ad39461, + 0x39833183, + 0x31808410, + 0x31833980, + 0x94100030, + 0x31508400, + 0x8ad33950, + 0x06f33983, + 0x1834c1f4, + 0x31343184, + 0x94000040, + 0x22e2b089, + 0x8aca42b5, + 0x398a394a, + 0x978a312a, + 0xb0c6b0c5, + 0x8ab2b763, + 0x42b922d2, + 0x7000b0c2, + 0xa0e0b20f, + 0x978ea0e3, + 0xa764b764, + 0xb110b0f6, + 0x8210b113, + 0x42c322f0, + 0x8002b0f5, + 0xa006a004, + 0x7203a001, + 0xc0707204, + 0x71006791, + 0xb0f6b764, + 0xa20fb0c5, + 0xb0f57100, + 0x7810a0c5, + 0x90029030, + 0x90407820, + 0xb0729060, + 0x6677a20f, + 0xa764978a, + 0x6190b0f6, + 0x8180b88c, + 0x392489a4, + 0x00043184, + 0xc0809184, + 0x73766791, + 0x72487276, + 0x72027206, + 0x73057204, + 0x60597306, + 0x91b01200, + 0xc090b32d, + 0xb0f86791, + 0xb0f16504, + 0xb88eb0c1, + 0xe0a08a73, + 0x98729863, + 0x71006791, + 0xb0f1a0c1, + 0xb0c2b0f2, + 0x120ac00f, + 0x1a1f120f, + 0x12031204, + 0x39888ad8, + 0x06183958, + 0xb0f27100, + 0x8b10b88d, + 0x3d803180, + 0x6320100b, + 0x121a120b, + 0x16131a14, + 0xb0f27100, + 0x8b10b88d, + 0x3d803180, + 0x7100140b, + 0xb88db0f2, + 0x31808b10, + 0x140b3d80, + 0x7100100d, + 0xb88db0f2, + 0x31808b10, + 0x140b3d80, + 0x100c140d, + 0x4f3d22fd, + 0x120d10d0, + 0x7100180d, + 0xb88db0f2, + 0x31808b10, + 0x180b3d80, + 0x100e140c, + 0x4f4b22fc, + 0x120c10c0, + 0x7100180c, + 0xb88db0f2, + 0x31808b10, + 0x180b3d80, + 0x22fe140e, + 0x10e04f58, + 0x180e120e, + 0xb0f27100, + 0x8b10b88d, + 0x3d803180, + 0x7100180b, + 0xb88db0f2, + 0x31808b10, + 0x180b3d80, + 0x398b10b6, + 0x088b397b, + 0x161f919b, + 0x1e008150, + 0x1a104373, + 0x4f731cf0, + 0x6785637e, + 0x437d1e1a, + 0x431c1e4a, + 0xb0f27100, + 0x1614121a, + 0x63141613, + 0x9863e0b0, + 0x67919874, + 0xb0f2a0c2, + 0xc01a62e4, + 0x140d7880, + 0x1cec140e, + 0xc03a4b8d, + 0x1cdc10ec, + 0xc04a4b90, + 0x98507000, + 0x22008840, + 0xb8304792, + 0x00007000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc1020000, + 0xc0013162, + 0x1e008150, + 0x1a1043f7, + 0x102063f9, + 0x6f131a10, + 0x16116e23, + 0x6bf91612, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_mce_wmbus_smode(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 512; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchWmbusSmodeMce[i]; - } + uint32_t i; + + for (i = 0; i < 512; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchWmbusSmodeMce[i]; + } + #else - const uint32_t *pS = patchWmbusSmodeMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 64; + const uint32_t* pS = patchWmbusSmodeMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 64; + + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ble.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ble.h index 3da38a33..6b51169b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ble.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ble.h @@ -44,381 +44,386 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchBleRfe[311] = { - 0x0000612c, - 0x0002147f, - 0x00050006, - 0x0008000f, - 0x00520048, - 0x003fff80, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x00000000, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x003f0000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0x00000007, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x40632241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x686f1614, - 0x10257000, - 0x9100c050, - 0xc140c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x64537000, - 0x1031c052, - 0x31610631, - 0x645602c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006456, - 0x9101c051, - 0xc0e2cc01, - 0x64536456, - 0xc0c2c111, - 0xb0546456, - 0xa0547100, - 0x80f0b064, - 0x40b12200, - 0x90b01240, - 0xc2f0b032, - 0xc11168bc, - 0x6456c122, - 0x68c1c0b0, - 0x9101c051, - 0x3182c0e2, - 0x00028260, - 0xb1109132, - 0x68cbc230, - 0x00000000, - 0x12800000, - 0xb03290b0, - 0x64537000, - 0xc122c101, - 0xc1016456, - 0x6456c0c2, - 0x64998253, - 0x90b012c0, - 0x7000b032, - 0xc2726453, - 0x6456c081, - 0xc111c122, - 0xc0026456, - 0x6456c111, - 0xc331c062, - 0xc3626456, - 0x6456c111, - 0xc111c302, - 0x82536456, - 0x64993953, - 0x645bc3e2, - 0x40f62211, - 0xc881c242, - 0xc2526456, - 0x6456c111, - 0xcee1c272, - 0xc2026456, - 0x6456c881, - 0xc801c202, - 0xc0b06456, - 0x7000690a, - 0xc2426453, - 0x6456c801, - 0xc011c252, - 0xc2726456, - 0x6456c0e1, - 0xc101c002, - 0xc0626456, - 0x6456c301, - 0xc101c122, - 0xc3626456, - 0x6456c101, - 0xc101c302, - 0x82536456, - 0x70006499, - 0x00000000, - 0x00000000, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xb0608081, - 0x8092a050, - 0x92f1eff0, - 0x664f9302, - 0x45502241, - 0xc1f18080, - 0x16300410, - 0x14011101, - 0x61636c01, - 0x61656164, - 0x61676166, - 0x61696168, - 0x616d616b, - 0x6171616f, - 0x624c6249, - 0xc0f28091, - 0x31210421, - 0x2a428082, - 0x16321412, - 0x14211101, - 0x617e6c01, - 0x618461a0, - 0x617e624c, - 0x618461a0, - 0x6173624c, - 0x61736173, - 0x61736173, - 0x64a86173, - 0x64d36173, - 0x64e06173, - 0x650c6173, - 0x66596173, - 0x80826173, - 0x92f2dfe0, - 0xb0b0664f, - 0xb0b1617a, - 0x72057306, - 0x6130b030, - 0x664fcfd0, - 0xc003c284, - 0x6468c3c0, - 0x91507890, - 0x31107860, - 0x14107861, - 0x78509200, - 0x78613140, - 0x31400010, - 0x00107871, - 0x78b09210, - 0x78819260, - 0x78309221, - 0x78413140, - 0x92300010, - 0x91f0c010, - 0x61736655, - 0x80f0a054, - 0x45a82250, - 0x22008040, - 0x61a0463f, - 0x9160c800, - 0xb0508159, - 0x22418091, - 0xcfc04607, - 0x8212664f, - 0x39823182, - 0x10283942, - 0x82126477, - 0x041212f1, - 0x311f102f, - 0xc140142f, - 0x6f0d1420, - 0x10de396d, - 0x044ec3f4, - 0x3182c082, - 0x396d002e, - 0x3182c0a2, - 0x821a002d, - 0x8220398a, - 0x39803180, - 0x180bc00b, - 0x823078ac, - 0x10023940, - 0x3001c011, - 0x1801c010, - 0x31821802, - 0x26c10021, - 0xb0039191, - 0xb063b013, - 0x8203b053, - 0x80411439, - 0x463f2201, - 0x91c481b4, - 0x189581d5, - 0x4df51cb5, - 0x4a2d1cc5, - 0x80f09165, - 0x41e52210, - 0x913d6205, - 0x913eb110, - 0x9165b110, - 0x8159920f, - 0x18ab14f9, - 0x80f010bc, - 0x41a02250, - 0x46052210, - 0xcfb061e5, - 0xb063664f, - 0x10008230, - 0x0420c0f2, - 0xc0111002, - 0xc0103001, - 0x18021801, - 0x00213182, - 0x919126c1, - 0xb0139191, - 0xb063b003, - 0xb064b053, - 0x7100b054, - 0x22018041, - 0xb063463f, - 0x80f0b064, - 0x41a02250, - 0x91c181b1, - 0x189181d1, - 0xb0319161, - 0x8212621d, - 0x39823182, - 0x10283942, - 0x81596477, - 0x14598205, - 0xc00b8220, - 0x78ac180b, - 0x7100c080, - 0x6a3bb063, - 0x820161e5, - 0x31828162, - 0xefa03d82, - 0x930292f1, - 0xa003664f, - 0x80a26173, - 0x61736477, - 0x7100b050, - 0x92e06173, - 0x220082d0, - 0xb2c04650, - 0x80a07000, - 0x426c22f0, - 0xc102b030, - 0xc0013162, - 0x1e0080a0, - 0x22f04265, - 0xe6d04266, - 0x39603160, - 0x10206266, - 0x6f131a10, - 0x16116e23, - 0x6a671612, - 0x00007000 +RFE_PATCH_TYPE patchBleRfe[311] = +{ + 0x0000612c, + 0x0002147f, + 0x00050006, + 0x0008000f, + 0x00520048, + 0x003fff80, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x00000000, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x003f0000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x40632241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x686f1614, + 0x10257000, + 0x9100c050, + 0xc140c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x64537000, + 0x1031c052, + 0x31610631, + 0x645602c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006456, + 0x9101c051, + 0xc0e2cc01, + 0x64536456, + 0xc0c2c111, + 0xb0546456, + 0xa0547100, + 0x80f0b064, + 0x40b12200, + 0x90b01240, + 0xc2f0b032, + 0xc11168bc, + 0x6456c122, + 0x68c1c0b0, + 0x9101c051, + 0x3182c0e2, + 0x00028260, + 0xb1109132, + 0x68cbc230, + 0x00000000, + 0x12800000, + 0xb03290b0, + 0x64537000, + 0xc122c101, + 0xc1016456, + 0x6456c0c2, + 0x64998253, + 0x90b012c0, + 0x7000b032, + 0xc2726453, + 0x6456c081, + 0xc111c122, + 0xc0026456, + 0x6456c111, + 0xc331c062, + 0xc3626456, + 0x6456c111, + 0xc111c302, + 0x82536456, + 0x64993953, + 0x645bc3e2, + 0x40f62211, + 0xc881c242, + 0xc2526456, + 0x6456c111, + 0xcee1c272, + 0xc2026456, + 0x6456c881, + 0xc801c202, + 0xc0b06456, + 0x7000690a, + 0xc2426453, + 0x6456c801, + 0xc011c252, + 0xc2726456, + 0x6456c0e1, + 0xc101c002, + 0xc0626456, + 0x6456c301, + 0xc101c122, + 0xc3626456, + 0x6456c101, + 0xc101c302, + 0x82536456, + 0x70006499, + 0x00000000, + 0x00000000, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xb0608081, + 0x8092a050, + 0x92f1eff0, + 0x664f9302, + 0x45502241, + 0xc1f18080, + 0x16300410, + 0x14011101, + 0x61636c01, + 0x61656164, + 0x61676166, + 0x61696168, + 0x616d616b, + 0x6171616f, + 0x624c6249, + 0xc0f28091, + 0x31210421, + 0x2a428082, + 0x16321412, + 0x14211101, + 0x617e6c01, + 0x618461a0, + 0x617e624c, + 0x618461a0, + 0x6173624c, + 0x61736173, + 0x61736173, + 0x64a86173, + 0x64d36173, + 0x64e06173, + 0x650c6173, + 0x66596173, + 0x80826173, + 0x92f2dfe0, + 0xb0b0664f, + 0xb0b1617a, + 0x72057306, + 0x6130b030, + 0x664fcfd0, + 0xc003c284, + 0x6468c3c0, + 0x91507890, + 0x31107860, + 0x14107861, + 0x78509200, + 0x78613140, + 0x31400010, + 0x00107871, + 0x78b09210, + 0x78819260, + 0x78309221, + 0x78413140, + 0x92300010, + 0x91f0c010, + 0x61736655, + 0x80f0a054, + 0x45a82250, + 0x22008040, + 0x61a0463f, + 0x9160c800, + 0xb0508159, + 0x22418091, + 0xcfc04607, + 0x8212664f, + 0x39823182, + 0x10283942, + 0x82126477, + 0x041212f1, + 0x311f102f, + 0xc140142f, + 0x6f0d1420, + 0x10de396d, + 0x044ec3f4, + 0x3182c082, + 0x396d002e, + 0x3182c0a2, + 0x821a002d, + 0x8220398a, + 0x39803180, + 0x180bc00b, + 0x823078ac, + 0x10023940, + 0x3001c011, + 0x1801c010, + 0x31821802, + 0x26c10021, + 0xb0039191, + 0xb063b013, + 0x8203b053, + 0x80411439, + 0x463f2201, + 0x91c481b4, + 0x189581d5, + 0x4df51cb5, + 0x4a2d1cc5, + 0x80f09165, + 0x41e52210, + 0x913d6205, + 0x913eb110, + 0x9165b110, + 0x8159920f, + 0x18ab14f9, + 0x80f010bc, + 0x41a02250, + 0x46052210, + 0xcfb061e5, + 0xb063664f, + 0x10008230, + 0x0420c0f2, + 0xc0111002, + 0xc0103001, + 0x18021801, + 0x00213182, + 0x919126c1, + 0xb0139191, + 0xb063b003, + 0xb064b053, + 0x7100b054, + 0x22018041, + 0xb063463f, + 0x80f0b064, + 0x41a02250, + 0x91c181b1, + 0x189181d1, + 0xb0319161, + 0x8212621d, + 0x39823182, + 0x10283942, + 0x81596477, + 0x14598205, + 0xc00b8220, + 0x78ac180b, + 0x7100c080, + 0x6a3bb063, + 0x820161e5, + 0x31828162, + 0xefa03d82, + 0x930292f1, + 0xa003664f, + 0x80a26173, + 0x61736477, + 0x7100b050, + 0x92e06173, + 0x220082d0, + 0xb2c04650, + 0x80a07000, + 0x426c22f0, + 0xc102b030, + 0xc0013162, + 0x1e0080a0, + 0x22f04265, + 0xe6d04266, + 0x39603160, + 0x10206266, + 0x6f131a10, + 0x16116e23, + 0x6a671612, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_rfe_ble(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 311; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchBleRfe[i]; - } + uint32_t i; + + for (i = 0; i < 311; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchBleRfe[i]; + } + #else - const uint32_t *pS = patchBleRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 38; + const uint32_t* pS = patchBleRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 38; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_brepeat.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_brepeat.h index 62ddaf56..e42627a6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_brepeat.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_brepeat.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchBrepeatRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchBrepeatRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_brepeat(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchBrepeatRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchBrepeatRfe[i]; + } + #else - const uint32_t *pS = patchBrepeatRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchBrepeatRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk.h index f35a1131..db7b4c8d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchGenfskRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchGenfskRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_genfsk(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskRfe[i]; + } + #else - const uint32_t *pS = patchGenfskRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchGenfskRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk_ant_div.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk_ant_div.h index cebbc44f..674f414b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk_ant_div.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genfsk_ant_div.h @@ -44,431 +44,436 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchGenfskAntDivRfe[365] = { - 0x0000613b, - 0x1307147f, - 0x35f1004d, - 0x0003ffa6, - 0x003f0a91, - 0xf00ff000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x003f0000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0xc0500007, - 0x70009100, - 0x9100c070, - 0x31827000, - 0x91310021, - 0x7000b110, - 0xb1018101, - 0x3182a100, - 0xb1109132, - 0x10119101, - 0x22418141, - 0x06f1404e, - 0xc0517000, - 0x18309101, - 0x31833910, - 0x3118d008, - 0x00316f41, - 0xb1109131, - 0x16141483, - 0x7000685a, - 0xc0501025, - 0xc3f49100, - 0x1420c0c0, - 0x10316f03, - 0xc0220441, - 0x00213182, - 0xb1109131, - 0x10313963, - 0xc0820441, - 0x00213182, - 0xb1109131, - 0x10313963, - 0x3182c0a2, - 0x91310021, - 0x1050b110, - 0x14053115, - 0x70009205, - 0xc052643e, - 0x06311031, - 0x02c13161, - 0xc1126441, - 0x39211031, - 0x31510671, - 0x644102e1, - 0xc0517000, - 0xcc019101, - 0x6441c0e2, - 0xc111643e, - 0x6441c0c2, - 0x7100b054, - 0xb064a054, - 0x220080f0, - 0xc111409c, - 0x6441c122, - 0x9101c051, - 0x3182c0e2, - 0x00028260, - 0xb1109132, - 0x68afc300, - 0x1240643e, - 0xb03290b0, - 0x39538253, - 0x64843953, - 0x68b9c360, - 0x90b01280, - 0x7000b032, - 0xc101643e, - 0x6441c122, - 0xc0c2c101, - 0x82536441, - 0x12c06484, - 0xb03290b0, - 0x643e7000, - 0xc081c272, - 0xc1226441, - 0x6441c111, - 0xc111c002, - 0xc0626441, - 0x6441c331, - 0xc111c362, - 0xc3026441, - 0x6441c111, - 0x39538253, - 0xc3e26484, - 0x22116446, - 0xc24240e1, - 0x6441c881, - 0xc111c252, - 0xc2726441, - 0x6441cee1, - 0xc881c202, - 0xc2026441, - 0x6441c801, - 0x68f5c0b0, - 0x643e7000, - 0xc801c242, - 0xc2526441, - 0x6441c011, - 0xc0e1c272, - 0xc0026441, - 0x6441c101, - 0xc301c062, - 0xc1226441, - 0x6441c101, - 0xc101c362, - 0xc3026441, - 0x6441c101, - 0x64848253, - 0x00007000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x73060000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x8080455b, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x616f616e, - 0x61716170, - 0x61736172, - 0x61766174, - 0x617a6178, - 0x62b6617c, - 0x809162b9, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x61a36186, - 0x62b9618c, - 0x61a36186, - 0x62b9618c, - 0x617e617e, - 0x617e617e, - 0x617e617e, - 0x617e6493, - 0x617e64be, - 0x617e64cb, - 0x617e64f7, - 0x617e66c6, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x613f9030, - 0x66bccff0, - 0xc003c1c4, - 0x6453c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x66c29200, - 0x8210617e, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0xa0bca040, - 0x78a080e1, - 0x90e10401, - 0x80f0a054, - 0x45bc2250, - 0x22008040, - 0x61b446ab, - 0x10ab822d, - 0x10c210bc, - 0xb0136462, - 0x6649b003, - 0xb050b053, - 0xb064b054, - 0x65fcb013, - 0x82106621, - 0x45cf22e0, - 0x7100662a, - 0x22018041, - 0x80f046ab, - 0x41af2250, - 0x221080f0, - 0xb06445df, - 0x41cf2231, - 0x664fb063, - 0xb06461cf, - 0x318f816f, - 0xdfe03d8f, - 0x66bc92ff, - 0x80417100, - 0x46ab2201, - 0x80f0b064, - 0x41f52250, - 0x8211b063, - 0x45f422c1, - 0x6698664f, - 0x816161e6, - 0x31818172, - 0x31823d81, - 0x61af3d82, - 0x3d8380f3, - 0x4e0818d3, - 0x16130bf3, - 0x4a201ce3, - 0x81e391c3, - 0x620d143b, - 0x4a201ce3, - 0x81e391c3, - 0x1cab183b, - 0x1c9b4e1c, - 0x1cbc4a1e, - 0x10b24220, - 0x22d08210, - 0x80f0421a, - 0x46202210, - 0x62206462, - 0x621110ab, - 0x6211109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6a24, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4a3b1c12, - 0xb032b0e2, - 0x92f2dfd0, - 0xc7f166bc, - 0x4e3f1421, - 0x9162c812, - 0x31829172, - 0x16223942, - 0x002080e0, - 0xb03190e0, - 0x12087000, - 0xc800c006, - 0x91709160, - 0x82017000, - 0x91c081b0, - 0x181081d0, - 0x18108151, - 0x80e11406, - 0x31828242, - 0x1c203d82, - 0x22214a67, - 0xb0e24673, - 0x1002b032, - 0x92f2dfc0, - 0x102066bc, - 0x22216273, - 0x1a324273, - 0x4e731c20, - 0xb032a0e2, - 0xdfb01002, - 0x66bc92f2, - 0x82311020, - 0xc0f03941, - 0x1e010401, - 0x16184281, - 0x3010c010, - 0x46971c08, - 0x3c101060, - 0xc7f11006, - 0x4e851461, - 0x9166c816, - 0x31818171, - 0x1c163d81, - 0x91764a8c, - 0x39463186, - 0x80e01686, - 0x048078b8, - 0x90e00060, - 0xc006b031, - 0x70001208, - 0x31818161, - 0x82403d81, - 0x18013980, - 0x4aaa1cf1, - 0x80b01401, - 0x46aa22c0, - 0xb033b0bc, - 0x92f1efa0, - 0x66bc930f, - 0x82017000, - 0x31828162, - 0xef903d82, - 0x930292f1, - 0xa00366bc, - 0x617e64f7, - 0x646280a2, - 0xb050617e, - 0x617e7100, - 0x82d092e0, - 0x46bd2200, - 0x7000b2c0, - 0x22f080a0, - 0xb03042d9, - 0x3162c102, - 0x80a0c001, - 0x42d21e00, - 0x42d322f0, - 0x3160eda0, - 0x62d33960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006ad4 +RFE_PATCH_TYPE patchGenfskAntDivRfe[365] = +{ + 0x0000613b, + 0x1307147f, + 0x35f1004d, + 0x0003ffa6, + 0x003f0a91, + 0xf00ff000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x003f0000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0xc0500007, + 0x70009100, + 0x9100c070, + 0x31827000, + 0x91310021, + 0x7000b110, + 0xb1018101, + 0x3182a100, + 0xb1109132, + 0x10119101, + 0x22418141, + 0x06f1404e, + 0xc0517000, + 0x18309101, + 0x31833910, + 0x3118d008, + 0x00316f41, + 0xb1109131, + 0x16141483, + 0x7000685a, + 0xc0501025, + 0xc3f49100, + 0x1420c0c0, + 0x10316f03, + 0xc0220441, + 0x00213182, + 0xb1109131, + 0x10313963, + 0xc0820441, + 0x00213182, + 0xb1109131, + 0x10313963, + 0x3182c0a2, + 0x91310021, + 0x1050b110, + 0x14053115, + 0x70009205, + 0xc052643e, + 0x06311031, + 0x02c13161, + 0xc1126441, + 0x39211031, + 0x31510671, + 0x644102e1, + 0xc0517000, + 0xcc019101, + 0x6441c0e2, + 0xc111643e, + 0x6441c0c2, + 0x7100b054, + 0xb064a054, + 0x220080f0, + 0xc111409c, + 0x6441c122, + 0x9101c051, + 0x3182c0e2, + 0x00028260, + 0xb1109132, + 0x68afc300, + 0x1240643e, + 0xb03290b0, + 0x39538253, + 0x64843953, + 0x68b9c360, + 0x90b01280, + 0x7000b032, + 0xc101643e, + 0x6441c122, + 0xc0c2c101, + 0x82536441, + 0x12c06484, + 0xb03290b0, + 0x643e7000, + 0xc081c272, + 0xc1226441, + 0x6441c111, + 0xc111c002, + 0xc0626441, + 0x6441c331, + 0xc111c362, + 0xc3026441, + 0x6441c111, + 0x39538253, + 0xc3e26484, + 0x22116446, + 0xc24240e1, + 0x6441c881, + 0xc111c252, + 0xc2726441, + 0x6441cee1, + 0xc881c202, + 0xc2026441, + 0x6441c801, + 0x68f5c0b0, + 0x643e7000, + 0xc801c242, + 0xc2526441, + 0x6441c011, + 0xc0e1c272, + 0xc0026441, + 0x6441c101, + 0xc301c062, + 0xc1226441, + 0x6441c101, + 0xc101c362, + 0xc3026441, + 0x6441c101, + 0x64848253, + 0x00007000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x73060000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x8080455b, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x616f616e, + 0x61716170, + 0x61736172, + 0x61766174, + 0x617a6178, + 0x62b6617c, + 0x809162b9, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x61a36186, + 0x62b9618c, + 0x61a36186, + 0x62b9618c, + 0x617e617e, + 0x617e617e, + 0x617e617e, + 0x617e6493, + 0x617e64be, + 0x617e64cb, + 0x617e64f7, + 0x617e66c6, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x613f9030, + 0x66bccff0, + 0xc003c1c4, + 0x6453c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x66c29200, + 0x8210617e, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0xa0bca040, + 0x78a080e1, + 0x90e10401, + 0x80f0a054, + 0x45bc2250, + 0x22008040, + 0x61b446ab, + 0x10ab822d, + 0x10c210bc, + 0xb0136462, + 0x6649b003, + 0xb050b053, + 0xb064b054, + 0x65fcb013, + 0x82106621, + 0x45cf22e0, + 0x7100662a, + 0x22018041, + 0x80f046ab, + 0x41af2250, + 0x221080f0, + 0xb06445df, + 0x41cf2231, + 0x664fb063, + 0xb06461cf, + 0x318f816f, + 0xdfe03d8f, + 0x66bc92ff, + 0x80417100, + 0x46ab2201, + 0x80f0b064, + 0x41f52250, + 0x8211b063, + 0x45f422c1, + 0x6698664f, + 0x816161e6, + 0x31818172, + 0x31823d81, + 0x61af3d82, + 0x3d8380f3, + 0x4e0818d3, + 0x16130bf3, + 0x4a201ce3, + 0x81e391c3, + 0x620d143b, + 0x4a201ce3, + 0x81e391c3, + 0x1cab183b, + 0x1c9b4e1c, + 0x1cbc4a1e, + 0x10b24220, + 0x22d08210, + 0x80f0421a, + 0x46202210, + 0x62206462, + 0x621110ab, + 0x6211109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6a24, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4a3b1c12, + 0xb032b0e2, + 0x92f2dfd0, + 0xc7f166bc, + 0x4e3f1421, + 0x9162c812, + 0x31829172, + 0x16223942, + 0x002080e0, + 0xb03190e0, + 0x12087000, + 0xc800c006, + 0x91709160, + 0x82017000, + 0x91c081b0, + 0x181081d0, + 0x18108151, + 0x80e11406, + 0x31828242, + 0x1c203d82, + 0x22214a67, + 0xb0e24673, + 0x1002b032, + 0x92f2dfc0, + 0x102066bc, + 0x22216273, + 0x1a324273, + 0x4e731c20, + 0xb032a0e2, + 0xdfb01002, + 0x66bc92f2, + 0x82311020, + 0xc0f03941, + 0x1e010401, + 0x16184281, + 0x3010c010, + 0x46971c08, + 0x3c101060, + 0xc7f11006, + 0x4e851461, + 0x9166c816, + 0x31818171, + 0x1c163d81, + 0x91764a8c, + 0x39463186, + 0x80e01686, + 0x048078b8, + 0x90e00060, + 0xc006b031, + 0x70001208, + 0x31818161, + 0x82403d81, + 0x18013980, + 0x4aaa1cf1, + 0x80b01401, + 0x46aa22c0, + 0xb033b0bc, + 0x92f1efa0, + 0x66bc930f, + 0x82017000, + 0x31828162, + 0xef903d82, + 0x930292f1, + 0xa00366bc, + 0x617e64f7, + 0x646280a2, + 0xb050617e, + 0x617e7100, + 0x82d092e0, + 0x46bd2200, + 0x7000b2c0, + 0x22f080a0, + 0xb03042d9, + 0x3162c102, + 0x80a0c001, + 0x42d21e00, + 0x42d322f0, + 0x3160eda0, + 0x62d33960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006ad4 }; PATCH_FUN_SPEC void rf_patch_rfe_genfsk_ant_div(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 365; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskAntDivRfe[i]; - } + uint32_t i; + + for (i = 0; i < 365; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskAntDivRfe[i]; + } + #else - const uint32_t *pS = patchGenfskAntDivRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 45; + const uint32_t* pS = patchGenfskAntDivRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 45; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genook.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genook.h index 3c8b88b4..9451426c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genook.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_genook.h @@ -44,483 +44,488 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchGenookRfe[425] = { - 0x00006122, - 0x0ec20ec1, - 0x0ec40ec3, - 0x0ec90ec6, - 0x0edf0ecf, - 0x0e3f0eef, - 0x0e3f0e3f, - 0x0e3f0e3f, - 0x0e3f0e3f, - 0x0d0f0e3f, - 0x0d3f0d1f, - 0x0d7f0d5f, - 0x0dbf0d9f, - 0x0dff0ddf, - 0x10000008, - 0x12031101, - 0x24f1004d, - 0x0018002e, - 0x72000a94, - 0x003ffffe, - 0x00ff007f, - 0x403003ff, - 0x40014000, - 0x40074003, - 0x404f400f, - 0x41cf40cf, - 0x47cf43cf, - 0x3fcf4fcf, - 0x1fcf2fcf, - 0x00000fcf, - 0x0008000f, - 0x003f0000, - 0x00000000, - 0x000000c0, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x406d2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x68791614, - 0x10257000, - 0x9100c050, - 0xc2b0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x645d7000, - 0x1031c052, - 0x31610631, - 0x646002c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006460, - 0xb054645d, - 0xa0547100, - 0x80f0b064, - 0x40b32200, - 0xc122c111, - 0xc3006460, - 0x645d68be, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0xc36064a3, - 0x128068c8, - 0xb03290b0, - 0x645d7000, - 0xc122c101, - 0xc1016460, - 0x6460c0c2, - 0x64a38253, - 0x90b012c0, - 0x7000b032, - 0xc272645d, - 0x6460c081, - 0xc111c122, - 0xc0026460, - 0x6460c111, - 0xc331c062, - 0xc3626460, - 0x6460c111, - 0xc111c302, - 0x82536460, - 0x64a33953, - 0x6465c3e2, - 0x40f02211, - 0xc881c242, - 0xc2526460, - 0x6460c111, - 0xcee1c272, - 0xc2026460, - 0x6460c881, - 0xc801c202, - 0xc0b06460, - 0x70006904, - 0xc242645d, - 0x6460c801, - 0xc011c252, - 0xc2726460, - 0x6460c0e1, - 0xc101c002, - 0xc0626460, - 0x6460c301, - 0xc101c122, - 0xc3626460, - 0x6460c101, - 0xc101c302, - 0x82536460, - 0x700064a3, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xb0608081, - 0x8092a050, - 0x224180a2, - 0x80804543, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61556154, - 0x61576156, - 0x61596158, - 0x615c615a, - 0x6160615e, - 0x62dd6162, - 0x809162e0, - 0x80823111, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x61836170, - 0x62e06176, - 0x61836170, - 0x62e06176, - 0x61636163, - 0x61636163, - 0x61636163, - 0x616364b2, - 0x616364cd, - 0x616364da, - 0x61636506, - 0x12106163, - 0x616890b0, - 0x90b01220, - 0x9050c010, - 0x90607a60, - 0x1210720e, - 0x61269030, - 0x674bcff0, - 0xc003c3b4, - 0x6472c3c0, - 0x91507a00, - 0x92107a10, - 0x92207a20, - 0x92307a30, - 0x92407a40, - 0x92607a50, - 0xa0bc6163, - 0xb060a0e1, - 0x80f0a054, - 0x458e2250, - 0x22008040, - 0x618546aa, - 0x674bcfe0, - 0x393080f0, - 0x22100630, - 0x79f14197, - 0x2200619c, - 0x79e1419b, - 0x79d1619c, - 0x822d9191, - 0x39408230, - 0x0410c0f1, - 0xc0121007, - 0x82193072, - 0x0419c0f1, - 0xc0f1821a, - 0x041a394a, - 0xc0f1821e, - 0x041e398e, - 0x10bc10ab, - 0x648110c2, - 0x7aa7c00f, - 0xb003b013, - 0xb053664e, - 0xb013b050, - 0xc0826624, - 0x6635668a, - 0xb0637100, - 0x22018041, - 0x80f046aa, - 0x41c02250, - 0x45c02210, - 0x46c822f0, - 0x668ac082, - 0x392010f0, - 0x81d391c0, - 0x10306654, - 0x4dde18d3, - 0x16130bf3, - 0x49f21ce3, - 0x81e391c3, - 0x61e3143b, - 0x49f21ce3, - 0x81e391c3, - 0x1cab183b, - 0x1c9b4e31, - 0x1cbc4a33, - 0x10b241f2, - 0x22d08210, - 0x80f041f0, - 0x45f22210, - 0x65f36481, - 0x10c061c0, - 0x4a0518b0, - 0x39101003, - 0x41fc1e00, - 0x3807380f, - 0x42152203, - 0x392010f0, - 0x1070180f, - 0x18073920, - 0x10036215, - 0x1801c001, - 0x1e013911, - 0x301f420d, - 0x22033017, - 0x10f04215, - 0x140f3920, - 0x39201070, - 0x66a11407, - 0x06f08230, - 0x80f13110, - 0x06313931, - 0x421f1e01, - 0xb0633810, - 0x6a1f7100, - 0x700010bc, - 0x06f08230, - 0x80f13110, - 0x06313931, - 0x422d1e01, - 0xb0633810, - 0x6a2d7100, - 0x10ab7000, - 0x109b61e7, - 0x10f261e7, - 0x91c23922, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4a461c12, - 0xb032b0e1, - 0x674bcfd0, - 0x1421c7f1, - 0xc8124e4a, - 0x91729162, - 0x7000b031, - 0xc0061208, - 0x9160c800, - 0x70009170, - 0x10308201, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4a661c20, - 0x46702211, - 0xb032b0e1, - 0x674bcfc0, - 0x42702211, - 0x1c201a32, - 0xa0e14e70, - 0xdfb0b032, - 0x674b92f2, - 0x39418231, - 0x1e0106f1, - 0x1618427b, - 0x3010c010, - 0x46891c08, - 0xc7f13c16, - 0x4e7f1461, - 0x9166c816, - 0x31818171, - 0x1c163d81, - 0x91764a86, - 0xc006b031, - 0x70001208, - 0x312381b3, - 0x187110f1, - 0x10153c21, - 0x4e931c37, - 0x10376295, - 0x14176296, - 0x4a991c3f, - 0x103f629b, - 0x1e0162a1, - 0x1211469e, - 0x42a11e0f, - 0x10f1181f, - 0x39311471, - 0x063080e0, - 0x14103121, - 0x700090e0, - 0x81628201, - 0x3d823182, - 0x92f1efa0, - 0x674b9302, - 0x6506a003, - 0x81616163, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014ac7, - 0x22c080b0, - 0xb0bc46c7, - 0xef90b033, - 0x930f92f1, - 0x7000674b, - 0xb063a003, - 0xb054b064, - 0x6506b0e0, - 0x80407100, - 0x46aa2200, - 0x64dab064, - 0x7100a0e0, - 0x22008040, - 0xb06446aa, - 0xb003a054, - 0x80a261c0, - 0x61636481, - 0x39808260, - 0x10083950, - 0x82693128, - 0xc1f13989, - 0xc01b0419, - 0x1c9a79ca, - 0x109a4af0, - 0x62f31209, - 0x1a1918a9, - 0xb0e1c00b, - 0xb064b054, - 0x80f07100, - 0x47382240, - 0x42fd2210, - 0x645a631a, - 0x1e1b1090, - 0xc0214308, - 0x10001401, - 0x673a1000, - 0x67426b01, - 0xc131b101, - 0x6f1214a1, - 0xb1109132, - 0x1a1010a0, - 0x1401c131, - 0x10001000, - 0x6b10673a, - 0xc0c2c101, - 0x62f56460, - 0x645d6742, - 0xc0c2c111, - 0x10a06460, - 0x10a2c131, - 0x14211802, - 0x6b20673a, - 0x43371e1b, - 0xc021a101, - 0x91326f12, - 0x1090b110, - 0x43371e00, - 0xc0211a10, - 0x18021092, - 0x673a1421, - 0x62f56b31, - 0x6163a054, - 0x10801004, - 0x10406b3c, - 0x91326f12, - 0x7000b110, - 0x9101c051, - 0x3182c0e2, - 0x0002cc00, - 0xb1109132, - 0x92e07000, - 0x220082d0, - 0xb2c0474c, - 0x00007000 +RFE_PATCH_TYPE patchGenookRfe[425] = +{ + 0x00006122, + 0x0ec20ec1, + 0x0ec40ec3, + 0x0ec90ec6, + 0x0edf0ecf, + 0x0e3f0eef, + 0x0e3f0e3f, + 0x0e3f0e3f, + 0x0e3f0e3f, + 0x0d0f0e3f, + 0x0d3f0d1f, + 0x0d7f0d5f, + 0x0dbf0d9f, + 0x0dff0ddf, + 0x10000008, + 0x12031101, + 0x24f1004d, + 0x0018002e, + 0x72000a94, + 0x003ffffe, + 0x00ff007f, + 0x403003ff, + 0x40014000, + 0x40074003, + 0x404f400f, + 0x41cf40cf, + 0x47cf43cf, + 0x3fcf4fcf, + 0x1fcf2fcf, + 0x00000fcf, + 0x0008000f, + 0x003f0000, + 0x00000000, + 0x000000c0, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x406d2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x68791614, + 0x10257000, + 0x9100c050, + 0xc2b0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x645d7000, + 0x1031c052, + 0x31610631, + 0x646002c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006460, + 0xb054645d, + 0xa0547100, + 0x80f0b064, + 0x40b32200, + 0xc122c111, + 0xc3006460, + 0x645d68be, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0xc36064a3, + 0x128068c8, + 0xb03290b0, + 0x645d7000, + 0xc122c101, + 0xc1016460, + 0x6460c0c2, + 0x64a38253, + 0x90b012c0, + 0x7000b032, + 0xc272645d, + 0x6460c081, + 0xc111c122, + 0xc0026460, + 0x6460c111, + 0xc331c062, + 0xc3626460, + 0x6460c111, + 0xc111c302, + 0x82536460, + 0x64a33953, + 0x6465c3e2, + 0x40f02211, + 0xc881c242, + 0xc2526460, + 0x6460c111, + 0xcee1c272, + 0xc2026460, + 0x6460c881, + 0xc801c202, + 0xc0b06460, + 0x70006904, + 0xc242645d, + 0x6460c801, + 0xc011c252, + 0xc2726460, + 0x6460c0e1, + 0xc101c002, + 0xc0626460, + 0x6460c301, + 0xc101c122, + 0xc3626460, + 0x6460c101, + 0xc101c302, + 0x82536460, + 0x700064a3, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xb0608081, + 0x8092a050, + 0x224180a2, + 0x80804543, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61556154, + 0x61576156, + 0x61596158, + 0x615c615a, + 0x6160615e, + 0x62dd6162, + 0x809162e0, + 0x80823111, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x61836170, + 0x62e06176, + 0x61836170, + 0x62e06176, + 0x61636163, + 0x61636163, + 0x61636163, + 0x616364b2, + 0x616364cd, + 0x616364da, + 0x61636506, + 0x12106163, + 0x616890b0, + 0x90b01220, + 0x9050c010, + 0x90607a60, + 0x1210720e, + 0x61269030, + 0x674bcff0, + 0xc003c3b4, + 0x6472c3c0, + 0x91507a00, + 0x92107a10, + 0x92207a20, + 0x92307a30, + 0x92407a40, + 0x92607a50, + 0xa0bc6163, + 0xb060a0e1, + 0x80f0a054, + 0x458e2250, + 0x22008040, + 0x618546aa, + 0x674bcfe0, + 0x393080f0, + 0x22100630, + 0x79f14197, + 0x2200619c, + 0x79e1419b, + 0x79d1619c, + 0x822d9191, + 0x39408230, + 0x0410c0f1, + 0xc0121007, + 0x82193072, + 0x0419c0f1, + 0xc0f1821a, + 0x041a394a, + 0xc0f1821e, + 0x041e398e, + 0x10bc10ab, + 0x648110c2, + 0x7aa7c00f, + 0xb003b013, + 0xb053664e, + 0xb013b050, + 0xc0826624, + 0x6635668a, + 0xb0637100, + 0x22018041, + 0x80f046aa, + 0x41c02250, + 0x45c02210, + 0x46c822f0, + 0x668ac082, + 0x392010f0, + 0x81d391c0, + 0x10306654, + 0x4dde18d3, + 0x16130bf3, + 0x49f21ce3, + 0x81e391c3, + 0x61e3143b, + 0x49f21ce3, + 0x81e391c3, + 0x1cab183b, + 0x1c9b4e31, + 0x1cbc4a33, + 0x10b241f2, + 0x22d08210, + 0x80f041f0, + 0x45f22210, + 0x65f36481, + 0x10c061c0, + 0x4a0518b0, + 0x39101003, + 0x41fc1e00, + 0x3807380f, + 0x42152203, + 0x392010f0, + 0x1070180f, + 0x18073920, + 0x10036215, + 0x1801c001, + 0x1e013911, + 0x301f420d, + 0x22033017, + 0x10f04215, + 0x140f3920, + 0x39201070, + 0x66a11407, + 0x06f08230, + 0x80f13110, + 0x06313931, + 0x421f1e01, + 0xb0633810, + 0x6a1f7100, + 0x700010bc, + 0x06f08230, + 0x80f13110, + 0x06313931, + 0x422d1e01, + 0xb0633810, + 0x6a2d7100, + 0x10ab7000, + 0x109b61e7, + 0x10f261e7, + 0x91c23922, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4a461c12, + 0xb032b0e1, + 0x674bcfd0, + 0x1421c7f1, + 0xc8124e4a, + 0x91729162, + 0x7000b031, + 0xc0061208, + 0x9160c800, + 0x70009170, + 0x10308201, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4a661c20, + 0x46702211, + 0xb032b0e1, + 0x674bcfc0, + 0x42702211, + 0x1c201a32, + 0xa0e14e70, + 0xdfb0b032, + 0x674b92f2, + 0x39418231, + 0x1e0106f1, + 0x1618427b, + 0x3010c010, + 0x46891c08, + 0xc7f13c16, + 0x4e7f1461, + 0x9166c816, + 0x31818171, + 0x1c163d81, + 0x91764a86, + 0xc006b031, + 0x70001208, + 0x312381b3, + 0x187110f1, + 0x10153c21, + 0x4e931c37, + 0x10376295, + 0x14176296, + 0x4a991c3f, + 0x103f629b, + 0x1e0162a1, + 0x1211469e, + 0x42a11e0f, + 0x10f1181f, + 0x39311471, + 0x063080e0, + 0x14103121, + 0x700090e0, + 0x81628201, + 0x3d823182, + 0x92f1efa0, + 0x674b9302, + 0x6506a003, + 0x81616163, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014ac7, + 0x22c080b0, + 0xb0bc46c7, + 0xef90b033, + 0x930f92f1, + 0x7000674b, + 0xb063a003, + 0xb054b064, + 0x6506b0e0, + 0x80407100, + 0x46aa2200, + 0x64dab064, + 0x7100a0e0, + 0x22008040, + 0xb06446aa, + 0xb003a054, + 0x80a261c0, + 0x61636481, + 0x39808260, + 0x10083950, + 0x82693128, + 0xc1f13989, + 0xc01b0419, + 0x1c9a79ca, + 0x109a4af0, + 0x62f31209, + 0x1a1918a9, + 0xb0e1c00b, + 0xb064b054, + 0x80f07100, + 0x47382240, + 0x42fd2210, + 0x645a631a, + 0x1e1b1090, + 0xc0214308, + 0x10001401, + 0x673a1000, + 0x67426b01, + 0xc131b101, + 0x6f1214a1, + 0xb1109132, + 0x1a1010a0, + 0x1401c131, + 0x10001000, + 0x6b10673a, + 0xc0c2c101, + 0x62f56460, + 0x645d6742, + 0xc0c2c111, + 0x10a06460, + 0x10a2c131, + 0x14211802, + 0x6b20673a, + 0x43371e1b, + 0xc021a101, + 0x91326f12, + 0x1090b110, + 0x43371e00, + 0xc0211a10, + 0x18021092, + 0x673a1421, + 0x62f56b31, + 0x6163a054, + 0x10801004, + 0x10406b3c, + 0x91326f12, + 0x7000b110, + 0x9101c051, + 0x3182c0e2, + 0x0002cc00, + 0xb1109132, + 0x92e07000, + 0x220082d0, + 0xb2c0474c, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_rfe_genook(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 425; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenookRfe[i]; - } + uint32_t i; + + for (i = 0; i < 425; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenookRfe[i]; + } + #else - const uint32_t *pS = patchGenookRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchGenookRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - *pD++ = t1; + t1 = *pS++; + *pD++ = t1; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ghs.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ghs.h index 22d8ba12..78345605 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ghs.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_ghs.h @@ -44,558 +44,563 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchGhsRfe[498] = { - 0x00006256, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x0100003f, - 0xff071f00, - 0x4030f00f, - 0x40014000, - 0x40074003, - 0x404f400f, - 0x41cf40cf, - 0x47cf43cf, - 0x3fcf4fcf, - 0x1fcf2fcf, - 0x00000fcf, - 0x00000000, - 0x00000000, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x000000a5, - 0x00000000, - 0x005500a5, - 0x00550055, - 0x00550050, - 0x00550055, - 0x00aa0050, - 0x00aa00aa, - 0x00aa0005, - 0x00aa00aa, - 0x00000005, - 0x00000000, - 0x00000000, - 0x00000000, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x003f0000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0x00000007, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc0500000, - 0x70009100, - 0x9100c070, - 0x31827000, - 0x91310021, - 0x7000b110, - 0xb1018101, - 0x3182a100, - 0xb1109132, - 0x10119101, - 0x22418141, - 0x06f140a0, - 0xc0517000, - 0x18309101, - 0x31833910, - 0x3118d008, - 0x00316f41, - 0xb1109131, - 0x16141483, - 0x700068ac, - 0xc0501025, - 0xc3f49100, - 0x1420c0d0, - 0x10316f03, - 0xc0220441, - 0x00213182, - 0xb1109131, - 0x10313963, - 0xc0820441, - 0x00213182, - 0xb1109131, - 0x10313963, - 0x3182c0a2, - 0x91310021, - 0x1052b110, - 0x31151050, - 0x92051405, - 0x39448244, - 0x31431023, - 0x92431443, - 0x10308243, - 0xc1d13920, - 0x6f151401, - 0x31130633, - 0x40e71e03, - 0x06353835, - 0x1c2440ef, - 0x26f54cee, - 0x60ef90e5, - 0x700090e5, - 0xc0526490, - 0x06311031, - 0x02c13161, - 0xc1126493, - 0x39211031, - 0x31510671, - 0x649302e1, - 0x82207000, - 0x041078a1, - 0x663d4168, - 0xc088664c, - 0x39508220, - 0x1e003980, - 0xc041410e, - 0x14183001, - 0xc0891a18, - 0x39608230, - 0x1e003980, - 0xc0414118, - 0x14193001, - 0x648d1a19, - 0xb1109136, - 0xb1109134, - 0x7100b054, - 0xb064a054, - 0x220080f0, - 0x1240411e, - 0xb03290b0, - 0xc1116490, - 0x6493c122, - 0x692dc170, - 0xc0c2c111, - 0xc1706493, - 0xc0506932, - 0x72279100, - 0x16159298, - 0x10421614, - 0xc1f01053, - 0x31318221, - 0x39813931, - 0xb0513131, - 0x6625b270, - 0x92997227, - 0x1062b270, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0x6625101b, - 0x3182c0e2, - 0x31808260, - 0x00023980, - 0x7100b061, - 0xb1109132, - 0xb061a051, - 0x82537227, - 0x39533953, - 0xc23064f0, - 0x00006962, - 0x90b01280, - 0x7000b032, - 0x9101c051, - 0xc0e2cc01, - 0x64906493, - 0xc0c2c111, - 0xb0546493, - 0xa0547100, - 0x80f0b064, - 0x41712200, - 0x90b01240, - 0xc2f0b032, - 0xc111697c, - 0x6493c122, - 0x6981c0b0, - 0x9101c051, - 0x3182c0e2, - 0x00028260, - 0xb1109132, - 0x39538253, - 0x64f03953, - 0x698fc050, - 0x12800000, - 0xb03290b0, - 0x82537000, - 0x821064f0, - 0x419d22f0, - 0x0000c960, - 0x8220699b, - 0x041078a1, - 0xc05041d0, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x72276631, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x6631101a, - 0xb061a051, - 0xc0b07227, - 0x649069c0, - 0xc122c101, - 0xc1016493, - 0x6493c0c2, - 0x648d1a15, - 0xb1109135, - 0x90b012c0, - 0x7000b032, - 0xc1016490, - 0x6493c122, - 0xc0c2c101, - 0x82536493, - 0x12c064f0, - 0xb03290b0, - 0x64907000, - 0xc081c272, - 0xc1226493, - 0x6493c111, - 0xc111c002, - 0xc0626493, - 0x6493c331, - 0xc111c362, - 0xc3026493, - 0x6493c111, - 0x39538253, - 0xc3e264f0, - 0x22116498, - 0xc24241f3, - 0x6493c881, - 0xc111c252, - 0xc2726493, - 0x6493cee1, - 0xc881c202, - 0xc2026493, - 0x6493c801, - 0x6a07c0b0, - 0x64907000, - 0xc801c242, - 0xc2526493, - 0x6493c011, - 0xc0e1c272, - 0xc0026493, - 0x6493c101, - 0xc301c062, - 0xc1226493, - 0x6493c101, - 0xc101c362, - 0xc3026493, - 0x6493c101, - 0x64f08253, - 0xb0617000, - 0x14127100, - 0x4e2d1c23, - 0xb1109133, - 0x91327000, - 0x6a25b110, - 0xb0617000, - 0x18137100, - 0x4a391c32, - 0xb1109132, - 0x91337000, - 0x6a31b110, - 0xc0c27000, - 0x10156498, - 0x1612c0c2, - 0x31416498, - 0xc0c01415, - 0x14053180, - 0x78b01054, - 0x70000404, - 0x3186c0e6, - 0x1416cc01, - 0x82611067, - 0x0401c3f0, - 0x70001417, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xb0608081, - 0x8092a050, - 0x46762241, - 0xc1f18080, - 0x16300410, - 0x14011101, - 0x62896c01, - 0x628b628a, - 0x628d628c, - 0x628f628e, - 0x62936291, - 0x62896295, - 0x63db63d8, - 0xc0f28091, - 0x31210421, - 0x2a428082, - 0x16321412, - 0x14211101, - 0x629f6c01, - 0x62a562bb, - 0x629f63db, - 0x62a562bb, - 0x629763db, - 0x62976297, - 0x62976297, - 0x64ff6297, - 0x65956297, - 0x65dd6297, - 0x66096297, - 0x12106297, - 0x720e90b0, - 0x72057306, - 0x90301210, - 0xcff0625a, - 0xc64467de, - 0xc3c0c003, - 0x784064a5, - 0x78509150, - 0x78609210, - 0x78709220, - 0x78809230, - 0x78909260, - 0x78309290, - 0x82109190, - 0x06f03940, - 0x31101001, - 0x92001410, - 0xa0e06297, - 0x80f0a054, - 0x46c42250, - 0x22008040, - 0x62bc47cd, - 0x822da040, - 0x398d318d, - 0xc0f18210, - 0x10090410, - 0x394a821a, - 0x8210041a, - 0x04103980, - 0x10ab100e, - 0x10c010bc, - 0x14c03140, - 0x10c29240, - 0xcfe064b4, - 0xb01367de, - 0x67a3b003, - 0xb050b053, - 0xb064b054, - 0x675bb013, - 0x22e08210, - 0x679446ee, - 0x91c081b0, - 0xb06381d5, - 0x80417100, - 0x47cd2201, - 0x221080f0, - 0xb064472a, - 0x42ee2231, - 0x81b0b063, - 0x81d391c0, - 0x4f0118d3, - 0x67a981d5, - 0x710062ee, - 0x22018041, - 0x80f047cd, - 0x472a2210, - 0x2231b064, - 0xb0634301, - 0x91c081b0, - 0x105081d3, - 0x18301035, - 0x4eee16a0, - 0x4aee18d3, - 0x1cbc6750, - 0x10b242ee, - 0x10bc64b4, - 0xcfd0675b, - 0x637267de, - 0x221080f0, - 0x10a2472a, - 0x675b64b4, - 0x675b675b, - 0x62c4675b, - 0x816fb064, - 0x3d8f318f, - 0x92ffdfc0, - 0x710067de, - 0x22018041, - 0xb06447cd, - 0x225080f0, - 0xb0634345, - 0x22c18211, - 0x67a9473f, - 0x82116331, - 0x473122d1, - 0x221080f0, - 0x8161472a, - 0x31818172, - 0x31823d81, - 0xefb03d82, - 0x930292f1, - 0x62bb67de, - 0x81e391c3, - 0x1cab183b, - 0x10ab4b57, - 0x1c9b7000, - 0x109b4f5a, - 0x82307000, - 0x823106f0, - 0x06f13941, - 0x3012c012, - 0x7100b063, - 0x436d1e01, - 0x81611618, - 0x3d813181, - 0x1c281416, - 0xb0314770, - 0xc006c008, - 0x70006b62, - 0xb0638290, - 0x80417100, - 0x47cd2201, - 0x221180f1, - 0x10074793, - 0x91c081b0, - 0x18d381d3, - 0x4b8e18e3, - 0x675014e3, - 0x438e1cbc, - 0x64b410b2, - 0x820310bc, - 0x92f3dfa0, - 0x675b67de, - 0x107067a9, - 0xcf906b73, - 0x632067de, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0xc7f11812, - 0x4f9f1421, - 0x9162c812, - 0xb0319172, - 0xc0087000, - 0xc800c006, - 0x91709160, - 0x82017000, - 0x91c081b0, - 0x181081d0, - 0x18108151, - 0x82311406, - 0x06f13941, - 0x43be1e01, - 0xc0101618, - 0x1c083010, - 0x106047cc, - 0x10063c10, - 0x1461c7f1, - 0xc8164fc2, - 0x81719166, - 0x3d813181, - 0x4bc91c16, - 0xb0319176, - 0xc008c006, - 0x82017000, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa00367de, - 0x62976609, - 0x64b480a2, - 0xb0506297, - 0x62977100, - 0x82d092e0, - 0x47df2200, - 0x7000b2c0 +RFE_PATCH_TYPE patchGhsRfe[498] = +{ + 0x00006256, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x0100003f, + 0xff071f00, + 0x4030f00f, + 0x40014000, + 0x40074003, + 0x404f400f, + 0x41cf40cf, + 0x47cf43cf, + 0x3fcf4fcf, + 0x1fcf2fcf, + 0x00000fcf, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x000000a5, + 0x00000000, + 0x005500a5, + 0x00550055, + 0x00550050, + 0x00550055, + 0x00aa0050, + 0x00aa00aa, + 0x00aa0005, + 0x00aa00aa, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x003f0000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc0500000, + 0x70009100, + 0x9100c070, + 0x31827000, + 0x91310021, + 0x7000b110, + 0xb1018101, + 0x3182a100, + 0xb1109132, + 0x10119101, + 0x22418141, + 0x06f140a0, + 0xc0517000, + 0x18309101, + 0x31833910, + 0x3118d008, + 0x00316f41, + 0xb1109131, + 0x16141483, + 0x700068ac, + 0xc0501025, + 0xc3f49100, + 0x1420c0d0, + 0x10316f03, + 0xc0220441, + 0x00213182, + 0xb1109131, + 0x10313963, + 0xc0820441, + 0x00213182, + 0xb1109131, + 0x10313963, + 0x3182c0a2, + 0x91310021, + 0x1052b110, + 0x31151050, + 0x92051405, + 0x39448244, + 0x31431023, + 0x92431443, + 0x10308243, + 0xc1d13920, + 0x6f151401, + 0x31130633, + 0x40e71e03, + 0x06353835, + 0x1c2440ef, + 0x26f54cee, + 0x60ef90e5, + 0x700090e5, + 0xc0526490, + 0x06311031, + 0x02c13161, + 0xc1126493, + 0x39211031, + 0x31510671, + 0x649302e1, + 0x82207000, + 0x041078a1, + 0x663d4168, + 0xc088664c, + 0x39508220, + 0x1e003980, + 0xc041410e, + 0x14183001, + 0xc0891a18, + 0x39608230, + 0x1e003980, + 0xc0414118, + 0x14193001, + 0x648d1a19, + 0xb1109136, + 0xb1109134, + 0x7100b054, + 0xb064a054, + 0x220080f0, + 0x1240411e, + 0xb03290b0, + 0xc1116490, + 0x6493c122, + 0x692dc170, + 0xc0c2c111, + 0xc1706493, + 0xc0506932, + 0x72279100, + 0x16159298, + 0x10421614, + 0xc1f01053, + 0x31318221, + 0x39813931, + 0xb0513131, + 0x6625b270, + 0x92997227, + 0x1062b270, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0x6625101b, + 0x3182c0e2, + 0x31808260, + 0x00023980, + 0x7100b061, + 0xb1109132, + 0xb061a051, + 0x82537227, + 0x39533953, + 0xc23064f0, + 0x00006962, + 0x90b01280, + 0x7000b032, + 0x9101c051, + 0xc0e2cc01, + 0x64906493, + 0xc0c2c111, + 0xb0546493, + 0xa0547100, + 0x80f0b064, + 0x41712200, + 0x90b01240, + 0xc2f0b032, + 0xc111697c, + 0x6493c122, + 0x6981c0b0, + 0x9101c051, + 0x3182c0e2, + 0x00028260, + 0xb1109132, + 0x39538253, + 0x64f03953, + 0x698fc050, + 0x12800000, + 0xb03290b0, + 0x82537000, + 0x821064f0, + 0x419d22f0, + 0x0000c960, + 0x8220699b, + 0x041078a1, + 0xc05041d0, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x72276631, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x6631101a, + 0xb061a051, + 0xc0b07227, + 0x649069c0, + 0xc122c101, + 0xc1016493, + 0x6493c0c2, + 0x648d1a15, + 0xb1109135, + 0x90b012c0, + 0x7000b032, + 0xc1016490, + 0x6493c122, + 0xc0c2c101, + 0x82536493, + 0x12c064f0, + 0xb03290b0, + 0x64907000, + 0xc081c272, + 0xc1226493, + 0x6493c111, + 0xc111c002, + 0xc0626493, + 0x6493c331, + 0xc111c362, + 0xc3026493, + 0x6493c111, + 0x39538253, + 0xc3e264f0, + 0x22116498, + 0xc24241f3, + 0x6493c881, + 0xc111c252, + 0xc2726493, + 0x6493cee1, + 0xc881c202, + 0xc2026493, + 0x6493c801, + 0x6a07c0b0, + 0x64907000, + 0xc801c242, + 0xc2526493, + 0x6493c011, + 0xc0e1c272, + 0xc0026493, + 0x6493c101, + 0xc301c062, + 0xc1226493, + 0x6493c101, + 0xc101c362, + 0xc3026493, + 0x6493c101, + 0x64f08253, + 0xb0617000, + 0x14127100, + 0x4e2d1c23, + 0xb1109133, + 0x91327000, + 0x6a25b110, + 0xb0617000, + 0x18137100, + 0x4a391c32, + 0xb1109132, + 0x91337000, + 0x6a31b110, + 0xc0c27000, + 0x10156498, + 0x1612c0c2, + 0x31416498, + 0xc0c01415, + 0x14053180, + 0x78b01054, + 0x70000404, + 0x3186c0e6, + 0x1416cc01, + 0x82611067, + 0x0401c3f0, + 0x70001417, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xb0608081, + 0x8092a050, + 0x46762241, + 0xc1f18080, + 0x16300410, + 0x14011101, + 0x62896c01, + 0x628b628a, + 0x628d628c, + 0x628f628e, + 0x62936291, + 0x62896295, + 0x63db63d8, + 0xc0f28091, + 0x31210421, + 0x2a428082, + 0x16321412, + 0x14211101, + 0x629f6c01, + 0x62a562bb, + 0x629f63db, + 0x62a562bb, + 0x629763db, + 0x62976297, + 0x62976297, + 0x64ff6297, + 0x65956297, + 0x65dd6297, + 0x66096297, + 0x12106297, + 0x720e90b0, + 0x72057306, + 0x90301210, + 0xcff0625a, + 0xc64467de, + 0xc3c0c003, + 0x784064a5, + 0x78509150, + 0x78609210, + 0x78709220, + 0x78809230, + 0x78909260, + 0x78309290, + 0x82109190, + 0x06f03940, + 0x31101001, + 0x92001410, + 0xa0e06297, + 0x80f0a054, + 0x46c42250, + 0x22008040, + 0x62bc47cd, + 0x822da040, + 0x398d318d, + 0xc0f18210, + 0x10090410, + 0x394a821a, + 0x8210041a, + 0x04103980, + 0x10ab100e, + 0x10c010bc, + 0x14c03140, + 0x10c29240, + 0xcfe064b4, + 0xb01367de, + 0x67a3b003, + 0xb050b053, + 0xb064b054, + 0x675bb013, + 0x22e08210, + 0x679446ee, + 0x91c081b0, + 0xb06381d5, + 0x80417100, + 0x47cd2201, + 0x221080f0, + 0xb064472a, + 0x42ee2231, + 0x81b0b063, + 0x81d391c0, + 0x4f0118d3, + 0x67a981d5, + 0x710062ee, + 0x22018041, + 0x80f047cd, + 0x472a2210, + 0x2231b064, + 0xb0634301, + 0x91c081b0, + 0x105081d3, + 0x18301035, + 0x4eee16a0, + 0x4aee18d3, + 0x1cbc6750, + 0x10b242ee, + 0x10bc64b4, + 0xcfd0675b, + 0x637267de, + 0x221080f0, + 0x10a2472a, + 0x675b64b4, + 0x675b675b, + 0x62c4675b, + 0x816fb064, + 0x3d8f318f, + 0x92ffdfc0, + 0x710067de, + 0x22018041, + 0xb06447cd, + 0x225080f0, + 0xb0634345, + 0x22c18211, + 0x67a9473f, + 0x82116331, + 0x473122d1, + 0x221080f0, + 0x8161472a, + 0x31818172, + 0x31823d81, + 0xefb03d82, + 0x930292f1, + 0x62bb67de, + 0x81e391c3, + 0x1cab183b, + 0x10ab4b57, + 0x1c9b7000, + 0x109b4f5a, + 0x82307000, + 0x823106f0, + 0x06f13941, + 0x3012c012, + 0x7100b063, + 0x436d1e01, + 0x81611618, + 0x3d813181, + 0x1c281416, + 0xb0314770, + 0xc006c008, + 0x70006b62, + 0xb0638290, + 0x80417100, + 0x47cd2201, + 0x221180f1, + 0x10074793, + 0x91c081b0, + 0x18d381d3, + 0x4b8e18e3, + 0x675014e3, + 0x438e1cbc, + 0x64b410b2, + 0x820310bc, + 0x92f3dfa0, + 0x675b67de, + 0x107067a9, + 0xcf906b73, + 0x632067de, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0xc7f11812, + 0x4f9f1421, + 0x9162c812, + 0xb0319172, + 0xc0087000, + 0xc800c006, + 0x91709160, + 0x82017000, + 0x91c081b0, + 0x181081d0, + 0x18108151, + 0x82311406, + 0x06f13941, + 0x43be1e01, + 0xc0101618, + 0x1c083010, + 0x106047cc, + 0x10063c10, + 0x1461c7f1, + 0xc8164fc2, + 0x81719166, + 0x3d813181, + 0x4bc91c16, + 0xb0319176, + 0xc008c006, + 0x82017000, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa00367de, + 0x62976609, + 0x64b480a2, + 0xb0506297, + 0x62977100, + 0x82d092e0, + 0x47df2200, + 0x7000b2c0 }; PATCH_FUN_SPEC void rf_patch_rfe_ghs(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 498; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchGhsRfe[i]; - } + uint32_t i; + + for (i = 0; i < 498; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchGhsRfe[i]; + } + #else - const uint32_t *pS = patchGhsRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 62; + const uint32_t* pS = patchGhsRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 62; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - *pD++ = t1; - *pD++ = t2; + t1 = *pS++; + t2 = *pS++; + *pD++ = t1; + *pD++ = t2; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_hsp_4mbps.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_hsp_4mbps.h index 891ee2a3..be35b000 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_hsp_4mbps.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_hsp_4mbps.h @@ -44,379 +44,384 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchHsp4mbpsRfe[321] = { - 0x0000611f, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x00000000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0x40300007, - 0x40014000, - 0x40074003, - 0x404f400f, - 0x41cf40cf, - 0x47cf43cf, - 0x3fcf4fcf, - 0x1fcf2fcf, - 0x02070fcf, - 0x4040067f, - 0x40404040, - 0x20403040, - 0x00401040, - 0x01c000c0, - 0x07c003c0, - 0x0fc10fc0, - 0x0fc70fc3, - 0xc0500fcf, - 0x70009100, - 0x9100c070, - 0x31827000, - 0x91310021, - 0x7000b110, - 0xb1018101, - 0x3182a100, - 0xb1109132, - 0x10119101, - 0x22418141, - 0x06f14056, - 0xc0517000, - 0x18309101, - 0x31833910, - 0x3118d008, - 0x00316f41, - 0xb1109131, - 0x16141483, - 0x70006862, - 0xc0501025, - 0xc3f49100, - 0x1420c210, - 0x10316f03, - 0xc0220441, - 0x00213182, - 0xb1109131, - 0x10313963, - 0xc0820441, - 0x00213182, - 0xb1109131, - 0x10313963, - 0x3182c0a2, - 0x91310021, - 0x1050b110, - 0x14053115, - 0x70009205, - 0xc0526446, - 0x06311031, - 0x02c13161, - 0xc1126449, - 0x39211031, - 0x31510671, - 0x644902e1, - 0xc0517000, - 0xcc019101, - 0x6449c0e2, - 0xc1116446, - 0x6449c0c2, - 0x7100b054, - 0xb064a054, - 0x220080f0, - 0xc11140a4, - 0x6449c122, - 0x9101c051, - 0x3182c0e2, - 0x00028260, - 0xb1109132, - 0x68b7c300, - 0x12406446, - 0xb03290b0, - 0x39538253, - 0x648c3953, - 0x68c1c360, - 0x90b01280, - 0x7000b032, - 0xc1016446, - 0x6449c122, - 0xc0c2c101, - 0x82536449, - 0x12c0648c, - 0xb03290b0, - 0x64467000, - 0xc081c272, - 0xc1226449, - 0x6449c111, - 0xc111c002, - 0xc0626449, - 0x6449c331, - 0xc111c362, - 0xc3026449, - 0x6449c111, - 0x39538253, - 0xc3e2648c, - 0x2211644e, - 0xc24240e9, - 0x6449c881, - 0xc111c252, - 0xc2726449, - 0x6449cee1, - 0xc881c202, - 0xc2026449, - 0x6449c801, - 0x68fdc0b0, - 0x64467000, - 0xc801c242, - 0xc2526449, - 0x6449c011, - 0xc0e1c272, - 0xc0026449, - 0x6449c101, - 0xc301c062, - 0xc1226449, - 0x6449c101, - 0xc101c362, - 0xc3026449, - 0x6449c101, - 0x648c8253, - 0x00007000, - 0x00000000, - 0x73060000, - 0x720b7205, - 0xb050720e, - 0xb0607100, - 0x8081a050, - 0x22418092, - 0x8080453e, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61526151, - 0x61546153, - 0x61566155, - 0x61596157, - 0x615d615b, - 0x6151615f, - 0xc0f28091, - 0x31210421, - 0x2a428082, - 0x16321412, - 0x14211101, - 0x61706c01, - 0x6174618b, - 0x61706151, - 0x6174618b, - 0x61616151, - 0x61616161, - 0x61616161, - 0x649b6161, - 0x64c66161, - 0x64d36161, - 0x64ff6161, - 0x666e6161, - 0x12106161, - 0x616690b0, - 0x90b01220, - 0x7306720e, - 0x12107205, - 0x61239030, - 0x00000000, - 0x00000000, - 0xc003c024, - 0x645bc3c0, - 0x9159c4b9, - 0x9160c800, - 0x9200c2d0, - 0x9260c3f0, - 0x3140c060, - 0x0010c0f1, - 0xc0213140, - 0x92100010, - 0x9221c371, - 0x00006161, - 0x00000000, - 0x73060000, - 0x82188159, - 0x108f108e, - 0x041ec0f1, - 0x041f394f, - 0x664110f2, - 0x10f010f7, - 0x14f03110, - 0x822b1008, - 0x39808210, - 0x180a10ba, - 0x140c10bc, - 0x1210c04d, - 0x722490e0, - 0x8040a054, - 0x461c2200, - 0x221080f0, - 0x61a545ae, - 0x72248244, - 0x222180f1, - 0x7b104604, - 0x662c9190, - 0x1ca581d5, - 0x1cc549e1, - 0x1cb54dd4, - 0x18b549c7, - 0x4a001cd5, - 0x42001ce7, - 0x2204b240, - 0x1a174200, - 0x105061ee, - 0x180510b5, - 0x4a001cd5, - 0x42001cf7, - 0x2204b240, - 0x16174200, - 0x620061ee, - 0x42001ce7, - 0x91c518b5, - 0x107081e5, - 0x1ce01850, - 0x100749df, - 0x10e761ee, - 0x1cf761ee, - 0x10b14200, - 0x91c11851, - 0x107081e1, - 0x1cf01410, - 0x10074ded, - 0x10f761ee, - 0xa240b241, - 0x80f11072, - 0x46042221, - 0x82086641, - 0x9290c0c0, - 0xb051b061, - 0x92701250, - 0xb0617100, - 0x7227a051, - 0x22008040, - 0x621141ae, - 0x91907b20, - 0x8203662c, - 0x31858165, - 0xb0313d85, - 0x92f3eff0, - 0x66649305, - 0xb054a003, - 0x7100b050, - 0x22018041, - 0xb064461c, - 0x222080f0, - 0x6211418b, - 0xa050b060, - 0x31828162, - 0x82033d82, - 0x92f3efe0, - 0x66649302, - 0x6161720e, - 0x00000000, - 0x00000000, - 0xb013b003, - 0xb0531201, - 0x7100b050, - 0x22018041, - 0xb063461c, - 0x91c381b3, - 0x188581d5, - 0x91651895, - 0x00007000, - 0x00000000, - 0x10250000, - 0x9100c050, - 0x1420c330, - 0x10316f03, - 0x0401c3f0, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0xc3f01031, - 0xc0820401, - 0x00213182, - 0xb1109131, - 0x10313963, - 0x3182c0a2, - 0x91310021, - 0x1050b110, - 0x14053115, - 0x70009205, - 0x82d092e0, - 0x46652200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304281, - 0x3162c102, - 0x80a0c001, - 0x427a1e00, - 0x427b22f0, - 0x3160e820, - 0x627b3960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006a7c +RFE_PATCH_TYPE patchHsp4mbpsRfe[321] = +{ + 0x0000611f, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x00000000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0x40300007, + 0x40014000, + 0x40074003, + 0x404f400f, + 0x41cf40cf, + 0x47cf43cf, + 0x3fcf4fcf, + 0x1fcf2fcf, + 0x02070fcf, + 0x4040067f, + 0x40404040, + 0x20403040, + 0x00401040, + 0x01c000c0, + 0x07c003c0, + 0x0fc10fc0, + 0x0fc70fc3, + 0xc0500fcf, + 0x70009100, + 0x9100c070, + 0x31827000, + 0x91310021, + 0x7000b110, + 0xb1018101, + 0x3182a100, + 0xb1109132, + 0x10119101, + 0x22418141, + 0x06f14056, + 0xc0517000, + 0x18309101, + 0x31833910, + 0x3118d008, + 0x00316f41, + 0xb1109131, + 0x16141483, + 0x70006862, + 0xc0501025, + 0xc3f49100, + 0x1420c210, + 0x10316f03, + 0xc0220441, + 0x00213182, + 0xb1109131, + 0x10313963, + 0xc0820441, + 0x00213182, + 0xb1109131, + 0x10313963, + 0x3182c0a2, + 0x91310021, + 0x1050b110, + 0x14053115, + 0x70009205, + 0xc0526446, + 0x06311031, + 0x02c13161, + 0xc1126449, + 0x39211031, + 0x31510671, + 0x644902e1, + 0xc0517000, + 0xcc019101, + 0x6449c0e2, + 0xc1116446, + 0x6449c0c2, + 0x7100b054, + 0xb064a054, + 0x220080f0, + 0xc11140a4, + 0x6449c122, + 0x9101c051, + 0x3182c0e2, + 0x00028260, + 0xb1109132, + 0x68b7c300, + 0x12406446, + 0xb03290b0, + 0x39538253, + 0x648c3953, + 0x68c1c360, + 0x90b01280, + 0x7000b032, + 0xc1016446, + 0x6449c122, + 0xc0c2c101, + 0x82536449, + 0x12c0648c, + 0xb03290b0, + 0x64467000, + 0xc081c272, + 0xc1226449, + 0x6449c111, + 0xc111c002, + 0xc0626449, + 0x6449c331, + 0xc111c362, + 0xc3026449, + 0x6449c111, + 0x39538253, + 0xc3e2648c, + 0x2211644e, + 0xc24240e9, + 0x6449c881, + 0xc111c252, + 0xc2726449, + 0x6449cee1, + 0xc881c202, + 0xc2026449, + 0x6449c801, + 0x68fdc0b0, + 0x64467000, + 0xc801c242, + 0xc2526449, + 0x6449c011, + 0xc0e1c272, + 0xc0026449, + 0x6449c101, + 0xc301c062, + 0xc1226449, + 0x6449c101, + 0xc101c362, + 0xc3026449, + 0x6449c101, + 0x648c8253, + 0x00007000, + 0x00000000, + 0x73060000, + 0x720b7205, + 0xb050720e, + 0xb0607100, + 0x8081a050, + 0x22418092, + 0x8080453e, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61526151, + 0x61546153, + 0x61566155, + 0x61596157, + 0x615d615b, + 0x6151615f, + 0xc0f28091, + 0x31210421, + 0x2a428082, + 0x16321412, + 0x14211101, + 0x61706c01, + 0x6174618b, + 0x61706151, + 0x6174618b, + 0x61616151, + 0x61616161, + 0x61616161, + 0x649b6161, + 0x64c66161, + 0x64d36161, + 0x64ff6161, + 0x666e6161, + 0x12106161, + 0x616690b0, + 0x90b01220, + 0x7306720e, + 0x12107205, + 0x61239030, + 0x00000000, + 0x00000000, + 0xc003c024, + 0x645bc3c0, + 0x9159c4b9, + 0x9160c800, + 0x9200c2d0, + 0x9260c3f0, + 0x3140c060, + 0x0010c0f1, + 0xc0213140, + 0x92100010, + 0x9221c371, + 0x00006161, + 0x00000000, + 0x73060000, + 0x82188159, + 0x108f108e, + 0x041ec0f1, + 0x041f394f, + 0x664110f2, + 0x10f010f7, + 0x14f03110, + 0x822b1008, + 0x39808210, + 0x180a10ba, + 0x140c10bc, + 0x1210c04d, + 0x722490e0, + 0x8040a054, + 0x461c2200, + 0x221080f0, + 0x61a545ae, + 0x72248244, + 0x222180f1, + 0x7b104604, + 0x662c9190, + 0x1ca581d5, + 0x1cc549e1, + 0x1cb54dd4, + 0x18b549c7, + 0x4a001cd5, + 0x42001ce7, + 0x2204b240, + 0x1a174200, + 0x105061ee, + 0x180510b5, + 0x4a001cd5, + 0x42001cf7, + 0x2204b240, + 0x16174200, + 0x620061ee, + 0x42001ce7, + 0x91c518b5, + 0x107081e5, + 0x1ce01850, + 0x100749df, + 0x10e761ee, + 0x1cf761ee, + 0x10b14200, + 0x91c11851, + 0x107081e1, + 0x1cf01410, + 0x10074ded, + 0x10f761ee, + 0xa240b241, + 0x80f11072, + 0x46042221, + 0x82086641, + 0x9290c0c0, + 0xb051b061, + 0x92701250, + 0xb0617100, + 0x7227a051, + 0x22008040, + 0x621141ae, + 0x91907b20, + 0x8203662c, + 0x31858165, + 0xb0313d85, + 0x92f3eff0, + 0x66649305, + 0xb054a003, + 0x7100b050, + 0x22018041, + 0xb064461c, + 0x222080f0, + 0x6211418b, + 0xa050b060, + 0x31828162, + 0x82033d82, + 0x92f3efe0, + 0x66649302, + 0x6161720e, + 0x00000000, + 0x00000000, + 0xb013b003, + 0xb0531201, + 0x7100b050, + 0x22018041, + 0xb063461c, + 0x91c381b3, + 0x188581d5, + 0x91651895, + 0x00007000, + 0x00000000, + 0x10250000, + 0x9100c050, + 0x1420c330, + 0x10316f03, + 0x0401c3f0, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0xc3f01031, + 0xc0820401, + 0x00213182, + 0xb1109131, + 0x10313963, + 0x3182c0a2, + 0x91310021, + 0x1050b110, + 0x14053115, + 0x70009205, + 0x82d092e0, + 0x46652200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304281, + 0x3162c102, + 0x80a0c001, + 0x427a1e00, + 0x427b22f0, + 0x3160e820, + 0x627b3960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006a7c }; PATCH_FUN_SPEC void rf_patch_rfe_hsp_4mbps(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 321; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchHsp4mbpsRfe[i]; - } + uint32_t i; + + for (i = 0; i < 321; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchHsp4mbpsRfe[i]; + } + #else - const uint32_t *pS = patchHsp4mbpsRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 40; + const uint32_t* pS = patchHsp4mbpsRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 40; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - *pD++ = t1; + t1 = *pS++; + *pD++ = t1; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_lrm.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_lrm.h index 6b71eff7..dd659ed3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_lrm.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_lrm.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchLrmRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchLrmRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_lrm(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchLrmRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchLrmRfe[i]; + } + #else - const uint32_t *pS = patchLrmRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchLrmRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_sl_longrange.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_sl_longrange.h index 8d193139..5b0a71d2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_sl_longrange.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_sl_longrange.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchSl_longrangeRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchSl_longrangeRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_sl_longrange(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchSl_longrangeRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchSl_longrangeRfe[i]; + } + #else - const uint32_t *pS = patchSl_longrangeRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchSl_longrangeRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wb_dsss.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wb_dsss.h index cf5f7a8c..ccfdadcf 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wb_dsss.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wb_dsss.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchWb_dsssRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchWb_dsssRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_wb_dsss(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchWb_dsssRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchWb_dsssRfe[i]; + } + #else - const uint32_t *pS = patchWb_dsssRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchWb_dsssRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_ctmode.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_ctmode.h index 2ff29c6b..a43f2846 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_ctmode.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_ctmode.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchWmbus_ctmodeRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchWmbus_ctmodeRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_wmbus_ctmode(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchWmbus_ctmodeRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchWmbus_ctmodeRfe[i]; + } + #else - const uint32_t *pS = patchWmbus_ctmodeRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchWmbus_ctmodeRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_smode.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_smode.h index 7b8b7a00..85c9fccc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_smode.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x0/rf_patches/rf_patch_rfe_wmbus_smode.h @@ -44,495 +44,500 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchWmbus_smodeRfe[429] = { - 0x000061a3, - 0x1307147f, - 0x24f1004d, - 0x3f131f2e, - 0x003f0ab0, - 0x0000ff07, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x6599658a, - 0x8220c088, - 0x39803950, - 0x409f1e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40a91e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40af2200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6485, - 0xc122c111, - 0xc1706442, - 0xc11168c2, - 0x6442c0c2, - 0x68c7c170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276572, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26572, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f3c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x7227657e, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x657e101a, - 0xb061a051, - 0xc0b07227, - 0x643f6918, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64858253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64853953, - 0x6447c3e2, - 0x41402211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006954, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006485, - 0x7100b061, - 0x1c231412, - 0x91334d7a, - 0x7000b110, - 0xb1109132, - 0x70006972, - 0x7100b061, - 0x1c321813, - 0x91324986, - 0x7000b110, - 0xb1109133, - 0x7000697e, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478a0, - 0xc0e67000, - 0xcc013186, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c3, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61d761d6, - 0x61d961d8, - 0x61db61da, - 0x61de61dc, - 0x61e261e0, - 0x633661e4, - 0x80916339, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x620b61ee, - 0x633961f4, - 0x620b61ee, - 0x633961f4, - 0x61e661e6, - 0x61e661e6, - 0x61e661e6, - 0x61e66494, - 0x61e664f9, - 0x61e6652a, - 0x61e66556, - 0x61e66746, - 0x90b01210, - 0x7306720e, - 0x12107205, - 0x61a79030, - 0x673ccff0, - 0xc003c1d4, - 0x6454c3c0, - 0x91507840, - 0x92107850, - 0x92207860, - 0x92307870, - 0x92407880, - 0x92607890, - 0x91907830, - 0x39408210, - 0x100106f0, - 0x14103110, - 0x67429200, - 0xa0bc61e6, - 0xa054a0e2, - 0x225080f0, - 0x80404615, - 0x472b2200, - 0xa040620d, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673c, - 0x66c8b003, - 0xb050b053, - 0xb064b054, - 0x66a5b013, - 0x22e08210, - 0x66ae4638, - 0x80417100, - 0x472b2201, - 0x221080f0, - 0x22f0464b, - 0xb0644718, - 0x42382231, - 0x66ceb063, - 0x22e08210, - 0x66704638, - 0xb0646238, - 0x318f816f, - 0xdfd03d8f, - 0x673c92ff, - 0x80417100, - 0x472b2201, - 0x80f0b064, - 0x42652250, - 0x8211b063, - 0x466022c1, - 0x670566ce, - 0x22d18211, - 0x66704652, - 0x81616252, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x620b673c, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e7f, - 0x1ce31613, - 0x91c34aa4, - 0x143b81e3, - 0x1cba6290, - 0x1e23468b, - 0x1ce34a8b, - 0xb2904e8b, - 0x428b2207, - 0x1a1ba290, - 0x1ce36296, - 0x91c34aa4, - 0x183b81e3, - 0x4ea01cab, - 0x4aa21c9b, - 0x42a41cbc, - 0x821010b2, - 0x429d22d0, - 0x221080f0, - 0x646346a4, - 0x62a466a5, - 0x629410ab, - 0x6294109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aa8, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4abf1c12, - 0xb032b0e2, - 0x92f2dfb0, - 0xc7f1673c, - 0x4ec31421, - 0x9162c812, - 0xb0319172, - 0x7000b0e1, - 0xc006c008, - 0x9160c800, - 0x70009170, - 0x81b08201, - 0x81d091c0, - 0x81511810, - 0x14061810, - 0x824280e1, - 0x3d823182, - 0x4ae41c20, - 0x2221b0e2, - 0xb03246e8, - 0xdfa01005, - 0x673c92f5, - 0x42e82221, - 0xb032a0e2, - 0x39418231, - 0x0401c0f0, - 0x42f61e01, - 0xc0101618, - 0x1c083010, - 0x10604704, - 0x10063c10, - 0x1461c7f1, - 0xc8164efa, - 0x81719166, - 0x3d813181, - 0x4b011c16, - 0xb0319176, - 0xc008c006, - 0x81617000, - 0x3d813181, - 0x39808240, - 0x1cf11801, - 0x14014b17, - 0x22c080b0, - 0xb0bc4717, - 0xef90b033, - 0x930f92f1, - 0x7000673c, - 0xb063a003, - 0xb0efb064, - 0x71006556, - 0x22008040, - 0xb064472b, - 0xa0ef652a, - 0x80407100, - 0x472b2200, - 0xb003b064, - 0x82016238, - 0x31828162, - 0xef803d82, - 0x930292f1, - 0xa003673c, - 0x61e66556, - 0x646380a2, - 0xb05061e6, - 0x61e67100, - 0x82d092e0, - 0x473d2200, - 0x7000b2c0, - 0x22f080a0, - 0xb0304359, - 0x3162c102, - 0x80a0c001, - 0x43521e00, - 0x435322f0, - 0x3160f5a0, - 0x63533960, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006b54 +RFE_PATCH_TYPE patchWmbus_smodeRfe[429] = +{ + 0x000061a3, + 0x1307147f, + 0x24f1004d, + 0x3f131f2e, + 0x003f0ab0, + 0x0000ff07, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x6599658a, + 0x8220c088, + 0x39803950, + 0x409f1e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40a91e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40af2200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6485, + 0xc122c111, + 0xc1706442, + 0xc11168c2, + 0x6442c0c2, + 0x68c7c170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276572, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26572, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f3c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x7227657e, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x657e101a, + 0xb061a051, + 0xc0b07227, + 0x643f6918, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64858253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64853953, + 0x6447c3e2, + 0x41402211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006954, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006485, + 0x7100b061, + 0x1c231412, + 0x91334d7a, + 0x7000b110, + 0xb1109132, + 0x70006972, + 0x7100b061, + 0x1c321813, + 0x91324986, + 0x7000b110, + 0xb1109133, + 0x7000697e, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478a0, + 0xc0e67000, + 0xcc013186, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c3, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61d761d6, + 0x61d961d8, + 0x61db61da, + 0x61de61dc, + 0x61e261e0, + 0x633661e4, + 0x80916339, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x620b61ee, + 0x633961f4, + 0x620b61ee, + 0x633961f4, + 0x61e661e6, + 0x61e661e6, + 0x61e661e6, + 0x61e66494, + 0x61e664f9, + 0x61e6652a, + 0x61e66556, + 0x61e66746, + 0x90b01210, + 0x7306720e, + 0x12107205, + 0x61a79030, + 0x673ccff0, + 0xc003c1d4, + 0x6454c3c0, + 0x91507840, + 0x92107850, + 0x92207860, + 0x92307870, + 0x92407880, + 0x92607890, + 0x91907830, + 0x39408210, + 0x100106f0, + 0x14103110, + 0x67429200, + 0xa0bc61e6, + 0xa054a0e2, + 0x225080f0, + 0x80404615, + 0x472b2200, + 0xa040620d, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673c, + 0x66c8b003, + 0xb050b053, + 0xb064b054, + 0x66a5b013, + 0x22e08210, + 0x66ae4638, + 0x80417100, + 0x472b2201, + 0x221080f0, + 0x22f0464b, + 0xb0644718, + 0x42382231, + 0x66ceb063, + 0x22e08210, + 0x66704638, + 0xb0646238, + 0x318f816f, + 0xdfd03d8f, + 0x673c92ff, + 0x80417100, + 0x472b2201, + 0x80f0b064, + 0x42652250, + 0x8211b063, + 0x466022c1, + 0x670566ce, + 0x22d18211, + 0x66704652, + 0x81616252, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x620b673c, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e7f, + 0x1ce31613, + 0x91c34aa4, + 0x143b81e3, + 0x1cba6290, + 0x1e23468b, + 0x1ce34a8b, + 0xb2904e8b, + 0x428b2207, + 0x1a1ba290, + 0x1ce36296, + 0x91c34aa4, + 0x183b81e3, + 0x4ea01cab, + 0x4aa21c9b, + 0x42a41cbc, + 0x821010b2, + 0x429d22d0, + 0x221080f0, + 0x646346a4, + 0x62a466a5, + 0x629410ab, + 0x6294109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aa8, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4abf1c12, + 0xb032b0e2, + 0x92f2dfb0, + 0xc7f1673c, + 0x4ec31421, + 0x9162c812, + 0xb0319172, + 0x7000b0e1, + 0xc006c008, + 0x9160c800, + 0x70009170, + 0x81b08201, + 0x81d091c0, + 0x81511810, + 0x14061810, + 0x824280e1, + 0x3d823182, + 0x4ae41c20, + 0x2221b0e2, + 0xb03246e8, + 0xdfa01005, + 0x673c92f5, + 0x42e82221, + 0xb032a0e2, + 0x39418231, + 0x0401c0f0, + 0x42f61e01, + 0xc0101618, + 0x1c083010, + 0x10604704, + 0x10063c10, + 0x1461c7f1, + 0xc8164efa, + 0x81719166, + 0x3d813181, + 0x4b011c16, + 0xb0319176, + 0xc008c006, + 0x81617000, + 0x3d813181, + 0x39808240, + 0x1cf11801, + 0x14014b17, + 0x22c080b0, + 0xb0bc4717, + 0xef90b033, + 0x930f92f1, + 0x7000673c, + 0xb063a003, + 0xb0efb064, + 0x71006556, + 0x22008040, + 0xb064472b, + 0xa0ef652a, + 0x80407100, + 0x472b2200, + 0xb003b064, + 0x82016238, + 0x31828162, + 0xef803d82, + 0x930292f1, + 0xa003673c, + 0x61e66556, + 0x646380a2, + 0xb05061e6, + 0x61e67100, + 0x82d092e0, + 0x473d2200, + 0x7000b2c0, + 0x22f080a0, + 0xb0304359, + 0x3162c102, + 0x80a0c001, + 0x43521e00, + 0x435322f0, + 0x3160f5a0, + 0x63533960, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006b54 }; PATCH_FUN_SPEC void rf_patch_rfe_wmbus_smode(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 429; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchWmbus_smodeRfe[i]; - } + uint32_t i; + + for (i = 0; i < 429; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchWmbus_smodeRfe[i]; + } + #else - const uint32_t *pS = patchWmbus_smodeRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchWmbus_smodeRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/adi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/adi.h index afbd663f..969c8deb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/adi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/adi.h @@ -109,8 +109,8 @@ extern "C" static bool ADIBaseValid(uint32_t ui32Base) { - return(ui32Base == ADI2_BASE || ui32Base == ADI3_BASE || - ui32Base == AUX_ADI4_BASE); + return (ui32Base == ADI2_BASE || ui32Base == ADI3_BASE || + ui32Base == AUX_ADI4_BASE); } #endif @@ -268,7 +268,7 @@ ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the register and return the value. - return(HWREGB(ui32Base + ui32Reg)); + return (HWREGB(ui32Base + ui32Reg)); } //***************************************************************************** @@ -303,7 +303,7 @@ ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the registers and return the value. - return(HWREGH(ui32Base + (ui32Reg & 0xFE))); + return (HWREGH(ui32Base + (ui32Reg & 0xFE))); } //***************************************************************************** @@ -336,7 +336,7 @@ ADI32RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the registers and return the value. - return(HWREG(ui32Base + (ui32Reg & 0xFC))); + return (HWREG(ui32Base + (ui32Reg & 0xFC))); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aes.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aes.h index eb199a42..2f21964b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aes.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aes.h @@ -84,15 +84,15 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AESStartDMAOperation NOROM_AESStartDMAOperation - #define AESSetInitializationVector NOROM_AESSetInitializationVector - #define AESWriteCCMInitializationVector NOROM_AESWriteCCMInitializationVector - #define AESReadTag NOROM_AESReadTag - #define AESVerifyTag NOROM_AESVerifyTag - #define AESWriteToKeyStore NOROM_AESWriteToKeyStore - #define AESReadFromKeyStore NOROM_AESReadFromKeyStore - #define AESWaitForIRQFlags NOROM_AESWaitForIRQFlags - #define AESConfigureCCMCtrl NOROM_AESConfigureCCMCtrl +#define AESStartDMAOperation NOROM_AESStartDMAOperation +#define AESSetInitializationVector NOROM_AESSetInitializationVector +#define AESWriteCCMInitializationVector NOROM_AESWriteCCMInitializationVector +#define AESReadTag NOROM_AESReadTag +#define AESVerifyTag NOROM_AESVerifyTag +#define AESWriteToKeyStore NOROM_AESWriteToKeyStore +#define AESReadFromKeyStore NOROM_AESReadFromKeyStore +#define AESWaitForIRQFlags NOROM_AESWaitForIRQFlags +#define AESConfigureCCMCtrl NOROM_AESConfigureCCMCtrl #endif @@ -213,7 +213,7 @@ extern "C" //! \return None // //***************************************************************************** -extern void AESStartDMAOperation(const uint8_t *channel0Addr, uint32_t channel0Length, uint8_t *channel1Addr, uint32_t channel1Length); +extern void AESStartDMAOperation(const uint8_t* channel0Addr, uint32_t channel0Length, uint8_t* channel1Addr, uint32_t channel1Length); //***************************************************************************** // @@ -254,7 +254,7 @@ extern void AESStartDMAOperation(const uint8_t *channel0Addr, uint32_t channel0L //! \return None // //***************************************************************************** -extern void AESSetInitializationVector(const uint32_t *initializationVector); +extern void AESSetInitializationVector(const uint32_t* initializationVector); //***************************************************************************** // @@ -269,7 +269,7 @@ extern void AESSetInitializationVector(const uint32_t *initializationVector); //! \return None // //***************************************************************************** -extern void AESWriteCCMInitializationVector(const uint8_t *nonce, uint32_t nonceLength); +extern void AESWriteCCMInitializationVector(const uint8_t* nonce, uint32_t nonceLength); //***************************************************************************** // @@ -287,7 +287,7 @@ extern void AESWriteCCMInitializationVector(const uint8_t *nonce, uint32_t nonce //! - \ref AES_SUCCESS otherwise // //***************************************************************************** -extern uint32_t AESReadTag(uint8_t *tag, uint32_t tagLength); +extern uint32_t AESReadTag(uint8_t* tag, uint32_t tagLength); //***************************************************************************** // @@ -308,7 +308,7 @@ extern uint32_t AESReadTag(uint8_t *tag, uint32_t tagLength); //! - \ref AES_SUCCESS otherwise // //***************************************************************************** -extern uint32_t AESVerifyTag(const uint8_t *tag, uint32_t tagLength); +extern uint32_t AESVerifyTag(const uint8_t* tag, uint32_t tagLength); //***************************************************************************** // @@ -367,7 +367,7 @@ extern uint32_t AESVerifyTag(const uint8_t *tag, uint32_t tagLength); //! \sa AESReadFromKeyStore // //***************************************************************************** -extern uint32_t AESWriteToKeyStore(const uint8_t *aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea); +extern uint32_t AESWriteToKeyStore(const uint8_t* aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea); //***************************************************************************** // @@ -666,7 +666,7 @@ __STATIC_INLINE uint32_t AESIntStatusMasked(void) // Return the masked interrupt status mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -688,7 +688,7 @@ __STATIC_INLINE uint32_t AESIntStatusMasked(void) __STATIC_INLINE uint32_t AESIntStatusRaw(void) { // Return either the raw interrupt status - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -784,43 +784,43 @@ __STATIC_INLINE void AESIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AESStartDMAOperation - #undef AESStartDMAOperation - #define AESStartDMAOperation ROM_AESStartDMAOperation - #endif - #ifdef ROM_AESSetInitializationVector - #undef AESSetInitializationVector - #define AESSetInitializationVector ROM_AESSetInitializationVector - #endif - #ifdef ROM_AESWriteCCMInitializationVector - #undef AESWriteCCMInitializationVector - #define AESWriteCCMInitializationVector ROM_AESWriteCCMInitializationVector - #endif - #ifdef ROM_AESReadTag - #undef AESReadTag - #define AESReadTag ROM_AESReadTag - #endif - #ifdef ROM_AESVerifyTag - #undef AESVerifyTag - #define AESVerifyTag ROM_AESVerifyTag - #endif - #ifdef ROM_AESWriteToKeyStore - #undef AESWriteToKeyStore - #define AESWriteToKeyStore ROM_AESWriteToKeyStore - #endif - #ifdef ROM_AESReadFromKeyStore - #undef AESReadFromKeyStore - #define AESReadFromKeyStore ROM_AESReadFromKeyStore - #endif - #ifdef ROM_AESWaitForIRQFlags - #undef AESWaitForIRQFlags - #define AESWaitForIRQFlags ROM_AESWaitForIRQFlags - #endif - #ifdef ROM_AESConfigureCCMCtrl - #undef AESConfigureCCMCtrl - #define AESConfigureCCMCtrl ROM_AESConfigureCCMCtrl - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AESStartDMAOperation +#undef AESStartDMAOperation +#define AESStartDMAOperation ROM_AESStartDMAOperation +#endif +#ifdef ROM_AESSetInitializationVector +#undef AESSetInitializationVector +#define AESSetInitializationVector ROM_AESSetInitializationVector +#endif +#ifdef ROM_AESWriteCCMInitializationVector +#undef AESWriteCCMInitializationVector +#define AESWriteCCMInitializationVector ROM_AESWriteCCMInitializationVector +#endif +#ifdef ROM_AESReadTag +#undef AESReadTag +#define AESReadTag ROM_AESReadTag +#endif +#ifdef ROM_AESVerifyTag +#undef AESVerifyTag +#define AESVerifyTag ROM_AESVerifyTag +#endif +#ifdef ROM_AESWriteToKeyStore +#undef AESWriteToKeyStore +#define AESWriteToKeyStore ROM_AESWriteToKeyStore +#endif +#ifdef ROM_AESReadFromKeyStore +#undef AESReadFromKeyStore +#define AESReadFromKeyStore ROM_AESReadFromKeyStore +#endif +#ifdef ROM_AESWaitForIRQFlags +#undef AESWaitForIRQFlags +#define AESWaitForIRQFlags ROM_AESWaitForIRQFlags +#endif +#ifdef ROM_AESConfigureCCMCtrl +#undef AESConfigureCCMCtrl +#define AESConfigureCCMCtrl ROM_AESConfigureCCMCtrl +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_batmon.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_batmon.h index ce7d3238..0a186b63 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_batmon.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_batmon.h @@ -81,7 +81,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONBatMonTemperatureGetDegC NOROM_AONBatMonTemperatureGetDegC +#define AONBatMonTemperatureGetDegC NOROM_AONBatMonTemperatureGetDegC #endif @@ -224,7 +224,7 @@ AONBatMonNewBatteryMeasureReady(void) AON_BATMON_BATUPD_STAT ? true : false; // Clear status bit if set. - if(bStatus) + if (bStatus) { HWREG(AON_BATMON_BASE + AON_BATMON_O_BATUPD) = 1; } @@ -263,7 +263,7 @@ AONBatMonNewTempMeasureReady(void) AON_BATMON_TEMPUPD_STAT ? true : false; // Clear status bit if set. - if(bStatus) + if (bStatus) { HWREG(AON_BATMON_BASE + AON_BATMON_O_TEMPUPD) = 1; } @@ -279,11 +279,11 @@ AONBatMonNewTempMeasureReady(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONBatMonTemperatureGetDegC - #undef AONBatMonTemperatureGetDegC - #define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONBatMonTemperatureGetDegC +#undef AONBatMonTemperatureGetDegC +#define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_event.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_event.h index 9c14b4db..54f50e6c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_event.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_event.h @@ -80,10 +80,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet - #define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet - #define AONEventMcuSet NOROM_AONEventMcuSet - #define AONEventMcuGet NOROM_AONEventMcuGet +#define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet +#define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet +#define AONEventMcuSet NOROM_AONEventMcuSet +#define AONEventMcuGet NOROM_AONEventMcuGet #endif //***************************************************************************** @@ -103,8 +103,8 @@ extern "C" #define AON_EVENT_BATMON_TEMP_LL 8 // BATMON event: Temperature level below lower limit #define AON_EVENT_BATMON_COMBINED 9 // Combined event from BATMON #define AON_EVENT_IO 32 // Edge detect on any DIO. Edge detect is enabled and configured in IOC. - // Event ID 33 is reserved for future use - // Event ID 34 is reserved for future use +// Event ID 33 is reserved for future use +// Event ID 34 is reserved for future use #define AON_EVENT_RTC_CH0 35 // RTC channel 0 #define AON_EVENT_RTC_CH1 36 // RTC channel 1 #define AON_EVENT_RTC_CH2 37 // RTC channel 2 @@ -127,7 +127,7 @@ extern "C" #define AON_EVENT_BATMON_VOLT 54 // BATMON voltage update event #define AON_EVENT_AUX_COMPB_ASYNC 55 // Comparator B triggered. Asynchronous signal directly from the AUX Comparator B #define AON_EVENT_AUX_COMPB_ASYNC_N 56 // Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B - // Event ID 57-62 is reserved for future use +// Event ID 57-62 is reserved for future use #define AON_EVENT_NONE 63 // No event, always low // Keeping backward compatibility until major revision number is incremented @@ -525,23 +525,23 @@ AONEventRtcGet(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONEventMcuWakeUpSet - #undef AONEventMcuWakeUpSet - #define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet - #endif - #ifdef ROM_AONEventMcuWakeUpGet - #undef AONEventMcuWakeUpGet - #define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet - #endif - #ifdef ROM_AONEventMcuSet - #undef AONEventMcuSet - #define AONEventMcuSet ROM_AONEventMcuSet - #endif - #ifdef ROM_AONEventMcuGet - #undef AONEventMcuGet - #define AONEventMcuGet ROM_AONEventMcuGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONEventMcuWakeUpSet +#undef AONEventMcuWakeUpSet +#define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet +#endif +#ifdef ROM_AONEventMcuWakeUpGet +#undef AONEventMcuWakeUpGet +#define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet +#endif +#ifdef ROM_AONEventMcuSet +#undef AONEventMcuSet +#define AONEventMcuSet ROM_AONEventMcuSet +#endif +#ifdef ROM_AONEventMcuGet +#undef AONEventMcuGet +#define AONEventMcuGet ROM_AONEventMcuGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_ioc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_ioc.h index 513e0e2d..f60cb031 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_ioc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_ioc.h @@ -186,7 +186,7 @@ AONIOCDriveStrengthGet(uint32_t ui32DriveLevel) (ui32DriveLevel == AONIOC_DRV_LVL_MAX)); // Return the drive strength value. - return( HWREG(AON_IOC_BASE + ui32DriveLevel) ); + return ( HWREG(AON_IOC_BASE + ui32DriveLevel) ); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_rtc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_rtc.h index a667e43c..58cd0975 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_rtc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aon_rtc.h @@ -80,7 +80,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONRTCCurrent64BitValueGet NOROM_AONRTCCurrent64BitValueGet +#define AONRTCCurrent64BitValueGet NOROM_AONRTCCurrent64BitValueGet #endif //***************************************************************************** @@ -226,7 +226,7 @@ __STATIC_INLINE bool AONRTCActive(void) { // Read if RTC is enabled - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN)); } //***************************************************************************** @@ -249,22 +249,22 @@ AONRTCChannelActive(uint32_t ui32Channel) { uint32_t uint32Status = 0; - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN); } - return(uint32Status); + return (uint32Status); } //***************************************************************************** @@ -371,17 +371,17 @@ AONRTCEventClear(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH0; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH1; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH2; } @@ -414,22 +414,22 @@ AONRTCEventGet(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH0_BITN); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH1_BITN); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH2_BITN); } - return(uint32Event); + return (uint32Event); } //***************************************************************************** @@ -457,7 +457,7 @@ AONRTCSecGet(void) { // The following read gets the seconds, but also latches the fractional // part. - return(HWREG(AON_RTC_BASE + AON_RTC_O_SEC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SEC)); } //***************************************************************************** @@ -489,7 +489,7 @@ AONRTCFractionGet(void) // consistent reading. // Note3: Interrupts must be disabled between the call to AONRTCSecGet() and this // call since there are interrupt functions that reads AON_RTC_O_SEC - return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC)); } //***************************************************************************** @@ -513,7 +513,7 @@ AONRTCFractionGet(void) __STATIC_INLINE uint32_t AONRTCSubSecIncrGet(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSECINC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SUBSECINC)); } //***************************************************************************** @@ -564,7 +564,7 @@ AONRTCModeCh1Set(uint32_t ui32Mode) __STATIC_INLINE uint32_t AONRTCModeCh1Get(void) { - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_CAPT_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_CAPT_EN_BITN)); } //***************************************************************************** @@ -621,7 +621,7 @@ AONRTCModeCh2Set(uint32_t ui32Mode) __STATIC_INLINE uint32_t AONRTCModeCh2Get(void) { - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_CONT_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_CONT_EN_BITN)); } //***************************************************************************** @@ -651,17 +651,17 @@ AONRTCChannelEnable(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN) = 1; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN) = 1; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN) = 1; } @@ -694,17 +694,17 @@ AONRTCChannelDisable(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN) = 0; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN) = 0; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN) = 0; } @@ -741,17 +741,17 @@ AONRTCCompareValueSet(uint32_t ui32Channel, uint32_t ui32CompValue) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREG(AON_RTC_BASE + AON_RTC_O_CH0CMP) = ui32CompValue; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREG(AON_RTC_BASE + AON_RTC_O_CH1CMP) = ui32CompValue; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMP) = ui32CompValue; } @@ -782,22 +782,22 @@ AONRTCCompareValueGet(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH0CMP); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH1CMP); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMP); } - return(ui32Value); + return (ui32Value); } //***************************************************************************** @@ -818,7 +818,7 @@ AONRTCCompareValueGet(uint32_t ui32Channel) __STATIC_INLINE uint32_t AONRTCCurrentCompareValueGet( void ) { - return ( HWREG( AON_RTC_BASE + AON_RTC_O_TIME )); + return ( HWREG( AON_RTC_BASE + AON_RTC_O_TIME )); } //***************************************************************************** @@ -876,7 +876,7 @@ AONRTCIncValueCh2Set(uint32_t ui32IncValue) __STATIC_INLINE uint32_t AONRTCIncValueCh2Get(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMPINC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMPINC)); } //***************************************************************************** @@ -894,7 +894,7 @@ AONRTCIncValueCh2Get(void) __STATIC_INLINE uint32_t AONRTCCaptureValueCh1Get(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_CH1CAPT)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_CH1CAPT)); } //***************************************************************************** @@ -904,11 +904,11 @@ AONRTCCaptureValueCh1Get(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONRTCCurrent64BitValueGet - #undef AONRTCCurrent64BitValueGet - #define AONRTCCurrent64BitValueGet ROM_AONRTCCurrent64BitValueGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONRTCCurrent64BitValueGet +#undef AONRTCCurrent64BitValueGet +#define AONRTCCurrent64BitValueGet ROM_AONRTCCurrent64BitValueGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_adc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_adc.h index 27317079..378db15c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_adc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_adc.h @@ -84,19 +84,19 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXADCDisable NOROM_AUXADCDisable - #define AUXADCEnableAsync NOROM_AUXADCEnableAsync - #define AUXADCEnableSync NOROM_AUXADCEnableSync - #define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling - #define AUXADCFlushFifo NOROM_AUXADCFlushFifo - #define AUXADCReadFifo NOROM_AUXADCReadFifo - #define AUXADCPopFifo NOROM_AUXADCPopFifo - #define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain - #define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset - #define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts - #define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue - #define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset - #define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset +#define AUXADCDisable NOROM_AUXADCDisable +#define AUXADCEnableAsync NOROM_AUXADCEnableAsync +#define AUXADCEnableSync NOROM_AUXADCEnableSync +#define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling +#define AUXADCFlushFifo NOROM_AUXADCFlushFifo +#define AUXADCReadFifo NOROM_AUXADCReadFifo +#define AUXADCPopFifo NOROM_AUXADCPopFifo +#define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain +#define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset +#define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts +#define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue +#define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset +#define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset #endif //***************************************************************************** @@ -524,59 +524,59 @@ extern int32_t AUXADCUnadjustValueForGainAndOffset(int32_t adcValue, int32_t gai // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXADCDisable - #undef AUXADCDisable - #define AUXADCDisable ROM_AUXADCDisable - #endif - #ifdef ROM_AUXADCEnableAsync - #undef AUXADCEnableAsync - #define AUXADCEnableAsync ROM_AUXADCEnableAsync - #endif - #ifdef ROM_AUXADCEnableSync - #undef AUXADCEnableSync - #define AUXADCEnableSync ROM_AUXADCEnableSync - #endif - #ifdef ROM_AUXADCDisableInputScaling - #undef AUXADCDisableInputScaling - #define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling - #endif - #ifdef ROM_AUXADCFlushFifo - #undef AUXADCFlushFifo - #define AUXADCFlushFifo ROM_AUXADCFlushFifo - #endif - #ifdef ROM_AUXADCReadFifo - #undef AUXADCReadFifo - #define AUXADCReadFifo ROM_AUXADCReadFifo - #endif - #ifdef ROM_AUXADCPopFifo - #undef AUXADCPopFifo - #define AUXADCPopFifo ROM_AUXADCPopFifo - #endif - #ifdef ROM_AUXADCGetAdjustmentGain - #undef AUXADCGetAdjustmentGain - #define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain - #endif - #ifdef ROM_AUXADCGetAdjustmentOffset - #undef AUXADCGetAdjustmentOffset - #define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset - #endif - #ifdef ROM_AUXADCValueToMicrovolts - #undef AUXADCValueToMicrovolts - #define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts - #endif - #ifdef ROM_AUXADCMicrovoltsToValue - #undef AUXADCMicrovoltsToValue - #define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue - #endif - #ifdef ROM_AUXADCAdjustValueForGainAndOffset - #undef AUXADCAdjustValueForGainAndOffset - #define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset - #endif - #ifdef ROM_AUXADCUnadjustValueForGainAndOffset - #undef AUXADCUnadjustValueForGainAndOffset - #define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXADCDisable +#undef AUXADCDisable +#define AUXADCDisable ROM_AUXADCDisable +#endif +#ifdef ROM_AUXADCEnableAsync +#undef AUXADCEnableAsync +#define AUXADCEnableAsync ROM_AUXADCEnableAsync +#endif +#ifdef ROM_AUXADCEnableSync +#undef AUXADCEnableSync +#define AUXADCEnableSync ROM_AUXADCEnableSync +#endif +#ifdef ROM_AUXADCDisableInputScaling +#undef AUXADCDisableInputScaling +#define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling +#endif +#ifdef ROM_AUXADCFlushFifo +#undef AUXADCFlushFifo +#define AUXADCFlushFifo ROM_AUXADCFlushFifo +#endif +#ifdef ROM_AUXADCReadFifo +#undef AUXADCReadFifo +#define AUXADCReadFifo ROM_AUXADCReadFifo +#endif +#ifdef ROM_AUXADCPopFifo +#undef AUXADCPopFifo +#define AUXADCPopFifo ROM_AUXADCPopFifo +#endif +#ifdef ROM_AUXADCGetAdjustmentGain +#undef AUXADCGetAdjustmentGain +#define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain +#endif +#ifdef ROM_AUXADCGetAdjustmentOffset +#undef AUXADCGetAdjustmentOffset +#define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset +#endif +#ifdef ROM_AUXADCValueToMicrovolts +#undef AUXADCValueToMicrovolts +#define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts +#endif +#ifdef ROM_AUXADCMicrovoltsToValue +#undef AUXADCMicrovoltsToValue +#define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue +#endif +#ifdef ROM_AUXADCAdjustValueForGainAndOffset +#undef AUXADCAdjustValueForGainAndOffset +#define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset +#endif +#ifdef ROM_AUXADCUnadjustValueForGainAndOffset +#undef AUXADCUnadjustValueForGainAndOffset +#define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_smph.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_smph.h index 4ff13143..a83b6198 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_smph.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_smph.h @@ -137,7 +137,7 @@ AUXSMPHAcquire(uint32_t ui32Semaphore) // Wait for semaphore to be released such that it can be claimed // Semaphore register reads 1 when lock was acquired otherwise 0 // (i.e. AUX_SMPH_CLAIMED). - while(HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) == + while (HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) == AUX_SMPH_CLAIMED) { } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_sysif.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_sysif.h index 41910dac..d2b62d46 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_sysif.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_sysif.h @@ -80,7 +80,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXSYSIFOpModeChange NOROM_AUXSYSIFOpModeChange +#define AUXSYSIFOpModeChange NOROM_AUXSYSIFOpModeChange #endif @@ -127,11 +127,11 @@ extern void AUXSYSIFOpModeChange(uint32_t targetOpMode); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXSYSIFOpModeChange - #undef AUXSYSIFOpModeChange - #define AUXSYSIFOpModeChange ROM_AUXSYSIFOpModeChange - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXSYSIFOpModeChange +#undef AUXSYSIFOpModeChange +#define AUXSYSIFOpModeChange ROM_AUXSYSIFOpModeChange +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_tdc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_tdc.h index 10f3b41d..630b0716 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_tdc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/aux_tdc.h @@ -81,8 +81,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXTDCConfigSet NOROM_AUXTDCConfigSet - #define AUXTDCMeasurementDone NOROM_AUXTDCMeasurementDone +#define AUXTDCConfigSet NOROM_AUXTDCConfigSet +#define AUXTDCMeasurementDone NOROM_AUXTDCMeasurementDone #endif //***************************************************************************** @@ -304,7 +304,7 @@ extern "C" static bool AUXTDCBaseValid(uint32_t ui32Base) { - return(ui32Base == AUX_TDC_BASE); + return (ui32Base == AUX_TDC_BASE); } #endif @@ -338,8 +338,8 @@ AUXTDCStatusGet(uint32_t ui32Base) ASSERT(AUXTDCBaseValid(ui32Base)); // Return the status value for the correct ADI Slave. - return((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >> - AUX_TDC_STAT_STATE_S); + return ((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >> + AUX_TDC_STAT_STATE_S); } //***************************************************************************** @@ -748,7 +748,7 @@ AUXTDCCounterEnable(uint32_t ui32Base) // Check if the AUX TDC is in idle mode. If not in Idle mode, the counter // will not be enabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -784,7 +784,7 @@ AUXTDCCounterDisable(uint32_t ui32Base) // Check if the AUX TDC is in Idle mode. If not in Idle mode, the counter // will not be disabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -825,7 +825,7 @@ AUXTDCCounterSet(uint32_t ui32Base, uint32_t ui32Events) // Check if the AUX TDC is in idle mode. If not in idle mode, the counter // will not be disabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -873,15 +873,15 @@ AUXTDCCounterGet(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXTDCConfigSet - #undef AUXTDCConfigSet - #define AUXTDCConfigSet ROM_AUXTDCConfigSet - #endif - #ifdef ROM_AUXTDCMeasurementDone - #undef AUXTDCMeasurementDone - #define AUXTDCMeasurementDone ROM_AUXTDCMeasurementDone - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXTDCConfigSet +#undef AUXTDCConfigSet +#define AUXTDCConfigSet ROM_AUXTDCConfigSet +#endif +#ifdef ROM_AUXTDCMeasurementDone +#undef AUXTDCMeasurementDone +#define AUXTDCMeasurementDone ROM_AUXTDCMeasurementDone +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ccfgread.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ccfgread.h index e3397e93..3dec1eb5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ccfgread.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ccfgread.h @@ -89,8 +89,8 @@ __STATIC_INLINE bool CCFGRead_DIS_GPRAM( void ) { return (( HWREG( CCFG_BASE + CCFG_O_SIZE_AND_DIS_FLAGS ) & - CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_M ) >> - CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_S ) ; + CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_M ) >> + CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_S ) ; } //***************************************************************************** @@ -104,8 +104,8 @@ __STATIC_INLINE bool CCFGRead_EXT_LF_CLK_DIO( void ) { return (( HWREG( CCFG_BASE + CCFG_O_EXT_LF_CLK ) & - CCFG_EXT_LF_CLK_DIO_M ) >> - CCFG_EXT_LF_CLK_DIO_S ) ; + CCFG_EXT_LF_CLK_DIO_M ) >> + CCFG_EXT_LF_CLK_DIO_S ) ; } //***************************************************************************** @@ -134,8 +134,8 @@ __STATIC_INLINE uint32_t CCFGRead_SCLK_LF_OPTION( void ) { return (( HWREG( CCFG_BASE + CCFG_O_MODE_CONF ) & - CCFG_MODE_CONF_SCLK_LF_OPTION_M ) >> - CCFG_MODE_CONF_SCLK_LF_OPTION_S ) ; + CCFG_MODE_CONF_SCLK_LF_OPTION_M ) >> + CCFG_MODE_CONF_SCLK_LF_OPTION_S ) ; } //***************************************************************************** @@ -163,8 +163,8 @@ __STATIC_INLINE uint32_t CCFGRead_XOSC_FREQ( void ) { return (( HWREG( CCFG_BASE + CCFG_O_MODE_CONF ) & - CCFG_MODE_CONF_XOSC_FREQ_M ) >> - CCFG_MODE_CONF_XOSC_FREQ_S ) ; + CCFG_MODE_CONF_XOSC_FREQ_M ) >> + CCFG_MODE_CONF_XOSC_FREQ_S ) ; } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/chipinfo.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/chipinfo.h index 788cfaf0..255db9bf 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/chipinfo.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/chipinfo.h @@ -79,12 +79,12 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV - #define ChipInfo_GetPackageType NOROM_ChipInfo_GetPackageType - #define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType - #define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily - #define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision - #define ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated +#define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV +#define ChipInfo_GetPackageType NOROM_ChipInfo_GetPackageType +#define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType +#define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily +#define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision +#define ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated #endif //***************************************************************************** @@ -96,11 +96,12 @@ extern "C" //! E.g: 0x06 means that the chip supports both BLE and IEEE 802.15.4 // //***************************************************************************** -typedef enum { - PROTOCOL_Unknown = 0 , //!< None of the known protocols are supported. - PROTOCOLBIT_BLE = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported. - PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported. - PROTOCOLBIT_Proprietary = 0x08 //!< Bit[3] set, indicates that proprietary protocols are supported. +typedef enum +{ + PROTOCOL_Unknown = 0, //!< None of the known protocols are supported. + PROTOCOLBIT_BLE = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported. + PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported. + PROTOCOLBIT_Proprietary = 0x08 //!< Bit[3] set, indicates that proprietary protocols are supported. } ProtocolBitVector_t; //***************************************************************************** @@ -124,7 +125,7 @@ extern ProtocolBitVector_t ChipInfo_GetSupportedProtocol_BV( void ); __STATIC_INLINE bool ChipInfo_SupportsBLE( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 ); } //***************************************************************************** @@ -138,7 +139,7 @@ ChipInfo_SupportsBLE( void ) __STATIC_INLINE bool ChipInfo_SupportsIEEE_802_15_4( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 ); } //***************************************************************************** @@ -152,7 +153,7 @@ ChipInfo_SupportsIEEE_802_15_4( void ) __STATIC_INLINE bool ChipInfo_SupportsPROPRIETARY( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 ); } //***************************************************************************** @@ -163,14 +164,15 @@ ChipInfo_SupportsPROPRIETARY( void ) //! Packages available for a specific device are shown in the device datasheet. // //***************************************************************************** -typedef enum { - PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown. - PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package. - PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package. - PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package. - PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die). - PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV). - PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks. +typedef enum +{ + PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown. + PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package. + PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package. + PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package. + PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die). + PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV). + PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks. } PackageType_t; //***************************************************************************** @@ -194,7 +196,7 @@ extern PackageType_t ChipInfo_GetPackageType( void ); __STATIC_INLINE bool ChipInfo_PackageTypeIs4x4( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_4x4 ); + return ( ChipInfo_GetPackageType() == PACKAGE_4x4 ); } //***************************************************************************** @@ -208,7 +210,7 @@ ChipInfo_PackageTypeIs4x4( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs5x5( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_5x5 ); + return ( ChipInfo_GetPackageType() == PACKAGE_5x5 ); } //***************************************************************************** @@ -222,7 +224,7 @@ ChipInfo_PackageTypeIs5x5( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs7x7( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_7x7 ); + return ( ChipInfo_GetPackageType() == PACKAGE_7x7 ); } //***************************************************************************** @@ -236,7 +238,7 @@ ChipInfo_PackageTypeIs7x7( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIsWAFER( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_WAFER ); + return ( ChipInfo_GetPackageType() == PACKAGE_WAFER ); } //***************************************************************************** @@ -250,7 +252,7 @@ ChipInfo_PackageTypeIsWAFER( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIsWCSP( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_WCSP ); + return ( ChipInfo_GetPackageType() == PACKAGE_WCSP ); } //***************************************************************************** @@ -264,7 +266,7 @@ ChipInfo_PackageTypeIsWCSP( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs7x7Q1( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 ); + return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 ); } //***************************************************************************** @@ -277,8 +279,8 @@ ChipInfo_PackageTypeIs7x7Q1( void ) __STATIC_INLINE uint32_t ChipInfo_GetDeviceIdHwRevCode( void ) { - // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28] - return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 ); + // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28] + return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 ); } //***************************************************************************** @@ -295,15 +297,16 @@ ChipInfo_GetDeviceIdHwRevCode( void ) __STATIC_INLINE uint32_t ChipInfo_GetMinorHwRev( void ) { - uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) & - FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >> - FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ; + uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) & + FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >> + FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ; - if ( minorRev >= 0x80 ) { - minorRev = 0; - } + if ( minorRev >= 0x80 ) + { + minorRev = 0; + } - return( minorRev ); + return ( minorRev ); } //***************************************************************************** @@ -319,7 +322,7 @@ ChipInfo_GetMinorHwRev( void ) __STATIC_INLINE uint32_t ChipInfo_GetUserId( void ) { - return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID )); + return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID )); } //***************************************************************************** @@ -327,23 +330,24 @@ ChipInfo_GetUserId( void ) //! \brief Chip type enumeration // //***************************************************************************** -typedef enum { - CHIP_TYPE_Unknown = -1, //!< -1 means that the chip type is unknown. - CHIP_TYPE_CC1310 = 0, //!< 0 means that this is a CC1310 chip. - CHIP_TYPE_CC1350 = 1, //!< 1 means that this is a CC1350 chip. - CHIP_TYPE_CC2620 = 2, //!< 2 means that this is a CC2620 chip. - CHIP_TYPE_CC2630 = 3, //!< 3 means that this is a CC2630 chip. - CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip. - CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip. - CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip. - CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip. - CHIP_TYPE_CC2640R2 = 8, //!< 8 means that this is a CC2640R2 chip. - CHIP_TYPE_CC2642 = 9, //!< 9 means that this is a CC2642 chip. - CHIP_TYPE_unused = 10,//!< 10 unused value - CHIP_TYPE_CC2652 = 11,//!< 11 means that this is a CC2652 chip. - CHIP_TYPE_CC1312 = 12,//!< 12 means that this is a CC1312 chip. - CHIP_TYPE_CC1352 = 13,//!< 13 means that this is a CC1352 chip. - CHIP_TYPE_CC1352P = 14 //!< 14 means that this is a CC1352P chip. +typedef enum +{ + CHIP_TYPE_Unknown = -1, //!< -1 means that the chip type is unknown. + CHIP_TYPE_CC1310 = 0, //!< 0 means that this is a CC1310 chip. + CHIP_TYPE_CC1350 = 1, //!< 1 means that this is a CC1350 chip. + CHIP_TYPE_CC2620 = 2, //!< 2 means that this is a CC2620 chip. + CHIP_TYPE_CC2630 = 3, //!< 3 means that this is a CC2630 chip. + CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip. + CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip. + CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip. + CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip. + CHIP_TYPE_CC2640R2 = 8, //!< 8 means that this is a CC2640R2 chip. + CHIP_TYPE_CC2642 = 9, //!< 9 means that this is a CC2642 chip. + CHIP_TYPE_unused = 10,//!< 10 unused value + CHIP_TYPE_CC2652 = 11,//!< 11 means that this is a CC2652 chip. + CHIP_TYPE_CC1312 = 12,//!< 12 means that this is a CC1312 chip. + CHIP_TYPE_CC1352 = 13,//!< 13 means that this is a CC1352 chip. + CHIP_TYPE_CC1352P = 14 //!< 14 means that this is a CC1352P chip. } ChipType_t; //***************************************************************************** @@ -361,13 +365,14 @@ extern ChipType_t ChipInfo_GetChipType( void ); //! \brief Chip family enumeration // //***************************************************************************** -typedef enum { - FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown. - FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member. - FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member. - FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member. - FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents). - FAMILY_CC13x2_CC26x2 = 4 //!< 4 means that the chip is a CC13x2, CC26x2 family member. +typedef enum +{ + FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown. + FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member. + FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member. + FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member. + FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents). + FAMILY_CC13x2_CC26x2 = 4 //!< 4 means that the chip is a CC13x2, CC26x2 family member. } ChipFamily_t; //***************************************************************************** @@ -411,7 +416,7 @@ extern ChipFamily_t ChipInfo_GetChipFamily( void ); __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC13x0( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 ); } //***************************************************************************** @@ -425,7 +430,7 @@ ChipInfo_ChipFamilyIs_CC13x0( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x0( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 ); } //***************************************************************************** @@ -439,7 +444,7 @@ ChipInfo_ChipFamilyIs_CC26x0( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x0R2( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 ); } //***************************************************************************** @@ -453,7 +458,7 @@ ChipInfo_ChipFamilyIs_CC26x0R2( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x1( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 ); } //***************************************************************************** @@ -467,7 +472,7 @@ ChipInfo_ChipFamilyIs_CC26x1( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 ); } //***************************************************************************** @@ -475,15 +480,16 @@ ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void ) //! \brief HW revision enumeration. // //***************************************************************************** -typedef enum { - HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown. - HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0 - HWREV_1_1 = 11, //!< 11 means that the chip's HW revision is 1.1 - HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0 - HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1 - HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2 - HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3 - HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4 +typedef enum +{ + HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown. + HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0 + HWREV_1_1 = 11, //!< 11 means that the chip's HW revision is 1.1 + HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0 + HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1 + HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2 + HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3 + HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4 } HwRevision_t; //***************************************************************************** @@ -507,7 +513,7 @@ extern HwRevision_t ChipInfo_GetHwRevision( void ); __STATIC_INLINE bool ChipInfo_HwRevisionIs_1_0( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_1_0 ); + return ( ChipInfo_GetHwRevision() == HWREV_1_0 ); } //***************************************************************************** @@ -521,7 +527,7 @@ ChipInfo_HwRevisionIs_1_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_0( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_0 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_0 ); } //***************************************************************************** @@ -535,7 +541,7 @@ ChipInfo_HwRevisionIs_2_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_0( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_0 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_0 ); } //***************************************************************************** @@ -549,7 +555,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_1( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_1 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_1 ); } //***************************************************************************** @@ -563,7 +569,7 @@ ChipInfo_HwRevisionIs_2_1( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_1( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_1 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_1 ); } //***************************************************************************** @@ -577,7 +583,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_1( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_2( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_2 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_2 ); } //***************************************************************************** @@ -591,7 +597,7 @@ ChipInfo_HwRevisionIs_2_2( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_2( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_2 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_2 ); } //***************************************************************************** @@ -605,7 +611,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_2( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_3( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_3 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_3 ); } //***************************************************************************** @@ -619,7 +625,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_3( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_4( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_4 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_4 ); } //***************************************************************************** @@ -638,31 +644,31 @@ extern void ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated( void // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_ChipInfo_GetSupportedProtocol_BV - #undef ChipInfo_GetSupportedProtocol_BV - #define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV - #endif - #ifdef ROM_ChipInfo_GetPackageType - #undef ChipInfo_GetPackageType - #define ChipInfo_GetPackageType ROM_ChipInfo_GetPackageType - #endif - #ifdef ROM_ChipInfo_GetChipType - #undef ChipInfo_GetChipType - #define ChipInfo_GetChipType ROM_ChipInfo_GetChipType - #endif - #ifdef ROM_ChipInfo_GetChipFamily - #undef ChipInfo_GetChipFamily - #define ChipInfo_GetChipFamily ROM_ChipInfo_GetChipFamily - #endif - #ifdef ROM_ChipInfo_GetHwRevision - #undef ChipInfo_GetHwRevision - #define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision - #endif - #ifdef ROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated - #undef ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated - #define ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated - #endif +#include "../driverlib/rom.h" +#ifdef ROM_ChipInfo_GetSupportedProtocol_BV +#undef ChipInfo_GetSupportedProtocol_BV +#define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV +#endif +#ifdef ROM_ChipInfo_GetPackageType +#undef ChipInfo_GetPackageType +#define ChipInfo_GetPackageType ROM_ChipInfo_GetPackageType +#endif +#ifdef ROM_ChipInfo_GetChipType +#undef ChipInfo_GetChipType +#define ChipInfo_GetChipType ROM_ChipInfo_GetChipType +#endif +#ifdef ROM_ChipInfo_GetChipFamily +#undef ChipInfo_GetChipFamily +#define ChipInfo_GetChipFamily ROM_ChipInfo_GetChipFamily +#endif +#ifdef ROM_ChipInfo_GetHwRevision +#undef ChipInfo_GetHwRevision +#define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision +#endif +#ifdef ROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated +#undef ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated +#define ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/cpu.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/cpu.h index e2b0561a..947687f1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/cpu.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/cpu.h @@ -80,11 +80,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define CPUcpsid NOROM_CPUcpsid - #define CPUprimask NOROM_CPUprimask - #define CPUcpsie NOROM_CPUcpsie - #define CPUbasepriGet NOROM_CPUbasepriGet - #define CPUdelay NOROM_CPUdelay +#define CPUcpsid NOROM_CPUcpsid +#define CPUprimask NOROM_CPUprimask +#define CPUcpsie NOROM_CPUcpsie +#define CPUbasepriGet NOROM_CPUbasepriGet +#define CPUdelay NOROM_CPUdelay #endif //***************************************************************************** @@ -423,27 +423,27 @@ CPU_WriteBufferEnable( void ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_CPUcpsid - #undef CPUcpsid - #define CPUcpsid ROM_CPUcpsid - #endif - #ifdef ROM_CPUprimask - #undef CPUprimask - #define CPUprimask ROM_CPUprimask - #endif - #ifdef ROM_CPUcpsie - #undef CPUcpsie - #define CPUcpsie ROM_CPUcpsie - #endif - #ifdef ROM_CPUbasepriGet - #undef CPUbasepriGet - #define CPUbasepriGet ROM_CPUbasepriGet - #endif - #ifdef ROM_CPUdelay - #undef CPUdelay - #define CPUdelay ROM_CPUdelay - #endif +#include "../driverlib/rom.h" +#ifdef ROM_CPUcpsid +#undef CPUcpsid +#define CPUcpsid ROM_CPUcpsid +#endif +#ifdef ROM_CPUprimask +#undef CPUprimask +#define CPUprimask ROM_CPUprimask +#endif +#ifdef ROM_CPUcpsie +#undef CPUcpsie +#define CPUcpsie ROM_CPUcpsie +#endif +#ifdef ROM_CPUbasepriGet +#undef CPUbasepriGet +#define CPUbasepriGet ROM_CPUbasepriGet +#endif +#ifdef ROM_CPUdelay +#undef CPUdelay +#define CPUdelay ROM_CPUdelay +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/crypto.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/crypto.h index bb411ec8..11760a6f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/crypto.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/crypto.h @@ -83,19 +83,19 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define CRYPTOAesLoadKey NOROM_CRYPTOAesLoadKey - #define CRYPTOAesCbc NOROM_CRYPTOAesCbc - #define CRYPTOAesCbcStatus NOROM_CRYPTOAesCbcStatus - #define CRYPTOAesEcb NOROM_CRYPTOAesEcb - #define CRYPTOAesEcbStatus NOROM_CRYPTOAesEcbStatus - #define CRYPTOCcmAuthEncrypt NOROM_CRYPTOCcmAuthEncrypt - #define CRYPTOCcmAuthEncryptStatus NOROM_CRYPTOCcmAuthEncryptStatus - #define CRYPTOCcmAuthEncryptResultGet NOROM_CRYPTOCcmAuthEncryptResultGet - #define CRYPTOCcmInvAuthDecrypt NOROM_CRYPTOCcmInvAuthDecrypt - #define CRYPTOCcmInvAuthDecryptStatus NOROM_CRYPTOCcmInvAuthDecryptStatus - #define CRYPTOCcmInvAuthDecryptResultGet NOROM_CRYPTOCcmInvAuthDecryptResultGet - #define CRYPTODmaEnable NOROM_CRYPTODmaEnable - #define CRYPTODmaDisable NOROM_CRYPTODmaDisable +#define CRYPTOAesLoadKey NOROM_CRYPTOAesLoadKey +#define CRYPTOAesCbc NOROM_CRYPTOAesCbc +#define CRYPTOAesCbcStatus NOROM_CRYPTOAesCbcStatus +#define CRYPTOAesEcb NOROM_CRYPTOAesEcb +#define CRYPTOAesEcbStatus NOROM_CRYPTOAesEcbStatus +#define CRYPTOCcmAuthEncrypt NOROM_CRYPTOCcmAuthEncrypt +#define CRYPTOCcmAuthEncryptStatus NOROM_CRYPTOCcmAuthEncryptStatus +#define CRYPTOCcmAuthEncryptResultGet NOROM_CRYPTOCcmAuthEncryptResultGet +#define CRYPTOCcmInvAuthDecrypt NOROM_CRYPTOCcmInvAuthDecrypt +#define CRYPTOCcmInvAuthDecryptStatus NOROM_CRYPTOCcmInvAuthDecryptStatus +#define CRYPTOCcmInvAuthDecryptResultGet NOROM_CRYPTOCcmInvAuthDecryptResultGet +#define CRYPTODmaEnable NOROM_CRYPTODmaEnable +#define CRYPTODmaDisable NOROM_CRYPTODmaDisable #endif //***************************************************************************** @@ -227,7 +227,7 @@ extern "C" //! - \ref AES_KEYSTORE_READ_ERROR // //***************************************************************************** -extern uint32_t CRYPTOAesLoadKey(uint32_t *pui32AesKey, +extern uint32_t CRYPTOAesLoadKey(uint32_t* pui32AesKey, uint32_t ui32KeyLocation); //***************************************************************************** @@ -263,8 +263,8 @@ extern uint32_t CRYPTOAesLoadKey(uint32_t *pui32AesKey, //! \sa \ref CRYPTOAesCbcStatus() // //***************************************************************************** -extern uint32_t CRYPTOAesCbc(uint32_t *pui32MsgIn, uint32_t *pui32MsgOut, - uint32_t ui32MsgLength, uint32_t *pui32Nonce, +extern uint32_t CRYPTOAesCbc(uint32_t* pui32MsgIn, uint32_t* pui32MsgOut, + uint32_t ui32MsgLength, uint32_t* pui32Nonce, uint32_t ui32KeyLocation, bool bEncrypt, bool bIntEnable); @@ -315,7 +315,7 @@ extern uint32_t CRYPTOAesCbcStatus(void); //! \sa \ref CRYPTOAesEcbStatus() // //***************************************************************************** -extern uint32_t CRYPTOAesEcb(uint32_t *pui32MsgIn, uint32_t *pui32MsgOut, +extern uint32_t CRYPTOAesEcb(uint32_t* pui32MsgIn, uint32_t* pui32MsgOut, uint32_t ui32KeyLocation, bool bEncrypt, bool bIntEnable); @@ -416,10 +416,10 @@ CRYPTOAesCbcFinish(void) // //***************************************************************************** extern uint32_t CRYPTOCcmAuthEncrypt(bool bEncrypt, uint32_t ui32AuthLength, - uint32_t *pui32Nonce, - uint32_t *pui32PlainText, + uint32_t* pui32Nonce, + uint32_t* pui32PlainText, uint32_t ui32PlainTextLength, - uint32_t *pui32Header, + uint32_t* pui32Header, uint32_t ui32HeaderLength, uint32_t ui32KeyLocation, uint32_t ui32FieldLength, @@ -457,7 +457,7 @@ extern uint32_t CRYPTOCcmAuthEncryptStatus(void); // //***************************************************************************** extern uint32_t CRYPTOCcmAuthEncryptResultGet(uint32_t ui32TagLength, - uint32_t *pui32CcmTag); + uint32_t* pui32CcmTag); //***************************************************************************** // @@ -495,10 +495,10 @@ extern uint32_t CRYPTOCcmAuthEncryptResultGet(uint32_t ui32TagLength, // //***************************************************************************** extern uint32_t CRYPTOCcmInvAuthDecrypt(bool bDecrypt, uint32_t ui32AuthLength, - uint32_t *pui32Nonce, - uint32_t *pui32CipherText, + uint32_t* pui32Nonce, + uint32_t* pui32CipherText, uint32_t ui32CipherTextLength, - uint32_t *pui32Header, + uint32_t* pui32Header, uint32_t ui32HeaderLength, uint32_t ui32KeyLocation, uint32_t ui32FieldLength, @@ -530,9 +530,9 @@ extern uint32_t CRYPTOCcmInvAuthDecryptStatus(void); // //***************************************************************************** extern uint32_t CRYPTOCcmInvAuthDecryptResultGet(uint32_t ui32AuthLength, - uint32_t *pui32CipherText, - uint32_t ui32CipherTextLength, - uint32_t *pui32CcmTag); + uint32_t* pui32CipherText, + uint32_t ui32CipherTextLength, + uint32_t* pui32CcmTag); //***************************************************************************** // @@ -666,14 +666,14 @@ CRYPTOIntStatus(bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(ui32Mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (ui32Mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } else { - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT) & 0x00000003); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT) & 0x00000003); } } @@ -781,59 +781,59 @@ CRYPTOIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_CRYPTOAesLoadKey - #undef CRYPTOAesLoadKey - #define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey - #endif - #ifdef ROM_CRYPTOAesCbc - #undef CRYPTOAesCbc - #define CRYPTOAesCbc ROM_CRYPTOAesCbc - #endif - #ifdef ROM_CRYPTOAesCbcStatus - #undef CRYPTOAesCbcStatus - #define CRYPTOAesCbcStatus ROM_CRYPTOAesCbcStatus - #endif - #ifdef ROM_CRYPTOAesEcb - #undef CRYPTOAesEcb - #define CRYPTOAesEcb ROM_CRYPTOAesEcb - #endif - #ifdef ROM_CRYPTOAesEcbStatus - #undef CRYPTOAesEcbStatus - #define CRYPTOAesEcbStatus ROM_CRYPTOAesEcbStatus - #endif - #ifdef ROM_CRYPTOCcmAuthEncrypt - #undef CRYPTOCcmAuthEncrypt - #define CRYPTOCcmAuthEncrypt ROM_CRYPTOCcmAuthEncrypt - #endif - #ifdef ROM_CRYPTOCcmAuthEncryptStatus - #undef CRYPTOCcmAuthEncryptStatus - #define CRYPTOCcmAuthEncryptStatus ROM_CRYPTOCcmAuthEncryptStatus - #endif - #ifdef ROM_CRYPTOCcmAuthEncryptResultGet - #undef CRYPTOCcmAuthEncryptResultGet - #define CRYPTOCcmAuthEncryptResultGet ROM_CRYPTOCcmAuthEncryptResultGet - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecrypt - #undef CRYPTOCcmInvAuthDecrypt - #define CRYPTOCcmInvAuthDecrypt ROM_CRYPTOCcmInvAuthDecrypt - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecryptStatus - #undef CRYPTOCcmInvAuthDecryptStatus - #define CRYPTOCcmInvAuthDecryptStatus ROM_CRYPTOCcmInvAuthDecryptStatus - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecryptResultGet - #undef CRYPTOCcmInvAuthDecryptResultGet - #define CRYPTOCcmInvAuthDecryptResultGet ROM_CRYPTOCcmInvAuthDecryptResultGet - #endif - #ifdef ROM_CRYPTODmaEnable - #undef CRYPTODmaEnable - #define CRYPTODmaEnable ROM_CRYPTODmaEnable - #endif - #ifdef ROM_CRYPTODmaDisable - #undef CRYPTODmaDisable - #define CRYPTODmaDisable ROM_CRYPTODmaDisable - #endif +#include "../driverlib/rom.h" +#ifdef ROM_CRYPTOAesLoadKey +#undef CRYPTOAesLoadKey +#define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey +#endif +#ifdef ROM_CRYPTOAesCbc +#undef CRYPTOAesCbc +#define CRYPTOAesCbc ROM_CRYPTOAesCbc +#endif +#ifdef ROM_CRYPTOAesCbcStatus +#undef CRYPTOAesCbcStatus +#define CRYPTOAesCbcStatus ROM_CRYPTOAesCbcStatus +#endif +#ifdef ROM_CRYPTOAesEcb +#undef CRYPTOAesEcb +#define CRYPTOAesEcb ROM_CRYPTOAesEcb +#endif +#ifdef ROM_CRYPTOAesEcbStatus +#undef CRYPTOAesEcbStatus +#define CRYPTOAesEcbStatus ROM_CRYPTOAesEcbStatus +#endif +#ifdef ROM_CRYPTOCcmAuthEncrypt +#undef CRYPTOCcmAuthEncrypt +#define CRYPTOCcmAuthEncrypt ROM_CRYPTOCcmAuthEncrypt +#endif +#ifdef ROM_CRYPTOCcmAuthEncryptStatus +#undef CRYPTOCcmAuthEncryptStatus +#define CRYPTOCcmAuthEncryptStatus ROM_CRYPTOCcmAuthEncryptStatus +#endif +#ifdef ROM_CRYPTOCcmAuthEncryptResultGet +#undef CRYPTOCcmAuthEncryptResultGet +#define CRYPTOCcmAuthEncryptResultGet ROM_CRYPTOCcmAuthEncryptResultGet +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecrypt +#undef CRYPTOCcmInvAuthDecrypt +#define CRYPTOCcmInvAuthDecrypt ROM_CRYPTOCcmInvAuthDecrypt +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecryptStatus +#undef CRYPTOCcmInvAuthDecryptStatus +#define CRYPTOCcmInvAuthDecryptStatus ROM_CRYPTOCcmInvAuthDecryptStatus +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecryptResultGet +#undef CRYPTOCcmInvAuthDecryptResultGet +#define CRYPTOCcmInvAuthDecryptResultGet ROM_CRYPTOCcmInvAuthDecryptResultGet +#endif +#ifdef ROM_CRYPTODmaEnable +#undef CRYPTODmaEnable +#define CRYPTODmaEnable ROM_CRYPTODmaEnable +#endif +#ifdef ROM_CRYPTODmaDisable +#undef CRYPTODmaDisable +#define CRYPTODmaDisable ROM_CRYPTODmaDisable +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ddi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ddi.h index 80d94d27..6c45a789 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ddi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ddi.h @@ -82,11 +82,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define DDI32RegWrite NOROM_DDI32RegWrite - #define DDI16BitWrite NOROM_DDI16BitWrite - #define DDI16BitfieldWrite NOROM_DDI16BitfieldWrite - #define DDI16BitRead NOROM_DDI16BitRead - #define DDI16BitfieldRead NOROM_DDI16BitfieldRead +#define DDI32RegWrite NOROM_DDI32RegWrite +#define DDI16BitWrite NOROM_DDI16BitWrite +#define DDI16BitfieldWrite NOROM_DDI16BitfieldWrite +#define DDI16BitRead NOROM_DDI16BitRead +#define DDI16BitfieldRead NOROM_DDI16BitfieldRead #endif //***************************************************************************** @@ -139,7 +139,7 @@ extern "C" static bool DDIBaseValid(uint32_t ui32Base) { - return(ui32Base == AUX_DDI0_OSC_BASE); + return (ui32Base == AUX_DDI0_OSC_BASE); } #endif @@ -165,7 +165,7 @@ DDI32RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < DDI_SLAVE_REGS); // Read the register and return the value. - return(HWREG(ui32Base + ui32Reg)); + return (HWREG(ui32Base + ui32Reg)); } //***************************************************************************** @@ -419,27 +419,27 @@ extern uint16_t DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg, // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_DDI32RegWrite - #undef DDI32RegWrite - #define DDI32RegWrite ROM_DDI32RegWrite - #endif - #ifdef ROM_DDI16BitWrite - #undef DDI16BitWrite - #define DDI16BitWrite ROM_DDI16BitWrite - #endif - #ifdef ROM_DDI16BitfieldWrite - #undef DDI16BitfieldWrite - #define DDI16BitfieldWrite ROM_DDI16BitfieldWrite - #endif - #ifdef ROM_DDI16BitRead - #undef DDI16BitRead - #define DDI16BitRead ROM_DDI16BitRead - #endif - #ifdef ROM_DDI16BitfieldRead - #undef DDI16BitfieldRead - #define DDI16BitfieldRead ROM_DDI16BitfieldRead - #endif +#include "../driverlib/rom.h" +#ifdef ROM_DDI32RegWrite +#undef DDI32RegWrite +#define DDI32RegWrite ROM_DDI32RegWrite +#endif +#ifdef ROM_DDI16BitWrite +#undef DDI16BitWrite +#define DDI16BitWrite ROM_DDI16BitWrite +#endif +#ifdef ROM_DDI16BitfieldWrite +#undef DDI16BitfieldWrite +#define DDI16BitfieldWrite ROM_DDI16BitfieldWrite +#endif +#ifdef ROM_DDI16BitRead +#undef DDI16BitRead +#define DDI16BitRead ROM_DDI16BitRead +#endif +#ifdef ROM_DDI16BitfieldRead +#undef DDI16BitfieldRead +#define DDI16BitfieldRead ROM_DDI16BitfieldRead +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/debug.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/debug.h index 704fd5c7..cbd45279 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/debug.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/debug.h @@ -53,7 +53,7 @@ //! Function stub for allowing compile with DRIVERLIB_DEBUG flag asserted. // //***************************************************************************** -extern void __error__(char *pcFilename, uint32_t ui32Line); +extern void __error__(char* pcFilename, uint32_t ui32Line); //***************************************************************************** // @@ -63,11 +63,11 @@ extern void __error__(char *pcFilename, uint32_t ui32Line); //***************************************************************************** #ifdef DRIVERLIB_DEBUG #define ASSERT(expr) { \ - if(!(expr)) \ - { \ - __error__(__FILE__, __LINE__); \ - } \ - } + if(!(expr)) \ + { \ + __error__(__FILE__, __LINE__); \ + } \ + } #else #define ASSERT(expr) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/event.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/event.h index 2f849027..f8f0c215 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/event.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/event.h @@ -244,7 +244,7 @@ EventSwEventGet(uint32_t ui32SwEvent) ASSERT( ui32SwEvent <= 3 ); // Each software event is byte accessible - return( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent)); + return ( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent)); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/flash.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/flash.h index ec174887..8086c17c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/flash.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/flash.h @@ -84,15 +84,15 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define FlashPowerModeSet NOROM_FlashPowerModeSet - #define FlashPowerModeGet NOROM_FlashPowerModeGet - #define FlashProtectionSet NOROM_FlashProtectionSet - #define FlashProtectionGet NOROM_FlashProtectionGet - #define FlashProtectionSave NOROM_FlashProtectionSave - #define FlashSectorErase NOROM_FlashSectorErase - #define FlashProgram NOROM_FlashProgram - #define FlashEfuseReadRow NOROM_FlashEfuseReadRow - #define FlashDisableSectorsForWrite NOROM_FlashDisableSectorsForWrite +#define FlashPowerModeSet NOROM_FlashPowerModeSet +#define FlashPowerModeGet NOROM_FlashPowerModeGet +#define FlashProtectionSet NOROM_FlashProtectionSet +#define FlashProtectionGet NOROM_FlashProtectionGet +#define FlashProtectionSave NOROM_FlashProtectionSave +#define FlashSectorErase NOROM_FlashSectorErase +#define FlashProgram NOROM_FlashProgram +#define FlashEfuseReadRow NOROM_FlashEfuseReadRow +#define FlashDisableSectorsForWrite NOROM_FlashDisableSectorsForWrite #endif //***************************************************************************** @@ -104,7 +104,7 @@ extern "C" #define FAPI_STATUS_FSM_BUSY 0x00000001 // FSM is Busy #define FAPI_STATUS_FSM_READY 0x00000002 // FSM is Ready #define FAPI_STATUS_INCORRECT_DATABUFFER_LENGTH \ - 0x00000003 // Incorrect parameter value + 0x00000003 // Incorrect parameter value #define FAPI_STATUS_FSM_ERROR 0x00000004 // Operation failed //***************************************************************************** @@ -124,7 +124,7 @@ extern "C" #define FLASH_PWR_ACTIVE_MODE 0x00000000 #define FLASH_PWR_OFF_MODE 0x00000001 #define FLASH_PWR_DEEP_STDBY_MODE \ - 0x00000002 + 0x00000002 //***************************************************************************** // @@ -133,7 +133,7 @@ extern "C" //***************************************************************************** #define FLASH_NO_PROTECT 0x00000000 // Sector not protected #define FLASH_WRITE_PROTECT 0x00000001 // Sector erase and program - // protected +// protected //***************************************************************************** // @@ -255,7 +255,7 @@ FlashSectorSizeGet(void) FLASH_FCFG_B0_SSIZE0_B0_SECT_SIZE_S; // Return flash sector size in number of bytes. - return(ui32SectorSizeInKbyte * 1024); + return (ui32SectorSizeInKbyte * 1024); } //***************************************************************************** @@ -278,7 +278,7 @@ FlashSizeGet(void) FLASH_FLASH_SIZE_SECTORS_S; // Return flash size in number of bytes - return(ui32NoOfSectors * FlashSectorSizeGet()); + return (ui32NoOfSectors * FlashSectorSizeGet()); } //***************************************************************************** @@ -419,13 +419,13 @@ extern uint32_t FlashProtectionSave(uint32_t ui32SectorAddress); __STATIC_INLINE uint32_t FlashCheckFsmForError(void) { - if(HWREG(FLASH_BASE + FLASH_O_FMSTAT) & FLASH_FMSTAT_CSTAT) + if (HWREG(FLASH_BASE + FLASH_O_FMSTAT) & FLASH_FMSTAT_CSTAT) { - return(FAPI_STATUS_FSM_ERROR); + return (FAPI_STATUS_FSM_ERROR); } else { - return(FAPI_STATUS_SUCCESS); + return (FAPI_STATUS_SUCCESS); } } @@ -449,13 +449,13 @@ FlashCheckFsmForError(void) __STATIC_INLINE uint32_t FlashCheckFsmForReady(void) { - if(HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_BUSY) + if (HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_BUSY) { - return(FAPI_STATUS_FSM_BUSY); + return (FAPI_STATUS_FSM_BUSY); } else { - return(FAPI_STATUS_FSM_READY); + return (FAPI_STATUS_FSM_READY); } } @@ -577,18 +577,18 @@ FlashIntStatus(void) ui32IntFlags = 0; // Check if FSM_DONE interrupt status is set. - if(HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_FSM_DONE) + if (HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_FSM_DONE) { ui32IntFlags = FLASH_INT_FSM_DONE; } // Check if RVF_INT interrupt status is set. - if(HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_RVF_INT) + if (HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_RVF_INT) { ui32IntFlags |= FLASH_INT_RV; } - return(ui32IntFlags); + return (ui32IntFlags); } //***************************************************************************** @@ -629,12 +629,12 @@ FlashIntClear(uint32_t ui32IntFlags) ui32TempVal = 0; - if(ui32IntFlags & FLASH_INT_FSM_DONE) + if (ui32IntFlags & FLASH_INT_FSM_DONE) { ui32TempVal = FLASH_FEDACSTAT_FSM_DONE; } - if(ui32IntFlags & FLASH_INT_RV) + if (ui32IntFlags & FLASH_INT_RV) { ui32TempVal |= FLASH_FEDACSTAT_RVF_INT; } @@ -711,7 +711,7 @@ extern uint32_t FlashSectorErase(uint32_t ui32SectorAddress); //! - \ref FAPI_STATUS_FSM_ERROR : A programming error is encountered. // //***************************************************************************** -extern uint32_t FlashProgram(uint8_t *pui8DataBuffer, +extern uint32_t FlashProgram(uint8_t* pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count); //***************************************************************************** @@ -730,7 +730,7 @@ extern uint32_t FlashProgram(uint8_t *pui8DataBuffer, //! - \c true : Error status // //***************************************************************************** -extern bool FlashEfuseReadRow(uint32_t *pui32EfuseData, +extern bool FlashEfuseReadRow(uint32_t* pui32EfuseData, uint32_t ui32RowAddress); //***************************************************************************** @@ -758,43 +758,43 @@ extern void FlashDisableSectorsForWrite(void); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_FlashPowerModeSet - #undef FlashPowerModeSet - #define FlashPowerModeSet ROM_FlashPowerModeSet - #endif - #ifdef ROM_FlashPowerModeGet - #undef FlashPowerModeGet - #define FlashPowerModeGet ROM_FlashPowerModeGet - #endif - #ifdef ROM_FlashProtectionSet - #undef FlashProtectionSet - #define FlashProtectionSet ROM_FlashProtectionSet - #endif - #ifdef ROM_FlashProtectionGet - #undef FlashProtectionGet - #define FlashProtectionGet ROM_FlashProtectionGet - #endif - #ifdef ROM_FlashProtectionSave - #undef FlashProtectionSave - #define FlashProtectionSave ROM_FlashProtectionSave - #endif - #ifdef ROM_FlashSectorErase - #undef FlashSectorErase - #define FlashSectorErase ROM_FlashSectorErase - #endif - #ifdef ROM_FlashProgram - #undef FlashProgram - #define FlashProgram ROM_FlashProgram - #endif - #ifdef ROM_FlashEfuseReadRow - #undef FlashEfuseReadRow - #define FlashEfuseReadRow ROM_FlashEfuseReadRow - #endif - #ifdef ROM_FlashDisableSectorsForWrite - #undef FlashDisableSectorsForWrite - #define FlashDisableSectorsForWrite ROM_FlashDisableSectorsForWrite - #endif +#include "../driverlib/rom.h" +#ifdef ROM_FlashPowerModeSet +#undef FlashPowerModeSet +#define FlashPowerModeSet ROM_FlashPowerModeSet +#endif +#ifdef ROM_FlashPowerModeGet +#undef FlashPowerModeGet +#define FlashPowerModeGet ROM_FlashPowerModeGet +#endif +#ifdef ROM_FlashProtectionSet +#undef FlashProtectionSet +#define FlashProtectionSet ROM_FlashProtectionSet +#endif +#ifdef ROM_FlashProtectionGet +#undef FlashProtectionGet +#define FlashProtectionGet ROM_FlashProtectionGet +#endif +#ifdef ROM_FlashProtectionSave +#undef FlashProtectionSave +#define FlashProtectionSave ROM_FlashProtectionSave +#endif +#ifdef ROM_FlashSectorErase +#undef FlashSectorErase +#define FlashSectorErase ROM_FlashSectorErase +#endif +#ifdef ROM_FlashProgram +#undef FlashProgram +#define FlashProgram ROM_FlashProgram +#endif +#ifdef ROM_FlashEfuseReadRow +#undef FlashEfuseReadRow +#define FlashEfuseReadRow ROM_FlashEfuseReadRow +#endif +#ifdef ROM_FlashDisableSectorsForWrite +#undef FlashDisableSectorsForWrite +#define FlashDisableSectorsForWrite ROM_FlashDisableSectorsForWrite +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/gpio.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/gpio.h index 9a4bf16a..ffc16ef0 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/gpio.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/gpio.h @@ -79,8 +79,8 @@ dioNumberLegal( uint32_t dioNumber ) { uint32_t ioCount = (( HWREG( FCFG1_BASE + FCFG1_O_IOCONF ) & - FCFG1_IOCONF_GPIO_CNT_M ) >> - FCFG1_IOCONF_GPIO_CNT_S ) ; + FCFG1_IOCONF_GPIO_CNT_M ) >> + FCFG1_IOCONF_GPIO_CNT_S ) ; // CC13x2 + CC26x2 if ( ChipInfo_ChipFamilyIs_CC13x2_CC26x2() ) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2c.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2c.h index d1e29698..c4ece780 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2c.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2c.h @@ -84,10 +84,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define I2CMasterInitExpClk NOROM_I2CMasterInitExpClk - #define I2CMasterErr NOROM_I2CMasterErr - #define I2CIntRegister NOROM_I2CIntRegister - #define I2CIntUnregister NOROM_I2CIntUnregister +#define I2CMasterInitExpClk NOROM_I2CMasterInitExpClk +#define I2CMasterErr NOROM_I2CMasterErr +#define I2CIntRegister NOROM_I2CIntRegister +#define I2CIntUnregister NOROM_I2CIntUnregister #endif //***************************************************************************** @@ -96,25 +96,25 @@ extern "C" // //***************************************************************************** #define I2C_MASTER_CMD_SINGLE_SEND \ - 0x00000007 + 0x00000007 #define I2C_MASTER_CMD_SINGLE_RECEIVE \ - 0x00000007 + 0x00000007 #define I2C_MASTER_CMD_BURST_SEND_START \ - 0x00000003 + 0x00000003 #define I2C_MASTER_CMD_BURST_SEND_CONT \ - 0x00000001 + 0x00000001 #define I2C_MASTER_CMD_BURST_SEND_FINISH \ - 0x00000005 + 0x00000005 #define I2C_MASTER_CMD_BURST_SEND_ERROR_STOP \ - 0x00000004 + 0x00000004 #define I2C_MASTER_CMD_BURST_RECEIVE_START \ - 0x0000000b + 0x0000000b #define I2C_MASTER_CMD_BURST_RECEIVE_CONT \ - 0x00000009 + 0x00000009 #define I2C_MASTER_CMD_BURST_RECEIVE_FINISH \ - 0x00000005 + 0x00000005 #define I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP \ - 0x00000004 + 0x00000004 //***************************************************************************** // @@ -169,7 +169,7 @@ extern "C" static bool I2CBaseValid(uint32_t ui32Base) { - return(ui32Base == I2C0_BASE); + return (ui32Base == I2C0_BASE); } #endif @@ -226,7 +226,7 @@ I2CMasterControl(uint32_t ui32Base, uint32_t ui32Cmd) // Check the arguments. ASSERT(I2CBaseValid(ui32Base)); ASSERT((ui32Cmd == I2C_MASTER_CMD_SINGLE_SEND) || - // (ui32Cmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || -> Equal to SINGLE_SEND + // (ui32Cmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || -> Equal to SINGLE_SEND (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_START) || (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_CONT) || (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_FINISH) || @@ -344,13 +344,13 @@ I2CMasterBusy(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the busy status. - if(HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSY) + if (HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSY) { - return(true); + return (true); } else { - return(false); + return (false); } } @@ -376,13 +376,13 @@ I2CMasterBusBusy(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the bus busy status. - if(HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSBSY) + if (HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSBSY) { - return(true); + return (true); } else { - return(false); + return (false); } } @@ -405,7 +405,7 @@ I2CMasterDataGet(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Read a byte. - return(HWREG(I2C0_BASE + I2C_O_MDR)); + return (HWREG(I2C0_BASE + I2C_O_MDR)); } //***************************************************************************** @@ -554,13 +554,13 @@ I2CMasterIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return((HWREG(I2C0_BASE + I2C_O_MMIS)) ? true : false); + return ((HWREG(I2C0_BASE + I2C_O_MMIS)) ? true : false); } else { - return((HWREG(I2C0_BASE + I2C_O_MRIS)) ? true : false); + return ((HWREG(I2C0_BASE + I2C_O_MRIS)) ? true : false); } } @@ -689,7 +689,7 @@ I2CSlaveStatus(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the slave status. - return(HWREG(I2C0_BASE + I2C_O_SSTAT)); + return (HWREG(I2C0_BASE + I2C_O_SSTAT)); } //***************************************************************************** @@ -711,7 +711,7 @@ I2CSlaveDataGet(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Read a byte. - return(HWREG(I2C0_BASE + I2C_O_SDR)); + return (HWREG(I2C0_BASE + I2C_O_SDR)); } //***************************************************************************** @@ -874,13 +874,13 @@ I2CSlaveIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(I2C0_BASE + I2C_O_SMIS)); + return (HWREG(I2C0_BASE + I2C_O_SMIS)); } else { - return(HWREG(I2C0_BASE + I2C_O_SRIS)); + return (HWREG(I2C0_BASE + I2C_O_SRIS)); } } @@ -935,23 +935,23 @@ extern void I2CIntUnregister(uint32_t ui32Base); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_I2CMasterInitExpClk - #undef I2CMasterInitExpClk - #define I2CMasterInitExpClk ROM_I2CMasterInitExpClk - #endif - #ifdef ROM_I2CMasterErr - #undef I2CMasterErr - #define I2CMasterErr ROM_I2CMasterErr - #endif - #ifdef ROM_I2CIntRegister - #undef I2CIntRegister - #define I2CIntRegister ROM_I2CIntRegister - #endif - #ifdef ROM_I2CIntUnregister - #undef I2CIntUnregister - #define I2CIntUnregister ROM_I2CIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_I2CMasterInitExpClk +#undef I2CMasterInitExpClk +#define I2CMasterInitExpClk ROM_I2CMasterInitExpClk +#endif +#ifdef ROM_I2CMasterErr +#undef I2CMasterErr +#define I2CMasterErr ROM_I2CMasterErr +#endif +#ifdef ROM_I2CIntRegister +#undef I2CIntRegister +#define I2CIntRegister ROM_I2CIntRegister +#endif +#ifdef ROM_I2CIntUnregister +#undef I2CIntUnregister +#define I2CIntUnregister ROM_I2CIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2s.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2s.h index ab50cd61..116b252e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2s.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/i2s.h @@ -82,14 +82,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define I2SEnable NOROM_I2SEnable - #define I2SAudioFormatConfigure NOROM_I2SAudioFormatConfigure - #define I2SChannelConfigure NOROM_I2SChannelConfigure - #define I2SBufferConfig NOROM_I2SBufferConfig - #define I2SPointerUpdate NOROM_I2SPointerUpdate - #define I2SPointerSet NOROM_I2SPointerSet - #define I2SSampleStampConfigure NOROM_I2SSampleStampConfigure - #define I2SSampleStampGet NOROM_I2SSampleStampGet +#define I2SEnable NOROM_I2SEnable +#define I2SAudioFormatConfigure NOROM_I2SAudioFormatConfigure +#define I2SChannelConfigure NOROM_I2SChannelConfigure +#define I2SBufferConfig NOROM_I2SBufferConfig +#define I2SPointerUpdate NOROM_I2SPointerUpdate +#define I2SPointerSet NOROM_I2SPointerSet +#define I2SSampleStampConfigure NOROM_I2SSampleStampConfigure +#define I2SSampleStampGet NOROM_I2SSampleStampGet #endif //***************************************************************************** @@ -142,7 +142,7 @@ typedef struct // //***************************************************************************** #ifndef DEPRECATED -extern I2SControlTable *g_pControlTable; +extern I2SControlTable* g_pControlTable; #endif //***************************************************************************** @@ -233,7 +233,7 @@ extern I2SControlTable *g_pControlTable; #define I2S_STMP1 0x00000002 // Sample stamp counter channel 1 #endif #define I2S_STMP_SATURATION 0x0000FFFF // The saturation value used when - // calculating the sample stamp +// calculating the sample stamp //***************************************************************************** // @@ -272,7 +272,7 @@ extern I2SControlTable *g_pControlTable; static bool I2SBaseValid(uint32_t ui32Base) { - return(ui32Base == I2S0_BASE); + return (ui32Base == I2S0_BASE); } #endif @@ -459,8 +459,8 @@ I2SClockConfigure(uint32_t ui32Base, uint32_t ui32ClkConfig) // Setup register WCLK Source. HWREG(I2S0_BASE + I2S_O_AIFWCLKSRC) = ui32ClkConfig & - (I2S_AIFWCLKSRC_WCLK_INV_M | - I2S_AIFWCLKSRC_WCLK_SRC_M); + (I2S_AIFWCLKSRC_WCLK_INV_M | + I2S_AIFWCLKSRC_WCLK_SRC_M); } #endif @@ -550,7 +550,7 @@ extern void I2SPointerUpdate(uint32_t ui32Base, bool bInput); // //**************************************************************************** #ifndef DEPRECATED -extern void I2SPointerSet(uint32_t ui32Base, bool bInput, void * pNextPointer); +extern void I2SPointerSet(uint32_t ui32Base, bool bInput, void* pNextPointer); #endif //***************************************************************************** @@ -742,14 +742,14 @@ I2SIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(I2S0_BASE + I2S_O_IRQFLAGS); - return(ui32Mask & HWREG(I2S0_BASE + I2S_O_IRQMASK)); + return (ui32Mask & HWREG(I2S0_BASE + I2S_O_IRQMASK)); } else { - return(HWREG(I2S0_BASE + I2S_O_IRQFLAGS)); + return (HWREG(I2S0_BASE + I2S_O_IRQFLAGS)); } } @@ -969,11 +969,11 @@ I2SFormatConfigure(uint32_t ui32Base, // Setup register AIFFMTCFG Source. HWREGH(I2S0_BASE + I2S_O_AIFFMTCFG) = - (ui8iDataDelay << I2S_AIFFMTCFG_DATA_DELAY_S) | - (ui8iMemory24Bits << I2S_AIFFMTCFG_MEM_LEN_24_S) | - (ui8iSamplingEdge << I2S_AIFFMTCFG_SMPL_EDGE_S ) | - (boolDualPhase << I2S_AIFFMTCFG_DUAL_PHASE_S) | - (ui8BitsPerSample << I2S_AIFFMTCFG_WORD_LEN_S ); + (ui8iDataDelay << I2S_AIFFMTCFG_DATA_DELAY_S) | + (ui8iMemory24Bits << I2S_AIFFMTCFG_MEM_LEN_24_S) | + (ui8iSamplingEdge << I2S_AIFFMTCFG_SMPL_EDGE_S ) | + (boolDualPhase << I2S_AIFFMTCFG_DUAL_PHASE_S) | + (ui8BitsPerSample << I2S_AIFFMTCFG_WORD_LEN_S ); // Number of WCLK periods before the first read / write HWREGH(I2S0_BASE + I2S_O_STMPWPER) = ui16transmissionDelay; @@ -1071,8 +1071,8 @@ I2SWclkConfigure(uint32_t ui32Base, // Setup register WCLK Source. HWREGB(I2S0_BASE + I2S_O_AIFWCLKSRC) = - ((ui8ClkSource << I2S_AIFWCLKSRC_WCLK_SRC_S) | - (boolWCLKInvert << I2S_AIFWCLKSRC_WCLK_INV_S )); + ((ui8ClkSource << I2S_AIFWCLKSRC_WCLK_SRC_S) | + (boolWCLKInvert << I2S_AIFWCLKSRC_WCLK_INV_S )); } //**************************************************************************** @@ -1304,39 +1304,39 @@ I2SWclkCounterReset(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_I2SEnable - #undef I2SEnable - #define I2SEnable ROM_I2SEnable - #endif - #ifdef ROM_I2SAudioFormatConfigure - #undef I2SAudioFormatConfigure - #define I2SAudioFormatConfigure ROM_I2SAudioFormatConfigure - #endif - #ifdef ROM_I2SChannelConfigure - #undef I2SChannelConfigure - #define I2SChannelConfigure ROM_I2SChannelConfigure - #endif - #ifdef ROM_I2SBufferConfig - #undef I2SBufferConfig - #define I2SBufferConfig ROM_I2SBufferConfig - #endif - #ifdef ROM_I2SPointerUpdate - #undef I2SPointerUpdate - #define I2SPointerUpdate ROM_I2SPointerUpdate - #endif - #ifdef ROM_I2SPointerSet - #undef I2SPointerSet - #define I2SPointerSet ROM_I2SPointerSet - #endif - #ifdef ROM_I2SSampleStampConfigure - #undef I2SSampleStampConfigure - #define I2SSampleStampConfigure ROM_I2SSampleStampConfigure - #endif - #ifdef ROM_I2SSampleStampGet - #undef I2SSampleStampGet - #define I2SSampleStampGet ROM_I2SSampleStampGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_I2SEnable +#undef I2SEnable +#define I2SEnable ROM_I2SEnable +#endif +#ifdef ROM_I2SAudioFormatConfigure +#undef I2SAudioFormatConfigure +#define I2SAudioFormatConfigure ROM_I2SAudioFormatConfigure +#endif +#ifdef ROM_I2SChannelConfigure +#undef I2SChannelConfigure +#define I2SChannelConfigure ROM_I2SChannelConfigure +#endif +#ifdef ROM_I2SBufferConfig +#undef I2SBufferConfig +#define I2SBufferConfig ROM_I2SBufferConfig +#endif +#ifdef ROM_I2SPointerUpdate +#undef I2SPointerUpdate +#define I2SPointerUpdate ROM_I2SPointerUpdate +#endif +#ifdef ROM_I2SPointerSet +#undef I2SPointerSet +#define I2SPointerSet ROM_I2SPointerSet +#endif +#ifdef ROM_I2SSampleStampConfigure +#undef I2SSampleStampConfigure +#define I2SSampleStampConfigure ROM_I2SSampleStampConfigure +#endif +#ifdef ROM_I2SSampleStampGet +#undef I2SSampleStampGet +#define I2SSampleStampGet ROM_I2SSampleStampGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/interrupt.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/interrupt.h index 1d70d80d..69093383 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/interrupt.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/interrupt.h @@ -81,17 +81,17 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define IntRegister NOROM_IntRegister - #define IntUnregister NOROM_IntUnregister - #define IntPriorityGroupingSet NOROM_IntPriorityGroupingSet - #define IntPriorityGroupingGet NOROM_IntPriorityGroupingGet - #define IntPrioritySet NOROM_IntPrioritySet - #define IntPriorityGet NOROM_IntPriorityGet - #define IntEnable NOROM_IntEnable - #define IntDisable NOROM_IntDisable - #define IntPendSet NOROM_IntPendSet - #define IntPendGet NOROM_IntPendGet - #define IntPendClear NOROM_IntPendClear +#define IntRegister NOROM_IntRegister +#define IntUnregister NOROM_IntUnregister +#define IntPriorityGroupingSet NOROM_IntPriorityGroupingSet +#define IntPriorityGroupingGet NOROM_IntPriorityGroupingGet +#define IntPrioritySet NOROM_IntPrioritySet +#define IntPriorityGet NOROM_IntPriorityGet +#define IntEnable NOROM_IntEnable +#define IntDisable NOROM_IntDisable +#define IntPendSet NOROM_IntPendSet +#define IntPendGet NOROM_IntPendGet +#define IntPendClear NOROM_IntPendClear #endif //***************************************************************************** @@ -565,7 +565,7 @@ __STATIC_INLINE bool IntMasterEnable(void) { // Enable CPU interrupts. - return(CPUcpsie()); + return (CPUcpsie()); } //***************************************************************************** @@ -585,7 +585,7 @@ __STATIC_INLINE bool IntMasterDisable(void) { // Disable CPU interrupts. - return(CPUcpsid()); + return (CPUcpsid()); } //***************************************************************************** @@ -641,7 +641,7 @@ IntPriorityMaskSet(uint32_t ui32PriorityMask) __STATIC_INLINE uint32_t IntPriorityMaskGet(void) { - return(CPUbasepriGet()); + return (CPUbasepriGet()); } //***************************************************************************** @@ -651,51 +651,51 @@ IntPriorityMaskGet(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_IntRegister - #undef IntRegister - #define IntRegister ROM_IntRegister - #endif - #ifdef ROM_IntUnregister - #undef IntUnregister - #define IntUnregister ROM_IntUnregister - #endif - #ifdef ROM_IntPriorityGroupingSet - #undef IntPriorityGroupingSet - #define IntPriorityGroupingSet ROM_IntPriorityGroupingSet - #endif - #ifdef ROM_IntPriorityGroupingGet - #undef IntPriorityGroupingGet - #define IntPriorityGroupingGet ROM_IntPriorityGroupingGet - #endif - #ifdef ROM_IntPrioritySet - #undef IntPrioritySet - #define IntPrioritySet ROM_IntPrioritySet - #endif - #ifdef ROM_IntPriorityGet - #undef IntPriorityGet - #define IntPriorityGet ROM_IntPriorityGet - #endif - #ifdef ROM_IntEnable - #undef IntEnable - #define IntEnable ROM_IntEnable - #endif - #ifdef ROM_IntDisable - #undef IntDisable - #define IntDisable ROM_IntDisable - #endif - #ifdef ROM_IntPendSet - #undef IntPendSet - #define IntPendSet ROM_IntPendSet - #endif - #ifdef ROM_IntPendGet - #undef IntPendGet - #define IntPendGet ROM_IntPendGet - #endif - #ifdef ROM_IntPendClear - #undef IntPendClear - #define IntPendClear ROM_IntPendClear - #endif +#include "../driverlib/rom.h" +#ifdef ROM_IntRegister +#undef IntRegister +#define IntRegister ROM_IntRegister +#endif +#ifdef ROM_IntUnregister +#undef IntUnregister +#define IntUnregister ROM_IntUnregister +#endif +#ifdef ROM_IntPriorityGroupingSet +#undef IntPriorityGroupingSet +#define IntPriorityGroupingSet ROM_IntPriorityGroupingSet +#endif +#ifdef ROM_IntPriorityGroupingGet +#undef IntPriorityGroupingGet +#define IntPriorityGroupingGet ROM_IntPriorityGroupingGet +#endif +#ifdef ROM_IntPrioritySet +#undef IntPrioritySet +#define IntPrioritySet ROM_IntPrioritySet +#endif +#ifdef ROM_IntPriorityGet +#undef IntPriorityGet +#define IntPriorityGet ROM_IntPriorityGet +#endif +#ifdef ROM_IntEnable +#undef IntEnable +#define IntEnable ROM_IntEnable +#endif +#ifdef ROM_IntDisable +#undef IntDisable +#define IntDisable ROM_IntDisable +#endif +#ifdef ROM_IntPendSet +#undef IntPendSet +#define IntPendSet ROM_IntPendSet +#endif +#ifdef ROM_IntPendGet +#undef IntPendGet +#define IntPendGet ROM_IntPendGet +#endif +#ifdef ROM_IntPendClear +#undef IntPendClear +#define IntPendClear ROM_IntPendClear +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ioc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ioc.h index 98346e27..1d4a81b6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ioc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ioc.h @@ -83,27 +83,27 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define IOCPortConfigureSet NOROM_IOCPortConfigureSet - #define IOCPortConfigureGet NOROM_IOCPortConfigureGet - #define IOCIOShutdownSet NOROM_IOCIOShutdownSet - #define IOCIOModeSet NOROM_IOCIOModeSet - #define IOCIOIntSet NOROM_IOCIOIntSet - #define IOCIOEvtSet NOROM_IOCIOEvtSet - #define IOCIOPortPullSet NOROM_IOCIOPortPullSet - #define IOCIOHystSet NOROM_IOCIOHystSet - #define IOCIOInputSet NOROM_IOCIOInputSet - #define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet - #define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet - #define IOCIOPortIdSet NOROM_IOCIOPortIdSet - #define IOCIntEnable NOROM_IOCIntEnable - #define IOCIntDisable NOROM_IOCIntDisable - #define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput - #define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput - #define IOCPinTypeUart NOROM_IOCPinTypeUart - #define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster - #define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave - #define IOCPinTypeI2c NOROM_IOCPinTypeI2c - #define IOCPinTypeAux NOROM_IOCPinTypeAux +#define IOCPortConfigureSet NOROM_IOCPortConfigureSet +#define IOCPortConfigureGet NOROM_IOCPortConfigureGet +#define IOCIOShutdownSet NOROM_IOCIOShutdownSet +#define IOCIOModeSet NOROM_IOCIOModeSet +#define IOCIOIntSet NOROM_IOCIOIntSet +#define IOCIOEvtSet NOROM_IOCIOEvtSet +#define IOCIOPortPullSet NOROM_IOCIOPortPullSet +#define IOCIOHystSet NOROM_IOCIOHystSet +#define IOCIOInputSet NOROM_IOCIOInputSet +#define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet +#define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet +#define IOCIOPortIdSet NOROM_IOCIOPortIdSet +#define IOCIntEnable NOROM_IOCIntEnable +#define IOCIntDisable NOROM_IOCIntDisable +#define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput +#define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput +#define IOCPinTypeUart NOROM_IOCPinTypeUart +#define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster +#define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave +#define IOCPinTypeI2c NOROM_IOCPinTypeI2c +#define IOCPinTypeAux NOROM_IOCPinTypeAux #endif //***************************************************************************** @@ -242,15 +242,15 @@ extern "C" #define IOC_IOMODE_NORMAL 0x00000000 // Normal Input/Output #define IOC_IOMODE_INV 0x01000000 // Inverted Input/Output #define IOC_IOMODE_OPEN_DRAIN_NORMAL \ - 0x04000000 // Open Drain, Normal Input/Output + 0x04000000 // Open Drain, Normal Input/Output #define IOC_IOMODE_OPEN_DRAIN_INV \ - 0x05000000 // Open Drain, Inverted - // Input/Output + 0x05000000 // Open Drain, Inverted +// Input/Output #define IOC_IOMODE_OPEN_SRC_NORMAL \ - 0x06000000 // Open Source, Normal Input/Output + 0x06000000 // Open Source, Normal Input/Output #define IOC_IOMODE_OPEN_SRC_INV \ - 0x07000000 // Open Source, Inverted - // Input/Output + 0x07000000 // Open Source, Inverted +// Input/Output //***************************************************************************** // @@ -286,13 +286,13 @@ extern "C" #define IOC_CURRENT_8MA 0x00000800 // 4 or 8mA drive strength #define IOC_STRENGTH_AUTO 0x00000000 // Automatic Drive Strength - // (2/4/8 mA @ VVDS) +// (2/4/8 mA @ VVDS) #define IOC_STRENGTH_MAX 0x00000300 // Maximum Drive Strength - // (2/4/8 mA @ 1.8V) +// (2/4/8 mA @ 1.8V) #define IOC_STRENGTH_MED 0x00000200 // Medium Drive Strength - // (2/4/8 mA @ 2.5V) +// (2/4/8 mA @ 2.5V) #define IOC_STRENGTH_MIN 0x00000100 // Minimum Drive Strength - // (2/4/8 mA @ 3.3V) +// (2/4/8 mA @ 3.3V) //***************************************************************************** // @@ -1118,91 +1118,91 @@ extern void IOCPinTypeAux(uint32_t ui32IOId); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_IOCPortConfigureSet - #undef IOCPortConfigureSet - #define IOCPortConfigureSet ROM_IOCPortConfigureSet - #endif - #ifdef ROM_IOCPortConfigureGet - #undef IOCPortConfigureGet - #define IOCPortConfigureGet ROM_IOCPortConfigureGet - #endif - #ifdef ROM_IOCIOShutdownSet - #undef IOCIOShutdownSet - #define IOCIOShutdownSet ROM_IOCIOShutdownSet - #endif - #ifdef ROM_IOCIOModeSet - #undef IOCIOModeSet - #define IOCIOModeSet ROM_IOCIOModeSet - #endif - #ifdef ROM_IOCIOIntSet - #undef IOCIOIntSet - #define IOCIOIntSet ROM_IOCIOIntSet - #endif - #ifdef ROM_IOCIOEvtSet - #undef IOCIOEvtSet - #define IOCIOEvtSet ROM_IOCIOEvtSet - #endif - #ifdef ROM_IOCIOPortPullSet - #undef IOCIOPortPullSet - #define IOCIOPortPullSet ROM_IOCIOPortPullSet - #endif - #ifdef ROM_IOCIOHystSet - #undef IOCIOHystSet - #define IOCIOHystSet ROM_IOCIOHystSet - #endif - #ifdef ROM_IOCIOInputSet - #undef IOCIOInputSet - #define IOCIOInputSet ROM_IOCIOInputSet - #endif - #ifdef ROM_IOCIOSlewCtrlSet - #undef IOCIOSlewCtrlSet - #define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet - #endif - #ifdef ROM_IOCIODrvStrengthSet - #undef IOCIODrvStrengthSet - #define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet - #endif - #ifdef ROM_IOCIOPortIdSet - #undef IOCIOPortIdSet - #define IOCIOPortIdSet ROM_IOCIOPortIdSet - #endif - #ifdef ROM_IOCIntEnable - #undef IOCIntEnable - #define IOCIntEnable ROM_IOCIntEnable - #endif - #ifdef ROM_IOCIntDisable - #undef IOCIntDisable - #define IOCIntDisable ROM_IOCIntDisable - #endif - #ifdef ROM_IOCPinTypeGpioInput - #undef IOCPinTypeGpioInput - #define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput - #endif - #ifdef ROM_IOCPinTypeGpioOutput - #undef IOCPinTypeGpioOutput - #define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput - #endif - #ifdef ROM_IOCPinTypeUart - #undef IOCPinTypeUart - #define IOCPinTypeUart ROM_IOCPinTypeUart - #endif - #ifdef ROM_IOCPinTypeSsiMaster - #undef IOCPinTypeSsiMaster - #define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster - #endif - #ifdef ROM_IOCPinTypeSsiSlave - #undef IOCPinTypeSsiSlave - #define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave - #endif - #ifdef ROM_IOCPinTypeI2c - #undef IOCPinTypeI2c - #define IOCPinTypeI2c ROM_IOCPinTypeI2c - #endif - #ifdef ROM_IOCPinTypeAux - #undef IOCPinTypeAux - #define IOCPinTypeAux ROM_IOCPinTypeAux - #endif +#include "../driverlib/rom.h" +#ifdef ROM_IOCPortConfigureSet +#undef IOCPortConfigureSet +#define IOCPortConfigureSet ROM_IOCPortConfigureSet +#endif +#ifdef ROM_IOCPortConfigureGet +#undef IOCPortConfigureGet +#define IOCPortConfigureGet ROM_IOCPortConfigureGet +#endif +#ifdef ROM_IOCIOShutdownSet +#undef IOCIOShutdownSet +#define IOCIOShutdownSet ROM_IOCIOShutdownSet +#endif +#ifdef ROM_IOCIOModeSet +#undef IOCIOModeSet +#define IOCIOModeSet ROM_IOCIOModeSet +#endif +#ifdef ROM_IOCIOIntSet +#undef IOCIOIntSet +#define IOCIOIntSet ROM_IOCIOIntSet +#endif +#ifdef ROM_IOCIOEvtSet +#undef IOCIOEvtSet +#define IOCIOEvtSet ROM_IOCIOEvtSet +#endif +#ifdef ROM_IOCIOPortPullSet +#undef IOCIOPortPullSet +#define IOCIOPortPullSet ROM_IOCIOPortPullSet +#endif +#ifdef ROM_IOCIOHystSet +#undef IOCIOHystSet +#define IOCIOHystSet ROM_IOCIOHystSet +#endif +#ifdef ROM_IOCIOInputSet +#undef IOCIOInputSet +#define IOCIOInputSet ROM_IOCIOInputSet +#endif +#ifdef ROM_IOCIOSlewCtrlSet +#undef IOCIOSlewCtrlSet +#define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet +#endif +#ifdef ROM_IOCIODrvStrengthSet +#undef IOCIODrvStrengthSet +#define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet +#endif +#ifdef ROM_IOCIOPortIdSet +#undef IOCIOPortIdSet +#define IOCIOPortIdSet ROM_IOCIOPortIdSet +#endif +#ifdef ROM_IOCIntEnable +#undef IOCIntEnable +#define IOCIntEnable ROM_IOCIntEnable +#endif +#ifdef ROM_IOCIntDisable +#undef IOCIntDisable +#define IOCIntDisable ROM_IOCIntDisable +#endif +#ifdef ROM_IOCPinTypeGpioInput +#undef IOCPinTypeGpioInput +#define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput +#endif +#ifdef ROM_IOCPinTypeGpioOutput +#undef IOCPinTypeGpioOutput +#define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput +#endif +#ifdef ROM_IOCPinTypeUart +#undef IOCPinTypeUart +#define IOCPinTypeUart ROM_IOCPinTypeUart +#endif +#ifdef ROM_IOCPinTypeSsiMaster +#undef IOCPinTypeSsiMaster +#define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster +#endif +#ifdef ROM_IOCPinTypeSsiSlave +#undef IOCPinTypeSsiSlave +#define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave +#endif +#ifdef ROM_IOCPinTypeI2c +#undef IOCPinTypeI2c +#define IOCPinTypeI2c ROM_IOCPinTypeI2c +#endif +#ifdef ROM_IOCPinTypeAux +#undef IOCPinTypeAux +#define IOCPinTypeAux ROM_IOCPinTypeAux +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/osc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/osc.h index a355fd1e..b504a3a2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/osc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/osc.h @@ -86,20 +86,20 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define OSCClockSourceSet NOROM_OSCClockSourceSet - #define OSCClockSourceGet NOROM_OSCClockSourceGet - #define OSCHF_GetStartupTime NOROM_OSCHF_GetStartupTime - #define OSCHF_TurnOnXosc NOROM_OSCHF_TurnOnXosc - #define OSCHF_AttemptToSwitchToXosc NOROM_OSCHF_AttemptToSwitchToXosc - #define OSCHF_SwitchToRcOscTurnOffXosc NOROM_OSCHF_SwitchToRcOscTurnOffXosc - #define OSCHF_DebugGetCrystalAmplitude NOROM_OSCHF_DebugGetCrystalAmplitude - #define OSCHF_DebugGetExpectedAverageCrystalAmplitude NOROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #define OSC_HPOSC_Debug_InitFreqOffsetParams NOROM_OSC_HPOSC_Debug_InitFreqOffsetParams - #define OSC_HPOSCInitializeFrequencyOffsetParameters NOROM_OSC_HPOSCInitializeFrequencyOffsetParameters - #define OSC_HPOSCRelativeFrequencyOffsetGet NOROM_OSC_HPOSCRelativeFrequencyOffsetGet - #define OSC_AdjustXoscHfCapArray NOROM_OSC_AdjustXoscHfCapArray - #define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert NOROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #define OSC_HPOSCRtcCompensate NOROM_OSC_HPOSCRtcCompensate +#define OSCClockSourceSet NOROM_OSCClockSourceSet +#define OSCClockSourceGet NOROM_OSCClockSourceGet +#define OSCHF_GetStartupTime NOROM_OSCHF_GetStartupTime +#define OSCHF_TurnOnXosc NOROM_OSCHF_TurnOnXosc +#define OSCHF_AttemptToSwitchToXosc NOROM_OSCHF_AttemptToSwitchToXosc +#define OSCHF_SwitchToRcOscTurnOffXosc NOROM_OSCHF_SwitchToRcOscTurnOffXosc +#define OSCHF_DebugGetCrystalAmplitude NOROM_OSCHF_DebugGetCrystalAmplitude +#define OSCHF_DebugGetExpectedAverageCrystalAmplitude NOROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#define OSC_HPOSC_Debug_InitFreqOffsetParams NOROM_OSC_HPOSC_Debug_InitFreqOffsetParams +#define OSC_HPOSCInitializeFrequencyOffsetParameters NOROM_OSC_HPOSCInitializeFrequencyOffsetParameters +#define OSC_HPOSCRelativeFrequencyOffsetGet NOROM_OSC_HPOSCRelativeFrequencyOffsetGet +#define OSC_AdjustXoscHfCapArray NOROM_OSC_AdjustXoscHfCapArray +#define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert NOROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#define OSC_HPOSCRtcCompensate NOROM_OSC_HPOSCRtcCompensate #endif //***************************************************************************** @@ -179,8 +179,8 @@ __STATIC_INLINE void OSCClockLossEventEnable( void ) { DDI16BitfieldWrite( AUX_DDI0_OSC_BASE, DDI_0_OSC_O_CTL0, - DDI_0_OSC_CTL0_CLK_LOSS_EN_M, - DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 1 ); + DDI_0_OSC_CTL0_CLK_LOSS_EN_M, + DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 1 ); } //***************************************************************************** @@ -202,8 +202,8 @@ __STATIC_INLINE void OSCClockLossEventDisable( void ) { DDI16BitfieldWrite( AUX_DDI0_OSC_BASE, DDI_0_OSC_O_CTL0, - DDI_0_OSC_CTL0_CLK_LOSS_EN_M, - DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 0 ); + DDI_0_OSC_CTL0_CLK_LOSS_EN_M, + DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 0 ); } //***************************************************************************** @@ -288,7 +288,7 @@ OSCHfSourceReady(void) return (DDI16BitfieldRead(AUX_DDI0_OSC_BASE, DDI_0_OSC_O_STAT0, DDI_0_OSC_STAT0_PENDINGSCLKHFSWITCHING_M, DDI_0_OSC_STAT0_PENDINGSCLKHFSWITCHING_S)) ? - true : false; + true : false; } //***************************************************************************** @@ -316,7 +316,7 @@ OSCHfSourceSwitch(void) uint16_t hfSrc = HWREGH(AUX_DDI0_OSC_BASE + DDI_0_OSC_O_CTL0) & DDI_0_OSC_CTL0_SCLK_HF_SRC_SEL_M; // If target clock source is RCOSC, change clock source for DCDC to RCOSC - if(hfSrc == DDI_0_OSC_CTL0_SCLK_HF_SRC_SEL_RCOSC) + if (hfSrc == DDI_0_OSC_CTL0_SCLK_HF_SRC_SEL_RCOSC) { // Force DCDC to use RCOSC before switching SCLK_HF to RCOSC HWREG(AUX_DDI0_OSC_BASE + DDI_O_MASK16B + (DDI_0_OSC_O_CTL0 << 1) + 4) = DDI_0_OSC_CTL0_CLK_DCDC_SRC_SEL_M | (DDI_0_OSC_CTL0_CLK_DCDC_SRC_SEL_M >> 16); @@ -328,7 +328,7 @@ OSCHfSourceSwitch(void) HapiHFSourceSafeSwitch(); // If target clock source is XOSC, change clock source for DCDC to "auto" - if(hfSrc == DDI_0_OSC_CTL0_SCLK_HF_SRC_SEL_XOSC) + if (hfSrc == DDI_0_OSC_CTL0_SCLK_HF_SRC_SEL_XOSC) { // Set DCDC clock source back to "auto" after SCLK_HF was switched to XOSC HWREG(AUX_DDI0_OSC_BASE + DDI_O_MASK16B + (DDI_0_OSC_O_CTL0 << 1) + 4) = DDI_0_OSC_CTL0_CLK_DCDC_SRC_SEL_M; @@ -352,8 +352,8 @@ OSC_IsHPOSCEnabled(void) { bool enabled = false; - if((( HWREG(CCFG_BASE + CCFG_O_MODE_CONF) & CCFG_MODE_CONF_XOSC_FREQ_M) == CCFG_MODE_CONF_XOSC_FREQ_HPOSC) && - (( HWREG(FCFG1_BASE + FCFG1_O_OSC_CONF) & FCFG1_OSC_CONF_HPOSC_OPTION) == 0)) + if ((( HWREG(CCFG_BASE + CCFG_O_MODE_CONF) & CCFG_MODE_CONF_XOSC_FREQ_M) == CCFG_MODE_CONF_XOSC_FREQ_HPOSC) && + (( HWREG(FCFG1_BASE + FCFG1_O_OSC_CONF) & FCFG1_OSC_CONF_HPOSC_OPTION) == 0)) { enabled = true; } @@ -381,10 +381,11 @@ OSC_IsHPOSCEnabledWithHfDerivedLfClock(void) // Check configuration by reading lower half of the 32-bit CTL0 register uint16_t regVal = HWREGH(AUX_DDI0_OSC_BASE + DDI_0_OSC_O_CTL0); - if( ( ( regVal & DDI_0_OSC_CTL0_SCLK_LF_SRC_SEL_M ) == DDI_0_OSC_CTL0_SCLK_LF_SRC_SEL_XOSCHFDLF ) && - ( ( regVal & DDI_0_OSC_CTL0_HPOSC_MODE_EN_M ) == DDI_0_OSC_CTL0_HPOSC_MODE_EN ) ) + + if ( ( ( regVal & DDI_0_OSC_CTL0_SCLK_LF_SRC_SEL_M ) == DDI_0_OSC_CTL0_SCLK_LF_SRC_SEL_XOSCHFDLF ) && + ( ( regVal & DDI_0_OSC_CTL0_HPOSC_MODE_EN_M ) == DDI_0_OSC_CTL0_HPOSC_MODE_EN ) ) { - enabled = true; + enabled = true; } return (enabled); @@ -491,14 +492,15 @@ extern uint32_t OSCHF_DebugGetExpectedAverageCrystalAmplitude( void ); //! \sa OSC_HPOSC_Debug_InitFreqOffsetParams() // //***************************************************************************** -typedef struct { - uint32_t meas_1 ; //!< Measurement set 1 (typically at room temp) - uint32_t meas_2 ; //!< Measurement set 2 (typically at high temp) - uint32_t meas_3 ; //!< Measurement set 3 (typically at low temp) - int32_t offsetD1 ; //!< Offset to measurement set 1 - int32_t offsetD2 ; //!< Offset to measurement set 2 - int32_t offsetD3 ; //!< Offset to measurement set 3 - int32_t polyP3 ; //!< The P3 polynomial +typedef struct +{ + uint32_t meas_1 ; //!< Measurement set 1 (typically at room temp) + uint32_t meas_2 ; //!< Measurement set 2 (typically at high temp) + uint32_t meas_3 ; //!< Measurement set 3 (typically at low temp) + int32_t offsetD1 ; //!< Offset to measurement set 1 + int32_t offsetD2 ; //!< Offset to measurement set 2 + int32_t offsetD3 ; //!< Offset to measurement set 3 + int32_t polyP3 ; //!< The P3 polynomial } HposcDebugData_t; //***************************************************************************** @@ -512,7 +514,7 @@ typedef struct { //! \sa OSC_HPOSCInitializeFrequencyOffsetParameters() // //***************************************************************************** -extern void OSC_HPOSC_Debug_InitFreqOffsetParams( HposcDebugData_t * pDebugData ); +extern void OSC_HPOSC_Debug_InitFreqOffsetParams( HposcDebugData_t* pDebugData ); //***************************************************************************** // @@ -651,63 +653,63 @@ extern void OSC_HPOSCRtcCompensate( int32_t relFreqOffset ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_OSCClockSourceSet - #undef OSCClockSourceSet - #define OSCClockSourceSet ROM_OSCClockSourceSet - #endif - #ifdef ROM_OSCClockSourceGet - #undef OSCClockSourceGet - #define OSCClockSourceGet ROM_OSCClockSourceGet - #endif - #ifdef ROM_OSCHF_GetStartupTime - #undef OSCHF_GetStartupTime - #define OSCHF_GetStartupTime ROM_OSCHF_GetStartupTime - #endif - #ifdef ROM_OSCHF_TurnOnXosc - #undef OSCHF_TurnOnXosc - #define OSCHF_TurnOnXosc ROM_OSCHF_TurnOnXosc - #endif - #ifdef ROM_OSCHF_AttemptToSwitchToXosc - #undef OSCHF_AttemptToSwitchToXosc - #define OSCHF_AttemptToSwitchToXosc ROM_OSCHF_AttemptToSwitchToXosc - #endif - #ifdef ROM_OSCHF_SwitchToRcOscTurnOffXosc - #undef OSCHF_SwitchToRcOscTurnOffXosc - #define OSCHF_SwitchToRcOscTurnOffXosc ROM_OSCHF_SwitchToRcOscTurnOffXosc - #endif - #ifdef ROM_OSCHF_DebugGetCrystalAmplitude - #undef OSCHF_DebugGetCrystalAmplitude - #define OSCHF_DebugGetCrystalAmplitude ROM_OSCHF_DebugGetCrystalAmplitude - #endif - #ifdef ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #undef OSCHF_DebugGetExpectedAverageCrystalAmplitude - #define OSCHF_DebugGetExpectedAverageCrystalAmplitude ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #endif - #ifdef ROM_OSC_HPOSC_Debug_InitFreqOffsetParams - #undef OSC_HPOSC_Debug_InitFreqOffsetParams - #define OSC_HPOSC_Debug_InitFreqOffsetParams ROM_OSC_HPOSC_Debug_InitFreqOffsetParams - #endif - #ifdef ROM_OSC_HPOSCInitializeFrequencyOffsetParameters - #undef OSC_HPOSCInitializeFrequencyOffsetParameters - #define OSC_HPOSCInitializeFrequencyOffsetParameters ROM_OSC_HPOSCInitializeFrequencyOffsetParameters - #endif - #ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetGet - #undef OSC_HPOSCRelativeFrequencyOffsetGet - #define OSC_HPOSCRelativeFrequencyOffsetGet ROM_OSC_HPOSCRelativeFrequencyOffsetGet - #endif - #ifdef ROM_OSC_AdjustXoscHfCapArray - #undef OSC_AdjustXoscHfCapArray - #define OSC_AdjustXoscHfCapArray ROM_OSC_AdjustXoscHfCapArray - #endif - #ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #undef OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #endif - #ifdef ROM_OSC_HPOSCRtcCompensate - #undef OSC_HPOSCRtcCompensate - #define OSC_HPOSCRtcCompensate ROM_OSC_HPOSCRtcCompensate - #endif +#include "../driverlib/rom.h" +#ifdef ROM_OSCClockSourceSet +#undef OSCClockSourceSet +#define OSCClockSourceSet ROM_OSCClockSourceSet +#endif +#ifdef ROM_OSCClockSourceGet +#undef OSCClockSourceGet +#define OSCClockSourceGet ROM_OSCClockSourceGet +#endif +#ifdef ROM_OSCHF_GetStartupTime +#undef OSCHF_GetStartupTime +#define OSCHF_GetStartupTime ROM_OSCHF_GetStartupTime +#endif +#ifdef ROM_OSCHF_TurnOnXosc +#undef OSCHF_TurnOnXosc +#define OSCHF_TurnOnXosc ROM_OSCHF_TurnOnXosc +#endif +#ifdef ROM_OSCHF_AttemptToSwitchToXosc +#undef OSCHF_AttemptToSwitchToXosc +#define OSCHF_AttemptToSwitchToXosc ROM_OSCHF_AttemptToSwitchToXosc +#endif +#ifdef ROM_OSCHF_SwitchToRcOscTurnOffXosc +#undef OSCHF_SwitchToRcOscTurnOffXosc +#define OSCHF_SwitchToRcOscTurnOffXosc ROM_OSCHF_SwitchToRcOscTurnOffXosc +#endif +#ifdef ROM_OSCHF_DebugGetCrystalAmplitude +#undef OSCHF_DebugGetCrystalAmplitude +#define OSCHF_DebugGetCrystalAmplitude ROM_OSCHF_DebugGetCrystalAmplitude +#endif +#ifdef ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#undef OSCHF_DebugGetExpectedAverageCrystalAmplitude +#define OSCHF_DebugGetExpectedAverageCrystalAmplitude ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#endif +#ifdef ROM_OSC_HPOSC_Debug_InitFreqOffsetParams +#undef OSC_HPOSC_Debug_InitFreqOffsetParams +#define OSC_HPOSC_Debug_InitFreqOffsetParams ROM_OSC_HPOSC_Debug_InitFreqOffsetParams +#endif +#ifdef ROM_OSC_HPOSCInitializeFrequencyOffsetParameters +#undef OSC_HPOSCInitializeFrequencyOffsetParameters +#define OSC_HPOSCInitializeFrequencyOffsetParameters ROM_OSC_HPOSCInitializeFrequencyOffsetParameters +#endif +#ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetGet +#undef OSC_HPOSCRelativeFrequencyOffsetGet +#define OSC_HPOSCRelativeFrequencyOffsetGet ROM_OSC_HPOSCRelativeFrequencyOffsetGet +#endif +#ifdef ROM_OSC_AdjustXoscHfCapArray +#undef OSC_AdjustXoscHfCapArray +#define OSC_AdjustXoscHfCapArray ROM_OSC_AdjustXoscHfCapArray +#endif +#ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#undef OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#endif +#ifdef ROM_OSC_HPOSCRtcCompensate +#undef OSC_HPOSCRtcCompensate +#define OSC_HPOSCRtcCompensate ROM_OSC_HPOSCRtcCompensate +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pka.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pka.h index 785e5fe9..d81fef37 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pka.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pka.h @@ -83,31 +83,31 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PKAClearPkaRam NOROM_PKAClearPkaRam - #define PKAGetOpsStatus NOROM_PKAGetOpsStatus - #define PKAArrayAllZeros NOROM_PKAArrayAllZeros - #define PKAZeroOutArray NOROM_PKAZeroOutArray - #define PKABigNumModStart NOROM_PKABigNumModStart - #define PKABigNumModGetResult NOROM_PKABigNumModGetResult - #define PKABigNumDivideStart NOROM_PKABigNumDivideStart - #define PKABigNumDivideGetQuotient NOROM_PKABigNumDivideGetQuotient - #define PKABigNumDivideGetRemainder NOROM_PKABigNumDivideGetRemainder - #define PKABigNumCmpStart NOROM_PKABigNumCmpStart - #define PKABigNumCmpGetResult NOROM_PKABigNumCmpGetResult - #define PKABigNumInvModStart NOROM_PKABigNumInvModStart - #define PKABigNumInvModGetResult NOROM_PKABigNumInvModGetResult - #define PKABigNumMultiplyStart NOROM_PKABigNumMultiplyStart - #define PKABigNumMultGetResult NOROM_PKABigNumMultGetResult - #define PKABigNumAddStart NOROM_PKABigNumAddStart - #define PKABigNumAddGetResult NOROM_PKABigNumAddGetResult - #define PKABigNumSubStart NOROM_PKABigNumSubStart - #define PKABigNumSubGetResult NOROM_PKABigNumSubGetResult - #define PKAEccMultiplyStart NOROM_PKAEccMultiplyStart - #define PKAEccMontgomeryMultiplyStart NOROM_PKAEccMontgomeryMultiplyStart - #define PKAEccMultiplyGetResult NOROM_PKAEccMultiplyGetResult - #define PKAEccAddStart NOROM_PKAEccAddStart - #define PKAEccAddGetResult NOROM_PKAEccAddGetResult - #define PKAEccVerifyPublicKeyWeierstrassStart NOROM_PKAEccVerifyPublicKeyWeierstrassStart +#define PKAClearPkaRam NOROM_PKAClearPkaRam +#define PKAGetOpsStatus NOROM_PKAGetOpsStatus +#define PKAArrayAllZeros NOROM_PKAArrayAllZeros +#define PKAZeroOutArray NOROM_PKAZeroOutArray +#define PKABigNumModStart NOROM_PKABigNumModStart +#define PKABigNumModGetResult NOROM_PKABigNumModGetResult +#define PKABigNumDivideStart NOROM_PKABigNumDivideStart +#define PKABigNumDivideGetQuotient NOROM_PKABigNumDivideGetQuotient +#define PKABigNumDivideGetRemainder NOROM_PKABigNumDivideGetRemainder +#define PKABigNumCmpStart NOROM_PKABigNumCmpStart +#define PKABigNumCmpGetResult NOROM_PKABigNumCmpGetResult +#define PKABigNumInvModStart NOROM_PKABigNumInvModStart +#define PKABigNumInvModGetResult NOROM_PKABigNumInvModGetResult +#define PKABigNumMultiplyStart NOROM_PKABigNumMultiplyStart +#define PKABigNumMultGetResult NOROM_PKABigNumMultGetResult +#define PKABigNumAddStart NOROM_PKABigNumAddStart +#define PKABigNumAddGetResult NOROM_PKABigNumAddGetResult +#define PKABigNumSubStart NOROM_PKABigNumSubStart +#define PKABigNumSubGetResult NOROM_PKABigNumSubGetResult +#define PKAEccMultiplyStart NOROM_PKAEccMultiplyStart +#define PKAEccMontgomeryMultiplyStart NOROM_PKAEccMontgomeryMultiplyStart +#define PKAEccMultiplyGetResult NOROM_PKAEccMultiplyGetResult +#define PKAEccAddStart NOROM_PKAEccAddStart +#define PKAEccAddGetResult NOROM_PKAEccAddGetResult +#define PKAEccVerifyPublicKeyWeierstrassStart NOROM_PKAEccVerifyPublicKeyWeierstrassStart #endif @@ -199,27 +199,32 @@ extern "C" // Union for parameters that forces 32-bit alignment on the byte array. // //***************************************************************************** -typedef union { +typedef union +{ uint8_t byte[28]; uint32_t word[28 / sizeof(uint32_t)]; } PKA_EccParam224; -typedef union { +typedef union +{ uint8_t byte[32]; uint32_t word[32 / sizeof(uint32_t)]; } PKA_EccParam256; -typedef union { +typedef union +{ uint8_t byte[48]; uint32_t word[48 / sizeof(uint32_t)]; } PKA_EccParam384; -typedef union { +typedef union +{ uint8_t byte[64]; uint32_t word[64 / sizeof(uint32_t)]; } PKA_EccParam512; -typedef union { +typedef union +{ uint8_t byte[68]; uint32_t word[68 / sizeof(uint32_t)]; } PKA_EccParam521; @@ -232,27 +237,32 @@ typedef union { //***************************************************************************** -typedef struct PKA_EccPoint224_ { +typedef struct PKA_EccPoint224_ +{ PKA_EccParam224 x; PKA_EccParam224 y; } PKA_EccPoint224; -typedef struct PKA_EccPoint256_ { +typedef struct PKA_EccPoint256_ +{ PKA_EccParam256 x; PKA_EccParam256 y; } PKA_EccPoint256; -typedef struct PKA_EccPoint384_ { +typedef struct PKA_EccPoint384_ +{ PKA_EccParam384 x; PKA_EccParam384 y; } PKA_EccPoint384; -typedef struct PKA_EccPoint512_ { +typedef struct PKA_EccPoint512_ +{ PKA_EccParam512 x; PKA_EccParam512 y; } PKA_EccPoint512; -typedef struct PKA_EccPoint521_ { +typedef struct PKA_EccPoint521_ +{ PKA_EccParam521 x; PKA_EccParam521 y; } PKA_EccPoint521; @@ -640,7 +650,7 @@ extern uint32_t PKAGetOpsStatus(void); //! or more bits are set. // //***************************************************************************** -extern bool PKAArrayAllZeros(const uint8_t *array, uint32_t arrayLength); +extern bool PKAArrayAllZeros(const uint8_t* array, uint32_t arrayLength); //***************************************************************************** // @@ -651,7 +661,7 @@ extern bool PKAArrayAllZeros(const uint8_t *array, uint32_t arrayLength); //! \param [in] arrayLength is the length of the array. // //***************************************************************************** -extern void PKAZeroOutArray(const uint8_t *array, uint32_t arrayLength); +extern void PKAZeroOutArray(const uint8_t* array, uint32_t arrayLength); //***************************************************************************** // @@ -681,7 +691,7 @@ extern void PKAZeroOutArray(const uint8_t *array, uint32_t arrayLength); //! \sa PKABigNumModGetResult() // //***************************************************************************** -extern uint32_t PKABigNumModStart(const uint8_t *bigNum, uint32_t bigNumLength, const uint8_t *modulus, uint32_t modulusLength, uint32_t *resultPKAMemAddr); +extern uint32_t PKABigNumModStart(const uint8_t* bigNum, uint32_t bigNumLength, const uint8_t* modulus, uint32_t modulusLength, uint32_t* resultPKAMemAddr); //***************************************************************************** // @@ -711,7 +721,7 @@ extern uint32_t PKABigNumModStart(const uint8_t *bigNum, uint32_t bigNumLength, //! \sa PKABigNumModStart() // //***************************************************************************** -extern uint32_t PKABigNumModGetResult(uint8_t *resultBuf, uint32_t length, uint32_t resultPKAMemAddr); +extern uint32_t PKABigNumModGetResult(uint8_t* resultBuf, uint32_t length, uint32_t resultPKAMemAddr); //***************************************************************************** // @@ -743,12 +753,12 @@ extern uint32_t PKABigNumModGetResult(uint8_t *resultBuf, uint32_t length, uint //! \sa PKABigNumDivideGetResult() // //***************************************************************************** -extern uint32_t PKABigNumDivideStart(const uint8_t *dividend, +extern uint32_t PKABigNumDivideStart(const uint8_t* dividend, uint32_t dividendLength, - const uint8_t *divisor, + const uint8_t* divisor, uint32_t divisorLength, - uint32_t *resultQuotientMemAddr, - uint32_t *resultRemainderMemAddr); + uint32_t* resultQuotientMemAddr, + uint32_t* resultRemainderMemAddr); //***************************************************************************** // @@ -776,7 +786,7 @@ extern uint32_t PKABigNumDivideStart(const uint8_t *dividend, //! \sa PKABigNumDivideStart() // //***************************************************************************** -extern uint32_t PKABigNumDivideGetQuotient(uint8_t *resultBuf, uint32_t *length, uint32_t resultQuotientMemAddr); +extern uint32_t PKABigNumDivideGetQuotient(uint8_t* resultBuf, uint32_t* length, uint32_t resultQuotientMemAddr); //***************************************************************************** // @@ -804,7 +814,7 @@ extern uint32_t PKABigNumDivideGetQuotient(uint8_t *resultBuf, uint32_t *length, //! \sa PKABigNumDivideStart() // //***************************************************************************** -extern uint32_t PKABigNumDivideGetRemainder(uint8_t *resultBuf, uint32_t *length, uint32_t resultRemainderMemAddr); +extern uint32_t PKABigNumDivideGetRemainder(uint8_t* resultBuf, uint32_t* length, uint32_t resultRemainderMemAddr); //***************************************************************************** // @@ -829,7 +839,7 @@ extern uint32_t PKABigNumDivideGetRemainder(uint8_t *resultBuf, uint32_t *length //! \sa PKABigNumCmpGetResult() // //***************************************************************************** -extern uint32_t PKABigNumCmpStart(const uint8_t *bigNum1, const uint8_t *bigNum2, uint32_t length); +extern uint32_t PKABigNumCmpStart(const uint8_t* bigNum1, const uint8_t* bigNum2, uint32_t length); //***************************************************************************** // @@ -877,7 +887,7 @@ extern uint32_t PKABigNumCmpGetResult(void); //! \sa PKABigNumInvModGetResult() // //***************************************************************************** -extern uint32_t PKABigNumInvModStart(const uint8_t *bigNum, uint32_t bigNumLength, const uint8_t *modulus, uint32_t modulusLength, uint32_t *resultPKAMemAddr); +extern uint32_t PKABigNumInvModStart(const uint8_t* bigNum, uint32_t bigNumLength, const uint8_t* modulus, uint32_t modulusLength, uint32_t* resultPKAMemAddr); //***************************************************************************** @@ -908,7 +918,7 @@ extern uint32_t PKABigNumInvModStart(const uint8_t *bigNum, uint32_t bigNumLeng //! \sa PKABigNumInvModStart() // //***************************************************************************** -extern uint32_t PKABigNumInvModGetResult(uint8_t *resultBuf, uint32_t length, uint32_t resultPKAMemAddr); +extern uint32_t PKABigNumInvModGetResult(uint8_t* resultBuf, uint32_t length, uint32_t resultPKAMemAddr); //***************************************************************************** @@ -936,7 +946,7 @@ extern uint32_t PKABigNumInvModGetResult(uint8_t *resultBuf, uint32_t length, u //! \sa PKABigNumMultGetResult() // //***************************************************************************** -extern uint32_t PKABigNumMultiplyStart(const uint8_t *multiplicand, uint32_t multiplicandLength, const uint8_t *multiplier, uint32_t multiplierLength, uint32_t *resultPKAMemAddr); +extern uint32_t PKABigNumMultiplyStart(const uint8_t* multiplicand, uint32_t multiplicandLength, const uint8_t* multiplier, uint32_t multiplierLength, uint32_t* resultPKAMemAddr); //***************************************************************************** @@ -968,7 +978,7 @@ extern uint32_t PKABigNumMultiplyStart(const uint8_t *multiplicand, uint32_t mu //! \sa PKABigNumMultiplyStart() // //***************************************************************************** -extern uint32_t PKABigNumMultGetResult(uint8_t *resultBuf, uint32_t *resultLength, uint32_t resultPKAMemAddr); +extern uint32_t PKABigNumMultGetResult(uint8_t* resultBuf, uint32_t* resultLength, uint32_t resultPKAMemAddr); //***************************************************************************** // @@ -995,7 +1005,7 @@ extern uint32_t PKABigNumMultGetResult(uint8_t *resultBuf, uint32_t *resultLeng //! \sa PKABigNumAddGetResult() // //***************************************************************************** -extern uint32_t PKABigNumAddStart(const uint8_t *bigNum1, uint32_t bigNum1Length, const uint8_t *bigNum2, uint32_t bigNum2Length, uint32_t *resultPKAMemAddr); +extern uint32_t PKABigNumAddStart(const uint8_t* bigNum1, uint32_t bigNum1Length, const uint8_t* bigNum2, uint32_t bigNum2Length, uint32_t* resultPKAMemAddr); //***************************************************************************** // @@ -1024,7 +1034,7 @@ extern uint32_t PKABigNumAddStart(const uint8_t *bigNum1, uint32_t bigNum1Lengt //! \sa PKABigNumAddStart() // //***************************************************************************** -extern uint32_t PKABigNumAddGetResult(uint8_t *resultBuf, uint32_t *resultLength, uint32_t resultPKAMemAddr); +extern uint32_t PKABigNumAddGetResult(uint8_t* resultBuf, uint32_t* resultLength, uint32_t resultPKAMemAddr); //***************************************************************************** // @@ -1051,7 +1061,7 @@ extern uint32_t PKABigNumAddGetResult(uint8_t *resultBuf, uint32_t *resultLengt //! \sa PKABigNumSubGetResult() // //***************************************************************************** -extern uint32_t PKABigNumSubStart(const uint8_t *minuend, uint32_t minuendLength, const uint8_t *subtrahend, uint32_t subtrahendLength, uint32_t *resultPKAMemAddr); +extern uint32_t PKABigNumSubStart(const uint8_t* minuend, uint32_t minuendLength, const uint8_t* subtrahend, uint32_t subtrahendLength, uint32_t* resultPKAMemAddr); //***************************************************************************** // @@ -1080,7 +1090,7 @@ extern uint32_t PKABigNumSubStart(const uint8_t *minuend, uint32_t minuendLength //! \sa PKABigNumSubStart() // //***************************************************************************** -extern uint32_t PKABigNumSubGetResult(uint8_t *resultBuf, uint32_t *resultLength, uint32_t resultPKAMemAddr); +extern uint32_t PKABigNumSubGetResult(uint8_t* resultBuf, uint32_t* resultLength, uint32_t resultPKAMemAddr); //***************************************************************************** // @@ -1118,14 +1128,14 @@ extern uint32_t PKABigNumSubGetResult(uint8_t *resultBuf, uint32_t *resultLength //! \sa PKAEccMultiplyGetResult() // //***************************************************************************** -extern uint32_t PKAEccMultiplyStart(const uint8_t *scalar, - const uint8_t *curvePointX, - const uint8_t *curvePointY, - const uint8_t *prime, - const uint8_t *a, - const uint8_t *b, +extern uint32_t PKAEccMultiplyStart(const uint8_t* scalar, + const uint8_t* curvePointX, + const uint8_t* curvePointY, + const uint8_t* prime, + const uint8_t* a, + const uint8_t* b, uint32_t length, - uint32_t *resultPKAMemAddr); + uint32_t* resultPKAMemAddr); //***************************************************************************** // @@ -1156,12 +1166,12 @@ extern uint32_t PKAEccMultiplyStart(const uint8_t *scalar, //! \sa PKAEccMultiplyGetResult() // //***************************************************************************** -extern uint32_t PKAEccMontgomeryMultiplyStart(const uint8_t *scalar, - const uint8_t *curvePointX, - const uint8_t *prime, - const uint8_t *a, - uint32_t length, - uint32_t *resultPKAMemAddr); +extern uint32_t PKAEccMontgomeryMultiplyStart(const uint8_t* scalar, + const uint8_t* curvePointX, + const uint8_t* prime, + const uint8_t* a, + uint32_t length, + uint32_t* resultPKAMemAddr); //***************************************************************************** // @@ -1192,7 +1202,7 @@ extern uint32_t PKAEccMontgomeryMultiplyStart(const uint8_t *scalar, //! \sa PKAEccMultiplyStart() // //***************************************************************************** -extern uint32_t PKAEccMultiplyGetResult(uint8_t *curvePointX, uint8_t *curvePointY, uint32_t resultPKAMemAddr, uint32_t length); +extern uint32_t PKAEccMultiplyGetResult(uint8_t* curvePointX, uint8_t* curvePointY, uint32_t resultPKAMemAddr, uint32_t length); //***************************************************************************** // @@ -1232,14 +1242,14 @@ extern uint32_t PKAEccMultiplyGetResult(uint8_t *curvePointX, uint8_t *curvePoi //! \sa PKAEccAddGetResult() // //***************************************************************************** -extern uint32_t PKAEccAddStart(const uint8_t *curvePoint1X, - const uint8_t *curvePoint1Y, - const uint8_t *curvePoint2X, - const uint8_t *curvePoint2Y, - const uint8_t *prime, - const uint8_t *a, +extern uint32_t PKAEccAddStart(const uint8_t* curvePoint1X, + const uint8_t* curvePoint1Y, + const uint8_t* curvePoint2X, + const uint8_t* curvePoint2Y, + const uint8_t* prime, + const uint8_t* a, uint32_t length, - uint32_t *resultPKAMemAddr); + uint32_t* resultPKAMemAddr); //***************************************************************************** // @@ -1269,7 +1279,7 @@ extern uint32_t PKAEccAddStart(const uint8_t *curvePoint1X, //! \sa PKAEccAddStart() // //***************************************************************************** -extern uint32_t PKAEccAddGetResult(uint8_t *curvePointX, uint8_t *curvePointY, uint32_t resultPKAMemAddr, uint32_t length); +extern uint32_t PKAEccAddGetResult(uint8_t* curvePointX, uint8_t* curvePointY, uint32_t resultPKAMemAddr, uint32_t length); //***************************************************************************** @@ -1317,13 +1327,13 @@ extern uint32_t PKAEccAddGetResult(uint8_t *curvePointX, uint8_t *curvePointY, //! \sa PKAEccVerifyPublicKeyGetResult() // //***************************************************************************** -extern uint32_t PKAEccVerifyPublicKeyWeierstrassStart(const uint8_t *curvePointX, - const uint8_t *curvePointY, - const uint8_t *prime, - const uint8_t *a, - const uint8_t *b, - const uint8_t *order, - uint32_t length); +extern uint32_t PKAEccVerifyPublicKeyWeierstrassStart(const uint8_t* curvePointX, + const uint8_t* curvePointY, + const uint8_t* prime, + const uint8_t* a, + const uint8_t* b, + const uint8_t* order, + uint32_t length); //***************************************************************************** // @@ -1332,107 +1342,107 @@ extern uint32_t PKAEccVerifyPublicKeyWeierstrassStart(const uint8_t *curvePointX // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PKAClearPkaRam - #undef PKAClearPkaRam - #define PKAClearPkaRam ROM_PKAClearPkaRam - #endif - #ifdef ROM_PKAGetOpsStatus - #undef PKAGetOpsStatus - #define PKAGetOpsStatus ROM_PKAGetOpsStatus - #endif - #ifdef ROM_PKAArrayAllZeros - #undef PKAArrayAllZeros - #define PKAArrayAllZeros ROM_PKAArrayAllZeros - #endif - #ifdef ROM_PKAZeroOutArray - #undef PKAZeroOutArray - #define PKAZeroOutArray ROM_PKAZeroOutArray - #endif - #ifdef ROM_PKABigNumModStart - #undef PKABigNumModStart - #define PKABigNumModStart ROM_PKABigNumModStart - #endif - #ifdef ROM_PKABigNumModGetResult - #undef PKABigNumModGetResult - #define PKABigNumModGetResult ROM_PKABigNumModGetResult - #endif - #ifdef ROM_PKABigNumDivideStart - #undef PKABigNumDivideStart - #define PKABigNumDivideStart ROM_PKABigNumDivideStart - #endif - #ifdef ROM_PKABigNumDivideGetQuotient - #undef PKABigNumDivideGetQuotient - #define PKABigNumDivideGetQuotient ROM_PKABigNumDivideGetQuotient - #endif - #ifdef ROM_PKABigNumDivideGetRemainder - #undef PKABigNumDivideGetRemainder - #define PKABigNumDivideGetRemainder ROM_PKABigNumDivideGetRemainder - #endif - #ifdef ROM_PKABigNumCmpStart - #undef PKABigNumCmpStart - #define PKABigNumCmpStart ROM_PKABigNumCmpStart - #endif - #ifdef ROM_PKABigNumCmpGetResult - #undef PKABigNumCmpGetResult - #define PKABigNumCmpGetResult ROM_PKABigNumCmpGetResult - #endif - #ifdef ROM_PKABigNumInvModStart - #undef PKABigNumInvModStart - #define PKABigNumInvModStart ROM_PKABigNumInvModStart - #endif - #ifdef ROM_PKABigNumInvModGetResult - #undef PKABigNumInvModGetResult - #define PKABigNumInvModGetResult ROM_PKABigNumInvModGetResult - #endif - #ifdef ROM_PKABigNumMultiplyStart - #undef PKABigNumMultiplyStart - #define PKABigNumMultiplyStart ROM_PKABigNumMultiplyStart - #endif - #ifdef ROM_PKABigNumMultGetResult - #undef PKABigNumMultGetResult - #define PKABigNumMultGetResult ROM_PKABigNumMultGetResult - #endif - #ifdef ROM_PKABigNumAddStart - #undef PKABigNumAddStart - #define PKABigNumAddStart ROM_PKABigNumAddStart - #endif - #ifdef ROM_PKABigNumAddGetResult - #undef PKABigNumAddGetResult - #define PKABigNumAddGetResult ROM_PKABigNumAddGetResult - #endif - #ifdef ROM_PKABigNumSubStart - #undef PKABigNumSubStart - #define PKABigNumSubStart ROM_PKABigNumSubStart - #endif - #ifdef ROM_PKABigNumSubGetResult - #undef PKABigNumSubGetResult - #define PKABigNumSubGetResult ROM_PKABigNumSubGetResult - #endif - #ifdef ROM_PKAEccMultiplyStart - #undef PKAEccMultiplyStart - #define PKAEccMultiplyStart ROM_PKAEccMultiplyStart - #endif - #ifdef ROM_PKAEccMontgomeryMultiplyStart - #undef PKAEccMontgomeryMultiplyStart - #define PKAEccMontgomeryMultiplyStart ROM_PKAEccMontgomeryMultiplyStart - #endif - #ifdef ROM_PKAEccMultiplyGetResult - #undef PKAEccMultiplyGetResult - #define PKAEccMultiplyGetResult ROM_PKAEccMultiplyGetResult - #endif - #ifdef ROM_PKAEccAddStart - #undef PKAEccAddStart - #define PKAEccAddStart ROM_PKAEccAddStart - #endif - #ifdef ROM_PKAEccAddGetResult - #undef PKAEccAddGetResult - #define PKAEccAddGetResult ROM_PKAEccAddGetResult - #endif - #ifdef ROM_PKAEccVerifyPublicKeyWeierstrassStart - #undef PKAEccVerifyPublicKeyWeierstrassStart - #define PKAEccVerifyPublicKeyWeierstrassStart ROM_PKAEccVerifyPublicKeyWeierstrassStart - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PKAClearPkaRam +#undef PKAClearPkaRam +#define PKAClearPkaRam ROM_PKAClearPkaRam +#endif +#ifdef ROM_PKAGetOpsStatus +#undef PKAGetOpsStatus +#define PKAGetOpsStatus ROM_PKAGetOpsStatus +#endif +#ifdef ROM_PKAArrayAllZeros +#undef PKAArrayAllZeros +#define PKAArrayAllZeros ROM_PKAArrayAllZeros +#endif +#ifdef ROM_PKAZeroOutArray +#undef PKAZeroOutArray +#define PKAZeroOutArray ROM_PKAZeroOutArray +#endif +#ifdef ROM_PKABigNumModStart +#undef PKABigNumModStart +#define PKABigNumModStart ROM_PKABigNumModStart +#endif +#ifdef ROM_PKABigNumModGetResult +#undef PKABigNumModGetResult +#define PKABigNumModGetResult ROM_PKABigNumModGetResult +#endif +#ifdef ROM_PKABigNumDivideStart +#undef PKABigNumDivideStart +#define PKABigNumDivideStart ROM_PKABigNumDivideStart +#endif +#ifdef ROM_PKABigNumDivideGetQuotient +#undef PKABigNumDivideGetQuotient +#define PKABigNumDivideGetQuotient ROM_PKABigNumDivideGetQuotient +#endif +#ifdef ROM_PKABigNumDivideGetRemainder +#undef PKABigNumDivideGetRemainder +#define PKABigNumDivideGetRemainder ROM_PKABigNumDivideGetRemainder +#endif +#ifdef ROM_PKABigNumCmpStart +#undef PKABigNumCmpStart +#define PKABigNumCmpStart ROM_PKABigNumCmpStart +#endif +#ifdef ROM_PKABigNumCmpGetResult +#undef PKABigNumCmpGetResult +#define PKABigNumCmpGetResult ROM_PKABigNumCmpGetResult +#endif +#ifdef ROM_PKABigNumInvModStart +#undef PKABigNumInvModStart +#define PKABigNumInvModStart ROM_PKABigNumInvModStart +#endif +#ifdef ROM_PKABigNumInvModGetResult +#undef PKABigNumInvModGetResult +#define PKABigNumInvModGetResult ROM_PKABigNumInvModGetResult +#endif +#ifdef ROM_PKABigNumMultiplyStart +#undef PKABigNumMultiplyStart +#define PKABigNumMultiplyStart ROM_PKABigNumMultiplyStart +#endif +#ifdef ROM_PKABigNumMultGetResult +#undef PKABigNumMultGetResult +#define PKABigNumMultGetResult ROM_PKABigNumMultGetResult +#endif +#ifdef ROM_PKABigNumAddStart +#undef PKABigNumAddStart +#define PKABigNumAddStart ROM_PKABigNumAddStart +#endif +#ifdef ROM_PKABigNumAddGetResult +#undef PKABigNumAddGetResult +#define PKABigNumAddGetResult ROM_PKABigNumAddGetResult +#endif +#ifdef ROM_PKABigNumSubStart +#undef PKABigNumSubStart +#define PKABigNumSubStart ROM_PKABigNumSubStart +#endif +#ifdef ROM_PKABigNumSubGetResult +#undef PKABigNumSubGetResult +#define PKABigNumSubGetResult ROM_PKABigNumSubGetResult +#endif +#ifdef ROM_PKAEccMultiplyStart +#undef PKAEccMultiplyStart +#define PKAEccMultiplyStart ROM_PKAEccMultiplyStart +#endif +#ifdef ROM_PKAEccMontgomeryMultiplyStart +#undef PKAEccMontgomeryMultiplyStart +#define PKAEccMontgomeryMultiplyStart ROM_PKAEccMontgomeryMultiplyStart +#endif +#ifdef ROM_PKAEccMultiplyGetResult +#undef PKAEccMultiplyGetResult +#define PKAEccMultiplyGetResult ROM_PKAEccMultiplyGetResult +#endif +#ifdef ROM_PKAEccAddStart +#undef PKAEccAddStart +#define PKAEccAddStart ROM_PKAEccAddStart +#endif +#ifdef ROM_PKAEccAddGetResult +#undef PKAEccAddGetResult +#define PKAEccAddGetResult ROM_PKAEccAddGetResult +#endif +#ifdef ROM_PKAEccVerifyPublicKeyWeierstrassStart +#undef PKAEccVerifyPublicKeyWeierstrassStart +#define PKAEccVerifyPublicKeyWeierstrassStart ROM_PKAEccVerifyPublicKeyWeierstrassStart +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/prcm.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/prcm.h index b2c4bba3..b97d38a5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/prcm.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/prcm.h @@ -86,22 +86,22 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet - #define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet - #define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet - #define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride - #define PRCMAudioClockInternalSource NOROM_PRCMAudioClockInternalSource - #define PRCMAudioClockExternalSource NOROM_PRCMAudioClockExternalSource - #define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn - #define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff - #define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable - #define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable - #define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable - #define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable - #define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable - #define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable - #define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus - #define PRCMDeepSleep NOROM_PRCMDeepSleep +#define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet +#define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet +#define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet +#define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride +#define PRCMAudioClockInternalSource NOROM_PRCMAudioClockInternalSource +#define PRCMAudioClockExternalSource NOROM_PRCMAudioClockExternalSource +#define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn +#define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff +#define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable +#define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable +#define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable +#define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable +#define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable +#define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable +#define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus +#define PRCMDeepSleep NOROM_PRCMDeepSleep #endif //***************************************************************************** @@ -135,32 +135,32 @@ extern "C" // //***************************************************************************** #define PRCM_DOMAIN_RFCORE 0x00000001 // RF Core domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_SERIAL 0x00000002 // Serial domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_PERIPH 0x00000004 // Peripheral domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_SYSBUS 0x00000008 // Bus domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_VIMS 0x00000010 // VIMS domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_VIMS_OFF_NO_WAKEUP \ - 0x00020010 // For function PRCMPowerDomainOff() it is an option to - // select that VIMS power domain shall not power up - // during the next wake up from uLDO (VIMS_MODE=0b10). + 0x00020010 // For function PRCMPowerDomainOff() it is an option to +// select that VIMS power domain shall not power up +// during the next wake up from uLDO (VIMS_MODE=0b10). #define PRCM_DOMAIN_CPU 0x00000020 // CPU domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_TIMER 0x00000040 // GPT domain ID for clock - // control. +// control. #define PRCM_DOMAIN_CLKCTRL 0x00000080 // Clock Control domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_MCU 0x00000100 // Reset control for entire MCU - // domain. +// domain. #define PRCM_DOMAIN_POWER_OFF 0x00000002 // The domain is powered off #define PRCM_DOMAIN_POWER_ON 0x00000001 // The domain is powered on #define PRCM_DOMAIN_POWER_DOWN_READY \ - 0x00000000 // The domain is ready to be - // powered down. + 0x00000000 // The domain is ready to be +// powered down. //***************************************************************************** // @@ -230,21 +230,21 @@ extern "C" static bool PRCMPeripheralValid(uint32_t ui32Peripheral) { - return((ui32Peripheral == PRCM_PERIPH_TIMER0) || - (ui32Peripheral == PRCM_PERIPH_TIMER1) || - (ui32Peripheral == PRCM_PERIPH_TIMER2) || - (ui32Peripheral == PRCM_PERIPH_TIMER3) || - (ui32Peripheral == PRCM_PERIPH_SSI0) || - (ui32Peripheral == PRCM_PERIPH_SSI1) || - (ui32Peripheral == PRCM_PERIPH_UART0) || - (ui32Peripheral == PRCM_PERIPH_UART1) || - (ui32Peripheral == PRCM_PERIPH_I2C0) || - (ui32Peripheral == PRCM_PERIPH_CRYPTO) || - (ui32Peripheral == PRCM_PERIPH_TRNG) || - (ui32Peripheral == PRCM_PERIPH_PKA) || - (ui32Peripheral == PRCM_PERIPH_UDMA) || - (ui32Peripheral == PRCM_PERIPH_GPIO) || - (ui32Peripheral == PRCM_PERIPH_I2S)); + return ((ui32Peripheral == PRCM_PERIPH_TIMER0) || + (ui32Peripheral == PRCM_PERIPH_TIMER1) || + (ui32Peripheral == PRCM_PERIPH_TIMER2) || + (ui32Peripheral == PRCM_PERIPH_TIMER3) || + (ui32Peripheral == PRCM_PERIPH_SSI0) || + (ui32Peripheral == PRCM_PERIPH_SSI1) || + (ui32Peripheral == PRCM_PERIPH_UART0) || + (ui32Peripheral == PRCM_PERIPH_UART1) || + (ui32Peripheral == PRCM_PERIPH_I2C0) || + (ui32Peripheral == PRCM_PERIPH_CRYPTO) || + (ui32Peripheral == PRCM_PERIPH_TRNG) || + (ui32Peripheral == PRCM_PERIPH_PKA) || + (ui32Peripheral == PRCM_PERIPH_UDMA) || + (ui32Peripheral == PRCM_PERIPH_GPIO) || + (ui32Peripheral == PRCM_PERIPH_I2S)); } #endif @@ -499,7 +499,7 @@ extern void PRCMAudioClockConfigSet(uint32_t ui32ClkConfig, //***************************************************************************** #ifndef DEPRECATED extern void PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui32MstDiv, - uint32_t ui32BitDiv, uint32_t ui32WordDiv); + uint32_t ui32BitDiv, uint32_t ui32WordDiv); #endif //***************************************************************************** @@ -524,11 +524,11 @@ extern void PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui3 //! //***************************************************************************** extern void PRCMAudioClockConfigOverride - (uint8_t ui8SamplingEdge, - uint8_t ui8WCLKPhase, - uint32_t ui32MstDiv, - uint32_t ui32BitDiv, - uint32_t ui32WordDiv); +(uint8_t ui8SamplingEdge, + uint8_t ui8WCLKPhase, + uint32_t ui32MstDiv, + uint32_t ui32BitDiv, + uint32_t ui32WordDiv); //***************************************************************************** // @@ -637,11 +637,12 @@ PRCMDomainEnable(uint32_t ui32Domains) (ui32Domains & PRCM_DOMAIN_VIMS)); // Enable the clock domain(s). - if(ui32Domains & PRCM_DOMAIN_RFCORE) + if (ui32Domains & PRCM_DOMAIN_RFCORE) { HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = PRCM_RFCCLKG_CLK_EN; } - if(ui32Domains & PRCM_DOMAIN_VIMS) + + if (ui32Domains & PRCM_DOMAIN_VIMS) { HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = PRCM_VIMSCLKG_CLK_EN_M; } @@ -676,11 +677,12 @@ PRCMDomainDisable(uint32_t ui32Domains) (ui32Domains & PRCM_DOMAIN_VIMS)); // Disable the power domains. - if(ui32Domains & PRCM_DOMAIN_RFCORE) + if (ui32Domains & PRCM_DOMAIN_RFCORE) { HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = 0x0; } - if(ui32Domains & PRCM_DOMAIN_VIMS) + + if (ui32Domains & PRCM_DOMAIN_VIMS) { HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = 0x0; } @@ -1121,7 +1123,7 @@ extern void PRCMDeepSleep(void); __STATIC_INLINE void PRCMCacheRetentionEnable( void ) { - HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) |= PRCM_RAMRETEN_VIMS_M; + HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) |= PRCM_RAMRETEN_VIMS_M; } //***************************************************************************** @@ -1136,7 +1138,7 @@ PRCMCacheRetentionEnable( void ) __STATIC_INLINE void PRCMCacheRetentionDisable( void ) { - HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) &= ~PRCM_RAMRETEN_VIMS_M; + HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) &= ~PRCM_RAMRETEN_VIMS_M; } @@ -1147,71 +1149,71 @@ PRCMCacheRetentionDisable( void ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PRCMInfClockConfigureSet - #undef PRCMInfClockConfigureSet - #define PRCMInfClockConfigureSet ROM_PRCMInfClockConfigureSet - #endif - #ifdef ROM_PRCMInfClockConfigureGet - #undef PRCMInfClockConfigureGet - #define PRCMInfClockConfigureGet ROM_PRCMInfClockConfigureGet - #endif - #ifdef ROM_PRCMAudioClockConfigSet - #undef PRCMAudioClockConfigSet - #define PRCMAudioClockConfigSet ROM_PRCMAudioClockConfigSet - #endif - #ifdef ROM_PRCMAudioClockConfigSetOverride - #undef PRCMAudioClockConfigSetOverride - #define PRCMAudioClockConfigSetOverride ROM_PRCMAudioClockConfigSetOverride - #endif - #ifdef ROM_PRCMAudioClockInternalSource - #undef PRCMAudioClockInternalSource - #define PRCMAudioClockInternalSource ROM_PRCMAudioClockInternalSource - #endif - #ifdef ROM_PRCMAudioClockExternalSource - #undef PRCMAudioClockExternalSource - #define PRCMAudioClockExternalSource ROM_PRCMAudioClockExternalSource - #endif - #ifdef ROM_PRCMPowerDomainOn - #undef PRCMPowerDomainOn - #define PRCMPowerDomainOn ROM_PRCMPowerDomainOn - #endif - #ifdef ROM_PRCMPowerDomainOff - #undef PRCMPowerDomainOff - #define PRCMPowerDomainOff ROM_PRCMPowerDomainOff - #endif - #ifdef ROM_PRCMPeripheralRunEnable - #undef PRCMPeripheralRunEnable - #define PRCMPeripheralRunEnable ROM_PRCMPeripheralRunEnable - #endif - #ifdef ROM_PRCMPeripheralRunDisable - #undef PRCMPeripheralRunDisable - #define PRCMPeripheralRunDisable ROM_PRCMPeripheralRunDisable - #endif - #ifdef ROM_PRCMPeripheralSleepEnable - #undef PRCMPeripheralSleepEnable - #define PRCMPeripheralSleepEnable ROM_PRCMPeripheralSleepEnable - #endif - #ifdef ROM_PRCMPeripheralSleepDisable - #undef PRCMPeripheralSleepDisable - #define PRCMPeripheralSleepDisable ROM_PRCMPeripheralSleepDisable - #endif - #ifdef ROM_PRCMPeripheralDeepSleepEnable - #undef PRCMPeripheralDeepSleepEnable - #define PRCMPeripheralDeepSleepEnable ROM_PRCMPeripheralDeepSleepEnable - #endif - #ifdef ROM_PRCMPeripheralDeepSleepDisable - #undef PRCMPeripheralDeepSleepDisable - #define PRCMPeripheralDeepSleepDisable ROM_PRCMPeripheralDeepSleepDisable - #endif - #ifdef ROM_PRCMPowerDomainStatus - #undef PRCMPowerDomainStatus - #define PRCMPowerDomainStatus ROM_PRCMPowerDomainStatus - #endif - #ifdef ROM_PRCMDeepSleep - #undef PRCMDeepSleep - #define PRCMDeepSleep ROM_PRCMDeepSleep - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PRCMInfClockConfigureSet +#undef PRCMInfClockConfigureSet +#define PRCMInfClockConfigureSet ROM_PRCMInfClockConfigureSet +#endif +#ifdef ROM_PRCMInfClockConfigureGet +#undef PRCMInfClockConfigureGet +#define PRCMInfClockConfigureGet ROM_PRCMInfClockConfigureGet +#endif +#ifdef ROM_PRCMAudioClockConfigSet +#undef PRCMAudioClockConfigSet +#define PRCMAudioClockConfigSet ROM_PRCMAudioClockConfigSet +#endif +#ifdef ROM_PRCMAudioClockConfigSetOverride +#undef PRCMAudioClockConfigSetOverride +#define PRCMAudioClockConfigSetOverride ROM_PRCMAudioClockConfigSetOverride +#endif +#ifdef ROM_PRCMAudioClockInternalSource +#undef PRCMAudioClockInternalSource +#define PRCMAudioClockInternalSource ROM_PRCMAudioClockInternalSource +#endif +#ifdef ROM_PRCMAudioClockExternalSource +#undef PRCMAudioClockExternalSource +#define PRCMAudioClockExternalSource ROM_PRCMAudioClockExternalSource +#endif +#ifdef ROM_PRCMPowerDomainOn +#undef PRCMPowerDomainOn +#define PRCMPowerDomainOn ROM_PRCMPowerDomainOn +#endif +#ifdef ROM_PRCMPowerDomainOff +#undef PRCMPowerDomainOff +#define PRCMPowerDomainOff ROM_PRCMPowerDomainOff +#endif +#ifdef ROM_PRCMPeripheralRunEnable +#undef PRCMPeripheralRunEnable +#define PRCMPeripheralRunEnable ROM_PRCMPeripheralRunEnable +#endif +#ifdef ROM_PRCMPeripheralRunDisable +#undef PRCMPeripheralRunDisable +#define PRCMPeripheralRunDisable ROM_PRCMPeripheralRunDisable +#endif +#ifdef ROM_PRCMPeripheralSleepEnable +#undef PRCMPeripheralSleepEnable +#define PRCMPeripheralSleepEnable ROM_PRCMPeripheralSleepEnable +#endif +#ifdef ROM_PRCMPeripheralSleepDisable +#undef PRCMPeripheralSleepDisable +#define PRCMPeripheralSleepDisable ROM_PRCMPeripheralSleepDisable +#endif +#ifdef ROM_PRCMPeripheralDeepSleepEnable +#undef PRCMPeripheralDeepSleepEnable +#define PRCMPeripheralDeepSleepEnable ROM_PRCMPeripheralDeepSleepEnable +#endif +#ifdef ROM_PRCMPeripheralDeepSleepDisable +#undef PRCMPeripheralDeepSleepDisable +#define PRCMPeripheralDeepSleepDisable ROM_PRCMPeripheralDeepSleepDisable +#endif +#ifdef ROM_PRCMPowerDomainStatus +#undef PRCMPowerDomainStatus +#define PRCMPowerDomainStatus ROM_PRCMPowerDomainStatus +#endif +#ifdef ROM_PRCMDeepSleep +#undef PRCMDeepSleep +#define PRCMDeepSleep ROM_PRCMDeepSleep +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pwr_ctrl.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pwr_ctrl.h index 59b0069a..734bba70 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pwr_ctrl.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/pwr_ctrl.h @@ -89,7 +89,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet +#define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet #endif //***************************************************************************** @@ -182,7 +182,8 @@ PowerCtrlSourceGet(void) // Return the current power source ui32PowerConfig = HWREG(AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL); - if(ui32PowerConfig & AON_PMCTL_PWRCTL_DCDC_ACTIVE) + + if (ui32PowerConfig & AON_PMCTL_PWRCTL_DCDC_ACTIVE) { return (PWRCTRL_PWRSRC_DCDC); } @@ -222,8 +223,8 @@ PowerCtrlResetSourceGet(void) { // Get the reset source. return (( HWREG( AON_PMCTL_BASE + AON_PMCTL_O_RESETCTL ) & - AON_PMCTL_RESETCTL_RESET_SRC_M ) >> - AON_PMCTL_RESETCTL_RESET_SRC_S ) ; + AON_PMCTL_RESETCTL_RESET_SRC_M ) >> + AON_PMCTL_RESETCTL_RESET_SRC_S ) ; } //***************************************************************************** @@ -274,11 +275,11 @@ PowerCtrlPadSleepDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PowerCtrlSourceSet - #undef PowerCtrlSourceSet - #define PowerCtrlSourceSet ROM_PowerCtrlSourceSet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PowerCtrlSourceSet +#undef PowerCtrlSourceSet +#define PowerCtrlSourceSet ROM_PowerCtrlSourceSet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ble_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ble_cmd.h index a8da556f..f0c53ea2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ble_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ble_cmd.h @@ -40,17 +40,17 @@ #define __BLE_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -121,92 +121,101 @@ typedef struct __RFC_STRUCT rfc_ble5RxStatus_s rfc_ble5RxStatus_t; //! \addtogroup bleRadioOp //! @{ -struct __RFC_STRUCT rfc_bleRadioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - uint8_t* pParams; //!< Pointer to command specific parameter structure - uint8_t* pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_bleRadioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + uint8_t* pParams; //!< Pointer to command specific parameter structure + uint8_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} //! \addtogroup ble5RadioOp //! @{ -struct __RFC_STRUCT rfc_ble5RadioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - uint8_t* pParams; //!< Pointer to command specific parameter structure - uint8_t* pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_ble5RadioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + uint8_t* pParams; //!< Pointer to command specific parameter structure + uint8_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -214,60 +223,65 @@ struct __RFC_STRUCT rfc_ble5RadioOp_s { //! \addtogroup ble5Tx20RadioOp //! @{ //! Command structure for Bluetooth commands which includes the optional field for 20-dBm PA TX power -struct __RFC_STRUCT rfc_ble5Tx20RadioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - uint8_t* pParams; //!< Pointer to command specific parameter structure - uint8_t* pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_ble5Tx20RadioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + uint8_t* pParams; //!< Pointer to command specific parameter structure + uint8_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -276,39 +290,43 @@ struct __RFC_STRUCT rfc_ble5Tx20RadioOp_s { //! @{ #define CMD_BLE_SLAVE 0x1801 //! BLE Slave Command -struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s { - uint16_t commandNo; //!< The command ID number 0x1801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleSlavePar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s +{ + uint16_t commandNo; //!< The command ID number 0x1801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleSlavePar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -317,39 +335,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s { //! @{ #define CMD_BLE_MASTER 0x1802 //! BLE Master Command -struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s { - uint16_t commandNo; //!< The command ID number 0x1802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleMasterPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s +{ + uint16_t commandNo; //!< The command ID number 0x1802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleMasterPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -358,39 +380,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s { //! @{ #define CMD_BLE_ADV 0x1803 //! BLE Connectable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_s { - uint16_t commandNo; //!< The command ID number 0x1803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x1803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -399,39 +425,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_s { //! @{ #define CMD_BLE_ADV_DIR 0x1804 //! BLE Connectable Directed Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s { - uint16_t commandNo; //!< The command ID number 0x1804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s +{ + uint16_t commandNo; //!< The command ID number 0x1804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -440,39 +470,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s { //! @{ #define CMD_BLE_ADV_NC 0x1805 //! BLE Non-Connectable Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s { - uint16_t commandNo; //!< The command ID number 0x1805 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s +{ + uint16_t commandNo; //!< The command ID number 0x1805 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -481,39 +515,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s { //! @{ #define CMD_BLE_ADV_SCAN 0x1806 //! BLE Scannable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s { - uint16_t commandNo; //!< The command ID number 0x1806 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s +{ + uint16_t commandNo; //!< The command ID number 0x1806 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -522,39 +560,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s { //! @{ #define CMD_BLE_SCANNER 0x1807 //! BLE Scanner Command -struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s { - uint16_t commandNo; //!< The command ID number 0x1807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleScannerPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleScannerOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s +{ + uint16_t commandNo; //!< The command ID number 0x1807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleScannerPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleScannerOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -563,39 +605,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s { //! @{ #define CMD_BLE_INITIATOR 0x1808 //! BLE Initiator Command -struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s { - uint16_t commandNo; //!< The command ID number 0x1808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleInitiatorPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleInitiatorOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s +{ + uint16_t commandNo; //!< The command ID number 0x1808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleInitiatorPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleInitiatorOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -604,39 +650,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s { //! @{ #define CMD_BLE_GENERIC_RX 0x1809 //! BLE Generic Receiver Command -struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s { - uint16_t commandNo; //!< The command ID number 0x1809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleGenericRxPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleGenericRxOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x1809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleGenericRxPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleGenericRxOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -645,39 +695,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s { //! @{ #define CMD_BLE_TX_TEST 0x180A //! BLE PHY Test Transmitter Command -struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x180A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleTxTestPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleTxTestOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x180A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleTxTestPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleTxTestOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -686,13 +740,14 @@ struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s { //! @{ #define CMD_BLE_ADV_PAYLOAD 0x1001 //! BLE Update Advertising Payload Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s { - uint16_t commandNo; //!< The command ID number 0x1001 - uint8_t payloadType; //!< \brief 0: Advertising data
- //!< 1: Scan response data - uint8_t newLen; //!< Length of the new payload - uint8_t* pNewData; //!< Pointer to the buffer containing the new data - rfc_bleAdvPar_t *pParams; //!< Pointer to the parameter structure to update +struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s +{ + uint16_t commandNo; //!< The command ID number 0x1001 + uint8_t payloadType; //!< \brief 0: Advertising data
+ //!< 1: Scan response data + uint8_t newLen; //!< Length of the new payload + uint8_t* pNewData; //!< Pointer to the buffer containing the new data + rfc_bleAdvPar_t* pParams; //!< Pointer to the parameter structure to update } __RFC_STRUCT_ATTR; //! @} @@ -701,64 +756,69 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s { //! @{ #define CMD_BLE5_RADIO_SETUP 0x1820 //! Bluetooth 5 Radio Setup Command for all PHYs -struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x1820 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t mainMode:2; //!< \brief PHY to use for non-BLE commands:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:1; //!< \brief Coding to use for TX if coded PHY is selected for non-BLE commands
- //!< 0: S = 8 (125 kbps)
- //!< 1: S = 2 (500 kbps) - } defaultPhy; - uint8_t loDivider; //!< LO divider setting to use. Supported values: 0 or 2. - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Default transmit power - uint32_t* pRegOverrideCommon; //!< \brief Pointer to a list of hardware and configuration registers to override during common - //!< initialization. If NULL, no override is used. - uint32_t* pRegOverride1Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting - //!< 1 Mbps PHY mode. If NULL, no override is used. - uint32_t* pRegOverride2Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting - //!< 2 Mbps PHY mode. If NULL, no override is used. - uint32_t* pRegOverrideCoded; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting - //!< coded PHY mode. If NULL, no override is used. +struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x1820 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use for non-BLE commands:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 1; //!< \brief Coding to use for TX if coded PHY is selected for non-BLE commands
+ //!< 0: S = 8 (125 kbps)
+ //!< 1: S = 2 (500 kbps) + } defaultPhy; + uint8_t loDivider; //!< LO divider setting to use. Supported values: 0 or 2. + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Default transmit power + uint32_t* pRegOverrideCommon; //!< \brief Pointer to a list of hardware and configuration registers to override during common + //!< initialization. If NULL, no override is used. + uint32_t* pRegOverride1Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting + //!< 1 Mbps PHY mode. If NULL, no override is used. + uint32_t* pRegOverride2Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting + //!< 2 Mbps PHY mode. If NULL, no override is used. + uint32_t* pRegOverrideCoded; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting + //!< coded PHY mode. If NULL, no override is used. } __RFC_STRUCT_ATTR; //! @} @@ -767,60 +827,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s { //! @{ #define CMD_BLE5_SLAVE 0x1821 //! Bluetooth 5 Slave Command -struct __RFC_STRUCT rfc_CMD_BLE5_SLAVE_s { - uint16_t commandNo; //!< The command ID number 0x1821 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_ble5SlavePar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_SLAVE_s +{ + uint16_t commandNo; //!< The command ID number 0x1821 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_ble5SlavePar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -829,60 +894,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_SLAVE_s { //! @{ #define CMD_BLE5_MASTER 0x1822 //! Bluetooth 5 Master Command -struct __RFC_STRUCT rfc_CMD_BLE5_MASTER_s { - uint16_t commandNo; //!< The command ID number 0x1822 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_ble5MasterPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_MASTER_s +{ + uint16_t commandNo; //!< The command ID number 0x1822 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_ble5MasterPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -891,60 +961,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_MASTER_s { //! @{ #define CMD_BLE5_ADV_EXT 0x1823 //! Bluetooth 5 Extended Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE5_ADV_EXT_s { - uint16_t commandNo; //!< The command ID number 0x1823 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_ble5AdvExtPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_ADV_EXT_s +{ + uint16_t commandNo; //!< The command ID number 0x1823 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_ble5AdvExtPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -953,60 +1028,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_ADV_EXT_s { //! @{ #define CMD_BLE5_ADV_AUX 0x1824 //! Bluetooth 5 Secondary Channel Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE5_ADV_AUX_s { - uint16_t commandNo; //!< The command ID number 0x1824 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_ble5AdvAuxPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_ADV_AUX_s +{ + uint16_t commandNo; //!< The command ID number 0x1824 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_ble5AdvAuxPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1015,60 +1095,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_ADV_AUX_s { //! @{ #define CMD_BLE5_SCANNER 0x1827 //! Bluetooth 5 Scanner Command -struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_s { - uint16_t commandNo; //!< The command ID number 0x1827 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_ble5ScannerPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_ble5ScanInitOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_s +{ + uint16_t commandNo; //!< The command ID number 0x1827 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_ble5ScannerPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_ble5ScanInitOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1077,60 +1162,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_s { //! @{ #define CMD_BLE5_INITIATOR 0x1828 //! Bluetooth 5 Initiator Command -struct __RFC_STRUCT rfc_CMD_BLE5_INITIATOR_s { - uint16_t commandNo; //!< The command ID number 0x1828 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_ble5InitiatorPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_ble5ScanInitOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_INITIATOR_s +{ + uint16_t commandNo; //!< The command ID number 0x1828 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_ble5InitiatorPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_ble5ScanInitOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1139,60 +1229,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_INITIATOR_s { //! @{ #define CMD_BLE5_GENERIC_RX 0x1829 //! Bluetooth 5 Generic Receiver Command -struct __RFC_STRUCT rfc_CMD_BLE5_GENERIC_RX_s { - uint16_t commandNo; //!< The command ID number 0x1829 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_bleGenericRxPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleGenericRxOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_GENERIC_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x1829 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_bleGenericRxPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleGenericRxOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1201,60 +1296,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_GENERIC_RX_s { //! @{ #define CMD_BLE5_TX_TEST 0x182A //! Bluetooth 5 PHY Test Transmitter Command -struct __RFC_STRUCT rfc_CMD_BLE5_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x182A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_bleTxTestPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleTxTestOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x182A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_bleTxTestPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleTxTestOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1263,60 +1363,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_TX_TEST_s { //! @{ #define CMD_BLE5_ADV 0x182B //! Bluetooth 5 Connectable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE5_ADV_s { - uint16_t commandNo; //!< The command ID number 0x182B - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x182B + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1325,60 +1430,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_ADV_s { //! @{ #define CMD_BLE5_ADV_DIR 0x182C //! Bluetooth 5 Connectable Directed Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE5_ADV_DIR_s { - uint16_t commandNo; //!< The command ID number 0x182C - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_ADV_DIR_s +{ + uint16_t commandNo; //!< The command ID number 0x182C + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1387,60 +1497,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_ADV_DIR_s { //! @{ #define CMD_BLE5_ADV_NC 0x182D //! Bluetooth 5 Non-Connectable Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE5_ADV_NC_s { - uint16_t commandNo; //!< The command ID number 0x182D - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_ADV_NC_s +{ + uint16_t commandNo; //!< The command ID number 0x182D + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1449,60 +1564,65 @@ struct __RFC_STRUCT rfc_CMD_BLE5_ADV_NC_s { //! @{ #define CMD_BLE5_ADV_SCAN 0x182E //! Bluetooth 5 Scannable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE5_ADV_SCAN_s { - uint16_t commandNo; //!< The command ID number 0x182E - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel index
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - struct { - uint8_t mainMode:2; //!< \brief PHY to use:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:6; //!< \brief Coding to use for TX if coded PHY is selected. - //!< See the Technical Reference Manual for details. - } phyMode; - uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS - uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
- //!< 0x0000: Use default TX power
- //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command - //!< structure that includes tx20Power must be used) - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure - uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
- //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; - //!< overrides the one given in radio setup for the duration of the command.
- //!< If tx20Power >= 0x10000000: Pointer to PA change override structure - //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
- //!< For other values of txPower, this field is not accessed by the radio - //!< CPU and may be omitted from the structure. +struct __RFC_STRUCT rfc_CMD_BLE5_ADV_SCAN_s +{ + uint16_t commandNo; //!< The command ID number 0x182E + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel index
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 6; //!< \brief Coding to use for TX if coded PHY is selected. + //!< See the Technical Reference Manual for details. + } phyMode; + uint8_t rangeDelay; //!< Number of RAT ticks to add to the listening time after T_IFS + uint16_t txPower; //!< \brief Transmit power to use (overrides the one given in radio setup)
+ //!< 0x0000: Use default TX power
+ //!< 0xFFFF: 20-dBm PA only: Use TX power from tx20Power field (command + //!< structure that includes tx20Power must be used) + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure + uint32_t tx20Power; //!< \brief If txPower = 0xFFFF:
+ //!< If tx20Power < 0x10000000: Transmit power to use for the 20-dBm PA; + //!< overrides the one given in radio setup for the duration of the command.
+ //!< If tx20Power >= 0x10000000: Pointer to PA change override structure + //!< as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.
+ //!< For other values of txPower, this field is not accessed by the radio + //!< CPU and may be omitted from the structure. } __RFC_STRUCT_ATTR; //! @} @@ -1510,103 +1630,111 @@ struct __RFC_STRUCT rfc_CMD_BLE5_ADV_SCAN_s { //! \addtogroup CMD_BLE5_RADIO_SETUP_PA //! @{ //! Bluetooth 5 Radio Setup Command for all PHYs with PA Switching Fields -struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_PA_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t mainMode:2; //!< \brief PHY to use for non-BLE commands:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< 3: Reserved - uint8_t coding:1; //!< \brief Coding to use for TX if coded PHY is selected for non-BLE commands
- //!< 0: S = 8 (125 kbps)
- //!< 1: S = 2 (500 kbps) - } defaultPhy; - uint8_t loDivider; //!< LO divider setting to use. Supported values: 0 or 2. - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Default transmit power - uint32_t* pRegOverrideCommon; //!< \brief Pointer to a list of hardware and configuration registers to override during common - //!< initialization. If NULL, no override is used. - uint32_t* pRegOverride1Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting - //!< 1 Mbps PHY mode. If NULL, no override is used. - uint32_t* pRegOverride2Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting - //!< 2 Mbps PHY mode. If NULL, no override is used. - uint32_t* pRegOverrideCoded; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting - //!< coded PHY mode. If NULL, no override is used. - uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< standard PA. Used by RF driver only, not radio CPU. - uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< 20-dBm PA. Used by RF driver only, not radio CPU. +struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_PA_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t mainMode: 2; //!< \brief PHY to use for non-BLE commands:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< 3: Reserved + uint8_t coding: 1; //!< \brief Coding to use for TX if coded PHY is selected for non-BLE commands
+ //!< 0: S = 8 (125 kbps)
+ //!< 1: S = 2 (500 kbps) + } defaultPhy; + uint8_t loDivider; //!< LO divider setting to use. Supported values: 0 or 2. + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Default transmit power + uint32_t* pRegOverrideCommon; //!< \brief Pointer to a list of hardware and configuration registers to override during common + //!< initialization. If NULL, no override is used. + uint32_t* pRegOverride1Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting + //!< 1 Mbps PHY mode. If NULL, no override is used. + uint32_t* pRegOverride2Mbps; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting + //!< 2 Mbps PHY mode. If NULL, no override is used. + uint32_t* pRegOverrideCoded; //!< \brief Pointer to a list of hardware and configuration registers to override when selecting + //!< coded PHY mode. If NULL, no override is used. + uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< standard PA. Used by RF driver only, not radio CPU. + uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< 20-dBm PA. Used by RF driver only, not radio CPU. } __RFC_STRUCT_ATTR; //! @} //! \addtogroup bleMasterSlavePar //! @{ -struct __RFC_STRUCT rfc_bleMasterSlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; //!< Sequence number status - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte +struct __RFC_STRUCT rfc_bleMasterSlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; //!< Sequence number status + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte } __RFC_STRUCT_ATTR; //! @} @@ -1615,57 +1743,62 @@ struct __RFC_STRUCT rfc_bleMasterSlavePar_s { //! @{ //! Parameter structure for legacy slave (CMD_BLE_SLAVE) -struct __RFC_STRUCT rfc_bleSlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; //!< Sequence number status - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first - //!< receive operation - uint16_t __dummy0; - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_bleSlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; //!< Sequence number status + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first + //!< receive operation + uint16_t __dummy0; + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -1674,45 +1807,49 @@ struct __RFC_STRUCT rfc_bleSlavePar_s { //! @{ //! Parameter structure for legacy master (CMD_BLE_MASTER) -struct __RFC_STRUCT rfc_bleMasterPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; //!< Sequence number status - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_bleMasterPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; //!< Sequence number status + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -1721,65 +1858,70 @@ struct __RFC_STRUCT rfc_bleMasterPar_s { //! @{ //! Parameter structure for legacy advertiser (CMD_BLE_ADV* and CMD_BLE5_ADV*) -struct __RFC_STRUCT rfc_bleAdvPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t advFilterPolicy:2; //!< \brief Advertiser filter policy
- //!< 0: Process scan and connect requests from all devices
- //!< 1: Process connect requests from all devices and only scan requests from - //!< devices that are in the white list
- //!< 2: Process scan requests from all devices and only connect requests from - //!< devices that are in the white list
- //!< 3: Process scan and connect requests only from devices in the white list - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< Directed advertiser: The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t chSel:1; //!< \brief 0: Do not report support of Channel Selection Algorithm #2
- //!< 1: Report support of Channel Selection Algorithm #2 - uint8_t privIgnMode:1; //!< \brief 0: Filter on bPrivIgn only when white list is used - //!< 1: Filter on bPrivIgn always - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } advConfig; - uint8_t advLen; //!< Size of advertiser data - uint8_t scanRspLen; //!< Size of scan response data - uint8_t* pAdvData; //!< Pointer to buffer containing ADV*_IND data - uint8_t* pScanRspData; //!< Pointer to buffer containing SCAN_RSP data - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< advConfig.deviceAddrType is inverted. - rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address (directed - //!< advertiser). If least significant bit is 1, the address type given by - //!< advConfig.peerAddrType is inverted. - struct { - uint8_t scanRspEndType:1; //!< \brief Command status at end if SCAN_RSP was sent:
- //!< 0: End with BLE_DONE_OK and result True
- //!< 1: End with BLE_DONE_SCAN_RSP and result False - } behConfig; - uint8_t __dummy0; - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the advertiser event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< advertiser event as soon as allowed +struct __RFC_STRUCT rfc_bleAdvPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t advFilterPolicy: 2; //!< \brief Advertiser filter policy
+ //!< 0: Process scan and connect requests from all devices
+ //!< 1: Process connect requests from all devices and only scan requests from + //!< devices that are in the white list
+ //!< 2: Process scan requests from all devices and only connect requests from + //!< devices that are in the white list
+ //!< 3: Process scan and connect requests only from devices in the white list + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< Directed advertiser: The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t chSel: 1; //!< \brief 0: Do not report support of Channel Selection Algorithm #2
+ //!< 1: Report support of Channel Selection Algorithm #2 + uint8_t privIgnMode: 1; //!< \brief 0: Filter on bPrivIgn only when white list is used + //!< 1: Filter on bPrivIgn always + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } advConfig; + uint8_t advLen; //!< Size of advertiser data + uint8_t scanRspLen; //!< Size of scan response data + uint8_t* pAdvData; //!< Pointer to buffer containing ADV*_IND data + uint8_t* pScanRspData; //!< Pointer to buffer containing SCAN_RSP data + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< advConfig.deviceAddrType is inverted. + rfc_bleWhiteListEntry_t* pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address (directed + //!< advertiser). If least significant bit is 1, the address type given by + //!< advConfig.peerAddrType is inverted. + struct + { + uint8_t scanRspEndType: 1; //!< \brief Command status at end if SCAN_RSP was sent:
+ //!< 0: End with BLE_DONE_OK and result True
+ //!< 1: End with BLE_DONE_SCAN_RSP and result False + } behConfig; + uint8_t __dummy0; + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the advertiser event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< advertiser event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -1788,75 +1930,81 @@ struct __RFC_STRUCT rfc_bleAdvPar_s { //! @{ //! Parameter structure for legacy scanner (CMD_BLE_SCANNER) -struct __RFC_STRUCT rfc_bleScannerPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t scanFilterPolicy:1; //!< \brief Scanning filter policy regarding advertiser address
- //!< 0: Accept all advertisement packets
- //!< 1: Accept only advertisement packets from devices where the advertiser's address - //!< is in the white list - uint8_t bActiveScan:1; //!< \brief 0: Passive scan
- //!< 1: Active scan - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t rpaFilterPolicy:1; //!< \brief Filter policy for initA for ADV_DIRECT_IND messages
- //!< 0: Accept only initA that matches own address
- //!< 1: Also accept all resolvable private addresses - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t bAutoWlIgnore:1; //!< \brief 0: Do not set ignore bit in white list from radio CPU
- //!< 1: Automatically set ignore bit in white list - uint8_t bEndOnRpt:1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
- //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } scanConfig; - uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure - uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth spec - struct { - uint8_t logUpperLimit:4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure - uint8_t bLastSucceeded:1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit - //!< not changed - uint8_t bLastFailed:1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not - //!< changed - } backoffPar; - uint8_t scanReqLen; //!< Size of scan request data - uint8_t* pScanReqData; //!< Pointer to buffer containing SCAN_REQ data - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< scanConfig.deviceAddrType is inverted. - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list - uint16_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED +struct __RFC_STRUCT rfc_bleScannerPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t scanFilterPolicy: 1; //!< \brief Scanning filter policy regarding advertiser address
+ //!< 0: Accept all advertisement packets
+ //!< 1: Accept only advertisement packets from devices where the advertiser's address + //!< is in the white list + uint8_t bActiveScan: 1; //!< \brief 0: Passive scan
+ //!< 1: Active scan + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t rpaFilterPolicy: 1; //!< \brief Filter policy for initA for ADV_DIRECT_IND messages
+ //!< 0: Accept only initA that matches own address
+ //!< 1: Also accept all resolvable private addresses + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t bAutoWlIgnore: 1; //!< \brief 0: Do not set ignore bit in white list from radio CPU
+ //!< 1: Automatically set ignore bit in white list + uint8_t bEndOnRpt: 1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
+ //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } scanConfig; + uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure + uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth spec + struct + { + uint8_t logUpperLimit: 4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure + uint8_t bLastSucceeded: 1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit + //!< not changed + uint8_t bLastFailed: 1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not + //!< changed + } backoffPar; + uint8_t scanReqLen; //!< Size of scan request data + uint8_t* pScanReqData; //!< Pointer to buffer containing SCAN_REQ data + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< scanConfig.deviceAddrType is inverted. + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list + uint16_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED } __RFC_STRUCT_ATTR; //! @} @@ -1865,64 +2013,69 @@ struct __RFC_STRUCT rfc_bleScannerPar_s { //! @{ //! Parameter structure for legacy initiator (CMD_BLE_INITIATOR) -struct __RFC_STRUCT rfc_bleInitiatorPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t bUseWhiteList:1; //!< \brief Initiator filter policy
- //!< 0: Use specific peer address
- //!< 1: Use white list - uint8_t bDynamicWinOffset:1; //!< \brief 0: No dynamic WinOffset insertion
- //!< 1: Use dynamic WinOffset insertion - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t chSel:1; //!< \brief 0: Do not report support of Channel Selection Algorithm #2
- //!< 1: Report support of Channel Selection Algorithm #2 - } initConfig; - uint8_t __dummy0; - uint8_t connectReqLen; //!< Size of connect request data - uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_IND (CONNECT_REQ) - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< initConfig.deviceAddrType is inverted. - rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address. If least - //!< significant bit is 1, the address type given by initConfig.peerAddrType - //!< is inverted. - ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. - //!< Set to the calculated value if a connection is made and to the next possible connection - //!< time if not. - uint16_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED +struct __RFC_STRUCT rfc_bleInitiatorPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t bUseWhiteList: 1; //!< \brief Initiator filter policy
+ //!< 0: Use specific peer address
+ //!< 1: Use white list + uint8_t bDynamicWinOffset: 1; //!< \brief 0: No dynamic WinOffset insertion
+ //!< 1: Use dynamic WinOffset insertion + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t chSel: 1; //!< \brief 0: Do not report support of Channel Selection Algorithm #2
+ //!< 1: Report support of Channel Selection Algorithm #2 + } initConfig; + uint8_t __dummy0; + uint8_t connectReqLen; //!< Size of connect request data + uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_IND (CONNECT_REQ) + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< initConfig.deviceAddrType is inverted. + rfc_bleWhiteListEntry_t* pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address. If least + //!< significant bit is 1, the address type given by initConfig.peerAddrType + //!< is inverted. + ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. + //!< Set to the calculated value if a connection is made and to the next possible connection + //!< time if not. + uint16_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED } __RFC_STRUCT_ATTR; //! @} @@ -1931,35 +2084,38 @@ struct __RFC_STRUCT rfc_bleInitiatorPar_s { //! @{ //! Parameter structure for generic Rx (CMD_BLE_GENERIC_RX and CMD_BLE5_GENERIC_RX) -struct __RFC_STRUCT rfc_bleGenericRxPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue. May be NULL; if so, received packets are not stored - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - uint8_t bRepeat; //!< \brief 0: End operation after receiving a packet
- //!< 1: Restart receiver after receiving a packet - uint16_t __dummy0; - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< Rx operation +struct __RFC_STRUCT rfc_bleGenericRxPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue. May be NULL; if so, received packets are not stored + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + uint8_t bRepeat; //!< \brief 0: End operation after receiving a packet
+ //!< 1: Restart receiver after receiving a packet + uint16_t __dummy0; + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< Rx operation } __RFC_STRUCT_ATTR; //! @} @@ -1968,35 +2124,38 @@ struct __RFC_STRUCT rfc_bleGenericRxPar_s { //! @{ //! Parameter structure for Tx test (CMD_BLE_TX_TEST and CMD_BLE5_TX_TEST) -struct __RFC_STRUCT rfc_bleTxTestPar_s { - uint16_t numPackets; //!< \brief Number of packets to transmit
- //!< 0: Transmit unlimited number of packets - uint8_t payloadLength; //!< The number of payload bytes in each packet. - uint8_t packetType; //!< \brief The packet type to be used, encoded according to the Bluetooth 5.0 spec, Volume 6, Part F, - //!< Section 4.1.4 - ratmr_t period; //!< Number of radio timer cycles between the start of each packet - struct { - uint8_t bOverrideDefault:1; //!< \brief 0: Use default packet encoding
- //!< 1: Override packet contents - uint8_t bUsePrbs9:1; //!< \brief If bOverride is 1:
- //!< 0: No PRBS9 encoding of packet
- //!< 1: Use PRBS9 encoding of packet - uint8_t bUsePrbs15:1; //!< \brief If bOverride is 1:
- //!< 0: No PRBS15 encoding of packet
- //!< 1: Use PRBS15 encoding of packet - } config; - uint8_t byteVal; //!< If config.bOverride is 1, value of each byte to be sent - uint8_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Test Tx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< Test Tx operation +struct __RFC_STRUCT rfc_bleTxTestPar_s +{ + uint16_t numPackets; //!< \brief Number of packets to transmit
+ //!< 0: Transmit unlimited number of packets + uint8_t payloadLength; //!< The number of payload bytes in each packet. + uint8_t packetType; //!< \brief The packet type to be used, encoded according to the Bluetooth 5.0 spec, Volume 6, Part F, + //!< Section 4.1.4 + ratmr_t period; //!< Number of radio timer cycles between the start of each packet + struct + { + uint8_t bOverrideDefault: 1; //!< \brief 0: Use default packet encoding
+ //!< 1: Override packet contents + uint8_t bUsePrbs9: 1; //!< \brief If bOverride is 1:
+ //!< 0: No PRBS9 encoding of packet
+ //!< 1: Use PRBS9 encoding of packet + uint8_t bUsePrbs15: 1; //!< \brief If bOverride is 1:
+ //!< 0: No PRBS15 encoding of packet
+ //!< 1: Use PRBS15 encoding of packet + } config; + uint8_t byteVal; //!< If config.bOverride is 1, value of each byte to be sent + uint8_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Test Tx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< Test Tx operation } __RFC_STRUCT_ATTR; //! @} @@ -2005,58 +2164,63 @@ struct __RFC_STRUCT rfc_bleTxTestPar_s { //! @{ //! Parameter structure for Bluetooth 5 slave (CMD_BLE5_SLAVE) -struct __RFC_STRUCT rfc_ble5SlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; //!< Sequence number status - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first - //!< receive operation - uint8_t maxRxPktLen; //!< Maximum packet length currently allowed for received packets on the connection - uint8_t maxLenLowRate; //!< Maximum packet length for which using S = 8 (125 kbps) is allowed when transmitting. 0: no limit. - uint8_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_ble5SlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; //!< Sequence number status + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first + //!< receive operation + uint8_t maxRxPktLen; //!< Maximum packet length currently allowed for received packets on the connection + uint8_t maxLenLowRate; //!< Maximum packet length for which using S = 8 (125 kbps) is allowed when transmitting. 0: no limit. + uint8_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -2065,47 +2229,51 @@ struct __RFC_STRUCT rfc_ble5SlavePar_s { //! @{ //! Parameter structure for Bluetooth 5 master (CMD_BLE5_MASTER) -struct __RFC_STRUCT rfc_ble5MasterPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; //!< Sequence number status - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed - uint8_t maxRxPktLen; //!< Maximum packet length currently allowed for received packets on the connection - uint8_t maxLenLowRate; //!< Maximum packet length for which using S = 8 (125 kbps) is allowed when transmitting. 0: no limit. +struct __RFC_STRUCT rfc_ble5MasterPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; //!< Sequence number status + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed + uint8_t maxRxPktLen; //!< Maximum packet length currently allowed for received packets on the connection + uint8_t maxLenLowRate; //!< Maximum packet length for which using S = 8 (125 kbps) is allowed when transmitting. 0: no limit. } __RFC_STRUCT_ATTR; //! @} @@ -2114,20 +2282,22 @@ struct __RFC_STRUCT rfc_ble5MasterPar_s { //! @{ //! Parameter structure for extended advertiser (CMD_BLE5_ADV_EXT) -struct __RFC_STRUCT rfc_ble5AdvExtPar_s { - struct { - uint8_t :2; - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - } advConfig; - uint8_t __dummy0; - uint8_t __dummy1; - uint8_t auxPtrTargetType; //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types, - //!< but only TRIG_ABSTIME and TRIG_REL_* are allowed - ratmr_t auxPtrTargetTime; //!< Time of start of packet to which auxPtr points - uint8_t* pAdvPkt; //!< Pointer to extended advertising packet for the ADV_EXT_IND packet - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< advConfig.deviceAddrType is inverted. +struct __RFC_STRUCT rfc_ble5AdvExtPar_s +{ + struct + { + uint8_t : 2; + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + } advConfig; + uint8_t __dummy0; + uint8_t __dummy1; + uint8_t auxPtrTargetType; //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types, + //!< but only TRIG_ABSTIME and TRIG_REL_* are allowed + ratmr_t auxPtrTargetTime; //!< Time of start of packet to which auxPtr points + uint8_t* pAdvPkt; //!< Pointer to extended advertising packet for the ADV_EXT_IND packet + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< advConfig.deviceAddrType is inverted. } __RFC_STRUCT_ATTR; //! @} @@ -2136,70 +2306,75 @@ struct __RFC_STRUCT rfc_ble5AdvExtPar_s { //! @{ //! Parameter structure for secondary channel advertiser (CMD_BLE5_ADV_AUX) -struct __RFC_STRUCT rfc_ble5AdvAuxPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t advFilterPolicy:2; //!< \brief Advertiser filter policy
- //!< 0: Process scan and connect requests from all devices
- //!< 1: Process connect requests from all devices and only scan requests from - //!< devices that are in the white list
- //!< 2: Process scan requests from all devices and only connect requests from - //!< devices that are in the white list
- //!< 3: Process scan and connect requests only from devices in the white list - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t targetAddrType:1; //!< Directed secondary advertiser: The type of the target address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t bDirected:1; //!< \brief 0: Advertiser is undirected: pWhiteList points to a white list - //!< 1: Advertiser is directed: pWhiteList points to a single device address - uint8_t privIgnMode:1; //!< \brief 0: Filter on bPrivIgn only when white list is used - //!< 1: Filter on bPrivIgn always - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } advConfig; - struct { - uint8_t scanRspEndType:1; //!< \brief Command status at end if AUX_SCAN_RSP was sent:
- //!< 0: End with BLE_DONE_OK and result True
- //!< 1: End with BLE_DONE_SCAN_RSP and result False - } behConfig; - uint8_t auxPtrTargetType; //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types, - //!< but only TRIG_ABSTIME and TRIG_REL_* are allowed - ratmr_t auxPtrTargetTime; //!< Time of start of packet to which auxPtr points - uint8_t* pAdvPkt; //!< Pointer to extended advertising packet for the ADV_AUX_IND packet - uint8_t* pRspPkt; //!< \brief Pointer to extended advertising packet for the AUX_SCAN_RSP or AUX_CONNECT_RSP packet - //!< (may be NULL if not applicable) - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< advConfig.deviceAddrType is inverted. - rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address (directed - //!< advertiser). If least significant bit is 1, the address type given by - //!< advConfig.peerAddrType is inverted. +struct __RFC_STRUCT rfc_ble5AdvAuxPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t advFilterPolicy: 2; //!< \brief Advertiser filter policy
+ //!< 0: Process scan and connect requests from all devices
+ //!< 1: Process connect requests from all devices and only scan requests from + //!< devices that are in the white list
+ //!< 2: Process scan requests from all devices and only connect requests from + //!< devices that are in the white list
+ //!< 3: Process scan and connect requests only from devices in the white list + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t targetAddrType: 1; //!< Directed secondary advertiser: The type of the target address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t bDirected: 1; //!< \brief 0: Advertiser is undirected: pWhiteList points to a white list + //!< 1: Advertiser is directed: pWhiteList points to a single device address + uint8_t privIgnMode: 1; //!< \brief 0: Filter on bPrivIgn only when white list is used + //!< 1: Filter on bPrivIgn always + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } advConfig; + struct + { + uint8_t scanRspEndType: 1; //!< \brief Command status at end if AUX_SCAN_RSP was sent:
+ //!< 0: End with BLE_DONE_OK and result True
+ //!< 1: End with BLE_DONE_SCAN_RSP and result False + } behConfig; + uint8_t auxPtrTargetType; //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types, + //!< but only TRIG_ABSTIME and TRIG_REL_* are allowed + ratmr_t auxPtrTargetTime; //!< Time of start of packet to which auxPtr points + uint8_t* pAdvPkt; //!< Pointer to extended advertising packet for the ADV_AUX_IND packet + uint8_t* pRspPkt; //!< \brief Pointer to extended advertising packet for the AUX_SCAN_RSP or AUX_CONNECT_RSP packet + //!< (may be NULL if not applicable) + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< advConfig.deviceAddrType is inverted. + rfc_bleWhiteListEntry_t* pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address (directed + //!< advertiser). If least significant bit is 1, the address type given by + //!< advConfig.peerAddrType is inverted. } __RFC_STRUCT_ATTR; //! @} //! \addtogroup ble5AuxChRes //! @{ -struct __RFC_STRUCT rfc_ble5AuxChRes_s { - ratmr_t rxStartTime; //!< The time needed to start RX in order to receive the packet - uint16_t rxListenTime; //!< The time needed to listen in order to receive the packet. 0: No AUX packet - uint8_t channelNo; //!< The channel index used for secondary advertising - uint8_t phyMode; //!< \brief PHY to use on secondary channel:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< Others: Reserved +struct __RFC_STRUCT rfc_ble5AuxChRes_s +{ + ratmr_t rxStartTime; //!< The time needed to start RX in order to receive the packet + uint16_t rxListenTime; //!< The time needed to listen in order to receive the packet. 0: No AUX packet + uint8_t channelNo; //!< The channel index used for secondary advertising + uint8_t phyMode; //!< \brief PHY to use on secondary channel:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< Others: Reserved } __RFC_STRUCT_ATTR; //! @} @@ -2208,122 +2383,130 @@ struct __RFC_STRUCT rfc_ble5AuxChRes_s { //! @{ //! Parameter structure for Bluetooth 5 scanner (CMD_BLE5_SCANNER) -struct __RFC_STRUCT rfc_ble5ScannerPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t scanFilterPolicy:1; //!< \brief Scanning filter policy regarding advertiser address
- //!< 0: Accept all advertisement packets
- //!< 1: Accept only advertisement packets from devices where the advertiser's address - //!< is in the White list. - uint8_t bActiveScan:1; //!< \brief 0: Passive scan
- //!< 1: Active scan - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t rpaFilterPolicy:1; //!< \brief Filter policy for initA of ADV_DIRECT_IND messages
- //!< 0: Accept only initA that matches own address
- //!< 1: Also accept all resolvable private addresses - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t bAutoWlIgnore:1; //!< \brief 0: Do not set ignore bit in white list from radio CPU for legacy packets
- //!< 1: Automatically set ignore bit in white list for legacy packets - uint8_t bEndOnRpt:1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
- //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } scanConfig; - uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure - uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth spec - struct { - uint8_t logUpperLimit:4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure - uint8_t bLastSucceeded:1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit - //!< not changed - uint8_t bLastFailed:1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not - //!< changed - } backoffPar; - struct { - uint8_t bCheckAdi:1; //!< \brief 0: Do not perform ADI filtering
- //!< 1: Perform ADI filtering on packets where ADI is present - uint8_t bAutoAdiUpdate:1; //!< \brief 0: Do not update ADI entries in radio CPU using legacy mode (recommended)
- //!< 1: Legacy mode: Automatically update ADI entry for received packets with - //!< AdvDataInfo after first occurrence - uint8_t bApplyDuplicateFiltering:1;//!< \brief 0: Do not apply duplicate filtering based on device address for extended - //!< advertiser packets (recommended)
- //!< 1: Apply duplicate filtering based on device address for extended advertiser - //!< packets with no ADI field - uint8_t bAutoWlIgnore:1; //!< \brief 0: Do not set ignore bit in white list from radio CPU for extended advertising packets
- //!< 1: Automatically set ignore bit in white list for extended advertising packets - uint8_t bAutoAdiProcess:1; //!< \brief 0: Do not use automatic ADI processing
- //!< 1: Automatically update ADI entry for received packets so that only the same - //!< ADI is accepted for the rest of the chain and the SID/DID combination is - //!< ignored after the entire chain is received. - uint8_t bExclusiveSid:1; //!< \brief 0: Set adiStatus.state to 0 when command starts so that all - //!< valid SIDs are accepted
- //!< 1: Do not modify adiStatus.state when command starts
- } extFilterConfig; - struct { - uint8_t lastAcceptedSid:4; //!< Indication of SID of last successfully received packet that was not ignored - uint8_t state:3; //!< \brief 0: No extended packet received, or last extended packet didn't have an ADI; - //!< lastAcceptedSid field is not valid
- //!< 1: A message with ADI has been received, but no chain is under reception; - //!< ADI filtering to be performed normally
- //!< 2: A message with SID as given in lastAcceptedSid has been - //!< received, and chained messages are still pending. Messages without this - //!< SID will be ignored
- //!< 3: An AUX_SCAN_RSP message has been received after receiving messages with SID - //!< as given in lastAcceptedSid, and chained messages are - //!< pending. Messages with an ADI field will be ignored.
- //!< 4: A message with no ADI has been received, and chained messages are still - //!< pending. Messages with an ADI field will be ignored.
- //!< Others: Reserved - } adiStatus; - uint8_t __dummy0; - uint16_t __dummy1; - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< scanConfig.deviceAddrType is inverted. - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list - rfc_ble5AdiEntry_t *pAdiList; //!< Pointer to advDataInfo list - uint16_t maxWaitTimeForAuxCh; //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time - //!< to the start of the event is greater than this, the command will end with BLE_DONE_AUX. - //!< If it is smaller, the radio will automatically switch to the correct channel and PHY. - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED - ratmr_t rxStartTime; //!< The time needed to start RX in order to receive the packet - uint16_t rxListenTime; //!< The time needed to listen in order to receive the packet. 0: No AUX packet - uint8_t channelNo; //!< The channel index used for secondary advertising - uint8_t phyMode; //!< \brief PHY to use on secondary channel:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< Others: Reserved +struct __RFC_STRUCT rfc_ble5ScannerPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t scanFilterPolicy: 1; //!< \brief Scanning filter policy regarding advertiser address
+ //!< 0: Accept all advertisement packets
+ //!< 1: Accept only advertisement packets from devices where the advertiser's address + //!< is in the White list. + uint8_t bActiveScan: 1; //!< \brief 0: Passive scan
+ //!< 1: Active scan + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t rpaFilterPolicy: 1; //!< \brief Filter policy for initA of ADV_DIRECT_IND messages
+ //!< 0: Accept only initA that matches own address
+ //!< 1: Also accept all resolvable private addresses + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t bAutoWlIgnore: 1; //!< \brief 0: Do not set ignore bit in white list from radio CPU for legacy packets
+ //!< 1: Automatically set ignore bit in white list for legacy packets + uint8_t bEndOnRpt: 1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
+ //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } scanConfig; + uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure + uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth spec + struct + { + uint8_t logUpperLimit: 4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure + uint8_t bLastSucceeded: 1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit + //!< not changed + uint8_t bLastFailed: 1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not + //!< changed + } backoffPar; + struct + { + uint8_t bCheckAdi: 1; //!< \brief 0: Do not perform ADI filtering
+ //!< 1: Perform ADI filtering on packets where ADI is present + uint8_t bAutoAdiUpdate: 1; //!< \brief 0: Do not update ADI entries in radio CPU using legacy mode (recommended)
+ //!< 1: Legacy mode: Automatically update ADI entry for received packets with + //!< AdvDataInfo after first occurrence + uint8_t bApplyDuplicateFiltering: 1; //!< \brief 0: Do not apply duplicate filtering based on device address for extended + //!< advertiser packets (recommended)
+ //!< 1: Apply duplicate filtering based on device address for extended advertiser + //!< packets with no ADI field + uint8_t bAutoWlIgnore: 1; //!< \brief 0: Do not set ignore bit in white list from radio CPU for extended advertising packets
+ //!< 1: Automatically set ignore bit in white list for extended advertising packets + uint8_t bAutoAdiProcess: 1; //!< \brief 0: Do not use automatic ADI processing
+ //!< 1: Automatically update ADI entry for received packets so that only the same + //!< ADI is accepted for the rest of the chain and the SID/DID combination is + //!< ignored after the entire chain is received. + uint8_t bExclusiveSid: 1; //!< \brief 0: Set adiStatus.state to 0 when command starts so that all + //!< valid SIDs are accepted
+ //!< 1: Do not modify adiStatus.state when command starts
+ } extFilterConfig; + struct + { + uint8_t lastAcceptedSid: 4; //!< Indication of SID of last successfully received packet that was not ignored + uint8_t state: 3; //!< \brief 0: No extended packet received, or last extended packet didn't have an ADI; + //!< lastAcceptedSid field is not valid
+ //!< 1: A message with ADI has been received, but no chain is under reception; + //!< ADI filtering to be performed normally
+ //!< 2: A message with SID as given in lastAcceptedSid has been + //!< received, and chained messages are still pending. Messages without this + //!< SID will be ignored
+ //!< 3: An AUX_SCAN_RSP message has been received after receiving messages with SID + //!< as given in lastAcceptedSid, and chained messages are + //!< pending. Messages with an ADI field will be ignored.
+ //!< 4: A message with no ADI has been received, and chained messages are still + //!< pending. Messages with an ADI field will be ignored.
+ //!< Others: Reserved + } adiStatus; + uint8_t __dummy0; + uint16_t __dummy1; + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< scanConfig.deviceAddrType is inverted. + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list + rfc_ble5AdiEntry_t* pAdiList; //!< Pointer to advDataInfo list + uint16_t maxWaitTimeForAuxCh; //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time + //!< to the start of the event is greater than this, the command will end with BLE_DONE_AUX. + //!< If it is smaller, the radio will automatically switch to the correct channel and PHY. + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED + ratmr_t rxStartTime; //!< The time needed to start RX in order to receive the packet + uint16_t rxListenTime; //!< The time needed to listen in order to receive the packet. 0: No AUX packet + uint8_t channelNo; //!< The channel index used for secondary advertising + uint8_t phyMode; //!< \brief PHY to use on secondary channel:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< Others: Reserved } __RFC_STRUCT_ATTR; //! @} @@ -2332,81 +2515,87 @@ struct __RFC_STRUCT rfc_ble5ScannerPar_s { //! @{ //! Parameter structure for Bluetooth 5 initiator (CMD_BLE5_INITIATOR) -struct __RFC_STRUCT rfc_ble5InitiatorPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t bUseWhiteList:1; //!< \brief Initiator filter policy
- //!< 0: Use specific peer address
- //!< 1: Use white list - uint8_t bDynamicWinOffset:1; //!< 1: Use dynamic WinOffset insertion - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t chSel:1; //!< \brief 0: Do not report support of Channel Selection Algorithm #2 in CONNECT_IND
- //!< 1: Report support of Channel Selection Algorithm #2 in CONNECT_IND - } initConfig; - uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure - uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth spec - struct { - uint8_t logUpperLimit:4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure - uint8_t bLastSucceeded:1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit - //!< not changed - uint8_t bLastFailed:1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not - //!< changed - } backoffPar; - uint8_t connectReqLen; //!< Size of connect request data - uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_IND or AUX_CONNECT_REQ packet - uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. - //!< If least significant bit is 1, the address type given by - //!< initConfig.deviceAddrType is inverted. - rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address. If least - //!< significant bit is 1, the address type given by initConfig.peerAddrType - //!< is inverted. - ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. - //!< Set to the calculated value if a connection is made and to the next possible connection - //!< time if not. - uint16_t maxWaitTimeForAuxCh; //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time - //!< to the start of the event is greater than this, the command will end with BLE_DONE_AUX. - //!< If it is smaller, the radio will automatically switch to the correct channel and PHY. - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED - ratmr_t rxStartTime; //!< The time needed to start RX in order to receive the packet - uint16_t rxListenTime; //!< The time needed to listen in order to receive the packet. 0: No AUX packet - uint8_t channelNo; //!< The channel index used for secondary advertising - uint8_t phyMode; //!< \brief PHY to use on secondary channel:
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded
- //!< Others: Reserved +struct __RFC_STRUCT rfc_ble5InitiatorPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t bUseWhiteList: 1; //!< \brief Initiator filter policy
+ //!< 0: Use specific peer address
+ //!< 1: Use white list + uint8_t bDynamicWinOffset: 1; //!< 1: Use dynamic WinOffset insertion + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t chSel: 1; //!< \brief 0: Do not report support of Channel Selection Algorithm #2 in CONNECT_IND
+ //!< 1: Report support of Channel Selection Algorithm #2 in CONNECT_IND + } initConfig; + uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure + uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth spec + struct + { + uint8_t logUpperLimit: 4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure + uint8_t bLastSucceeded: 1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit + //!< not changed + uint8_t bLastFailed: 1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not + //!< changed + } backoffPar; + uint8_t connectReqLen; //!< Size of connect request data + uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_IND or AUX_CONNECT_REQ packet + uint16_t* pDeviceAddress; //!< \brief Pointer (with least significant bit set to 0) to device address used for this device. + //!< If least significant bit is 1, the address type given by + //!< initConfig.deviceAddrType is inverted. + rfc_bleWhiteListEntry_t* pWhiteList; //!< \brief Pointer (with least significant bit set to 0) to white list or peer address. If least + //!< significant bit is 1, the address type given by initConfig.peerAddrType + //!< is inverted. + ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. + //!< Set to the calculated value if a connection is made and to the next possible connection + //!< time if not. + uint16_t maxWaitTimeForAuxCh; //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time + //!< to the start of the event is greater than this, the command will end with BLE_DONE_AUX. + //!< If it is smaller, the radio will automatically switch to the correct channel and PHY. + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED + ratmr_t rxStartTime; //!< The time needed to start RX in order to receive the packet + uint16_t rxListenTime; //!< The time needed to listen in order to receive the packet. 0: No AUX packet + uint8_t channelNo; //!< The channel index used for secondary advertising + uint8_t phyMode; //!< \brief PHY to use on secondary channel:
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded
+ //!< Others: Reserved } __RFC_STRUCT_ATTR; //! @} @@ -2415,37 +2604,39 @@ struct __RFC_STRUCT rfc_ble5InitiatorPar_s { //! @{ //! Output structure for master and slave (CMD_BLE_MASTER/CMD_BLE_SLAVE/CMD_BLE5_MASTER/CMD_BLE5_SLAVE) -struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s { - uint8_t nTx; //!< \brief Total number of packets (including auto-empty and retransmissions) that have been - //!< transmitted - uint8_t nTxAck; //!< Total number of transmitted packets (including auto-empty) that have been ACK'ed - uint8_t nTxCtrl; //!< Number of unique LL control packets from the Tx queue that have been transmitted - uint8_t nTxCtrlAck; //!< Number of LL control packets from the Tx queue that have been finished (ACK'ed) - uint8_t nTxCtrlAckAck; //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in - //!< response - uint8_t nTxRetrans; //!< Number of retransmissions that has been done - uint8_t nTxEntryDone; //!< Number of packets from the Tx queue that have been finished (ACK'ed) - uint8_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored - uint8_t nRxCtrl; //!< Number of LL control packets that have been received with CRC OK and not ignored - uint8_t nRxCtrlAck; //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and - //!< then ACK'ed - uint8_t nRxNok; //!< Number of packets that have been received with CRC error - uint8_t nRxIgnored; //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated - //!< sequence number - uint8_t nRxEmpty; //!< Number of packets that have been received with CRC OK and no payload - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet (signed) - struct { - uint8_t bTimeStampValid:1; //!< 1 if a valid time stamp has been written to timeStamp; 0 otherwise - uint8_t bLastCrcErr:1; //!< 1 if the last received packet had CRC error; 0 otherwise - uint8_t bLastIgnored:1; //!< 1 if the last received packet with CRC OK was ignored; 0 otherwise - uint8_t bLastEmpty:1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise - uint8_t bLastCtrl:1; //!< 1 if the last received packet with CRC OK was an LL control packet; 0 otherwise - uint8_t bLastMd:1; //!< 1 if the last received packet with CRC OK had MD = 1; 0 otherwise - uint8_t bLastAck:1; //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet; - //!< 0 otherwise - } pktStatus; //!< Status of received packets - ratmr_t timeStamp; //!< Slave operation: Time stamp of first received packet +struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s +{ + uint8_t nTx; //!< \brief Total number of packets (including auto-empty and retransmissions) that have been + //!< transmitted + uint8_t nTxAck; //!< Total number of transmitted packets (including auto-empty) that have been ACK'ed + uint8_t nTxCtrl; //!< Number of unique LL control packets from the Tx queue that have been transmitted + uint8_t nTxCtrlAck; //!< Number of LL control packets from the Tx queue that have been finished (ACK'ed) + uint8_t nTxCtrlAckAck; //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in + //!< response + uint8_t nTxRetrans; //!< Number of retransmissions that has been done + uint8_t nTxEntryDone; //!< Number of packets from the Tx queue that have been finished (ACK'ed) + uint8_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored + uint8_t nRxCtrl; //!< Number of LL control packets that have been received with CRC OK and not ignored + uint8_t nRxCtrlAck; //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and + //!< then ACK'ed + uint8_t nRxNok; //!< Number of packets that have been received with CRC error + uint8_t nRxIgnored; //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated + //!< sequence number + uint8_t nRxEmpty; //!< Number of packets that have been received with CRC OK and no payload + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet (signed) + struct + { + uint8_t bTimeStampValid: 1; //!< 1 if a valid time stamp has been written to timeStamp; 0 otherwise + uint8_t bLastCrcErr: 1; //!< 1 if the last received packet had CRC error; 0 otherwise + uint8_t bLastIgnored: 1; //!< 1 if the last received packet with CRC OK was ignored; 0 otherwise + uint8_t bLastEmpty: 1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise + uint8_t bLastCtrl: 1; //!< 1 if the last received packet with CRC OK was an LL control packet; 0 otherwise + uint8_t bLastMd: 1; //!< 1 if the last received packet with CRC OK had MD = 1; 0 otherwise + uint8_t bLastAck: 1; //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet; + //!< 0 otherwise + } pktStatus; //!< Status of received packets + ratmr_t timeStamp; //!< Slave operation: Time stamp of first received packet } __RFC_STRUCT_ATTR; //! @} @@ -2454,17 +2645,18 @@ struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s { //! @{ //! Output structure for advertiser (CMD_BLE_ADV* and CMD_BLE5_ADV*) -struct __RFC_STRUCT rfc_bleAdvOutput_s { - uint16_t nTxAdvInd; //!< Number of ADV*_IND packets completely transmitted - uint8_t nTxScanRsp; //!< Number of AUX_SCAN_RSP or SCAN_RSP packets transmitted - uint8_t nRxScanReq; //!< Number of AUX_SCAN_REQ or SCAN_REQ packets received OK and not ignored - uint8_t nRxConnectReq; //!< Number of AUX_CONNECT_REQ or CONNECT_IND (CONNECT_REQ) packets received OK and not ignored - uint8_t nTxConnectRsp; //!< Number of AUX_CONNECT_RSP packets transmitted - uint16_t nRxNok; //!< Number of packets received with CRC error - uint16_t nRxIgnored; //!< Number of packets received with CRC OK, but ignored - uint8_t nRxBufFull; //!< Number of packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet (signed) - ratmr_t timeStamp; //!< Time stamp of the last received packet +struct __RFC_STRUCT rfc_bleAdvOutput_s +{ + uint16_t nTxAdvInd; //!< Number of ADV*_IND packets completely transmitted + uint8_t nTxScanRsp; //!< Number of AUX_SCAN_RSP or SCAN_RSP packets transmitted + uint8_t nRxScanReq; //!< Number of AUX_SCAN_REQ or SCAN_REQ packets received OK and not ignored + uint8_t nRxConnectReq; //!< Number of AUX_CONNECT_REQ or CONNECT_IND (CONNECT_REQ) packets received OK and not ignored + uint8_t nTxConnectRsp; //!< Number of AUX_CONNECT_RSP packets transmitted + uint16_t nRxNok; //!< Number of packets received with CRC error + uint16_t nRxIgnored; //!< Number of packets received with CRC OK, but ignored + uint8_t nRxBufFull; //!< Number of packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet (signed) + ratmr_t timeStamp; //!< Time stamp of the last received packet } __RFC_STRUCT_ATTR; //! @} @@ -2473,20 +2665,21 @@ struct __RFC_STRUCT rfc_bleAdvOutput_s { //! @{ //! Output structure for legacy scanner (CMD_BLE_SCANNER) -struct __RFC_STRUCT rfc_bleScannerOutput_s { - uint16_t nTxScanReq; //!< Number of transmitted SCAN_REQ packets - uint16_t nBackedOffScanReq; //!< Number of SCAN_REQ packets not sent due to backoff procedure - uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint16_t nRxScanRspOk; //!< Number of SCAN_RSP packets received with CRC OK and not ignored - uint16_t nRxScanRspIgnored; //!< Number of SCAN_RSP packets received with CRC OK, but ignored - uint16_t nRxScanRspNok; //!< Number of SCAN_RSP packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - uint8_t nRxScanRspBufFull; //!< Number of SCAN_RSP packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet (signed) - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last successfully received ADV*_IND packet that was not ignored +struct __RFC_STRUCT rfc_bleScannerOutput_s +{ + uint16_t nTxScanReq; //!< Number of transmitted SCAN_REQ packets + uint16_t nBackedOffScanReq; //!< Number of SCAN_REQ packets not sent due to backoff procedure + uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint16_t nRxScanRspOk; //!< Number of SCAN_RSP packets received with CRC OK and not ignored + uint16_t nRxScanRspIgnored; //!< Number of SCAN_RSP packets received with CRC OK, but ignored + uint16_t nRxScanRspNok; //!< Number of SCAN_RSP packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + uint8_t nRxScanRspBufFull; //!< Number of SCAN_RSP packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet (signed) + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last successfully received ADV*_IND packet that was not ignored } __RFC_STRUCT_ATTR; //! @} @@ -2495,14 +2688,15 @@ struct __RFC_STRUCT rfc_bleScannerOutput_s { //! @{ //! Output structure for legacy initiator (CMD_BLE_INITIATOR) -struct __RFC_STRUCT rfc_bleInitiatorOutput_s { - uint8_t nTxConnectReq; //!< Number of transmitted CONNECT_IND (CONNECT_REQ) packets - uint8_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet (signed) - ratmr_t timeStamp; //!< Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_IND (CONNECT_REQ) +struct __RFC_STRUCT rfc_bleInitiatorOutput_s +{ + uint8_t nTxConnectReq; //!< Number of transmitted CONNECT_IND (CONNECT_REQ) packets + uint8_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet (signed) + ratmr_t timeStamp; //!< Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_IND (CONNECT_REQ) } __RFC_STRUCT_ATTR; //! @} @@ -2511,20 +2705,21 @@ struct __RFC_STRUCT rfc_bleInitiatorOutput_s { //! @{ //! Output structure for BLE scanner and initiator (CMD_BLE5_SCANNER and CMD_BLE5_INITIATOR) -struct __RFC_STRUCT rfc_ble5ScanInitOutput_s { - uint16_t nTxReq; //!< Number of transmitted AUX_SCAN_REQ, SCAN_REQ, AUX_CONNECT_REQ, or CONNECT_IND packets - uint16_t nBackedOffReq; //!< Number of AUX_SCAN_REQ, SCAN_REQ, or AUX_CONNECT_REQ packets not sent due to backoff procedure - uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint16_t nRxRspOk; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC OK and not ignored - uint16_t nRxRspIgnored; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC OK, but ignored - uint16_t nRxRspNok; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - uint8_t nRxRspBufFull; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet (signed) - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last successfully received *ADV*_IND packet that was not ignored +struct __RFC_STRUCT rfc_ble5ScanInitOutput_s +{ + uint16_t nTxReq; //!< Number of transmitted AUX_SCAN_REQ, SCAN_REQ, AUX_CONNECT_REQ, or CONNECT_IND packets + uint16_t nBackedOffReq; //!< Number of AUX_SCAN_REQ, SCAN_REQ, or AUX_CONNECT_REQ packets not sent due to backoff procedure + uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint16_t nRxRspOk; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC OK and not ignored + uint16_t nRxRspIgnored; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC OK, but ignored + uint16_t nRxRspNok; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + uint8_t nRxRspBufFull; //!< Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet (signed) + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last successfully received *ADV*_IND packet that was not ignored } __RFC_STRUCT_ATTR; //! @} @@ -2533,13 +2728,14 @@ struct __RFC_STRUCT rfc_ble5ScanInitOutput_s { //! @{ //! Output structure for generic Rx (CMD_BLE_GENERIC_RX and CMD_BLE5_GENERIC_RX) -struct __RFC_STRUCT rfc_bleGenericRxOutput_s { - uint16_t nRxOk; //!< Number of packets received with CRC OK - uint16_t nRxNok; //!< Number of packets received with CRC error - uint16_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< The RSSI of the last received packet (signed) - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last received packet +struct __RFC_STRUCT rfc_bleGenericRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets received with CRC OK + uint16_t nRxNok; //!< Number of packets received with CRC error + uint16_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< The RSSI of the last received packet (signed) + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last received packet } __RFC_STRUCT_ATTR; //! @} @@ -2548,8 +2744,9 @@ struct __RFC_STRUCT rfc_bleGenericRxOutput_s { //! @{ //! Output structure for Tx test (CMD_BLE_TX_TEST and CMD_BLE5_TX_TEST) -struct __RFC_STRUCT rfc_bleTxTestOutput_s { - uint16_t nTx; //!< Number of packets transmitted +struct __RFC_STRUCT rfc_bleTxTestOutput_s +{ + uint16_t nTx; //!< Number of packets transmitted } __RFC_STRUCT_ATTR; //! @} @@ -2558,38 +2755,41 @@ struct __RFC_STRUCT rfc_bleTxTestOutput_s { //! @{ //! Common Extended Packet Entry Format -struct __RFC_STRUCT rfc_ble5ExtAdvEntry_s { - struct { - uint8_t length:6; //!< Extended header length - uint8_t advMode:2; //!< \brief Advertiser mode as defined in BLE:
- //!< 0: Non-connectable, non-scannable
- //!< 1: Connectable, non-scannable
- //!< 2: Non-connectable, scannable
- //!< 3: Reserved - } extHdrInfo; - uint8_t extHdrFlags; //!< Extended header flags as defined in BLE - struct { - uint8_t bSkipAdvA:1; //!< \brief 0: AdvA is present in extended payload if configured in - //!< extHdrFlags
- //!< 1: AdvA is inserted automatically from command structure if configured in - //!< extHdrFlags and is omitted from extended header - uint8_t bSkipTargetA:1; //!< \brief 0: TargetA is present in extended payload if configured in - //!< extHdrFlags. For response messages, the value is replaced - //!< by the received address when sending
- //!< 1: TargetA is inserted automatically from command structure or received - //!< address if configured in extHdrFlags and is omitted from - //!< extended header. Not supported with CMD_BLE5_ADV_EXT. - uint8_t deviceAddrType:1; //!< \brief If bSkipAdvA = 0: The type of the device address in extended - //!< header buffer -- public (0) or random (1) - uint8_t targetAddrType:1; //!< \brief If bSkipAdvA = 0: The type of the target address in extended - //!< header buffer -- public (0) or random (1) - } extHdrConfig; - uint8_t advDataLen; //!< Size of payload buffer - uint8_t* pExtHeader; //!< \brief Pointer to buffer containing extended header. If no fields except extended - //!< header flags, automatic advertiser address, or automatic target address are - //!< present, pointer may be NULL. - uint8_t* pAdvData; //!< \brief Pointer to buffer containing advData. If advDataLen = 0, - //!< pointer may be NULL. +struct __RFC_STRUCT rfc_ble5ExtAdvEntry_s +{ + struct + { + uint8_t length: 6; //!< Extended header length + uint8_t advMode: 2; //!< \brief Advertiser mode as defined in BLE:
+ //!< 0: Non-connectable, non-scannable
+ //!< 1: Connectable, non-scannable
+ //!< 2: Non-connectable, scannable
+ //!< 3: Reserved + } extHdrInfo; + uint8_t extHdrFlags; //!< Extended header flags as defined in BLE + struct + { + uint8_t bSkipAdvA: 1; //!< \brief 0: AdvA is present in extended payload if configured in + //!< extHdrFlags
+ //!< 1: AdvA is inserted automatically from command structure if configured in + //!< extHdrFlags and is omitted from extended header + uint8_t bSkipTargetA: 1; //!< \brief 0: TargetA is present in extended payload if configured in + //!< extHdrFlags. For response messages, the value is replaced + //!< by the received address when sending
+ //!< 1: TargetA is inserted automatically from command structure or received + //!< address if configured in extHdrFlags and is omitted from + //!< extended header. Not supported with CMD_BLE5_ADV_EXT. + uint8_t deviceAddrType: 1; //!< \brief If bSkipAdvA = 0: The type of the device address in extended + //!< header buffer -- public (0) or random (1) + uint8_t targetAddrType: 1; //!< \brief If bSkipAdvA = 0: The type of the target address in extended + //!< header buffer -- public (0) or random (1) + } extHdrConfig; + uint8_t advDataLen; //!< Size of payload buffer + uint8_t* pExtHeader; //!< \brief Pointer to buffer containing extended header. If no fields except extended + //!< header flags, automatic advertiser address, or automatic target address are + //!< present, pointer may be NULL. + uint8_t* pAdvData; //!< \brief Pointer to buffer containing advData. If advDataLen = 0, + //!< pointer may be NULL. } __RFC_STRUCT_ATTR; //! @} @@ -2598,20 +2798,22 @@ struct __RFC_STRUCT rfc_ble5ExtAdvEntry_s { //! @{ //! White list entry structure -struct __RFC_STRUCT rfc_bleWhiteListEntry_s { - uint8_t size; //!< Number of while list entries. Used in the first entry of the list only - struct { - uint8_t bEnable:1; //!< 1 if the entry is in use, 0 if the entry is not in use - uint8_t addrType:1; //!< The type address in the entry -- public (0) or random (1) - uint8_t bWlIgn:1; //!< \brief 1 if the entry is to be ignored by a scanner if the AdvDataInfo - //!< field is not present, 0 otherwise. Used to mask out entries that - //!< have already been scanned and reported. - uint8_t :1; - uint8_t bPrivIgn:1; //!< \brief 1 if the entry is to be ignored as part of a privacy algorithm, - //!< 0 otherwise - } conf; - uint16_t address; //!< Least significant 16 bits of the address contained in the entry - uint32_t addressHi; //!< Most significant 32 bits of the address contained in the entry +struct __RFC_STRUCT rfc_bleWhiteListEntry_s +{ + uint8_t size; //!< Number of while list entries. Used in the first entry of the list only + struct + { + uint8_t bEnable: 1; //!< 1 if the entry is in use, 0 if the entry is not in use + uint8_t addrType: 1; //!< The type address in the entry -- public (0) or random (1) + uint8_t bWlIgn: 1; //!< \brief 1 if the entry is to be ignored by a scanner if the AdvDataInfo + //!< field is not present, 0 otherwise. Used to mask out entries that + //!< have already been scanned and reported. + uint8_t : 1; + uint8_t bPrivIgn: 1; //!< \brief 1 if the entry is to be ignored as part of a privacy algorithm, + //!< 0 otherwise + } conf; + uint16_t address; //!< Least significant 16 bits of the address contained in the entry + uint32_t addressHi; //!< Most significant 32 bits of the address contained in the entry } __RFC_STRUCT_ATTR; //! @} @@ -2620,16 +2822,18 @@ struct __RFC_STRUCT rfc_bleWhiteListEntry_s { //! @{ //! AdvDataInfo list entry structure -struct __RFC_STRUCT rfc_ble5AdiEntry_s { - struct { - uint16_t advDataId:12; //!< \brief If bValid = 1: Last Advertising Data ID (DID) for the - //!< Advertising Set ID (SID) corresponding to the entry number in the array - uint16_t mode:2; //!< \brief 0: Entry is invalid (always receive packet with the given SID)
- //!< 1: Entry is valid (ignore packets with the given SID where DID equals - //!< advDataId)
- //!< 2: Entry is blocked (always ignore packet with the given SID)
- //!< 3: Reserved - } advDataInfo; +struct __RFC_STRUCT rfc_ble5AdiEntry_s +{ + struct + { + uint16_t advDataId: 12; //!< \brief If bValid = 1: Last Advertising Data ID (DID) for the + //!< Advertising Set ID (SID) corresponding to the entry number in the array + uint16_t mode: 2; //!< \brief 0: Entry is invalid (always receive packet with the given SID)
+ //!< 1: Entry is valid (ignore packets with the given SID where DID equals + //!< advDataId)
+ //!< 2: Entry is blocked (always ignore packet with the given SID)
+ //!< 3: Reserved + } advDataInfo; } __RFC_STRUCT_ATTR; //! @} @@ -2638,13 +2842,15 @@ struct __RFC_STRUCT rfc_ble5AdiEntry_s { //! @{ //! Receive status byte that may be appended to message in receive buffer for legacy commands -struct __RFC_STRUCT rfc_bleRxStatus_s { - struct { - uint8_t channel:6; //!< \brief The channel on which the packet was received, provided channel is in the range - //!< 0--39; otherwise 0x3F - uint8_t bIgnore:1; //!< 1 if the packet is marked as ignored, 0 otherwise - uint8_t bCrcErr:1; //!< 1 if the packet was received with CRC error, 0 otherwise - } status; +struct __RFC_STRUCT rfc_bleRxStatus_s +{ + struct + { + uint8_t channel: 6; //!< \brief The channel on which the packet was received, provided channel is in the range + //!< 0--39; otherwise 0x3F + uint8_t bIgnore: 1; //!< 1 if the packet is marked as ignored, 0 otherwise + uint8_t bCrcErr: 1; //!< 1 if the packet was received with CRC error, 0 otherwise + } status; } __RFC_STRUCT_ATTR; //! @} @@ -2653,18 +2859,20 @@ struct __RFC_STRUCT rfc_bleRxStatus_s { //! @{ //! Receive status field that may be appended to message in receive buffer for Bluetooth 5 commands -struct __RFC_STRUCT rfc_ble5RxStatus_s { - struct { - uint16_t channel:6; //!< \brief The channel on which the packet was received, provided channel is in the range - //!< 0--39; otherwise 0x3F - uint16_t bIgnore:1; //!< 1 if the packet is marked as ignored, 0 otherwise - uint16_t bCrcErr:1; //!< 1 if the packet was received with CRC error, 0 otherwise - uint16_t phyMode:2; //!< \brief The PHY on which the packet was received
- //!< 0: 1 Mbps
- //!< 1: 2 Mbps
- //!< 2: Coded, S = 8 (125 kbps)
- //!< 3: Coded, S = 2 (500 kbps) - } status; +struct __RFC_STRUCT rfc_ble5RxStatus_s +{ + struct + { + uint16_t channel: 6; //!< \brief The channel on which the packet was received, provided channel is in the range + //!< 0--39; otherwise 0x3F + uint16_t bIgnore: 1; //!< 1 if the packet is marked as ignored, 0 otherwise + uint16_t bCrcErr: 1; //!< 1 if the packet was received with CRC error, 0 otherwise + uint16_t phyMode: 2; //!< \brief The PHY on which the packet was received
+ //!< 0: 1 Mbps
+ //!< 1: 2 Mbps
+ //!< 2: Coded, S = 8 (125 kbps)
+ //!< 3: Coded, S = 2 (500 kbps) + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_common_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_common_cmd.h index 94aec4a6..ccf48677 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_common_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_common_cmd.h @@ -40,17 +40,17 @@ #define __COMMON_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -111,8 +111,9 @@ typedef struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s rfc_CMD_SET_CMD_START_IR //! \addtogroup command //! @{ -struct __RFC_STRUCT rfc_command_s { - uint16_t commandNo; //!< The command ID number +struct __RFC_STRUCT rfc_command_s +{ + uint16_t commandNo; //!< The command ID number } __RFC_STRUCT_ATTR; //! @} @@ -121,25 +122,28 @@ struct __RFC_STRUCT rfc_command_s { //! @{ //! Common definition for radio operation commands -struct __RFC_STRUCT rfc_radioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_radioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -148,25 +152,28 @@ struct __RFC_STRUCT rfc_radioOp_s { //! @{ #define CMD_NOP 0x0801 //! No Operation Command -struct __RFC_STRUCT rfc_CMD_NOP_s { - uint16_t commandNo; //!< The command ID number 0x0801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_NOP_s +{ + uint16_t commandNo; //!< The command ID number 0x0801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -175,56 +182,60 @@ struct __RFC_STRUCT rfc_CMD_NOP_s { //! @{ #define CMD_RADIO_SETUP 0x0802 //! Radio Setup Command for Pre-Defined Schemes -struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x0802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t mode; //!< \brief The main mode to use
- //!< 0x00: BLE
- //!< 0x01: IEEE 802.15.4
- //!< 0x02: 2 Mbps GFSK
- //!< 0x05: 5 Mbps coded 8-FSK
- //!< 0xFF: Keep existing mode; update overrides only
- //!< Others: Reserved - uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0, 2, 4, - //!< 5, 6, 10, 12, 15, and 30. - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. +struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x0802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t mode; //!< \brief The main mode to use
+ //!< 0x00: BLE
+ //!< 0x01: IEEE 802.15.4
+ //!< 0x02: 2 Mbps GFSK
+ //!< 0x05: 5 Mbps coded 8-FSK
+ //!< 0xFF: Keep existing mode; update overrides only
+ //!< Others: Reserved + uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0, 2, 4, + //!< 5, 6, 10, 12, 15, and 30. + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. } __RFC_STRUCT_ATTR; //! @} @@ -233,37 +244,41 @@ struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { //! @{ #define CMD_FS 0x0803 //! Frequency Synthesizer Programming Command -struct __RFC_STRUCT rfc_CMD_FS_s { - uint16_t commandNo; //!< The command ID number 0x0803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t frequency; //!< The frequency in MHz to tune to - uint16_t fractFreq; //!< Fractional part of the frequency to tune to - struct { - uint8_t bTxMode:1; //!< \brief 0: Start synth in RX mode
- //!< 1: Start synth in TX mode - uint8_t refFreq:6; //!< \brief 0: Use default reference frequency
- //!< Others: Use reference frequency 48 MHz/refFreq - } synthConf; - uint8_t __dummy0; //!< Reserved, always write 0 - uint8_t __dummy1; //!< Reserved - uint8_t __dummy2; //!< Reserved - uint16_t __dummy3; //!< Reserved +struct __RFC_STRUCT rfc_CMD_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t frequency; //!< The frequency in MHz to tune to + uint16_t fractFreq; //!< Fractional part of the frequency to tune to + struct + { + uint8_t bTxMode: 1; //!< \brief 0: Start synth in RX mode
+ //!< 1: Start synth in TX mode + uint8_t refFreq: 6; //!< \brief 0: Use default reference frequency
+ //!< Others: Use reference frequency 48 MHz/refFreq + } synthConf; + uint8_t __dummy0; //!< Reserved, always write 0 + uint8_t __dummy1; //!< Reserved + uint8_t __dummy2; //!< Reserved + uint16_t __dummy3; //!< Reserved } __RFC_STRUCT_ATTR; //! @} @@ -272,25 +287,28 @@ struct __RFC_STRUCT rfc_CMD_FS_s { //! @{ #define CMD_FS_OFF 0x0804 //! Command for Turning off Frequency Synthesizer -struct __RFC_STRUCT rfc_CMD_FS_OFF_s { - uint16_t commandNo; //!< The command ID number 0x0804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_FS_OFF_s +{ + uint16_t commandNo; //!< The command ID number 0x0804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -299,43 +317,48 @@ struct __RFC_STRUCT rfc_CMD_FS_OFF_s { //! @{ #define CMD_RX_TEST 0x0807 //! Receiver Test Command -struct __RFC_STRUCT rfc_CMD_RX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x0807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bEnaFifo:1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available
- //!< 1: Enable FIFO in modem -- the data must be read out by the application - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bNoSync:1; //!< \brief 0: Run sync search as normal for the configured mode
- //!< 1: Write correlation thresholds to the maximum value to avoid getting sync - } config; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - uint32_t syncWord; //!< Sync word to use for receiver - ratmr_t endTime; //!< Time to end the operation +struct __RFC_STRUCT rfc_CMD_RX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x0807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bEnaFifo: 1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available
+ //!< 1: Enable FIFO in modem -- the data must be read out by the application + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bNoSync: 1; //!< \brief 0: Run sync search as normal for the configured mode
+ //!< 1: Write correlation thresholds to the maximum value to avoid getting sync + } config; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + uint32_t syncWord; //!< Sync word to use for receiver + ratmr_t endTime; //!< Time to end the operation } __RFC_STRUCT_ATTR; //! @} @@ -344,48 +367,53 @@ struct __RFC_STRUCT rfc_CMD_RX_TEST_s { //! @{ #define CMD_TX_TEST 0x0808 //! Transmitter Test Command -struct __RFC_STRUCT rfc_CMD_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x0808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bUseCw:1; //!< \brief 0: Send modulated signal
- //!< 1: Send continuous wave - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t whitenMode:2; //!< \brief 0: No whitening
- //!< 1: Default whitening
- //!< 2: PRBS-15
- //!< 3: PRBS-32 - } config; - uint8_t __dummy0; - uint16_t txWord; //!< Value to send to the modem before whitening - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - uint32_t syncWord; //!< Sync word to use for transmitter - ratmr_t endTime; //!< Time to end the operation +struct __RFC_STRUCT rfc_CMD_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x0808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bUseCw: 1; //!< \brief 0: Send modulated signal
+ //!< 1: Send continuous wave + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t whitenMode: 2; //!< \brief 0: No whitening
+ //!< 1: Default whitening
+ //!< 2: PRBS-15
+ //!< 3: PRBS-32 + } config; + uint8_t __dummy0; + uint16_t txWord; //!< Value to send to the modem before whitening + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + uint32_t syncWord; //!< Sync word to use for transmitter + ratmr_t endTime; //!< Time to end the operation } __RFC_STRUCT_ATTR; //! @} @@ -394,28 +422,31 @@ struct __RFC_STRUCT rfc_CMD_TX_TEST_s { //! @{ #define CMD_SYNC_STOP_RAT 0x0809 //! Synchronize and Stop Radio Timer Command -struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero +struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero } __RFC_STRUCT_ATTR; //! @} @@ -424,28 +455,31 @@ struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { //! @{ #define CMD_SYNC_START_RAT 0x080A //! Synchrously Start Radio Timer Command -struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { - uint16_t commandNo; //!< The command ID number 0x080A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT +struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x080A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT } __RFC_STRUCT_ATTR; //! @} @@ -454,28 +488,31 @@ struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { //! @{ #define CMD_RESYNC_RAT 0x0816 //! Re-calculate rat0 value while RAT is running -struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0816 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero +struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0816 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero } __RFC_STRUCT_ATTR; //! @} @@ -484,27 +521,30 @@ struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s { //! @{ #define CMD_COUNT 0x080B //! Counter Command -struct __RFC_STRUCT rfc_CMD_COUNT_s { - uint16_t commandNo; //!< The command ID number 0x080B - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation - //!< differs if the result is zero +struct __RFC_STRUCT rfc_CMD_COUNT_s +{ + uint16_t commandNo; //!< The command ID number 0x080B + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation + //!< differs if the result is zero } __RFC_STRUCT_ATTR; //! @} @@ -513,27 +553,30 @@ struct __RFC_STRUCT rfc_CMD_COUNT_s { //! @{ #define CMD_FS_POWERUP 0x080C //! Power up Frequency Syntheszier Command -struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { - uint16_t commandNo; //!< The command ID number 0x080C - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. +struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s +{ + uint16_t commandNo; //!< The command ID number 0x080C + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. } __RFC_STRUCT_ATTR; //! @} @@ -542,25 +585,28 @@ struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { //! @{ #define CMD_FS_POWERDOWN 0x080D //! Power down Frequency Syntheszier Command -struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { - uint16_t commandNo; //!< The command ID number 0x080D - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s +{ + uint16_t commandNo; //!< The command ID number 0x080D + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -569,28 +615,31 @@ struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { //! @{ #define CMD_SCH_IMM 0x0810 //! Run Immidiate Command as Radio Operation Command -struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { - uint16_t commandNo; //!< The command ID number 0x0810 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - uint32_t cmdrVal; //!< Value as would be written to CMDR - uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA +struct __RFC_STRUCT rfc_CMD_SCH_IMM_s +{ + uint16_t commandNo; //!< The command ID number 0x0810 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + uint32_t cmdrVal; //!< Value as would be written to CMDR + uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA } __RFC_STRUCT_ATTR; //! @} @@ -599,28 +648,31 @@ struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { //! @{ #define CMD_COUNT_BRANCH 0x0812 //! Counter Command with Branch of Command Chain -struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { - uint16_t commandNo; //!< The command ID number 0x0812 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation - //!< differs if the result is zero - rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if counter did not expire +struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s +{ + uint16_t commandNo; //!< The command ID number 0x0812 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation + //!< differs if the result is zero + rfc_radioOp_t* pNextOpIfOk; //!< Pointer to next operation if counter did not expire } __RFC_STRUCT_ATTR; //! @} @@ -629,45 +681,49 @@ struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { //! @{ #define CMD_PATTERN_CHECK 0x0813 //! Command for Checking a Value in Memory aginst a Pattern -struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { - uint16_t commandNo; //!< The command ID number 0x0813 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t operation:2; //!< \brief Operation to perform
- //!< 0: True if value == compareVal
- //!< 1: True if value < compareVal
- //!< 2: True if value > compareVal
- //!< 3: Reserved - uint16_t bByteRev:1; //!< \brief If 1, interchange the four bytes of the value, so that they are read - //!< most-significant-byte-first. - uint16_t bBitRev:1; //!< If 1, perform bit reversal of the value - uint16_t signExtend:5; //!< \brief 0: Treat value and compareVal as unsigned
- //!< 1--31: Treat value and compareVal as signed, where the value - //!< gives the number of the most significant bit in the signed number. - uint16_t bRxVal:1; //!< \brief 0: Use pValue as a pointer
- //!< 1: Use pValue as a signed offset to the start of the last - //!< committed RX entry element - } patternOpt; //!< Options for comparison - rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if comparison result was true - uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if patternOpt.bRxVal == 1 - uint32_t mask; //!< Bit mask to apply before comparison - uint32_t compareVal; //!< Value to compare to +struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s +{ + uint16_t commandNo; //!< The command ID number 0x0813 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t operation: 2; //!< \brief Operation to perform
+ //!< 0: True if value == compareVal
+ //!< 1: True if value < compareVal
+ //!< 2: True if value > compareVal
+ //!< 3: Reserved + uint16_t bByteRev: 1; //!< \brief If 1, interchange the four bytes of the value, so that they are read + //!< most-significant-byte-first. + uint16_t bBitRev: 1; //!< If 1, perform bit reversal of the value + uint16_t signExtend: 5; //!< \brief 0: Treat value and compareVal as unsigned
+ //!< 1--31: Treat value and compareVal as signed, where the value + //!< gives the number of the most significant bit in the signed number. + uint16_t bRxVal: 1; //!< \brief 0: Use pValue as a pointer
+ //!< 1: Use pValue as a signed offset to the start of the last + //!< committed RX entry element + } patternOpt; //!< Options for comparison + rfc_radioOp_t* pNextOpIfOk; //!< Pointer to next operation if comparison result was true + uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if patternOpt.bRxVal == 1 + uint32_t mask; //!< Bit mask to apply before comparison + uint32_t compareVal; //!< Value to compare to } __RFC_STRUCT_ATTR; //! @} @@ -675,60 +731,64 @@ struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { //! \addtogroup CMD_RADIO_SETUP_PA //! @{ //! Radio Setup Command for Pre-Defined Schemes with PA Switching Fields -struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t mode; //!< \brief The main mode to use
- //!< 0x00: BLE
- //!< 0x01: IEEE 802.15.4
- //!< 0x02: 2 Mbps GFSK
- //!< 0x05: 5 Mbps coded 8-FSK
- //!< 0xFF: Keep existing mode; update overrides only
- //!< Others: Reserved - uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0, 2, 4, - //!< 5, 6, 10, 12, 15, and 30. - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. - uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< standard PA. Used by RF driver only, not radio CPU. - uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< 20-dBm PA. Used by RF driver only, not radio CPU. +struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t mode; //!< \brief The main mode to use
+ //!< 0x00: BLE
+ //!< 0x01: IEEE 802.15.4
+ //!< 0x02: 2 Mbps GFSK
+ //!< 0x05: 5 Mbps coded 8-FSK
+ //!< 0xFF: Keep existing mode; update overrides only
+ //!< Others: Reserved + uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0, 2, 4, + //!< 5, 6, 10, 12, 15, and 30. + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. + uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< standard PA. Used by RF driver only, not radio CPU. + uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< 20-dBm PA. Used by RF driver only, not radio CPU. } __RFC_STRUCT_ATTR; //! @} @@ -737,8 +797,9 @@ struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s { //! @{ #define CMD_ABORT 0x0401 //! Abort Running Radio Operation Command -struct __RFC_STRUCT rfc_CMD_ABORT_s { - uint16_t commandNo; //!< The command ID number 0x0401 +struct __RFC_STRUCT rfc_CMD_ABORT_s +{ + uint16_t commandNo; //!< The command ID number 0x0401 } __RFC_STRUCT_ATTR; //! @} @@ -747,8 +808,9 @@ struct __RFC_STRUCT rfc_CMD_ABORT_s { //! @{ #define CMD_STOP 0x0402 //! Stop Running Radio Operation Command Gracefully -struct __RFC_STRUCT rfc_CMD_STOP_s { - uint16_t commandNo; //!< The command ID number 0x0402 +struct __RFC_STRUCT rfc_CMD_STOP_s +{ + uint16_t commandNo; //!< The command ID number 0x0402 } __RFC_STRUCT_ATTR; //! @} @@ -757,8 +819,9 @@ struct __RFC_STRUCT rfc_CMD_STOP_s { //! @{ #define CMD_GET_RSSI 0x0403 //! Read RSSI Command -struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { - uint16_t commandNo; //!< The command ID number 0x0403 +struct __RFC_STRUCT rfc_CMD_GET_RSSI_s +{ + uint16_t commandNo; //!< The command ID number 0x0403 } __RFC_STRUCT_ATTR; //! @} @@ -767,10 +830,11 @@ struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { //! @{ #define CMD_UPDATE_RADIO_SETUP 0x0001 //! Update Radio Settings Command -struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x0001 - uint16_t __dummy0; - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override +struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x0001 + uint16_t __dummy0; + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override } __RFC_STRUCT_ATTR; //! @} @@ -779,9 +843,10 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { //! @{ #define CMD_TRIGGER 0x0404 //! Generate Command Trigger -struct __RFC_STRUCT rfc_CMD_TRIGGER_s { - uint16_t commandNo; //!< The command ID number 0x0404 - uint8_t triggerNo; //!< Command trigger number +struct __RFC_STRUCT rfc_CMD_TRIGGER_s +{ + uint16_t commandNo; //!< The command ID number 0x0404 + uint8_t triggerNo; //!< Command trigger number } __RFC_STRUCT_ATTR; //! @} @@ -790,12 +855,13 @@ struct __RFC_STRUCT rfc_CMD_TRIGGER_s { //! @{ #define CMD_GET_FW_INFO 0x0002 //! Request Information on the RF Core ROM Firmware -struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { - uint16_t commandNo; //!< The command ID number 0x0002 - uint16_t versionNo; //!< Firmware version number - uint16_t startOffset; //!< The start of free RAM - uint16_t freeRamSz; //!< The size of free RAM - uint16_t availRatCh; //!< Bitmap of available RAT channels +struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s +{ + uint16_t commandNo; //!< The command ID number 0x0002 + uint16_t versionNo; //!< Firmware version number + uint16_t startOffset; //!< The start of free RAM + uint16_t freeRamSz; //!< The size of free RAM + uint16_t availRatCh; //!< Bitmap of available RAT channels } __RFC_STRUCT_ATTR; //! @} @@ -804,8 +870,9 @@ struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { //! @{ #define CMD_START_RAT 0x0405 //! Asynchronously Start Radio Timer Command -struct __RFC_STRUCT rfc_CMD_START_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0405 +struct __RFC_STRUCT rfc_CMD_START_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0405 } __RFC_STRUCT_ATTR; //! @} @@ -814,8 +881,9 @@ struct __RFC_STRUCT rfc_CMD_START_RAT_s { //! @{ #define CMD_PING 0x0406 //! Respond with Command ACK Only -struct __RFC_STRUCT rfc_CMD_PING_s { - uint16_t commandNo; //!< The command ID number 0x0406 +struct __RFC_STRUCT rfc_CMD_PING_s +{ + uint16_t commandNo; //!< The command ID number 0x0406 } __RFC_STRUCT_ATTR; //! @} @@ -824,10 +892,11 @@ struct __RFC_STRUCT rfc_CMD_PING_s { //! @{ #define CMD_READ_RFREG 0x0601 //! Read RF Core Hardware Register -struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { - uint16_t commandNo; //!< The command ID number 0x0601 - uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) - uint32_t value; //!< Returned value of the register +struct __RFC_STRUCT rfc_CMD_READ_RFREG_s +{ + uint16_t commandNo; //!< The command ID number 0x0601 + uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) + uint32_t value; //!< Returned value of the register } __RFC_STRUCT_ATTR; //! @} @@ -836,11 +905,12 @@ struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { //! @{ #define CMD_ADD_DATA_ENTRY 0x0005 //! Add Data Entry to Queue -struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { - uint16_t commandNo; //!< The command ID number 0x0005 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added - uint8_t* pEntry; //!< Pointer to the entry +struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s +{ + uint16_t commandNo; //!< The command ID number 0x0005 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added + uint8_t* pEntry; //!< Pointer to the entry } __RFC_STRUCT_ATTR; //! @} @@ -849,11 +919,12 @@ struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { //! @{ #define CMD_REMOVE_DATA_ENTRY 0x0006 //! Remove First Data Entry from Queue -struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { - uint16_t commandNo; //!< The command ID number 0x0006 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed - uint8_t* pEntry; //!< Pointer to the entry that was removed +struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s +{ + uint16_t commandNo; //!< The command ID number 0x0006 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed + uint8_t* pEntry; //!< Pointer to the entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -862,11 +933,12 @@ struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { //! @{ #define CMD_FLUSH_QUEUE 0x0007 //! Flush Data Queue -struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { - uint16_t commandNo; //!< The command ID number 0x0007 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed - uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed +struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s +{ + uint16_t commandNo; //!< The command ID number 0x0007 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed + uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -875,10 +947,11 @@ struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { //! @{ #define CMD_CLEAR_RX 0x0008 //! Clear all RX Queue Entries -struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { - uint16_t commandNo; //!< The command ID number 0x0008 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared +struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x0008 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared } __RFC_STRUCT_ATTR; //! @} @@ -887,11 +960,12 @@ struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { //! @{ #define CMD_REMOVE_PENDING_ENTRIES 0x0009 //! Remove Pending Entries from Queue -struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { - uint16_t commandNo; //!< The command ID number 0x0009 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed - uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed +struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s +{ + uint16_t commandNo; //!< The command ID number 0x0009 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed + uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -900,11 +974,12 @@ struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { //! @{ #define CMD_SET_RAT_CMP 0x000A //! Set Radio Timer Channel in Compare Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { - uint16_t commandNo; //!< The command ID number 0x000A - uint8_t ratCh; //!< The radio timer channel number - uint8_t __dummy0; - ratmr_t compareTime; //!< The time at which the compare occurs +struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s +{ + uint16_t commandNo; //!< The command ID number 0x000A + uint8_t ratCh; //!< The radio timer channel number + uint8_t __dummy0; + ratmr_t compareTime; //!< The time at which the compare occurs } __RFC_STRUCT_ATTR; //! @} @@ -913,20 +988,22 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { //! @{ #define CMD_SET_RAT_CPT 0x0603 //! Set Radio Timer Channel in Capture Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { - uint16_t commandNo; //!< The command ID number 0x0603 - struct { - uint16_t :3; - uint16_t inputSrc:5; //!< Input source indicator - uint16_t ratCh:4; //!< The radio timer channel number - uint16_t bRepeated:1; //!< \brief 0: Single capture mode
- //!< 1: Repeated capture mode - uint16_t inputMode:2; //!< \brief Input mode:
- //!< 0: Capture on rising edge
- //!< 1: Capture on falling edge
- //!< 2: Capture on both edges
- //!< 3: Reserved - } config; +struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s +{ + uint16_t commandNo; //!< The command ID number 0x0603 + struct + { + uint16_t : 3; + uint16_t inputSrc: 5; //!< Input source indicator + uint16_t ratCh: 4; //!< The radio timer channel number + uint16_t bRepeated: 1; //!< \brief 0: Single capture mode
+ //!< 1: Repeated capture mode + uint16_t inputMode: 2; //!< \brief Input mode:
+ //!< 0: Capture on rising edge
+ //!< 1: Capture on falling edge
+ //!< 2: Capture on both edges
+ //!< 3: Reserved + } config; } __RFC_STRUCT_ATTR; //! @} @@ -935,9 +1012,10 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { //! @{ #define CMD_DISABLE_RAT_CH 0x0408 //! Disable Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x0408 - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x0408 + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -946,20 +1024,22 @@ struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { //! @{ #define CMD_SET_RAT_OUTPUT 0x0604 //! Set Radio Timer Output to a Specified Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { - uint16_t commandNo; //!< The command ID number 0x0604 - struct { - uint16_t :2; - uint16_t outputSel:3; //!< Output event indicator - uint16_t outputMode:3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).
- //!< 1: Set output line high on event
- //!< 2: Set output line low on event
- //!< 3: Toggle (invert) output line state on event
- //!< 4: Immediately set output line to low (does not change upon event)
- //!< 5: Immediately set output line to high (does not change upon event)
- //!< Others: Reserved - uint16_t ratCh:4; //!< The radio timer channel number - } config; +struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s +{ + uint16_t commandNo; //!< The command ID number 0x0604 + struct + { + uint16_t : 2; + uint16_t outputSel: 3; //!< Output event indicator + uint16_t outputMode: 3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).
+ //!< 1: Set output line high on event
+ //!< 2: Set output line low on event
+ //!< 3: Toggle (invert) output line state on event
+ //!< 4: Immediately set output line to low (does not change upon event)
+ //!< 5: Immediately set output line to high (does not change upon event)
+ //!< Others: Reserved + uint16_t ratCh: 4; //!< The radio timer channel number + } config; } __RFC_STRUCT_ATTR; //! @} @@ -968,9 +1048,10 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { //! @{ #define CMD_ARM_RAT_CH 0x0409 //! Arm Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x0409 - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x0409 + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -979,9 +1060,10 @@ struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { //! @{ #define CMD_DISARM_RAT_CH 0x040A //! Disarm Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x040A - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x040A + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -990,9 +1072,10 @@ struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { //! @{ #define CMD_SET_TX_POWER 0x0010 //! Set Transmit Power -struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { - uint16_t commandNo; //!< The command ID number 0x0010 - uint16_t txPower; //!< New TX power setting +struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s +{ + uint16_t commandNo; //!< The command ID number 0x0010 + uint16_t txPower; //!< New TX power setting } __RFC_STRUCT_ATTR; //! @} @@ -1001,10 +1084,11 @@ struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { //! @{ #define CMD_SET_TX20_POWER 0x0014 //! Set Transmit Power for 20-dBm PA -struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s { - uint16_t commandNo; //!< The command ID number 0x0014 - uint16_t __dummy0; - uint32_t tx20Power; //!< New TX power setting +struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s +{ + uint16_t commandNo; //!< The command ID number 0x0014 + uint16_t __dummy0; + uint32_t tx20Power; //!< New TX power setting } __RFC_STRUCT_ATTR; //! @} @@ -1013,11 +1097,12 @@ struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s { //! @{ #define CMD_CHANGE_PA 0x0015 //! Set TX power with possibility to switch between PAs -struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s { - uint16_t commandNo; //!< The command ID number 0x0015 - uint16_t __dummy0; - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override as part of the - //!< change, including new TX power +struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s +{ + uint16_t commandNo; //!< The command ID number 0x0015 + uint16_t __dummy0; + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override as part of the + //!< change, including new TX power } __RFC_STRUCT_ATTR; //! @} @@ -1026,9 +1111,10 @@ struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s { //! @{ #define CMD_UPDATE_HPOSC_FREQ 0x0608 //! Set New Frequency Offset for HPOSC -struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s { - uint16_t commandNo; //!< The command ID number 0x0608 - int16_t freqOffset; //!< Relative frequency offset, signed, scaled by 2-22 +struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s +{ + uint16_t commandNo; //!< The command ID number 0x0608 + int16_t freqOffset; //!< Relative frequency offset, signed, scaled by 2-22 } __RFC_STRUCT_ATTR; //! @} @@ -1037,14 +1123,15 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s { //! @{ #define CMD_UPDATE_FS 0x0011 //! Set New Synthesizer Frequency without Recalibration (Deprecated; use CMD_MODIFY_FS) -struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { - uint16_t commandNo; //!< The command ID number 0x0011 - uint16_t __dummy0; - uint32_t __dummy1; - uint32_t __dummy2; - uint16_t __dummy3; - uint16_t frequency; //!< The frequency in MHz to tune to - uint16_t fractFreq; //!< Fractional part of the frequency to tune to +struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0011 + uint16_t __dummy0; + uint32_t __dummy1; + uint32_t __dummy2; + uint16_t __dummy3; + uint16_t frequency; //!< The frequency in MHz to tune to + uint16_t fractFreq; //!< Fractional part of the frequency to tune to } __RFC_STRUCT_ATTR; //! @} @@ -1053,10 +1140,11 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { //! @{ #define CMD_MODIFY_FS 0x0013 //! Set New Synthesizer Frequency without Recalibration -struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s { - uint16_t commandNo; //!< The command ID number 0x0013 - uint16_t frequency; //!< The frequency in MHz to tune to - uint16_t fractFreq; //!< Fractional part of the frequency to tune to +struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0013 + uint16_t frequency; //!< The frequency in MHz to tune to + uint16_t fractFreq; //!< Fractional part of the frequency to tune to } __RFC_STRUCT_ATTR; //! @} @@ -1065,10 +1153,11 @@ struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s { //! @{ #define CMD_BUS_REQUEST 0x040E //! Request System Bus to be Availbale -struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s { - uint16_t commandNo; //!< The command ID number 0x040E - uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep
- //!< 1: System bus access needed +struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s +{ + uint16_t commandNo; //!< The command ID number 0x040E + uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep
+ //!< 1: System bus access needed } __RFC_STRUCT_ATTR; //! @} @@ -1077,9 +1166,10 @@ struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s { //! @{ #define CMD_SET_CMD_START_IRQ 0x0411 //! Enable or disable generation of IRQ when a radio operation command starts -struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s { - uint16_t commandNo; //!< The command ID number 0x0411 - uint8_t bEna; //!< 1 to enable interrupt generation; 0 to disable it +struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s +{ + uint16_t commandNo; //!< The command ID number 0x0411 + uint8_t bEna; //!< 1 to enable interrupt generation; 0 to disable it } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_data_entry.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_data_entry.h index ad798d59..f555437f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_data_entry.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_data_entry.h @@ -40,17 +40,17 @@ #define __DATA_ENTRY_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -70,25 +70,27 @@ typedef struct __RFC_STRUCT rfc_dataEntryPartial_s rfc_dataEntryPartial_t; //! \addtogroup dataEntry //! @{ -struct __RFC_STRUCT rfc_dataEntry_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field +struct __RFC_STRUCT rfc_dataEntry_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field } __RFC_STRUCT_ATTR; //! @} @@ -97,26 +99,28 @@ struct __RFC_STRUCT rfc_dataEntry_s { //! @{ //! General data entry structure (type = 0) -struct __RFC_STRUCT rfc_dataEntryGeneral_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint8_t data; //!< First byte of the data array to be received or transmitted +struct __RFC_STRUCT rfc_dataEntryGeneral_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint8_t data; //!< First byte of the data array to be received or transmitted } __RFC_STRUCT_ATTR; //! @} @@ -125,28 +129,30 @@ struct __RFC_STRUCT rfc_dataEntryGeneral_s { //! @{ //! Multi-element data entry structure (type = 1) -struct __RFC_STRUCT rfc_dataEntryMulti_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint16_t numElements; //!< Number of entry elements committed in the entry - uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU - uint8_t rxData; //!< First byte of the data array of received data entry elements +struct __RFC_STRUCT rfc_dataEntryMulti_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint16_t numElements; //!< Number of entry elements committed in the entry + uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU + uint8_t rxData; //!< First byte of the data array of received data entry elements } __RFC_STRUCT_ATTR; //! @} @@ -155,26 +161,28 @@ struct __RFC_STRUCT rfc_dataEntryMulti_s { //! @{ //! Pointer data entry structure (type = 2) -struct __RFC_STRUCT rfc_dataEntryPointer_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted +struct __RFC_STRUCT rfc_dataEntryPointer_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted } __RFC_STRUCT_ATTR; //! @} @@ -183,33 +191,36 @@ struct __RFC_STRUCT rfc_dataEntryPointer_s { //! @{ //! Partial read data entry structure (type = 3) -struct __RFC_STRUCT rfc_dataEntryPartial_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - struct { - uint16_t numElements:13; //!< Number of entry elements committed in the entry - uint16_t bEntryOpen:1; //!< 1 if the entry contains an element that is still open for appending data - uint16_t bFirstCont:1; //!< 1 if the first element is a continuation of the last packet from the previous entry - uint16_t bLastCont:1; //!< 1 if the packet in the last element continues in the next entry - } pktStatus; - uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU - uint8_t rxData; //!< First byte of the data array of received data entry elements +struct __RFC_STRUCT rfc_dataEntryPartial_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + struct + { + uint16_t numElements: 13; //!< Number of entry elements committed in the entry + uint16_t bEntryOpen: 1; //!< 1 if the entry contains an element that is still open for appending data + uint16_t bFirstCont: 1; //!< 1 if the first element is a continuation of the last packet from the previous entry + uint16_t bLastCont: 1; //!< 1 if the packet in the last element continues in the next entry + } pktStatus; + uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU + uint8_t rxData; //!< First byte of the data array of received data entry elements } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_hs_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_hs_cmd.h index f1f4c6c8..066e0af7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_hs_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_hs_cmd.h @@ -40,17 +40,17 @@ #define __HS_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -72,37 +72,41 @@ typedef struct __RFC_STRUCT rfc_hsRxStatus_s rfc_hsRxStatus_t; //! @{ #define CMD_HS_TX 0x3841 //! High-Speed Transmit Command -struct __RFC_STRUCT rfc_CMD_HS_TX_s { - uint16_t commandNo; //!< The command ID number 0x3841 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Transmit length as first half-word - uint8_t bCheckQAtEnd:1; //!< \brief 0: Always end with HS_DONE_OK when packet has been transmitted
- //!< 1: Check if Tx queue is empty when packet has been transmitted - } pktConf; - uint8_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to Tx queue +struct __RFC_STRUCT rfc_CMD_HS_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x3841 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Transmit length as first half-word + uint8_t bCheckQAtEnd: 1; //!< \brief 0: Always end with HS_DONE_OK when packet has been transmitted
+ //!< 1: Check if Tx queue is empty when packet has been transmitted + } pktConf; + uint8_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to Tx queue } __RFC_STRUCT_ATTR; //! @} @@ -111,63 +115,69 @@ struct __RFC_STRUCT rfc_CMD_HS_TX_s { //! @{ #define CMD_HS_RX 0x3842 //! High-Speed Receive Command -struct __RFC_STRUCT rfc_CMD_HS_RX_s { - uint16_t commandNo; //!< The command ID number 0x3842 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bUseCrc:1; //!< \brief 0: Do not receive or check CRC
- //!< 1: Receive and check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t addressMode:2; //!< \brief 0: No address check
- //!< 1: Accept address0 and address1
- //!< 2: Accept address0, address1, and 0x0000
- //!< 3: Accept address0, address1, 0x0000, and 0xFFFF - } pktConf; - struct { - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bIncludeLen:1; //!< If 1, include the received length field in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise 3scard it - uint8_t bAppendStatus:1; //!< If 1, append a status word to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConf; - uint16_t maxPktLen; //!< Packet length for fixed length; maximum packet length for variable length - uint16_t address0; //!< Address - uint16_t address1; //!< Address (set equal to address0 to accept only one address) - uint8_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - rfc_hsRxOutput_t *pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_HS_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3842 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bUseCrc: 1; //!< \brief 0: Do not receive or check CRC
+ //!< 1: Receive and check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t addressMode: 2; //!< \brief 0: No address check
+ //!< 1: Accept address0 and address1
+ //!< 2: Accept address0, address1, and 0x0000
+ //!< 3: Accept address0, address1, 0x0000, and 0xFFFF + } pktConf; + struct + { + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bIncludeLen: 1; //!< If 1, include the received length field in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise 3scard it + uint8_t bAppendStatus: 1; //!< If 1, append a status word to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConf; + uint16_t maxPktLen; //!< Packet length for fixed length; maximum packet length for variable length + uint16_t address0; //!< Address + uint16_t address1; //!< Address (set equal to address0 to accept only one address) + uint8_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + rfc_hsRxOutput_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -176,13 +186,14 @@ struct __RFC_STRUCT rfc_CMD_HS_RX_s { //! @{ //! Output structure for CMD_HS_RX -struct __RFC_STRUCT rfc_hsRxOutput_s { - uint16_t nRxOk; //!< Number of packets that have been received with CRC OK - uint16_t nRxNok; //!< Number of packets that have been received with CRC error - uint16_t nRxAborted; //!< Number of packets not received due to illegal length or address mismatch - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - ratmr_t timeStamp; //!< Time stamp of last received packet +struct __RFC_STRUCT rfc_hsRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets that have been received with CRC OK + uint16_t nRxNok; //!< Number of packets that have been received with CRC error + uint16_t nRxAborted; //!< Number of packets not received due to illegal length or address mismatch + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + ratmr_t timeStamp; //!< Time stamp of last received packet } __RFC_STRUCT_ATTR; //! @} @@ -191,16 +202,18 @@ struct __RFC_STRUCT rfc_hsRxOutput_s { //! @{ //! Receive status word that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_hsRxStatus_s { - struct { - uint16_t rssi:8; //!< RSSI of the received packet in dBm (signed) - uint16_t bCrcErr:1; //!< \brief 0: Packet received OK
- //!< 1: Packet received with CRC error - uint16_t addressInd:2; //!< \brief 0: Received address0 (or no address check)
- //!< 1: Received address1
- //!< 2: Received address 0x0000
- //!< 3: Received address 0xFFFF - } status; +struct __RFC_STRUCT rfc_hsRxStatus_s +{ + struct + { + uint16_t rssi: 8; //!< RSSI of the received packet in dBm (signed) + uint16_t bCrcErr: 1; //!< \brief 0: Packet received OK
+ //!< 1: Packet received with CRC error + uint16_t addressInd: 2; //!< \brief 0: Received address0 (or no address check)
+ //!< 1: Received address1
+ //!< 2: Received address 0x0000
+ //!< 3: Received address 0xFFFF + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_cmd.h index 1e92f0aa..6357effc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_cmd.h @@ -40,17 +40,17 @@ #define __IEEE_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -83,127 +83,135 @@ typedef struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s rfc_ieeeRxCorrCrc_t; //! @{ #define CMD_IEEE_RX 0x2801 //! IEEE 802.15.4 Receive Command -struct __RFC_STRUCT rfc_CMD_IEEE_RX_s { - uint16_t commandNo; //!< The command ID number 0x2801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to tune to in the start of the operation
- //!< 0: Use existing channel
- //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
- //!< 60--207: Frequency is (2300 + channel) MHz
- //!< Others: Reserved - struct { - uint8_t bAutoFlushCrc:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushIgn:1; //!< If 1, automatically remove packets that can be ignored according to frame filtering from Rx queue - uint8_t bIncludePhyHdr:1; //!< If 1, include the received PHY header field in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendCorrCrc:1; //!< If 1, append a correlation value and CRC result byte to the packet in the Rx queue - uint8_t bAppendSrcInd:1; //!< If 1, append an index from the source matching algorithm - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; - dataQueue_t* pRxQ; //!< Pointer to receive queue - rfc_ieeeRxOutput_t *pOutput; //!< Pointer to output structure (NULL: Do not store results) - struct { - uint16_t frameFiltEn:1; //!< \brief 0: Disable frame filtering
- //!< 1: Enable frame filtering - uint16_t frameFiltStop:1; //!< \brief 0: Receive all packets to the end
- //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. - uint16_t autoAckEn:1; //!< \brief 0: Disable auto ACK
- //!< 1: Enable auto ACK. - uint16_t slottedAckEn:1; //!< \brief 0: Non-slotted ACK
- //!< 1: Slotted ACK. - uint16_t autoPendEn:1; //!< \brief 0: Auto-pend disabled
- //!< 1: Auto-pend enabled - uint16_t defaultPend:1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend - uint16_t bPendDataReqOnly:1; //!< \brief 0: Use auto-pend for any packet
- //!< 1: Use auto-pend for data request packets only - uint16_t bPanCoord:1; //!< \brief 0: Device is not PAN coordinator
- //!< 1: Device is PAN coordinator - uint16_t maxFrameVersion:2; //!< Reject frames where the frame version field in the FCF is greater than this value - uint16_t fcfReservedMask:3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero - uint16_t modifyFtFilter:2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
- //!< 0: No modification
- //!< 1: Invert MSB
- //!< 2: Set MSB to 0
- //!< 3: Set MSB to 1 - uint16_t bStrictLenFilter:1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
- //!< 1: Accept only acknowledgement frames of length 5 - } frameFiltOpt; //!< Frame filtering options - struct { - uint8_t bAcceptFt0Beacon:1; //!< \brief Treatment of frames with frame type 000 (beacon):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt1Data:1; //!< \brief Treatment of frames with frame type 001 (data):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt2Ack:1; //!< \brief Treatment of frames with frame type 010 (ACK):
- //!< 0: Reject, unless running ACK receive command
- //!< 1: Always accept - uint8_t bAcceptFt3MacCmd:1; //!< \brief Treatment of frames with frame type 011 (MAC command):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt4Reserved:1; //!< \brief Treatment of frames with frame type 100 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt5Reserved:1; //!< \brief Treatment of frames with frame type 101 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt6Reserved:1; //!< \brief Treatment of frames with frame type 110 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt7Reserved:1; //!< \brief Treatment of frames with frame type 111 (reserved):
- //!< 0: Reject
- //!< 1: Accept - } frameTypes; //!< Frame types to receive in frame filtering - struct { - uint8_t ccaEnEnergy:1; //!< Enable energy scan as CCA source - uint8_t ccaEnCorr:1; //!< Enable correlator based carrier sense as CCA source - uint8_t ccaEnSync:1; //!< Enable sync found based carrier sense as CCA source - uint8_t ccaCorrOp:1; //!< \brief Operator to use between energy based and correlator based CCA
- //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
- //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy - uint8_t ccaSyncOp:1; //!< \brief Operator to use between sync found based CCA and the others
- //!< 0: Always report busy channel if ccaSync is busy
- //!< 1: Always report idle channel if ccaSync is idle - uint8_t ccaCorrThr:2; //!< Threshold for number of correlation peaks in correlator based carrier sense - } ccaOpt; //!< CCA options - int8_t ccaRssiThr; //!< RSSI threshold for CCA - uint8_t __dummy0; - uint8_t numExtEntries; //!< Number of extended address entries - uint8_t numShortEntries; //!< Number of short address entries - uint32_t* pExtEntryList; //!< Pointer to list of extended address entries - uint32_t* pShortEntryList; //!< Pointer to list of short address entries - uint64_t localExtAddr; //!< The extended address of the local device - uint16_t localShortAddr; //!< The short address of the local device - uint16_t localPanID; //!< The PAN ID of the local device - uint16_t __dummy1; - uint8_t __dummy2; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx - //!< operation +struct __RFC_STRUCT rfc_CMD_IEEE_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x2801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to tune to in the start of the operation
+ //!< 0: Use existing channel
+ //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
+ //!< 60--207: Frequency is (2300 + channel) MHz
+ //!< Others: Reserved + struct + { + uint8_t bAutoFlushCrc: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushIgn: 1; //!< If 1, automatically remove packets that can be ignored according to frame filtering from Rx queue + uint8_t bIncludePhyHdr: 1; //!< If 1, include the received PHY header field in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendCorrCrc: 1; //!< If 1, append a correlation value and CRC result byte to the packet in the Rx queue + uint8_t bAppendSrcInd: 1; //!< If 1, append an index from the source matching algorithm + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; + dataQueue_t* pRxQ; //!< Pointer to receive queue + rfc_ieeeRxOutput_t* pOutput; //!< Pointer to output structure (NULL: Do not store results) + struct + { + uint16_t frameFiltEn: 1; //!< \brief 0: Disable frame filtering
+ //!< 1: Enable frame filtering + uint16_t frameFiltStop: 1; //!< \brief 0: Receive all packets to the end
+ //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. + uint16_t autoAckEn: 1; //!< \brief 0: Disable auto ACK
+ //!< 1: Enable auto ACK. + uint16_t slottedAckEn: 1; //!< \brief 0: Non-slotted ACK
+ //!< 1: Slotted ACK. + uint16_t autoPendEn: 1; //!< \brief 0: Auto-pend disabled
+ //!< 1: Auto-pend enabled + uint16_t defaultPend: 1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend + uint16_t bPendDataReqOnly: 1; //!< \brief 0: Use auto-pend for any packet
+ //!< 1: Use auto-pend for data request packets only + uint16_t bPanCoord: 1; //!< \brief 0: Device is not PAN coordinator
+ //!< 1: Device is PAN coordinator + uint16_t maxFrameVersion: 2; //!< Reject frames where the frame version field in the FCF is greater than this value + uint16_t fcfReservedMask: 3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero + uint16_t modifyFtFilter: 2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
+ //!< 0: No modification
+ //!< 1: Invert MSB
+ //!< 2: Set MSB to 0
+ //!< 3: Set MSB to 1 + uint16_t bStrictLenFilter: 1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
+ //!< 1: Accept only acknowledgement frames of length 5 + } frameFiltOpt; //!< Frame filtering options + struct + { + uint8_t bAcceptFt0Beacon: 1; //!< \brief Treatment of frames with frame type 000 (beacon):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt1Data: 1; //!< \brief Treatment of frames with frame type 001 (data):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt2Ack: 1; //!< \brief Treatment of frames with frame type 010 (ACK):
+ //!< 0: Reject, unless running ACK receive command
+ //!< 1: Always accept + uint8_t bAcceptFt3MacCmd: 1; //!< \brief Treatment of frames with frame type 011 (MAC command):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt4Reserved: 1; //!< \brief Treatment of frames with frame type 100 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt5Reserved: 1; //!< \brief Treatment of frames with frame type 101 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt6Reserved: 1; //!< \brief Treatment of frames with frame type 110 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt7Reserved: 1; //!< \brief Treatment of frames with frame type 111 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + } frameTypes; //!< Frame types to receive in frame filtering + struct + { + uint8_t ccaEnEnergy: 1; //!< Enable energy scan as CCA source + uint8_t ccaEnCorr: 1; //!< Enable correlator based carrier sense as CCA source + uint8_t ccaEnSync: 1; //!< Enable sync found based carrier sense as CCA source + uint8_t ccaCorrOp: 1; //!< \brief Operator to use between energy based and correlator based CCA
+ //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
+ //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy + uint8_t ccaSyncOp: 1; //!< \brief Operator to use between sync found based CCA and the others
+ //!< 0: Always report busy channel if ccaSync is busy
+ //!< 1: Always report idle channel if ccaSync is idle + uint8_t ccaCorrThr: 2; //!< Threshold for number of correlation peaks in correlator based carrier sense + } ccaOpt; //!< CCA options + int8_t ccaRssiThr; //!< RSSI threshold for CCA + uint8_t __dummy0; + uint8_t numExtEntries; //!< Number of extended address entries + uint8_t numShortEntries; //!< Number of short address entries + uint32_t* pExtEntryList; //!< Pointer to list of extended address entries + uint32_t* pShortEntryList; //!< Pointer to list of short address entries + uint64_t localExtAddr; //!< The extended address of the local device + uint16_t localShortAddr; //!< The short address of the local device + uint16_t localPanID; //!< The PAN ID of the local device + uint16_t __dummy1; + uint8_t __dummy2; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx + //!< operation } __RFC_STRUCT_ATTR; //! @} @@ -212,55 +220,60 @@ struct __RFC_STRUCT rfc_CMD_IEEE_RX_s { //! @{ #define CMD_IEEE_ED_SCAN 0x2802 //! IEEE 802.15.4 Energy Detect Scan Command -struct __RFC_STRUCT rfc_CMD_IEEE_ED_SCAN_s { - uint16_t commandNo; //!< The command ID number 0x2802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to tune to in the start of the operation
- //!< 0: Use existing channel
- //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
- //!< 60--207: Frequency is (2300 + channel) MHz
- //!< Others: Reserved - struct { - uint8_t ccaEnEnergy:1; //!< Enable energy scan as CCA source - uint8_t ccaEnCorr:1; //!< Enable correlator based carrier sense as CCA source - uint8_t ccaEnSync:1; //!< Enable sync found based carrier sense as CCA source - uint8_t ccaCorrOp:1; //!< \brief Operator to use between energy based and correlator based CCA
- //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
- //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy - uint8_t ccaSyncOp:1; //!< \brief Operator to use between sync found based CCA and the others
- //!< 0: Always report busy channel if ccaSync is busy
- //!< 1: Always report idle channel if ccaSync is idle - uint8_t ccaCorrThr:2; //!< Threshold for number of correlation peaks in correlator based carrier sense - } ccaOpt; //!< CCA options - int8_t ccaRssiThr; //!< RSSI threshold for CCA - uint8_t __dummy0; - int8_t maxRssi; //!< The maximum RSSI recorded during the ED scan - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx - //!< operation +struct __RFC_STRUCT rfc_CMD_IEEE_ED_SCAN_s +{ + uint16_t commandNo; //!< The command ID number 0x2802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to tune to in the start of the operation
+ //!< 0: Use existing channel
+ //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
+ //!< 60--207: Frequency is (2300 + channel) MHz
+ //!< Others: Reserved + struct + { + uint8_t ccaEnEnergy: 1; //!< Enable energy scan as CCA source + uint8_t ccaEnCorr: 1; //!< Enable correlator based carrier sense as CCA source + uint8_t ccaEnSync: 1; //!< Enable sync found based carrier sense as CCA source + uint8_t ccaCorrOp: 1; //!< \brief Operator to use between energy based and correlator based CCA
+ //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
+ //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy + uint8_t ccaSyncOp: 1; //!< \brief Operator to use between sync found based CCA and the others
+ //!< 0: Always report busy channel if ccaSync is busy
+ //!< 1: Always report idle channel if ccaSync is idle + uint8_t ccaCorrThr: 2; //!< Threshold for number of correlation peaks in correlator based carrier sense + } ccaOpt; //!< CCA options + int8_t ccaRssiThr; //!< RSSI threshold for CCA + uint8_t __dummy0; + int8_t maxRssi; //!< The maximum RSSI recorded during the ED scan + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx + //!< operation } __RFC_STRUCT_ATTR; //! @} @@ -269,37 +282,41 @@ struct __RFC_STRUCT rfc_CMD_IEEE_ED_SCAN_s { //! @{ #define CMD_IEEE_TX 0x2C01 //! IEEE 802.15.4 Transmit Command -struct __RFC_STRUCT rfc_CMD_IEEE_TX_s { - uint16_t commandNo; //!< The command ID number 0x2C01 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bIncludePhyHdr:1; //!< \brief 0: Find PHY header automatically
- //!< 1: Insert PHY header from the buffer - uint8_t bIncludeCrc:1; //!< \brief 0: Append automatically calculated CRC
- //!< 1: Insert FCS (CRC) from the buffer - uint8_t :1; - uint8_t payloadLenMsb:5; //!< \brief Most significant bits of payload length. Should only be non-zero to create long - //!< non-standard packets for test purposes - } txOpt; - uint8_t payloadLen; //!< Number of bytes in the payload - uint8_t* pPayload; //!< Pointer to payload buffer of size payloadLen - ratmr_t timeStamp; //!< Time stamp of transmitted frame +struct __RFC_STRUCT rfc_CMD_IEEE_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x2C01 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bIncludePhyHdr: 1; //!< \brief 0: Find PHY header automatically
+ //!< 1: Insert PHY header from the buffer + uint8_t bIncludeCrc: 1; //!< \brief 0: Append automatically calculated CRC
+ //!< 1: Insert FCS (CRC) from the buffer + uint8_t : 1; + uint8_t payloadLenMsb: 5; //!< \brief Most significant bits of payload length. Should only be non-zero to create long + //!< non-standard packets for test purposes + } txOpt; + uint8_t payloadLen; //!< Number of bytes in the payload + uint8_t* pPayload; //!< Pointer to payload buffer of size payloadLen + ratmr_t timeStamp; //!< Time stamp of transmitted frame } __RFC_STRUCT_ATTR; //! @} @@ -308,53 +325,58 @@ struct __RFC_STRUCT rfc_CMD_IEEE_TX_s { //! @{ #define CMD_IEEE_CSMA 0x2C02 //! IEEE 802.15.4 CSMA-CA Command -struct __RFC_STRUCT rfc_CMD_IEEE_CSMA_s { - uint16_t commandNo; //!< The command ID number 0x2C02 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t randomState; //!< The state of the pseudo-random generator - uint8_t macMaxBE; //!< The IEEE 802.15.4 MAC parameter macMaxBE - uint8_t macMaxCSMABackoffs; //!< The IEEE 802.15.4 MAC parameter macMaxCSMABackoffs - struct { - uint8_t initCW:5; //!< The initialization value for the CW parameter - uint8_t bSlotted:1; //!< \brief 0: non-slotted CSMA
- //!< 1: slotted CSMA - uint8_t rxOffMode:2; //!< \brief 0: RX stays on during CSMA backoffs
- //!< 1: The CSMA-CA algorithm will suspend the receiver if no frame is being received
- //!< 2: The CSMA-CA algorithm will suspend the receiver if no frame is being received, - //!< or after finishing it (including auto ACK) otherwise
- //!< 3: The CSMA-CA algorithm will suspend the receiver immediately during back-offs - } csmaConfig; - uint8_t NB; //!< The NB parameter from the IEEE 802.15.4 CSMA-CA algorithm - uint8_t BE; //!< The BE parameter from the IEEE 802.15.4 CSMA-CA algorithm - uint8_t remainingPeriods; //!< The number of remaining periods from a paused backoff countdown - int8_t lastRssi; //!< RSSI measured at the last CCA operation - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the CSMA-CA operation - ratmr_t lastTimeStamp; //!< Time of the last CCA operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< CSMA-CA operation +struct __RFC_STRUCT rfc_CMD_IEEE_CSMA_s +{ + uint16_t commandNo; //!< The command ID number 0x2C02 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t randomState; //!< The state of the pseudo-random generator + uint8_t macMaxBE; //!< The IEEE 802.15.4 MAC parameter macMaxBE + uint8_t macMaxCSMABackoffs; //!< The IEEE 802.15.4 MAC parameter macMaxCSMABackoffs + struct + { + uint8_t initCW: 5; //!< The initialization value for the CW parameter + uint8_t bSlotted: 1; //!< \brief 0: non-slotted CSMA
+ //!< 1: slotted CSMA + uint8_t rxOffMode: 2; //!< \brief 0: RX stays on during CSMA backoffs
+ //!< 1: The CSMA-CA algorithm will suspend the receiver if no frame is being received
+ //!< 2: The CSMA-CA algorithm will suspend the receiver if no frame is being received, + //!< or after finishing it (including auto ACK) otherwise
+ //!< 3: The CSMA-CA algorithm will suspend the receiver immediately during back-offs + } csmaConfig; + uint8_t NB; //!< The NB parameter from the IEEE 802.15.4 CSMA-CA algorithm + uint8_t BE; //!< The BE parameter from the IEEE 802.15.4 CSMA-CA algorithm + uint8_t remainingPeriods; //!< The number of remaining periods from a paused backoff countdown + int8_t lastRssi; //!< RSSI measured at the last CCA operation + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the CSMA-CA operation + ratmr_t lastTimeStamp; //!< Time of the last CCA operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< CSMA-CA operation } __RFC_STRUCT_ATTR; //! @} @@ -363,36 +385,40 @@ struct __RFC_STRUCT rfc_CMD_IEEE_CSMA_s { //! @{ #define CMD_IEEE_RX_ACK 0x2C03 //! IEEE 802.15.4 Receive Acknowledgement Command -struct __RFC_STRUCT rfc_CMD_IEEE_RX_ACK_s { - uint16_t commandNo; //!< The command ID number 0x2C03 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t seqNo; //!< Sequence number to expect - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to give up acknowledgement reception - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to give up - //!< acknowledgement reception +struct __RFC_STRUCT rfc_CMD_IEEE_RX_ACK_s +{ + uint16_t commandNo; //!< The command ID number 0x2C03 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t seqNo; //!< Sequence number to expect + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to give up acknowledgement reception + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to give up + //!< acknowledgement reception } __RFC_STRUCT_ATTR; //! @} @@ -401,25 +427,28 @@ struct __RFC_STRUCT rfc_CMD_IEEE_RX_ACK_s { //! @{ #define CMD_IEEE_ABORT_BG 0x2C04 //! IEEE 802.15.4 Abort Background Level Command -struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_BG_s { - uint16_t commandNo; //!< The command ID number 0x2C04 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_BG_s +{ + uint16_t commandNo; //!< The command ID number 0x2C04 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -428,21 +457,23 @@ struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_BG_s { //! @{ #define CMD_IEEE_MOD_CCA 0x2001 //! IEEE 802.15.4 Modify CCA Parameter Command -struct __RFC_STRUCT rfc_CMD_IEEE_MOD_CCA_s { - uint16_t commandNo; //!< The command ID number 0x2001 - struct { - uint8_t ccaEnEnergy:1; //!< Enable energy scan as CCA source - uint8_t ccaEnCorr:1; //!< Enable correlator based carrier sense as CCA source - uint8_t ccaEnSync:1; //!< Enable sync found based carrier sense as CCA source - uint8_t ccaCorrOp:1; //!< \brief Operator to use between energy based and correlator based CCA
- //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
- //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy - uint8_t ccaSyncOp:1; //!< \brief Operator to use between sync found based CCA and the others
- //!< 0: Always report busy channel if ccaSync is busy
- //!< 1: Always report idle channel if ccaSync is idle - uint8_t ccaCorrThr:2; //!< Threshold for number of correlation peaks in correlator based carrier sense - } newCcaOpt; //!< New value of ccaOpt for the running background level operation - int8_t newCcaRssiThr; //!< New value of ccaRssiThr for the running background level operation +struct __RFC_STRUCT rfc_CMD_IEEE_MOD_CCA_s +{ + uint16_t commandNo; //!< The command ID number 0x2001 + struct + { + uint8_t ccaEnEnergy: 1; //!< Enable energy scan as CCA source + uint8_t ccaEnCorr: 1; //!< Enable correlator based carrier sense as CCA source + uint8_t ccaEnSync: 1; //!< Enable sync found based carrier sense as CCA source + uint8_t ccaCorrOp: 1; //!< \brief Operator to use between energy based and correlator based CCA
+ //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
+ //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy + uint8_t ccaSyncOp: 1; //!< \brief Operator to use between sync found based CCA and the others
+ //!< 0: Always report busy channel if ccaSync is busy
+ //!< 1: Always report idle channel if ccaSync is idle + uint8_t ccaCorrThr: 2; //!< Threshold for number of correlation peaks in correlator based carrier sense + } newCcaOpt; //!< New value of ccaOpt for the running background level operation + int8_t newCcaRssiThr; //!< New value of ccaRssiThr for the running background level operation } __RFC_STRUCT_ATTR; //! @} @@ -451,60 +482,63 @@ struct __RFC_STRUCT rfc_CMD_IEEE_MOD_CCA_s { //! @{ #define CMD_IEEE_MOD_FILT 0x2002 //! IEEE 802.15.4 Modify Frame Filtering Parameter Command -struct __RFC_STRUCT rfc_CMD_IEEE_MOD_FILT_s { - uint16_t commandNo; //!< The command ID number 0x2002 - struct { - uint16_t frameFiltEn:1; //!< \brief 0: Disable frame filtering
- //!< 1: Enable frame filtering - uint16_t frameFiltStop:1; //!< \brief 0: Receive all packets to the end
- //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. - uint16_t autoAckEn:1; //!< \brief 0: Disable auto ACK
- //!< 1: Enable auto ACK. - uint16_t slottedAckEn:1; //!< \brief 0: Non-slotted ACK
- //!< 1: Slotted ACK. - uint16_t autoPendEn:1; //!< \brief 0: Auto-pend disabled
- //!< 1: Auto-pend enabled - uint16_t defaultPend:1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend - uint16_t bPendDataReqOnly:1; //!< \brief 0: Use auto-pend for any packet
- //!< 1: Use auto-pend for data request packets only - uint16_t bPanCoord:1; //!< \brief 0: Device is not PAN coordinator
- //!< 1: Device is PAN coordinator - uint16_t maxFrameVersion:2; //!< Reject frames where the frame version field in the FCF is greater than this value - uint16_t fcfReservedMask:3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero - uint16_t modifyFtFilter:2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
- //!< 0: No modification
- //!< 1: Invert MSB
- //!< 2: Set MSB to 0
- //!< 3: Set MSB to 1 - uint16_t bStrictLenFilter:1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
- //!< 1: Accept only acknowledgement frames of length 5 - } newFrameFiltOpt; //!< New value of frameFiltOpt for the running background level operation - struct { - uint8_t bAcceptFt0Beacon:1; //!< \brief Treatment of frames with frame type 000 (beacon):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt1Data:1; //!< \brief Treatment of frames with frame type 001 (data):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt2Ack:1; //!< \brief Treatment of frames with frame type 010 (ACK):
- //!< 0: Reject, unless running ACK receive command
- //!< 1: Always accept - uint8_t bAcceptFt3MacCmd:1; //!< \brief Treatment of frames with frame type 011 (MAC command):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt4Reserved:1; //!< \brief Treatment of frames with frame type 100 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt5Reserved:1; //!< \brief Treatment of frames with frame type 101 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt6Reserved:1; //!< \brief Treatment of frames with frame type 110 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt7Reserved:1; //!< \brief Treatment of frames with frame type 111 (reserved):
- //!< 0: Reject
- //!< 1: Accept - } newFrameTypes; //!< New value of frameTypes for the running background level operation +struct __RFC_STRUCT rfc_CMD_IEEE_MOD_FILT_s +{ + uint16_t commandNo; //!< The command ID number 0x2002 + struct + { + uint16_t frameFiltEn: 1; //!< \brief 0: Disable frame filtering
+ //!< 1: Enable frame filtering + uint16_t frameFiltStop: 1; //!< \brief 0: Receive all packets to the end
+ //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. + uint16_t autoAckEn: 1; //!< \brief 0: Disable auto ACK
+ //!< 1: Enable auto ACK. + uint16_t slottedAckEn: 1; //!< \brief 0: Non-slotted ACK
+ //!< 1: Slotted ACK. + uint16_t autoPendEn: 1; //!< \brief 0: Auto-pend disabled
+ //!< 1: Auto-pend enabled + uint16_t defaultPend: 1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend + uint16_t bPendDataReqOnly: 1; //!< \brief 0: Use auto-pend for any packet
+ //!< 1: Use auto-pend for data request packets only + uint16_t bPanCoord: 1; //!< \brief 0: Device is not PAN coordinator
+ //!< 1: Device is PAN coordinator + uint16_t maxFrameVersion: 2; //!< Reject frames where the frame version field in the FCF is greater than this value + uint16_t fcfReservedMask: 3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero + uint16_t modifyFtFilter: 2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
+ //!< 0: No modification
+ //!< 1: Invert MSB
+ //!< 2: Set MSB to 0
+ //!< 3: Set MSB to 1 + uint16_t bStrictLenFilter: 1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
+ //!< 1: Accept only acknowledgement frames of length 5 + } newFrameFiltOpt; //!< New value of frameFiltOpt for the running background level operation + struct + { + uint8_t bAcceptFt0Beacon: 1; //!< \brief Treatment of frames with frame type 000 (beacon):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt1Data: 1; //!< \brief Treatment of frames with frame type 001 (data):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt2Ack: 1; //!< \brief Treatment of frames with frame type 010 (ACK):
+ //!< 0: Reject, unless running ACK receive command
+ //!< 1: Always accept + uint8_t bAcceptFt3MacCmd: 1; //!< \brief Treatment of frames with frame type 011 (MAC command):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt4Reserved: 1; //!< \brief Treatment of frames with frame type 100 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt5Reserved: 1; //!< \brief Treatment of frames with frame type 101 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt6Reserved: 1; //!< \brief Treatment of frames with frame type 110 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt7Reserved: 1; //!< \brief Treatment of frames with frame type 111 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + } newFrameTypes; //!< New value of frameTypes for the running background level operation } __RFC_STRUCT_ATTR; //! @} @@ -513,16 +547,18 @@ struct __RFC_STRUCT rfc_CMD_IEEE_MOD_FILT_s { //! @{ #define CMD_IEEE_MOD_SRC_MATCH 0x2003 //! IEEE 802.15.4 Enable/Disable Source Matching Entry Command -struct __RFC_STRUCT rfc_CMD_IEEE_MOD_SRC_MATCH_s { - uint16_t commandNo; //!< The command ID number 0x2003 - struct { - uint8_t bEnable:1; //!< \brief 0: Disable entry
- //!< 1: Enable entry - uint8_t srcPend:1; //!< New value of the pending bit for the entry - uint8_t entryType:1; //!< \brief 0: Short address
- //!< 1: Extended address - } options; - uint8_t entryNo; //!< Index of entry to enable or disable +struct __RFC_STRUCT rfc_CMD_IEEE_MOD_SRC_MATCH_s +{ + uint16_t commandNo; //!< The command ID number 0x2003 + struct + { + uint8_t bEnable: 1; //!< \brief 0: Disable entry
+ //!< 1: Enable entry + uint8_t srcPend: 1; //!< New value of the pending bit for the entry + uint8_t entryType: 1; //!< \brief 0: Short address
+ //!< 1: Extended address + } options; + uint8_t entryNo; //!< Index of entry to enable or disable } __RFC_STRUCT_ATTR; //! @} @@ -531,8 +567,9 @@ struct __RFC_STRUCT rfc_CMD_IEEE_MOD_SRC_MATCH_s { //! @{ #define CMD_IEEE_ABORT_FG 0x2401 //! IEEE 802.15.4 Abort Foreground Level Command -struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_FG_s { - uint16_t commandNo; //!< The command ID number 0x2401 +struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_FG_s +{ + uint16_t commandNo; //!< The command ID number 0x2401 } __RFC_STRUCT_ATTR; //! @} @@ -541,8 +578,9 @@ struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_FG_s { //! @{ #define CMD_IEEE_STOP_FG 0x2402 //! IEEE 802.15.4 Gracefully Stop Foreground Level Command -struct __RFC_STRUCT rfc_CMD_IEEE_STOP_FG_s { - uint16_t commandNo; //!< The command ID number 0x2402 +struct __RFC_STRUCT rfc_CMD_IEEE_STOP_FG_s +{ + uint16_t commandNo; //!< The command ID number 0x2402 } __RFC_STRUCT_ATTR; //! @} @@ -551,27 +589,29 @@ struct __RFC_STRUCT rfc_CMD_IEEE_STOP_FG_s { //! @{ #define CMD_IEEE_CCA_REQ 0x2403 //! IEEE 802.15.4 CCA and RSSI Information Request Command -struct __RFC_STRUCT rfc_CMD_IEEE_CCA_REQ_s { - uint16_t commandNo; //!< The command ID number 0x2403 - int8_t currentRssi; //!< The RSSI currently observed on the channel - int8_t maxRssi; //!< The maximum RSSI observed on the channel since Rx was started - struct { - uint8_t ccaState:2; //!< \brief Value of the current CCA state
- //!< 0: Idle
- //!< 1: Busy
- //!< 2: Invalid - uint8_t ccaEnergy:2; //!< \brief Value of the current energy detect CCA state
- //!< 0: Idle
- //!< 1: Busy
- //!< 2: Invalid - uint8_t ccaCorr:2; //!< \brief Value of the current correlator based carrier sense CCA state
- //!< 0: Idle
- //!< 1: Busy
- //!< 2: Invalid - uint8_t ccaSync:1; //!< \brief Value of the current sync found based carrier sense CCA state
- //!< 0: Idle
- //!< 1: Busy - } ccaInfo; +struct __RFC_STRUCT rfc_CMD_IEEE_CCA_REQ_s +{ + uint16_t commandNo; //!< The command ID number 0x2403 + int8_t currentRssi; //!< The RSSI currently observed on the channel + int8_t maxRssi; //!< The maximum RSSI observed on the channel since Rx was started + struct + { + uint8_t ccaState: 2; //!< \brief Value of the current CCA state
+ //!< 0: Idle
+ //!< 1: Busy
+ //!< 2: Invalid + uint8_t ccaEnergy: 2; //!< \brief Value of the current energy detect CCA state
+ //!< 0: Idle
+ //!< 1: Busy
+ //!< 2: Invalid + uint8_t ccaCorr: 2; //!< \brief Value of the current correlator based carrier sense CCA state
+ //!< 0: Idle
+ //!< 1: Busy
+ //!< 2: Invalid + uint8_t ccaSync: 1; //!< \brief Value of the current sync found based carrier sense CCA state
+ //!< 0: Idle
+ //!< 1: Busy + } ccaInfo; } __RFC_STRUCT_ATTR; //! @} @@ -580,20 +620,21 @@ struct __RFC_STRUCT rfc_CMD_IEEE_CCA_REQ_s { //! @{ //! Output structure for CMD_IEEE_RX -struct __RFC_STRUCT rfc_ieeeRxOutput_s { - uint8_t nTxAck; //!< Total number of transmitted ACK frames - uint8_t nRxBeacon; //!< Number of received beacon frames - uint8_t nRxData; //!< Number of received data frames - uint8_t nRxAck; //!< Number of received acknowledgement frames - uint8_t nRxMacCmd; //!< Number of received MAC command frames - uint8_t nRxReserved; //!< Number of received frames with reserved frame type - uint8_t nRxNok; //!< Number of received frames with CRC error - uint8_t nRxIgnored; //!< Number of frames received that are to be ignored - uint8_t nRxBufFull; //!< Number of received frames discarded because the Rx buffer was full - int8_t lastRssi; //!< RSSI of last received frame - int8_t maxRssi; //!< Highest RSSI observed in the operation - uint8_t __dummy0; - ratmr_t beaconTimeStamp; //!< Time stamp of last received beacon frame +struct __RFC_STRUCT rfc_ieeeRxOutput_s +{ + uint8_t nTxAck; //!< Total number of transmitted ACK frames + uint8_t nRxBeacon; //!< Number of received beacon frames + uint8_t nRxData; //!< Number of received data frames + uint8_t nRxAck; //!< Number of received acknowledgement frames + uint8_t nRxMacCmd; //!< Number of received MAC command frames + uint8_t nRxReserved; //!< Number of received frames with reserved frame type + uint8_t nRxNok; //!< Number of received frames with CRC error + uint8_t nRxIgnored; //!< Number of frames received that are to be ignored + uint8_t nRxBufFull; //!< Number of received frames discarded because the Rx buffer was full + int8_t lastRssi; //!< RSSI of last received frame + int8_t maxRssi; //!< Highest RSSI observed in the operation + uint8_t __dummy0; + ratmr_t beaconTimeStamp; //!< Time stamp of last received beacon frame } __RFC_STRUCT_ATTR; //! @} @@ -602,9 +643,10 @@ struct __RFC_STRUCT rfc_ieeeRxOutput_s { //! @{ //! Structure for short address entries -struct __RFC_STRUCT rfc_shortAddrEntry_s { - uint16_t shortAddr; //!< Short address - uint16_t panId; //!< PAN ID +struct __RFC_STRUCT rfc_shortAddrEntry_s +{ + uint16_t shortAddr; //!< Short address + uint16_t panId; //!< PAN ID } __RFC_STRUCT_ATTR; //! @} @@ -613,12 +655,14 @@ struct __RFC_STRUCT rfc_shortAddrEntry_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s { - struct { - uint8_t corr:6; //!< The correlation value - uint8_t bIgnore:1; //!< 1 if the packet should be rejected by frame filtering, 0 otherwise - uint8_t bCrcErr:1; //!< 1 if the packet was received with CRC error, 0 otherwise - } status; +struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s +{ + struct + { + uint8_t corr: 6; //!< The correlation value + uint8_t bIgnore: 1; //!< 1 if the packet should be rejected by frame filtering, 0 otherwise + uint8_t bCrcErr: 1; //!< 1 if the packet was received with CRC error, 0 otherwise + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_mailbox.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_mailbox.h index 7f76b5bd..e76cf288 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_mailbox.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_ieee_mailbox.h @@ -56,7 +56,7 @@ #define IEEE_DONE_ACKPEND 0x2404 ///< ACK packet received with pending data bit set #define IEEE_DONE_TIMEOUT 0x2405 ///< Operation ended due to timeout #define IEEE_DONE_BGEND 0x2406 ///< FG operation ended because necessary background level - ///< operation ended +///< operation ended #define IEEE_DONE_ABORT 0x2407 ///< Operation aborted by command ///@} /// \name Operation finished with error diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_mailbox.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_mailbox.h index 9ae9c7d9..6262fad5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_mailbox.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_mailbox.h @@ -61,9 +61,10 @@ typedef uint32_t ratmr_t; /// Type definition for a data queue -typedef struct { - uint8_t *pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue - uint8_t *pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue +typedef struct +{ + uint8_t* pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue + uint8_t* pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue } dataQueue_t; @@ -152,17 +153,17 @@ typedef struct { #define CMDSTA_IllegalPointer 0x81 ///< The pointer signaled in CMDR is not valid #define CMDSTA_UnknownCommand 0x82 ///< The command number in the command structure is unknown #define CMDSTA_UnknownDirCommand 0x83 ///< The command number for a direct command is unknown, or the - ///< command is not a direct command +///< command is not a direct command #define CMDSTA_ContextError 0x85 ///< An immediate or direct command was issued in a context - ///< where it is not supported +///< where it is not supported #define CMDSTA_SchedulingError 0x86 ///< A radio operation command was attempted to be scheduled - ///< while another operation was already running in the RF core +///< while another operation was already running in the RF core #define CMDSTA_ParError 0x87 ///< There were errors in the command parameters that are parsed - ///< on submission. +///< on submission. #define CMDSTA_QueueError 0x88 ///< An operation on a data entry queue was attempted that was - ///< not supported by the queue in its current state +///< not supported by the queue in its current state #define CMDSTA_QueueBusy 0x89 ///< An operation on a data entry was attempted while that entry - ///< was busy +///< was busy ///@} @@ -196,7 +197,7 @@ typedef struct { #define TRIG_REL_EVT2 9 ///< Trigs at a time relative to the context defined "Event 2" #define TRIG_EXTERNAL 10 ///< Trigs at an external event to the radio timer #define TRIG_PAST_BM 0x80 ///< Bitmask for setting pastTrig bit in order to trig immediately if - ///< trigger happened in the past +///< trigger happened in the past ///@} @@ -205,13 +206,13 @@ typedef struct { #define COND_ALWAYS 0 ///< Always run next command (except in case of Abort) #define COND_NEVER 1 ///< Never run next command #define COND_STOP_ON_FALSE 2 ///< Run next command if this command returned True, stop if it returned - ///< False +///< False #define COND_STOP_ON_TRUE 3 ///< Stop if this command returned True, run next command if it returned - ///< False +///< False #define COND_SKIP_ON_FALSE 4 ///< Run next command if this command returned True, skip a number of - ///< commands if it returned False +///< commands if it returned False #define COND_SKIP_ON_TRUE 5 ///< Skip a number of commands if this command returned True, run next - ///< command if it returned False +///< command if it returned False ///@} @@ -243,7 +244,7 @@ typedef struct { #define ERROR_PAR 0x0803 ///< Error in a command specific parameter #define ERROR_POINTER 0x0804 ///< Invalid pointer to next operation #define ERROR_CMDID 0x0805 ///< Next operation has a command ID that is undefined or not a radio - ///< operation command +///< operation command #define ERROR_WRONG_BG 0x0806 ///< FG level command not compatible with running BG level command #define ERROR_NO_SETUP 0x0807 ///< Operation using Rx or Tx attempted without CMD_RADIO_SETUP #define ERROR_NO_FS 0x0808 ///< Operation using Rx or Tx attempted without frequency synth configured @@ -279,73 +280,73 @@ typedef struct { ///@{ /// Macro for ADI half-size value-mask combination #define ADI_VAL_MASK(addr, mask, value) \ -(((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \ - ((((mask) & 0x0F) << 4) | ((value) & 0x0F))) + (((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \ + ((((mask) & 0x0F) << 4) | ((value) & 0x0F))) /// 32-bit write of 16-bit value #define HW_REG_OVERRIDE(addr, val) ((((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(val) << 16)) /// ADI register, full-size write #define ADI_REG_OVERRIDE(adiNo, addr, val) (2 | ((uint32_t)(val) << 16) | \ -(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) + (((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) /// 2 ADI registers, full-size write #define ADI_2REG_OVERRIDE(adiNo, addr, val, addr2, val2) \ -(2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \ -(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) + (2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \ + (((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) /// ADI register, half-size read-modify-write #define ADI_HALFREG_OVERRIDE(adiNo, addr, mask, val) (2 | (ADI_VAL_MASK(addr, mask, val) << 16) | \ -(((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) + (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) /// 2 ADI registers, half-size read-modify-write #define ADI_2HALFREG_OVERRIDE(adiNo, addr, mask, val, addr2, mask2, val2) \ -(2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \ -(ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) + (2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \ + (ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) /// 16-bit SW register as defined in radio_par_def.txt #define SW_REG_OVERRIDE(cmd, field, val) (3 | ((_POSITION_##cmd##_##field) << 4) | ((uint32_t)(val) << 16)) /// SW register as defined in radio_par_def.txt with added index (for use with registers > 16 bits). #define SW_REG_IND_OVERRIDE(cmd, field, offset, val) (3 | \ -(((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16)) + (((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16)) /// 8-bit SW register as defined in radio_par_def.txt #define SW_REG_BYTE_OVERRIDE(cmd, field, val) (0x8003 | ((_POSITION_##cmd##_##field) << 4) | \ -(((uint32_t)(val) & 0xFF) << 16)) + (((uint32_t)(val) & 0xFF) << 16)) /// Two 8-bit SW registers as defined in radio_par_def.txt; the one given by field and the next byte. #define SW_REG_2BYTE_OVERRIDE(cmd, field, val0, val1) (3 | (((_POSITION_##cmd##_##field) & 0xFFFE) << 4) | \ - (((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24)) + (((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24)) #define SW_REG_MASK_OVERRIDE(cmd, field, offset, mask, val) (0x8003 | \ -((_POSITION_##cmd##_##field + (offset)) << 4) | (((uint32_t)(val) & 0xFF) << 16) | (((uint32_t)(mask) & 0xFF) << 24)) + ((_POSITION_##cmd##_##field + (offset)) << 4) | (((uint32_t)(val) & 0xFF) << 16) | (((uint32_t)(mask) & 0xFF) << 24)) #define HW16_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(length) << 16)) #define HW32_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | \ -((uint32_t)(length) << 16) | (1U << 30)) + ((uint32_t)(length) << 16) | (1U << 30)) #define HW16_MASK_ARRAY_OVERRIDE(addr, length) (0x20000001 | (((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(length) << 16)) #define HW32_MASK_ARRAY_OVERRIDE(addr, length) (0x60000001 | (((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(length) << 16)) #define HW16_MASK_VAL(mask, val) ((mask) << 16 | (val)) #define ADI_ARRAY_OVERRIDE(adiNo, addr, bHalfSize, length) (1 | ((((addr) & 0x3F) << 2)) | \ -((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30)) + ((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30)) #define SW_ARRAY_OVERRIDE(cmd, firstfield, length) (1 | (((_POSITION_##cmd##_##firstfield)) << 2) | \ -((uint32_t)(length) << 16) | (3U << 30)) + ((uint32_t)(length) << 16) | (3U << 30)) #define MCE_RFE_OVERRIDE(mceCfg, mceRomBank, mceMode, rfeCfg, rfeRomBank, rfeMode) \ - (7 | ((mceCfg & 2) << 3) | ((rfeCfg & 2) << 4) |\ - ((mceCfg & 1) << 6) | (((mceRomBank) & 0x0F) << 7) | \ - ((rfeCfg & 1) << 11) | (((rfeRomBank) & 0x0F) << 12) | \ - (((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24)) + (7 | ((mceCfg & 2) << 3) | ((rfeCfg & 2) << 4) |\ + ((mceCfg & 1) << 6) | (((mceRomBank) & 0x0F) << 7) | \ + ((rfeCfg & 1) << 11) | (((rfeRomBank) & 0x0F) << 12) | \ + (((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24)) #define HPOSC_OVERRIDE(freqOffset) (0x000B | ((freqOffset) << 16)) #define TX20_POWER_OVERRIDE(tx20Power) (0x002B | (((uint32_t) tx20Power) << 10)) #define TX_STD_POWER_OVERRIDE(txPower) (0x022B | (((uint32_t) txPower) << 10)) #define MCE_RFE_SPLIT_OVERRIDE(mceRxCfg, mceTxCfg, rfeRxCfg, rfeTxCfg) \ (0x003B | ((mceRxCfg) << 12) | ((mceTxCfg) << 17) | ((rfeRxCfg) << 22) | ((rfeTxCfg) << 27)) #define CENTER_FREQ_OVERRIDE(centerFreq, flags) (0x004B | ((flags & 0x03) << 18) | \ - ((centerFreq) << 20)) + ((centerFreq) << 20)) #define MOD_TYPE_OVERRIDE(modType, deviation, stepSz, flags) (0x005B | ((flags & 0x01) << 15) | \ - ((modType) << 16) | ((deviation) << 19) |((stepSz) << 30) ) + ((modType) << 16) | ((deviation) << 19) |((stepSz) << 30) ) #define NEW_OVERRIDE_SEGMENT(address) (((((uintptr_t)(address)) & 0x03FFFFFC) << 6) | 0x000F | \ - (((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \ - (((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \ - (((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \ - (((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \ - (((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \ - (((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \ - (((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \ - (((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \ - 0x09) << 4)) // Use illegal value for illegal address range + (((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \ + (((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \ + (((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \ + (((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \ + (((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \ + (((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \ + (((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \ + (((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \ + 0x09) << 4)) // Use illegal value for illegal address range /// End of string for override register #define END_OVERRIDE 0xFFFFFFFF diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_prop_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_prop_cmd.h index 3bc74e3d..f22ac81a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_prop_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rf_prop_cmd.h @@ -40,17 +40,17 @@ #define __PROP_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -82,41 +82,45 @@ typedef struct __RFC_STRUCT rfc_propRxStatus_s rfc_propRxStatus_t; //! \addtogroup carrierSense //! @{ -struct __RFC_STRUCT rfc_carrierSense_s { - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_carrierSense_s +{ + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -125,37 +129,41 @@ struct __RFC_STRUCT rfc_carrierSense_s { //! @{ #define CMD_PROP_TX 0x3801 //! Proprietary Mode Transmit Command -struct __RFC_STRUCT rfc_CMD_PROP_TX_s { - uint16_t commandNo; //!< The command ID number 0x3801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t :2; - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Transmit length as first byte - } pktConf; - uint8_t pktLen; //!< Packet length - uint32_t syncWord; //!< Sync word to transmit - uint8_t* pPkt; //!< Pointer to packet +struct __RFC_STRUCT rfc_CMD_PROP_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x3801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t : 2; + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Transmit length as first byte + } pktConf; + uint8_t pktLen; //!< Packet length + uint32_t syncWord; //!< Sync word to transmit + uint8_t* pPkt; //!< Pointer to packet } __RFC_STRUCT_ATTR; //! @} @@ -164,70 +172,76 @@ struct __RFC_STRUCT rfc_CMD_PROP_TX_s { //! @{ #define CMD_PROP_RX 0x3802 //! Proprietary Mode Receive Command -struct __RFC_STRUCT rfc_CMD_PROP_RX_s { - uint16_t commandNo; //!< The command ID number 0x3802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bChkAddress:1; //!< \brief 0: No address check
- //!< 1: Check address - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord; //!< Sync word to listen for - uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - uint8_t address0; //!< Address - uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept - //!< 0x00 as well) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_PROP_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bChkAddress: 1; //!< \brief 0: No address check
+ //!< 1: Check address + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord; //!< Sync word to listen for + uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + uint8_t address0; //!< Address + uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept + //!< 0x00 as well) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -236,62 +250,68 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_s { //! @{ #define CMD_PROP_TX_ADV 0x3803 //! Proprietary Mode Advanced Transmit Command -struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s { - uint16_t commandNo; //!< The command ID number 0x3803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t :2; - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bCrcIncSw:1; //!< \brief 0:Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - } pktConf; - uint8_t numHdrBits; //!< Number of bits in header (0--32) - uint16_t pktLen; //!< Packet length. 0: Unlimited - struct { - uint8_t bExtTxTrig:1; //!< \brief 0: Start packet on a fixed time from the command start trigger
- //!< 1: Start packet on an external trigger (input event to RAT) - uint8_t inputMode:2; //!< \brief Input mode if external trigger is used for TX start
- //!< 0: Rising edge
- //!< 1: Falling edge
- //!< 2: Both edges
- //!< 3: Reserved - uint8_t source:5; //!< RAT input event number used for capture if external trigger is used for TX start - } startConf; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } preTrigger; //!< Trigger for transition from preamble to sync word - ratmr_t preTime; //!< \brief Time used together with preTrigger for transition from preamble to sync - //!< word. If preTrigger.triggerType is set to "now", one preamble as - //!< configured in the setup will be sent. Otherwise, the preamble will be repeated until - //!< this trigger is observed. - uint32_t syncWord; //!< Sync word to transmit - uint8_t* pPkt; //!< Pointer to packet, or TX queue for unlimited length +struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x3803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t : 2; + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bCrcIncSw: 1; //!< \brief 0:Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + } pktConf; + uint8_t numHdrBits; //!< Number of bits in header (0--32) + uint16_t pktLen; //!< Packet length. 0: Unlimited + struct + { + uint8_t bExtTxTrig: 1; //!< \brief 0: Start packet on a fixed time from the command start trigger
+ //!< 1: Start packet on an external trigger (input event to RAT) + uint8_t inputMode: 2; //!< \brief Input mode if external trigger is used for TX start
+ //!< 0: Rising edge
+ //!< 1: Falling edge
+ //!< 2: Both edges
+ //!< 3: Reserved + uint8_t source: 5; //!< RAT input event number used for capture if external trigger is used for TX start + } startConf; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } preTrigger; //!< Trigger for transition from preamble to sync word + ratmr_t preTime; //!< \brief Time used together with preTrigger for transition from preamble to sync + //!< word. If preTrigger.triggerType is set to "now", one preamble as + //!< configured in the setup will be sent. Otherwise, the preamble will be repeated until + //!< this trigger is observed. + uint32_t syncWord; //!< Sync word to transmit + uint8_t* pPkt; //!< Pointer to packet, or TX queue for unlimited length } __RFC_STRUCT_ATTR; //! @} @@ -300,84 +320,92 @@ struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s { //! @{ #define CMD_PROP_RX_ADV 0x3804 //! Proprietary Mode Advanced Receive Command -struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s { - uint16_t commandNo; //!< The command ID number 0x3804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bCrcIncSw:1; //!< \brief 0: Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord0; //!< Sync word to listen for - uint32_t syncWord1; //!< Alternative sync word if non-zero - uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - struct { - uint16_t numHdrBits:6; //!< Number of bits in header (0--32) - uint16_t lenPos:5; //!< Position of length field in header (0--31) - uint16_t numLenBits:5; //!< Number of bits in length field (0--16) - } hdrConf; - struct { - uint16_t addrType:1; //!< \brief 0: Address after header
- //!< 1: Address in header - uint16_t addrSize:5; //!< \brief If addrType = 0: Address size in bytes
- //!< If addrType = 1: Address size in bits - uint16_t addrPos:5; //!< \brief If addrType = 1: Bit position of address in header
- //!< If addrType = 0: Non-zero to extend address with sync word identifier - uint16_t numAddr:5; //!< Number of addresses in address list - } addrConf; - int8_t lenOffset; //!< Signed value to add to length field - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - uint8_t* pAddr; //!< Pointer to address list - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x3804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bCrcIncSw: 1; //!< \brief 0: Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord0; //!< Sync word to listen for + uint32_t syncWord1; //!< Alternative sync word if non-zero + uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + struct + { + uint16_t numHdrBits: 6; //!< Number of bits in header (0--32) + uint16_t lenPos: 5; //!< Position of length field in header (0--31) + uint16_t numLenBits: 5; //!< Number of bits in length field (0--16) + } hdrConf; + struct + { + uint16_t addrType: 1; //!< \brief 0: Address after header
+ //!< 1: Address in header + uint16_t addrSize: 5; //!< \brief If addrType = 0: Address size in bytes
+ //!< If addrType = 1: Address size in bits + uint16_t addrPos: 5; //!< \brief If addrType = 1: Bit position of address in header
+ //!< If addrType = 0: Non-zero to extend address with sync word identifier + uint16_t numAddr: 5; //!< Number of addresses in address list + } addrConf; + int8_t lenOffset; //!< Signed value to add to length field + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + uint8_t* pAddr; //!< Pointer to address list + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -386,66 +414,73 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s { //! @{ #define CMD_PROP_CS 0x3805 //! Carrier Sense Command -struct __RFC_STRUCT rfc_CMD_PROP_CS_s { - uint16_t commandNo; //!< The command ID number 0x3805 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOffIdle:1; //!< \brief 0: Keep synth running if command ends with channel Idle
- //!< 1: Turn off synth if command ends with channel Idle - uint8_t bFsOffBusy:1; //!< \brief 0: Keep synth running if command ends with channel Busy
- //!< 1: Turn off synth if command ends with channel Busy - } csFsConf; - uint8_t __dummy0; - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_CMD_PROP_CS_s +{ + uint16_t commandNo; //!< The command ID number 0x3805 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOffIdle: 1; //!< \brief 0: Keep synth running if command ends with channel Idle
+ //!< 1: Turn off synth if command ends with channel Idle + uint8_t bFsOffBusy: 1; //!< \brief 0: Keep synth running if command ends with channel Busy
+ //!< 1: Turn off synth if command ends with channel Busy + } csFsConf; + uint8_t __dummy0; + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -454,101 +489,109 @@ struct __RFC_STRUCT rfc_CMD_PROP_CS_s { //! @{ #define CMD_PROP_RADIO_SETUP 0x3806 //! Proprietary Mode Radio Setup Command for 2.4 GHz -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x3806 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< 2: OOK
- //!< Others: Reserved - uint16_t deviation:11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) - uint16_t deviationStepSz:2; //!< \brief Deviation step size
- //!< 0: 250 Hz
- //!< 1: 1000 Hz
- //!< 2: 15.625 Hz
- //!< 3: 62.5 Hz - } modulation; - struct { - uint32_t preScale:8; //!< Prescaler value - uint32_t rateWord:21; //!< Rate word - uint32_t decimMode:3; //!< \brief 0: Use automatic PDIF decimation
- //!< 1: Force PDIF decimation to 0
- //!< 3: Force PDIF decimation to 1
- //!< 5: Force PDIF decimation to 2
- //!< Others: Reserved - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< 10: Manchester coded binary modulation
- //!< Others: Reserved - uint16_t :1; - uint16_t whitenMode:3; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved
- //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
- //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
- //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
- //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x3806 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< 2: OOK
+ //!< Others: Reserved + uint16_t deviation: 11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) + uint16_t deviationStepSz: 2; //!< \brief Deviation step size
+ //!< 0: 250 Hz
+ //!< 1: 1000 Hz
+ //!< 2: 15.625 Hz
+ //!< 3: 62.5 Hz + } modulation; + struct + { + uint32_t preScale: 8; //!< Prescaler value + uint32_t rateWord: 21; //!< Rate word + uint32_t decimMode: 3; //!< \brief 0: Use automatic PDIF decimation
+ //!< 1: Force PDIF decimation to 0
+ //!< 3: Force PDIF decimation to 1
+ //!< 5: Force PDIF decimation to 2
+ //!< Others: Reserved + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< 10: Manchester coded binary modulation
+ //!< Others: Reserved + uint16_t : 1; + uint16_t whitenMode: 3; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved
+ //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
+ //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
+ //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
+ //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. } __RFC_STRUCT_ATTR; //! @} @@ -557,109 +600,117 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s { //! @{ #define CMD_PROP_RADIO_DIV_SETUP 0x3807 //! Proprietary Mode Radio Setup Command for All Frequency Bands -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x3807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< 2: OOK
- //!< Others: Reserved - uint16_t deviation:11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) - uint16_t deviationStepSz:2; //!< \brief Deviation step size
- //!< 0: 250 Hz
- //!< 1: 1000 Hz
- //!< 2: 15.625 Hz
- //!< 3: 62.5 Hz - } modulation; - struct { - uint32_t preScale:8; //!< Prescaler value - uint32_t rateWord:21; //!< Rate word - uint32_t decimMode:3; //!< \brief 0: Use automatic PDIF decimation
- //!< 1: Force PDIF decimation to 0
- //!< 3: Force PDIF decimation to 1
- //!< 5: Force PDIF decimation to 2
- //!< Others: Reserved - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< 10: Manchester coded binary modulation
- //!< Others: Reserved - uint16_t :1; - uint16_t whitenMode:3; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved
- //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
- //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
- //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
- //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. - uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters. - //!< For a single channel RF system, this should be set equal to the RF frequency used. - //!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal - //!< to the center frequency of the frequency band used. - int16_t intFreq; //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same - //!< intermediate frequency if supported, otherwise 0.
- //!< 0x8000: Use default. - uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 0, 2, 4, 5, 6, 10, 12, 15, and 30 +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x3807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< 2: OOK
+ //!< Others: Reserved + uint16_t deviation: 11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) + uint16_t deviationStepSz: 2; //!< \brief Deviation step size
+ //!< 0: 250 Hz
+ //!< 1: 1000 Hz
+ //!< 2: 15.625 Hz
+ //!< 3: 62.5 Hz + } modulation; + struct + { + uint32_t preScale: 8; //!< Prescaler value + uint32_t rateWord: 21; //!< Rate word + uint32_t decimMode: 3; //!< \brief 0: Use automatic PDIF decimation
+ //!< 1: Force PDIF decimation to 0
+ //!< 3: Force PDIF decimation to 1
+ //!< 5: Force PDIF decimation to 2
+ //!< Others: Reserved + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< 10: Manchester coded binary modulation
+ //!< Others: Reserved + uint16_t : 1; + uint16_t whitenMode: 3; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved
+ //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
+ //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
+ //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
+ //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. + uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters. + //!< For a single channel RF system, this should be set equal to the RF frequency used. + //!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal + //!< to the center frequency of the frequency band used. + int16_t intFreq; //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same + //!< intermediate frequency if supported, otherwise 0.
+ //!< 0x8000: Use default. + uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 0, 2, 4, 5, 6, 10, 12, 15, and 30 } __RFC_STRUCT_ATTR; //! @} @@ -668,104 +719,113 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s { //! @{ #define CMD_PROP_RX_SNIFF 0x3808 //! Proprietary Mode Receive Command with Sniff Mode -struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s { - uint16_t commandNo; //!< The command ID number 0x3808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bChkAddress:1; //!< \brief 0: No address check
- //!< 1: Check address - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord; //!< Sync word to listen for - uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - uint8_t address0; //!< Address - uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept - //!< 0x00 as well) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s +{ + uint16_t commandNo; //!< The command ID number 0x3808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bChkAddress: 1; //!< \brief 0: No address check
+ //!< 1: Check address + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord; //!< Sync word to listen for + uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + uint8_t address0; //!< Address + uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept + //!< 0x00 as well) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -774,118 +834,129 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s { //! @{ #define CMD_PROP_RX_ADV_SNIFF 0x3809 //! Proprietary Mode Advanced Receive Command with Sniff Mode -struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s { - uint16_t commandNo; //!< The command ID number 0x3809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bCrcIncSw:1; //!< \brief 0: Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord0; //!< Sync word to listen for - uint32_t syncWord1; //!< Alternative sync word if non-zero - uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - struct { - uint16_t numHdrBits:6; //!< Number of bits in header (0--32) - uint16_t lenPos:5; //!< Position of length field in header (0--31) - uint16_t numLenBits:5; //!< Number of bits in length field (0--16) - } hdrConf; - struct { - uint16_t addrType:1; //!< \brief 0: Address after header
- //!< 1: Address in header - uint16_t addrSize:5; //!< \brief If addrType = 0: Address size in bytes
- //!< If addrType = 1: Address size in bits - uint16_t addrPos:5; //!< \brief If addrType = 1: Bit position of address in header
- //!< If addrType = 0: Non-zero to extend address with sync word identifier - uint16_t numAddr:5; //!< Number of addresses in address list - } addrConf; - int8_t lenOffset; //!< Signed value to add to length field - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - uint8_t* pAddr; //!< Pointer to address list - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure - struct { - uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion - uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion - uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
- //!< 1: Busy if both RSSI and correlation indicates Busy - uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy
- //!< 1: End carrier sense on channel Busy
- //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle - uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle
- //!< 1: End on channel Idle - uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
- //!< 1: Timeout with channel state Invalid treated as Idle - } csConf; - int8_t rssiThr; //!< RSSI threshold - uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is - //!< declared Idle - uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is - //!< declared Busy - uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods - struct { - uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Idle to Invalid - uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT - //!< ticks between them needed to go from Invalid to Busy - } corrConfig; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } csEndTrigger; //!< Trigger classifier for ending the carrier sense - ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation +struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s +{ + uint16_t commandNo; //!< The command ID number 0x3809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bCrcIncSw: 1; //!< \brief 0: Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord0; //!< Sync word to listen for + uint32_t syncWord1; //!< Alternative sync word if non-zero + uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + struct + { + uint16_t numHdrBits: 6; //!< Number of bits in header (0--32) + uint16_t lenPos: 5; //!< Position of length field in header (0--31) + uint16_t numLenBits: 5; //!< Number of bits in length field (0--16) + } hdrConf; + struct + { + uint16_t addrType: 1; //!< \brief 0: Address after header
+ //!< 1: Address in header + uint16_t addrSize: 5; //!< \brief If addrType = 0: Address size in bytes
+ //!< If addrType = 1: Address size in bits + uint16_t addrPos: 5; //!< \brief If addrType = 1: Bit position of address in header
+ //!< If addrType = 0: Non-zero to extend address with sync word identifier + uint16_t numAddr: 5; //!< Number of addresses in address list + } addrConf; + int8_t lenOffset; //!< Signed value to add to length field + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + uint8_t* pAddr; //!< Pointer to address list + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure + struct + { + uint8_t bEnaRssi: 1; //!< If 1, enable RSSI as a criterion + uint8_t bEnaCorr: 1; //!< If 1, enable correlation as a criterion + uint8_t operation: 1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy
+ //!< 1: Busy if both RSSI and correlation indicates Busy + uint8_t busyOp: 1; //!< \brief 0: Continue carrier sense on channel Busy
+ //!< 1: End carrier sense on channel Busy
+ //!< For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle + uint8_t idleOp: 1; //!< \brief 0: Continue on channel Idle
+ //!< 1: End on channel Idle + uint8_t timeoutRes: 1; //!< \brief 0: Timeout with channel state Invalid treated as Busy
+ //!< 1: Timeout with channel state Invalid treated as Idle + } csConf; + int8_t rssiThr; //!< RSSI threshold + uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is + //!< declared Idle + uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is + //!< declared Busy + uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods + struct + { + uint8_t numCorrInv: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Idle to Invalid + uint8_t numCorrBusy: 4; //!< \brief Number of subsequent correlation tops with maximum corrPeriod RAT + //!< ticks between them needed to go from Invalid to Busy + } corrConfig; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } csEndTrigger; //!< Trigger classifier for ending the carrier sense + ratmr_t csEndTime; //!< Time used together with csEndTrigger for ending the operation } __RFC_STRUCT_ATTR; //! @} @@ -893,105 +964,113 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s { //! \addtogroup CMD_PROP_RADIO_SETUP_PA //! @{ //! Proprietary Mode Radio Setup Command for 2.4 GHz with PA Switching Fields -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_PA_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< 2: OOK
- //!< Others: Reserved - uint16_t deviation:11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) - uint16_t deviationStepSz:2; //!< \brief Deviation step size
- //!< 0: 250 Hz
- //!< 1: 1000 Hz
- //!< 2: 15.625 Hz
- //!< 3: 62.5 Hz - } modulation; - struct { - uint32_t preScale:8; //!< Prescaler value - uint32_t rateWord:21; //!< Rate word - uint32_t decimMode:3; //!< \brief 0: Use automatic PDIF decimation
- //!< 1: Force PDIF decimation to 0
- //!< 3: Force PDIF decimation to 1
- //!< 5: Force PDIF decimation to 2
- //!< Others: Reserved - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< 10: Manchester coded binary modulation
- //!< Others: Reserved - uint16_t :1; - uint16_t whitenMode:3; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved
- //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
- //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
- //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
- //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. - uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< standard PA. Used by RF driver only, not radio CPU. - uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< 20-dBm PA. Used by RF driver only, not radio CPU. +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_PA_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< 2: OOK
+ //!< Others: Reserved + uint16_t deviation: 11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) + uint16_t deviationStepSz: 2; //!< \brief Deviation step size
+ //!< 0: 250 Hz
+ //!< 1: 1000 Hz
+ //!< 2: 15.625 Hz
+ //!< 3: 62.5 Hz + } modulation; + struct + { + uint32_t preScale: 8; //!< Prescaler value + uint32_t rateWord: 21; //!< Rate word + uint32_t decimMode: 3; //!< \brief 0: Use automatic PDIF decimation
+ //!< 1: Force PDIF decimation to 0
+ //!< 3: Force PDIF decimation to 1
+ //!< 5: Force PDIF decimation to 2
+ //!< Others: Reserved + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< 10: Manchester coded binary modulation
+ //!< Others: Reserved + uint16_t : 1; + uint16_t whitenMode: 3; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved
+ //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
+ //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
+ //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
+ //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. + uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< standard PA. Used by RF driver only, not radio CPU. + uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< 20-dBm PA. Used by RF driver only, not radio CPU. } __RFC_STRUCT_ATTR; //! @} @@ -999,115 +1078,123 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_PA_s { //! \addtogroup CMD_PROP_RADIO_DIV_SETUP_PA //! @{ //! Proprietary Mode Radio Setup Command for All Frequency Bands with PA Switching Fields -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_PA_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< 2: OOK
- //!< Others: Reserved - uint16_t deviation:11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) - uint16_t deviationStepSz:2; //!< \brief Deviation step size
- //!< 0: 250 Hz
- //!< 1: 1000 Hz
- //!< 2: 15.625 Hz
- //!< 3: 62.5 Hz - } modulation; - struct { - uint32_t preScale:8; //!< Prescaler value - uint32_t rateWord:21; //!< Rate word - uint32_t decimMode:3; //!< \brief 0: Use automatic PDIF decimation
- //!< 1: Force PDIF decimation to 0
- //!< 3: Force PDIF decimation to 1
- //!< 5: Force PDIF decimation to 2
- //!< Others: Reserved - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< 10: Manchester coded binary modulation
- //!< Others: Reserved - uint16_t :1; - uint16_t whitenMode:3; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved
- //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
- //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
- //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
- //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< Transmit power - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. - uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters. - //!< For a single channel RF system, this should be set equal to the RF frequency used. - //!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal - //!< to the center frequency of the frequency band used. - int16_t intFreq; //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same - //!< intermediate frequency if supported, otherwise 0.
- //!< 0x8000: Use default. - uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 0, 2, 4, 5, 6, 10, 12, 15, and 30 - uint8_t __dummy0; - uint16_t __dummy1; - uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< standard PA. Used by RF driver only, not radio CPU. - uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to - //!< 20-dBm PA. Used by RF driver only, not radio CPU. +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_PA_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< 2: OOK
+ //!< Others: Reserved + uint16_t deviation: 11; //!< Deviation (specified in number of steps, with step size given by deviationStepSz) + uint16_t deviationStepSz: 2; //!< \brief Deviation step size
+ //!< 0: 250 Hz
+ //!< 1: 1000 Hz
+ //!< 2: 15.625 Hz
+ //!< 3: 62.5 Hz + } modulation; + struct + { + uint32_t preScale: 8; //!< Prescaler value + uint32_t rateWord: 21; //!< Rate word + uint32_t decimMode: 3; //!< \brief 0: Use automatic PDIF decimation
+ //!< 1: Force PDIF decimation to 0
+ //!< 3: Force PDIF decimation to 1
+ //!< 5: Force PDIF decimation to 2
+ //!< Others: Reserved + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< 10: Manchester coded binary modulation
+ //!< Others: Reserved + uint16_t : 1; + uint16_t whitenMode: 3; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved
+ //!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC
+ //!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC
+ //!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC
+ //!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< Transmit power + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. + uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters. + //!< For a single channel RF system, this should be set equal to the RF frequency used. + //!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal + //!< to the center frequency of the frequency band used. + int16_t intFreq; //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same + //!< intermediate frequency if supported, otherwise 0.
+ //!< 0x8000: Use default. + uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 0, 2, 4, 5, 6, 10, 12, 15, and 30 + uint8_t __dummy0; + uint16_t __dummy1; + uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< standard PA. Used by RF driver only, not radio CPU. + uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to + //!< 20-dBm PA. Used by RF driver only, not radio CPU. } __RFC_STRUCT_ATTR; //! @} @@ -1116,9 +1203,10 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_PA_s { //! @{ #define CMD_PROP_SET_LEN 0x3401 //! Set Packet Length Command -struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s { - uint16_t commandNo; //!< The command ID number 0x3401 - uint16_t rxLen; //!< Payload length to use +struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s +{ + uint16_t commandNo; //!< The command ID number 0x3401 + uint16_t rxLen; //!< Payload length to use } __RFC_STRUCT_ATTR; //! @} @@ -1127,8 +1215,9 @@ struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s { //! @{ #define CMD_PROP_RESTART_RX 0x3402 //! Restart Packet Command -struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s { - uint16_t commandNo; //!< The command ID number 0x3402 +struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3402 } __RFC_STRUCT_ATTR; //! @} @@ -1137,14 +1226,15 @@ struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s { //! @{ //! Output structure for RX operations -struct __RFC_STRUCT rfc_propRxOutput_s { - uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored - uint16_t nRxNok; //!< Number of packets that have been received with CRC error - uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch - uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1 - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - ratmr_t timeStamp; //!< Time stamp of last received packet +struct __RFC_STRUCT rfc_propRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored + uint16_t nRxNok; //!< Number of packets that have been received with CRC error + uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch + uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1 + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + ratmr_t timeStamp; //!< Time stamp of last received packet } __RFC_STRUCT_ATTR; //! @} @@ -1153,15 +1243,17 @@ struct __RFC_STRUCT rfc_propRxOutput_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_propRxStatus_s { - struct { - uint8_t addressInd:5; //!< Index of address found (0 if not applicable) - uint8_t syncWordId:1; //!< 0 for primary sync word, 1 for alternate sync word - uint8_t result:2; //!< \brief 0: Packet received correctly, not ignored
- //!< 1: Packet received with CRC error
- //!< 2: Packet received correctly, but can be ignored
- //!< 3: Packet reception was aborted - } status; +struct __RFC_STRUCT rfc_propRxStatus_s +{ + struct + { + uint8_t addressInd: 5; //!< Index of address found (0 if not applicable) + uint8_t syncWordId: 1; //!< 0 for primary sync word, 1 for alternate sync word + uint8_t result: 2; //!< \brief 0: Packet received correctly, not ignored
+ //!< 1: Packet received with CRC error
+ //!< 2: Packet received correctly, but can be ignored
+ //!< 3: Packet reception was aborted + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rfc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rfc.h index 8f11ddfb..66f21ab6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rfc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rfc.h @@ -71,19 +71,20 @@ extern "C" #include "rf_ble_cmd.h" // Definition of RFTRIM container -typedef struct { - uint32_t configIfAdc; - uint32_t configRfFrontend; - uint32_t configSynth; - uint32_t configMiscAdc; +typedef struct +{ + uint32_t configIfAdc; + uint32_t configRfFrontend; + uint32_t configSynth; + uint32_t configMiscAdc; } rfTrim_t; // Definition of maximum search depth used by the RFCOverrideUpdate function #define RFC_MAX_SEARCH_DEPTH 5 -#define RFC_PA_TYPE_ADDRESS 0x21000345 -#define RFC_PA_TYPE_MASK 0x04 -#define RFC_PA_GAIN_ADDRESS 0x2100034C -#define RFC_PA_GAIN_MASK 0x003FFFFF +#define RFC_PA_TYPE_ADDRESS 0x21000345 +#define RFC_PA_TYPE_MASK 0x04 +#define RFC_PA_GAIN_ADDRESS 0x2100034C +#define RFC_PA_GAIN_MASK 0x003FFFFF #define RFC_FE_MODE_ESCAPE_VALUE 0xFF #define RFC_FE_OVERRIDE_ADDRESS 0x0703 #define RFC_FE_OVERRIDE_MASK 0x0000FFFF @@ -102,14 +103,14 @@ typedef struct { // //***************************************************************************** #if !defined(DOXYGEN) - #define RFCCpeIntGetAndClear NOROM_RFCCpeIntGetAndClear - #define RFCDoorbellSendTo NOROM_RFCDoorbellSendTo - #define RFCSynthPowerDown NOROM_RFCSynthPowerDown - #define RFCCpePatchReset NOROM_RFCCpePatchReset - #define RFCOverrideSearch NOROM_RFCOverrideSearch - #define RFCOverrideUpdate NOROM_RFCOverrideUpdate - #define RFCHwIntGetAndClear NOROM_RFCHwIntGetAndClear - #define RFCAnaDivTxOverride NOROM_RFCAnaDivTxOverride +#define RFCCpeIntGetAndClear NOROM_RFCCpeIntGetAndClear +#define RFCDoorbellSendTo NOROM_RFCDoorbellSendTo +#define RFCSynthPowerDown NOROM_RFCSynthPowerDown +#define RFCCpePatchReset NOROM_RFCCpePatchReset +#define RFCOverrideSearch NOROM_RFCOverrideSearch +#define RFCOverrideUpdate NOROM_RFCOverrideUpdate +#define RFCHwIntGetAndClear NOROM_RFCHwIntGetAndClear +#define RFCAnaDivTxOverride NOROM_RFCAnaDivTxOverride #endif //***************************************************************************** @@ -134,8 +135,8 @@ RFCClockEnable(void) { // Enable basic clocks to get the CPE run HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = RFC_PWR_PWMCLKEN_CPERAM - | RFC_PWR_PWMCLKEN_CPE - | RFC_PWR_PWMCLKEN_RFC; + | RFC_PWR_PWMCLKEN_CPE + | RFC_PWR_PWMCLKEN_RFC; } @@ -354,7 +355,7 @@ extern void RFCCpePatchReset(void); // Function to search an override list for the provided pattern within the search depth. // //***************************************************************************** -extern uint8_t RFCOverrideSearch(const uint32_t *pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth); +extern uint8_t RFCOverrideSearch(const uint32_t* pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth); //***************************************************************************** @@ -362,7 +363,7 @@ extern uint8_t RFCOverrideSearch(const uint32_t *pOverride, const uint32_t patte //! Function to update override list // //***************************************************************************** -extern uint8_t RFCOverrideUpdate(rfc_radioOp_t *pOpSetup, uint32_t *pParams); +extern uint8_t RFCOverrideUpdate(rfc_radioOp_t* pOpSetup, uint32_t* pParams); //***************************************************************************** @@ -411,39 +412,39 @@ extern uint32_t RFCAnaDivTxOverride(uint8_t loDivider, uint8_t frontEndMode); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_RFCCpeIntGetAndClear - #undef RFCCpeIntGetAndClear - #define RFCCpeIntGetAndClear ROM_RFCCpeIntGetAndClear - #endif - #ifdef ROM_RFCDoorbellSendTo - #undef RFCDoorbellSendTo - #define RFCDoorbellSendTo ROM_RFCDoorbellSendTo - #endif - #ifdef ROM_RFCSynthPowerDown - #undef RFCSynthPowerDown - #define RFCSynthPowerDown ROM_RFCSynthPowerDown - #endif - #ifdef ROM_RFCCpePatchReset - #undef RFCCpePatchReset - #define RFCCpePatchReset ROM_RFCCpePatchReset - #endif - #ifdef ROM_RFCOverrideSearch - #undef RFCOverrideSearch - #define RFCOverrideSearch ROM_RFCOverrideSearch - #endif - #ifdef ROM_RFCOverrideUpdate - #undef RFCOverrideUpdate - #define RFCOverrideUpdate ROM_RFCOverrideUpdate - #endif - #ifdef ROM_RFCHwIntGetAndClear - #undef RFCHwIntGetAndClear - #define RFCHwIntGetAndClear ROM_RFCHwIntGetAndClear - #endif - #ifdef ROM_RFCAnaDivTxOverride - #undef RFCAnaDivTxOverride - #define RFCAnaDivTxOverride ROM_RFCAnaDivTxOverride - #endif +#include "../driverlib/rom.h" +#ifdef ROM_RFCCpeIntGetAndClear +#undef RFCCpeIntGetAndClear +#define RFCCpeIntGetAndClear ROM_RFCCpeIntGetAndClear +#endif +#ifdef ROM_RFCDoorbellSendTo +#undef RFCDoorbellSendTo +#define RFCDoorbellSendTo ROM_RFCDoorbellSendTo +#endif +#ifdef ROM_RFCSynthPowerDown +#undef RFCSynthPowerDown +#define RFCSynthPowerDown ROM_RFCSynthPowerDown +#endif +#ifdef ROM_RFCCpePatchReset +#undef RFCCpePatchReset +#define RFCCpePatchReset ROM_RFCCpePatchReset +#endif +#ifdef ROM_RFCOverrideSearch +#undef RFCOverrideSearch +#define RFCOverrideSearch ROM_RFCOverrideSearch +#endif +#ifdef ROM_RFCOverrideUpdate +#undef RFCOverrideUpdate +#define RFCOverrideUpdate ROM_RFCOverrideUpdate +#endif +#ifdef ROM_RFCHwIntGetAndClear +#undef RFCHwIntGetAndClear +#define RFCHwIntGetAndClear ROM_RFCHwIntGetAndClear +#endif +#ifdef ROM_RFCAnaDivTxOverride +#undef RFCAnaDivTxOverride +#define RFCAnaDivTxOverride ROM_RFCAnaDivTxOverride +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom.h index 1a5b9b68..cd15c47f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom.h @@ -59,9 +59,9 @@ extern "C" #define ROM_HAPI_TABLE_ADDR 0x10000048 // ROM Hard-API function interface types -typedef uint32_t (* FPTR_CRC32_T) ( uint8_t* /* pui8Data */,\ - uint32_t /* ui32ByteCount */,\ - uint32_t /* ui32RepeatCount */); +typedef uint32_t (* FPTR_CRC32_T) ( uint8_t* /* pui8Data */, \ + uint32_t /* ui32ByteCount */, \ + uint32_t /* ui32RepeatCount */); typedef uint32_t (* FPTR_GETFLSIZE_T) ( void ); @@ -71,26 +71,26 @@ typedef uint32_t (* FPTR_RESERVED1_T) ( uint32_t ); typedef uint32_t (* FPTR_RESERVED2_T) ( void ); -typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t* ,\ - uint32_t ,\ - uint32_t ); +typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t*, \ + uint32_t, \ + uint32_t ); typedef void (* FPTR_RESETDEV_T) ( void ); -typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */,\ - uint16_t /* ui16WordCount */,\ - uint16_t /* ui16RepeatCount */); +typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */, \ + uint16_t /* ui16WordCount */, \ + uint16_t /* ui16RepeatCount */); -typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); typedef void (* FPTR_HFSOURCESAFESWITCH_T) ( void ); @@ -106,9 +106,9 @@ typedef void (* FPTR_ADCCOMPBIN_T) ( uint8_t /* ut8Signal typedef void (* FPTR_DACVREF_T) ( uint8_t /* ut8Signal */); -extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer, - uint32_t ui32Address, - uint32_t ui32Count); +extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t* pui8DataBuffer, + uint32_t ui32Address, + uint32_t ui32Count); extern uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address); @@ -277,769 +277,769 @@ typedef struct // AON_EVENT FUNCTIONS #define ROM_AONEventMcuWakeUpSet \ ((void (*)(uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[0]) + ROM_API_AON_EVENT_TABLE[0]) #define ROM_AONEventMcuWakeUpGet \ ((uint32_t (*)(uint32_t ui32MCUWUEvent)) \ - ROM_API_AON_EVENT_TABLE[1]) + ROM_API_AON_EVENT_TABLE[1]) #define ROM_AONEventMcuSet \ ((void (*)(uint32_t ui32MCUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[4]) + ROM_API_AON_EVENT_TABLE[4]) #define ROM_AONEventMcuGet \ ((uint32_t (*)(uint32_t ui32MCUEvent)) \ - ROM_API_AON_EVENT_TABLE[5]) + ROM_API_AON_EVENT_TABLE[5]) // AON_RTC FUNCTIONS #define ROM_AONRTCCurrent64BitValueGet \ ((uint64_t (*)(void)) \ - ROM_API_AON_RTC_TABLE[12]) + ROM_API_AON_RTC_TABLE[12]) // AUX_TDC FUNCTIONS #define ROM_AUXTDCConfigSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32StartCondition, uint32_t ui32StopCondition)) \ - ROM_API_AUX_TDC_TABLE[0]) + ROM_API_AUX_TDC_TABLE[0]) #define ROM_AUXTDCMeasurementDone \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_AUX_TDC_TABLE[1]) + ROM_API_AUX_TDC_TABLE[1]) // DDI FUNCTIONS #define ROM_DDI16BitWrite \ ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32WrData)) \ - ROM_API_DDI_TABLE[0]) + ROM_API_DDI_TABLE[0]) #define ROM_DDI16BitfieldWrite \ ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift, uint16_t ui32Data)) \ - ROM_API_DDI_TABLE[1]) + ROM_API_DDI_TABLE[1]) #define ROM_DDI16BitRead \ ((uint16_t (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask)) \ - ROM_API_DDI_TABLE[2]) + ROM_API_DDI_TABLE[2]) #define ROM_DDI16BitfieldRead \ ((uint16_t (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift)) \ - ROM_API_DDI_TABLE[3]) + ROM_API_DDI_TABLE[3]) #define ROM_DDI32RegWrite \ ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)) \ - ROM_API_DDI_TABLE[4]) + ROM_API_DDI_TABLE[4]) // FLASH FUNCTIONS #define ROM_FlashPowerModeSet \ ((void (*)(uint32_t ui32PowerMode, uint32_t ui32BankGracePeriod, uint32_t ui32PumpGracePeriod)) \ - ROM_API_FLASH_TABLE[0]) + ROM_API_FLASH_TABLE[0]) #define ROM_FlashPowerModeGet \ ((uint32_t (*)(void)) \ - ROM_API_FLASH_TABLE[1]) + ROM_API_FLASH_TABLE[1]) #define ROM_FlashProtectionSet \ ((void (*)(uint32_t ui32SectorAddress, uint32_t ui32ProtectMode)) \ - ROM_API_FLASH_TABLE[2]) + ROM_API_FLASH_TABLE[2]) #define ROM_FlashProtectionGet \ ((uint32_t (*)(uint32_t ui32SectorAddress)) \ - ROM_API_FLASH_TABLE[3]) + ROM_API_FLASH_TABLE[3]) #define ROM_FlashProtectionSave \ ((uint32_t (*)(uint32_t ui32SectorAddress)) \ - ROM_API_FLASH_TABLE[4]) + ROM_API_FLASH_TABLE[4]) #define ROM_FlashEfuseReadRow \ ((bool (*)(uint32_t *pui32EfuseData, uint32_t ui32RowAddress)) \ - ROM_API_FLASH_TABLE[8]) + ROM_API_FLASH_TABLE[8]) #define ROM_FlashDisableSectorsForWrite \ ((void (*)(void)) \ - ROM_API_FLASH_TABLE[9]) + ROM_API_FLASH_TABLE[9]) // I2C FUNCTIONS #define ROM_I2CMasterInitExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32I2CClk, bool bFast)) \ - ROM_API_I2C_TABLE[0]) + ROM_API_I2C_TABLE[0]) #define ROM_I2CMasterErr \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_I2C_TABLE[1]) + ROM_API_I2C_TABLE[1]) // INTERRUPT FUNCTIONS #define ROM_IntPriorityGroupingSet \ ((void (*)(uint32_t ui32Bits)) \ - ROM_API_INTERRUPT_TABLE[0]) + ROM_API_INTERRUPT_TABLE[0]) #define ROM_IntPriorityGroupingGet \ ((uint32_t (*)(void)) \ - ROM_API_INTERRUPT_TABLE[1]) + ROM_API_INTERRUPT_TABLE[1]) #define ROM_IntPrioritySet \ ((void (*)(uint32_t ui32Interrupt, uint8_t ui8Priority)) \ - ROM_API_INTERRUPT_TABLE[2]) + ROM_API_INTERRUPT_TABLE[2]) #define ROM_IntPriorityGet \ ((int32_t (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[3]) + ROM_API_INTERRUPT_TABLE[3]) #define ROM_IntEnable \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[4]) + ROM_API_INTERRUPT_TABLE[4]) #define ROM_IntDisable \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[5]) + ROM_API_INTERRUPT_TABLE[5]) #define ROM_IntPendSet \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[6]) + ROM_API_INTERRUPT_TABLE[6]) #define ROM_IntPendGet \ ((bool (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[7]) + ROM_API_INTERRUPT_TABLE[7]) #define ROM_IntPendClear \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[8]) + ROM_API_INTERRUPT_TABLE[8]) // IOC FUNCTIONS #define ROM_IOCPortConfigureSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId, uint32_t ui32IOConfig)) \ - ROM_API_IOC_TABLE[0]) + ROM_API_IOC_TABLE[0]) #define ROM_IOCPortConfigureGet \ ((uint32_t (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[1]) + ROM_API_IOC_TABLE[1]) #define ROM_IOCIOShutdownSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOShutdown)) \ - ROM_API_IOC_TABLE[2]) + ROM_API_IOC_TABLE[2]) #define ROM_IOCIOModeSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOMode)) \ - ROM_API_IOC_TABLE[4]) + ROM_API_IOC_TABLE[4]) #define ROM_IOCIOIntSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Int, uint32_t ui32EdgeDet)) \ - ROM_API_IOC_TABLE[5]) + ROM_API_IOC_TABLE[5]) #define ROM_IOCIOPortPullSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Pull)) \ - ROM_API_IOC_TABLE[6]) + ROM_API_IOC_TABLE[6]) #define ROM_IOCIOHystSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Hysteresis)) \ - ROM_API_IOC_TABLE[7]) + ROM_API_IOC_TABLE[7]) #define ROM_IOCIOInputSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Input)) \ - ROM_API_IOC_TABLE[8]) + ROM_API_IOC_TABLE[8]) #define ROM_IOCIOSlewCtrlSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32SlewEnable)) \ - ROM_API_IOC_TABLE[9]) + ROM_API_IOC_TABLE[9]) #define ROM_IOCIODrvStrengthSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOCurrent, uint32_t ui32DrvStrength)) \ - ROM_API_IOC_TABLE[10]) + ROM_API_IOC_TABLE[10]) #define ROM_IOCIOPortIdSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId)) \ - ROM_API_IOC_TABLE[11]) + ROM_API_IOC_TABLE[11]) #define ROM_IOCIntEnable \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[12]) + ROM_API_IOC_TABLE[12]) #define ROM_IOCIntDisable \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[13]) + ROM_API_IOC_TABLE[13]) #define ROM_IOCPinTypeGpioInput \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[14]) + ROM_API_IOC_TABLE[14]) #define ROM_IOCPinTypeGpioOutput \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[15]) + ROM_API_IOC_TABLE[15]) #define ROM_IOCPinTypeUart \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Cts, uint32_t ui32Rts)) \ - ROM_API_IOC_TABLE[16]) + ROM_API_IOC_TABLE[16]) #define ROM_IOCPinTypeSsiMaster \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[17]) + ROM_API_IOC_TABLE[17]) #define ROM_IOCPinTypeSsiSlave \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[18]) + ROM_API_IOC_TABLE[18]) #define ROM_IOCPinTypeI2c \ ((void (*)(uint32_t ui32Base, uint32_t ui32Data, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[19]) + ROM_API_IOC_TABLE[19]) #define ROM_IOCPinTypeAux \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[21]) + ROM_API_IOC_TABLE[21]) // PRCM FUNCTIONS #define ROM_PRCMInfClockConfigureSet \ ((void (*)(uint32_t ui32ClkDiv, uint32_t ui32PowerMode)) \ - ROM_API_PRCM_TABLE[0]) + ROM_API_PRCM_TABLE[0]) #define ROM_PRCMInfClockConfigureGet \ ((uint32_t (*)(uint32_t ui32PowerMode)) \ - ROM_API_PRCM_TABLE[1]) + ROM_API_PRCM_TABLE[1]) #define ROM_PRCMAudioClockConfigSet \ ((void (*)(uint32_t ui32ClkConfig, uint32_t ui32SampleRate)) \ - ROM_API_PRCM_TABLE[4]) + ROM_API_PRCM_TABLE[4]) #define ROM_PRCMPowerDomainOn \ ((void (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[5]) + ROM_API_PRCM_TABLE[5]) #define ROM_PRCMPowerDomainOff \ ((void (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[6]) + ROM_API_PRCM_TABLE[6]) #define ROM_PRCMPeripheralRunEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[7]) + ROM_API_PRCM_TABLE[7]) #define ROM_PRCMPeripheralRunDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[8]) + ROM_API_PRCM_TABLE[8]) #define ROM_PRCMPeripheralSleepEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[9]) + ROM_API_PRCM_TABLE[9]) #define ROM_PRCMPeripheralSleepDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[10]) + ROM_API_PRCM_TABLE[10]) #define ROM_PRCMPeripheralDeepSleepEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[11]) + ROM_API_PRCM_TABLE[11]) #define ROM_PRCMPeripheralDeepSleepDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[12]) + ROM_API_PRCM_TABLE[12]) #define ROM_PRCMPowerDomainStatus \ ((uint32_t (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[13]) + ROM_API_PRCM_TABLE[13]) #define ROM_PRCMDeepSleep \ ((void (*)(void)) \ - ROM_API_PRCM_TABLE[14]) + ROM_API_PRCM_TABLE[14]) #define ROM_PRCMAudioClockConfigSetOverride \ ((void (*)(uint32_t ui32ClkConfig, uint32_t ui32MstDiv, uint32_t ui32BitDiv, uint32_t ui32WordDiv)) \ - ROM_API_PRCM_TABLE[17]) + ROM_API_PRCM_TABLE[17]) // SMPH FUNCTIONS #define ROM_SMPHAcquire \ ((void (*)(uint32_t ui32Semaphore)) \ - ROM_API_SMPH_TABLE[0]) + ROM_API_SMPH_TABLE[0]) // SSI FUNCTIONS #define ROM_SSIConfigSetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32SSIClk, uint32_t ui32Protocol, uint32_t ui32Mode, uint32_t ui32BitRate, uint32_t ui32DataWidth)) \ - ROM_API_SSI_TABLE[0]) + ROM_API_SSI_TABLE[0]) #define ROM_SSIDataPut \ ((void (*)(uint32_t ui32Base, uint32_t ui32Data)) \ - ROM_API_SSI_TABLE[1]) + ROM_API_SSI_TABLE[1]) #define ROM_SSIDataPutNonBlocking \ ((int32_t (*)(uint32_t ui32Base, uint32_t ui32Data)) \ - ROM_API_SSI_TABLE[2]) + ROM_API_SSI_TABLE[2]) #define ROM_SSIDataGet \ ((void (*)(uint32_t ui32Base, uint32_t *pui32Data)) \ - ROM_API_SSI_TABLE[3]) + ROM_API_SSI_TABLE[3]) #define ROM_SSIDataGetNonBlocking \ ((int32_t (*)(uint32_t ui32Base, uint32_t *pui32Data)) \ - ROM_API_SSI_TABLE[4]) + ROM_API_SSI_TABLE[4]) // TIMER FUNCTIONS #define ROM_TimerConfigure \ ((void (*)(uint32_t ui32Base, uint32_t ui32Config)) \ - ROM_API_TIMER_TABLE[0]) + ROM_API_TIMER_TABLE[0]) #define ROM_TimerLevelControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bInvert)) \ - ROM_API_TIMER_TABLE[1]) + ROM_API_TIMER_TABLE[1]) #define ROM_TimerStallControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bStall)) \ - ROM_API_TIMER_TABLE[3]) + ROM_API_TIMER_TABLE[3]) #define ROM_TimerWaitOnTriggerControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bWait)) \ - ROM_API_TIMER_TABLE[4]) + ROM_API_TIMER_TABLE[4]) #define ROM_TimerIntervalLoadMode \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Mode)) \ - ROM_API_TIMER_TABLE[5]) + ROM_API_TIMER_TABLE[5]) #define ROM_TimerMatchUpdateMode \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Mode)) \ - ROM_API_TIMER_TABLE[6]) + ROM_API_TIMER_TABLE[6]) // TRNG FUNCTIONS #define ROM_TRNGConfigure \ ((void (*)(uint32_t ui32MinSamplesPerCycle, uint32_t ui32MaxSamplesPerCycle, uint32_t ui32ClocksPerSample)) \ - ROM_API_TRNG_TABLE[0]) + ROM_API_TRNG_TABLE[0]) #define ROM_TRNGNumberGet \ ((uint32_t (*)(uint32_t ui32Word)) \ - ROM_API_TRNG_TABLE[1]) + ROM_API_TRNG_TABLE[1]) // UART FUNCTIONS #define ROM_UARTFIFOLevelGet \ ((void (*)(uint32_t ui32Base, uint32_t *pui32TxLevel, uint32_t *pui32RxLevel)) \ - ROM_API_UART_TABLE[0]) + ROM_API_UART_TABLE[0]) #define ROM_UARTConfigSetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t ui32Baud, uint32_t ui32Config)) \ - ROM_API_UART_TABLE[1]) + ROM_API_UART_TABLE[1]) #define ROM_UARTConfigGetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t *pui32Baud, uint32_t *pui32Config)) \ - ROM_API_UART_TABLE[2]) + ROM_API_UART_TABLE[2]) #define ROM_UARTDisable \ ((void (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[3]) + ROM_API_UART_TABLE[3]) #define ROM_UARTCharGetNonBlocking \ ((int32_t (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[4]) + ROM_API_UART_TABLE[4]) #define ROM_UARTCharGet \ ((int32_t (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[5]) + ROM_API_UART_TABLE[5]) #define ROM_UARTCharPutNonBlocking \ ((bool (*)(uint32_t ui32Base, uint8_t ui8Data)) \ - ROM_API_UART_TABLE[6]) + ROM_API_UART_TABLE[6]) #define ROM_UARTCharPut \ ((void (*)(uint32_t ui32Base, uint8_t ui8Data)) \ - ROM_API_UART_TABLE[7]) + ROM_API_UART_TABLE[7]) // UDMA FUNCTIONS #define ROM_uDMAChannelAttributeEnable \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \ - ROM_API_UDMA_TABLE[0]) + ROM_API_UDMA_TABLE[0]) #define ROM_uDMAChannelAttributeDisable \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \ - ROM_API_UDMA_TABLE[1]) + ROM_API_UDMA_TABLE[1]) #define ROM_uDMAChannelAttributeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelNum)) \ - ROM_API_UDMA_TABLE[2]) + ROM_API_UDMA_TABLE[2]) #define ROM_uDMAChannelControlSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, uint32_t ui32Control)) \ - ROM_API_UDMA_TABLE[3]) + ROM_API_UDMA_TABLE[3]) #define ROM_uDMAChannelTransferSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, uint32_t ui32Mode, void *pvSrcAddr, void *pvDstAddr, uint32_t ui32TransferSize)) \ - ROM_API_UDMA_TABLE[4]) + ROM_API_UDMA_TABLE[4]) #define ROM_uDMAChannelScatterGatherSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, void *pvTaskList, uint32_t ui32IsPeriphSG)) \ - ROM_API_UDMA_TABLE[5]) + ROM_API_UDMA_TABLE[5]) #define ROM_uDMAChannelSizeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \ - ROM_API_UDMA_TABLE[6]) + ROM_API_UDMA_TABLE[6]) #define ROM_uDMAChannelModeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \ - ROM_API_UDMA_TABLE[7]) + ROM_API_UDMA_TABLE[7]) // VIMS FUNCTIONS #define ROM_VIMSConfigure \ ((void (*)(uint32_t ui32Base, bool bRoundRobin, bool bPrefetch)) \ - ROM_API_VIMS_TABLE[0]) + ROM_API_VIMS_TABLE[0]) #define ROM_VIMSModeSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32Mode)) \ - ROM_API_VIMS_TABLE[1]) + ROM_API_VIMS_TABLE[1]) #define ROM_VIMSModeGet \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_VIMS_TABLE[2]) + ROM_API_VIMS_TABLE[2]) #define ROM_VIMSModeSafeSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32NewMode, bool blocking)) \ - ROM_API_VIMS_TABLE[3]) + ROM_API_VIMS_TABLE[3]) // OSC FUNCTIONS #define ROM_OSCClockSourceGet \ ((uint32_t (*)(uint32_t ui32SrcClk)) \ - ROM_API_OSC_TABLE[0]) + ROM_API_OSC_TABLE[0]) #define ROM_OSCClockSourceSet \ ((void (*)(uint32_t ui32SrcClk, uint32_t ui32Osc)) \ - ROM_API_OSC_TABLE[1]) + ROM_API_OSC_TABLE[1]) #define ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert \ ((int16_t (*)(int32_t HPOSC_RelFreqOffset)) \ - ROM_API_OSC_TABLE[3]) + ROM_API_OSC_TABLE[3]) // AUX_ADC FUNCTIONS #define ROM_AUXADCAdjustValueForGainAndOffset \ ((int32_t (*)(int32_t adcValue, int32_t gain, int32_t offset)) \ - ROM_API_AUX_ADC_TABLE[0]) + ROM_API_AUX_ADC_TABLE[0]) #define ROM_AUXADCDisable \ ((void (*)(void)) \ - ROM_API_AUX_ADC_TABLE[1]) + ROM_API_AUX_ADC_TABLE[1]) #define ROM_AUXADCDisableInputScaling \ ((void (*)(void)) \ - ROM_API_AUX_ADC_TABLE[2]) + ROM_API_AUX_ADC_TABLE[2]) #define ROM_AUXADCEnableAsync \ ((void (*)(uint32_t refSource, uint32_t trigger)) \ - ROM_API_AUX_ADC_TABLE[3]) + ROM_API_AUX_ADC_TABLE[3]) #define ROM_AUXADCEnableSync \ ((void (*)(uint32_t refSource, uint32_t sampleTime, uint32_t trigger)) \ - ROM_API_AUX_ADC_TABLE[4]) + ROM_API_AUX_ADC_TABLE[4]) #define ROM_AUXADCFlushFifo \ ((void (*)(void)) \ - ROM_API_AUX_ADC_TABLE[5]) + ROM_API_AUX_ADC_TABLE[5]) #define ROM_AUXADCGetAdjustmentGain \ ((int32_t (*)(uint32_t refSource)) \ - ROM_API_AUX_ADC_TABLE[6]) + ROM_API_AUX_ADC_TABLE[6]) #define ROM_AUXADCGetAdjustmentOffset \ ((int32_t (*)(uint32_t refSource)) \ - ROM_API_AUX_ADC_TABLE[7]) + ROM_API_AUX_ADC_TABLE[7]) #define ROM_AUXADCMicrovoltsToValue \ ((int32_t (*)(int32_t fixedRefVoltage, int32_t microvolts)) \ - ROM_API_AUX_ADC_TABLE[8]) + ROM_API_AUX_ADC_TABLE[8]) #define ROM_AUXADCPopFifo \ ((uint32_t (*)(void)) \ - ROM_API_AUX_ADC_TABLE[9]) + ROM_API_AUX_ADC_TABLE[9]) #define ROM_AUXADCReadFifo \ ((uint32_t (*)(void)) \ - ROM_API_AUX_ADC_TABLE[10]) + ROM_API_AUX_ADC_TABLE[10]) #define ROM_AUXADCUnadjustValueForGainAndOffset \ ((int32_t (*)(int32_t adcValue, int32_t gain, int32_t offset)) \ - ROM_API_AUX_ADC_TABLE[11]) + ROM_API_AUX_ADC_TABLE[11]) #define ROM_AUXADCValueToMicrovolts \ ((int32_t (*)(int32_t fixedRefVoltage, int32_t adcValue)) \ - ROM_API_AUX_ADC_TABLE[12]) + ROM_API_AUX_ADC_TABLE[12]) // SYS_CTRL FUNCTIONS #define ROM_SysCtrlResetSourceGet \ ((uint32_t (*)(void)) \ - ROM_API_SYS_CTRL_TABLE[0]) + ROM_API_SYS_CTRL_TABLE[0]) #define ROM_SysCtrl_DCDC_VoltageConditionalControl \ ((void (*)(void)) \ - ROM_API_SYS_CTRL_TABLE[1]) + ROM_API_SYS_CTRL_TABLE[1]) // AON_BATMON FUNCTIONS #define ROM_AONBatMonTemperatureGetDegC \ ((int32_t (*)(void)) \ - ROM_API_AON_BATMON_TABLE[0]) + ROM_API_AON_BATMON_TABLE[0]) // SETUP_ROM FUNCTIONS #define ROM_SetupAfterColdResetWakeupFromShutDownCfg1 \ ((void (*)(uint32_t ccfg_ModeConfReg)) \ - ROM_API_SETUP_ROM_TABLE[0]) + ROM_API_SETUP_ROM_TABLE[0]) #define ROM_SetupAfterColdResetWakeupFromShutDownCfg2 \ ((void (*)(uint32_t ui32Fcfg1Revision, uint32_t ccfg_ModeConfReg)) \ - ROM_API_SETUP_ROM_TABLE[1]) + ROM_API_SETUP_ROM_TABLE[1]) #define ROM_SetupAfterColdResetWakeupFromShutDownCfg3 \ ((void (*)(uint32_t ccfg_ModeConfReg)) \ - ROM_API_SETUP_ROM_TABLE[2]) + ROM_API_SETUP_ROM_TABLE[2]) #define ROM_SetupGetTrimForAdcShModeEn \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[3]) + ROM_API_SETUP_ROM_TABLE[3]) #define ROM_SetupGetTrimForAdcShVbufEn \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[4]) + ROM_API_SETUP_ROM_TABLE[4]) #define ROM_SetupGetTrimForAmpcompCtrl \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[5]) + ROM_API_SETUP_ROM_TABLE[5]) #define ROM_SetupGetTrimForAmpcompTh1 \ ((uint32_t (*)(void)) \ - ROM_API_SETUP_ROM_TABLE[6]) + ROM_API_SETUP_ROM_TABLE[6]) #define ROM_SetupGetTrimForAmpcompTh2 \ ((uint32_t (*)(void)) \ - ROM_API_SETUP_ROM_TABLE[7]) + ROM_API_SETUP_ROM_TABLE[7]) #define ROM_SetupGetTrimForAnabypassValue1 \ ((uint32_t (*)(uint32_t ccfg_ModeConfReg)) \ - ROM_API_SETUP_ROM_TABLE[8]) + ROM_API_SETUP_ROM_TABLE[8]) #define ROM_SetupGetTrimForDblrLoopFilterResetVoltage \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[9]) + ROM_API_SETUP_ROM_TABLE[9]) #define ROM_SetupGetTrimForRadcExtCfg \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[10]) + ROM_API_SETUP_ROM_TABLE[10]) #define ROM_SetupGetTrimForRcOscLfIBiasTrim \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[11]) + ROM_API_SETUP_ROM_TABLE[11]) #define ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim \ ((uint32_t (*)(void)) \ - ROM_API_SETUP_ROM_TABLE[12]) + ROM_API_SETUP_ROM_TABLE[12]) #define ROM_SetupGetTrimForXoscHfCtl \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[13]) + ROM_API_SETUP_ROM_TABLE[13]) #define ROM_SetupGetTrimForXoscHfFastStart \ ((uint32_t (*)(void)) \ - ROM_API_SETUP_ROM_TABLE[14]) + ROM_API_SETUP_ROM_TABLE[14]) #define ROM_SetupGetTrimForXoscHfIbiastherm \ ((uint32_t (*)(void)) \ - ROM_API_SETUP_ROM_TABLE[15]) + ROM_API_SETUP_ROM_TABLE[15]) #define ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio \ ((uint32_t (*)(uint32_t ui32Fcfg1Revision)) \ - ROM_API_SETUP_ROM_TABLE[16]) + ROM_API_SETUP_ROM_TABLE[16]) #define ROM_SetupSetAonRtcSubSecInc \ ((void (*)(uint32_t subSecInc)) \ - ROM_API_SETUP_ROM_TABLE[17]) + ROM_API_SETUP_ROM_TABLE[17]) #define ROM_SetupSetCacheModeAccordingToCcfgSetting \ ((void (*)(void)) \ - ROM_API_SETUP_ROM_TABLE[18]) + ROM_API_SETUP_ROM_TABLE[18]) #define ROM_SetupStepVddrTrimTo \ ((void (*)(uint32_t toCode)) \ - ROM_API_SETUP_ROM_TABLE[19]) + ROM_API_SETUP_ROM_TABLE[19]) // I2S FUNCTIONS #define ROM_I2SPointerSet \ ((void (*)(uint32_t ui32Base, bool bInput, void * pNextPointer)) \ - ROM_API_I2S_TABLE[0]) + ROM_API_I2S_TABLE[0]) #define ROM_I2SSampleStampGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32Channel)) \ - ROM_API_I2S_TABLE[1]) + ROM_API_I2S_TABLE[1]) // PWR_CTRL FUNCTIONS #define ROM_PowerCtrlSourceSet \ ((void (*)(uint32_t ui32PowerConfig)) \ - ROM_API_PWR_CTRL_TABLE[0]) + ROM_API_PWR_CTRL_TABLE[0]) // AES FUNCTIONS #define ROM_AESConfigureCCMCtrl \ ((void (*)(uint32_t nonceLength, uint32_t macLength, bool encrypt)) \ - ROM_API_AES_TABLE[0]) + ROM_API_AES_TABLE[0]) #define ROM_AESReadFromKeyStore \ ((uint32_t (*)(uint32_t keyStoreArea)) \ - ROM_API_AES_TABLE[1]) + ROM_API_AES_TABLE[1]) #define ROM_AESReadTag \ ((uint32_t (*)(uint8_t *tag, uint32_t tagLength)) \ - ROM_API_AES_TABLE[2]) + ROM_API_AES_TABLE[2]) #define ROM_AESSetInitializationVector \ ((void (*)(const uint32_t *initializationVector)) \ - ROM_API_AES_TABLE[3]) + ROM_API_AES_TABLE[3]) #define ROM_AESStartDMAOperation \ ((void (*)(const uint8_t *channel0Addr, uint32_t channel0Length, uint8_t *channel1Addr, uint32_t channel1Length)) \ - ROM_API_AES_TABLE[4]) + ROM_API_AES_TABLE[4]) #define ROM_AESVerifyTag \ ((uint32_t (*)(const uint8_t *tag, uint32_t tagLength)) \ - ROM_API_AES_TABLE[5]) + ROM_API_AES_TABLE[5]) #define ROM_AESWaitForIRQFlags \ ((uint32_t (*)(uint32_t irqFlags)) \ - ROM_API_AES_TABLE[6]) + ROM_API_AES_TABLE[6]) #define ROM_AESWriteCCMInitializationVector \ ((void (*)(const uint8_t *nonce, uint32_t nonceLength)) \ - ROM_API_AES_TABLE[7]) + ROM_API_AES_TABLE[7]) #define ROM_AESWriteToKeyStore \ ((uint32_t (*)(const uint8_t *aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea)) \ - ROM_API_AES_TABLE[8]) + ROM_API_AES_TABLE[8]) // PKA FUNCTIONS #define ROM_PKABigNumAddGetResult \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t *resultLength, uint32_t resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[0]) + ROM_API_PKA_TABLE[0]) #define ROM_PKABigNumCmpGetResult \ ((uint32_t (*)(void)) \ - ROM_API_PKA_TABLE[1]) + ROM_API_PKA_TABLE[1]) #define ROM_PKABigNumInvModGetResult \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t length, uint32_t resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[2]) + ROM_API_PKA_TABLE[2]) #define ROM_PKABigNumModGetResult \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t length, uint32_t resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[3]) + ROM_API_PKA_TABLE[3]) #define ROM_PKABigNumMultGetResult \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t *resultLength, uint32_t resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[4]) + ROM_API_PKA_TABLE[4]) #define ROM_PKAEccAddGetResult \ ((uint32_t (*)(uint8_t *curvePointX, uint8_t *curvePointY, uint32_t resultPKAMemAddr, uint32_t length)) \ - ROM_API_PKA_TABLE[5]) + ROM_API_PKA_TABLE[5]) #define ROM_PKAEccAddStart \ ((uint32_t (*)(const uint8_t *curvePoint1X, const uint8_t *curvePoint1Y, const uint8_t *curvePoint2X, const uint8_t *curvePoint2Y, const uint8_t *prime, const uint8_t *a, uint32_t length, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[6]) + ROM_API_PKA_TABLE[6]) #define ROM_PKAEccMultiplyGetResult \ ((uint32_t (*)(uint8_t *curvePointX, uint8_t *curvePointY, uint32_t resultPKAMemAddr, uint32_t length)) \ - ROM_API_PKA_TABLE[7]) + ROM_API_PKA_TABLE[7]) #define ROM_PKAEccMultiplyStart \ ((uint32_t (*)(const uint8_t *scalar, const uint8_t *curvePointX, const uint8_t *curvePointY, const uint8_t *prime, const uint8_t *a, const uint8_t *b, uint32_t length, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[8]) + ROM_API_PKA_TABLE[8]) #define ROM_PKAGetOpsStatus \ ((uint32_t (*)(void)) \ - ROM_API_PKA_TABLE[9]) + ROM_API_PKA_TABLE[9]) #define ROM_PKABigNumAddStart \ ((uint32_t (*)(const uint8_t *bigNum1, uint32_t bigNum1Length, const uint8_t *bigNum2, uint32_t bigNum2Length, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[10]) + ROM_API_PKA_TABLE[10]) #define ROM_PKABigNumCmpStart \ ((uint32_t (*)(const uint8_t *bigNum1, const uint8_t *bigNum2, uint32_t length)) \ - ROM_API_PKA_TABLE[11]) + ROM_API_PKA_TABLE[11]) #define ROM_PKABigNumInvModStart \ ((uint32_t (*)(const uint8_t *bigNum, uint32_t bigNumLength, const uint8_t *modulus, uint32_t modulusLength, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[12]) + ROM_API_PKA_TABLE[12]) #define ROM_PKABigNumModStart \ ((uint32_t (*)(const uint8_t *bigNum, uint32_t bigNumLength, const uint8_t *modulus, uint32_t modulusLength, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[13]) + ROM_API_PKA_TABLE[13]) #define ROM_PKABigNumMultiplyStart \ ((uint32_t (*)(const uint8_t *multiplicand, uint32_t multiplicandLength, const uint8_t *multiplier, uint32_t multiplierLength, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[14]) + ROM_API_PKA_TABLE[14]) #define ROM_PKABigNumSubGetResult \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t *resultLength, uint32_t resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[15]) + ROM_API_PKA_TABLE[15]) #define ROM_PKABigNumSubStart \ ((uint32_t (*)(const uint8_t *minuend, uint32_t minuendLength, const uint8_t *subtrahend, uint32_t subtrahendLength, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[16]) + ROM_API_PKA_TABLE[16]) #define ROM_PKAArrayAllZeros \ ((bool (*)(const uint8_t *array, uint32_t arrayLength)) \ - ROM_API_PKA_TABLE[17]) + ROM_API_PKA_TABLE[17]) #define ROM_PKABigNumDivideGetQuotient \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t *length, uint32_t resultQuotientMemAddr)) \ - ROM_API_PKA_TABLE[18]) + ROM_API_PKA_TABLE[18]) #define ROM_PKABigNumDivideGetRemainder \ ((uint32_t (*)(uint8_t *resultBuf, uint32_t *length, uint32_t resultRemainderMemAddr)) \ - ROM_API_PKA_TABLE[19]) + ROM_API_PKA_TABLE[19]) #define ROM_PKABigNumDivideStart \ ((uint32_t (*)(const uint8_t *dividend, uint32_t dividendLength, const uint8_t *divisor, uint32_t divisorLength, uint32_t *resultQuotientMemAddr, uint32_t *resultRemainderMemAddr)) \ - ROM_API_PKA_TABLE[20]) + ROM_API_PKA_TABLE[20]) #define ROM_PKAEccVerifyPublicKeyWeierstrassStart \ ((uint32_t (*)(const uint8_t *curvePointX, const uint8_t *curvePointY, const uint8_t *prime, const uint8_t *a, const uint8_t *b, const uint8_t *order, uint32_t length)) \ - ROM_API_PKA_TABLE[21]) + ROM_API_PKA_TABLE[21]) #define ROM_PKAZeroOutArray \ ((void (*)(const uint8_t *array, uint32_t arrayLength)) \ - ROM_API_PKA_TABLE[22]) + ROM_API_PKA_TABLE[22]) #define ROM_PKAEccMontgomeryMultiplyStart \ ((uint32_t (*)(const uint8_t *scalar, const uint8_t *curvePointX, const uint8_t *prime, const uint8_t *a, uint32_t length, uint32_t *resultPKAMemAddr)) \ - ROM_API_PKA_TABLE[23]) + ROM_API_PKA_TABLE[23]) // SHA2 FUNCTIONS #define ROM_SHA2ComputeFinalHash \ ((uint32_t (*)(const uint8_t *message, uint8_t *resultDigest, uint32_t *intermediateDigest, uint32_t totalMsgLength, uint32_t messageLength, uint32_t hashAlgorithm)) \ - ROM_API_SHA2_TABLE[0]) + ROM_API_SHA2_TABLE[0]) #define ROM_SHA2ComputeHash \ ((uint32_t (*)(const uint8_t *message, uint8_t *resultDigest, uint32_t totalMsgLength, uint32_t hashAlgorithm)) \ - ROM_API_SHA2_TABLE[1]) + ROM_API_SHA2_TABLE[1]) #define ROM_SHA2ComputeInitialHash \ ((uint32_t (*)(const uint8_t *message, uint32_t *intermediateDigest, uint32_t hashAlgorithm, uint32_t initialMessageLength)) \ - ROM_API_SHA2_TABLE[2]) + ROM_API_SHA2_TABLE[2]) #define ROM_SHA2ComputeIntermediateHash \ ((uint32_t (*)(const uint8_t *message, uint32_t *intermediateDigest, uint32_t hashAlgorithm, uint32_t intermediateMessageLength)) \ - ROM_API_SHA2_TABLE[3]) + ROM_API_SHA2_TABLE[3]) #define ROM_SHA2StartDMAOperation \ ((void (*)(uint8_t *channel0Addr, uint32_t channel0Length, uint8_t *channel1Addr, uint32_t channel1Length)) \ - ROM_API_SHA2_TABLE[4]) + ROM_API_SHA2_TABLE[4]) #define ROM_SHA2WaitForIRQFlags \ ((uint32_t (*)(uint32_t irqFlags)) \ - ROM_API_SHA2_TABLE[5]) + ROM_API_SHA2_TABLE[5]) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom_crypto.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom_crypto.h index 49cd7a78..391db99c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom_crypto.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/rom_crypto.h @@ -126,24 +126,24 @@ extern "C" * \return None */ //***************************************************************************** - extern void ECC_initialize(uint32_t *pWorkzone); +extern void ECC_initialize(uint32_t* pWorkzone); //***************************************************************************** - /*! - * \brief Generate a key. - * - * This is used for both ECDH and ECDSA. - * - * \param randString Pointer to random string, input. - * \param privateKey Pointer to the private key, output. - * \param publicKey_x Pointer to public key X-coordinate, output. - * \param publicKey_y Pointer to public key Y-coordinate, output. - * - * \return Status - */ +/*! +* \brief Generate a key. +* +* This is used for both ECDH and ECDSA. +* +* \param randString Pointer to random string, input. +* \param privateKey Pointer to the private key, output. +* \param publicKey_x Pointer to public key X-coordinate, output. +* \param publicKey_y Pointer to public key Y-coordinate, output. +* +* \return Status +*/ //***************************************************************************** -extern uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey, - uint32_t *publicKey_x, uint32_t *publicKey_y); +extern uint8_t ECC_generateKey(uint32_t* randString, uint32_t* privateKey, + uint32_t* publicKey_x, uint32_t* publicKey_y); //***************************************************************************** /*! @@ -158,8 +158,8 @@ extern uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey, * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *randString, - uint32_t *sign1, uint32_t *sign2); +extern uint8_t ECC_ECDSA_sign(uint32_t* secretKey, uint32_t* text, uint32_t* randString, + uint32_t* sign1, uint32_t* sign2); //***************************************************************************** /*! @@ -174,8 +174,8 @@ extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *ran * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y, - uint32_t *text, uint32_t *sign1, uint32_t *sign2); +extern uint8_t ECC_ECDSA_verify(uint32_t* publicKey_x, uint32_t* publicKey_y, + uint32_t* text, uint32_t* sign1, uint32_t* sign2); //***************************************************************************** /*! @@ -190,11 +190,11 @@ extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y, * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t *privateKey, - uint32_t *publicKey_x, - uint32_t *publicKey_y, - uint32_t *sharedSecret_x, - uint32_t *sharedSecret_y); +extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t* privateKey, + uint32_t* publicKey_x, + uint32_t* publicKey_y, + uint32_t* sharedSecret_x, + uint32_t* sharedSecret_y); #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup.h index 496b17a6..923bc710 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup.h @@ -78,7 +78,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SetupTrimDevice NOROM_SetupTrimDevice +#define SetupTrimDevice NOROM_SetupTrimDevice #endif //***************************************************************************** @@ -114,11 +114,11 @@ extern void SetupTrimDevice( void ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SetupTrimDevice - #undef SetupTrimDevice - #define SetupTrimDevice ROM_SetupTrimDevice - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SetupTrimDevice +#undef SetupTrimDevice +#define SetupTrimDevice ROM_SetupTrimDevice +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup_rom.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup_rom.h index 2dd25cd7..cea180c6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup_rom.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/setup_rom.h @@ -78,26 +78,26 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn - #define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn - #define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl - #define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1 - #define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2 - #define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1 - #define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage - #define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg - #define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim - #define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl - #define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart - #define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm - #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting - #define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc - #define SetupStepVddrTrimTo NOROM_SetupStepVddrTrimTo +#define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn +#define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn +#define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl +#define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1 +#define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2 +#define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1 +#define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage +#define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg +#define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim +#define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl +#define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart +#define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm +#define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting +#define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc +#define SetupStepVddrTrimTo NOROM_SetupStepVddrTrimTo #endif //***************************************************************************** @@ -319,9 +319,12 @@ SetupSignExtendVddrTrimValue( uint32_t ui32VddrTrimVal ) // The VDDR trim value is 5 bits representing the range from -10 to +21 // (where -10=0x16, -1=0x1F, 0=0x00, 1=0x01 and +21=0x15) int32_t i32SignedVddrVal = ui32VddrTrimVal; - if ( i32SignedVddrVal > 0x15 ) { + + if ( i32SignedVddrVal > 0x15 ) + { i32SignedVddrVal -= 0x20; } + return ( i32SignedVddrVal ); } @@ -366,87 +369,87 @@ extern void SetupStepVddrTrimTo( uint32_t toCode ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #undef SetupAfterColdResetWakeupFromShutDownCfg1 - #define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #endif - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #undef SetupAfterColdResetWakeupFromShutDownCfg2 - #define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #endif - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #undef SetupAfterColdResetWakeupFromShutDownCfg3 - #define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #endif - #ifdef ROM_SetupGetTrimForAdcShModeEn - #undef SetupGetTrimForAdcShModeEn - #define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn - #endif - #ifdef ROM_SetupGetTrimForAdcShVbufEn - #undef SetupGetTrimForAdcShVbufEn - #define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn - #endif - #ifdef ROM_SetupGetTrimForAmpcompCtrl - #undef SetupGetTrimForAmpcompCtrl - #define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl - #endif - #ifdef ROM_SetupGetTrimForAmpcompTh1 - #undef SetupGetTrimForAmpcompTh1 - #define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1 - #endif - #ifdef ROM_SetupGetTrimForAmpcompTh2 - #undef SetupGetTrimForAmpcompTh2 - #define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2 - #endif - #ifdef ROM_SetupGetTrimForAnabypassValue1 - #undef SetupGetTrimForAnabypassValue1 - #define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1 - #endif - #ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage - #undef SetupGetTrimForDblrLoopFilterResetVoltage - #define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage - #endif - #ifdef ROM_SetupGetTrimForRadcExtCfg - #undef SetupGetTrimForRadcExtCfg - #define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg - #endif - #ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim - #undef SetupGetTrimForRcOscLfIBiasTrim - #define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim - #endif - #ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #undef SetupGetTrimForRcOscLfRtuneCtuneTrim - #define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #endif - #ifdef ROM_SetupGetTrimForXoscHfCtl - #undef SetupGetTrimForXoscHfCtl - #define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl - #endif - #ifdef ROM_SetupGetTrimForXoscHfFastStart - #undef SetupGetTrimForXoscHfFastStart - #define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart - #endif - #ifdef ROM_SetupGetTrimForXoscHfIbiastherm - #undef SetupGetTrimForXoscHfIbiastherm - #define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm - #endif - #ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #endif - #ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting - #undef SetupSetCacheModeAccordingToCcfgSetting - #define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting - #endif - #ifdef ROM_SetupSetAonRtcSubSecInc - #undef SetupSetAonRtcSubSecInc - #define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc - #endif - #ifdef ROM_SetupStepVddrTrimTo - #undef SetupStepVddrTrimTo - #define SetupStepVddrTrimTo ROM_SetupStepVddrTrimTo - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#undef SetupAfterColdResetWakeupFromShutDownCfg1 +#define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#endif +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#undef SetupAfterColdResetWakeupFromShutDownCfg2 +#define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#endif +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#undef SetupAfterColdResetWakeupFromShutDownCfg3 +#define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#endif +#ifdef ROM_SetupGetTrimForAdcShModeEn +#undef SetupGetTrimForAdcShModeEn +#define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn +#endif +#ifdef ROM_SetupGetTrimForAdcShVbufEn +#undef SetupGetTrimForAdcShVbufEn +#define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn +#endif +#ifdef ROM_SetupGetTrimForAmpcompCtrl +#undef SetupGetTrimForAmpcompCtrl +#define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl +#endif +#ifdef ROM_SetupGetTrimForAmpcompTh1 +#undef SetupGetTrimForAmpcompTh1 +#define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1 +#endif +#ifdef ROM_SetupGetTrimForAmpcompTh2 +#undef SetupGetTrimForAmpcompTh2 +#define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2 +#endif +#ifdef ROM_SetupGetTrimForAnabypassValue1 +#undef SetupGetTrimForAnabypassValue1 +#define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1 +#endif +#ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage +#undef SetupGetTrimForDblrLoopFilterResetVoltage +#define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage +#endif +#ifdef ROM_SetupGetTrimForRadcExtCfg +#undef SetupGetTrimForRadcExtCfg +#define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg +#endif +#ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim +#undef SetupGetTrimForRcOscLfIBiasTrim +#define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim +#endif +#ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#undef SetupGetTrimForRcOscLfRtuneCtuneTrim +#define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#endif +#ifdef ROM_SetupGetTrimForXoscHfCtl +#undef SetupGetTrimForXoscHfCtl +#define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl +#endif +#ifdef ROM_SetupGetTrimForXoscHfFastStart +#undef SetupGetTrimForXoscHfFastStart +#define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart +#endif +#ifdef ROM_SetupGetTrimForXoscHfIbiastherm +#undef SetupGetTrimForXoscHfIbiastherm +#define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm +#endif +#ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#endif +#ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting +#undef SetupSetCacheModeAccordingToCcfgSetting +#define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting +#endif +#ifdef ROM_SetupSetAonRtcSubSecInc +#undef SetupSetAonRtcSubSecInc +#define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc +#endif +#ifdef ROM_SetupStepVddrTrimTo +#undef SetupStepVddrTrimTo +#define SetupStepVddrTrimTo ROM_SetupStepVddrTrimTo +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2.h index 7fe3cfba..885c08e6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2.h @@ -85,12 +85,12 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SHA2StartDMAOperation NOROM_SHA2StartDMAOperation - #define SHA2WaitForIRQFlags NOROM_SHA2WaitForIRQFlags - #define SHA2ComputeInitialHash NOROM_SHA2ComputeInitialHash - #define SHA2ComputeIntermediateHash NOROM_SHA2ComputeIntermediateHash - #define SHA2ComputeFinalHash NOROM_SHA2ComputeFinalHash - #define SHA2ComputeHash NOROM_SHA2ComputeHash +#define SHA2StartDMAOperation NOROM_SHA2StartDMAOperation +#define SHA2WaitForIRQFlags NOROM_SHA2WaitForIRQFlags +#define SHA2ComputeInitialHash NOROM_SHA2ComputeInitialHash +#define SHA2ComputeIntermediateHash NOROM_SHA2ComputeIntermediateHash +#define SHA2ComputeFinalHash NOROM_SHA2ComputeFinalHash +#define SHA2ComputeHash NOROM_SHA2ComputeHash #endif //***************************************************************************** @@ -186,7 +186,7 @@ extern "C" //! \return None // //***************************************************************************** -extern void SHA2StartDMAOperation(uint8_t *channel0Addr, uint32_t channel0Length, uint8_t *channel1Addr, uint32_t channel1Length); +extern void SHA2StartDMAOperation(uint8_t* channel0Addr, uint32_t channel0Length, uint8_t* channel1Addr, uint32_t channel1Length); //***************************************************************************** // @@ -274,7 +274,7 @@ extern uint32_t SHA2WaitForIRQFlags(uint32_t irqFlags); //! \sa SHA2ComputeFinalHash() // //***************************************************************************** -extern uint32_t SHA2ComputeInitialHash(const uint8_t *message, uint32_t *intermediateDigest, uint32_t hashAlgorithm, uint32_t initialMessageLength); +extern uint32_t SHA2ComputeInitialHash(const uint8_t* message, uint32_t* intermediateDigest, uint32_t hashAlgorithm, uint32_t initialMessageLength); //***************************************************************************** // @@ -334,7 +334,7 @@ extern uint32_t SHA2ComputeInitialHash(const uint8_t *message, uint32_t *interme //! \sa SHA2ComputeFinalHash() // //***************************************************************************** -extern uint32_t SHA2ComputeIntermediateHash(const uint8_t *message, uint32_t *intermediateDigest, uint32_t hashAlgorithm, uint32_t intermediateMessageLength); +extern uint32_t SHA2ComputeIntermediateHash(const uint8_t* message, uint32_t* intermediateDigest, uint32_t hashAlgorithm, uint32_t intermediateMessageLength); //***************************************************************************** // @@ -393,7 +393,7 @@ extern uint32_t SHA2ComputeIntermediateHash(const uint8_t *message, uint32_t *in //! \sa SHA2ComputeIntermediateHash() // //***************************************************************************** -extern uint32_t SHA2ComputeFinalHash(const uint8_t *message, uint8_t *resultDigest, uint32_t *intermediateDigest, uint32_t totalMsgLength, uint32_t messageLength, uint32_t hashAlgorithm); +extern uint32_t SHA2ComputeFinalHash(const uint8_t* message, uint8_t* resultDigest, uint32_t* intermediateDigest, uint32_t totalMsgLength, uint32_t messageLength, uint32_t hashAlgorithm); //***************************************************************************** // @@ -433,7 +433,7 @@ extern uint32_t SHA2ComputeFinalHash(const uint8_t *message, uint8_t *resultDige //! // //***************************************************************************** -extern uint32_t SHA2ComputeHash(const uint8_t *message, uint8_t *resultDigest, uint32_t totalMsgLength, uint32_t hashAlgorithm); +extern uint32_t SHA2ComputeHash(const uint8_t* message, uint8_t* resultDigest, uint32_t totalMsgLength, uint32_t hashAlgorithm); //***************************************************************************** // @@ -503,7 +503,7 @@ __STATIC_INLINE void SHA2SetMessageLength(uint32_t length) //! // //***************************************************************************** -__STATIC_INLINE void SHA2SetDigest(uint32_t *digest, uint8_t digestLength) +__STATIC_INLINE void SHA2SetDigest(uint32_t* digest, uint8_t digestLength) { // Check the arguments. ASSERT(!(digest == NULL) && !((uint32_t)digest & 0x03)); @@ -514,7 +514,9 @@ __STATIC_INLINE void SHA2SetDigest(uint32_t *digest, uint8_t digestLength) // Write digest uint32_t i = 0; - for (i = 0; i < (digestLength / sizeof(uint32_t)); i++) { + + for (i = 0; i < (digestLength / sizeof(uint32_t)); i++) + { HWREG(CRYPTO_BASE + CRYPTO_O_HASHDIGESTA + (i * sizeof(uint32_t))) = digest[i]; } @@ -538,7 +540,7 @@ __STATIC_INLINE void SHA2SetDigest(uint32_t *digest, uint8_t digestLength) //! - \ref SHA2_SUCCESS // //***************************************************************************** -__STATIC_INLINE uint32_t SHA2GetDigest(uint32_t *digest, uint8_t digestLength) +__STATIC_INLINE uint32_t SHA2GetDigest(uint32_t* digest, uint8_t digestLength) { // Check the arguments. ASSERT(!(digest == NULL) && !((uint32_t)digest & 0x03)); @@ -547,15 +549,20 @@ __STATIC_INLINE uint32_t SHA2GetDigest(uint32_t *digest, uint8_t digestLength) (digestLength == SHA2_SHA384_DIGEST_LENGTH_BYTES) || (digestLength == SHA2_SHA512_DIGEST_LENGTH_BYTES)); - if (HWREG(CRYPTO_BASE + CRYPTO_O_HASHIOBUFCTRL) & CRYPTO_HASHIOBUFCTRL_OUTPUT_FULL_M) { + if (HWREG(CRYPTO_BASE + CRYPTO_O_HASHIOBUFCTRL) & CRYPTO_HASHIOBUFCTRL_OUTPUT_FULL_M) + { return SHA2_OLD_DIGEST_NOT_READ; } - else { - // Read digest + else + { + // Read digest uint32_t i = 0; - for (i = 0; i < (digestLength / sizeof(uint32_t)); i++) { + + for (i = 0; i < (digestLength / sizeof(uint32_t)); i++) + { digest[i] = HWREG(CRYPTO_BASE + CRYPTO_O_HASHDIGESTA + (i * sizeof(uint32_t))); } + return SHA2_SUCCESS; } } @@ -640,7 +647,7 @@ __STATIC_INLINE uint32_t SHA2IntStatusMasked(void) // Return the masked interrupt status mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -660,7 +667,7 @@ __STATIC_INLINE uint32_t SHA2IntStatusMasked(void) __STATIC_INLINE uint32_t SHA2IntStatusRaw(void) { // Return either the raw interrupt status - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -755,31 +762,31 @@ __STATIC_INLINE void SHA2IntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SHA2StartDMAOperation - #undef SHA2StartDMAOperation - #define SHA2StartDMAOperation ROM_SHA2StartDMAOperation - #endif - #ifdef ROM_SHA2WaitForIRQFlags - #undef SHA2WaitForIRQFlags - #define SHA2WaitForIRQFlags ROM_SHA2WaitForIRQFlags - #endif - #ifdef ROM_SHA2ComputeInitialHash - #undef SHA2ComputeInitialHash - #define SHA2ComputeInitialHash ROM_SHA2ComputeInitialHash - #endif - #ifdef ROM_SHA2ComputeIntermediateHash - #undef SHA2ComputeIntermediateHash - #define SHA2ComputeIntermediateHash ROM_SHA2ComputeIntermediateHash - #endif - #ifdef ROM_SHA2ComputeFinalHash - #undef SHA2ComputeFinalHash - #define SHA2ComputeFinalHash ROM_SHA2ComputeFinalHash - #endif - #ifdef ROM_SHA2ComputeHash - #undef SHA2ComputeHash - #define SHA2ComputeHash ROM_SHA2ComputeHash - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SHA2StartDMAOperation +#undef SHA2StartDMAOperation +#define SHA2StartDMAOperation ROM_SHA2StartDMAOperation +#endif +#ifdef ROM_SHA2WaitForIRQFlags +#undef SHA2WaitForIRQFlags +#define SHA2WaitForIRQFlags ROM_SHA2WaitForIRQFlags +#endif +#ifdef ROM_SHA2ComputeInitialHash +#undef SHA2ComputeInitialHash +#define SHA2ComputeInitialHash ROM_SHA2ComputeInitialHash +#endif +#ifdef ROM_SHA2ComputeIntermediateHash +#undef SHA2ComputeIntermediateHash +#define SHA2ComputeIntermediateHash ROM_SHA2ComputeIntermediateHash +#endif +#ifdef ROM_SHA2ComputeFinalHash +#undef SHA2ComputeFinalHash +#define SHA2ComputeFinalHash ROM_SHA2ComputeFinalHash +#endif +#ifdef ROM_SHA2ComputeHash +#undef SHA2ComputeHash +#define SHA2ComputeHash ROM_SHA2ComputeHash +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2_doc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2_doc.h index d516cbe3..4207b4b7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2_doc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sha2_doc.h @@ -38,7 +38,7 @@ //! \section sec_sha2 Introduction //! //! The SHA-2 (Secure Hash Algorithm) API provides access to the SHA-2 -//! functionality of the crypto core. The AES accelerator and keystore are +//! functionality of the crypto core. The AES accelerator and keystore are //! also contained within the crypto core. Hence, only one of SHA-2 and AES //! may be used at the same time. //! This module offers hardware acceleration for the SHA-2 family of hash @@ -54,7 +54,7 @@ //! //! The crypto core does not have retention and all configuration settings //! are lost when going into standby or shutdown. If you wish to continue -//! a hash operation after going into standby or shutdown, you must load +//! a hash operation after going into standby or shutdown, you must load //! the intermediate hash into system RAM before entering standby or shutdown //! and load the intermediate hash back into the crypto module after resuming //! operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/smph.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/smph.h index 636979d1..e1bfc445 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/smph.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/smph.h @@ -80,7 +80,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SMPHAcquire NOROM_SMPHAcquire +#define SMPHAcquire NOROM_SMPHAcquire #endif //***************************************************************************** @@ -285,11 +285,11 @@ SMPHRelease(uint32_t ui32Semaphore) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SMPHAcquire - #undef SMPHAcquire - #define SMPHAcquire ROM_SMPHAcquire - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SMPHAcquire +#undef SMPHAcquire +#define SMPHAcquire ROM_SMPHAcquire +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ssi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ssi.h index 87a97454..74eaa08c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ssi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/ssi.h @@ -82,13 +82,13 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SSIConfigSetExpClk NOROM_SSIConfigSetExpClk - #define SSIDataPut NOROM_SSIDataPut - #define SSIDataPutNonBlocking NOROM_SSIDataPutNonBlocking - #define SSIDataGet NOROM_SSIDataGet - #define SSIDataGetNonBlocking NOROM_SSIDataGetNonBlocking - #define SSIIntRegister NOROM_SSIIntRegister - #define SSIIntUnregister NOROM_SSIIntUnregister +#define SSIConfigSetExpClk NOROM_SSIConfigSetExpClk +#define SSIDataPut NOROM_SSIDataPut +#define SSIDataPutNonBlocking NOROM_SSIDataPutNonBlocking +#define SSIDataGet NOROM_SSIDataGet +#define SSIDataGetNonBlocking NOROM_SSIDataGetNonBlocking +#define SSIIntRegister NOROM_SSIIntRegister +#define SSIIntUnregister NOROM_SSIIntUnregister #endif //***************************************************************************** @@ -161,7 +161,7 @@ extern "C" static bool SSIBaseValid(uint32_t ui32Base) { - return(ui32Base == SSI0_BASE || ui32Base == SSI1_BASE); + return (ui32Base == SSI0_BASE || ui32Base == SSI1_BASE); } #endif @@ -331,7 +331,7 @@ extern int32_t SSIDataPutNonBlocking(uint32_t ui32Base, uint32_t ui32Data); //! \return None // //***************************************************************************** -extern void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data); +extern void SSIDataGet(uint32_t ui32Base, uint32_t* pui32Data); //***************************************************************************** // @@ -355,7 +355,7 @@ extern void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data); //! \return Returns the number of elements read from the SSI receive FIFO. // //***************************************************************************** -extern int32_t SSIDataGetNonBlocking(uint32_t ui32Base, uint32_t *pui32Data); +extern int32_t SSIDataGetNonBlocking(uint32_t ui32Base, uint32_t* pui32Data); //***************************************************************************** // @@ -380,7 +380,7 @@ SSIBusy(uint32_t ui32Base) ASSERT(SSIBaseValid(ui32Base)); // Determine if the SSI is busy. - return((HWREG(ui32Base + SSI_O_SR) & SSI_SR_BSY) ? true : false); + return ((HWREG(ui32Base + SSI_O_SR) & SSI_SR_BSY) ? true : false); } //***************************************************************************** @@ -577,13 +577,13 @@ SSIIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(ui32Base + SSI_O_MIS)); + return (HWREG(ui32Base + SSI_O_MIS)); } else { - return(HWREG(ui32Base + SSI_O_RIS)); + return (HWREG(ui32Base + SSI_O_RIS)); } } @@ -649,35 +649,35 @@ SSIDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SSIConfigSetExpClk - #undef SSIConfigSetExpClk - #define SSIConfigSetExpClk ROM_SSIConfigSetExpClk - #endif - #ifdef ROM_SSIDataPut - #undef SSIDataPut - #define SSIDataPut ROM_SSIDataPut - #endif - #ifdef ROM_SSIDataPutNonBlocking - #undef SSIDataPutNonBlocking - #define SSIDataPutNonBlocking ROM_SSIDataPutNonBlocking - #endif - #ifdef ROM_SSIDataGet - #undef SSIDataGet - #define SSIDataGet ROM_SSIDataGet - #endif - #ifdef ROM_SSIDataGetNonBlocking - #undef SSIDataGetNonBlocking - #define SSIDataGetNonBlocking ROM_SSIDataGetNonBlocking - #endif - #ifdef ROM_SSIIntRegister - #undef SSIIntRegister - #define SSIIntRegister ROM_SSIIntRegister - #endif - #ifdef ROM_SSIIntUnregister - #undef SSIIntUnregister - #define SSIIntUnregister ROM_SSIIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SSIConfigSetExpClk +#undef SSIConfigSetExpClk +#define SSIConfigSetExpClk ROM_SSIConfigSetExpClk +#endif +#ifdef ROM_SSIDataPut +#undef SSIDataPut +#define SSIDataPut ROM_SSIDataPut +#endif +#ifdef ROM_SSIDataPutNonBlocking +#undef SSIDataPutNonBlocking +#define SSIDataPutNonBlocking ROM_SSIDataPutNonBlocking +#endif +#ifdef ROM_SSIDataGet +#undef SSIDataGet +#define SSIDataGet ROM_SSIDataGet +#endif +#ifdef ROM_SSIDataGetNonBlocking +#undef SSIDataGetNonBlocking +#define SSIDataGetNonBlocking ROM_SSIDataGetNonBlocking +#endif +#ifdef ROM_SSIIntRegister +#undef SSIIntRegister +#define SSIIntRegister ROM_SSIIntRegister +#endif +#ifdef ROM_SSIIntUnregister +#undef SSIIntUnregister +#define SSIIntUnregister ROM_SSIIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-config.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-config.h index e8885f72..2b338bda 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-config.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-config.h @@ -18,45 +18,45 @@ * The LITTLE endian machines: */ #if ( ! defined(ECRYPT_LITTLE_ENDIAN)) -#if defined(__ultrix) /* Older MIPS */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__alpha) /* Alpha */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_M_IX86) /* x86 (MSC, Borland) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_MSC_VER) /* x86 (surely MSC) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ -#define ECRYPT_LITTLE_ENDIAN - -/* - * The BIG endian machines: - */ -#elif defined(sun) /* Newer Sparc's */ -#define ECRYPT_BIG_ENDIAN -#elif defined(__ppc__) /* PowerPC */ -#define ECRYPT_BIG_ENDIAN - -/* - * Finally machines with UNKNOWN endianness: - */ -#elif defined (_AIX) /* RS6000 */ -#define ECRYPT_UNKNOWN -#elif defined(__hpux) /* HP-PA */ -#define ECRYPT_UNKNOWN -#elif defined(__aux) /* 68K */ -#define ECRYPT_UNKNOWN -#elif defined(__dgux) /* 88K (but P6 in latest boxes) */ -#define ECRYPT_UNKNOWN -#elif defined(__sgi) /* Newer MIPS */ -#define ECRYPT_UNKNOWN -#else /* Any other processor */ -#define ECRYPT_UNKNOWN -#endif + #if defined(__ultrix) /* Older MIPS */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__alpha) /* Alpha */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(i386) /* x86 (gcc) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__i386) /* x86 (gcc) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(_M_IX86) /* x86 (MSC, Borland) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(_MSC_VER) /* x86 (surely MSC) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ + #define ECRYPT_LITTLE_ENDIAN + + /* + * The BIG endian machines: + */ + #elif defined(sun) /* Newer Sparc's */ + #define ECRYPT_BIG_ENDIAN + #elif defined(__ppc__) /* PowerPC */ + #define ECRYPT_BIG_ENDIAN + + /* + * Finally machines with UNKNOWN endianness: + */ + #elif defined (_AIX) /* RS6000 */ + #define ECRYPT_UNKNOWN + #elif defined(__hpux) /* HP-PA */ + #define ECRYPT_UNKNOWN + #elif defined(__aux) /* 68K */ + #define ECRYPT_UNKNOWN + #elif defined(__dgux) /* 88K (but P6 in latest boxes) */ + #define ECRYPT_UNKNOWN + #elif defined(__sgi) /* Newer MIPS */ + #define ECRYPT_UNKNOWN + #else /* Any other processor */ + #define ECRYPT_UNKNOWN + #endif #endif /* ------------------------------------------------------------------------- */ @@ -75,188 +75,188 @@ /* --- check char --- */ #if (UCHAR_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T char -#define U8C(v) (v##U) + #ifndef I8T + #define I8T char + #define U8C(v) (v##U) -#if (UCHAR_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (UCHAR_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (UCHAR_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T char -#define U16C(v) (v##U) -#endif + #if (UCHAR_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T char + #define U16C(v) (v##U) + #endif -#if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T char -#define U32C(v) (v##U) -#endif + #if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T char + #define U32C(v) (v##U) + #endif -#if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T char -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T char + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check short --- */ #if (USHRT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T short -#define U8C(v) (v##U) + #ifndef I8T + #define I8T short + #define U8C(v) (v##U) -#if (USHRT_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (USHRT_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (USHRT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T short -#define U16C(v) (v##U) -#endif + #if (USHRT_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T short + #define U16C(v) (v##U) + #endif -#if (USHRT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T short -#define U32C(v) (v##U) -#endif + #if (USHRT_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T short + #define U32C(v) (v##U) + #endif -#if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T short -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T short + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check int --- */ #if (UINT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T int -#define U8C(v) (v##U) + #ifndef I8T + #define I8T int + #define U8C(v) (v##U) -#if (ULONG_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULONG_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (UINT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T int -#define U16C(v) (v##U) -#endif + #if (UINT_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T int + #define U16C(v) (v##U) + #endif -#if (UINT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T int -#define U32C(v) (v##U) -#endif + #if (UINT_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T int + #define U32C(v) (v##U) + #endif -#if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T int -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T int + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check long --- */ #if (ULONG_MAX / 0xFUL > 0xFUL) -#ifndef I8T -#define I8T long -#define U8C(v) (v##UL) + #ifndef I8T + #define I8T long + #define U8C(v) (v##UL) -#if (ULONG_MAX == 0xFFUL) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULONG_MAX == 0xFFUL) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (ULONG_MAX / 0xFFUL > 0xFFUL) -#ifndef I16T -#define I16T long -#define U16C(v) (v##UL) -#endif + #if (ULONG_MAX / 0xFFUL > 0xFFUL) + #ifndef I16T + #define I16T long + #define U16C(v) (v##UL) + #endif -#if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) -#ifndef I32T -#define I32T long -#define U32C(v) (v##UL) -#endif + #if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) + #ifndef I32T + #define I32T long + #define U32C(v) (v##UL) + #endif -#if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) -#ifndef I64T -#define I64T long -#define U64C(v) (v##UL) -#define ECRYPT_NATIVE64 -#endif + #if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) + #ifndef I64T + #define I64T long + #define U64C(v) (v##UL) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check long long --- */ #ifdef ULLONG_MAX -#if (ULLONG_MAX / 0xFULL > 0xFULL) -#ifndef I8T -#define I8T long long -#define U8C(v) (v##ULL) + #if (ULLONG_MAX / 0xFULL > 0xFULL) + #ifndef I8T + #define I8T long long + #define U8C(v) (v##ULL) -#if (ULLONG_MAX == 0xFFULL) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULLONG_MAX == 0xFFULL) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (ULLONG_MAX / 0xFFULL > 0xFFULL) -#ifndef I16T -#define I16T long long -#define U16C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFULL > 0xFFULL) + #ifndef I16T + #define I16T long long + #define U16C(v) (v##ULL) + #endif -#if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) -#ifndef I32T -#define I32T long long -#define U32C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) + #ifndef I32T + #define I32T long long + #define U32C(v) (v##ULL) + #endif -#if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) -#ifndef I64T -#define I64T long long -#define U64C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) + #ifndef I64T + #define I64T long long + #define U64C(v) (v##ULL) + #endif -#endif -#endif -#endif -#endif + #endif + #endif + #endif + #endif #endif @@ -264,13 +264,13 @@ #ifdef _UI64_MAX -#if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) -#ifndef I64T -#define I64T __int64 -#define U64C(v) (v##ui64) -#endif + #if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) + #ifndef I64T + #define I64T __int64 + #define U64C(v) (v##ui64) + #endif -#endif + #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-machine.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-machine.h index 4d2a2e55..a3eba887 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-machine.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-machine.h @@ -16,23 +16,23 @@ #if (defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT)) -#define ECRYPT_MACHINE_ROT + #define ECRYPT_MACHINE_ROT -#if (defined(WIN32) && defined(_MSC_VER)) + #if (defined(WIN32) && defined(_MSC_VER)) -#undef ROTL32 -#undef ROTR32 -#undef ROTL64 -#undef ROTR64 + #undef ROTL32 + #undef ROTR32 + #undef ROTL64 + #undef ROTR64 -#include + #include -#define ROTL32(v, n) _lrotl(v, n) -#define ROTR32(v, n) _lrotr(v, n) -#define ROTL64(v, n) _rotl64(v, n) -#define ROTR64(v, n) _rotr64(v, n) + #define ROTL32(v, n) _lrotl(v, n) + #define ROTR32(v, n) _lrotr(v, n) + #define ROTL64(v, n) _rotl64(v, n) + #define ROTR64(v, n) _rotr64(v, n) -#endif + #endif #endif @@ -40,11 +40,11 @@ #if (defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP)) -#define ECRYPT_MACHINE_SWAP + #define ECRYPT_MACHINE_SWAP -/* - * If you want to overwrite the default swap macros, put it here. And so on. - */ + /* + * If you want to overwrite the default swap macros, put it here. And so on. + */ #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-portable.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-portable.h index 8ce940d9..600c7186 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-portable.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-portable.h @@ -46,23 +46,23 @@ */ #ifdef I8T -typedef signed I8T s8; -typedef unsigned I8T u8; + typedef signed I8T s8; + typedef unsigned I8T u8; #endif #ifdef I16T -typedef signed I16T s16; -typedef unsigned I16T u16; + typedef signed I16T s16; + typedef unsigned I16T u16; #endif #ifdef I32T -typedef signed I32T s32; -typedef unsigned I32T u32; + typedef signed I32T s32; + typedef unsigned I32T u32; #endif #ifdef I64T -typedef signed I64T s64; -typedef unsigned I64T u64; + typedef signed I64T s64; + typedef unsigned I64T u64; #endif /* @@ -84,16 +84,16 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_ROT #define ROTL8(v, n) \ - (U8V((v) << (n)) | ((v) >> (8 - (n)))) + (U8V((v) << (n)) | ((v) >> (8 - (n)))) #define ROTL16(v, n) \ - (U16V((v) << (n)) | ((v) >> (16 - (n)))) + (U16V((v) << (n)) | ((v) >> (16 - (n)))) #define ROTL32(v, n) \ - (U32V((v) << (n)) | ((v) >> (32 - (n)))) + (U32V((v) << (n)) | ((v) >> (32 - (n)))) #define ROTL64(v, n) \ - (U64V((v) << (n)) | ((v) >> (64 - (n)))) + (U64V((v) << (n)) | ((v) >> (64 - (n)))) #define ROTR8(v, n) ROTL8(v, 8 - (n)) #define ROTR16(v, n) ROTL16(v, 16 - (n)) @@ -111,21 +111,21 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_SWAP #define SWAP16(v) \ - ROTL16(v, 8) + ROTL16(v, 8) #define SWAP32(v) \ - ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ - (ROTL32(v, 24) & U32C(0xFF00FF00))) + ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ + (ROTL32(v, 24) & U32C(0xFF00FF00))) #ifdef ECRYPT_NATIVE64 #define SWAP64(v) \ - ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ - (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ - (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ - (ROTL64(v, 56) & U64C(0xFF000000FF000000))) + ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ + (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ + (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ + (ROTL64(v, 56) & U64C(0xFF000000FF000000))) #else #define SWAP64(v) \ - (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) + (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) #endif #include "sw_ecrypt-machine.h" @@ -133,23 +133,23 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_WTOW #ifdef ECRYPT_LITTLE_ENDIAN -#define U16TO16_LITTLE(v) (v) -#define U32TO32_LITTLE(v) (v) -#define U64TO64_LITTLE(v) (v) + #define U16TO16_LITTLE(v) (v) + #define U32TO32_LITTLE(v) (v) + #define U64TO64_LITTLE(v) (v) -#define U16TO16_BIG(v) SWAP16(v) -#define U32TO32_BIG(v) SWAP32(v) -#define U64TO64_BIG(v) SWAP64(v) + #define U16TO16_BIG(v) SWAP16(v) + #define U32TO32_BIG(v) SWAP32(v) + #define U64TO64_BIG(v) SWAP64(v) #endif #ifdef ECRYPT_BIG_ENDIAN -#define U16TO16_LITTLE(v) SWAP16(v) -#define U32TO32_LITTLE(v) SWAP32(v) -#define U64TO64_LITTLE(v) SWAP64(v) + #define U16TO16_LITTLE(v) SWAP16(v) + #define U32TO32_LITTLE(v) SWAP32(v) + #define U64TO64_LITTLE(v) SWAP64(v) -#define U16TO16_BIG(v) (v) -#define U32TO32_BIG(v) (v) -#define U64TO64_BIG(v) (v) + #define U16TO16_BIG(v) (v) + #define U32TO32_BIG(v) (v) + #define U64TO64_BIG(v) (v) #endif #include "sw_ecrypt-machine.h" @@ -182,121 +182,121 @@ typedef unsigned I64T u64; #else #define U8TO16_LITTLE(p) \ - (((u16)((p)[0]) ) | \ - ((u16)((p)[1]) << 8)) + (((u16)((p)[0]) ) | \ + ((u16)((p)[1]) << 8)) #define U8TO32_LITTLE(p) \ - (((u32)((p)[0]) ) | \ - ((u32)((p)[1]) << 8) | \ - ((u32)((p)[2]) << 16) | \ - ((u32)((p)[3]) << 24)) + (((u32)((p)[0]) ) | \ + ((u32)((p)[1]) << 8) | \ + ((u32)((p)[2]) << 16) | \ + ((u32)((p)[3]) << 24)) #ifdef ECRYPT_NATIVE64 #define U8TO64_LITTLE(p) \ - (((u64)((p)[0]) ) | \ - ((u64)((p)[1]) << 8) | \ - ((u64)((p)[2]) << 16) | \ - ((u64)((p)[3]) << 24) | \ - ((u64)((p)[4]) << 32) | \ - ((u64)((p)[5]) << 40) | \ - ((u64)((p)[6]) << 48) | \ - ((u64)((p)[7]) << 56)) + (((u64)((p)[0]) ) | \ + ((u64)((p)[1]) << 8) | \ + ((u64)((p)[2]) << 16) | \ + ((u64)((p)[3]) << 24) | \ + ((u64)((p)[4]) << 32) | \ + ((u64)((p)[5]) << 40) | \ + ((u64)((p)[6]) << 48) | \ + ((u64)((p)[7]) << 56)) #else #define U8TO64_LITTLE(p) \ - ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) + ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) #endif #define U8TO16_BIG(p) \ - (((u16)((p)[0]) << 8) | \ - ((u16)((p)[1]) )) + (((u16)((p)[0]) << 8) | \ + ((u16)((p)[1]) )) #define U8TO32_BIG(p) \ - (((u32)((p)[0]) << 24) | \ - ((u32)((p)[1]) << 16) | \ - ((u32)((p)[2]) << 8) | \ - ((u32)((p)[3]) )) + (((u32)((p)[0]) << 24) | \ + ((u32)((p)[1]) << 16) | \ + ((u32)((p)[2]) << 8) | \ + ((u32)((p)[3]) )) #ifdef ECRYPT_NATIVE64 #define U8TO64_BIG(p) \ - (((u64)((p)[0]) << 56) | \ - ((u64)((p)[1]) << 48) | \ - ((u64)((p)[2]) << 40) | \ - ((u64)((p)[3]) << 32) | \ - ((u64)((p)[4]) << 24) | \ - ((u64)((p)[5]) << 16) | \ - ((u64)((p)[6]) << 8) | \ - ((u64)((p)[7]) )) + (((u64)((p)[0]) << 56) | \ + ((u64)((p)[1]) << 48) | \ + ((u64)((p)[2]) << 40) | \ + ((u64)((p)[3]) << 32) | \ + ((u64)((p)[4]) << 24) | \ + ((u64)((p)[5]) << 16) | \ + ((u64)((p)[6]) << 8) | \ + ((u64)((p)[7]) )) #else #define U8TO64_BIG(p) \ - (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) + (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) #endif #define U16TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) #define U32TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - (p)[2] = U8V((v) >> 16); \ - (p)[3] = U8V((v) >> 24); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + } while (0) #ifdef ECRYPT_NATIVE64 #define U64TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - (p)[2] = U8V((v) >> 16); \ - (p)[3] = U8V((v) >> 24); \ - (p)[4] = U8V((v) >> 32); \ - (p)[5] = U8V((v) >> 40); \ - (p)[6] = U8V((v) >> 48); \ - (p)[7] = U8V((v) >> 56); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + (p)[4] = U8V((v) >> 32); \ + (p)[5] = U8V((v) >> 40); \ + (p)[6] = U8V((v) >> 48); \ + (p)[7] = U8V((v) >> 56); \ + } while (0) #else #define U64TO8_LITTLE(p, v) \ - do { \ - U32TO8_LITTLE((p), U32V((v) )); \ - U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ - } while (0) + do { \ + U32TO8_LITTLE((p), U32V((v) )); \ + U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ + } while (0) #endif #define U16TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) #define U32TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) >> 24); \ - (p)[1] = U8V((v) >> 16); \ - (p)[2] = U8V((v) >> 8); \ - (p)[3] = U8V((v) ); \ - } while (0) + do { \ + (p)[0] = U8V((v) >> 24); \ + (p)[1] = U8V((v) >> 16); \ + (p)[2] = U8V((v) >> 8); \ + (p)[3] = U8V((v) ); \ + } while (0) #ifdef ECRYPT_NATIVE64 #define U64TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) >> 56); \ - (p)[1] = U8V((v) >> 48); \ - (p)[2] = U8V((v) >> 40); \ - (p)[3] = U8V((v) >> 32); \ - (p)[4] = U8V((v) >> 24); \ - (p)[5] = U8V((v) >> 16); \ - (p)[6] = U8V((v) >> 8); \ - (p)[7] = U8V((v) ); \ - } while (0) + do { \ + (p)[0] = U8V((v) >> 56); \ + (p)[1] = U8V((v) >> 48); \ + (p)[2] = U8V((v) >> 40); \ + (p)[3] = U8V((v) >> 32); \ + (p)[4] = U8V((v) >> 24); \ + (p)[5] = U8V((v) >> 16); \ + (p)[6] = U8V((v) >> 8); \ + (p)[7] = U8V((v) ); \ + } while (0) #else #define U64TO8_BIG(p, v) \ - do { \ - U32TO8_BIG((p), U32V((v) >> 32)); \ - U32TO8_BIG((p) + 4, U32V((v) )); \ - } while (0) + do { \ + U32TO8_BIG((p), U32V((v) >> 32)); \ + U32TO8_BIG((p) + 4, U32V((v) )); \ + } while (0) #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-sync.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-sync.h index dddb384e..7d9a344c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-sync.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_ecrypt-sync.h @@ -59,12 +59,12 @@ typedef struct { - u32 input[16]; /* could be compressed */ - /* - * [edit] - * - * Put here all state variable needed during the encryption process. - */ + u32 input[16]; /* could be compressed */ + /* + * [edit] + * + * Put here all state variable needed during the encryption process. + */ } ECRYPT_ctx; /* ------------------------------------------------------------------------- */ @@ -84,10 +84,10 @@ void ECRYPT_init(void); * above. */ void ECRYPT_keysetup( - ECRYPT_ctx* ctx, - const u8* key, - u32 keysize, /* Key size in bits. */ - u32 ivsize); /* IV size in bits. */ + ECRYPT_ctx* ctx, + const u8* key, + u32 keysize, /* Key size in bits. */ + u32 ivsize); /* IV size in bits. */ /* * IV setup. After having called ECRYPT_keysetup(), the user is @@ -96,8 +96,8 @@ void ECRYPT_keysetup( * IV's. */ void ECRYPT_ivsetup( - ECRYPT_ctx* ctx, - const u8* iv); + ECRYPT_ctx* ctx, + const u8* iv); /* * Encryption/decryption of arbitrary length messages. @@ -138,16 +138,16 @@ void ECRYPT_ivsetup( */ void ECRYPT_encrypt_bytes( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 msglen); /* Message length in bytes. */ void ECRYPT_decrypt_bytes( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* Message length in bytes. */ /* ------------------------------------------------------------------------- */ @@ -165,9 +165,9 @@ void ECRYPT_decrypt_bytes( #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_bytes( - ECRYPT_ctx* ctx, - u8* keystream, - u32 length); /* Length of keystream in bytes. */ + ECRYPT_ctx* ctx, + u8* keystream, + u32 length); /* Length of keystream in bytes. */ #endif @@ -191,18 +191,18 @@ void ECRYPT_keystream_bytes( #define ECRYPT_USES_DEFAULT_ALL_IN_ONE /* [edit] */ void ECRYPT_encrypt_packet( - ECRYPT_ctx* ctx, - const u8* iv, - const u8* plaintext, - u8* ciphertext, - u32 msglen); + ECRYPT_ctx* ctx, + const u8* iv, + const u8* plaintext, + u8* ciphertext, + u32 msglen); void ECRYPT_decrypt_packet( - ECRYPT_ctx* ctx, - const u8* iv, - const u8* ciphertext, - u8* plaintext, - u32 msglen); + ECRYPT_ctx* ctx, + const u8* iv, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* * Encryption/decryption of blocks. @@ -219,41 +219,41 @@ void ECRYPT_decrypt_packet( #ifdef ECRYPT_USES_DEFAULT_BLOCK_MACROS #define ECRYPT_encrypt_blocks(ctx, plaintext, ciphertext, blocks) \ - ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ + (blocks) * ECRYPT_BLOCKLENGTH) #define ECRYPT_decrypt_blocks(ctx, ciphertext, plaintext, blocks) \ - ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ + (blocks) * ECRYPT_BLOCKLENGTH) #ifdef ECRYPT_GENERATES_KEYSTREAM #define ECRYPT_keystream_blocks(ctx, keystream, blocks) \ - ECRYPT_keystream_bytes(ctx, keystream, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_keystream_bytes(ctx, keystream, \ + (blocks) * ECRYPT_BLOCKLENGTH) #endif #else void ECRYPT_encrypt_blocks( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 blocks); /* Message length in blocks. */ void ECRYPT_decrypt_blocks( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 blocks); /* Message length in blocks. */ #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_blocks( - ECRYPT_ctx* ctx, - const u8* keystream, - u32 blocks); /* Keystream length in blocks. */ + ECRYPT_ctx* ctx, + const u8* keystream, + u32 blocks); /* Keystream length in blocks. */ #endif @@ -272,11 +272,11 @@ void ECRYPT_keystream_blocks( #define ECRYPT_MAXVARIANT 1 /* [edit] */ #ifndef ECRYPT_VARIANT -#define ECRYPT_VARIANT 1 + #define ECRYPT_VARIANT 1 #endif #if (ECRYPT_VARIANT > ECRYPT_MAXVARIANT) -#error this variant does not exist + #error this variant does not exist #endif /* ------------------------------------------------------------------------- */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna-32.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna-32.h index 2aa2eeb6..3e4eb10f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna-32.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna-32.h @@ -8,216 +8,253 @@ */ #if defined(_MSC_VER) - #define POLY1305_NOINLINE __declspec(noinline) + #define POLY1305_NOINLINE __declspec(noinline) #elif defined(__GNUC__) - #define POLY1305_NOINLINE __attribute__((noinline)) + #define POLY1305_NOINLINE __attribute__((noinline)) #else - #define POLY1305_NOINLINE + #define POLY1305_NOINLINE #endif #define poly1305_block_size 16 /* 17 + sizeof(size_t) + 14*sizeof(unsigned long) */ -typedef struct { - unsigned long r[5]; - unsigned long h[5]; - unsigned long pad[4]; - size_t leftover; - unsigned char buffer[poly1305_block_size]; - unsigned char final; +typedef struct +{ + unsigned long r[5]; + unsigned long h[5]; + unsigned long pad[4]; + size_t leftover; + unsigned char buffer[poly1305_block_size]; + unsigned char final; } poly1305_state_internal_t; /* interpret four 8 bit unsigned integers as a 32 bit unsigned integer in little endian */ -static unsigned long -U8TO32(const unsigned char *p) { - return - (((unsigned long)(p[0] & 0xff) ) | - ((unsigned long)(p[1] & 0xff) << 8) | - ((unsigned long)(p[2] & 0xff) << 16) | - ((unsigned long)(p[3] & 0xff) << 24)); +static unsigned long U8TO32(const unsigned char* p) +{ + return + (((unsigned long)(p[0] & 0xff) ) | + ((unsigned long)(p[1] & 0xff) << 8) | + ((unsigned long)(p[2] & 0xff) << 16) | + ((unsigned long)(p[3] & 0xff) << 24)); } /* store a 32 bit unsigned integer as four 8 bit unsigned integers in little endian */ -static void -U32TO8(unsigned char *p, unsigned long v) { - p[0] = (v ) & 0xff; - p[1] = (v >> 8) & 0xff; - p[2] = (v >> 16) & 0xff; - p[3] = (v >> 24) & 0xff; +static void U32TO8(unsigned char* p, unsigned long v) +{ + p[0] = (v ) & 0xff; + p[1] = (v >> 8) & 0xff; + p[2] = (v >> 16) & 0xff; + p[3] = (v >> 24) & 0xff; } -void -poly1305_init(poly1305_context *ctx, const unsigned char key[32]) { - poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx; - - /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ - st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff; - st->r[1] = (U8TO32(&key[ 3]) >> 2) & 0x3ffff03; - st->r[2] = (U8TO32(&key[ 6]) >> 4) & 0x3ffc0ff; - st->r[3] = (U8TO32(&key[ 9]) >> 6) & 0x3f03fff; - st->r[4] = (U8TO32(&key[12]) >> 8) & 0x00fffff; - - /* h = 0 */ - st->h[0] = 0; - st->h[1] = 0; - st->h[2] = 0; - st->h[3] = 0; - st->h[4] = 0; - - /* save pad for later */ - st->pad[0] = U8TO32(&key[16]); - st->pad[1] = U8TO32(&key[20]); - st->pad[2] = U8TO32(&key[24]); - st->pad[3] = U8TO32(&key[28]); - - st->leftover = 0; - st->final = 0; +void poly1305_init(poly1305_context* ctx, const unsigned char key[32]) +{ + poly1305_state_internal_t* st = (poly1305_state_internal_t*)ctx; + + /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ + st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff; + st->r[1] = (U8TO32(&key[ 3]) >> 2) & 0x3ffff03; + st->r[2] = (U8TO32(&key[ 6]) >> 4) & 0x3ffc0ff; + st->r[3] = (U8TO32(&key[ 9]) >> 6) & 0x3f03fff; + st->r[4] = (U8TO32(&key[12]) >> 8) & 0x00fffff; + + /* h = 0 */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + + /* save pad for later */ + st->pad[0] = U8TO32(&key[16]); + st->pad[1] = U8TO32(&key[20]); + st->pad[2] = U8TO32(&key[24]); + st->pad[3] = U8TO32(&key[28]); + + st->leftover = 0; + st->final = 0; } -static void -poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m, size_t bytes) { - const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ - unsigned long r0,r1,r2,r3,r4; - unsigned long s1,s2,s3,s4; - unsigned long h0,h1,h2,h3,h4; - unsigned long long d0,d1,d2,d3,d4; - unsigned long c; - - r0 = st->r[0]; - r1 = st->r[1]; - r2 = st->r[2]; - r3 = st->r[3]; - r4 = st->r[4]; - - s1 = r1 * 5; - s2 = r2 * 5; - s3 = r3 * 5; - s4 = r4 * 5; - - h0 = st->h[0]; - h1 = st->h[1]; - h2 = st->h[2]; - h3 = st->h[3]; - h4 = st->h[4]; - - while (bytes >= poly1305_block_size) { - /* h += m[i] */ - h0 += (U8TO32(m+ 0) ) & 0x3ffffff; - h1 += (U8TO32(m+ 3) >> 2) & 0x3ffffff; - h2 += (U8TO32(m+ 6) >> 4) & 0x3ffffff; - h3 += (U8TO32(m+ 9) >> 6) & 0x3ffffff; - h4 += (U8TO32(m+12) >> 8) | hibit; - - /* h *= r */ - d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1); - d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2); - d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3); - d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4); - d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0); - - /* (partial) h %= p */ - c = (unsigned long)(d0 >> 26); h0 = (unsigned long)d0 & 0x3ffffff; - d1 += c; c = (unsigned long)(d1 >> 26); h1 = (unsigned long)d1 & 0x3ffffff; - d2 += c; c = (unsigned long)(d2 >> 26); h2 = (unsigned long)d2 & 0x3ffffff; - d3 += c; c = (unsigned long)(d3 >> 26); h3 = (unsigned long)d3 & 0x3ffffff; - d4 += c; c = (unsigned long)(d4 >> 26); h4 = (unsigned long)d4 & 0x3ffffff; - h0 += c * 5; c = (h0 >> 26); h0 = h0 & 0x3ffffff; - h1 += c; - - m += poly1305_block_size; - bytes -= poly1305_block_size; - } - - st->h[0] = h0; - st->h[1] = h1; - st->h[2] = h2; - st->h[3] = h3; - st->h[4] = h4; +static void poly1305_blocks(poly1305_state_internal_t* st, const unsigned char* m, size_t bytes) +{ + const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ + unsigned long r0, r1, r2, r3, r4; + unsigned long s1, s2, s3, s4; + unsigned long h0, h1, h2, h3, h4; + unsigned long long d0, d1, d2, d3, d4; + unsigned long c; + + r0 = st->r[0]; + r1 = st->r[1]; + r2 = st->r[2]; + r3 = st->r[3]; + r4 = st->r[4]; + + s1 = r1 * 5; + s2 = r2 * 5; + s3 = r3 * 5; + s4 = r4 * 5; + + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + while (bytes >= poly1305_block_size) + { + /* h += m[i] */ + h0 += (U8TO32(m + 0) ) & 0x3ffffff; + h1 += (U8TO32(m + 3) >> 2) & 0x3ffffff; + h2 += (U8TO32(m + 6) >> 4) & 0x3ffffff; + h3 += (U8TO32(m + 9) >> 6) & 0x3ffffff; + h4 += (U8TO32(m + 12) >> 8) | hibit; + + /* h *= r */ + d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1); + d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2); + d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3); + d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4); + d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0); + + /* (partial) h %= p */ + c = (unsigned long)(d0 >> 26); + h0 = (unsigned long)d0 & 0x3ffffff; + d1 += c; + c = (unsigned long)(d1 >> 26); + h1 = (unsigned long)d1 & 0x3ffffff; + d2 += c; + c = (unsigned long)(d2 >> 26); + h2 = (unsigned long)d2 & 0x3ffffff; + d3 += c; + c = (unsigned long)(d3 >> 26); + h3 = (unsigned long)d3 & 0x3ffffff; + d4 += c; + c = (unsigned long)(d4 >> 26); + h4 = (unsigned long)d4 & 0x3ffffff; + h0 += c * 5; + c = (h0 >> 26); + h0 = h0 & 0x3ffffff; + h1 += c; + + m += poly1305_block_size; + bytes -= poly1305_block_size; + } + + st->h[0] = h0; + st->h[1] = h1; + st->h[2] = h2; + st->h[3] = h3; + st->h[4] = h4; } -POLY1305_NOINLINE void -poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) { - poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx; - unsigned long h0,h1,h2,h3,h4,c; - unsigned long g0,g1,g2,g3,g4; - unsigned long long f; - unsigned long mask; - - /* process the remaining block */ - if (st->leftover) { - size_t i = st->leftover; - st->buffer[i++] = 1; - for (; i < poly1305_block_size; i++) - st->buffer[i] = 0; - st->final = 1; - poly1305_blocks(st, st->buffer, poly1305_block_size); - } - - /* fully carry h */ - h0 = st->h[0]; - h1 = st->h[1]; - h2 = st->h[2]; - h3 = st->h[3]; - h4 = st->h[4]; - - c = h1 >> 26; h1 = h1 & 0x3ffffff; - h2 += c; c = h2 >> 26; h2 = h2 & 0x3ffffff; - h3 += c; c = h3 >> 26; h3 = h3 & 0x3ffffff; - h4 += c; c = h4 >> 26; h4 = h4 & 0x3ffffff; - h0 += c * 5; c = h0 >> 26; h0 = h0 & 0x3ffffff; - h1 += c; - - /* compute h + -p */ - g0 = h0 + 5; c = g0 >> 26; g0 &= 0x3ffffff; - g1 = h1 + c; c = g1 >> 26; g1 &= 0x3ffffff; - g2 = h2 + c; c = g2 >> 26; g2 &= 0x3ffffff; - g3 = h3 + c; c = g3 >> 26; g3 &= 0x3ffffff; - g4 = h4 + c - (1UL << 26); - - /* select h if h < p, or h + -p if h >= p */ - mask = (g4 >> ((sizeof(unsigned long) * 8) - 1)) - 1; - g0 &= mask; - g1 &= mask; - g2 &= mask; - g3 &= mask; - g4 &= mask; - mask = ~mask; - h0 = (h0 & mask) | g0; - h1 = (h1 & mask) | g1; - h2 = (h2 & mask) | g2; - h3 = (h3 & mask) | g3; - h4 = (h4 & mask) | g4; - - /* h = h % (2^128) */ - h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; - h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; - h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; - h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; - - /* mac = (h + pad) % (2^128) */ - f = (unsigned long long)h0 + st->pad[0] ; h0 = (unsigned long)f; - f = (unsigned long long)h1 + st->pad[1] + (f >> 32); h1 = (unsigned long)f; - f = (unsigned long long)h2 + st->pad[2] + (f >> 32); h2 = (unsigned long)f; - f = (unsigned long long)h3 + st->pad[3] + (f >> 32); h3 = (unsigned long)f; - - U32TO8(mac + 0, h0); - U32TO8(mac + 4, h1); - U32TO8(mac + 8, h2); - U32TO8(mac + 12, h3); - - /* zero out the state */ - st->h[0] = 0; - st->h[1] = 0; - st->h[2] = 0; - st->h[3] = 0; - st->h[4] = 0; - st->r[0] = 0; - st->r[1] = 0; - st->r[2] = 0; - st->r[3] = 0; - st->r[4] = 0; - st->pad[0] = 0; - st->pad[1] = 0; - st->pad[2] = 0; - st->pad[3] = 0; +POLY1305_NOINLINE void poly1305_finish(poly1305_context* ctx, unsigned char mac[16]) +{ + poly1305_state_internal_t* st = (poly1305_state_internal_t*)ctx; + unsigned long h0, h1, h2, h3, h4, c; + unsigned long g0, g1, g2, g3, g4; + unsigned long long f; + unsigned long mask; + + /* process the remaining block */ + if (st->leftover) + { + size_t i = st->leftover; + st->buffer[i++] = 1; + + for (; i < poly1305_block_size; i++) + st->buffer[i] = 0; + + st->final = 1; + poly1305_blocks(st, st->buffer, poly1305_block_size); + } + + /* fully carry h */ + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + c = h1 >> 26; + h1 = h1 & 0x3ffffff; + h2 += c; + c = h2 >> 26; + h2 = h2 & 0x3ffffff; + h3 += c; + c = h3 >> 26; + h3 = h3 & 0x3ffffff; + h4 += c; + c = h4 >> 26; + h4 = h4 & 0x3ffffff; + h0 += c * 5; + c = h0 >> 26; + h0 = h0 & 0x3ffffff; + h1 += c; + + /* compute h + -p */ + g0 = h0 + 5; + c = g0 >> 26; + g0 &= 0x3ffffff; + g1 = h1 + c; + c = g1 >> 26; + g1 &= 0x3ffffff; + g2 = h2 + c; + c = g2 >> 26; + g2 &= 0x3ffffff; + g3 = h3 + c; + c = g3 >> 26; + g3 &= 0x3ffffff; + g4 = h4 + c - (1UL << 26); + + /* select h if h < p, or h + -p if h >= p */ + mask = (g4 >> ((sizeof(unsigned long) * 8) - 1)) - 1; + g0 &= mask; + g1 &= mask; + g2 &= mask; + g3 &= mask; + g4 &= mask; + mask = ~mask; + h0 = (h0 & mask) | g0; + h1 = (h1 & mask) | g1; + h2 = (h2 & mask) | g2; + h3 = (h3 & mask) | g3; + h4 = (h4 & mask) | g4; + + /* h = h % (2^128) */ + h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; + h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; + h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; + h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; + + /* mac = (h + pad) % (2^128) */ + f = (unsigned long long)h0 + st->pad[0] ; + h0 = (unsigned long)f; + f = (unsigned long long)h1 + st->pad[1] + (f >> 32); + h1 = (unsigned long)f; + f = (unsigned long long)h2 + st->pad[2] + (f >> 32); + h2 = (unsigned long)f; + f = (unsigned long long)h3 + st->pad[3] + (f >> 32); + h3 = (unsigned long)f; + + U32TO8(mac + 0, h0); + U32TO8(mac + 4, h1); + U32TO8(mac + 8, h2); + U32TO8(mac + 12, h3); + + /* zero out the state */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + st->r[0] = 0; + st->r[1] = 0; + st->r[2] = 0; + st->r[3] = 0; + st->r[4] = 0; + st->pad[0] = 0; + st->pad[1] = 0; + st->pad[2] = 0; + st->pad[3] = 0; } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna.h index 574efabd..a5449272 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sw_poly1305-donna.h @@ -9,15 +9,16 @@ #include -typedef struct { - size_t aligner; - unsigned char opaque[136]; +typedef struct +{ + size_t aligner; + unsigned char opaque[136]; } poly1305_context; -void poly1305_init(poly1305_context *ctx, const unsigned char key[32]); -void poly1305_update(poly1305_context *ctx, const unsigned char *m, size_t bytes); -void poly1305_finish(poly1305_context *ctx, unsigned char mac[16]); -void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, const unsigned char key[32]); +void poly1305_init(poly1305_context* ctx, const unsigned char key[32]); +void poly1305_update(poly1305_context* ctx, const unsigned char* m, size_t bytes); +void poly1305_finish(poly1305_context* ctx, unsigned char mac[16]); +void poly1305_auth(unsigned char mac[16], const unsigned char* m, size_t bytes, const unsigned char key[32]); int poly1305_verify(const unsigned char mac1[16], const unsigned char mac2[16]); int poly1305_power_on_self_test(void); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sys_ctrl.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sys_ctrl.h index 15aabd4b..c3082e8f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sys_ctrl.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/sys_ctrl.h @@ -99,14 +99,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SysCtrlIdle NOROM_SysCtrlIdle - #define SysCtrlShutdownWithAbort NOROM_SysCtrlShutdownWithAbort - #define SysCtrlShutdown NOROM_SysCtrlShutdown - #define SysCtrlStandby NOROM_SysCtrlStandby - #define SysCtrlSetRechargeBeforePowerDown NOROM_SysCtrlSetRechargeBeforePowerDown - #define SysCtrlAdjustRechargeAfterPowerDown NOROM_SysCtrlAdjustRechargeAfterPowerDown - #define SysCtrl_DCDC_VoltageConditionalControl NOROM_SysCtrl_DCDC_VoltageConditionalControl - #define SysCtrlResetSourceGet NOROM_SysCtrlResetSourceGet +#define SysCtrlIdle NOROM_SysCtrlIdle +#define SysCtrlShutdownWithAbort NOROM_SysCtrlShutdownWithAbort +#define SysCtrlShutdown NOROM_SysCtrlShutdown +#define SysCtrlStandby NOROM_SysCtrlStandby +#define SysCtrlSetRechargeBeforePowerDown NOROM_SysCtrlSetRechargeBeforePowerDown +#define SysCtrlAdjustRechargeAfterPowerDown NOROM_SysCtrlAdjustRechargeAfterPowerDown +#define SysCtrl_DCDC_VoltageConditionalControl NOROM_SysCtrl_DCDC_VoltageConditionalControl +#define SysCtrlResetSourceGet NOROM_SysCtrlResetSourceGet #endif //***************************************************************************** @@ -149,7 +149,7 @@ extern "C" // //***************************************************************************** #define SYSCTRL_PREFERRED_RECHARGE_MODE \ - 0xFFFFFFFF // Preferred recharge mode + 0xFFFFFFFF // Preferred recharge mode //***************************************************************************** // @@ -316,7 +316,7 @@ __STATIC_INLINE uint32_t SysCtrlClockGet( void ) { // Return fixed clock speed - return( GET_MCU_CLOCK ); + return ( GET_MCU_CLOCK ); } //***************************************************************************** @@ -461,14 +461,16 @@ extern uint32_t SysCtrlResetSourceGet( void ); __STATIC_INLINE void SysCtrlSystemReset( void ) { - // Disable CPU interrupts - CPUcpsid(); - // Write reset register - HWREGBITW( AON_PMCTL_BASE + AON_PMCTL_O_RESETCTL, AON_PMCTL_RESETCTL_SYSRESET_BITN ) = 1; - // Finally, wait until the above write propagates - while ( 1 ) { - // Do nothing, just wait for the reset (and never return from here) - } + // Disable CPU interrupts + CPUcpsid(); + // Write reset register + HWREGBITW( AON_PMCTL_BASE + AON_PMCTL_O_RESETCTL, AON_PMCTL_RESETCTL_SYSRESET_BITN ) = 1; + + // Finally, wait until the above write propagates + while ( 1 ) + { + // Do nothing, just wait for the reset (and never return from here) + } } //***************************************************************************** @@ -522,39 +524,39 @@ SysCtrlClockLossResetDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SysCtrlIdle - #undef SysCtrlIdle - #define SysCtrlIdle ROM_SysCtrlIdle - #endif - #ifdef ROM_SysCtrlShutdownWithAbort - #undef SysCtrlShutdownWithAbort - #define SysCtrlShutdownWithAbort ROM_SysCtrlShutdownWithAbort - #endif - #ifdef ROM_SysCtrlShutdown - #undef SysCtrlShutdown - #define SysCtrlShutdown ROM_SysCtrlShutdown - #endif - #ifdef ROM_SysCtrlStandby - #undef SysCtrlStandby - #define SysCtrlStandby ROM_SysCtrlStandby - #endif - #ifdef ROM_SysCtrlSetRechargeBeforePowerDown - #undef SysCtrlSetRechargeBeforePowerDown - #define SysCtrlSetRechargeBeforePowerDown ROM_SysCtrlSetRechargeBeforePowerDown - #endif - #ifdef ROM_SysCtrlAdjustRechargeAfterPowerDown - #undef SysCtrlAdjustRechargeAfterPowerDown - #define SysCtrlAdjustRechargeAfterPowerDown ROM_SysCtrlAdjustRechargeAfterPowerDown - #endif - #ifdef ROM_SysCtrl_DCDC_VoltageConditionalControl - #undef SysCtrl_DCDC_VoltageConditionalControl - #define SysCtrl_DCDC_VoltageConditionalControl ROM_SysCtrl_DCDC_VoltageConditionalControl - #endif - #ifdef ROM_SysCtrlResetSourceGet - #undef SysCtrlResetSourceGet - #define SysCtrlResetSourceGet ROM_SysCtrlResetSourceGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SysCtrlIdle +#undef SysCtrlIdle +#define SysCtrlIdle ROM_SysCtrlIdle +#endif +#ifdef ROM_SysCtrlShutdownWithAbort +#undef SysCtrlShutdownWithAbort +#define SysCtrlShutdownWithAbort ROM_SysCtrlShutdownWithAbort +#endif +#ifdef ROM_SysCtrlShutdown +#undef SysCtrlShutdown +#define SysCtrlShutdown ROM_SysCtrlShutdown +#endif +#ifdef ROM_SysCtrlStandby +#undef SysCtrlStandby +#define SysCtrlStandby ROM_SysCtrlStandby +#endif +#ifdef ROM_SysCtrlSetRechargeBeforePowerDown +#undef SysCtrlSetRechargeBeforePowerDown +#define SysCtrlSetRechargeBeforePowerDown ROM_SysCtrlSetRechargeBeforePowerDown +#endif +#ifdef ROM_SysCtrlAdjustRechargeAfterPowerDown +#undef SysCtrlAdjustRechargeAfterPowerDown +#define SysCtrlAdjustRechargeAfterPowerDown ROM_SysCtrlAdjustRechargeAfterPowerDown +#endif +#ifdef ROM_SysCtrl_DCDC_VoltageConditionalControl +#undef SysCtrl_DCDC_VoltageConditionalControl +#define SysCtrl_DCDC_VoltageConditionalControl ROM_SysCtrl_DCDC_VoltageConditionalControl +#endif +#ifdef ROM_SysCtrlResetSourceGet +#undef SysCtrlResetSourceGet +#define SysCtrlResetSourceGet ROM_SysCtrlResetSourceGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/systick.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/systick.h index 735171df..d0654401 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/systick.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/systick.h @@ -247,7 +247,7 @@ __STATIC_INLINE uint32_t SysTickPeriodGet(void) { // Return the period of the SysTick counter. - return(HWREG(NVIC_ST_RELOAD) + 1); + return (HWREG(NVIC_ST_RELOAD) + 1); } //***************************************************************************** @@ -264,7 +264,7 @@ __STATIC_INLINE uint32_t SysTickValueGet(void) { // Return the current value of the SysTick counter. - return(HWREG(NVIC_ST_CURRENT)); + return (HWREG(NVIC_ST_CURRENT)); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/timer.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/timer.h index da130749..b010b3b3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/timer.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/timer.h @@ -80,14 +80,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define TimerConfigure NOROM_TimerConfigure - #define TimerLevelControl NOROM_TimerLevelControl - #define TimerStallControl NOROM_TimerStallControl - #define TimerWaitOnTriggerControl NOROM_TimerWaitOnTriggerControl - #define TimerIntRegister NOROM_TimerIntRegister - #define TimerIntUnregister NOROM_TimerIntUnregister - #define TimerMatchUpdateMode NOROM_TimerMatchUpdateMode - #define TimerIntervalLoadMode NOROM_TimerIntervalLoadMode +#define TimerConfigure NOROM_TimerConfigure +#define TimerLevelControl NOROM_TimerLevelControl +#define TimerStallControl NOROM_TimerStallControl +#define TimerWaitOnTriggerControl NOROM_TimerWaitOnTriggerControl +#define TimerIntRegister NOROM_TimerIntRegister +#define TimerIntUnregister NOROM_TimerIntUnregister +#define TimerMatchUpdateMode NOROM_TimerMatchUpdateMode +#define TimerIntervalLoadMode NOROM_TimerIntervalLoadMode #endif //***************************************************************************** @@ -210,8 +210,8 @@ extern "C" static bool TimerBaseValid(uint32_t ui32Base) { - return((ui32Base == GPT0_BASE) || (ui32Base == GPT1_BASE) || - (ui32Base == GPT2_BASE) || (ui32Base == GPT3_BASE)); + return ((ui32Base == GPT0_BASE) || (ui32Base == GPT1_BASE) || + (ui32Base == GPT2_BASE) || (ui32Base == GPT3_BASE)); } #endif @@ -474,13 +474,13 @@ TimerPrescaleSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) ASSERT(ui32Value < 256); // Set the timer A prescaler if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAPR) = ui32Value; } // Set the timer B prescaler if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBPR) = ui32Value; } @@ -522,8 +522,8 @@ TimerPrescaleGet(uint32_t ui32Base, uint32_t ui32Timer) (ui32Timer == TIMER_BOTH)); // Return the appropriate prescale value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPR) : - HWREG(ui32Base + GPT_O_TBPR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPR) : + HWREG(ui32Base + GPT_O_TBPR)); } //***************************************************************************** @@ -558,13 +558,13 @@ TimerPrescaleMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) ASSERT(ui32Value < 256); // Set the timer A prescale match if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAPMR) = ui32Value; } // Set the timer B prescale match if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBPMR) = ui32Value; } @@ -597,8 +597,8 @@ TimerPrescaleMatchGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate prescale match value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPMR) : - HWREG(ui32Base + GPT_O_TBPMR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPMR) : + HWREG(ui32Base + GPT_O_TBPMR)); } //***************************************************************************** @@ -633,13 +633,13 @@ TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) (ui32Timer == TIMER_BOTH)); // Set the timer A load value if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAILR) = ui32Value; } // Set the timer B load value if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBILR) = ui32Value; } @@ -674,8 +674,8 @@ TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate load value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAILR) : - HWREG(ui32Base + GPT_O_TBILR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAILR) : + HWREG(ui32Base + GPT_O_TBILR)); } //***************************************************************************** @@ -706,8 +706,8 @@ TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate timer value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAR) : - HWREG(ui32Base + GPT_O_TBR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAR) : + HWREG(ui32Base + GPT_O_TBR)); } //***************************************************************************** @@ -745,13 +745,13 @@ TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) (ui32Timer == TIMER_BOTH)); // Set the timer A match value if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAMATCHR) = ui32Value; } // Set the timer B match value if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBMATCHR) = ui32Value; } @@ -786,8 +786,8 @@ TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate match value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAMATCHR) : - HWREG(ui32Base + GPT_O_TBMATCHR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAMATCHR) : + HWREG(ui32Base + GPT_O_TBMATCHR)); } //***************************************************************************** @@ -936,8 +936,8 @@ TimerIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - return(bMasked ? HWREG(ui32Base + GPT_O_MIS) : - HWREG(ui32Base + GPT_O_RIS)); + return (bMasked ? HWREG(ui32Base + GPT_O_MIS) : + HWREG(ui32Base + GPT_O_RIS)); } //***************************************************************************** @@ -1121,39 +1121,39 @@ extern void TimerIntervalLoadMode(uint32_t ui32Base, uint32_t ui32Timer, uint32_ // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_TimerConfigure - #undef TimerConfigure - #define TimerConfigure ROM_TimerConfigure - #endif - #ifdef ROM_TimerLevelControl - #undef TimerLevelControl - #define TimerLevelControl ROM_TimerLevelControl - #endif - #ifdef ROM_TimerStallControl - #undef TimerStallControl - #define TimerStallControl ROM_TimerStallControl - #endif - #ifdef ROM_TimerWaitOnTriggerControl - #undef TimerWaitOnTriggerControl - #define TimerWaitOnTriggerControl ROM_TimerWaitOnTriggerControl - #endif - #ifdef ROM_TimerIntRegister - #undef TimerIntRegister - #define TimerIntRegister ROM_TimerIntRegister - #endif - #ifdef ROM_TimerIntUnregister - #undef TimerIntUnregister - #define TimerIntUnregister ROM_TimerIntUnregister - #endif - #ifdef ROM_TimerMatchUpdateMode - #undef TimerMatchUpdateMode - #define TimerMatchUpdateMode ROM_TimerMatchUpdateMode - #endif - #ifdef ROM_TimerIntervalLoadMode - #undef TimerIntervalLoadMode - #define TimerIntervalLoadMode ROM_TimerIntervalLoadMode - #endif +#include "../driverlib/rom.h" +#ifdef ROM_TimerConfigure +#undef TimerConfigure +#define TimerConfigure ROM_TimerConfigure +#endif +#ifdef ROM_TimerLevelControl +#undef TimerLevelControl +#define TimerLevelControl ROM_TimerLevelControl +#endif +#ifdef ROM_TimerStallControl +#undef TimerStallControl +#define TimerStallControl ROM_TimerStallControl +#endif +#ifdef ROM_TimerWaitOnTriggerControl +#undef TimerWaitOnTriggerControl +#define TimerWaitOnTriggerControl ROM_TimerWaitOnTriggerControl +#endif +#ifdef ROM_TimerIntRegister +#undef TimerIntRegister +#define TimerIntRegister ROM_TimerIntRegister +#endif +#ifdef ROM_TimerIntUnregister +#undef TimerIntUnregister +#define TimerIntUnregister ROM_TimerIntUnregister +#endif +#ifdef ROM_TimerMatchUpdateMode +#undef TimerMatchUpdateMode +#define TimerMatchUpdateMode ROM_TimerMatchUpdateMode +#endif +#ifdef ROM_TimerIntervalLoadMode +#undef TimerIntervalLoadMode +#define TimerIntervalLoadMode ROM_TimerIntervalLoadMode +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/trng.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/trng.h index 08a485b4..e3cfd1e4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/trng.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/trng.h @@ -83,8 +83,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define TRNGConfigure NOROM_TRNGConfigure - #define TRNGNumberGet NOROM_TRNGNumberGet +#define TRNGConfigure NOROM_TRNGConfigure +#define TRNGNumberGet NOROM_TRNGNumberGet #endif //***************************************************************************** @@ -304,14 +304,14 @@ TRNGIntStatus(bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(TRNG_BASE + TRNG_O_IRQFLAGMASK); - return(ui32Mask & HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT)); + return (ui32Mask & HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT)); } else { - return(HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT) & 0x00000003); + return (HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT) & 0x00000003); } } @@ -420,15 +420,15 @@ TRNGIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_TRNGConfigure - #undef TRNGConfigure - #define TRNGConfigure ROM_TRNGConfigure - #endif - #ifdef ROM_TRNGNumberGet - #undef TRNGNumberGet - #define TRNGNumberGet ROM_TRNGNumberGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_TRNGConfigure +#undef TRNGConfigure +#define TRNGConfigure ROM_TRNGConfigure +#endif +#ifdef ROM_TRNGNumberGet +#undef TRNGNumberGet +#define TRNGNumberGet ROM_TRNGNumberGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/uart.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/uart.h index 138c86cd..69afb604 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/uart.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/uart.h @@ -82,16 +82,16 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define UARTFIFOLevelGet NOROM_UARTFIFOLevelGet - #define UARTConfigSetExpClk NOROM_UARTConfigSetExpClk - #define UARTConfigGetExpClk NOROM_UARTConfigGetExpClk - #define UARTDisable NOROM_UARTDisable - #define UARTCharGetNonBlocking NOROM_UARTCharGetNonBlocking - #define UARTCharGet NOROM_UARTCharGet - #define UARTCharPutNonBlocking NOROM_UARTCharPutNonBlocking - #define UARTCharPut NOROM_UARTCharPut - #define UARTIntRegister NOROM_UARTIntRegister - #define UARTIntUnregister NOROM_UARTIntUnregister +#define UARTFIFOLevelGet NOROM_UARTFIFOLevelGet +#define UARTConfigSetExpClk NOROM_UARTConfigSetExpClk +#define UARTConfigGetExpClk NOROM_UARTConfigGetExpClk +#define UARTDisable NOROM_UARTDisable +#define UARTCharGetNonBlocking NOROM_UARTCharGetNonBlocking +#define UARTCharGet NOROM_UARTCharGet +#define UARTCharPutNonBlocking NOROM_UARTCharPutNonBlocking +#define UARTCharPut NOROM_UARTCharPut +#define UARTIntRegister NOROM_UARTIntRegister +#define UARTIntUnregister NOROM_UARTIntUnregister #endif //***************************************************************************** @@ -209,8 +209,8 @@ extern "C" static bool UARTBaseValid(uint32_t ui32Base) { - return(( ui32Base == UART0_BASE ) || ( ui32Base == UART0_NONBUF_BASE ) || - ( ui32Base == UART1_BASE ) || ( ui32Base == UART1_NONBUF_BASE ) ); + return (( ui32Base == UART0_BASE ) || ( ui32Base == UART0_NONBUF_BASE ) || + ( ui32Base == UART1_BASE ) || ( ui32Base == UART1_NONBUF_BASE ) ); } #endif @@ -275,8 +275,8 @@ UARTParityModeGet(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the current parity setting - return(HWREG(ui32Base + UART_O_LCRH) & - (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); + return (HWREG(ui32Base + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); } //***************************************************************************** @@ -350,8 +350,8 @@ UARTFIFOLevelSet(uint32_t ui32Base, uint32_t ui32TxLevel, //! \return None // //***************************************************************************** -extern void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t *pui32TxLevel, - uint32_t *pui32RxLevel); +extern void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t* pui32TxLevel, + uint32_t* pui32RxLevel); //***************************************************************************** // @@ -414,7 +414,7 @@ extern void UARTConfigSetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, // //***************************************************************************** extern void UARTConfigGetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, - uint32_t *pui32Baud, uint32_t *pui32Config); + uint32_t* pui32Baud, uint32_t* pui32Config); //***************************************************************************** // @@ -519,7 +519,7 @@ UARTCharsAvail(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the availability of characters. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); } //***************************************************************************** @@ -543,7 +543,7 @@ UARTSpaceAvail(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the availability of space. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); } //***************************************************************************** @@ -641,8 +641,8 @@ UARTBusy(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Determine if the UART is busy. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? - UART_BUSY : UART_IDLE); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? + UART_BUSY : UART_IDLE); } //***************************************************************************** @@ -668,7 +668,7 @@ UARTBreakCtl(uint32_t ui32Base, bool bBreakState) // Set the break condition as requested. HWREG(ui32Base + UART_O_LCRH) = - (bBreakState ? + (bBreakState ? (HWREG(ui32Base + UART_O_LCRH) | UART_LCRH_BRK) : (HWREG(ui32Base + UART_O_LCRH) & ~(UART_LCRH_BRK))); } @@ -816,13 +816,13 @@ UARTIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(ui32Base + UART_O_MIS)); + return (HWREG(ui32Base + UART_O_MIS)); } else { - return(HWREG(ui32Base + UART_O_RIS)); + return (HWREG(ui32Base + UART_O_RIS)); } } @@ -958,7 +958,7 @@ UARTRxErrorGet(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the current value of the receive status register. - return(HWREG(ui32Base + UART_O_RSR) & 0x0000000F); + return (HWREG(ui32Base + UART_O_RSR) & 0x0000000F); } //***************************************************************************** @@ -1034,47 +1034,47 @@ UARTHwFlowControlDisable( uint32_t ui32Base ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_UARTFIFOLevelGet - #undef UARTFIFOLevelGet - #define UARTFIFOLevelGet ROM_UARTFIFOLevelGet - #endif - #ifdef ROM_UARTConfigSetExpClk - #undef UARTConfigSetExpClk - #define UARTConfigSetExpClk ROM_UARTConfigSetExpClk - #endif - #ifdef ROM_UARTConfigGetExpClk - #undef UARTConfigGetExpClk - #define UARTConfigGetExpClk ROM_UARTConfigGetExpClk - #endif - #ifdef ROM_UARTDisable - #undef UARTDisable - #define UARTDisable ROM_UARTDisable - #endif - #ifdef ROM_UARTCharGetNonBlocking - #undef UARTCharGetNonBlocking - #define UARTCharGetNonBlocking ROM_UARTCharGetNonBlocking - #endif - #ifdef ROM_UARTCharGet - #undef UARTCharGet - #define UARTCharGet ROM_UARTCharGet - #endif - #ifdef ROM_UARTCharPutNonBlocking - #undef UARTCharPutNonBlocking - #define UARTCharPutNonBlocking ROM_UARTCharPutNonBlocking - #endif - #ifdef ROM_UARTCharPut - #undef UARTCharPut - #define UARTCharPut ROM_UARTCharPut - #endif - #ifdef ROM_UARTIntRegister - #undef UARTIntRegister - #define UARTIntRegister ROM_UARTIntRegister - #endif - #ifdef ROM_UARTIntUnregister - #undef UARTIntUnregister - #define UARTIntUnregister ROM_UARTIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_UARTFIFOLevelGet +#undef UARTFIFOLevelGet +#define UARTFIFOLevelGet ROM_UARTFIFOLevelGet +#endif +#ifdef ROM_UARTConfigSetExpClk +#undef UARTConfigSetExpClk +#define UARTConfigSetExpClk ROM_UARTConfigSetExpClk +#endif +#ifdef ROM_UARTConfigGetExpClk +#undef UARTConfigGetExpClk +#define UARTConfigGetExpClk ROM_UARTConfigGetExpClk +#endif +#ifdef ROM_UARTDisable +#undef UARTDisable +#define UARTDisable ROM_UARTDisable +#endif +#ifdef ROM_UARTCharGetNonBlocking +#undef UARTCharGetNonBlocking +#define UARTCharGetNonBlocking ROM_UARTCharGetNonBlocking +#endif +#ifdef ROM_UARTCharGet +#undef UARTCharGet +#define UARTCharGet ROM_UARTCharGet +#endif +#ifdef ROM_UARTCharPutNonBlocking +#undef UARTCharPutNonBlocking +#define UARTCharPutNonBlocking ROM_UARTCharPutNonBlocking +#endif +#ifdef ROM_UARTCharPut +#undef UARTCharPut +#define UARTCharPut ROM_UARTCharPut +#endif +#ifdef ROM_UARTIntRegister +#undef UARTIntRegister +#define UARTIntRegister ROM_UARTIntRegister +#endif +#ifdef ROM_UARTIntUnregister +#undef UARTIntUnregister +#define UARTIntUnregister ROM_UARTIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/udma.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/udma.h index 443da6ef..0ac722a5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/udma.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/udma.h @@ -82,14 +82,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define uDMAChannelAttributeEnable NOROM_uDMAChannelAttributeEnable - #define uDMAChannelAttributeDisable NOROM_uDMAChannelAttributeDisable - #define uDMAChannelAttributeGet NOROM_uDMAChannelAttributeGet - #define uDMAChannelControlSet NOROM_uDMAChannelControlSet - #define uDMAChannelTransferSet NOROM_uDMAChannelTransferSet - #define uDMAChannelScatterGatherSet NOROM_uDMAChannelScatterGatherSet - #define uDMAChannelSizeGet NOROM_uDMAChannelSizeGet - #define uDMAChannelModeGet NOROM_uDMAChannelModeGet +#define uDMAChannelAttributeEnable NOROM_uDMAChannelAttributeEnable +#define uDMAChannelAttributeDisable NOROM_uDMAChannelAttributeDisable +#define uDMAChannelAttributeGet NOROM_uDMAChannelAttributeGet +#define uDMAChannelControlSet NOROM_uDMAChannelControlSet +#define uDMAChannelTransferSet NOROM_uDMAChannelTransferSet +#define uDMAChannelScatterGatherSet NOROM_uDMAChannelScatterGatherSet +#define uDMAChannelSizeGet NOROM_uDMAChannelSizeGet +#define uDMAChannelModeGet NOROM_uDMAChannelModeGet #endif //***************************************************************************** @@ -102,8 +102,8 @@ extern "C" //***************************************************************************** typedef struct { - volatile void *pvSrcEndAddr; //!< The ending source address of the data transfer. - volatile void *pvDstEndAddr; //!< The ending destination address of the data transfer. + volatile void* pvSrcEndAddr; //!< The ending source address of the data transfer. + volatile void* pvDstEndAddr; //!< The ending destination address of the data transfer. volatile uint32_t ui32Control; //!< The channel control mode. volatile uint32_t ui32Spare; //!< An unused location. } @@ -185,19 +185,19 @@ tDMAControlTable; pvDstAddr, \ ui32ArbSize, \ ui32Mode) \ - { \ - (((ui32SrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ - ((void *)(&((uint8_t *)(pvSrcAddr))[((ui32TransferCount) << \ - ((ui32SrcIncrement) >> 26)) - 1]))), \ - (((ui32DstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ - ((void *)(&((uint8_t *)(pvDstAddr))[((ui32TransferCount) << \ - ((ui32DstIncrement) >> 30)) - 1]))), \ - (ui32SrcIncrement) | (ui32DstIncrement) | (ui32ItemSize) | \ - (ui32ArbSize) | (((ui32TransferCount) - 1) << 4) | \ - ((((ui32Mode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ - ((ui32Mode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ - (ui32Mode) | UDMA_MODE_ALT_SELECT : (ui32Mode)), 0 \ - } +{ \ + (((ui32SrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ + ((void *)(&((uint8_t *)(pvSrcAddr))[((ui32TransferCount) << \ + ((ui32SrcIncrement) >> 26)) - 1]))), \ + (((ui32DstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ + ((void *)(&((uint8_t *)(pvDstAddr))[((ui32TransferCount) << \ + ((ui32DstIncrement) >> 30)) - 1]))), \ + (ui32SrcIncrement) | (ui32DstIncrement) | (ui32ItemSize) | \ + (ui32ArbSize) | (((ui32TransferCount) - 1) << 4) | \ + ((((ui32Mode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ + ((ui32Mode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ + (ui32Mode) | UDMA_MODE_ALT_SELECT : (ui32Mode)), 0 \ +} //***************************************************************************** // @@ -237,9 +237,9 @@ tDMAControlTable; #define UDMA_MODE_AUTO 0x00000002 #define UDMA_MODE_PINGPONG 0x00000003 #define UDMA_MODE_MEM_SCATTER_GATHER \ - 0x00000004 + 0x00000004 #define UDMA_MODE_PER_SCATTER_GATHER \ - 0x00000006 + 0x00000006 #define UDMA_MODE_M 0x00000007 // uDMA Transfer Mode #define UDMA_MODE_ALT_SELECT 0x00000001 @@ -342,7 +342,7 @@ tDMAControlTable; static bool uDMABaseValid(uint32_t ui32Base) { - return(ui32Base == UDMA0_BASE); + return (ui32Base == UDMA0_BASE); } #endif @@ -410,7 +410,7 @@ uDMAErrorStatusGet(uint32_t ui32Base) ASSERT(uDMABaseValid(ui32Base)); // Return the uDMA error status. - return(HWREG(ui32Base + UDMA_O_ERROR)); + return (HWREG(ui32Base + UDMA_O_ERROR)); } //***************************************************************************** @@ -514,8 +514,8 @@ uDMAChannelIsEnabled(uint32_t ui32Base, uint32_t ui32ChannelNum) // AND the specified channel bit with the enable register, and return the // result. - return((HWREG(ui32Base + UDMA_O_SETCHANNELEN) & (1 << ui32ChannelNum)) ? - true : false); + return ((HWREG(ui32Base + UDMA_O_SETCHANNELEN) & (1 << ui32ChannelNum)) ? + true : false); } //***************************************************************************** @@ -547,7 +547,7 @@ uDMAChannelIsEnabled(uint32_t ui32Base, uint32_t ui32ChannelNum) // //***************************************************************************** __STATIC_INLINE void -uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) +uDMAControlBaseSet(uint32_t ui32Base, void* pControlTable) { // Check the arguments. ASSERT(uDMABaseValid(ui32Base)); @@ -572,7 +572,7 @@ uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) //! \return Returns a pointer to the base address of the channel control table. // //***************************************************************************** -__STATIC_INLINE void * +__STATIC_INLINE void* uDMAControlBaseGet(uint32_t ui32Base) { // Check the arguments. @@ -580,7 +580,7 @@ uDMAControlBaseGet(uint32_t ui32Base) ASSERT(uDMABaseValid(ui32Base)); // Read the current value of the control base register, and return it to // the caller. - return((void *)HWREG(ui32Base + UDMA_O_CTRL)); + return ((void*)HWREG(ui32Base + UDMA_O_CTRL)); } //***************************************************************************** @@ -596,7 +596,7 @@ uDMAControlBaseGet(uint32_t ui32Base) //! channel control table. // //***************************************************************************** -__STATIC_INLINE void * +__STATIC_INLINE void* uDMAControlAlternateBaseGet(uint32_t ui32Base) { // Check the arguments. @@ -604,7 +604,7 @@ uDMAControlAlternateBaseGet(uint32_t ui32Base) // Read the current value of the control base register, and return it to // the caller. - return((void *)HWREG(ui32Base + UDMA_O_ALTCTRL)); + return ((void*)HWREG(ui32Base + UDMA_O_ALTCTRL)); } //***************************************************************************** @@ -818,8 +818,8 @@ extern void uDMAChannelControlSet(uint32_t ui32Base, //***************************************************************************** extern void uDMAChannelTransferSet(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, - uint32_t ui32Mode, void *pvSrcAddr, - void *pvDstAddr, uint32_t ui32TransferSize); + uint32_t ui32Mode, void* pvSrcAddr, + void* pvDstAddr, uint32_t ui32TransferSize); //***************************************************************************** // @@ -852,7 +852,7 @@ extern void uDMAChannelTransferSet(uint32_t ui32Base, extern void uDMAChannelScatterGatherSet(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, - void *pvTaskList, + void* pvTaskList, uint32_t ui32IsPeriphSG); //***************************************************************************** @@ -1150,8 +1150,8 @@ uDMAChannelPriorityGet(uint32_t ui32Base, uint32_t ui32ChannelNum) ASSERT(ui32ChannelNum < UDMA_NUM_CHANNELS); // Return the channel priority. - return(HWREG(ui32Base + UDMA_O_SETCHNLPRIORITY) & (1 << ui32ChannelNum) ? - UDMA_PRIORITY_HIGH : UDMA_PRIORITY_LOW); + return (HWREG(ui32Base + UDMA_O_SETCHNLPRIORITY) & (1 << ui32ChannelNum) ? + UDMA_PRIORITY_HIGH : UDMA_PRIORITY_LOW); } //***************************************************************************** @@ -1185,39 +1185,39 @@ uDMAChannelPriorityClear(uint32_t ui32Base, uint32_t ui32ChannelNum) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_uDMAChannelAttributeEnable - #undef uDMAChannelAttributeEnable - #define uDMAChannelAttributeEnable ROM_uDMAChannelAttributeEnable - #endif - #ifdef ROM_uDMAChannelAttributeDisable - #undef uDMAChannelAttributeDisable - #define uDMAChannelAttributeDisable ROM_uDMAChannelAttributeDisable - #endif - #ifdef ROM_uDMAChannelAttributeGet - #undef uDMAChannelAttributeGet - #define uDMAChannelAttributeGet ROM_uDMAChannelAttributeGet - #endif - #ifdef ROM_uDMAChannelControlSet - #undef uDMAChannelControlSet - #define uDMAChannelControlSet ROM_uDMAChannelControlSet - #endif - #ifdef ROM_uDMAChannelTransferSet - #undef uDMAChannelTransferSet - #define uDMAChannelTransferSet ROM_uDMAChannelTransferSet - #endif - #ifdef ROM_uDMAChannelScatterGatherSet - #undef uDMAChannelScatterGatherSet - #define uDMAChannelScatterGatherSet ROM_uDMAChannelScatterGatherSet - #endif - #ifdef ROM_uDMAChannelSizeGet - #undef uDMAChannelSizeGet - #define uDMAChannelSizeGet ROM_uDMAChannelSizeGet - #endif - #ifdef ROM_uDMAChannelModeGet - #undef uDMAChannelModeGet - #define uDMAChannelModeGet ROM_uDMAChannelModeGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_uDMAChannelAttributeEnable +#undef uDMAChannelAttributeEnable +#define uDMAChannelAttributeEnable ROM_uDMAChannelAttributeEnable +#endif +#ifdef ROM_uDMAChannelAttributeDisable +#undef uDMAChannelAttributeDisable +#define uDMAChannelAttributeDisable ROM_uDMAChannelAttributeDisable +#endif +#ifdef ROM_uDMAChannelAttributeGet +#undef uDMAChannelAttributeGet +#define uDMAChannelAttributeGet ROM_uDMAChannelAttributeGet +#endif +#ifdef ROM_uDMAChannelControlSet +#undef uDMAChannelControlSet +#define uDMAChannelControlSet ROM_uDMAChannelControlSet +#endif +#ifdef ROM_uDMAChannelTransferSet +#undef uDMAChannelTransferSet +#define uDMAChannelTransferSet ROM_uDMAChannelTransferSet +#endif +#ifdef ROM_uDMAChannelScatterGatherSet +#undef uDMAChannelScatterGatherSet +#define uDMAChannelScatterGatherSet ROM_uDMAChannelScatterGatherSet +#endif +#ifdef ROM_uDMAChannelSizeGet +#undef uDMAChannelSizeGet +#define uDMAChannelSizeGet ROM_uDMAChannelSizeGet +#endif +#ifdef ROM_uDMAChannelModeGet +#undef uDMAChannelModeGet +#define uDMAChannelModeGet ROM_uDMAChannelModeGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/vims.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/vims.h index 9e6ecaf7..ac48eaf1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/vims.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/vims.h @@ -80,10 +80,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define VIMSConfigure NOROM_VIMSConfigure - #define VIMSModeSet NOROM_VIMSModeSet - #define VIMSModeGet NOROM_VIMSModeGet - #define VIMSModeSafeSet NOROM_VIMSModeSafeSet +#define VIMSConfigure NOROM_VIMSConfigure +#define VIMSModeSet NOROM_VIMSModeSet +#define VIMSModeGet NOROM_VIMSModeGet +#define VIMSModeSafeSet NOROM_VIMSModeSafeSet #endif //***************************************************************************** @@ -93,7 +93,7 @@ extern "C" // //***************************************************************************** #define VIMS_MODE_CHANGING 0x4 // VIMS mode is changing now and VIMS_MODE - // can not be changed at moment. +// can not be changed at moment. #define VIMS_MODE_DISABLED (VIMS_CTL_MODE_GPRAM) // Disabled mode (GPRAM enabled). #define VIMS_MODE_ENABLED (VIMS_CTL_MODE_CACHE) // Enabled mode, only USERCODE is cached. #define VIMS_MODE_OFF (VIMS_CTL_MODE_OFF) // VIMS Cache RAM is off @@ -120,7 +120,7 @@ extern "C" static bool VIMSBaseValid(uint32_t ui32Base) { - return(ui32Base == VIMS_BASE); + return (ui32Base == VIMS_BASE); } #endif @@ -277,8 +277,8 @@ extern uint32_t VIMSModeGet(uint32_t ui32Base); //! \sa \ref VIMSModeSet() and \ref VIMSModeGet() // //***************************************************************************** -extern void VIMSModeSafeSet( uint32_t ui32Base , - uint32_t ui32NewMode , +extern void VIMSModeSafeSet( uint32_t ui32Base, + uint32_t ui32NewMode, bool blocking ); //***************************************************************************** @@ -300,7 +300,7 @@ VIMSLineBufDisable(uint32_t ui32Base) { // Disable line buffers HWREG(ui32Base + VIMS_O_CTL) |= VIMS_CTL_IDCODE_LB_DIS_M | - VIMS_CTL_SYSBUS_LB_DIS_M; + VIMS_CTL_SYSBUS_LB_DIS_M; } //***************************************************************************** @@ -322,7 +322,7 @@ VIMSLineBufEnable(uint32_t ui32Base) { // Enable linebuffers HWREG(ui32Base + VIMS_O_CTL) &= ~(VIMS_CTL_IDCODE_LB_DIS_M | - VIMS_CTL_SYSBUS_LB_DIS_M); + VIMS_CTL_SYSBUS_LB_DIS_M); } //***************************************************************************** @@ -332,23 +332,23 @@ VIMSLineBufEnable(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_VIMSConfigure - #undef VIMSConfigure - #define VIMSConfigure ROM_VIMSConfigure - #endif - #ifdef ROM_VIMSModeSet - #undef VIMSModeSet - #define VIMSModeSet ROM_VIMSModeSet - #endif - #ifdef ROM_VIMSModeGet - #undef VIMSModeGet - #define VIMSModeGet ROM_VIMSModeGet - #endif - #ifdef ROM_VIMSModeSafeSet - #undef VIMSModeSafeSet - #define VIMSModeSafeSet ROM_VIMSModeSafeSet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_VIMSConfigure +#undef VIMSConfigure +#define VIMSConfigure ROM_VIMSConfigure +#endif +#ifdef ROM_VIMSModeSet +#undef VIMSModeSet +#define VIMSModeSet ROM_VIMSModeSet +#endif +#ifdef ROM_VIMSModeGet +#undef VIMSModeGet +#define VIMSModeGet ROM_VIMSModeGet +#endif +#ifdef ROM_VIMSModeSafeSet +#undef VIMSModeSafeSet +#define VIMSModeSafeSet ROM_VIMSModeSafeSet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/watchdog.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/watchdog.h index 373fb528..a964eb38 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/watchdog.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/driverlib/watchdog.h @@ -114,7 +114,7 @@ __STATIC_INLINE bool WatchdogRunning(void) { // See if the watchdog timer module is enabled, and return. - return((HWREG(WDT_BASE + WDT_O_CTL) & WDT_CTL_INTEN) ? true : false); + return ((HWREG(WDT_BASE + WDT_O_CTL) & WDT_CTL_INTEN) ? true : false); } //***************************************************************************** @@ -231,8 +231,8 @@ __STATIC_INLINE bool WatchdogLockState(void) { // Get the lock state. - return((HWREG(WDT_BASE + WDT_O_LOCK) == WATCHDOG_LOCK_LOCKED) ? - true : false); + return ((HWREG(WDT_BASE + WDT_O_LOCK) == WATCHDOG_LOCK_LOCKED) ? + true : false); } //***************************************************************************** @@ -277,7 +277,7 @@ __STATIC_INLINE uint32_t WatchdogReloadGet(void) { // Get the load register. - return(HWREG(WDT_BASE + WDT_O_LOAD)); + return (HWREG(WDT_BASE + WDT_O_LOAD)); } //***************************************************************************** @@ -293,7 +293,7 @@ __STATIC_INLINE uint32_t WatchdogValueGet(void) { // Get the current watchdog timer register value. - return(HWREG(WDT_BASE + WDT_O_VALUE)); + return (HWREG(WDT_BASE + WDT_O_VALUE)); } //***************************************************************************** @@ -397,7 +397,7 @@ WatchdogIntStatus(void) { // Return either the interrupt status or the raw interrupt status as // requested. - return(HWREG(WDT_BASE + WDT_O_RIS)); + return (HWREG(WDT_BASE + WDT_O_RIS)); } //***************************************************************************** @@ -458,7 +458,7 @@ WatchdogIntTypeSet(uint32_t ui32Type) (ui32Type == WATCHDOG_INT_TYPE_NMI)); // Set the interrupt type. - HWREGBITW(WDT_BASE + WDT_O_CTL, WDT_CTL_INTTYPE_BITN) = (ui32Type == WATCHDOG_INT_TYPE_INT)? 0 : 1; + HWREGBITW(WDT_BASE + WDT_O_CTL, WDT_CTL_INTTYPE_BITN) = (ui32Type == WATCHDOG_INT_TYPE_INT) ? 0 : 1; } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/asmdefs.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/asmdefs.h index 1768b4c4..ddb53153 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/asmdefs.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/asmdefs.h @@ -46,27 +46,27 @@ //***************************************************************************** #ifdef __IAR_SYSTEMS_ICC__ -// -// Section headers. -// -#define __LIBRARY__ module -#define __TEXT__ rseg CODE:CODE(2) -#define __DATA__ rseg DATA:DATA(2) -#define __BSS__ rseg DATA:DATA(2) -#define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) - -// -// Assembler mnemonics. -// -#define __ALIGN__ alignrom 2 -#define __END__ end -#define __EXPORT__ export -#define __IMPORT__ import -#define __LABEL__ -#define __STR__ dcb -#define __THUMB_LABEL__ thumb -#define __WORD__ dcd -#define __INLINE_DATA__ data + // + // Section headers. + // + #define __LIBRARY__ module + #define __TEXT__ rseg CODE:CODE(2) + #define __DATA__ rseg DATA:DATA(2) + #define __BSS__ rseg DATA:DATA(2) + #define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) + + // + // Assembler mnemonics. + // + #define __ALIGN__ alignrom 2 + #define __END__ end + #define __EXPORT__ export + #define __IMPORT__ import + #define __LABEL__ + #define __STR__ dcb + #define __THUMB_LABEL__ thumb + #define __WORD__ dcd + #define __INLINE_DATA__ data #endif // __IAR_SYSTEMS_ICC__ @@ -77,34 +77,34 @@ //***************************************************************************** #if defined(__GNUC__) -// -// The assembly code preamble required to put the assembler into the correct -// configuration. -// + // + // The assembly code preamble required to put the assembler into the correct + // configuration. + // .syntax unified .thumb -// -// Section headers. -// -#define __LIBRARY__ @ -#define __TEXT__ .text -#define __DATA__ .data -#define __BSS__ .bss -#define __TEXT_NOROOT__ .text - -// -// Assembler mnemonics. -// -#define __ALIGN__ .balign 4 -#define __END__ .end -#define __EXPORT__ .globl -#define __IMPORT__ .extern -#define __LABEL__ : -#define __STR__ .ascii -#define __THUMB_LABEL__ .thumb_func -#define __WORD__ .word -#define __INLINE_DATA__ + // + // Section headers. + // + #define __LIBRARY__ @ + #define __TEXT__ .text + #define __DATA__ .data + #define __BSS__ .bss + #define __TEXT_NOROOT__ .text + + // + // Assembler mnemonics. + // + #define __ALIGN__ .balign 4 + #define __END__ .end + #define __EXPORT__ .globl + #define __IMPORT__ .extern + #define __LABEL__ : + #define __STR__ .ascii + #define __THUMB_LABEL__ .thumb_func + #define __WORD__ .word + #define __INLINE_DATA__ #endif // __GNUC__ @@ -115,35 +115,35 @@ //***************************************************************************** #if defined(__CC_ARM) -// -// The assembly code preamble required to put the assembler into the correct -// configuration. -// + // + // The assembly code preamble required to put the assembler into the correct + // configuration. + // thumb require8 preserve8 -// -// Section headers. -// -#define __LIBRARY__ ; -#define __TEXT__ area ||.text||, code, readonly, align=2 -#define __DATA__ area ||.data||, data, align=2 -#define __BSS__ area ||.bss||, noinit, align=2 -#define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 - -// -// Assembler mnemonics. -// -#define __ALIGN__ align 4 -#define __END__ end -#define __EXPORT__ export -#define __IMPORT__ import -#define __LABEL__ -#define __STR__ dcb -#define __THUMB_LABEL__ -#define __WORD__ dcd -#define __INLINE_DATA__ + // + // Section headers. + // + #define __LIBRARY__ ; + #define __TEXT__ area ||.text||, code, readonly, align=2 + #define __DATA__ area ||.data||, data, align=2 + #define __BSS__ area ||.bss||, noinit, align=2 + #define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 + + // + // Assembler mnemonics. + // + #define __ALIGN__ align 4 + #define __END__ end + #define __EXPORT__ export + #define __IMPORT__ import + #define __LABEL__ + #define __STR__ dcb + #define __THUMB_LABEL__ + #define __WORD__ dcd + #define __INLINE_DATA__ #endif // __CC_ARM diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi.h index d55fe0fd..7e7b603c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi.h @@ -155,24 +155,24 @@ // //***************************************************************************** #define ADI_O_DIR 0x00000000 // Offset for the direct access - // instruction +// instruction #define ADI_O_SET 0x00000010 // Offset for 'Set' instruction. #define ADI_O_CLR 0x00000020 // Offset for 'Clear' instruction. #define ADI_O_MASK4B 0x00000040 // Offset for 4-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). - // Bits 7:4 are mask. Bits 3:0 are data. - // Requires 'byte' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). +// Bits 7:4 are mask. Bits 3:0 are data. +// Requires 'byte' write. #define ADI_O_MASK8B 0x00000060 // Offset for 8-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). Bits 15:8 are - // mask. Bits 7:0 are data. Requires - // 'short' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). Bits 15:8 are +// mask. Bits 7:0 are data. Requires +// 'short' write. #define ADI_O_MASK16B 0x00000080 // Offset for 16-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). Bits 31:16 - // are mask. Bits 15:0 are data. - // Requires 'long' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). Bits 31:16 +// are mask. Bits 15:0 are data. +// Requires 'long' write. //***************************************************************************** // @@ -189,16 +189,16 @@ // //***************************************************************************** #define ADI_SLAVESTAT_DI_REQ 0x00000002 // Read current value of DI_REQ - // signal. Writing 0 to this bit - // forces a sync with slave, - // ensuring that req will be 0. It - // is recommended to write 0 to - // this register before power down - // of the master. +// signal. Writing 0 to this bit +// forces a sync with slave, +// ensuring that req will be 0. It +// is recommended to write 0 to +// this register before power down +// of the master. #define ADI_SLAVESTAT_DI_REQ_M 0x00000002 #define ADI_SLAVESTAT_DI_REQ_S 1 #define ADI_SLAVESTAT_DI_ACK 0x00000001 // Read current value of DI_ACK - // signal +// signal #define ADI_SLAVESTAT_DI_ACK_M 0x00000001 #define ADI_SLAVESTAT_DI_ACK_S 0 //***************************************************************************** @@ -208,38 +208,38 @@ // //***************************************************************************** #define ADI_SLAVECONF_CONFLOCK 0x00000080 // This register is no longer - // accessible when this bit is set. - // (unless sticky_bit_overwrite is - // asserted on top module) +// accessible when this bit is set. +// (unless sticky_bit_overwrite is +// asserted on top module) #define ADI_SLAVECONF_CONFLOCK_M \ - 0x00000080 + 0x00000080 #define ADI_SLAVECONF_CONFLOCK_S 7 #define ADI_SLAVECONF_WAITFORACK \ - 0x00000004 // A transaction on the ADI - // interface does not end until ack - // has been received from the slave - // when this bit is set. + 0x00000004 // A transaction on the ADI +// interface does not end until ack +// has been received from the slave +// when this bit is set. #define ADI_SLAVECONF_WAITFORACK_M \ - 0x00000004 + 0x00000004 #define ADI_SLAVECONF_WAITFORACK_S 2 #define ADI_SLAVECONF_ADICLKSPEED_M \ - 0x00000003 // Sets the period of an ADI - // transactions. All transactions - // takes an even number of clock - // cycles,- ADI clock rising edge - // occurs in the middle of the - // period. Data and ctrl to slave - // is set up in beginning of cycle, - // and data from slave is read in - // after the transaction 00: An ADI - // transaction takes 2 master clock - // cyclkes 01: An ADI transaction - // takes 4 master clock cycles 10: - // And ADI Transaction takes 8 - // master clock cycles 11: An ADI - // transaction takes 16 master - // clock cycles + 0x00000003 // Sets the period of an ADI +// transactions. All transactions +// takes an even number of clock +// cycles,- ADI clock rising edge +// occurs in the middle of the +// period. Data and ctrl to slave +// is set up in beginning of cycle, +// and data from slave is read in +// after the transaction 00: An ADI +// transaction takes 2 master clock +// cyclkes 01: An ADI transaction +// takes 4 master clock cycles 10: +// And ADI Transaction takes 8 +// master clock cycles 11: An ADI +// transaction takes 16 master +// clock cycles #define ADI_SLAVECONF_ADICLKSPEED_S 0 @@ -251,104 +251,104 @@ // //***************************************************************************** #define ADI_O_DIR03 0x00000000 // Direct access for adi byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_DIR47 0x00000004 // Direct access for adi byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_DIR811 0x00000008 // Direct access for adi byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_DIR1215 0x0000000C // Direct access for adi byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_SET03 0x00000010 // Set register for ADI byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_SET47 0x00000014 // Set register for ADI byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_SET811 0x00000018 // Set register for ADI byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_SET1215 0x0000001C // Set register for ADI byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_CLR03 0x00000020 // Clear register for ADI byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_CLR47 0x00000024 // Clear register for ADI byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_CLR811 0x00000028 // Clear register for ADI byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_CLR1215 0x0000002C // Clear register for ADI byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_SLAVESTAT 0x00000030 // ADI Slave status register #define ADI_O_SLAVECONF 0x00000038 // ADI Master configuration - // register +// register #define ADI_O_MASK4B01 0x00000040 // Masked access (4m/4d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK4B23 0x00000044 // Masked access (4m/4d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK4B45 0x00000048 // Masked access (4m/4d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK4B67 0x0000004C // Masked access (4m/4d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK4B89 0x00000050 // Masked access (4m/4d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK4B1011 0x00000054 // Masked access (4m/4d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK4B1213 0x00000058 // Masked access (4m/4d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK4B1415 0x0000005C // Masked access (4m/4d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 #define ADI_O_MASK8B01 0x00000060 // Masked access (8m/8d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK8B23 0x00000064 // Masked access (8m/8d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK8B45 0x00000068 // Masked access (8m/8d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK8B67 0x0000006C // Masked access (8m/8d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK8B89 0x00000070 // Masked access (8m/8d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK8B1011 0x00000074 // Masked access (8m/8d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK8B1213 0x00000078 // Masked access (8m/8d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK8B1415 0x0000007C // Masked access (8m/8d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 #define ADI_O_MASK16B01 0x00000080 // Masked access (16m/16d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK16B23 0x00000084 // Masked access (16m/16d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK16B45 0x00000088 // Masked access (16m/16d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK16B67 0x0000008C // Masked access (16m/16d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK16B89 0x00000090 // Masked access (16m/16d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK16B1011 0x00000094 // Masked access (16m/16d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK16B1213 0x00000098 // Masked access (16m/16d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK16B1415 0x0000009C // Masked access (16m/16d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 //***************************************************************************** // @@ -382,10 +382,10 @@ // //***************************************************************************** #define ADI_DIR811_B3_M 0xFF000000 // Direct access to ADI register - // 11 +// 11 #define ADI_DIR811_B3_S 24 #define ADI_DIR811_B2_M 0x00FF0000 // Direct access to ADI register - // 10 +// 10 #define ADI_DIR811_B2_S 16 #define ADI_DIR811_B1_M 0x0000FF00 // Direct access to ADI register 9 #define ADI_DIR811_B1_S 8 @@ -397,16 +397,16 @@ // //***************************************************************************** #define ADI_DIR1215_B3_M 0xFF000000 // Direct access to ADI register - // 15 +// 15 #define ADI_DIR1215_B3_S 24 #define ADI_DIR1215_B2_M 0x00FF0000 // Direct access to ADI register - // 14 +// 14 #define ADI_DIR1215_B2_S 16 #define ADI_DIR1215_B1_M 0x0000FF00 // Direct access to ADI register - // 13 +// 13 #define ADI_DIR1215_B1_S 8 #define ADI_DIR1215_B0_M 0x000000FF // Direct access to ADI register - // 12 +// 12 #define ADI_DIR1215_B0_S 0 //***************************************************************************** // @@ -414,20 +414,20 @@ // //***************************************************************************** #define ADI_SET03_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 3. Read returns 0. +// corresponding bit in ADI +// register 3. Read returns 0. #define ADI_SET03_S3_S 24 #define ADI_SET03_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 2. Read returns 0. +// corresponding bit in ADI +// register 2. Read returns 0. #define ADI_SET03_S2_S 16 #define ADI_SET03_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 1. Read returns 0. +// corresponding bit in ADI +// register 1. Read returns 0. #define ADI_SET03_S1_S 8 #define ADI_SET03_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 0. Read returns 0. +// corresponding bit in ADI +// register 0. Read returns 0. #define ADI_SET03_S0_S 0 //***************************************************************************** // @@ -435,20 +435,20 @@ // //***************************************************************************** #define ADI_SET47_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 7. Read returns 0. +// corresponding bit in ADI +// register 7. Read returns 0. #define ADI_SET47_S3_S 24 #define ADI_SET47_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 6. Read returns 0. +// corresponding bit in ADI +// register 6. Read returns 0. #define ADI_SET47_S2_S 16 #define ADI_SET47_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 5. Read returns 0. +// corresponding bit in ADI +// register 5. Read returns 0. #define ADI_SET47_S1_S 8 #define ADI_SET47_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 4. Read returns 0. +// corresponding bit in ADI +// register 4. Read returns 0. #define ADI_SET47_S0_S 0 //***************************************************************************** // @@ -456,20 +456,20 @@ // //***************************************************************************** #define ADI_SET811_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 11. Read returns 0. +// corresponding bit in ADI +// register 11. Read returns 0. #define ADI_SET811_S3_S 24 #define ADI_SET811_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 10. Read returns 0. +// corresponding bit in ADI +// register 10. Read returns 0. #define ADI_SET811_S2_S 16 #define ADI_SET811_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 9. Read returns 0. +// corresponding bit in ADI +// register 9. Read returns 0. #define ADI_SET811_S1_S 8 #define ADI_SET811_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 8. Read returns 0. +// corresponding bit in ADI +// register 8. Read returns 0. #define ADI_SET811_S0_S 0 //***************************************************************************** // @@ -477,20 +477,20 @@ // //***************************************************************************** #define ADI_SET1215_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 15. Read returns 0. +// corresponding bit in ADI +// register 15. Read returns 0. #define ADI_SET1215_S3_S 24 #define ADI_SET1215_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 14. Read returns 0. +// corresponding bit in ADI +// register 14. Read returns 0. #define ADI_SET1215_S2_S 16 #define ADI_SET1215_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 13. Read returns 0. +// corresponding bit in ADI +// register 13. Read returns 0. #define ADI_SET1215_S1_S 8 #define ADI_SET1215_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 12. Read returns 0. +// corresponding bit in ADI +// register 12. Read returns 0. #define ADI_SET1215_S0_S 0 //***************************************************************************** // @@ -498,20 +498,20 @@ // //***************************************************************************** #define ADI_CLR03_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 3 +// corresponding bit in ADI +// register 3 #define ADI_CLR03_S3_S 24 #define ADI_CLR03_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 2 +// corresponding bit in ADI +// register 2 #define ADI_CLR03_S2_S 16 #define ADI_CLR03_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 1 +// corresponding bit in ADI +// register 1 #define ADI_CLR03_S1_S 8 #define ADI_CLR03_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 0 +// corresponding bit in ADI +// register 0 #define ADI_CLR03_S0_S 0 //***************************************************************************** // @@ -519,20 +519,20 @@ // //***************************************************************************** #define ADI_CLR47_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 7 +// corresponding bit in ADI +// register 7 #define ADI_CLR47_S3_S 24 #define ADI_CLR47_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 6 +// corresponding bit in ADI +// register 6 #define ADI_CLR47_S2_S 16 #define ADI_CLR47_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 5 +// corresponding bit in ADI +// register 5 #define ADI_CLR47_S1_S 8 #define ADI_CLR47_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 4 +// corresponding bit in ADI +// register 4 #define ADI_CLR47_S0_S 0 //***************************************************************************** // @@ -540,20 +540,20 @@ // //***************************************************************************** #define ADI_CLR811_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 11 +// corresponding bit in ADI +// register 11 #define ADI_CLR811_S3_S 24 #define ADI_CLR811_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 10 +// corresponding bit in ADI +// register 10 #define ADI_CLR811_S2_S 16 #define ADI_CLR811_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 9 +// corresponding bit in ADI +// register 9 #define ADI_CLR811_S1_S 8 #define ADI_CLR811_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 8 +// corresponding bit in ADI +// register 8 #define ADI_CLR811_S0_S 0 //***************************************************************************** // @@ -561,20 +561,20 @@ // //***************************************************************************** #define ADI_CLR1215_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 15 +// corresponding bit in ADI +// register 15 #define ADI_CLR1215_S3_S 24 #define ADI_CLR1215_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 14 +// corresponding bit in ADI +// register 14 #define ADI_CLR1215_S2_S 16 #define ADI_CLR1215_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 13 +// corresponding bit in ADI +// register 13 #define ADI_CLR1215_S1_S 8 #define ADI_CLR1215_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 12 +// corresponding bit in ADI +// register 12 #define ADI_CLR1215_S0_S 0 //***************************************************************************** // @@ -583,16 +583,16 @@ // //***************************************************************************** #define ADI_SLAVESTAT_DI_REQ 0x00000002 // Read current value of DI_REQ - // signal. Writing 0 to this bit - // forces a sync with slave, - // ensuring that req will be 0. It - // is recommended to write 0 to - // this register before power down - // of the master. +// signal. Writing 0 to this bit +// forces a sync with slave, +// ensuring that req will be 0. It +// is recommended to write 0 to +// this register before power down +// of the master. #define ADI_SLAVESTAT_DI_REQ_M 0x00000002 #define ADI_SLAVESTAT_DI_REQ_S 1 #define ADI_SLAVESTAT_DI_ACK 0x00000001 // Read current value of DI_ACK - // signal +// signal #define ADI_SLAVESTAT_DI_ACK_M 0x00000001 #define ADI_SLAVESTAT_DI_ACK_S 0 //***************************************************************************** @@ -602,38 +602,38 @@ // //***************************************************************************** #define ADI_SLAVECONF_CONFLOCK 0x00000080 // This register is no longer - // accessible when this bit is set. - // (unless sticky_bit_overwrite is - // asserted on top module) +// accessible when this bit is set. +// (unless sticky_bit_overwrite is +// asserted on top module) #define ADI_SLAVECONF_CONFLOCK_M \ - 0x00000080 + 0x00000080 #define ADI_SLAVECONF_CONFLOCK_S 7 #define ADI_SLAVECONF_WAITFORACK \ - 0x00000004 // A transaction on the ADI - // interface does not end until ack - // has been received from the slave - // when this bit is set. + 0x00000004 // A transaction on the ADI +// interface does not end until ack +// has been received from the slave +// when this bit is set. #define ADI_SLAVECONF_WAITFORACK_M \ - 0x00000004 + 0x00000004 #define ADI_SLAVECONF_WAITFORACK_S 2 #define ADI_SLAVECONF_ADICLKSPEED_M \ - 0x00000003 // Sets the period of an ADI - // transactions. All transactions - // takes an even number of clock - // cycles,- ADI clock rising edge - // occurs in the middle of the - // period. Data and ctrl to slave - // is set up in beginning of cycle, - // and data from slave is read in - // after the transaction 00: An ADI - // transaction takes 2 master clock - // cyclkes 01: An ADI transaction - // takes 4 master clock cycles 10: - // And ADI Transaction takes 8 - // master clock cycles 11: An ADI - // transaction takes 16 master - // clock cycles + 0x00000003 // Sets the period of an ADI +// transactions. All transactions +// takes an even number of clock +// cycles,- ADI clock rising edge +// occurs in the middle of the +// period. Data and ctrl to slave +// is set up in beginning of cycle, +// and data from slave is read in +// after the transaction 00: An ADI +// transaction takes 2 master clock +// cyclkes 01: An ADI transaction +// takes 4 master clock cycles 10: +// And ADI Transaction takes 8 +// master clock cycles 11: An ADI +// transaction takes 16 master +// clock cycles #define ADI_SLAVECONF_ADICLKSPEED_S 0 //***************************************************************************** @@ -642,36 +642,36 @@ // //***************************************************************************** #define ADI_MASK4B01_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 1 +// register 1 #define ADI_MASK4B01_M1H_S 28 #define ADI_MASK4B01_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 1, - only bits selected - // by mask M1H will be affected by - // access +// register 1, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B01_D1H_S 24 #define ADI_MASK4B01_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 1 +// register 1 #define ADI_MASK4B01_M1L_S 20 #define ADI_MASK4B01_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 1, - only bits selected - // by mask M1L will be affected by - // access +// register 1, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B01_D1L_S 16 #define ADI_MASK4B01_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 0 +// register 0 #define ADI_MASK4B01_M0H_S 12 #define ADI_MASK4B01_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 0, - only bits selected - // by mask M0H will be affected by - // access +// register 0, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B01_D0H_S 8 #define ADI_MASK4B01_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 0 +// register 0 #define ADI_MASK4B01_M0L_S 4 #define ADI_MASK4B01_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 0, - only bits selected - // by mask M0L will be affected by - // access +// register 0, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B01_D0L_S 0 //***************************************************************************** // @@ -679,36 +679,36 @@ // //***************************************************************************** #define ADI_MASK4B23_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 3 +// register 3 #define ADI_MASK4B23_M1H_S 28 #define ADI_MASK4B23_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 3, - only bits selected - // by mask M1H will be affected by - // access +// register 3, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B23_D1H_S 24 #define ADI_MASK4B23_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 3 +// register 3 #define ADI_MASK4B23_M1L_S 20 #define ADI_MASK4B23_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 3, - only bits selected - // by mask M1L will be affected by - // access +// register 3, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B23_D1L_S 16 #define ADI_MASK4B23_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 2 +// register 2 #define ADI_MASK4B23_M0H_S 12 #define ADI_MASK4B23_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 2, - only bits selected - // by mask M0H will be affected by - // access +// register 2, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B23_D0H_S 8 #define ADI_MASK4B23_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 2 +// register 2 #define ADI_MASK4B23_M0L_S 4 #define ADI_MASK4B23_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 2, - only bits selected - // by mask M0L will be affected by - // access +// register 2, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B23_D0L_S 0 //***************************************************************************** // @@ -716,36 +716,36 @@ // //***************************************************************************** #define ADI_MASK4B45_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 5 +// register 5 #define ADI_MASK4B45_M1H_S 28 #define ADI_MASK4B45_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 5, - only bits selected - // by mask M1H will be affected by - // access +// register 5, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B45_D1H_S 24 #define ADI_MASK4B45_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 5 +// register 5 #define ADI_MASK4B45_M1L_S 20 #define ADI_MASK4B45_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 5, - only bits selected - // by mask M1L will be affected by - // access +// register 5, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B45_D1L_S 16 #define ADI_MASK4B45_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 4 +// register 4 #define ADI_MASK4B45_M0H_S 12 #define ADI_MASK4B45_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 4, - only bits selected - // by mask M0H will be affected by - // access +// register 4, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B45_D0H_S 8 #define ADI_MASK4B45_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 4 +// register 4 #define ADI_MASK4B45_M0L_S 4 #define ADI_MASK4B45_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 4, - only bits selected - // by mask M0L will be affected by - // access +// register 4, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B45_D0L_S 0 //***************************************************************************** // @@ -753,36 +753,36 @@ // //***************************************************************************** #define ADI_MASK4B67_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 7 +// register 7 #define ADI_MASK4B67_M1H_S 28 #define ADI_MASK4B67_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 7, - only bits selected - // by mask M1H will be affected by - // access +// register 7, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B67_D1H_S 24 #define ADI_MASK4B67_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 7 +// register 7 #define ADI_MASK4B67_M1L_S 20 #define ADI_MASK4B67_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 7, - only bits selected - // by mask M1L will be affected by - // access +// register 7, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B67_D1L_S 16 #define ADI_MASK4B67_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 6 +// register 6 #define ADI_MASK4B67_M0H_S 12 #define ADI_MASK4B67_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 6, - only bits selected - // by mask M0H will be affected by - // access +// register 6, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B67_D0H_S 8 #define ADI_MASK4B67_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 6 +// register 6 #define ADI_MASK4B67_M0L_S 4 #define ADI_MASK4B67_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 6, - only bits selected - // by mask M0L will be affected by - // access +// register 6, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B67_D0L_S 0 //***************************************************************************** // @@ -790,36 +790,36 @@ // //***************************************************************************** #define ADI_MASK4B89_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 9 +// register 9 #define ADI_MASK4B89_M1H_S 28 #define ADI_MASK4B89_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 9, - only bits selected - // by mask M1H will be affected by - // access +// register 9, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B89_D1H_S 24 #define ADI_MASK4B89_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 9 +// register 9 #define ADI_MASK4B89_M1L_S 20 #define ADI_MASK4B89_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 9, - only bits selected - // by mask M1L will be affected by - // access +// register 9, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B89_D1L_S 16 #define ADI_MASK4B89_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 8 +// register 8 #define ADI_MASK4B89_M0H_S 12 #define ADI_MASK4B89_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 8, - only bits selected - // by mask M0H will be affected by - // access +// register 8, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B89_D0H_S 8 #define ADI_MASK4B89_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 8 +// register 8 #define ADI_MASK4B89_M0L_S 4 #define ADI_MASK4B89_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 8, - only bits selected - // by mask M0L will be affected by - // access +// register 8, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B89_D0L_S 0 //***************************************************************************** // @@ -828,36 +828,36 @@ // //***************************************************************************** #define ADI_MASK4B1011_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 11 +// register 11 #define ADI_MASK4B1011_M1H_S 28 #define ADI_MASK4B1011_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 11, - only bits - // selected by mask M1H will be - // affected by access +// register 11, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1011_D1H_S 24 #define ADI_MASK4B1011_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 11 +// register 11 #define ADI_MASK4B1011_M1L_S 20 #define ADI_MASK4B1011_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 11, - only bits - // selected by mask M1L will be - // affected by access +// register 11, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1011_D1L_S 16 #define ADI_MASK4B1011_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 10 +// register 10 #define ADI_MASK4B1011_M0H_S 12 #define ADI_MASK4B1011_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 10, - only bits - // selected by mask M0H will be - // affected by access +// register 10, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1011_D0H_S 8 #define ADI_MASK4B1011_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 10 +// register 10 #define ADI_MASK4B1011_M0L_S 4 #define ADI_MASK4B1011_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 10, - only bits - // selected by mask M0L will be - // affected by access +// register 10, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1011_D0L_S 0 //***************************************************************************** // @@ -866,36 +866,36 @@ // //***************************************************************************** #define ADI_MASK4B1213_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 13 +// register 13 #define ADI_MASK4B1213_M1H_S 28 #define ADI_MASK4B1213_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 13, - only bits - // selected by mask M1H will be - // affected by access +// register 13, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1213_D1H_S 24 #define ADI_MASK4B1213_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 13 +// register 13 #define ADI_MASK4B1213_M1L_S 20 #define ADI_MASK4B1213_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 13, - only bits - // selected by mask M1L will be - // affected by access +// register 13, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1213_D1L_S 16 #define ADI_MASK4B1213_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 12 +// register 12 #define ADI_MASK4B1213_M0H_S 12 #define ADI_MASK4B1213_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 12, - only bits - // selected by mask M0H will be - // affected by access +// register 12, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1213_D0H_S 8 #define ADI_MASK4B1213_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 12 +// register 12 #define ADI_MASK4B1213_M0L_S 4 #define ADI_MASK4B1213_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 12, - only bits - // selected by mask M0L will be - // affected by access +// register 12, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1213_D0L_S 0 //***************************************************************************** // @@ -904,36 +904,36 @@ // //***************************************************************************** #define ADI_MASK4B1415_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 15 +// register 15 #define ADI_MASK4B1415_M1H_S 28 #define ADI_MASK4B1415_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 15, - only bits - // selected by mask M1H will be - // affected by access +// register 15, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1415_D1H_S 24 #define ADI_MASK4B1415_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 15 +// register 15 #define ADI_MASK4B1415_M1L_S 20 #define ADI_MASK4B1415_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 15, - only bits - // selected by mask M1L will be - // affected by access +// register 15, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1415_D1L_S 16 #define ADI_MASK4B1415_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 14 +// register 14 #define ADI_MASK4B1415_M0H_S 12 #define ADI_MASK4B1415_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 14, - only bits - // selected by mask M0H will be - // affected by access +// register 14, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1415_D0H_S 8 #define ADI_MASK4B1415_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 14 +// register 14 #define ADI_MASK4B1415_M0L_S 4 #define ADI_MASK4B1415_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 14, - only bits - // selected by mask M0L will be - // affected by access +// register 14, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1415_D0L_S 0 //***************************************************************************** // @@ -943,14 +943,14 @@ #define ADI_MASK8B01_M1_M 0xFF000000 // Mask for ADI register 1 #define ADI_MASK8B01_M1_S 24 #define ADI_MASK8B01_D1_M 0x00FF0000 // Data for ADI register 1, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B01_D1_S 16 #define ADI_MASK8B01_M0_M 0x0000FF00 // Mask for ADI register 0 #define ADI_MASK8B01_M0_S 8 #define ADI_MASK8B01_D0_M 0x000000FF // Data for ADI register 0, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B01_D0_S 0 //***************************************************************************** // @@ -960,14 +960,14 @@ #define ADI_MASK8B23_M1_M 0xFF000000 // Mask for ADI register 3 #define ADI_MASK8B23_M1_S 24 #define ADI_MASK8B23_D1_M 0x00FF0000 // Data for ADI register 3, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B23_D1_S 16 #define ADI_MASK8B23_M0_M 0x0000FF00 // Mask for ADI register 2 #define ADI_MASK8B23_M0_S 8 #define ADI_MASK8B23_D0_M 0x000000FF // Data for ADI register 2, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B23_D0_S 0 //***************************************************************************** // @@ -977,14 +977,14 @@ #define ADI_MASK8B45_M1_M 0xFF000000 // Mask for ADI register 5 #define ADI_MASK8B45_M1_S 24 #define ADI_MASK8B45_D1_M 0x00FF0000 // Data for ADI register 5, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B45_D1_S 16 #define ADI_MASK8B45_M0_M 0x0000FF00 // Mask for ADI register 4 #define ADI_MASK8B45_M0_S 8 #define ADI_MASK8B45_D0_M 0x000000FF // Data for ADI register 4, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B45_D0_S 0 //***************************************************************************** // @@ -994,14 +994,14 @@ #define ADI_MASK8B67_M1_M 0xFF000000 // Mask for ADI register 7 #define ADI_MASK8B67_M1_S 24 #define ADI_MASK8B67_D1_M 0x00FF0000 // Data for ADI register 7, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B67_D1_S 16 #define ADI_MASK8B67_M0_M 0x0000FF00 // Mask for ADI register 6 #define ADI_MASK8B67_M0_S 8 #define ADI_MASK8B67_D0_M 0x000000FF // Data for ADI register 6, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B67_D0_S 0 //***************************************************************************** // @@ -1011,14 +1011,14 @@ #define ADI_MASK8B89_M1_M 0xFF000000 // Mask for ADI register 9 #define ADI_MASK8B89_M1_S 24 #define ADI_MASK8B89_D1_M 0x00FF0000 // Data for ADI register 9, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B89_D1_S 16 #define ADI_MASK8B89_M0_M 0x0000FF00 // Mask for ADI register 8 #define ADI_MASK8B89_M0_S 8 #define ADI_MASK8B89_D0_M 0x000000FF // Data for ADI register 8, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B89_D0_S 0 //***************************************************************************** // @@ -1029,14 +1029,14 @@ #define ADI_MASK8B1011_M1_M 0xFF000000 // Mask for ADI register 11 #define ADI_MASK8B1011_M1_S 24 #define ADI_MASK8B1011_D1_M 0x00FF0000 // Data for ADI register 11, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1011_D1_S 16 #define ADI_MASK8B1011_M0_M 0x0000FF00 // Mask for ADI register 10 #define ADI_MASK8B1011_M0_S 8 #define ADI_MASK8B1011_D0_M 0x000000FF // Data for ADI register 10, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1011_D0_S 0 //***************************************************************************** // @@ -1047,14 +1047,14 @@ #define ADI_MASK8B1213_M1_M 0xFF000000 // Mask for ADI register 13 #define ADI_MASK8B1213_M1_S 24 #define ADI_MASK8B1213_D1_M 0x00FF0000 // Data for ADI register 13, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1213_D1_S 16 #define ADI_MASK8B1213_M0_M 0x0000FF00 // Mask for ADI register 12 #define ADI_MASK8B1213_M0_S 8 #define ADI_MASK8B1213_D0_M 0x000000FF // Data for ADI register 12, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1213_D0_S 0 //***************************************************************************** // @@ -1065,14 +1065,14 @@ #define ADI_MASK8B1415_M1_M 0xFF000000 // Mask for ADI register 15 #define ADI_MASK8B1415_M1_S 24 #define ADI_MASK8B1415_D1_M 0x00FF0000 // Data for ADI register 15, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1415_D1_S 16 #define ADI_MASK8B1415_M0_M 0x0000FF00 // Mask for ADI register 14 #define ADI_MASK8B1415_M0_S 8 #define ADI_MASK8B1415_D0_M 0x000000FF // Data for ADI register 14, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1415_D0_S 0 //***************************************************************************** // @@ -1083,9 +1083,9 @@ #define ADI_MASK16B01_M_M 0xFFFF0000 // Mask for ADI register 0 and 1 #define ADI_MASK16B01_M_S 16 #define ADI_MASK16B01_D_M 0x0000FFFF // Data for ADI register at - // offsets 0 and 1, - only bits - // selected by mask M will be - // affected by access +// offsets 0 and 1, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B01_D_S 0 //***************************************************************************** // @@ -1096,9 +1096,9 @@ #define ADI_MASK16B23_M_M 0xFFFF0000 // Mask for ADI register 2 and 3 #define ADI_MASK16B23_M_S 16 #define ADI_MASK16B23_D_M 0x0000FFFF // Data for ADI register at - // offsets 2 and 3, - only bits - // selected by mask M will be - // affected by access +// offsets 2 and 3, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B23_D_S 0 //***************************************************************************** // @@ -1109,9 +1109,9 @@ #define ADI_MASK16B45_M_M 0xFFFF0000 // Mask for ADI register 4 and 5 #define ADI_MASK16B45_M_S 16 #define ADI_MASK16B45_D_M 0x0000FFFF // Data for ADI register at - // offsets 4 and 5, - only bits - // selected by mask M will be - // affected by access +// offsets 4 and 5, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B45_D_S 0 //***************************************************************************** // @@ -1122,9 +1122,9 @@ #define ADI_MASK16B67_M_M 0xFFFF0000 // Mask for ADI register 6 and 7 #define ADI_MASK16B67_M_S 16 #define ADI_MASK16B67_D_M 0x0000FFFF // Data for ADI register at - // offsets 6 and 7, - only bits - // selected by mask M will be - // affected by access +// offsets 6 and 7, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B67_D_S 0 //***************************************************************************** // @@ -1135,9 +1135,9 @@ #define ADI_MASK16B89_M_M 0xFFFF0000 // Mask for ADI register 8 and 9 #define ADI_MASK16B89_M_S 16 #define ADI_MASK16B89_D_M 0x0000FFFF // Data for ADI register at - // offsets 8 and 9, - only bits - // selected by mask M will be - // affected by access +// offsets 8 and 9, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B89_D_S 0 //***************************************************************************** // @@ -1148,9 +1148,9 @@ #define ADI_MASK16B1011_M_M 0xFFFF0000 // Mask for ADI register 10 and 11 #define ADI_MASK16B1011_M_S 16 #define ADI_MASK16B1011_D_M 0x0000FFFF // Data for ADI register at - // offsets 10 and 11, - only bits - // selected by mask M will be - // affected by access +// offsets 10 and 11, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1011_D_S 0 //***************************************************************************** // @@ -1161,9 +1161,9 @@ #define ADI_MASK16B1213_M_M 0xFFFF0000 // Mask for ADI register 12 and 13 #define ADI_MASK16B1213_M_S 16 #define ADI_MASK16B1213_D_M 0x0000FFFF // Data for ADI register at - // offsets 12 and 13, - only bits - // selected by mask M will be - // affected by access +// offsets 12 and 13, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1213_D_S 0 //***************************************************************************** // @@ -1174,9 +1174,9 @@ #define ADI_MASK16B1415_M_M 0xFFFF0000 // Mask for ADI register 14 and 15 #define ADI_MASK16B1415_M_S 16 #define ADI_MASK16B1415_D_M 0x0000FFFF // Data for ADI register at - // offsets 14 and 15, - only bits - // selected by mask M will be - // affected by access +// offsets 14 and 15, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1415_D_S 0 #endif // __HW_ADI_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi_3_refsys.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi_3_refsys.h index 5aab2222..b42dac8b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi_3_refsys.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_adi_3_refsys.h @@ -611,11 +611,11 @@ // // Step size = 0.67% of VDDR level. #define ADI_3_REFSYS_CTL_RECHARGE_CMP0_TRIM_RECHARGE_COMP_REFLEVEL_W \ - 4 + 4 #define ADI_3_REFSYS_CTL_RECHARGE_CMP0_TRIM_RECHARGE_COMP_REFLEVEL_M \ - 0x0000000F + 0x0000000F #define ADI_3_REFSYS_CTL_RECHARGE_CMP0_TRIM_RECHARGE_COMP_REFLEVEL_S \ - 0 + 0 //***************************************************************************** // @@ -631,13 +631,13 @@ // DIS Disable. VDDR input is connected to VDDR itself #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_VTRIG_EN 0x00000080 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_VTRIG_EN_M \ - 0x00000080 + 0x00000080 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_VTRIG_EN_S \ - 7 + 7 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_VTRIG_EN_EN \ - 0x00000080 + 0x00000080 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_VTRIG_EN_DIS \ - 0x00000000 + 0x00000000 // Field: [6] RECHARGE_BLOCK_ATEST_EN // @@ -647,13 +647,13 @@ // DIS Disable #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_ATEST_EN 0x00000040 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_ATEST_EN_M \ - 0x00000040 + 0x00000040 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_ATEST_EN_S \ - 6 + 6 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_ATEST_EN_EN \ - 0x00000040 + 0x00000040 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_RECHARGE_BLOCK_ATEST_EN_DIS \ - 0x00000000 + 0x00000000 // Field: [5] FORCE_SAMPLE_VDDR // @@ -675,11 +675,11 @@ // 0x1F: Maximum degeneration on reference side from cap divider. // 0x10: Nominal code. #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_TRIM_RECHARGE_COMP_OFFSET_W \ - 5 + 5 #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_TRIM_RECHARGE_COMP_OFFSET_M \ - 0x0000001F + 0x0000001F #define ADI_3_REFSYS_CTL_RECHARGE_CMP1_TRIM_RECHARGE_COMP_OFFSET_S \ - 0 + 0 #endif // __ADI_3_REFSYS__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ccfg_simple_struct.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ccfg_simple_struct.h index 9e59f455..b4034e8c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ccfg_simple_struct.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ccfg_simple_struct.h @@ -45,7 +45,8 @@ // //***************************************************************************** typedef struct -{ // Mapped to address +{ + // Mapped to address uint32_t CCFG_EXT_LF_CLK ; // 0x50004FA8 uint32_t CCFG_MODE_CONF_1 ; // 0x50004FAC uint32_t CCFG_SIZE_AND_DIS_FLAGS ; // 0x50004FB0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_chip_def.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_chip_def.h index b9b504f1..94df2fce 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_chip_def.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_chip_def.h @@ -65,132 +65,132 @@ extern "C" //***************************************************************************** /* CC2620F128 */ #if defined(CC2620F128RGZ_R20) || defined(CC2620F128RGZ_R21) - #define CC_CHIP_ID 0x26200720 +#define CC_CHIP_ID 0x26200720 #elif defined(CC2620F128RHB_R20) || defined(CC2620F128RHB_R21) - #define CC_CHIP_ID 0x26200520 +#define CC_CHIP_ID 0x26200520 #elif defined(CC2620F128RSM_R20) || defined(CC2620F128RSM_R21) - #define CC_CHIP_ID 0x26200420 +#define CC_CHIP_ID 0x26200420 #elif defined(CC2620F128_R20) || defined(CC2620F128_R21) - #define CC_CHIP_ID 0x26200020 +#define CC_CHIP_ID 0x26200020 #elif defined(CC2620F128RGZ_R22) || defined(CC2620F128RGZ) - #define CC_CHIP_ID 0x26200722 +#define CC_CHIP_ID 0x26200722 #elif defined(CC2620F128RHB_R22) || defined(CC2620F128RHB) - #define CC_CHIP_ID 0x26200522 +#define CC_CHIP_ID 0x26200522 #elif defined(CC2620F128RSM_R22) || defined(CC2620F128RSM) - #define CC_CHIP_ID 0x26200422 +#define CC_CHIP_ID 0x26200422 #elif defined(CC2620F128_R22) || defined(CC2620F128) - #define CC_CHIP_ID 0x26200022 +#define CC_CHIP_ID 0x26200022 /* CC2630F128 */ #elif defined(CC2630F128RGZ_R20) || defined(CC2630F128RGZ_R21) - #define CC_CHIP_ID 0x26300720 +#define CC_CHIP_ID 0x26300720 #elif defined(CC2630F128RHB_R20) || defined(CC2630F128RHB_R21) - #define CC_CHIP_ID 0x26300520 +#define CC_CHIP_ID 0x26300520 #elif defined(CC2630F128RSM_R20) || defined(CC2630F128RSM_R21) - #define CC_CHIP_ID 0x26300420 +#define CC_CHIP_ID 0x26300420 #elif defined(CC2630F128_R20) || defined(CC2630F128_R21) - #define CC_CHIP_ID 0x26300020 +#define CC_CHIP_ID 0x26300020 #elif defined(CC2630F128RGZ_R22) || defined(CC2630F128RGZ) - #define CC_CHIP_ID 0x26300722 +#define CC_CHIP_ID 0x26300722 #elif defined(CC2630F128RHB_R22) || defined(CC2630F128RHB) - #define CC_CHIP_ID 0x26300522 +#define CC_CHIP_ID 0x26300522 #elif defined(CC2630F128RSM_R22) || defined(CC2630F128RSM) - #define CC_CHIP_ID 0x26300422 +#define CC_CHIP_ID 0x26300422 #elif defined(CC2630F128_R22) || defined(CC2630F128) - #define CC_CHIP_ID 0x26300022 +#define CC_CHIP_ID 0x26300022 /* CC2640F128 */ #elif defined(CC2640F128RGZ_R20) || defined(CC2640F128RGZ_R21) - #define CC_CHIP_ID 0x26400720 +#define CC_CHIP_ID 0x26400720 #elif defined(CC2640F128RHB_R20) || defined(CC2640F128RHB_R21) - #define CC_CHIP_ID 0x26400520 +#define CC_CHIP_ID 0x26400520 #elif defined(CC2640F128RSM_R20) || defined(CC2640F128RSM_R21) - #define CC_CHIP_ID 0x26400420 +#define CC_CHIP_ID 0x26400420 #elif defined(CC2640F128_R20) || defined(CC2640F128_R21) - #define CC_CHIP_ID 0x26400020 +#define CC_CHIP_ID 0x26400020 #elif defined(CC2640F128RGZ_R22) || defined(CC2640F128RGZ) - #define CC_CHIP_ID 0x26400722 +#define CC_CHIP_ID 0x26400722 #elif defined(CC2640F128RHB_R22) || defined(CC2640F128RHB) - #define CC_CHIP_ID 0x26400522 +#define CC_CHIP_ID 0x26400522 #elif defined(CC2640F128RSM_R22) || defined(CC2640F128RSM) - #define CC_CHIP_ID 0x26400422 +#define CC_CHIP_ID 0x26400422 #elif defined(CC2640F128_R22) || defined(CC2640F128) - #define CC_CHIP_ID 0x26400022 +#define CC_CHIP_ID 0x26400022 /* CC2650F128 */ #elif defined(CC2650F128RGZ_R20) || defined(CC2650F128RGZ_R21) - #define CC_CHIP_ID 0x26500720 +#define CC_CHIP_ID 0x26500720 #elif defined(CC2650F128RHB_R20) || defined(CC2650F128RHB_R21) - #define CC_CHIP_ID 0x26500520 +#define CC_CHIP_ID 0x26500520 #elif defined(CC2650F128RSM_R20) || defined(CC2650F128RSM_R21) - #define CC_CHIP_ID 0x26500420 +#define CC_CHIP_ID 0x26500420 #elif defined(CC2650F128_R20) || defined(CC2650F128_R21) - #define CC_CHIP_ID 0x26500020 +#define CC_CHIP_ID 0x26500020 #elif defined(CC2650F128RGZ_R22) || defined(CC2650F128RGZ) - #define CC_CHIP_ID 0x26500722 +#define CC_CHIP_ID 0x26500722 #elif defined(CC2650F128RHB_R22) || defined(CC2650F128RHB) - #define CC_CHIP_ID 0x26500522 +#define CC_CHIP_ID 0x26500522 #elif defined(CC2650F128RSM_R22) || defined(CC2650F128RSM) - #define CC_CHIP_ID 0x26500422 +#define CC_CHIP_ID 0x26500422 #elif defined(CC2650F128_R22) || defined(CC2650F128) - #define CC_CHIP_ID 0x26500022 +#define CC_CHIP_ID 0x26500022 /* CC2650L128 (OTP) */ #elif defined(CC2650L128) - #define CC_CHIP_ID 0x26501710 +#define CC_CHIP_ID 0x26501710 /* CC1310F128 */ #elif defined(CC1310F128RGZ_R20) || defined(CC1310F128RGZ) - #define CC_CHIP_ID 0x13100720 +#define CC_CHIP_ID 0x13100720 #elif defined(CC1310F128RHB_R20) || defined(CC1310F128RHB) - #define CC_CHIP_ID 0x13100520 +#define CC_CHIP_ID 0x13100520 #elif defined(CC1310F128RSM_R20) || defined(CC1310F128RSM) - #define CC_CHIP_ID 0x13100420 +#define CC_CHIP_ID 0x13100420 #elif defined(CC1310F128_R20) || defined(CC1310F128) - #define CC_CHIP_ID 0x13100020 +#define CC_CHIP_ID 0x13100020 /* CC1350F128 */ #elif defined(CC1350F128RGZ_R20) || defined(CC1350F128RGZ) - #define CC_CHIP_ID 0x13500720 +#define CC_CHIP_ID 0x13500720 #elif defined(CC1350F128RHB_R20) || defined(CC1350F128RHB) - #define CC_CHIP_ID 0x13500520 +#define CC_CHIP_ID 0x13500520 #elif defined(CC1350F128RSM_R20) || defined(CC1350F128RSM) - #define CC_CHIP_ID 0x13500420 +#define CC_CHIP_ID 0x13500420 #elif defined(CC1350F128_R20) || defined(CC1350F128) - #define CC_CHIP_ID 0x13500020 +#define CC_CHIP_ID 0x13500020 /* CC2640R2F */ #elif defined(CC2640R2FRGZ_R25) || defined(CC2640R2FRGZ) - #define CC_CHIP_ID 0x26401710 +#define CC_CHIP_ID 0x26401710 #elif defined(CC2640R2FRHB_R25) || defined(CC2640R2FRHB) - #define CC_CHIP_ID 0x26401510 +#define CC_CHIP_ID 0x26401510 #elif defined(CC2640R2FRSM_R25) || defined(CC2640R2FRSM) - #define CC_CHIP_ID 0x26401410 +#define CC_CHIP_ID 0x26401410 #elif defined(CC2640R2F_R25) || defined(CC2640R2F) - #define CC_CHIP_ID 0x26401010 +#define CC_CHIP_ID 0x26401010 /* CC2652R1F */ #elif defined(CC2652R1FRGZ_R10) || defined(CC2652R1FRGZ) - #define CC_CHIP_ID 0x26523710 +#define CC_CHIP_ID 0x26523710 #elif defined(CC2652R1F_R10) || defined(CC2652R1F) - #define CC_CHIP_ID 0x26523010 +#define CC_CHIP_ID 0x26523010 /* CC2644R1F */ #elif defined(CC2644R1FRGZ_R10) || defined(CC2644R1FRGZ) - #define CC_CHIP_ID 0x26443710 +#define CC_CHIP_ID 0x26443710 #elif defined(CC2644R1F_R10) || defined(CC2644R1F) - #define CC_CHIP_ID 0x26443010 +#define CC_CHIP_ID 0x26443010 /* CC2642R1F */ #elif defined(CC2642R1FRGZ_R10) || defined(CC2642R1FRGZ) - #define CC_CHIP_ID 0x26423710 +#define CC_CHIP_ID 0x26423710 #elif defined(CC2642R1F_R10) || defined(CC2642R1F) - #define CC_CHIP_ID 0x26423010 +#define CC_CHIP_ID 0x26423010 /* CC1354R1F */ #elif defined(CC1354R1FRGZ_R10) || defined(CC1354R1FRGZ) - #define CC_CHIP_ID 0x13543710 +#define CC_CHIP_ID 0x13543710 #elif defined(CC1354R1F_R10) || defined(CC1354R1F) - #define CC_CHIP_ID 0x13543010 +#define CC_CHIP_ID 0x13543010 /* CC1352R1F */ #elif defined(CC1352R1FRGZ_R10) || defined(CC1352R1FRGZ) - #define CC_CHIP_ID 0x13523710 +#define CC_CHIP_ID 0x13523710 #elif defined(CC1352R1F_R10) || defined(CC1352R1F) - #define CC_CHIP_ID 0x13523010 +#define CC_CHIP_ID 0x13523010 /* CC1312R1F */ #elif defined(CC1312R1FRGZ_R10) || defined(CC1312R1FRGZ) - #define CC_CHIP_ID 0x13123710 +#define CC_CHIP_ID 0x13123710 #elif defined(CC1312R1F_R10) || defined(CC1312R1F) - #define CC_CHIP_ID 0x13123010 +#define CC_CHIP_ID 0x13123010 #endif #define CC_GET_CHIP_FAMILY 0x26 @@ -198,21 +198,21 @@ extern "C" #define CC_GET_CHIP_HWREV 0x20 #ifdef CC_CHIP_ID - /* Define chip package only if specified */ - #if (CC_CHIP_ID & 0x00000F00) != 0 - #define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) - #endif +/* Define chip package only if specified */ +#if (CC_CHIP_ID & 0x00000F00) != 0 +#define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) +#endif - /* Define chip device */ - #define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) +/* Define chip device */ +#define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) - /* The chip family, option and package shall match the DriverLib release */ - #if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) - #error "Specified chip option does not match DriverLib release" - #endif - #if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) - #error "Specified chip hardware revision does not match DriverLib release" - #endif +/* The chip family, option and package shall match the DriverLib release */ +#if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) +#error "Specified chip option does not match DriverLib release" +#endif +#if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) +#error "Specified chip hardware revision does not match DriverLib release" +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ddi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ddi.h index 51e48a4c..03edea66 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ddi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ddi.h @@ -180,17 +180,17 @@ #define DDI_O_SET 0x00000080 // Offset for 'Set' instruction. #define DDI_O_CLR 0x00000100 // Offset for 'Clear' instruction. #define DDI_O_MASK4B 0x00000200 // Offset for 4-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 7:4 are mask. Bits 3:0 are data. - // Requires 'byte' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 7:4 are mask. Bits 3:0 are data. +// Requires 'byte' write. #define DDI_O_MASK8B 0x00000300 // Offset for 8-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 15:8 are mask. Bits 7:0 are data. - // Requires 'short' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 15:8 are mask. Bits 7:0 are data. +// Requires 'short' write. #define DDI_O_MASK16B 0x00000400 // Offset for 16-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 31:16 are mask. Bits 15:0 are data. - // Requires 'long' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 31:16 are mask. Bits 15:0 are data. +// Requires 'long' write. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_fcfg1.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_fcfg1.h index 31bca682..9abcaa10 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_fcfg1.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_fcfg1.h @@ -635,13 +635,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV2_CC26_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC26_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV2_CC26_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC26_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -673,13 +673,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV2_CC13_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC13_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV2_CC13_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC13_2G4_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -711,13 +711,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV2_CC26_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC26_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV2_CC26_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC26_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -749,13 +749,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV2_CC13_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC13_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV2_CC13_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV2_CC13_1G_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -787,13 +787,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV4_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV4_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV4_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV4_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -825,13 +825,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV4_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV4_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV4_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV4_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -864,11 +864,11 @@ // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV5_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV5_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV5_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV5_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -900,13 +900,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV6_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV6_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV6_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV6_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -938,13 +938,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV6_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV6_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV6_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV6_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -976,13 +976,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV10_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV10_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV10_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV10_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -1014,13 +1014,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV12_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV12_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV12_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV12_CC26_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -1052,13 +1052,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV12_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV12_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV12_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV12_CC13_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -1090,13 +1090,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV15_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV15_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV15_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV15_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -1128,13 +1128,13 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_CONFIG_SYNTH_DIV30_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV30_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_BITN \ - 5 + 5 #define FCFG1_CONFIG_SYNTH_DIV30_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_M \ - 0x00000020 + 0x00000020 #define FCFG1_CONFIG_SYNTH_DIV30_RFC_MDM_DEMIQMC0_TRIMCOMPLETE_N_S \ - 5 + 5 //***************************************************************************** // @@ -2228,11 +2228,11 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_W \ - 6 + 6 #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_M \ - 0x0000003F + 0x0000003F #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_S \ - 0 + 0 //***************************************************************************** // diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ints.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ints.h index 481ae09f..6ded7b66 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ints.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_ints.h @@ -45,18 +45,18 @@ #define INT_NMI_FAULT 2 // NMI Fault #define INT_HARD_FAULT 3 // Hard Fault #define INT_MEMMANAGE_FAULT 4 // Memory Management (MemManage) - // Fault +// Fault #define INT_BUS_FAULT 5 // Bus Fault #define INT_USAGE_FAULT 6 // Usage Fault #define INT_SVCALL 11 // Supervisor Call (SVCall) #define INT_DEBUG 12 // Debug Monitor #define INT_PENDSV 14 // Pending Service Call (PendSV) #define INT_SYSTICK 15 // SysTick Interrupt from the - // System Timer in NVIC. +// System Timer in NVIC. #define INT_AON_GPIO_EDGE 16 // Edge detect event from IOC #define INT_I2C_IRQ 17 // Interrupt event from I2C #define INT_RFC_CPE_1 18 // Combined Interrupt for CPE - // Generated events +// Generated events #define INT_PKA_IRQ 19 // PKA Interrupt event #define INT_AON_RTC_COMB 20 // Event from AON_RTC #define INT_UART0_COMB 21 // UART0 combined interrupt @@ -64,10 +64,10 @@ #define INT_SSI0_COMB 23 // SSI0 combined interrupt #define INT_SSI1_COMB 24 // SSI1 combined interrupt #define INT_RFC_CPE_0 25 // Combined Interrupt for CPE - // Generated events +// Generated events #define INT_RFC_HW_COMB 26 // Combined RFC hardware interrupt #define INT_RFC_CMD_ACK 27 // RFC Doorbell Command - // Acknowledgement Interrupt +// Acknowledgement Interrupt #define INT_I2S_IRQ 28 // Interrupt event from I2S #define INT_AUX_SWEV1 29 // AUX software event 1 #define INT_WDT_IRQ 30 // Watchdog interrupt event @@ -80,7 +80,7 @@ #define INT_GPT3A 37 // GPT3A interrupt event #define INT_GPT3B 38 // GPT3B interrupt event #define INT_CRYPTO_RESULT_AVAIL_IRQ 39 // CRYPTO result available interupt - // event +// event #define INT_DMA_DONE_COMB 40 // Combined DMA done #define INT_DMA_ERR 41 // DMA bus error #define INT_FLASH 42 // FLASH controller error event @@ -92,11 +92,11 @@ #define INT_AUX_ADC_IRQ 48 // AUX ADC interrupt event #define INT_TRNG_IRQ 49 // TRNG Interrupt event #define INT_OSC_COMB 50 // Combined event from Oscillator - // control +// control #define INT_AUX_TIMER2_EV0 51 // AUX Timer2 event 0 #define INT_UART1_COMB 52 // UART1 combined interrupt #define INT_BATMON_COMB 53 // Combined event from battery - // monitor +// monitor //***************************************************************************** // diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_memmap.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_memmap.h index 07d07f60..2f936315 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_memmap.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_memmap.h @@ -106,7 +106,7 @@ #define FCFG1_BASE 0x50001000 // FCFG1 #define FCFG2_BASE 0x50002000 // FCFG2 #ifndef CCFG_BASE -#define CCFG_BASE 0x50003000 // CCFG + #define CCFG_BASE 0x50003000 // CCFG #endif #define CCFG_BASE_DEFAULT 0x50003000 // CCFG #define SSI0_NONBUF_BASE 0x60000000 // SSI CPU nonbuf base @@ -152,20 +152,20 @@ #define AUX_EVCTL_NONBUF_BASE 0x600C5000 // AUX_EVCTL CPU nonbuf base #define AUX_SYSIF_NONBUF_BASE 0x600C6000 // AUX_SYSIF CPU nonbuf base #define AUX_TIMER01_NONBUF_BASE \ - 0x600C7000 // AUX_TIMER01 CPU nonbuf base + 0x600C7000 // AUX_TIMER01 CPU nonbuf base #define AUX_SMPH_NONBUF_BASE 0x600C8000 // AUX_SMPH CPU nonbuf base #define AUX_ANAIF_NONBUF_BASE 0x600C9000 // AUX_ANAIF CPU nonbuf base #define AUX_DDI0_OSC_NONBUF_BASE \ - 0x600CA000 // DDI CPU nonbuf base + 0x600CA000 // DDI CPU nonbuf base #define AUX_ADI4_NONBUF_BASE 0x600CB000 // ADI CPU nonbuf base #define AUX_AIODIO0_NONBUF_BASE \ - 0x600CC000 // AUX_AIODIO CPU nonbuf base + 0x600CC000 // AUX_AIODIO CPU nonbuf base #define AUX_AIODIO1_NONBUF_BASE \ - 0x600CD000 // AUX_AIODIO CPU nonbuf base + 0x600CD000 // AUX_AIODIO CPU nonbuf base #define AUX_AIODIO2_NONBUF_BASE \ - 0x600CE000 // AUX_AIODIO CPU nonbuf base + 0x600CE000 // AUX_AIODIO CPU nonbuf base #define AUX_AIODIO3_NONBUF_BASE \ - 0x600CF000 // AUX_AIODIO CPU nonbuf base + 0x600CF000 // AUX_AIODIO CPU nonbuf base #define AUX_RAM_NONBUF_BASE 0x600E0000 // AUX_RAM CPU nonbuf base #define AUX_SCE_NONBUF_BASE 0x600E1000 // AUX_SCE CPU nonbuf base #define FLASHMEM_ALIAS_BASE 0xA0000000 // FLASHMEM Alias base diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_nvic.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_nvic.h index 3bdeb8b7..6f1f2d03 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_nvic.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_nvic.h @@ -45,7 +45,7 @@ #define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg #define NVIC_ACTLR 0xE000E008 // Auxiliary Control #define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status - // Register +// Register #define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register #define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register #define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg @@ -77,7 +77,7 @@ #define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State #define NVIC_VTABLE 0xE000ED08 // Vector Table Offset #define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset - // Control +// Control #define NVIC_SYS_CTRL 0xE000ED10 // System Control #define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control #define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 @@ -96,13 +96,13 @@ #define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size #define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 #define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size - // Alias 1 +// Alias 1 #define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 #define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size - // Alias 2 +// Alias 2 #define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 #define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size - // Alias 3 +// Alias 3 #define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg #define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select #define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data @@ -125,7 +125,7 @@ #define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding #define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer #define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple - // Cycle Instructions +// Cycle Instructions //***************************************************************************** // @@ -735,21 +735,21 @@ #undef NVIC_INT_CTRL_VEC_PEN_M #define NVIC_INT_CTRL_VEC_PEN_M 0x000FF000 // Interrupt Pending Vector Number #define NVIC_INT_CTRL_VEC_PEN_NMI \ - 0x00002000 // NMI + 0x00002000 // NMI #define NVIC_INT_CTRL_VEC_PEN_HARD \ - 0x00003000 // Hard fault + 0x00003000 // Hard fault #define NVIC_INT_CTRL_VEC_PEN_MEM \ - 0x00004000 // Memory management fault + 0x00004000 // Memory management fault #define NVIC_INT_CTRL_VEC_PEN_BUS \ - 0x00005000 // Bus fault + 0x00005000 // Bus fault #define NVIC_INT_CTRL_VEC_PEN_USG \ - 0x00006000 // Usage fault + 0x00006000 // Usage fault #define NVIC_INT_CTRL_VEC_PEN_SVC \ - 0x0000B000 // SVCall + 0x0000B000 // SVCall #define NVIC_INT_CTRL_VEC_PEN_PNDSV \ - 0x0000E000 // PendSV + 0x0000E000 // PendSV #define NVIC_INT_CTRL_VEC_PEN_TICK \ - 0x0000F000 // SysTick + 0x0000F000 // SysTick #define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base #define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number #undef NVIC_INT_CTRL_VEC_ACT_M @@ -806,9 +806,9 @@ // //***************************************************************************** #define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception - // Entry +// Entry #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and - // Fault +// Fault #define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 #define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger @@ -859,7 +859,7 @@ #define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending #define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending #define NVIC_SYS_HND_CTRL_USAGEP \ - 0x00001000 // Usage Fault Pending + 0x00001000 // Usage Fault Pending #define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active #define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active @@ -880,20 +880,20 @@ #define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault #define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault #define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage - // Fault +// Fault #define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid #define NVIC_FAULT_STAT_BLSPERR 0x00002000 // Bus Fault on Floating-Point Lazy - // State Preservation +// State Preservation #define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault #define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault #define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error #define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error #define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error #define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address - // Register Valid +// Register Valid #define NVIC_FAULT_STAT_MLSPERR 0x00000020 // Memory Management Fault on - // Floating-Point Lazy State - // Preservation +// Floating-Point Lazy State +// Preservation #define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation #define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation #define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation @@ -946,16 +946,16 @@ #define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask #define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key #define NVIC_DBG_CTRL_S_RESET_ST \ - 0x02000000 // Core has reset since last read + 0x02000000 // Core has reset since last read #define NVIC_DBG_CTRL_S_RETIRE_ST \ - 0x01000000 // Core has executed insruction - // since last read + 0x01000000 // Core has executed insruction +// since last read #define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up #define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping #define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt #define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available #define NVIC_DBG_CTRL_C_SNAPSTALL \ - 0x00000020 // Breaks a stalled load/store + 0x00000020 // Breaks a stalled load/store #define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping #define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core #define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_types.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_types.h index dfa4281d..142601bc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_types.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/inc/hw_types.h @@ -58,7 +58,7 @@ typedef void (* FPTR_VOID_UINT8_T) (uint8_t); // //***************************************************************************** #ifndef __STATIC_INLINE -#define __STATIC_INLINE static inline + #define __STATIC_INLINE static inline #endif //***************************************************************************** @@ -80,19 +80,19 @@ typedef unsigned int __UINT32; // Read example : my32BitVar = HWREG(base_addr + offset) ; // Write example : HWREG(base_addr + offset) = my32BitVar ; #define HWREG(x) \ - (*((volatile unsigned long *)(x))) + (*((volatile unsigned long *)(x))) // Half word (16 bit) access to address x // Read example : my16BitVar = HWREGH(base_addr + offset) ; // Write example : HWREGH(base_addr + offset) = my16BitVar ; #define HWREGH(x) \ - (*((volatile unsigned short *)(x))) + (*((volatile unsigned short *)(x))) // Byte (8 bit) access to address x // Read example : my8BitVar = HWREGB(base_addr + offset) ; // Write example : HWREGB(base_addr + offset) = my8BitVar ; #define HWREGB(x) \ - (*((volatile unsigned char *)(x))) + (*((volatile unsigned char *)(x))) //***************************************************************************** // @@ -106,18 +106,18 @@ typedef unsigned int __UINT32; //***************************************************************************** // Bit-band access to address x bit number b using word access (32 bit) #define HWREGBITW(x, b) \ - HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) // Bit-band access to address x bit number b using half word access (16 bit) #define HWREGBITH(x, b) \ - HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) // Bit-band access to address x bit number b using byte access (8 bit) #define HWREGBITB(x, b) \ - HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) #endif // __HW_TYPES_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_bt5.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_bt5.h index 528f7ee8..251c7a46 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_bt5.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_bt5.h @@ -69,44 +69,45 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageBt5[] = { - 0x21004059, - 0x210040a5, - 0x21004085, - 0x79654c07, - 0xf809f000, - 0x40697961, - 0xd5030749, - 0x4a042101, - 0x60110389, - 0xb570bd70, - 0x47084902, - 0x21000380, - 0x40041108, - 0x0000592d, - 0x21014805, - 0x438a6802, - 0x6b836002, - 0x6383438b, - 0x6002430a, - 0x47004801, - 0x40046000, - 0x00005b3f, - 0x490cb510, - 0x4a0c4788, - 0x5e512106, - 0xd0072900, - 0xd0052902, - 0xd0032909, - 0xd0012910, - 0xd1072911, - 0x43c92177, - 0xdd014288, - 0xdd012800, - 0x43c0207f, - 0x0000bd10, - 0x000065a9, - 0x21000380, +CPE_PATCH_TYPE patchImageBt5[] = +{ + 0x21004059, + 0x210040a5, + 0x21004085, + 0x79654c07, + 0xf809f000, + 0x40697961, + 0xd5030749, + 0x4a042101, + 0x60110389, + 0xb570bd70, + 0x47084902, + 0x21000380, + 0x40041108, + 0x0000592d, + 0x21014805, + 0x438a6802, + 0x6b836002, + 0x6383438b, + 0x6002430a, + 0x47004801, + 0x40046000, + 0x00005b3f, + 0x490cb510, + 0x4a0c4788, + 0x5e512106, + 0xd0072900, + 0xd0052902, + 0xd0032909, + 0xd0012910, + 0xd1072911, + 0x43c92177, + 0xdd014288, + 0xdd012800, + 0x43c0207f, + 0x0000bd10, + 0x000065a9, + 0x21000380, }; #define _NWORD_PATCHIMAGE_BT5 37 @@ -140,18 +141,18 @@ static uint8_t bBt5PatchEntered = 0; PATCH_FUN_SPEC void enterBt5CpePatch(void) { #if (_NWORD_PATCHIMAGE_BT5 > 0) - uint32_t *pPatchVec = (uint32_t *) (_BT5_CPERAM_START + _BT5_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_BT5_CPERAM_START + _BT5_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageBt5, sizeof(patchImageBt5)); + memcpy(pPatchVec, patchImageBt5, sizeof(patchImageBt5)); #endif } PATCH_FUN_SPEC void enterBt5CpeHdPatch(void) { #if (_NWORD_PATCHCPEHD_BT5 > 0) - uint32_t *pPatchCpeHd = (uint32_t *) (_BT5_CPERAM_START + _BT5_PATCH_CPEHD_OFFSET); + uint32_t* pPatchCpeHd = (uint32_t*) (_BT5_CPERAM_START + _BT5_PATCH_CPEHD_OFFSET); - memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); + memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); #endif } @@ -161,47 +162,49 @@ PATCH_FUN_SPEC void enterBt5SysPatch(void) PATCH_FUN_SPEC void configureBt5Patch(void) { - uint8_t *pPatchTab = (uint8_t *) (_BT5_CPERAM_START + _BT5_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_BT5_CPERAM_START + _BT5_PATCH_TAB_OFFSET); - pPatchTab[76] = 0; - pPatchTab[91] = 1; - pPatchTab[79] = 2; + pPatchTab[76] = 0; + pPatchTab[91] = 1; + pPatchTab[79] = 2; } PATCH_FUN_SPEC void applyBt5Patch(void) { #ifdef _BT5_NO_PROG_STATE_VAR - enterBt5SysPatch(); - enterBt5CpePatch(); + enterBt5SysPatch(); + enterBt5CpePatch(); #else - if (!bBt5PatchEntered) - { - enterBt5SysPatch(); - enterBt5CpePatch(); - bBt5PatchEntered = 1; - } + + if (!bBt5PatchEntered) + { + enterBt5SysPatch(); + enterBt5CpePatch(); + bBt5PatchEntered = 1; + } + #endif - enterBt5CpeHdPatch(); - configureBt5Patch(); + enterBt5CpeHdPatch(); + configureBt5Patch(); } PATCH_FUN_SPEC void refreshBt5Patch(void) { - enterBt5CpeHdPatch(); - configureBt5Patch(); + enterBt5CpeHdPatch(); + configureBt5Patch(); } #ifndef _BT5_NO_PROG_STATE_VAR PATCH_FUN_SPEC void cleanBt5Patch(void) { - bBt5PatchEntered = 0; + bBt5PatchEntered = 0; } #endif PATCH_FUN_SPEC void rf_patch_cpe_bt5(void) { - applyBt5Patch(); + applyBt5Patch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_ieee_802_15_4.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_ieee_802_15_4.h index f1b9ffda..65a1f0de 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_ieee_802_15_4.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_ieee_802_15_4.h @@ -69,19 +69,20 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageIeee802154[] = { - 0x21004051, - 0x79654c07, - 0xf809f000, - 0x40697961, - 0xd5030749, - 0x4a042101, - 0x60110389, - 0xb570bd70, - 0x47084902, - 0x21000380, - 0x40041108, - 0x0000592d, +CPE_PATCH_TYPE patchImageIeee802154[] = +{ + 0x21004051, + 0x79654c07, + 0xf809f000, + 0x40697961, + 0xd5030749, + 0x4a042101, + 0x60110389, + 0xb570bd70, + 0x47084902, + 0x21000380, + 0x40041108, + 0x0000592d, }; #define _NWORD_PATCHIMAGE_IEEE_802_15_4 12 @@ -115,18 +116,18 @@ static uint8_t bIeee802154PatchEntered = 0; PATCH_FUN_SPEC void enterIeee802154CpePatch(void) { #if (_NWORD_PATCHIMAGE_IEEE_802_15_4 > 0) - uint32_t *pPatchVec = (uint32_t *) (_IEEE_802_15_4_CPERAM_START + _IEEE_802_15_4_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_IEEE_802_15_4_CPERAM_START + _IEEE_802_15_4_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageIeee802154, sizeof(patchImageIeee802154)); + memcpy(pPatchVec, patchImageIeee802154, sizeof(patchImageIeee802154)); #endif } PATCH_FUN_SPEC void enterIeee802154CpeHdPatch(void) { #if (_NWORD_PATCHCPEHD_IEEE_802_15_4 > 0) - uint32_t *pPatchCpeHd = (uint32_t *) (_IEEE_802_15_4_CPERAM_START + _IEEE_802_15_4_PATCH_CPEHD_OFFSET); + uint32_t* pPatchCpeHd = (uint32_t*) (_IEEE_802_15_4_CPERAM_START + _IEEE_802_15_4_PATCH_CPEHD_OFFSET); - memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); + memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); #endif } @@ -136,45 +137,47 @@ PATCH_FUN_SPEC void enterIeee802154SysPatch(void) PATCH_FUN_SPEC void configureIeee802154Patch(void) { - uint8_t *pPatchTab = (uint8_t *) (_IEEE_802_15_4_CPERAM_START + _IEEE_802_15_4_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_IEEE_802_15_4_CPERAM_START + _IEEE_802_15_4_PATCH_TAB_OFFSET); - pPatchTab[76] = 0; + pPatchTab[76] = 0; } PATCH_FUN_SPEC void applyIeee802154Patch(void) { #ifdef _IEEE_802_15_4_NO_PROG_STATE_VAR - enterIeee802154SysPatch(); - enterIeee802154CpePatch(); + enterIeee802154SysPatch(); + enterIeee802154CpePatch(); #else - if (!bIeee802154PatchEntered) - { - enterIeee802154SysPatch(); - enterIeee802154CpePatch(); - bIeee802154PatchEntered = 1; - } + + if (!bIeee802154PatchEntered) + { + enterIeee802154SysPatch(); + enterIeee802154CpePatch(); + bIeee802154PatchEntered = 1; + } + #endif - enterIeee802154CpeHdPatch(); - configureIeee802154Patch(); + enterIeee802154CpeHdPatch(); + configureIeee802154Patch(); } PATCH_FUN_SPEC void refreshIeee802154Patch(void) { - enterIeee802154CpeHdPatch(); - configureIeee802154Patch(); + enterIeee802154CpeHdPatch(); + configureIeee802154Patch(); } #ifndef _IEEE_802_15_4_NO_PROG_STATE_VAR PATCH_FUN_SPEC void cleanIeee802154Patch(void) { - bIeee802154PatchEntered = 0; + bIeee802154PatchEntered = 0; } #endif PATCH_FUN_SPEC void rf_patch_cpe_ieee_802_15_4(void) { - applyIeee802154Patch(); + applyIeee802154Patch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol.h index 8c741acd..6fcaae82 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol.h @@ -69,70 +69,71 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageMultiProtocol[] = { - 0x21004061, - 0x210040cb, - 0x2100408d, - 0x2100410d, - 0x210040ed, - 0x79654c07, - 0xf809f000, - 0x40697961, - 0xd5030749, - 0x4a042101, - 0x60110389, - 0xb570bd70, - 0x47084902, - 0x21000380, - 0x40041108, - 0x0000592d, - 0xf819f000, - 0x296cb2e1, - 0x2804d00b, - 0x2806d001, - 0x490ed107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490b2002, - 0x210c780a, - 0xd0024211, - 0x22804909, - 0xb003600a, - 0xb5f0bdf0, - 0x4907b083, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000133, - 0xe000e200, - 0x00031641, - 0x00031b23, - 0x21014805, - 0x438a6802, - 0x6b836002, - 0x6383438b, - 0x6002430a, - 0x47004801, - 0x40046000, - 0x00005b3f, - 0x490cb510, - 0x4a0c4788, - 0x5e512106, - 0xd0072900, - 0xd0052902, - 0xd0032909, - 0xd0012910, - 0xd1072911, - 0x43c92177, - 0xdd014288, - 0xdd012800, - 0x43c0207f, - 0x0000bd10, - 0x000065a9, - 0x21000380, +CPE_PATCH_TYPE patchImageMultiProtocol[] = +{ + 0x21004061, + 0x210040cb, + 0x2100408d, + 0x2100410d, + 0x210040ed, + 0x79654c07, + 0xf809f000, + 0x40697961, + 0xd5030749, + 0x4a042101, + 0x60110389, + 0xb570bd70, + 0x47084902, + 0x21000380, + 0x40041108, + 0x0000592d, + 0xf819f000, + 0x296cb2e1, + 0x2804d00b, + 0x2806d001, + 0x490ed107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490b2002, + 0x210c780a, + 0xd0024211, + 0x22804909, + 0xb003600a, + 0xb5f0bdf0, + 0x4907b083, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000133, + 0xe000e200, + 0x00031641, + 0x00031b23, + 0x21014805, + 0x438a6802, + 0x6b836002, + 0x6383438b, + 0x6002430a, + 0x47004801, + 0x40046000, + 0x00005b3f, + 0x490cb510, + 0x4a0c4788, + 0x5e512106, + 0xd0072900, + 0xd0052902, + 0xd0032909, + 0xd0012910, + 0xd1072911, + 0x43c92177, + 0xdd014288, + 0xdd012800, + 0x43c0207f, + 0x0000bd10, + 0x000065a9, + 0x21000380, }; #define _NWORD_PATCHIMAGE_MULTI_PROTOCOL 63 @@ -166,18 +167,18 @@ static uint8_t bMultiProtocolPatchEntered = 0; PATCH_FUN_SPEC void enterMultiProtocolCpePatch(void) { #if (_NWORD_PATCHIMAGE_MULTI_PROTOCOL > 0) - uint32_t *pPatchVec = (uint32_t *) (_MULTI_PROTOCOL_CPERAM_START + _MULTI_PROTOCOL_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_MULTI_PROTOCOL_CPERAM_START + _MULTI_PROTOCOL_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageMultiProtocol, sizeof(patchImageMultiProtocol)); + memcpy(pPatchVec, patchImageMultiProtocol, sizeof(patchImageMultiProtocol)); #endif } PATCH_FUN_SPEC void enterMultiProtocolCpeHdPatch(void) { #if (_NWORD_PATCHCPEHD_MULTI_PROTOCOL > 0) - uint32_t *pPatchCpeHd = (uint32_t *) (_MULTI_PROTOCOL_CPERAM_START + _MULTI_PROTOCOL_PATCH_CPEHD_OFFSET); + uint32_t* pPatchCpeHd = (uint32_t*) (_MULTI_PROTOCOL_CPERAM_START + _MULTI_PROTOCOL_PATCH_CPEHD_OFFSET); - memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); + memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); #endif } @@ -187,49 +188,51 @@ PATCH_FUN_SPEC void enterMultiProtocolSysPatch(void) PATCH_FUN_SPEC void configureMultiProtocolPatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_MULTI_PROTOCOL_CPERAM_START + _MULTI_PROTOCOL_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_MULTI_PROTOCOL_CPERAM_START + _MULTI_PROTOCOL_PATCH_TAB_OFFSET); - pPatchTab[76] = 0; - pPatchTab[62] = 1; - pPatchTab[64] = 2; - pPatchTab[91] = 3; - pPatchTab[79] = 4; + pPatchTab[76] = 0; + pPatchTab[62] = 1; + pPatchTab[64] = 2; + pPatchTab[91] = 3; + pPatchTab[79] = 4; } PATCH_FUN_SPEC void applyMultiProtocolPatch(void) { #ifdef _MULTI_PROTOCOL_NO_PROG_STATE_VAR - enterMultiProtocolSysPatch(); - enterMultiProtocolCpePatch(); + enterMultiProtocolSysPatch(); + enterMultiProtocolCpePatch(); #else - if (!bMultiProtocolPatchEntered) - { - enterMultiProtocolSysPatch(); - enterMultiProtocolCpePatch(); - bMultiProtocolPatchEntered = 1; - } + + if (!bMultiProtocolPatchEntered) + { + enterMultiProtocolSysPatch(); + enterMultiProtocolCpePatch(); + bMultiProtocolPatchEntered = 1; + } + #endif - enterMultiProtocolCpeHdPatch(); - configureMultiProtocolPatch(); + enterMultiProtocolCpeHdPatch(); + configureMultiProtocolPatch(); } PATCH_FUN_SPEC void refreshMultiProtocolPatch(void) { - enterMultiProtocolCpeHdPatch(); - configureMultiProtocolPatch(); + enterMultiProtocolCpeHdPatch(); + configureMultiProtocolPatch(); } #ifndef _MULTI_PROTOCOL_NO_PROG_STATE_VAR PATCH_FUN_SPEC void cleanMultiProtocolPatch(void) { - bMultiProtocolPatchEntered = 0; + bMultiProtocolPatchEntered = 0; } #endif PATCH_FUN_SPEC void rf_patch_cpe_multi_protocol(void) { - applyMultiProtocolPatch(); + applyMultiProtocolPatch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol_rtls.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol_rtls.h index 39b058b3..ac5f57fe 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol_rtls.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_multi_protocol_rtls.h @@ -69,1273 +69,1275 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageMultiProtocolRtls[] = { - 0x21004631, - 0x21004683, - 0x21004075, - 0x2100486f, - 0x210040ad, - 0x21004117, - 0x210040d9, - 0x2100492d, - 0x21004139, - 0x21005349, - 0x68084908, - 0x43902221, - 0x48076008, - 0x68c34700, - 0x230260c3, - 0xd1fd1e5b, - 0x68c32210, - 0x60c34393, - 0x4770618a, - 0x40048000, - 0x00005c01, - 0x4801b430, - 0x00004700, - 0x00020efd, - 0x79654c07, - 0xf809f000, - 0x40697961, - 0xd5030749, - 0x4a042101, - 0x60110389, - 0xb570bd70, - 0x47084902, - 0x21000380, - 0x40041108, - 0x0000592d, - 0xf819f000, - 0x296cb2e1, - 0x2804d00b, - 0x2806d001, - 0x490ed107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490b2002, - 0x210c780a, - 0xd0024211, - 0x22804909, - 0xb003600a, - 0xb5f0bdf0, - 0x4907b083, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000133, - 0xe000e200, - 0x00031641, - 0x00031b23, - 0x21014805, - 0x438a6802, - 0x6b836002, - 0x6383438b, - 0x6002430a, - 0x47004801, - 0x40046000, - 0x00005b3f, - 0x4803b510, - 0x30106800, - 0xfe72f000, - 0x47084901, - 0x21000108, - 0x000095e3, - 0x4cffb570, - 0x5d002044, - 0x008049fe, - 0x68801840, - 0x46054780, - 0xd0112801, - 0x5d00207e, - 0xd30d2805, - 0x06002021, - 0x00897e41, - 0x7f0a1809, - 0xd0072a02, - 0x77082003, - 0x49f43480, - 0x478888a0, - 0xbd704628, - 0x77012104, - 0x700148f1, - 0xb5ffe7f4, - 0x7e934aec, - 0x49ef185b, - 0x3280600b, - 0x09897891, - 0x49edd16e, - 0x29006909, - 0x680bd06a, - 0x041bb2da, - 0x4be40e1c, - 0x7edb3360, - 0xd01b2c01, - 0x005b2410, - 0x1edb46a6, - 0x4be5469c, - 0x681b684d, - 0x00923108, - 0x1f121852, - 0x9202402b, - 0x4ae13030, - 0x93002401, - 0x60549103, - 0x26224adf, - 0x27106914, - 0x6114433c, - 0xe0302200, - 0x009b2408, - 0x1f9b46a6, - 0xc910e7e2, - 0x40634fd9, - 0x9301402b, - 0x24014623, - 0x603c0364, - 0x34404cd3, - 0x4cd26060, - 0x68643c40, - 0xd5061a24, - 0x3c804cd1, - 0x04bf6827, - 0xbf20d401, - 0x4fcbe7fa, - 0x633c9c01, - 0x44709c02, - 0xd90042a1, - 0x4cc59903, - 0x42346864, - 0x4cc3d006, - 0x68263c80, - 0x43be2702, - 0x26006026, - 0x45621c52, - 0x9c00d3d1, - 0x405c49c0, - 0x3940402c, - 0x1a12684a, - 0x48bcd4fc, - 0x48bc6304, - 0x60412100, - 0x690248bb, - 0x438a2110, - 0xbdff6102, - 0x212248b4, - 0x420a6842, - 0x4ab2d0fc, - 0x68103a80, - 0x43882102, - 0xbdff6010, - 0x4daab5f3, - 0x5d46202f, - 0xb08148b2, - 0x05806900, - 0x2e011600, - 0x1c40d002, - 0xe0001040, - 0x49ad301e, - 0x6a093140, - 0x4ba14aac, - 0x691a4351, - 0x6a1b0e09, - 0xd0222e01, - 0x01591852, - 0x316731ff, - 0x18544b9f, - 0x68d93340, - 0xb2894fa0, - 0xb2821a08, - 0x68783f40, - 0xd4fc1b00, - 0x462860da, - 0x90003060, - 0x49958381, - 0x31122050, - 0x35804788, - 0x980180a8, - 0xd0082800, - 0x990278aa, - 0xfabef000, - 0x1852e007, - 0x31ce0119, - 0x4896e7dc, - 0x99006ac0, - 0x489577c8, - 0x68407829, - 0x08c14348, - 0xd00b2e01, - 0x38134620, - 0x687a340e, - 0xd4fc1b12, - 0x0c0b4a8f, - 0xb2896193, - 0xbdfe6151, - 0x38114620, - 0xe7f23409, - 0x4c7cb570, - 0x35604625, - 0x1e407fa8, - 0xd80d2802, - 0x28006aa0, - 0x2182d004, - 0x70015d09, - 0x62a01c40, - 0x1e406a60, - 0x7fa86260, - 0x77a81cc0, - 0x28057fa8, - 0xd112d322, - 0x28026a60, - 0x497ddd08, - 0x47881e80, - 0x62611c81, - 0xd0012800, - 0xbd702001, - 0x46082100, - 0xff7af7ff, - 0xf7ff2110, - 0x486afef2, - 0x6ac13840, - 0xd0fc07c9, - 0x38804867, - 0x22026801, - 0x60014311, - 0x8ba84964, - 0x60c83140, - 0x36404626, - 0x495e7930, - 0x18400080, - 0x47806880, - 0xd1de2800, - 0x29057fa9, - 0x7fead301, - 0x29047172, - 0x7de1d3d7, - 0xd1022900, - 0x29007e21, - 0x7eead0d1, - 0x015268e1, - 0x60e11889, - 0xb570bd70, - 0x20444d4f, - 0x48535d46, - 0x3820494e, - 0x00b07ec4, - 0x68801840, - 0x4b5a4780, - 0x781a09a1, - 0xd10a4211, - 0x21ff2221, - 0x76510612, - 0x22004948, - 0x600a1f09, - 0x2101604a, - 0x212f7019, - 0x29025d49, - 0x2e31d008, - 0x07e1d003, - 0xd0032900, - 0x0861e003, - 0xe7f907c9, - 0x35802400, - 0xbd70706c, - 0x4c39b5f8, - 0x46272500, - 0x723d3760, - 0x5d00202f, - 0xd03a2802, - 0x47804845, - 0x36404626, - 0x7ff04937, - 0x62203920, - 0x43087849, - 0x48347560, - 0x38406265, - 0x2d007fc5, - 0x7d20d006, - 0x43082120, - 0x06e87520, - 0x72380ec0, - 0x7f30493a, - 0x4a3a4788, - 0xd0112d00, - 0x61c54839, - 0x20074b28, - 0x63983b40, - 0x21054d26, - 0x07806950, - 0x6868d1fc, - 0xd0f94208, - 0x30404831, - 0x63186800, - 0x28007f30, - 0x6e60d001, - 0x6be16210, - 0x47882039, - 0x20006420, - 0x482cbdf8, - 0xb5f0e7fa, - 0x20444915, - 0x2b045c43, - 0x460ad00a, - 0x78103268, - 0x28004f12, - 0x28ffd070, - 0x2b04d012, - 0xe006d003, - 0x327b460a, - 0x68cce7f3, - 0x19640145, - 0x242f60cc, - 0x2c015c64, - 0x0640d101, - 0x62480e00, - 0x701020ff, - 0x4c09202f, - 0x60200200, - 0x6a484d07, - 0x68623d40, - 0xd03f07d2, - 0xe02b220f, - 0x21000160, - 0x00025500, - 0x0000423d, - 0x21000020, - 0x40045080, - 0x210000e8, - 0x40022080, - 0x40043040, - 0xe000ed00, - 0xe000e280, - 0x400452c0, - 0x00155556, - 0x40046040, - 0x210002c0, - 0x40045180, - 0x0002175f, - 0x210004e0, - 0x00020749, - 0x00020e45, - 0x40042000, - 0x40042100, - 0x0002469d, - 0x4ec363aa, - 0x2801e003, - 0x632edd07, - 0x28001e80, - 0x6862dd1a, - 0xd1f607d2, - 0x2007e006, - 0x20ff63a8, - 0xe0116328, - 0xdd0f2800, - 0x26146862, - 0xd0b64232, - 0x7b524ab8, - 0x60220212, - 0x22084bb7, - 0x4bb7601a, - 0x6248601a, - 0xbdf02001, - 0x19c00098, - 0x64086880, - 0xbdf02000, - 0x460148b2, - 0x7bca3120, - 0x76823060, - 0x73c82002, - 0x470048af, - 0xb50049ad, - 0x71083140, - 0xd01c2831, - 0x4603dc08, - 0xfec0f000, - 0x0e13190a, - 0x0e0e150e, - 0x0e1d1b0e, - 0xd0122835, - 0xd0122836, - 0xd00a2838, - 0xd006283b, - 0x008049a3, - 0x68801840, - 0x48a2bd00, - 0x48a2bd00, - 0x48a2bd00, - 0x48a2bd00, - 0x48a2bd00, - 0x48a2bd00, - 0xb5f0bd00, - 0xb0854c98, - 0x31204621, - 0x7bce9103, - 0x5d092144, - 0xd0012907, - 0xd17e2934, - 0x35804625, - 0x2a00786a, - 0x7d21d07a, - 0xd5770689, - 0x3180498b, - 0x7f09468e, - 0xd0282e01, - 0x0f090709, - 0x702b004b, - 0x025b2301, - 0x2300469c, - 0x93029300, - 0xd0302900, - 0x4f8e0993, - 0xd00b07db, - 0x2b007f3b, - 0x23f7d001, - 0x4b8a401a, - 0x781b3320, - 0xd0012b00, - 0x401a23ef, - 0x0f5b0693, - 0xd00b2b07, - 0x07db08d3, - 0x2200d00c, - 0x4a82767a, - 0x9200321c, - 0x0909e013, - 0xe7d77029, - 0x02922201, - 0xe7f24694, - 0x07d20912, - 0x2201d008, - 0x4a7a767a, - 0x92003220, - 0x02522201, - 0xe0009202, - 0x4a772100, - 0x63d32307, - 0x4a752322, - 0x68523240, - 0xd0fa421a, - 0x6b524a72, - 0x61da4b72, - 0x693b4f72, - 0x43932210, - 0x4b71613b, - 0x0792695a, - 0x4a6fd1fc, - 0x68123240, - 0x06d370aa, - 0x1e9a0edb, - 0xd3002a13, - 0x46222302, - 0x92013260, - 0x76d33008, - 0xd0552900, - 0x7f7f4677, - 0x469600da, - 0x2a041bd2, - 0x2204da00, - 0xd0232e01, - 0x330e0093, - 0xe052e001, - 0x4e60e04e, - 0x467362b3, - 0x485a181b, - 0x434a6203, - 0x45624617, - 0x4667dd00, - 0x9902485b, - 0x99026041, - 0x1e4919c9, - 0x68016081, - 0x43112221, - 0x6a266001, - 0x62261c76, - 0x98036266, - 0x28017bc0, - 0xe00ad006, - 0x4f5000d6, - 0x62be3616, - 0xe7dd011b, - 0x494f4849, - 0xf7ff3040, - 0x2e02fc48, - 0x78aadd06, - 0x98004639, - 0xf85cf000, - 0xe00f2102, - 0x98004639, - 0xfd5cf7ff, - 0x31404946, - 0x9a016ac9, - 0x210077d1, - 0xd0002e01, - 0xf7ff2108, - 0x2103fccc, - 0x77819801, - 0xbdf0b005, - 0x21019a01, - 0x6a217791, - 0x62211c49, - 0xe0026261, - 0x34602100, - 0x4a3777a1, - 0x62912100, - 0x62084931, - 0x7bc09803, - 0xd1e92801, - 0x3040482e, - 0x06c968c1, - 0x2100d5fc, - 0x29021c49, - 0x4930dbfc, - 0xfc0bf7ff, - 0x481ee7dc, - 0x4601b510, - 0x460a3160, - 0x232f7e89, - 0x29025419, - 0x7d01d010, - 0xd5130689, - 0x29016a01, - 0x6ec1dd10, - 0x06c97849, - 0x1e8b0ec9, - 0xd8092b12, - 0x1e5b7d43, - 0xe0067543, - 0xfbfcf7ff, - 0xd0002800, - 0xbd102001, - 0x76d12100, - 0xbd102000, - 0x33804b1b, - 0x7083695b, - 0x22017042, - 0x42910252, - 0x2102dd03, - 0x71017001, - 0x21014770, - 0x47707001, - 0x0000ffff, - 0x21000048, - 0xe000e280, - 0xe000e100, - 0x21000160, - 0x00020f47, - 0x00025500, - 0x2100461d, - 0x21004517, - 0x21004489, - 0x2100442f, - 0x2100437d, - 0x21004171, - 0x21000000, - 0x40045040, - 0x40042100, - 0x400451c0, - 0x40042000, - 0x40045300, - 0x40048000, - 0x40046000, - 0x490cb510, - 0x4a0c4788, - 0x5e512106, - 0xd0072900, - 0xd0052902, - 0xd0032909, - 0xd0012910, - 0xd1072911, - 0x43c92177, - 0xdd014288, - 0xdd012800, - 0x43c0207f, - 0x0000bd10, - 0x000065a9, - 0x21000380, - 0x2500b570, - 0x614548ff, - 0xf000207d, - 0x4cfefcfd, - 0x07c06ae0, - 0x62e5d0fc, - 0xf0002082, - 0x48fbfcf5, - 0x07c96ac1, - 0x62c5d0fc, - 0x60a12101, - 0x60a56025, - 0x384048f6, - 0x60056081, - 0xbd706085, - 0x4bf4b530, - 0x68db685b, - 0xd00d2b00, - 0x189c0852, - 0x4def4aef, - 0xe0053240, - 0x079b6853, - 0x6b6bd5fc, - 0x1c405423, - 0xdbf74288, - 0xb5f7bd30, - 0x2400468e, - 0x00c9214b, - 0x49e8468c, - 0x684e4627, - 0x46254623, - 0x62544ae6, - 0x6ad24ae1, - 0x4ae307d1, - 0x68520fc9, - 0x42821b92, - 0x2701d900, - 0x6a524ae0, - 0xd006429a, - 0x684648dd, - 0x46604bde, - 0xb29d6adb, - 0x29014613, - 0x2f00d001, - 0x4ad6d0e6, - 0x6ad16ad0, - 0x0fc006c0, - 0x0fc90689, - 0x29014ed3, - 0x2801d101, - 0x210fd011, - 0x020968b0, - 0x1d404008, - 0x48cc6190, - 0x62c12100, - 0x62012101, - 0x68784fcc, - 0x99026130, - 0xd00e2902, - 0x9802e013, - 0xd1032802, - 0x684048c7, - 0x61486871, - 0x20004671, - 0xf7ff9a02, - 0x2401ff9b, - 0x6871e7ea, - 0x8d892c01, - 0x1a40d01c, - 0x48c160f0, - 0x0a2a6ac0, - 0x0a08b281, - 0xb2c91880, - 0x1889b2ea, - 0x084a0840, - 0x23ff1811, - 0x1a103301, - 0x02001a59, - 0xfc6cf000, - 0x68706170, - 0x8d828873, - 0x18d56931, - 0xe00468f0, - 0x30f01a40, - 0x6879e7e0, - 0x1a096131, - 0xd3fa42a9, - 0x21009d02, - 0xd0052d02, - 0xd1032c01, - 0x1a086931, - 0x1ac11a80, - 0x1a406930, - 0x2c0160f0, - 0x2000d002, - 0xbdfe43c0, - 0xbdfe2000, - 0x4ba6b510, - 0x2402499e, - 0x28002201, - 0x48a4d007, - 0x694861d8, - 0x61484390, - 0x43206948, - 0x48a1e006, - 0x694861d8, - 0x61484310, - 0x43a06948, - 0x499b6148, - 0x6bc83940, - 0x40184b9c, - 0x43032303, - 0x431063cb, - 0xbd1063c8, - 0x9c02b510, - 0x02240112, - 0x3c013cff, - 0x43143a10, - 0x430c1e49, - 0x61cc498b, - 0x4b8a624b, - 0x3b402202, - 0x2200605a, - 0x620a62ca, - 0x02004a87, - 0x79926852, - 0xd0022a02, - 0x61881cc0, - 0x1d00bd10, - 0x7808e7fb, - 0x62c84983, - 0x49804770, - 0x68896849, - 0xd0042900, - 0x18080840, - 0x7800497e, - 0x487a62c8, - 0x38402103, - 0x60416001, - 0x20014976, - 0x60486008, - 0xb5384770, - 0xf7ff4605, - 0x4872ffe8, - 0x62c12100, - 0x62012108, - 0x78234c71, - 0x68a09300, - 0x05004b77, - 0x78620f00, - 0xffb6f7ff, - 0xf7ff2000, - 0x6861ff91, - 0x68082d02, - 0x8dc8d100, - 0x2101462a, - 0xfef9f7ff, - 0xb5f7bd38, - 0x46154966, - 0x684a2000, - 0x46944607, - 0x6ac94960, - 0x496207ce, - 0x68490ff6, - 0x1a8a4662, - 0x428a9900, - 0x2701d900, - 0x6a4c495e, - 0xd0074284, - 0xd0012c00, - 0xe0002001, - 0xf7ff2000, - 0x4620ff69, - 0xd0012e01, - 0xd0e32f00, - 0x21004851, - 0x4a526141, - 0x4e526ad0, - 0x0fc006c0, - 0xd1032d00, - 0x685b4b50, - 0x61636874, - 0xd0012f00, - 0xd01d2800, - 0x462a2401, - 0x99012000, - 0xfea8f7ff, - 0x6ac0484b, - 0xb2810223, - 0xb2ca0a08, - 0x1a101811, - 0x02001a59, - 0xfb88f000, - 0x4a436170, - 0x61316851, - 0x79836870, - 0x432f461f, - 0x2b01d00e, - 0xe01ad014, - 0x68b0230f, - 0x4018021b, - 0x61901d40, - 0x62c14837, - 0x62012101, - 0xe7e82400, - 0x2c008d83, - 0x1ac9d002, - 0xe00731f0, - 0xe0051ac9, - 0xd1042d00, - 0x1ac98d83, - 0x310531ff, - 0x8d8160f1, - 0x23008877, - 0x19c9468c, - 0x68f06932, - 0x4a2ce002, - 0x61326852, - 0x428a1a12, - 0x2d00d3f9, - 0x2c00d006, - 0x6931d004, - 0x46601a09, - 0x1bc31a08, - 0x1ac06930, - 0x2c0060f0, - 0x2000d001, - 0x2000bdfe, - 0xbdfe43c0, - 0x4605b538, - 0xff39f7ff, - 0x2100481a, - 0x210862c1, - 0x4c1a6201, - 0x93007823, - 0x4b2068a0, - 0x0f000500, - 0xf7ff7862, - 0x2000ff07, - 0xfee2f7ff, - 0x2d006861, - 0xd1006808, - 0x462a8dc8, - 0xf7ff2101, - 0xbd38ff52, - 0x4c0db530, - 0x62e52500, - 0x3a100112, - 0x430a1e49, - 0x626361e2, - 0x1c800200, - 0x480961a0, - 0x60012101, - 0x61456942, - 0x32404a06, - 0x68406011, - 0xe0173028, - 0x40041100, - 0x40046000, - 0x40045040, - 0x210053e8, - 0x40043000, - 0x40045300, - 0x400451c0, - 0x40044040, - 0x08180532, - 0x0818070e, - 0xfff000ff, - 0x0000aaaa, - 0x318049ff, - 0xbd306008, - 0x4605b538, - 0xfee5f7ff, - 0x210048fc, - 0x210662c1, - 0x4cfb6201, - 0x78232108, - 0x68a09300, - 0x05004bf9, - 0x78620f00, - 0xffb8f7ff, - 0x48f749f8, - 0x200161c8, - 0xfe8af7ff, - 0x462a6860, - 0x21016800, - 0xfefdf7ff, - 0xb530bd38, - 0x4bf24df2, - 0x35804cf2, - 0xd00e2a40, - 0x58420089, - 0x625a0c12, - 0xb2925842, - 0x1808629a, - 0x0c096841, - 0x684062a1, - 0x6328b280, - 0x00c9bd30, - 0x0c125842, - 0x584262da, - 0x631ab292, - 0x68411808, - 0x62590c09, - 0xb2896841, - 0x68816299, - 0x49e00c0a, - 0x634a31c0, - 0xb2926882, - 0x68c1638a, - 0x62a10c09, - 0xe7e168c0, - 0x4606b5f0, - 0x2080b089, - 0xfa8ef000, - 0x2500b662, - 0x204f4cd2, - 0x60e56066, - 0x00c049d6, - 0x47889501, - 0x68606125, - 0x290079c1, - 0x21ffd001, - 0x30203101, - 0x4acf60a1, - 0x62117901, - 0x21207902, - 0xd1002a00, - 0x70212140, - 0x21027980, - 0xd1002800, - 0x48ca2101, - 0x47807061, - 0x49c06860, - 0x79403020, - 0x62c83180, - 0x478048c6, - 0x80602000, - 0x384048bf, - 0x48c56bc0, - 0x610149c3, - 0x90002000, - 0x684849b8, - 0x24003020, - 0x46267c40, - 0x46259405, - 0x90029403, - 0x48b3e20c, - 0x4ab02700, - 0x68506147, - 0x31504601, - 0x48ade001, - 0x42886840, - 0x48b8d3fb, - 0x48b64780, - 0x48b76147, - 0x7ac07ac1, - 0x0fc907c9, - 0x40102202, - 0xd0024301, - 0xb00948b3, - 0x48a5bdf0, - 0x80412100, - 0x97076847, - 0x7cf93720, - 0x90060860, - 0xfa32f000, - 0xd1142900, - 0x42a09805, - 0x9802d011, - 0xd03b2800, - 0x07c09902, - 0x0fc00849, - 0x28009102, - 0x7cb8d002, - 0x90024048, - 0x98027c39, - 0xfa1cf000, - 0x9807460d, - 0x6b409405, - 0x5bc200ef, - 0x428a9900, - 0x1db9d02e, - 0x1d395a43, - 0x5c439300, - 0x5c421cb9, - 0x5c411cf9, - 0xf000200e, - 0x488afa0d, - 0x68402201, - 0x6b402300, - 0x5bc04611, - 0xf0000400, - 0x488dfa09, - 0x48924780, - 0x29037801, - 0x4882d1fc, - 0x8f096841, - 0x497e8041, - 0x46026848, - 0xe0073238, - 0x7c381c6d, - 0x42a8b2ed, - 0x2500d8cd, - 0x6848e7cb, - 0xd3fc4290, - 0x68404878, - 0x5bc06b40, - 0x48799000, - 0x68813840, - 0xf000207e, - 0x4873f9eb, - 0x6a386847, - 0xd0062800, - 0x46200041, - 0xf9d0f000, - 0xd0052900, - 0x496de014, - 0x780a69b8, - 0xe0334621, - 0xd00b2c00, - 0x30204638, - 0x07ca7fc1, - 0x2201d018, - 0x43917782, - 0x496f77c1, - 0x608802d0, - 0x900469b8, - 0x90076a38, - 0x46200041, - 0xf9b2f000, - 0x42819807, - 0x2c00d113, - 0x4638d00f, - 0x7fc13020, - 0xd401078a, - 0xe7664869, - 0x77822202, - 0x401122fd, - 0x200177c1, - 0x02c04960, - 0x69f86088, - 0x46209004, - 0xf0006a39, - 0x4852f997, - 0x98047802, - 0xfec1f7ff, - 0xd1042c00, - 0x6840484e, - 0x28027980, - 0x9806d00c, - 0x484b9001, - 0x79806840, - 0xd0072801, - 0x28004f48, - 0x2802d058, - 0xe078d07e, - 0xe12f2402, - 0xf7ff4620, - 0xb280fe87, - 0x48414684, - 0x6ac33040, - 0x68504a40, - 0x98016907, - 0x1d4800c1, - 0x6850543b, - 0x1d086903, - 0x4660541d, - 0xd00e2800, - 0x20006852, - 0x691243c0, - 0x50502c00, - 0xe002d167, - 0xb2a41ca4, - 0x9803e053, - 0x90031c40, - 0x6857e04f, - 0x5dc02027, - 0xd0012801, - 0xe0146950, - 0x30804832, - 0x071b6a83, - 0x61530f1b, - 0x05806a80, - 0x2b070e80, - 0x3b10dd01, - 0x281f6153, - 0x3840dd01, - 0x0100b200, - 0x010018c0, - 0x30ff6150, - 0x30014b33, - 0xd3014298, - 0x61502000, - 0x30804824, - 0x69536a40, - 0x18c00200, - 0x5058693b, - 0xb2816950, - 0xe0ca207f, - 0xf7ff4620, - 0xb281fddf, - 0x30404817, - 0x48176ac3, - 0x69076840, - 0x00c09801, - 0x54bb1d42, - 0x1d034a13, - 0x29006852, - 0x54d56912, - 0x4910d04e, - 0x68492200, - 0x690943d2, - 0x500a2c00, - 0x1c76d0af, - 0x2c01b2b6, - 0xf7ffd8a8, - 0x4809fbf5, - 0x8d386847, - 0xe00042b0, - 0xd303e040, - 0x99038d7a, - 0xd27e428a, - 0x42884914, - 0xe054e028, - 0x40043000, - 0x40046000, - 0x210053e8, - 0x0000aaaa, - 0x08180532, - 0x40044040, - 0x40045140, - 0x40045300, - 0x0000424f, - 0x00009083, - 0x00004be3, - 0x0000c210, - 0x40041100, - 0x00000de5, - 0x21000128, - 0x04040003, - 0x210002e4, - 0x04060003, - 0x00000201, - 0x0000ffff, - 0x8d78d102, - 0xd06f4288, - 0x484d2101, - 0x60810449, - 0xe684484c, - 0x21004a4c, - 0x69126852, - 0xe75f5011, - 0xf7ff4620, - 0xb282fcc6, - 0x46946878, - 0x98016903, - 0x00c04639, - 0x549d1d02, - 0x6ad34a44, - 0x6917687a, - 0x54bb1d42, - 0x2a004662, - 0x6849d00a, - 0x43d22200, - 0x2c026909, - 0xd800500a, - 0x1c76e745, - 0xe73fb2b6, - 0x68494939, - 0x3120468c, - 0x290179c9, - 0x4938d125, - 0x07136a8a, - 0x0f1b4a37, - 0x6a896997, - 0x0f3f073f, - 0x69920589, - 0x05920e89, - 0x2b070e92, - 0x3b10dd00, - 0xdd002f07, - 0x291f3f10, - 0x3940dd01, - 0x2a1fb209, - 0x3a40dd03, - 0xe01fe000, - 0x0109b212, - 0x19c918c9, - 0x18890112, - 0x4924010a, - 0x4923614a, - 0x694a4b26, - 0x320132ff, - 0xd301429a, - 0x614a2200, - 0x6a524a20, - 0x0212694b, - 0x466218d3, - 0x50136912, - 0xb2816948, - 0xf0002083, - 0xe6fbf873, - 0x98018fb9, - 0xf856f000, - 0xd1072900, - 0x28009801, - 0x8778d004, - 0x48102101, - 0x608103c9, - 0x68414810, - 0x42a18889, - 0xe5ecd900, - 0x480b2101, - 0x60810409, - 0x1e49480b, - 0x8d026840, - 0xd103428a, - 0x42888d40, - 0xe5d3d100, - 0x98014906, - 0x87486849, - 0xf0002081, - 0x2000f825, - 0x0000e5ef, - 0x40041100, - 0x04030003, - 0x210053e8, - 0x40046040, - 0x400451c0, - 0x40045080, - 0x00000201, - 0x49068800, - 0xd1064288, - 0x21004805, - 0x49058501, - 0x20016241, - 0x20824770, - 0x00004770, - 0x00006801, - 0x21000108, - 0x21004159, - 0x4801b403, - 0xbd019001, - 0x00003cc3, - 0x4801b403, - 0xbd019001, - 0x0000937d, - 0x4801b403, - 0xbd019001, - 0x00009361, - 0x4801b403, - 0xbd019001, - 0x0000867b, - 0x4801b403, - 0xbd019001, - 0x000049a3, - 0x4801b403, - 0xbd019001, - 0x00003c8f, - 0x4801b403, - 0xbd019001, - 0x00003ca9, - 0x4674b430, - 0x78251e64, - 0x42ab1c64, - 0x461dd200, - 0x005b5d63, - 0xbc3018e3, - 0x00004718, - 0x08180532, - 0x0818070e, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, +CPE_PATCH_TYPE patchImageMultiProtocolRtls[] = +{ + 0x21004631, + 0x21004683, + 0x21004075, + 0x2100486f, + 0x210040ad, + 0x21004117, + 0x210040d9, + 0x2100492d, + 0x21004139, + 0x21005349, + 0x68084908, + 0x43902221, + 0x48076008, + 0x68c34700, + 0x230260c3, + 0xd1fd1e5b, + 0x68c32210, + 0x60c34393, + 0x4770618a, + 0x40048000, + 0x00005c01, + 0x4801b430, + 0x00004700, + 0x00020efd, + 0x79654c07, + 0xf809f000, + 0x40697961, + 0xd5030749, + 0x4a042101, + 0x60110389, + 0xb570bd70, + 0x47084902, + 0x21000380, + 0x40041108, + 0x0000592d, + 0xf819f000, + 0x296cb2e1, + 0x2804d00b, + 0x2806d001, + 0x490ed107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490b2002, + 0x210c780a, + 0xd0024211, + 0x22804909, + 0xb003600a, + 0xb5f0bdf0, + 0x4907b083, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000133, + 0xe000e200, + 0x00031641, + 0x00031b23, + 0x21014805, + 0x438a6802, + 0x6b836002, + 0x6383438b, + 0x6002430a, + 0x47004801, + 0x40046000, + 0x00005b3f, + 0x4803b510, + 0x30106800, + 0xfe72f000, + 0x47084901, + 0x21000108, + 0x000095e3, + 0x4cffb570, + 0x5d002044, + 0x008049fe, + 0x68801840, + 0x46054780, + 0xd0112801, + 0x5d00207e, + 0xd30d2805, + 0x06002021, + 0x00897e41, + 0x7f0a1809, + 0xd0072a02, + 0x77082003, + 0x49f43480, + 0x478888a0, + 0xbd704628, + 0x77012104, + 0x700148f1, + 0xb5ffe7f4, + 0x7e934aec, + 0x49ef185b, + 0x3280600b, + 0x09897891, + 0x49edd16e, + 0x29006909, + 0x680bd06a, + 0x041bb2da, + 0x4be40e1c, + 0x7edb3360, + 0xd01b2c01, + 0x005b2410, + 0x1edb46a6, + 0x4be5469c, + 0x681b684d, + 0x00923108, + 0x1f121852, + 0x9202402b, + 0x4ae13030, + 0x93002401, + 0x60549103, + 0x26224adf, + 0x27106914, + 0x6114433c, + 0xe0302200, + 0x009b2408, + 0x1f9b46a6, + 0xc910e7e2, + 0x40634fd9, + 0x9301402b, + 0x24014623, + 0x603c0364, + 0x34404cd3, + 0x4cd26060, + 0x68643c40, + 0xd5061a24, + 0x3c804cd1, + 0x04bf6827, + 0xbf20d401, + 0x4fcbe7fa, + 0x633c9c01, + 0x44709c02, + 0xd90042a1, + 0x4cc59903, + 0x42346864, + 0x4cc3d006, + 0x68263c80, + 0x43be2702, + 0x26006026, + 0x45621c52, + 0x9c00d3d1, + 0x405c49c0, + 0x3940402c, + 0x1a12684a, + 0x48bcd4fc, + 0x48bc6304, + 0x60412100, + 0x690248bb, + 0x438a2110, + 0xbdff6102, + 0x212248b4, + 0x420a6842, + 0x4ab2d0fc, + 0x68103a80, + 0x43882102, + 0xbdff6010, + 0x4daab5f3, + 0x5d46202f, + 0xb08148b2, + 0x05806900, + 0x2e011600, + 0x1c40d002, + 0xe0001040, + 0x49ad301e, + 0x6a093140, + 0x4ba14aac, + 0x691a4351, + 0x6a1b0e09, + 0xd0222e01, + 0x01591852, + 0x316731ff, + 0x18544b9f, + 0x68d93340, + 0xb2894fa0, + 0xb2821a08, + 0x68783f40, + 0xd4fc1b00, + 0x462860da, + 0x90003060, + 0x49958381, + 0x31122050, + 0x35804788, + 0x980180a8, + 0xd0082800, + 0x990278aa, + 0xfabef000, + 0x1852e007, + 0x31ce0119, + 0x4896e7dc, + 0x99006ac0, + 0x489577c8, + 0x68407829, + 0x08c14348, + 0xd00b2e01, + 0x38134620, + 0x687a340e, + 0xd4fc1b12, + 0x0c0b4a8f, + 0xb2896193, + 0xbdfe6151, + 0x38114620, + 0xe7f23409, + 0x4c7cb570, + 0x35604625, + 0x1e407fa8, + 0xd80d2802, + 0x28006aa0, + 0x2182d004, + 0x70015d09, + 0x62a01c40, + 0x1e406a60, + 0x7fa86260, + 0x77a81cc0, + 0x28057fa8, + 0xd112d322, + 0x28026a60, + 0x497ddd08, + 0x47881e80, + 0x62611c81, + 0xd0012800, + 0xbd702001, + 0x46082100, + 0xff7af7ff, + 0xf7ff2110, + 0x486afef2, + 0x6ac13840, + 0xd0fc07c9, + 0x38804867, + 0x22026801, + 0x60014311, + 0x8ba84964, + 0x60c83140, + 0x36404626, + 0x495e7930, + 0x18400080, + 0x47806880, + 0xd1de2800, + 0x29057fa9, + 0x7fead301, + 0x29047172, + 0x7de1d3d7, + 0xd1022900, + 0x29007e21, + 0x7eead0d1, + 0x015268e1, + 0x60e11889, + 0xb570bd70, + 0x20444d4f, + 0x48535d46, + 0x3820494e, + 0x00b07ec4, + 0x68801840, + 0x4b5a4780, + 0x781a09a1, + 0xd10a4211, + 0x21ff2221, + 0x76510612, + 0x22004948, + 0x600a1f09, + 0x2101604a, + 0x212f7019, + 0x29025d49, + 0x2e31d008, + 0x07e1d003, + 0xd0032900, + 0x0861e003, + 0xe7f907c9, + 0x35802400, + 0xbd70706c, + 0x4c39b5f8, + 0x46272500, + 0x723d3760, + 0x5d00202f, + 0xd03a2802, + 0x47804845, + 0x36404626, + 0x7ff04937, + 0x62203920, + 0x43087849, + 0x48347560, + 0x38406265, + 0x2d007fc5, + 0x7d20d006, + 0x43082120, + 0x06e87520, + 0x72380ec0, + 0x7f30493a, + 0x4a3a4788, + 0xd0112d00, + 0x61c54839, + 0x20074b28, + 0x63983b40, + 0x21054d26, + 0x07806950, + 0x6868d1fc, + 0xd0f94208, + 0x30404831, + 0x63186800, + 0x28007f30, + 0x6e60d001, + 0x6be16210, + 0x47882039, + 0x20006420, + 0x482cbdf8, + 0xb5f0e7fa, + 0x20444915, + 0x2b045c43, + 0x460ad00a, + 0x78103268, + 0x28004f12, + 0x28ffd070, + 0x2b04d012, + 0xe006d003, + 0x327b460a, + 0x68cce7f3, + 0x19640145, + 0x242f60cc, + 0x2c015c64, + 0x0640d101, + 0x62480e00, + 0x701020ff, + 0x4c09202f, + 0x60200200, + 0x6a484d07, + 0x68623d40, + 0xd03f07d2, + 0xe02b220f, + 0x21000160, + 0x00025500, + 0x0000423d, + 0x21000020, + 0x40045080, + 0x210000e8, + 0x40022080, + 0x40043040, + 0xe000ed00, + 0xe000e280, + 0x400452c0, + 0x00155556, + 0x40046040, + 0x210002c0, + 0x40045180, + 0x0002175f, + 0x210004e0, + 0x00020749, + 0x00020e45, + 0x40042000, + 0x40042100, + 0x0002469d, + 0x4ec363aa, + 0x2801e003, + 0x632edd07, + 0x28001e80, + 0x6862dd1a, + 0xd1f607d2, + 0x2007e006, + 0x20ff63a8, + 0xe0116328, + 0xdd0f2800, + 0x26146862, + 0xd0b64232, + 0x7b524ab8, + 0x60220212, + 0x22084bb7, + 0x4bb7601a, + 0x6248601a, + 0xbdf02001, + 0x19c00098, + 0x64086880, + 0xbdf02000, + 0x460148b2, + 0x7bca3120, + 0x76823060, + 0x73c82002, + 0x470048af, + 0xb50049ad, + 0x71083140, + 0xd01c2831, + 0x4603dc08, + 0xfec0f000, + 0x0e13190a, + 0x0e0e150e, + 0x0e1d1b0e, + 0xd0122835, + 0xd0122836, + 0xd00a2838, + 0xd006283b, + 0x008049a3, + 0x68801840, + 0x48a2bd00, + 0x48a2bd00, + 0x48a2bd00, + 0x48a2bd00, + 0x48a2bd00, + 0x48a2bd00, + 0xb5f0bd00, + 0xb0854c98, + 0x31204621, + 0x7bce9103, + 0x5d092144, + 0xd0012907, + 0xd17e2934, + 0x35804625, + 0x2a00786a, + 0x7d21d07a, + 0xd5770689, + 0x3180498b, + 0x7f09468e, + 0xd0282e01, + 0x0f090709, + 0x702b004b, + 0x025b2301, + 0x2300469c, + 0x93029300, + 0xd0302900, + 0x4f8e0993, + 0xd00b07db, + 0x2b007f3b, + 0x23f7d001, + 0x4b8a401a, + 0x781b3320, + 0xd0012b00, + 0x401a23ef, + 0x0f5b0693, + 0xd00b2b07, + 0x07db08d3, + 0x2200d00c, + 0x4a82767a, + 0x9200321c, + 0x0909e013, + 0xe7d77029, + 0x02922201, + 0xe7f24694, + 0x07d20912, + 0x2201d008, + 0x4a7a767a, + 0x92003220, + 0x02522201, + 0xe0009202, + 0x4a772100, + 0x63d32307, + 0x4a752322, + 0x68523240, + 0xd0fa421a, + 0x6b524a72, + 0x61da4b72, + 0x693b4f72, + 0x43932210, + 0x4b71613b, + 0x0792695a, + 0x4a6fd1fc, + 0x68123240, + 0x06d370aa, + 0x1e9a0edb, + 0xd3002a13, + 0x46222302, + 0x92013260, + 0x76d33008, + 0xd0552900, + 0x7f7f4677, + 0x469600da, + 0x2a041bd2, + 0x2204da00, + 0xd0232e01, + 0x330e0093, + 0xe052e001, + 0x4e60e04e, + 0x467362b3, + 0x485a181b, + 0x434a6203, + 0x45624617, + 0x4667dd00, + 0x9902485b, + 0x99026041, + 0x1e4919c9, + 0x68016081, + 0x43112221, + 0x6a266001, + 0x62261c76, + 0x98036266, + 0x28017bc0, + 0xe00ad006, + 0x4f5000d6, + 0x62be3616, + 0xe7dd011b, + 0x494f4849, + 0xf7ff3040, + 0x2e02fc48, + 0x78aadd06, + 0x98004639, + 0xf85cf000, + 0xe00f2102, + 0x98004639, + 0xfd5cf7ff, + 0x31404946, + 0x9a016ac9, + 0x210077d1, + 0xd0002e01, + 0xf7ff2108, + 0x2103fccc, + 0x77819801, + 0xbdf0b005, + 0x21019a01, + 0x6a217791, + 0x62211c49, + 0xe0026261, + 0x34602100, + 0x4a3777a1, + 0x62912100, + 0x62084931, + 0x7bc09803, + 0xd1e92801, + 0x3040482e, + 0x06c968c1, + 0x2100d5fc, + 0x29021c49, + 0x4930dbfc, + 0xfc0bf7ff, + 0x481ee7dc, + 0x4601b510, + 0x460a3160, + 0x232f7e89, + 0x29025419, + 0x7d01d010, + 0xd5130689, + 0x29016a01, + 0x6ec1dd10, + 0x06c97849, + 0x1e8b0ec9, + 0xd8092b12, + 0x1e5b7d43, + 0xe0067543, + 0xfbfcf7ff, + 0xd0002800, + 0xbd102001, + 0x76d12100, + 0xbd102000, + 0x33804b1b, + 0x7083695b, + 0x22017042, + 0x42910252, + 0x2102dd03, + 0x71017001, + 0x21014770, + 0x47707001, + 0x0000ffff, + 0x21000048, + 0xe000e280, + 0xe000e100, + 0x21000160, + 0x00020f47, + 0x00025500, + 0x2100461d, + 0x21004517, + 0x21004489, + 0x2100442f, + 0x2100437d, + 0x21004171, + 0x21000000, + 0x40045040, + 0x40042100, + 0x400451c0, + 0x40042000, + 0x40045300, + 0x40048000, + 0x40046000, + 0x490cb510, + 0x4a0c4788, + 0x5e512106, + 0xd0072900, + 0xd0052902, + 0xd0032909, + 0xd0012910, + 0xd1072911, + 0x43c92177, + 0xdd014288, + 0xdd012800, + 0x43c0207f, + 0x0000bd10, + 0x000065a9, + 0x21000380, + 0x2500b570, + 0x614548ff, + 0xf000207d, + 0x4cfefcfd, + 0x07c06ae0, + 0x62e5d0fc, + 0xf0002082, + 0x48fbfcf5, + 0x07c96ac1, + 0x62c5d0fc, + 0x60a12101, + 0x60a56025, + 0x384048f6, + 0x60056081, + 0xbd706085, + 0x4bf4b530, + 0x68db685b, + 0xd00d2b00, + 0x189c0852, + 0x4def4aef, + 0xe0053240, + 0x079b6853, + 0x6b6bd5fc, + 0x1c405423, + 0xdbf74288, + 0xb5f7bd30, + 0x2400468e, + 0x00c9214b, + 0x49e8468c, + 0x684e4627, + 0x46254623, + 0x62544ae6, + 0x6ad24ae1, + 0x4ae307d1, + 0x68520fc9, + 0x42821b92, + 0x2701d900, + 0x6a524ae0, + 0xd006429a, + 0x684648dd, + 0x46604bde, + 0xb29d6adb, + 0x29014613, + 0x2f00d001, + 0x4ad6d0e6, + 0x6ad16ad0, + 0x0fc006c0, + 0x0fc90689, + 0x29014ed3, + 0x2801d101, + 0x210fd011, + 0x020968b0, + 0x1d404008, + 0x48cc6190, + 0x62c12100, + 0x62012101, + 0x68784fcc, + 0x99026130, + 0xd00e2902, + 0x9802e013, + 0xd1032802, + 0x684048c7, + 0x61486871, + 0x20004671, + 0xf7ff9a02, + 0x2401ff9b, + 0x6871e7ea, + 0x8d892c01, + 0x1a40d01c, + 0x48c160f0, + 0x0a2a6ac0, + 0x0a08b281, + 0xb2c91880, + 0x1889b2ea, + 0x084a0840, + 0x23ff1811, + 0x1a103301, + 0x02001a59, + 0xfc6cf000, + 0x68706170, + 0x8d828873, + 0x18d56931, + 0xe00468f0, + 0x30f01a40, + 0x6879e7e0, + 0x1a096131, + 0xd3fa42a9, + 0x21009d02, + 0xd0052d02, + 0xd1032c01, + 0x1a086931, + 0x1ac11a80, + 0x1a406930, + 0x2c0160f0, + 0x2000d002, + 0xbdfe43c0, + 0xbdfe2000, + 0x4ba6b510, + 0x2402499e, + 0x28002201, + 0x48a4d007, + 0x694861d8, + 0x61484390, + 0x43206948, + 0x48a1e006, + 0x694861d8, + 0x61484310, + 0x43a06948, + 0x499b6148, + 0x6bc83940, + 0x40184b9c, + 0x43032303, + 0x431063cb, + 0xbd1063c8, + 0x9c02b510, + 0x02240112, + 0x3c013cff, + 0x43143a10, + 0x430c1e49, + 0x61cc498b, + 0x4b8a624b, + 0x3b402202, + 0x2200605a, + 0x620a62ca, + 0x02004a87, + 0x79926852, + 0xd0022a02, + 0x61881cc0, + 0x1d00bd10, + 0x7808e7fb, + 0x62c84983, + 0x49804770, + 0x68896849, + 0xd0042900, + 0x18080840, + 0x7800497e, + 0x487a62c8, + 0x38402103, + 0x60416001, + 0x20014976, + 0x60486008, + 0xb5384770, + 0xf7ff4605, + 0x4872ffe8, + 0x62c12100, + 0x62012108, + 0x78234c71, + 0x68a09300, + 0x05004b77, + 0x78620f00, + 0xffb6f7ff, + 0xf7ff2000, + 0x6861ff91, + 0x68082d02, + 0x8dc8d100, + 0x2101462a, + 0xfef9f7ff, + 0xb5f7bd38, + 0x46154966, + 0x684a2000, + 0x46944607, + 0x6ac94960, + 0x496207ce, + 0x68490ff6, + 0x1a8a4662, + 0x428a9900, + 0x2701d900, + 0x6a4c495e, + 0xd0074284, + 0xd0012c00, + 0xe0002001, + 0xf7ff2000, + 0x4620ff69, + 0xd0012e01, + 0xd0e32f00, + 0x21004851, + 0x4a526141, + 0x4e526ad0, + 0x0fc006c0, + 0xd1032d00, + 0x685b4b50, + 0x61636874, + 0xd0012f00, + 0xd01d2800, + 0x462a2401, + 0x99012000, + 0xfea8f7ff, + 0x6ac0484b, + 0xb2810223, + 0xb2ca0a08, + 0x1a101811, + 0x02001a59, + 0xfb88f000, + 0x4a436170, + 0x61316851, + 0x79836870, + 0x432f461f, + 0x2b01d00e, + 0xe01ad014, + 0x68b0230f, + 0x4018021b, + 0x61901d40, + 0x62c14837, + 0x62012101, + 0xe7e82400, + 0x2c008d83, + 0x1ac9d002, + 0xe00731f0, + 0xe0051ac9, + 0xd1042d00, + 0x1ac98d83, + 0x310531ff, + 0x8d8160f1, + 0x23008877, + 0x19c9468c, + 0x68f06932, + 0x4a2ce002, + 0x61326852, + 0x428a1a12, + 0x2d00d3f9, + 0x2c00d006, + 0x6931d004, + 0x46601a09, + 0x1bc31a08, + 0x1ac06930, + 0x2c0060f0, + 0x2000d001, + 0x2000bdfe, + 0xbdfe43c0, + 0x4605b538, + 0xff39f7ff, + 0x2100481a, + 0x210862c1, + 0x4c1a6201, + 0x93007823, + 0x4b2068a0, + 0x0f000500, + 0xf7ff7862, + 0x2000ff07, + 0xfee2f7ff, + 0x2d006861, + 0xd1006808, + 0x462a8dc8, + 0xf7ff2101, + 0xbd38ff52, + 0x4c0db530, + 0x62e52500, + 0x3a100112, + 0x430a1e49, + 0x626361e2, + 0x1c800200, + 0x480961a0, + 0x60012101, + 0x61456942, + 0x32404a06, + 0x68406011, + 0xe0173028, + 0x40041100, + 0x40046000, + 0x40045040, + 0x210053e8, + 0x40043000, + 0x40045300, + 0x400451c0, + 0x40044040, + 0x08180532, + 0x0818070e, + 0xfff000ff, + 0x0000aaaa, + 0x318049ff, + 0xbd306008, + 0x4605b538, + 0xfee5f7ff, + 0x210048fc, + 0x210662c1, + 0x4cfb6201, + 0x78232108, + 0x68a09300, + 0x05004bf9, + 0x78620f00, + 0xffb8f7ff, + 0x48f749f8, + 0x200161c8, + 0xfe8af7ff, + 0x462a6860, + 0x21016800, + 0xfefdf7ff, + 0xb530bd38, + 0x4bf24df2, + 0x35804cf2, + 0xd00e2a40, + 0x58420089, + 0x625a0c12, + 0xb2925842, + 0x1808629a, + 0x0c096841, + 0x684062a1, + 0x6328b280, + 0x00c9bd30, + 0x0c125842, + 0x584262da, + 0x631ab292, + 0x68411808, + 0x62590c09, + 0xb2896841, + 0x68816299, + 0x49e00c0a, + 0x634a31c0, + 0xb2926882, + 0x68c1638a, + 0x62a10c09, + 0xe7e168c0, + 0x4606b5f0, + 0x2080b089, + 0xfa8ef000, + 0x2500b662, + 0x204f4cd2, + 0x60e56066, + 0x00c049d6, + 0x47889501, + 0x68606125, + 0x290079c1, + 0x21ffd001, + 0x30203101, + 0x4acf60a1, + 0x62117901, + 0x21207902, + 0xd1002a00, + 0x70212140, + 0x21027980, + 0xd1002800, + 0x48ca2101, + 0x47807061, + 0x49c06860, + 0x79403020, + 0x62c83180, + 0x478048c6, + 0x80602000, + 0x384048bf, + 0x48c56bc0, + 0x610149c3, + 0x90002000, + 0x684849b8, + 0x24003020, + 0x46267c40, + 0x46259405, + 0x90029403, + 0x48b3e20c, + 0x4ab02700, + 0x68506147, + 0x31504601, + 0x48ade001, + 0x42886840, + 0x48b8d3fb, + 0x48b64780, + 0x48b76147, + 0x7ac07ac1, + 0x0fc907c9, + 0x40102202, + 0xd0024301, + 0xb00948b3, + 0x48a5bdf0, + 0x80412100, + 0x97076847, + 0x7cf93720, + 0x90060860, + 0xfa32f000, + 0xd1142900, + 0x42a09805, + 0x9802d011, + 0xd03b2800, + 0x07c09902, + 0x0fc00849, + 0x28009102, + 0x7cb8d002, + 0x90024048, + 0x98027c39, + 0xfa1cf000, + 0x9807460d, + 0x6b409405, + 0x5bc200ef, + 0x428a9900, + 0x1db9d02e, + 0x1d395a43, + 0x5c439300, + 0x5c421cb9, + 0x5c411cf9, + 0xf000200e, + 0x488afa0d, + 0x68402201, + 0x6b402300, + 0x5bc04611, + 0xf0000400, + 0x488dfa09, + 0x48924780, + 0x29037801, + 0x4882d1fc, + 0x8f096841, + 0x497e8041, + 0x46026848, + 0xe0073238, + 0x7c381c6d, + 0x42a8b2ed, + 0x2500d8cd, + 0x6848e7cb, + 0xd3fc4290, + 0x68404878, + 0x5bc06b40, + 0x48799000, + 0x68813840, + 0xf000207e, + 0x4873f9eb, + 0x6a386847, + 0xd0062800, + 0x46200041, + 0xf9d0f000, + 0xd0052900, + 0x496de014, + 0x780a69b8, + 0xe0334621, + 0xd00b2c00, + 0x30204638, + 0x07ca7fc1, + 0x2201d018, + 0x43917782, + 0x496f77c1, + 0x608802d0, + 0x900469b8, + 0x90076a38, + 0x46200041, + 0xf9b2f000, + 0x42819807, + 0x2c00d113, + 0x4638d00f, + 0x7fc13020, + 0xd401078a, + 0xe7664869, + 0x77822202, + 0x401122fd, + 0x200177c1, + 0x02c04960, + 0x69f86088, + 0x46209004, + 0xf0006a39, + 0x4852f997, + 0x98047802, + 0xfec1f7ff, + 0xd1042c00, + 0x6840484e, + 0x28027980, + 0x9806d00c, + 0x484b9001, + 0x79806840, + 0xd0072801, + 0x28004f48, + 0x2802d058, + 0xe078d07e, + 0xe12f2402, + 0xf7ff4620, + 0xb280fe87, + 0x48414684, + 0x6ac33040, + 0x68504a40, + 0x98016907, + 0x1d4800c1, + 0x6850543b, + 0x1d086903, + 0x4660541d, + 0xd00e2800, + 0x20006852, + 0x691243c0, + 0x50502c00, + 0xe002d167, + 0xb2a41ca4, + 0x9803e053, + 0x90031c40, + 0x6857e04f, + 0x5dc02027, + 0xd0012801, + 0xe0146950, + 0x30804832, + 0x071b6a83, + 0x61530f1b, + 0x05806a80, + 0x2b070e80, + 0x3b10dd01, + 0x281f6153, + 0x3840dd01, + 0x0100b200, + 0x010018c0, + 0x30ff6150, + 0x30014b33, + 0xd3014298, + 0x61502000, + 0x30804824, + 0x69536a40, + 0x18c00200, + 0x5058693b, + 0xb2816950, + 0xe0ca207f, + 0xf7ff4620, + 0xb281fddf, + 0x30404817, + 0x48176ac3, + 0x69076840, + 0x00c09801, + 0x54bb1d42, + 0x1d034a13, + 0x29006852, + 0x54d56912, + 0x4910d04e, + 0x68492200, + 0x690943d2, + 0x500a2c00, + 0x1c76d0af, + 0x2c01b2b6, + 0xf7ffd8a8, + 0x4809fbf5, + 0x8d386847, + 0xe00042b0, + 0xd303e040, + 0x99038d7a, + 0xd27e428a, + 0x42884914, + 0xe054e028, + 0x40043000, + 0x40046000, + 0x210053e8, + 0x0000aaaa, + 0x08180532, + 0x40044040, + 0x40045140, + 0x40045300, + 0x0000424f, + 0x00009083, + 0x00004be3, + 0x0000c210, + 0x40041100, + 0x00000de5, + 0x21000128, + 0x04040003, + 0x210002e4, + 0x04060003, + 0x00000201, + 0x0000ffff, + 0x8d78d102, + 0xd06f4288, + 0x484d2101, + 0x60810449, + 0xe684484c, + 0x21004a4c, + 0x69126852, + 0xe75f5011, + 0xf7ff4620, + 0xb282fcc6, + 0x46946878, + 0x98016903, + 0x00c04639, + 0x549d1d02, + 0x6ad34a44, + 0x6917687a, + 0x54bb1d42, + 0x2a004662, + 0x6849d00a, + 0x43d22200, + 0x2c026909, + 0xd800500a, + 0x1c76e745, + 0xe73fb2b6, + 0x68494939, + 0x3120468c, + 0x290179c9, + 0x4938d125, + 0x07136a8a, + 0x0f1b4a37, + 0x6a896997, + 0x0f3f073f, + 0x69920589, + 0x05920e89, + 0x2b070e92, + 0x3b10dd00, + 0xdd002f07, + 0x291f3f10, + 0x3940dd01, + 0x2a1fb209, + 0x3a40dd03, + 0xe01fe000, + 0x0109b212, + 0x19c918c9, + 0x18890112, + 0x4924010a, + 0x4923614a, + 0x694a4b26, + 0x320132ff, + 0xd301429a, + 0x614a2200, + 0x6a524a20, + 0x0212694b, + 0x466218d3, + 0x50136912, + 0xb2816948, + 0xf0002083, + 0xe6fbf873, + 0x98018fb9, + 0xf856f000, + 0xd1072900, + 0x28009801, + 0x8778d004, + 0x48102101, + 0x608103c9, + 0x68414810, + 0x42a18889, + 0xe5ecd900, + 0x480b2101, + 0x60810409, + 0x1e49480b, + 0x8d026840, + 0xd103428a, + 0x42888d40, + 0xe5d3d100, + 0x98014906, + 0x87486849, + 0xf0002081, + 0x2000f825, + 0x0000e5ef, + 0x40041100, + 0x04030003, + 0x210053e8, + 0x40046040, + 0x400451c0, + 0x40045080, + 0x00000201, + 0x49068800, + 0xd1064288, + 0x21004805, + 0x49058501, + 0x20016241, + 0x20824770, + 0x00004770, + 0x00006801, + 0x21000108, + 0x21004159, + 0x4801b403, + 0xbd019001, + 0x00003cc3, + 0x4801b403, + 0xbd019001, + 0x0000937d, + 0x4801b403, + 0xbd019001, + 0x00009361, + 0x4801b403, + 0xbd019001, + 0x0000867b, + 0x4801b403, + 0xbd019001, + 0x000049a3, + 0x4801b403, + 0xbd019001, + 0x00003c8f, + 0x4801b403, + 0xbd019001, + 0x00003ca9, + 0x4674b430, + 0x78251e64, + 0x42ab1c64, + 0x461dd200, + 0x005b5d63, + 0xbc3018e3, + 0x00004718, + 0x08180532, + 0x0818070e, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, }; #define _NWORD_PATCHIMAGE_MULTI_PROTOCOL_RTLS 1261 -CPE_PATCH_TYPE patchCpeHd[] = { - 0x00000000, +CPE_PATCH_TYPE patchCpeHd[] = +{ + 0x00000000, }; #define _NWORD_PATCHCPEHD_MULTI_PROTOCOL_RTLS 1 @@ -1367,18 +1369,18 @@ static uint8_t bMultiProtocolRtlsPatchEntered = 0; PATCH_FUN_SPEC void enterMultiProtocolRtlsCpePatch(void) { #if (_NWORD_PATCHIMAGE_MULTI_PROTOCOL_RTLS > 0) - uint32_t *pPatchVec = (uint32_t *) (_MULTI_PROTOCOL_RTLS_CPERAM_START + _MULTI_PROTOCOL_RTLS_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_MULTI_PROTOCOL_RTLS_CPERAM_START + _MULTI_PROTOCOL_RTLS_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageMultiProtocolRtls, sizeof(patchImageMultiProtocolRtls)); + memcpy(pPatchVec, patchImageMultiProtocolRtls, sizeof(patchImageMultiProtocolRtls)); #endif } PATCH_FUN_SPEC void enterMultiProtocolRtlsCpeHdPatch(void) { #if (_NWORD_PATCHCPEHD_MULTI_PROTOCOL_RTLS > 0) - uint32_t *pPatchCpeHd = (uint32_t *) (_MULTI_PROTOCOL_RTLS_CPERAM_START + _MULTI_PROTOCOL_RTLS_PATCH_CPEHD_OFFSET); + uint32_t* pPatchCpeHd = (uint32_t*) (_MULTI_PROTOCOL_RTLS_CPERAM_START + _MULTI_PROTOCOL_RTLS_PATCH_CPEHD_OFFSET); - memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); + memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); #endif } @@ -1388,54 +1390,56 @@ PATCH_FUN_SPEC void enterMultiProtocolRtlsSysPatch(void) PATCH_FUN_SPEC void configureMultiProtocolRtlsPatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_MULTI_PROTOCOL_RTLS_CPERAM_START + _MULTI_PROTOCOL_RTLS_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_MULTI_PROTOCOL_RTLS_CPERAM_START + _MULTI_PROTOCOL_RTLS_PATCH_TAB_OFFSET); - pPatchTab[1] = 0; - pPatchTab[18] = 1; - pPatchTab[81] = 2; - pPatchTab[26] = 3; - pPatchTab[76] = 4; - pPatchTab[62] = 5; - pPatchTab[64] = 6; - pPatchTab[91] = 7; - pPatchTab[79] = 8; - pPatchTab[168] = 9; + pPatchTab[1] = 0; + pPatchTab[18] = 1; + pPatchTab[81] = 2; + pPatchTab[26] = 3; + pPatchTab[76] = 4; + pPatchTab[62] = 5; + pPatchTab[64] = 6; + pPatchTab[91] = 7; + pPatchTab[79] = 8; + pPatchTab[168] = 9; } PATCH_FUN_SPEC void applyMultiProtocolRtlsPatch(void) { #ifdef _MULTI_PROTOCOL_RTLS_NO_PROG_STATE_VAR - enterMultiProtocolRtlsSysPatch(); - enterMultiProtocolRtlsCpePatch(); + enterMultiProtocolRtlsSysPatch(); + enterMultiProtocolRtlsCpePatch(); #else - if (!bMultiProtocolRtlsPatchEntered) - { - enterMultiProtocolRtlsSysPatch(); - enterMultiProtocolRtlsCpePatch(); - bMultiProtocolRtlsPatchEntered = 1; - } + + if (!bMultiProtocolRtlsPatchEntered) + { + enterMultiProtocolRtlsSysPatch(); + enterMultiProtocolRtlsCpePatch(); + bMultiProtocolRtlsPatchEntered = 1; + } + #endif - enterMultiProtocolRtlsCpeHdPatch(); - configureMultiProtocolRtlsPatch(); + enterMultiProtocolRtlsCpeHdPatch(); + configureMultiProtocolRtlsPatch(); } PATCH_FUN_SPEC void refreshMultiProtocolRtlsPatch(void) { - enterMultiProtocolRtlsCpeHdPatch(); - configureMultiProtocolRtlsPatch(); + enterMultiProtocolRtlsCpeHdPatch(); + configureMultiProtocolRtlsPatch(); } #ifndef _MULTI_PROTOCOL_RTLS_NO_PROG_STATE_VAR PATCH_FUN_SPEC void cleanMultiProtocolRtlsPatch(void) { - bMultiProtocolRtlsPatchEntered = 0; + bMultiProtocolRtlsPatchEntered = 0; } #endif PATCH_FUN_SPEC void rf_patch_cpe_multi_protocol_rtls(void) { - applyMultiProtocolRtlsPatch(); + applyMultiProtocolRtlsPatch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_prop.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_prop.h index 0b27e83e..bcc133ff 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_prop.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_cpe_prop.h @@ -69,45 +69,46 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageProp[] = { - 0x21004059, - 0x210040c3, - 0x21004085, - 0x79654c07, - 0xf809f000, - 0x40697961, - 0xd5030749, - 0x4a042101, - 0x60110389, - 0xb570bd70, - 0x47084902, - 0x21000380, - 0x40041108, - 0x0000592d, - 0xf819f000, - 0x296cb2e1, - 0x2804d00b, - 0x2806d001, - 0x490ed107, - 0x07c97809, - 0x7821d103, - 0xd4000709, - 0x490b2002, - 0x210c780a, - 0xd0024211, - 0x22804909, - 0xb003600a, - 0xb5f0bdf0, - 0x4907b083, - 0x48044708, - 0x22407801, - 0x70014391, - 0x47004804, - 0x210000c8, - 0x21000133, - 0xe000e200, - 0x00031641, - 0x00031b23, +CPE_PATCH_TYPE patchImageProp[] = +{ + 0x21004059, + 0x210040c3, + 0x21004085, + 0x79654c07, + 0xf809f000, + 0x40697961, + 0xd5030749, + 0x4a042101, + 0x60110389, + 0xb570bd70, + 0x47084902, + 0x21000380, + 0x40041108, + 0x0000592d, + 0xf819f000, + 0x296cb2e1, + 0x2804d00b, + 0x2806d001, + 0x490ed107, + 0x07c97809, + 0x7821d103, + 0xd4000709, + 0x490b2002, + 0x210c780a, + 0xd0024211, + 0x22804909, + 0xb003600a, + 0xb5f0bdf0, + 0x4907b083, + 0x48044708, + 0x22407801, + 0x70014391, + 0x47004804, + 0x210000c8, + 0x21000133, + 0xe000e200, + 0x00031641, + 0x00031b23, }; #define _NWORD_PATCHIMAGE_PROP 38 @@ -141,18 +142,18 @@ static uint8_t bPropPatchEntered = 0; PATCH_FUN_SPEC void enterPropCpePatch(void) { #if (_NWORD_PATCHIMAGE_PROP > 0) - uint32_t *pPatchVec = (uint32_t *) (_PROP_CPERAM_START + _PROP_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_PROP_CPERAM_START + _PROP_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageProp, sizeof(patchImageProp)); + memcpy(pPatchVec, patchImageProp, sizeof(patchImageProp)); #endif } PATCH_FUN_SPEC void enterPropCpeHdPatch(void) { #if (_NWORD_PATCHCPEHD_PROP > 0) - uint32_t *pPatchCpeHd = (uint32_t *) (_PROP_CPERAM_START + _PROP_PATCH_CPEHD_OFFSET); + uint32_t* pPatchCpeHd = (uint32_t*) (_PROP_CPERAM_START + _PROP_PATCH_CPEHD_OFFSET); - memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); + memcpy(pPatchCpeHd, patchCpeHd, sizeof(patchCpeHd)); #endif } @@ -162,47 +163,49 @@ PATCH_FUN_SPEC void enterPropSysPatch(void) PATCH_FUN_SPEC void configurePropPatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_PROP_CPERAM_START + _PROP_PATCH_TAB_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_PROP_CPERAM_START + _PROP_PATCH_TAB_OFFSET); - pPatchTab[76] = 0; - pPatchTab[62] = 1; - pPatchTab[64] = 2; + pPatchTab[76] = 0; + pPatchTab[62] = 1; + pPatchTab[64] = 2; } PATCH_FUN_SPEC void applyPropPatch(void) { #ifdef _PROP_NO_PROG_STATE_VAR - enterPropSysPatch(); - enterPropCpePatch(); + enterPropSysPatch(); + enterPropCpePatch(); #else - if (!bPropPatchEntered) - { - enterPropSysPatch(); - enterPropCpePatch(); - bPropPatchEntered = 1; - } + + if (!bPropPatchEntered) + { + enterPropSysPatch(); + enterPropCpePatch(); + bPropPatchEntered = 1; + } + #endif - enterPropCpeHdPatch(); - configurePropPatch(); + enterPropCpeHdPatch(); + configurePropPatch(); } PATCH_FUN_SPEC void refreshPropPatch(void) { - enterPropCpeHdPatch(); - configurePropPatch(); + enterPropCpeHdPatch(); + configurePropPatch(); } #ifndef _PROP_NO_PROG_STATE_VAR PATCH_FUN_SPEC void cleanPropPatch(void) { - bPropPatchEntered = 0; + bPropPatchEntered = 0; } #endif PATCH_FUN_SPEC void rf_patch_cpe_prop(void) { - applyPropPatch(); + applyPropPatch(); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_iqdump.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_iqdump.h index da5407e4..3c520312 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_iqdump.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_iqdump.h @@ -43,395 +43,400 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchIqdumpMce[337] = { - 0x2fcf6030, - 0x00013f9d, - 0xff00003f, - 0x07ff0fff, - 0x0300f800, - 0x00068080, - 0x00170003, - 0x00003d1f, - 0x08000000, - 0x0000000f, - 0x00000387, - 0x00434074, - 0x00828000, - 0x06f00080, - 0x091e0000, - 0x00540510, - 0x00000007, - 0x00505014, - 0xc02f0000, - 0x017f0c30, - 0x00000000, - 0x00000000, - 0x00000000, - 0x0000aa00, - 0x66957223, - 0xa4e5a35d, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72917391, - 0xffc0b008, - 0xa0089010, - 0x720e720d, - 0x7210720f, - 0x7100b0d0, - 0xa0d0b110, - 0x8162721b, - 0x39521020, - 0x00200670, - 0x11011630, - 0x6c011401, - 0x60816080, - 0x610b60fd, - 0x60806080, - 0x60806080, - 0x60816080, - 0x61af60fd, - 0x60806080, - 0x60806080, - 0x60816080, - 0x611b60fd, - 0x60806080, - 0x60806080, - 0x60816080, - 0x61cb60fd, - 0x60806080, - 0x60806080, - 0x60816080, - 0x615360fd, - 0x72231210, - 0x73127311, - 0x81b17313, - 0x91b00010, - 0x6044b070, - 0xc0306076, - 0xc0c1669b, - 0xc4e0c2b2, - 0x6f131820, - 0x16116e23, - 0x68871612, - 0x99c07830, - 0x948078a0, - 0xc4f29490, - 0x1820c750, - 0x12034099, - 0x16126e23, - 0x78b06896, - 0x72639990, - 0x6076b63c, - 0x96408190, - 0x39808170, - 0x10012a70, - 0x84a21611, - 0xc0f384b4, - 0xc200c0f5, - 0x40c21c01, - 0x1c10c100, - 0x4cba40b8, - 0x18031013, - 0x1a131830, - 0x39121a10, - 0x60c268b5, - 0x60c213f3, - 0x101513f3, - 0x1850c100, - 0x1a101a15, - 0x68c03914, - 0x7100b0e8, - 0xa0e8b128, - 0xb910b230, - 0x99308990, - 0xb0d1b111, - 0xb0027100, - 0xb111b012, - 0x7291a0d1, - 0xb003b630, - 0x722cb013, - 0x7100b0e0, - 0x8170b120, - 0x710092c0, - 0x8170b120, - 0x44db22f0, - 0x1c0313f0, - 0x92c340e7, - 0x71009642, - 0x92c5b120, - 0x71009644, - 0xb0e0b120, - 0x7000a630, - 0xc030a0e1, - 0xc0409910, - 0xb1119930, - 0x7100b0d1, - 0xa0d1b111, - 0xa0037291, - 0xa230a002, - 0x73117000, - 0xc0407312, - 0xc100669b, - 0x649e91f0, - 0xb113b633, - 0x7100b0d3, - 0x64eea0d3, - 0xa0d26076, - 0xa0f3a0f0, - 0x73127311, - 0xc050660f, - 0xb0d2669b, - 0x7100c035, - 0xba389b75, - 0xb112b074, - 0xa0d26115, - 0xa0f3a0f0, - 0x73127311, - 0xc18b660f, - 0x91e0c000, - 0x1218120c, - 0x787d786a, - 0x10a9788e, - 0xb0d2b074, - 0xb112c020, - 0x692d7100, - 0x669bc060, - 0xb112c035, - 0x9b757100, - 0x65a48bf0, - 0x22018ca1, - 0x10804140, - 0x453f1ca8, - 0x16181208, - 0x8c00659b, - 0x8ca165a4, - 0x414b2201, - 0x1a191090, - 0x454b1e09, - 0x659b10a9, - 0x1e048184, - 0x14bc4133, - 0x4e7e1c4c, - 0xa0d26133, - 0xa0f3a0f0, - 0x73127311, - 0x721e660f, - 0x1205120c, - 0xb0d2b074, - 0xb112c020, - 0x695f7100, - 0x669bc070, - 0x89ce789d, - 0x7100b112, - 0x22008c90, - 0x8230416f, - 0x456f2210, - 0x9a3db231, - 0x31828ab2, - 0x8af03d82, - 0x3d803180, - 0x063e1802, - 0x41911e0e, - 0x41831e2e, - 0x418a1e3e, - 0x14261056, - 0x10653d16, - 0x10566192, - 0x18563126, - 0x3d261426, - 0x61921065, - 0x31361056, - 0x14261856, - 0x10653d36, - 0x10266192, - 0x91c63976, - 0x1e048184, - 0x161c4166, - 0x4e7e1c4c, - 0x10016166, - 0x91c1c0b0, - 0x10003911, - 0x10001000, - 0x7000699d, - 0x3d303130, - 0x4dab1cd0, - 0x49ad1ce0, - 0x10d07000, - 0x10e07000, - 0xc0807000, - 0xa0d2669b, - 0xa0f3a0f0, - 0x73127311, - 0xb130660f, - 0x7100b0f0, - 0x220080b0, - 0x61b945be, - 0xc090b231, - 0xb130669b, - 0xb0d2a0f0, - 0x7100c035, - 0xba389b75, - 0xb112b074, - 0xc0a061c5, - 0xa0d2669b, - 0xa0f3a0f0, - 0x73127311, - 0xc18b660f, - 0x91e0c000, - 0x1218120c, - 0x787d786a, - 0x10a9788e, - 0xb0f0b130, - 0x80b07100, - 0x45e32200, - 0xb07461de, - 0xc0b0b231, - 0xb130669b, - 0xb0d2a0f0, - 0xb112c020, - 0x69eb7100, - 0xb112c035, - 0x9b757100, - 0x65a48bf0, - 0x22018ca1, - 0x108041fc, - 0x45fb1ca8, - 0x16181208, - 0x8c00659b, - 0x8ca165a4, - 0x42072201, - 0x1a191090, - 0x46071e09, - 0x659b10a9, - 0x1e048184, - 0x14bc41ef, - 0x4e7e1c4c, - 0x824061ef, - 0x46172230, - 0x7100b0d5, - 0xa0d5b115, - 0xc0c0620f, - 0xb118669b, - 0xb016b006, - 0xb014b004, - 0xb012b002, - 0x78428440, - 0x81730420, - 0x2a733983, - 0xc1f294e3, - 0x31621832, - 0x31511021, - 0x00200012, - 0x10309440, - 0x39301610, - 0x42352210, - 0x31501220, - 0x31801003, - 0x93801630, - 0x12041202, - 0x42472273, - 0x997084a0, - 0x1a828982, - 0x997084c0, - 0x1a848984, - 0x22636249, - 0x84b04254, - 0x89809970, - 0x14021a80, - 0x997084d0, - 0x1a808980, - 0x62601404, - 0x785184b0, - 0x99700410, - 0x1a428982, - 0x785184d0, - 0x99700410, - 0x1a448984, - 0x31543152, - 0x06333963, - 0x38321613, - 0x31823834, - 0x31843982, - 0x97220042, - 0x959084a0, - 0x95a084b0, - 0x95b084c0, - 0x95c084d0, - 0x90307810, - 0x78209050, - 0x90609040, - 0xcd90b235, - 0x70009170, - 0xb112a235, - 0xa0d27100, - 0xba3cb112, - 0x8b5481b0, - 0x31843924, - 0x91b40004, - 0x669bc0d0, - 0x72917391, - 0x72066695, - 0x72047202, - 0x73067305, - 0x86306076, - 0x3151c801, - 0x96300410, - 0x9a007000, - 0x220089f0, - 0xb9e0469c, - 0x00007000 +MCE_PATCH_TYPE patchIqdumpMce[337] = +{ + 0x2fcf6030, + 0x00013f9d, + 0xff00003f, + 0x07ff0fff, + 0x0300f800, + 0x00068080, + 0x00170003, + 0x00003d1f, + 0x08000000, + 0x0000000f, + 0x00000387, + 0x00434074, + 0x00828000, + 0x06f00080, + 0x091e0000, + 0x00540510, + 0x00000007, + 0x00505014, + 0xc02f0000, + 0x017f0c30, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000aa00, + 0x66957223, + 0xa4e5a35d, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72917391, + 0xffc0b008, + 0xa0089010, + 0x720e720d, + 0x7210720f, + 0x7100b0d0, + 0xa0d0b110, + 0x8162721b, + 0x39521020, + 0x00200670, + 0x11011630, + 0x6c011401, + 0x60816080, + 0x610b60fd, + 0x60806080, + 0x60806080, + 0x60816080, + 0x61af60fd, + 0x60806080, + 0x60806080, + 0x60816080, + 0x611b60fd, + 0x60806080, + 0x60806080, + 0x60816080, + 0x61cb60fd, + 0x60806080, + 0x60806080, + 0x60816080, + 0x615360fd, + 0x72231210, + 0x73127311, + 0x81b17313, + 0x91b00010, + 0x6044b070, + 0xc0306076, + 0xc0c1669b, + 0xc4e0c2b2, + 0x6f131820, + 0x16116e23, + 0x68871612, + 0x99c07830, + 0x948078a0, + 0xc4f29490, + 0x1820c750, + 0x12034099, + 0x16126e23, + 0x78b06896, + 0x72639990, + 0x6076b63c, + 0x96408190, + 0x39808170, + 0x10012a70, + 0x84a21611, + 0xc0f384b4, + 0xc200c0f5, + 0x40c21c01, + 0x1c10c100, + 0x4cba40b8, + 0x18031013, + 0x1a131830, + 0x39121a10, + 0x60c268b5, + 0x60c213f3, + 0x101513f3, + 0x1850c100, + 0x1a101a15, + 0x68c03914, + 0x7100b0e8, + 0xa0e8b128, + 0xb910b230, + 0x99308990, + 0xb0d1b111, + 0xb0027100, + 0xb111b012, + 0x7291a0d1, + 0xb003b630, + 0x722cb013, + 0x7100b0e0, + 0x8170b120, + 0x710092c0, + 0x8170b120, + 0x44db22f0, + 0x1c0313f0, + 0x92c340e7, + 0x71009642, + 0x92c5b120, + 0x71009644, + 0xb0e0b120, + 0x7000a630, + 0xc030a0e1, + 0xc0409910, + 0xb1119930, + 0x7100b0d1, + 0xa0d1b111, + 0xa0037291, + 0xa230a002, + 0x73117000, + 0xc0407312, + 0xc100669b, + 0x649e91f0, + 0xb113b633, + 0x7100b0d3, + 0x64eea0d3, + 0xa0d26076, + 0xa0f3a0f0, + 0x73127311, + 0xc050660f, + 0xb0d2669b, + 0x7100c035, + 0xba389b75, + 0xb112b074, + 0xa0d26115, + 0xa0f3a0f0, + 0x73127311, + 0xc18b660f, + 0x91e0c000, + 0x1218120c, + 0x787d786a, + 0x10a9788e, + 0xb0d2b074, + 0xb112c020, + 0x692d7100, + 0x669bc060, + 0xb112c035, + 0x9b757100, + 0x65a48bf0, + 0x22018ca1, + 0x10804140, + 0x453f1ca8, + 0x16181208, + 0x8c00659b, + 0x8ca165a4, + 0x414b2201, + 0x1a191090, + 0x454b1e09, + 0x659b10a9, + 0x1e048184, + 0x14bc4133, + 0x4e7e1c4c, + 0xa0d26133, + 0xa0f3a0f0, + 0x73127311, + 0x721e660f, + 0x1205120c, + 0xb0d2b074, + 0xb112c020, + 0x695f7100, + 0x669bc070, + 0x89ce789d, + 0x7100b112, + 0x22008c90, + 0x8230416f, + 0x456f2210, + 0x9a3db231, + 0x31828ab2, + 0x8af03d82, + 0x3d803180, + 0x063e1802, + 0x41911e0e, + 0x41831e2e, + 0x418a1e3e, + 0x14261056, + 0x10653d16, + 0x10566192, + 0x18563126, + 0x3d261426, + 0x61921065, + 0x31361056, + 0x14261856, + 0x10653d36, + 0x10266192, + 0x91c63976, + 0x1e048184, + 0x161c4166, + 0x4e7e1c4c, + 0x10016166, + 0x91c1c0b0, + 0x10003911, + 0x10001000, + 0x7000699d, + 0x3d303130, + 0x4dab1cd0, + 0x49ad1ce0, + 0x10d07000, + 0x10e07000, + 0xc0807000, + 0xa0d2669b, + 0xa0f3a0f0, + 0x73127311, + 0xb130660f, + 0x7100b0f0, + 0x220080b0, + 0x61b945be, + 0xc090b231, + 0xb130669b, + 0xb0d2a0f0, + 0x7100c035, + 0xba389b75, + 0xb112b074, + 0xc0a061c5, + 0xa0d2669b, + 0xa0f3a0f0, + 0x73127311, + 0xc18b660f, + 0x91e0c000, + 0x1218120c, + 0x787d786a, + 0x10a9788e, + 0xb0f0b130, + 0x80b07100, + 0x45e32200, + 0xb07461de, + 0xc0b0b231, + 0xb130669b, + 0xb0d2a0f0, + 0xb112c020, + 0x69eb7100, + 0xb112c035, + 0x9b757100, + 0x65a48bf0, + 0x22018ca1, + 0x108041fc, + 0x45fb1ca8, + 0x16181208, + 0x8c00659b, + 0x8ca165a4, + 0x42072201, + 0x1a191090, + 0x46071e09, + 0x659b10a9, + 0x1e048184, + 0x14bc41ef, + 0x4e7e1c4c, + 0x824061ef, + 0x46172230, + 0x7100b0d5, + 0xa0d5b115, + 0xc0c0620f, + 0xb118669b, + 0xb016b006, + 0xb014b004, + 0xb012b002, + 0x78428440, + 0x81730420, + 0x2a733983, + 0xc1f294e3, + 0x31621832, + 0x31511021, + 0x00200012, + 0x10309440, + 0x39301610, + 0x42352210, + 0x31501220, + 0x31801003, + 0x93801630, + 0x12041202, + 0x42472273, + 0x997084a0, + 0x1a828982, + 0x997084c0, + 0x1a848984, + 0x22636249, + 0x84b04254, + 0x89809970, + 0x14021a80, + 0x997084d0, + 0x1a808980, + 0x62601404, + 0x785184b0, + 0x99700410, + 0x1a428982, + 0x785184d0, + 0x99700410, + 0x1a448984, + 0x31543152, + 0x06333963, + 0x38321613, + 0x31823834, + 0x31843982, + 0x97220042, + 0x959084a0, + 0x95a084b0, + 0x95b084c0, + 0x95c084d0, + 0x90307810, + 0x78209050, + 0x90609040, + 0xcd90b235, + 0x70009170, + 0xb112a235, + 0xa0d27100, + 0xba3cb112, + 0x8b5481b0, + 0x31843924, + 0x91b40004, + 0x669bc0d0, + 0x72917391, + 0x72066695, + 0x72047202, + 0x73067305, + 0x86306076, + 0x3151c801, + 0x96300410, + 0x9a007000, + 0x220089f0, + 0xb9e0469c, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_mce_iqdump(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 337; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchIqdumpMce[i]; - } + uint32_t i; + + for (i = 0; i < 337; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchIqdumpMce[i]; + } + #else - const uint32_t *pS = patchIqdumpMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 42; + const uint32_t* pS = patchIqdumpMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 42; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - *pD++ = t1; + t1 = *pS++; + *pD++ = t1; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_tof.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_tof.h index 264ba4f6..fe0ffaa9 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_tof.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_mce_tof.h @@ -43,566 +43,571 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchTofMce[506] = { - 0x0003605b, - 0x00f1000f, - 0x00000000, - 0x000c8000, - 0x00000000, - 0x0c650000, - 0x80000000, - 0x00800010, - 0x00000000, - 0x0594091e, - 0x00000350, - 0x7c200000, - 0x000000c2, - 0x34340013, - 0x0003005a, - 0x00000032, - 0xfe6b2840, - 0xdeade8ca, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x07d00011, - 0x6fdd2fea, - 0x0fb00ff0, - 0xf80f0003, - 0x007f7f30, - 0x3434001f, - 0x8010005a, - 0x01900000, - 0x40000800, - 0xc0300c65, - 0x722367ee, - 0xa35d7263, - 0x73057303, - 0x73047203, - 0x72047306, - 0x72917391, - 0x8001c7c0, - 0x90010001, - 0x08019010, - 0x720d9001, - 0x720f720e, - 0xb0d07210, - 0xc0407100, - 0xa0d067ee, - 0x721bb110, - 0x10208162, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60936c01, - 0x60c260a4, - 0x6219617b, - 0x60936093, - 0x60936093, - 0x60c260a4, - 0x6219617b, - 0x60936093, - 0x60976093, - 0x12206095, - 0xc050609a, - 0x121267ee, - 0x73117223, - 0x73137312, - 0x81b17314, - 0x91b20012, - 0x6073b070, - 0xc2b2c011, - 0x1820c710, - 0x6e236f13, - 0x16121611, - 0x7d7068a8, - 0xc0229990, - 0x39818161, - 0xd0601812, - 0x67ee9a12, - 0x40971e01, - 0x99907d80, - 0x93807d50, - 0x93307d60, - 0x93007d90, - 0x6097b360, - 0xc07067e5, - 0x677e67ee, - 0x91f0c070, - 0x670bb750, - 0xb233b914, - 0xa750672d, - 0x95b488d4, - 0x95c488e4, - 0x95948ca4, - 0x95a487c4, - 0x2a007cb0, - 0x88d49060, - 0x88e495d4, - 0xc0f495e4, - 0x91449134, - 0x22008c80, - 0xb0f040e5, - 0xb0f6b130, - 0xb0d5b0d0, - 0xb110b136, - 0xb140b100, - 0x73137314, - 0x2a007cb0, - 0xc0f19060, - 0x40f51e0e, - 0x99311611, - 0xc037b912, - 0xb115b041, - 0xa910c031, - 0xb0737100, - 0xba3eb910, - 0x22008090, - 0x80b24574, - 0x45182262, - 0x220280c2, - 0xb061410b, - 0x2250b140, - 0x824040f9, - 0x45152200, - 0x40f9220f, - 0x679e100f, - 0x100f60f9, - 0x60f967b4, - 0xb234a913, - 0x93acba39, - 0xa0d58462, - 0xb0d1720f, - 0x7100b111, - 0xb1119937, - 0xb35d7100, - 0x9930c3f0, - 0xc0d0b074, - 0x894193f0, - 0x67bf9791, - 0x14018941, - 0x7100b111, - 0xba3aba3b, - 0xc210b078, - 0xa2329930, - 0xb111b235, - 0xa35d7100, - 0x7291b06e, - 0x8af2a0d1, - 0x3d823182, - 0x67eec080, - 0x8c528c33, - 0x8c441423, - 0x14248c62, - 0x06f28b32, - 0x31418b21, - 0x97a20012, - 0x0424cff2, - 0x31433143, - 0x97b40034, - 0x6957c8f0, - 0xb130b235, - 0xb136a0f0, - 0xb140a0f6, - 0xb914a100, - 0xa7507291, - 0xa002a003, - 0x9010c7c0, - 0x72047203, - 0x73067305, - 0xa23267e5, - 0x8242b235, - 0x456b1e02, - 0xc0907223, - 0x609767ee, - 0xa232b235, - 0xd0a08942, - 0x67ee9a12, - 0x67e56159, - 0x677ec00f, - 0x91f0c070, - 0xc0b0670b, - 0xb01367ee, - 0x22008c80, - 0xb0f04189, - 0xb0f6b130, - 0xb0d5b0d0, - 0xb136b111, - 0x72917313, - 0xc0e1b912, - 0x41951e0e, - 0x99311611, - 0xb041c037, - 0xc031b232, - 0xb115a910, - 0xb0737100, - 0xba3eb910, - 0x22008090, - 0x80b24614, - 0x45b32262, - 0x41992250, - 0x22008240, - 0x220f45b0, - 0x100f4199, - 0x6199679e, - 0x67b4100f, - 0xb9136199, - 0xba39b234, - 0xa0d593ac, - 0x7313720f, - 0x73147210, - 0x264081b0, - 0xb0d191b0, - 0x7100b111, - 0x9937b041, - 0x7100b111, - 0xc3f0b35d, - 0xb0749930, - 0x93f0c0d0, - 0x7100b111, - 0xc210b078, - 0xa2329930, - 0x7100b111, - 0xb06ea35d, - 0xa0d1a910, - 0x899167bf, - 0x81a01401, - 0x99311401, - 0xb0d6b116, - 0xb1167100, - 0x8090a0d6, - 0x46142200, - 0x88d4b012, - 0x88e495b4, - 0x8ca495c4, - 0x87c49594, - 0x729195a4, - 0x2a208230, - 0x92302630, - 0xc070672d, - 0x8af287b1, - 0x3d823182, - 0x69fbc310, - 0xb111b064, - 0xa0f6b136, - 0xa0f0b130, - 0x8242b235, - 0x46021e02, - 0x7291b914, - 0xa002a003, - 0x9010c7c0, - 0x72047203, - 0x73067305, - 0x67eec0c0, - 0x609767e5, - 0x67eec0d0, - 0x7291b235, - 0x677e6202, - 0xc070c00b, - 0x670b91f0, - 0x67eec0e0, - 0x727ab914, - 0xb0137226, - 0x73147313, - 0x8c8072c9, - 0x422d2200, - 0xb130b0f0, - 0x85b06231, - 0x95d085c1, - 0xb10095e1, - 0xb110b140, - 0xb0f6b064, - 0xb0d5b0d0, - 0x7313b136, - 0xb041b061, - 0x42411e1b, - 0xb9127291, - 0xc13772c9, - 0x1e0ec070, - 0x16104247, - 0x9930c0b7, - 0xb115b232, - 0xa910c031, - 0xb0737100, - 0xba3eb910, - 0x22008090, - 0x80b24705, - 0x46682262, - 0x220280c2, - 0xb061425b, - 0x2250b140, - 0x82404249, - 0x46652200, - 0x4249220f, - 0x679e100f, - 0x100f6249, - 0x624967b4, - 0x1e1bb234, - 0xa9154285, - 0xb913b916, - 0x8b33ba3b, - 0x8b2406f3, - 0x00433144, - 0x8c3397a3, - 0x14038c50, - 0x8c448c60, - 0x31431404, - 0x00343143, - 0x81b097b4, - 0x91b02650, - 0x67eec0f0, - 0xa91362bf, - 0x264081b0, - 0x993791b0, - 0x93acba39, - 0x720fa0d5, - 0xb111b0d1, - 0x7100b111, - 0xc3e0b35d, - 0xb0749930, - 0x93f0c0d0, - 0x97918941, - 0xb11167bf, - 0xb0787100, - 0x9930c210, - 0xb235a232, - 0x7100b111, - 0xb06ea35d, - 0xa0d17291, - 0x31828af2, - 0xba3b3d82, - 0x06f38b33, - 0x31448b24, - 0x92630043, - 0x8c508c33, - 0x8c601403, - 0x14048c44, - 0x31433143, - 0x97b40034, - 0x6abdc8f0, - 0xbc9062e3, - 0x95b488d4, - 0x95c488e4, - 0x95948ca4, - 0x95a487c4, - 0x85b0c01b, - 0x95d085c1, - 0x731195e1, - 0x73137312, - 0xb1007314, - 0xb0f6b140, - 0xb110b136, - 0xa232b064, - 0x22628242, - 0x722342d7, - 0xb115b064, - 0xc410b232, - 0x679e6ae0, - 0xb2356249, - 0xa100b140, - 0xa0f6b136, - 0x7291b914, - 0xa003a750, - 0xc7c0a002, - 0x72039010, - 0x73057204, - 0x73117306, - 0x73137312, - 0x720f7314, - 0x7210720d, - 0x7223720e, - 0xb235a232, - 0x1e028242, - 0x722346fc, - 0x67eec100, - 0xc1106097, - 0xb23567ee, - 0x8942a232, - 0x824262e4, - 0x430b2212, - 0xb016b006, - 0xb002b012, - 0xb014b004, - 0x90307ca0, - 0x7cb09050, - 0x90609040, - 0x73127311, - 0x73147313, - 0x720e720d, - 0x7210720f, - 0xb0e1b121, - 0xb0727100, - 0xd680a0e1, - 0x679e6b28, - 0x93f0c090, - 0xbc907000, - 0x9930c040, - 0xb910b911, - 0xb111b0d1, - 0x72917100, - 0xb111a0d1, - 0x9635722c, - 0xc0f38c82, - 0xb013b003, - 0x92c08170, - 0x96408190, - 0xb120b0e0, - 0x22027100, - 0x85b04750, - 0x92c39640, - 0x7100b120, - 0x964085c0, - 0x7100b120, - 0x96408590, - 0xb12092c3, - 0x85a07100, - 0xb1209640, - 0x8cb07100, - 0x0410cff1, - 0xb1209640, - 0x96367100, - 0x9930c040, - 0xb910b911, - 0xb111b0d1, - 0xb120a0e0, - 0x72917100, - 0xb111a0d1, - 0x1e108750, - 0xb2354371, - 0xa9156378, - 0xb913b916, - 0x2a308230, - 0x92302620, - 0x6b79c090, - 0xc120ac90, - 0x700067ee, - 0x721b7223, - 0x92c0c0f0, - 0xc1f1722f, - 0xc01592d1, - 0x7c977c86, - 0x8c807ccc, - 0x43912200, - 0x94407cf0, - 0x94607d10, - 0x7d206393, - 0xac909440, - 0xc1009636, - 0x816e91e0, - 0xc01d398e, - 0x439d1e0e, - 0x7000c03d, - 0x726a7269, - 0xb0537ce2, - 0xc76093a2, - 0x73a36ba4, - 0x96908a40, - 0x96a18a51, - 0x7cd093a6, - 0x8a4393a0, - 0x31338a54, - 0x31343d33, - 0x70003d34, - 0x8a439a31, - 0x31338a54, - 0x31343d63, - 0x96933d64, - 0xb05396a4, - 0x1e0e7000, - 0x8c3143d6, - 0x18108c40, - 0xc0024fd0, - 0x161110d1, - 0x16201812, - 0x1c203d20, - 0x10204fe4, - 0x63e41610, - 0x3d201620, - 0x4be41cd0, - 0x63e410d0, - 0xc082c000, - 0x8c448c33, - 0x1c241834, - 0x14424fe0, - 0x63e44be2, - 0x63e410d0, - 0x18d0c000, - 0x720d7000, - 0x720f720e, - 0x73117210, - 0x73137312, - 0x70007314, - 0x89f09a00, - 0x47ef2200, - 0x7000b9e0 +MCE_PATCH_TYPE patchTofMce[506] = +{ + 0x0003605b, + 0x00f1000f, + 0x00000000, + 0x000c8000, + 0x00000000, + 0x0c650000, + 0x80000000, + 0x00800010, + 0x00000000, + 0x0594091e, + 0x00000350, + 0x7c200000, + 0x000000c2, + 0x34340013, + 0x0003005a, + 0x00000032, + 0xfe6b2840, + 0xdeade8ca, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x07d00011, + 0x6fdd2fea, + 0x0fb00ff0, + 0xf80f0003, + 0x007f7f30, + 0x3434001f, + 0x8010005a, + 0x01900000, + 0x40000800, + 0xc0300c65, + 0x722367ee, + 0xa35d7263, + 0x73057303, + 0x73047203, + 0x72047306, + 0x72917391, + 0x8001c7c0, + 0x90010001, + 0x08019010, + 0x720d9001, + 0x720f720e, + 0xb0d07210, + 0xc0407100, + 0xa0d067ee, + 0x721bb110, + 0x10208162, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60936c01, + 0x60c260a4, + 0x6219617b, + 0x60936093, + 0x60936093, + 0x60c260a4, + 0x6219617b, + 0x60936093, + 0x60976093, + 0x12206095, + 0xc050609a, + 0x121267ee, + 0x73117223, + 0x73137312, + 0x81b17314, + 0x91b20012, + 0x6073b070, + 0xc2b2c011, + 0x1820c710, + 0x6e236f13, + 0x16121611, + 0x7d7068a8, + 0xc0229990, + 0x39818161, + 0xd0601812, + 0x67ee9a12, + 0x40971e01, + 0x99907d80, + 0x93807d50, + 0x93307d60, + 0x93007d90, + 0x6097b360, + 0xc07067e5, + 0x677e67ee, + 0x91f0c070, + 0x670bb750, + 0xb233b914, + 0xa750672d, + 0x95b488d4, + 0x95c488e4, + 0x95948ca4, + 0x95a487c4, + 0x2a007cb0, + 0x88d49060, + 0x88e495d4, + 0xc0f495e4, + 0x91449134, + 0x22008c80, + 0xb0f040e5, + 0xb0f6b130, + 0xb0d5b0d0, + 0xb110b136, + 0xb140b100, + 0x73137314, + 0x2a007cb0, + 0xc0f19060, + 0x40f51e0e, + 0x99311611, + 0xc037b912, + 0xb115b041, + 0xa910c031, + 0xb0737100, + 0xba3eb910, + 0x22008090, + 0x80b24574, + 0x45182262, + 0x220280c2, + 0xb061410b, + 0x2250b140, + 0x824040f9, + 0x45152200, + 0x40f9220f, + 0x679e100f, + 0x100f60f9, + 0x60f967b4, + 0xb234a913, + 0x93acba39, + 0xa0d58462, + 0xb0d1720f, + 0x7100b111, + 0xb1119937, + 0xb35d7100, + 0x9930c3f0, + 0xc0d0b074, + 0x894193f0, + 0x67bf9791, + 0x14018941, + 0x7100b111, + 0xba3aba3b, + 0xc210b078, + 0xa2329930, + 0xb111b235, + 0xa35d7100, + 0x7291b06e, + 0x8af2a0d1, + 0x3d823182, + 0x67eec080, + 0x8c528c33, + 0x8c441423, + 0x14248c62, + 0x06f28b32, + 0x31418b21, + 0x97a20012, + 0x0424cff2, + 0x31433143, + 0x97b40034, + 0x6957c8f0, + 0xb130b235, + 0xb136a0f0, + 0xb140a0f6, + 0xb914a100, + 0xa7507291, + 0xa002a003, + 0x9010c7c0, + 0x72047203, + 0x73067305, + 0xa23267e5, + 0x8242b235, + 0x456b1e02, + 0xc0907223, + 0x609767ee, + 0xa232b235, + 0xd0a08942, + 0x67ee9a12, + 0x67e56159, + 0x677ec00f, + 0x91f0c070, + 0xc0b0670b, + 0xb01367ee, + 0x22008c80, + 0xb0f04189, + 0xb0f6b130, + 0xb0d5b0d0, + 0xb136b111, + 0x72917313, + 0xc0e1b912, + 0x41951e0e, + 0x99311611, + 0xb041c037, + 0xc031b232, + 0xb115a910, + 0xb0737100, + 0xba3eb910, + 0x22008090, + 0x80b24614, + 0x45b32262, + 0x41992250, + 0x22008240, + 0x220f45b0, + 0x100f4199, + 0x6199679e, + 0x67b4100f, + 0xb9136199, + 0xba39b234, + 0xa0d593ac, + 0x7313720f, + 0x73147210, + 0x264081b0, + 0xb0d191b0, + 0x7100b111, + 0x9937b041, + 0x7100b111, + 0xc3f0b35d, + 0xb0749930, + 0x93f0c0d0, + 0x7100b111, + 0xc210b078, + 0xa2329930, + 0x7100b111, + 0xb06ea35d, + 0xa0d1a910, + 0x899167bf, + 0x81a01401, + 0x99311401, + 0xb0d6b116, + 0xb1167100, + 0x8090a0d6, + 0x46142200, + 0x88d4b012, + 0x88e495b4, + 0x8ca495c4, + 0x87c49594, + 0x729195a4, + 0x2a208230, + 0x92302630, + 0xc070672d, + 0x8af287b1, + 0x3d823182, + 0x69fbc310, + 0xb111b064, + 0xa0f6b136, + 0xa0f0b130, + 0x8242b235, + 0x46021e02, + 0x7291b914, + 0xa002a003, + 0x9010c7c0, + 0x72047203, + 0x73067305, + 0x67eec0c0, + 0x609767e5, + 0x67eec0d0, + 0x7291b235, + 0x677e6202, + 0xc070c00b, + 0x670b91f0, + 0x67eec0e0, + 0x727ab914, + 0xb0137226, + 0x73147313, + 0x8c8072c9, + 0x422d2200, + 0xb130b0f0, + 0x85b06231, + 0x95d085c1, + 0xb10095e1, + 0xb110b140, + 0xb0f6b064, + 0xb0d5b0d0, + 0x7313b136, + 0xb041b061, + 0x42411e1b, + 0xb9127291, + 0xc13772c9, + 0x1e0ec070, + 0x16104247, + 0x9930c0b7, + 0xb115b232, + 0xa910c031, + 0xb0737100, + 0xba3eb910, + 0x22008090, + 0x80b24705, + 0x46682262, + 0x220280c2, + 0xb061425b, + 0x2250b140, + 0x82404249, + 0x46652200, + 0x4249220f, + 0x679e100f, + 0x100f6249, + 0x624967b4, + 0x1e1bb234, + 0xa9154285, + 0xb913b916, + 0x8b33ba3b, + 0x8b2406f3, + 0x00433144, + 0x8c3397a3, + 0x14038c50, + 0x8c448c60, + 0x31431404, + 0x00343143, + 0x81b097b4, + 0x91b02650, + 0x67eec0f0, + 0xa91362bf, + 0x264081b0, + 0x993791b0, + 0x93acba39, + 0x720fa0d5, + 0xb111b0d1, + 0x7100b111, + 0xc3e0b35d, + 0xb0749930, + 0x93f0c0d0, + 0x97918941, + 0xb11167bf, + 0xb0787100, + 0x9930c210, + 0xb235a232, + 0x7100b111, + 0xb06ea35d, + 0xa0d17291, + 0x31828af2, + 0xba3b3d82, + 0x06f38b33, + 0x31448b24, + 0x92630043, + 0x8c508c33, + 0x8c601403, + 0x14048c44, + 0x31433143, + 0x97b40034, + 0x6abdc8f0, + 0xbc9062e3, + 0x95b488d4, + 0x95c488e4, + 0x95948ca4, + 0x95a487c4, + 0x85b0c01b, + 0x95d085c1, + 0x731195e1, + 0x73137312, + 0xb1007314, + 0xb0f6b140, + 0xb110b136, + 0xa232b064, + 0x22628242, + 0x722342d7, + 0xb115b064, + 0xc410b232, + 0x679e6ae0, + 0xb2356249, + 0xa100b140, + 0xa0f6b136, + 0x7291b914, + 0xa003a750, + 0xc7c0a002, + 0x72039010, + 0x73057204, + 0x73117306, + 0x73137312, + 0x720f7314, + 0x7210720d, + 0x7223720e, + 0xb235a232, + 0x1e028242, + 0x722346fc, + 0x67eec100, + 0xc1106097, + 0xb23567ee, + 0x8942a232, + 0x824262e4, + 0x430b2212, + 0xb016b006, + 0xb002b012, + 0xb014b004, + 0x90307ca0, + 0x7cb09050, + 0x90609040, + 0x73127311, + 0x73147313, + 0x720e720d, + 0x7210720f, + 0xb0e1b121, + 0xb0727100, + 0xd680a0e1, + 0x679e6b28, + 0x93f0c090, + 0xbc907000, + 0x9930c040, + 0xb910b911, + 0xb111b0d1, + 0x72917100, + 0xb111a0d1, + 0x9635722c, + 0xc0f38c82, + 0xb013b003, + 0x92c08170, + 0x96408190, + 0xb120b0e0, + 0x22027100, + 0x85b04750, + 0x92c39640, + 0x7100b120, + 0x964085c0, + 0x7100b120, + 0x96408590, + 0xb12092c3, + 0x85a07100, + 0xb1209640, + 0x8cb07100, + 0x0410cff1, + 0xb1209640, + 0x96367100, + 0x9930c040, + 0xb910b911, + 0xb111b0d1, + 0xb120a0e0, + 0x72917100, + 0xb111a0d1, + 0x1e108750, + 0xb2354371, + 0xa9156378, + 0xb913b916, + 0x2a308230, + 0x92302620, + 0x6b79c090, + 0xc120ac90, + 0x700067ee, + 0x721b7223, + 0x92c0c0f0, + 0xc1f1722f, + 0xc01592d1, + 0x7c977c86, + 0x8c807ccc, + 0x43912200, + 0x94407cf0, + 0x94607d10, + 0x7d206393, + 0xac909440, + 0xc1009636, + 0x816e91e0, + 0xc01d398e, + 0x439d1e0e, + 0x7000c03d, + 0x726a7269, + 0xb0537ce2, + 0xc76093a2, + 0x73a36ba4, + 0x96908a40, + 0x96a18a51, + 0x7cd093a6, + 0x8a4393a0, + 0x31338a54, + 0x31343d33, + 0x70003d34, + 0x8a439a31, + 0x31338a54, + 0x31343d63, + 0x96933d64, + 0xb05396a4, + 0x1e0e7000, + 0x8c3143d6, + 0x18108c40, + 0xc0024fd0, + 0x161110d1, + 0x16201812, + 0x1c203d20, + 0x10204fe4, + 0x63e41610, + 0x3d201620, + 0x4be41cd0, + 0x63e410d0, + 0xc082c000, + 0x8c448c33, + 0x1c241834, + 0x14424fe0, + 0x63e44be2, + 0x63e410d0, + 0x18d0c000, + 0x720d7000, + 0x720f720e, + 0x73117210, + 0x73137312, + 0x70007314, + 0x89f09a00, + 0x47ef2200, + 0x7000b9e0 }; PATCH_FUN_SPEC void rf_patch_mce_tof(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 506; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchTofMce[i]; - } + uint32_t i; + + for (i = 0; i < 506; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchTofMce[i]; + } + #else - const uint32_t *pS = patchTofMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 63; + const uint32_t* pS = patchTofMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 63; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - *pD++ = t1; - *pD++ = t2; + t1 = *pS++; + t2 = *pS++; + *pD++ = t1; + *pD++ = t2; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_rfe_tof.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_rfe_tof.h index 12f516de..04efae01 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_rfe_tof.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc13x2_cc26x2/rf_patches/rf_patch_rfe_tof.h @@ -44,527 +44,532 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchTofRfe[461] = { - 0x00006194, - 0x004535aa, - 0x0421a355, - 0x1f40004c, - 0x0000003f, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x6fcf7fcf, - 0x4fcf5fcf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x00000000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x40772241, - 0x700006f1, - 0x9150c050, - 0xc0707000, - 0x70009150, - 0x00213182, - 0xb1609181, - 0x10257000, - 0x9100c050, - 0xc140c3f4, - 0x6f031420, - 0x04411031, - 0x22f082a0, - 0x26514094, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92551405, - 0x64677000, - 0x1031c2b2, - 0x31610631, - 0x646a02c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x7000646a, - 0x82b16464, - 0x39813181, - 0x646ac0e2, - 0xc1116467, - 0x646ac122, - 0x68c7c470, - 0xc0c2c111, - 0x64e0646a, - 0x700064f3, - 0x82b1647c, - 0x39813181, - 0x6482c182, - 0xc111647f, - 0x6482c0a2, - 0x68d9c470, - 0xc162c331, - 0x64e06482, - 0x700064f3, - 0xb054b050, - 0x80407100, - 0x44ed2240, - 0x40e02200, - 0x8081b060, - 0x44e01e11, - 0xa0547000, - 0x80f0b064, - 0x40e02200, - 0x12407000, - 0xb03290b0, - 0x395382a3, - 0x64ad3953, - 0x68fbc2f0, - 0xc1f18080, - 0xc1510410, - 0x41071c10, - 0xc2216467, - 0x646ac0c2, - 0x647f610b, - 0xc162c441, - 0xce306482, - 0x1280690c, - 0xb03290b0, - 0x64677000, - 0xc0c2c201, - 0x80a0646a, - 0x39403180, - 0xc1016918, - 0x646ac0c2, - 0xc122c101, - 0x82a3646a, - 0x12c064ad, - 0xb03290b0, - 0x647f7000, - 0xc162c401, - 0x80a06482, - 0x39403180, - 0xc301692c, - 0x6482c162, - 0xc0a2c101, - 0x82a36482, - 0x12c064ad, - 0xb03290b0, - 0x64677000, - 0xc081c272, - 0xc122646a, - 0x646ac111, - 0xc111c002, - 0xc062646a, - 0x646ac331, - 0xc111c362, - 0xc302646a, - 0x646ac111, - 0x395382a3, - 0xc3e264ad, - 0x2211646f, - 0xc242414f, - 0x646ac881, - 0xc111c252, - 0xc272646a, - 0x646acee1, - 0xc881c202, - 0xc202646a, - 0x646ac801, - 0x6963c170, - 0x64677000, - 0xc801c242, - 0xc252646a, - 0x646ac011, - 0xc0e1c272, - 0xc002646a, - 0x646ac101, - 0xc301c062, - 0xc122646a, - 0x646ac101, - 0xc101c362, - 0xc302646a, - 0x646ac101, - 0x64ad82a3, - 0x80817000, - 0x418f1e11, - 0xb054b050, - 0x80407100, - 0x41902240, - 0xb064a054, - 0x220180f1, - 0x70004584, - 0x41842200, - 0x6181b060, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xa050b060, - 0x80928081, - 0x45b32241, - 0xc1f18080, - 0x16300410, - 0x14011101, - 0x61c66c01, - 0x61c661c6, - 0x61c661c6, - 0x61e661c6, - 0x61e661c6, - 0x61c661c6, - 0x809161c6, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x61c661cf, - 0x61c661cf, - 0x61c661c6, - 0x61c661c6, - 0x61c861c8, - 0x61cbb0b0, - 0x7306b0b1, - 0xb0307205, - 0x78206198, - 0x78427831, - 0x78547873, - 0x78667885, - 0x92719260, - 0x92939282, - 0x92b592a4, - 0xc01f91a6, - 0x3940924f, - 0x100106f0, - 0x14103110, - 0x61c89250, - 0xcff0b060, - 0x66306793, - 0xb0e16624, - 0xb054b050, - 0x8262b064, - 0x39823182, - 0x64873942, - 0x7100b0e1, - 0x22008040, - 0xb0644621, - 0x225280f2, - 0x22224611, - 0x22324608, - 0x1e02460f, - 0xdfe041f5, - 0x67939342, - 0x61f56511, - 0x663f663a, - 0x80f0b064, - 0x46112250, - 0x663561f5, - 0xcfd061f5, - 0xa0546793, - 0xa050b064, - 0xa052b060, - 0xa053b062, - 0x6565b063, - 0xcfc06511, - 0x720e6793, - 0xcfb061c8, - 0x62116793, - 0x82b16464, - 0x39813181, - 0x646ac0e2, - 0xc1116467, - 0x646ac122, - 0x700064f3, - 0x70006539, - 0x70006511, - 0x64676565, - 0xc0c2c111, - 0x7000646a, - 0xc1016467, - 0x646ac0c2, - 0xc8007000, - 0x81a991b0, - 0x8091b050, - 0x46b02241, - 0x31828262, - 0x39423982, - 0x82626487, - 0x102f06f2, - 0x142f311f, - 0x22d68266, - 0xc1404655, - 0xc5006256, - 0x6f0d1420, - 0x10de396d, - 0x044ec3f4, - 0x3182c082, - 0x396d002e, - 0x3182c0a2, - 0x826a002d, - 0x06fa398a, - 0x31808270, - 0xc00b3980, - 0x10bc180b, - 0x825318ac, - 0x149b1439, - 0x06f08260, - 0x31101001, - 0x81a11410, - 0x140c1410, - 0x46ea22c6, - 0x39408280, - 0x100206f0, - 0x3001c011, - 0x1801c010, - 0x31821802, - 0x26c10021, - 0xb00391e1, - 0xb063b013, - 0x8041b053, - 0x46e12201, - 0x92148204, - 0x1cb58225, - 0x18954e99, - 0x80f091b5, - 0x428b2240, - 0x913d62ae, - 0x913eb110, - 0x80e0b110, - 0x46a32200, - 0x42a322e6, - 0x1895b0e0, - 0x925f91b5, - 0x14f981a9, - 0x225080f0, - 0x224046e1, - 0x637646ae, - 0x6793cfa0, - 0xa052b063, - 0xc0f28280, - 0x10020420, - 0x3001c011, - 0x1801c010, - 0x31821802, - 0x26c10021, - 0x720e91e1, - 0xb01391e1, - 0xb063b003, - 0xb064b053, - 0x7100b054, - 0x22018041, - 0xb06346e1, - 0x80f0b064, - 0x42e12220, - 0x92118201, - 0x18918221, - 0xb03191b1, - 0x674e62c7, - 0x81a9a0e0, - 0x14598255, - 0x7100c080, - 0x6addb063, - 0xb0e6628b, - 0xa053a052, - 0x81b28251, - 0x3d823182, - 0x7000a003, - 0x39478287, - 0x82803987, - 0x06f03980, - 0xc0111002, - 0xc0103001, - 0x18021801, - 0x00213182, - 0x91d126c1, - 0xb012b002, - 0x39408280, - 0x100206f0, - 0x3001c011, - 0x1801c010, - 0x31821802, - 0x26c10021, - 0xb00391e1, - 0xb063b013, - 0x7100b053, - 0xb062a053, - 0x8041b052, - 0x46e12201, - 0x921481f4, - 0x82048225, - 0x4f201cb5, - 0x91b51895, - 0x224080f0, - 0x62ae4311, - 0x92148204, - 0x10408224, - 0x91b01890, - 0x1c751845, - 0x80f04f2d, - 0x43112240, - 0x913d62ae, - 0x913eb110, - 0x80e0b110, - 0x47372200, - 0x433722e6, - 0x91b5b0e0, - 0x81a9925f, - 0x80f014f9, - 0x463f2250, - 0x46ae2240, - 0x674e6355, - 0x81a9a0e0, - 0x14598255, - 0x7100c140, - 0x6b47b062, - 0x80a26311, - 0x61c86487, - 0x39428262, - 0x608706f2, - 0x7100b050, - 0x829061c8, - 0x22018041, - 0x81f446e1, - 0x82259214, - 0x91b51895, - 0x224180f1, - 0x6b5646ae, - 0x318181b1, - 0xdf903d81, - 0x67939341, - 0x22018041, - 0x81f446e1, - 0x82259214, - 0x4b411cc5, - 0x91b51895, - 0x224080f0, - 0x62ae4362, - 0x6793cf80, - 0x80418290, - 0x46e12201, - 0x92148204, - 0x18958225, - 0x80f191b5, - 0x46ae2241, - 0x80416b79, - 0x46e12201, - 0x92148204, - 0x1cc58225, - 0x18954ad7, - 0x80f091b5, - 0x43852240, - 0x933062ae, - 0x22008320, - 0xb3104794, - 0x00007000 +RFE_PATCH_TYPE patchTofRfe[461] = +{ + 0x00006194, + 0x004535aa, + 0x0421a355, + 0x1f40004c, + 0x0000003f, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x6fcf7fcf, + 0x4fcf5fcf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x00000000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x40772241, + 0x700006f1, + 0x9150c050, + 0xc0707000, + 0x70009150, + 0x00213182, + 0xb1609181, + 0x10257000, + 0x9100c050, + 0xc140c3f4, + 0x6f031420, + 0x04411031, + 0x22f082a0, + 0x26514094, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92551405, + 0x64677000, + 0x1031c2b2, + 0x31610631, + 0x646a02c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x7000646a, + 0x82b16464, + 0x39813181, + 0x646ac0e2, + 0xc1116467, + 0x646ac122, + 0x68c7c470, + 0xc0c2c111, + 0x64e0646a, + 0x700064f3, + 0x82b1647c, + 0x39813181, + 0x6482c182, + 0xc111647f, + 0x6482c0a2, + 0x68d9c470, + 0xc162c331, + 0x64e06482, + 0x700064f3, + 0xb054b050, + 0x80407100, + 0x44ed2240, + 0x40e02200, + 0x8081b060, + 0x44e01e11, + 0xa0547000, + 0x80f0b064, + 0x40e02200, + 0x12407000, + 0xb03290b0, + 0x395382a3, + 0x64ad3953, + 0x68fbc2f0, + 0xc1f18080, + 0xc1510410, + 0x41071c10, + 0xc2216467, + 0x646ac0c2, + 0x647f610b, + 0xc162c441, + 0xce306482, + 0x1280690c, + 0xb03290b0, + 0x64677000, + 0xc0c2c201, + 0x80a0646a, + 0x39403180, + 0xc1016918, + 0x646ac0c2, + 0xc122c101, + 0x82a3646a, + 0x12c064ad, + 0xb03290b0, + 0x647f7000, + 0xc162c401, + 0x80a06482, + 0x39403180, + 0xc301692c, + 0x6482c162, + 0xc0a2c101, + 0x82a36482, + 0x12c064ad, + 0xb03290b0, + 0x64677000, + 0xc081c272, + 0xc122646a, + 0x646ac111, + 0xc111c002, + 0xc062646a, + 0x646ac331, + 0xc111c362, + 0xc302646a, + 0x646ac111, + 0x395382a3, + 0xc3e264ad, + 0x2211646f, + 0xc242414f, + 0x646ac881, + 0xc111c252, + 0xc272646a, + 0x646acee1, + 0xc881c202, + 0xc202646a, + 0x646ac801, + 0x6963c170, + 0x64677000, + 0xc801c242, + 0xc252646a, + 0x646ac011, + 0xc0e1c272, + 0xc002646a, + 0x646ac101, + 0xc301c062, + 0xc122646a, + 0x646ac101, + 0xc101c362, + 0xc302646a, + 0x646ac101, + 0x64ad82a3, + 0x80817000, + 0x418f1e11, + 0xb054b050, + 0x80407100, + 0x41902240, + 0xb064a054, + 0x220180f1, + 0x70004584, + 0x41842200, + 0x6181b060, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xa050b060, + 0x80928081, + 0x45b32241, + 0xc1f18080, + 0x16300410, + 0x14011101, + 0x61c66c01, + 0x61c661c6, + 0x61c661c6, + 0x61e661c6, + 0x61e661c6, + 0x61c661c6, + 0x809161c6, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x61c661cf, + 0x61c661cf, + 0x61c661c6, + 0x61c661c6, + 0x61c861c8, + 0x61cbb0b0, + 0x7306b0b1, + 0xb0307205, + 0x78206198, + 0x78427831, + 0x78547873, + 0x78667885, + 0x92719260, + 0x92939282, + 0x92b592a4, + 0xc01f91a6, + 0x3940924f, + 0x100106f0, + 0x14103110, + 0x61c89250, + 0xcff0b060, + 0x66306793, + 0xb0e16624, + 0xb054b050, + 0x8262b064, + 0x39823182, + 0x64873942, + 0x7100b0e1, + 0x22008040, + 0xb0644621, + 0x225280f2, + 0x22224611, + 0x22324608, + 0x1e02460f, + 0xdfe041f5, + 0x67939342, + 0x61f56511, + 0x663f663a, + 0x80f0b064, + 0x46112250, + 0x663561f5, + 0xcfd061f5, + 0xa0546793, + 0xa050b064, + 0xa052b060, + 0xa053b062, + 0x6565b063, + 0xcfc06511, + 0x720e6793, + 0xcfb061c8, + 0x62116793, + 0x82b16464, + 0x39813181, + 0x646ac0e2, + 0xc1116467, + 0x646ac122, + 0x700064f3, + 0x70006539, + 0x70006511, + 0x64676565, + 0xc0c2c111, + 0x7000646a, + 0xc1016467, + 0x646ac0c2, + 0xc8007000, + 0x81a991b0, + 0x8091b050, + 0x46b02241, + 0x31828262, + 0x39423982, + 0x82626487, + 0x102f06f2, + 0x142f311f, + 0x22d68266, + 0xc1404655, + 0xc5006256, + 0x6f0d1420, + 0x10de396d, + 0x044ec3f4, + 0x3182c082, + 0x396d002e, + 0x3182c0a2, + 0x826a002d, + 0x06fa398a, + 0x31808270, + 0xc00b3980, + 0x10bc180b, + 0x825318ac, + 0x149b1439, + 0x06f08260, + 0x31101001, + 0x81a11410, + 0x140c1410, + 0x46ea22c6, + 0x39408280, + 0x100206f0, + 0x3001c011, + 0x1801c010, + 0x31821802, + 0x26c10021, + 0xb00391e1, + 0xb063b013, + 0x8041b053, + 0x46e12201, + 0x92148204, + 0x1cb58225, + 0x18954e99, + 0x80f091b5, + 0x428b2240, + 0x913d62ae, + 0x913eb110, + 0x80e0b110, + 0x46a32200, + 0x42a322e6, + 0x1895b0e0, + 0x925f91b5, + 0x14f981a9, + 0x225080f0, + 0x224046e1, + 0x637646ae, + 0x6793cfa0, + 0xa052b063, + 0xc0f28280, + 0x10020420, + 0x3001c011, + 0x1801c010, + 0x31821802, + 0x26c10021, + 0x720e91e1, + 0xb01391e1, + 0xb063b003, + 0xb064b053, + 0x7100b054, + 0x22018041, + 0xb06346e1, + 0x80f0b064, + 0x42e12220, + 0x92118201, + 0x18918221, + 0xb03191b1, + 0x674e62c7, + 0x81a9a0e0, + 0x14598255, + 0x7100c080, + 0x6addb063, + 0xb0e6628b, + 0xa053a052, + 0x81b28251, + 0x3d823182, + 0x7000a003, + 0x39478287, + 0x82803987, + 0x06f03980, + 0xc0111002, + 0xc0103001, + 0x18021801, + 0x00213182, + 0x91d126c1, + 0xb012b002, + 0x39408280, + 0x100206f0, + 0x3001c011, + 0x1801c010, + 0x31821802, + 0x26c10021, + 0xb00391e1, + 0xb063b013, + 0x7100b053, + 0xb062a053, + 0x8041b052, + 0x46e12201, + 0x921481f4, + 0x82048225, + 0x4f201cb5, + 0x91b51895, + 0x224080f0, + 0x62ae4311, + 0x92148204, + 0x10408224, + 0x91b01890, + 0x1c751845, + 0x80f04f2d, + 0x43112240, + 0x913d62ae, + 0x913eb110, + 0x80e0b110, + 0x47372200, + 0x433722e6, + 0x91b5b0e0, + 0x81a9925f, + 0x80f014f9, + 0x463f2250, + 0x46ae2240, + 0x674e6355, + 0x81a9a0e0, + 0x14598255, + 0x7100c140, + 0x6b47b062, + 0x80a26311, + 0x61c86487, + 0x39428262, + 0x608706f2, + 0x7100b050, + 0x829061c8, + 0x22018041, + 0x81f446e1, + 0x82259214, + 0x91b51895, + 0x224180f1, + 0x6b5646ae, + 0x318181b1, + 0xdf903d81, + 0x67939341, + 0x22018041, + 0x81f446e1, + 0x82259214, + 0x4b411cc5, + 0x91b51895, + 0x224080f0, + 0x62ae4362, + 0x6793cf80, + 0x80418290, + 0x46e12201, + 0x92148204, + 0x18958225, + 0x80f191b5, + 0x46ae2241, + 0x80416b79, + 0x46e12201, + 0x92148204, + 0x1cc58225, + 0x18954ad7, + 0x80f091b5, + 0x43852240, + 0x933062ae, + 0x22008320, + 0xb3104794, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_rfe_tof(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 461; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchTofRfe[i]; - } + uint32_t i; + + for (i = 0; i < 461; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchTofRfe[i]; + } + #else - const uint32_t *pS = patchTofRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 57; + const uint32_t* pS = patchTofRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 57; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/adi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/adi.h index a204232f..03de7e23 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/adi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/adi.h @@ -109,8 +109,8 @@ extern "C" static bool ADIBaseValid(uint32_t ui32Base) { - return(ui32Base == ADI2_BASE || ui32Base == ADI3_BASE || - ui32Base == AUX_ADI4_BASE); + return (ui32Base == ADI2_BASE || ui32Base == ADI3_BASE || + ui32Base == AUX_ADI4_BASE); } #endif @@ -153,9 +153,12 @@ ADI8RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Write the value to the register. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32Reg, ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32Reg) = ui8Val; } } @@ -199,9 +202,12 @@ ADI16RegWrite(uint32_t ui32Base, uint32_t ui32Reg, ASSERT(ui32Reg < ADI_SLAVE_REGS); // Write the value to the register. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFE), ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + (ui32Reg & 0xFE)) = ui16Val; } } @@ -244,9 +250,12 @@ ADI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Write the value to the register. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFC), ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + (ui32Reg & 0xFC)) = ui32Val; } } @@ -280,10 +289,13 @@ ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the register and return the value. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { return AuxAdiDdiSafeRead(ui32Base + ui32Reg, 1); - } else { - return(HWREGB(ui32Base + ui32Reg)); + } + else + { + return (HWREGB(ui32Base + ui32Reg)); } } @@ -319,10 +331,13 @@ ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the registers and return the value. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFE), 2); - } else { - return(HWREGH(ui32Base + (ui32Reg & 0xFE))); + } + else + { + return (HWREGH(ui32Base + (ui32Reg & 0xFE))); } } @@ -356,10 +371,13 @@ ADI32RegRead(uint32_t ui32Base, uint32_t ui32Reg) ASSERT(ui32Reg < ADI_SLAVE_REGS); // Read the registers and return the value. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFC), 4); - } else { - return(HWREG(ui32Base + (ui32Reg & 0xFC))); + } + else + { + return (HWREG(ui32Base + (ui32Reg & 0xFC))); } } @@ -407,9 +425,12 @@ ADI8BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) ui32RegOffset = ADI_O_SET; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32RegOffset + ui32Reg) = ui8Val; } } @@ -458,9 +479,12 @@ ADI16BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) ui32RegOffset = ADI_O_SET; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + ui32RegOffset + (ui32Reg & 0xFE)) = ui16Val; } } @@ -509,9 +533,12 @@ ADI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) ui32RegOffset = ADI_O_SET; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + ui32RegOffset + (ui32Reg & 0xFC)) = ui32Val; } } @@ -560,9 +587,12 @@ ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) ui32RegOffset = ADI_O_CLR; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32RegOffset + ui32Reg) = ui8Val; } } @@ -611,9 +641,12 @@ ADI16BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) ui32RegOffset = ADI_O_CLR; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + ui32RegOffset + (ui32Reg & 0xFE)) = ui16Val; } } @@ -662,9 +695,12 @@ ADI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) ui32RegOffset = ADI_O_CLR; // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + ui32RegOffset + (ui32Reg & 0xFC)) = ui32Val; } } @@ -719,9 +755,12 @@ ADI4SetValBit(uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh, ui32RegOffset = ADI_O_MASK4B + (ui32Reg << 1) + (bWriteHigh ? 1 : 0); // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui8Mask << 4) | ui8Val, 1); - } else { + } + else + { HWREGB(ui32Base + ui32RegOffset) = (ui8Mask << 4) | ui8Val; } } @@ -771,9 +810,12 @@ ADI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Mask, ui32RegOffset = ADI_O_MASK8B + (ui32Reg << 1); // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui16Mask << 8) | ui16Val, 2); - } else { + } + else + { HWREGH(ui32Base + ui32RegOffset) = (ui16Mask << 8) | ui16Val; } } @@ -824,9 +866,12 @@ ADI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, ui32RegOffset = ADI_O_MASK16B + ((ui32Reg << 1) & 0xFC); // Set the selected bits. - if (ui32Base==AUX_ADI4_BASE) { + if (ui32Base == AUX_ADI4_BASE) + { AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui32Mask << 16) | ui32Val, 4); - } else { + } + else + { HWREG(ui32Base + ui32RegOffset) = (ui32Mask << 16) | ui32Val; } } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aes.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aes.h index eb199a42..2f21964b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aes.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aes.h @@ -84,15 +84,15 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AESStartDMAOperation NOROM_AESStartDMAOperation - #define AESSetInitializationVector NOROM_AESSetInitializationVector - #define AESWriteCCMInitializationVector NOROM_AESWriteCCMInitializationVector - #define AESReadTag NOROM_AESReadTag - #define AESVerifyTag NOROM_AESVerifyTag - #define AESWriteToKeyStore NOROM_AESWriteToKeyStore - #define AESReadFromKeyStore NOROM_AESReadFromKeyStore - #define AESWaitForIRQFlags NOROM_AESWaitForIRQFlags - #define AESConfigureCCMCtrl NOROM_AESConfigureCCMCtrl +#define AESStartDMAOperation NOROM_AESStartDMAOperation +#define AESSetInitializationVector NOROM_AESSetInitializationVector +#define AESWriteCCMInitializationVector NOROM_AESWriteCCMInitializationVector +#define AESReadTag NOROM_AESReadTag +#define AESVerifyTag NOROM_AESVerifyTag +#define AESWriteToKeyStore NOROM_AESWriteToKeyStore +#define AESReadFromKeyStore NOROM_AESReadFromKeyStore +#define AESWaitForIRQFlags NOROM_AESWaitForIRQFlags +#define AESConfigureCCMCtrl NOROM_AESConfigureCCMCtrl #endif @@ -213,7 +213,7 @@ extern "C" //! \return None // //***************************************************************************** -extern void AESStartDMAOperation(const uint8_t *channel0Addr, uint32_t channel0Length, uint8_t *channel1Addr, uint32_t channel1Length); +extern void AESStartDMAOperation(const uint8_t* channel0Addr, uint32_t channel0Length, uint8_t* channel1Addr, uint32_t channel1Length); //***************************************************************************** // @@ -254,7 +254,7 @@ extern void AESStartDMAOperation(const uint8_t *channel0Addr, uint32_t channel0L //! \return None // //***************************************************************************** -extern void AESSetInitializationVector(const uint32_t *initializationVector); +extern void AESSetInitializationVector(const uint32_t* initializationVector); //***************************************************************************** // @@ -269,7 +269,7 @@ extern void AESSetInitializationVector(const uint32_t *initializationVector); //! \return None // //***************************************************************************** -extern void AESWriteCCMInitializationVector(const uint8_t *nonce, uint32_t nonceLength); +extern void AESWriteCCMInitializationVector(const uint8_t* nonce, uint32_t nonceLength); //***************************************************************************** // @@ -287,7 +287,7 @@ extern void AESWriteCCMInitializationVector(const uint8_t *nonce, uint32_t nonce //! - \ref AES_SUCCESS otherwise // //***************************************************************************** -extern uint32_t AESReadTag(uint8_t *tag, uint32_t tagLength); +extern uint32_t AESReadTag(uint8_t* tag, uint32_t tagLength); //***************************************************************************** // @@ -308,7 +308,7 @@ extern uint32_t AESReadTag(uint8_t *tag, uint32_t tagLength); //! - \ref AES_SUCCESS otherwise // //***************************************************************************** -extern uint32_t AESVerifyTag(const uint8_t *tag, uint32_t tagLength); +extern uint32_t AESVerifyTag(const uint8_t* tag, uint32_t tagLength); //***************************************************************************** // @@ -367,7 +367,7 @@ extern uint32_t AESVerifyTag(const uint8_t *tag, uint32_t tagLength); //! \sa AESReadFromKeyStore // //***************************************************************************** -extern uint32_t AESWriteToKeyStore(const uint8_t *aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea); +extern uint32_t AESWriteToKeyStore(const uint8_t* aesKey, uint32_t aesKeyLength, uint32_t keyStoreArea); //***************************************************************************** // @@ -666,7 +666,7 @@ __STATIC_INLINE uint32_t AESIntStatusMasked(void) // Return the masked interrupt status mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -688,7 +688,7 @@ __STATIC_INLINE uint32_t AESIntStatusMasked(void) __STATIC_INLINE uint32_t AESIntStatusRaw(void) { // Return either the raw interrupt status - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } //***************************************************************************** @@ -784,43 +784,43 @@ __STATIC_INLINE void AESIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AESStartDMAOperation - #undef AESStartDMAOperation - #define AESStartDMAOperation ROM_AESStartDMAOperation - #endif - #ifdef ROM_AESSetInitializationVector - #undef AESSetInitializationVector - #define AESSetInitializationVector ROM_AESSetInitializationVector - #endif - #ifdef ROM_AESWriteCCMInitializationVector - #undef AESWriteCCMInitializationVector - #define AESWriteCCMInitializationVector ROM_AESWriteCCMInitializationVector - #endif - #ifdef ROM_AESReadTag - #undef AESReadTag - #define AESReadTag ROM_AESReadTag - #endif - #ifdef ROM_AESVerifyTag - #undef AESVerifyTag - #define AESVerifyTag ROM_AESVerifyTag - #endif - #ifdef ROM_AESWriteToKeyStore - #undef AESWriteToKeyStore - #define AESWriteToKeyStore ROM_AESWriteToKeyStore - #endif - #ifdef ROM_AESReadFromKeyStore - #undef AESReadFromKeyStore - #define AESReadFromKeyStore ROM_AESReadFromKeyStore - #endif - #ifdef ROM_AESWaitForIRQFlags - #undef AESWaitForIRQFlags - #define AESWaitForIRQFlags ROM_AESWaitForIRQFlags - #endif - #ifdef ROM_AESConfigureCCMCtrl - #undef AESConfigureCCMCtrl - #define AESConfigureCCMCtrl ROM_AESConfigureCCMCtrl - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AESStartDMAOperation +#undef AESStartDMAOperation +#define AESStartDMAOperation ROM_AESStartDMAOperation +#endif +#ifdef ROM_AESSetInitializationVector +#undef AESSetInitializationVector +#define AESSetInitializationVector ROM_AESSetInitializationVector +#endif +#ifdef ROM_AESWriteCCMInitializationVector +#undef AESWriteCCMInitializationVector +#define AESWriteCCMInitializationVector ROM_AESWriteCCMInitializationVector +#endif +#ifdef ROM_AESReadTag +#undef AESReadTag +#define AESReadTag ROM_AESReadTag +#endif +#ifdef ROM_AESVerifyTag +#undef AESVerifyTag +#define AESVerifyTag ROM_AESVerifyTag +#endif +#ifdef ROM_AESWriteToKeyStore +#undef AESWriteToKeyStore +#define AESWriteToKeyStore ROM_AESWriteToKeyStore +#endif +#ifdef ROM_AESReadFromKeyStore +#undef AESReadFromKeyStore +#define AESReadFromKeyStore ROM_AESReadFromKeyStore +#endif +#ifdef ROM_AESWaitForIRQFlags +#undef AESWaitForIRQFlags +#define AESWaitForIRQFlags ROM_AESWaitForIRQFlags +#endif +#ifdef ROM_AESConfigureCCMCtrl +#undef AESConfigureCCMCtrl +#define AESConfigureCCMCtrl ROM_AESConfigureCCMCtrl +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_batmon.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_batmon.h index ce7d3238..0a186b63 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_batmon.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_batmon.h @@ -81,7 +81,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONBatMonTemperatureGetDegC NOROM_AONBatMonTemperatureGetDegC +#define AONBatMonTemperatureGetDegC NOROM_AONBatMonTemperatureGetDegC #endif @@ -224,7 +224,7 @@ AONBatMonNewBatteryMeasureReady(void) AON_BATMON_BATUPD_STAT ? true : false; // Clear status bit if set. - if(bStatus) + if (bStatus) { HWREG(AON_BATMON_BASE + AON_BATMON_O_BATUPD) = 1; } @@ -263,7 +263,7 @@ AONBatMonNewTempMeasureReady(void) AON_BATMON_TEMPUPD_STAT ? true : false; // Clear status bit if set. - if(bStatus) + if (bStatus) { HWREG(AON_BATMON_BASE + AON_BATMON_O_TEMPUPD) = 1; } @@ -279,11 +279,11 @@ AONBatMonNewTempMeasureReady(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONBatMonTemperatureGetDegC - #undef AONBatMonTemperatureGetDegC - #define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONBatMonTemperatureGetDegC +#undef AONBatMonTemperatureGetDegC +#define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_event.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_event.h index cdceba44..47925624 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_event.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_event.h @@ -81,12 +81,12 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet - #define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet - #define AONEventAuxWakeUpSet NOROM_AONEventAuxWakeUpSet - #define AONEventAuxWakeUpGet NOROM_AONEventAuxWakeUpGet - #define AONEventMcuSet NOROM_AONEventMcuSet - #define AONEventMcuGet NOROM_AONEventMcuGet +#define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet +#define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet +#define AONEventAuxWakeUpSet NOROM_AONEventAuxWakeUpSet +#define AONEventAuxWakeUpGet NOROM_AONEventAuxWakeUpGet +#define AONEventMcuSet NOROM_AONEventMcuSet +#define AONEventMcuGet NOROM_AONEventMcuGet #endif //***************************************************************************** @@ -99,8 +99,8 @@ extern "C" // ... // ... // AON_EVENT_DIO31 // Edge detect on DIO31. See hw_device.h #define AON_EVENT_IO 32 // Edge detect on any DIO. Edge detect is enabled and configured in IOC. - // Event ID 33 is reserved for future use - // Event ID 34 is reserved for future use +// Event ID 33 is reserved for future use +// Event ID 34 is reserved for future use #define AON_EVENT_RTC_CH0 35 // RTC channel 0 #define AON_EVENT_RTC_CH1 36 // RTC channel 1 #define AON_EVENT_RTC_CH2 37 // RTC channel 2 @@ -123,7 +123,7 @@ extern "C" #define AON_EVENT_BATMON_VOLT 54 // BATMON voltage update event #define AON_EVENT_AUX_COMPB_ASYNC 55 // Comparator B triggered. Asynchronous signal directly from the AUX Comparator B #define AON_EVENT_AUX_COMPB_ASYNC_N 56 // Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B - // Event ID 57-62 is reserved for future use +// Event ID 57-62 is reserved for future use #define AON_EVENT_NONE 63 // No event, always low // Keeping backward compatibility until major revision number is incremented @@ -573,31 +573,31 @@ AONEventRtcGet(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONEventMcuWakeUpSet - #undef AONEventMcuWakeUpSet - #define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet - #endif - #ifdef ROM_AONEventMcuWakeUpGet - #undef AONEventMcuWakeUpGet - #define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet - #endif - #ifdef ROM_AONEventAuxWakeUpSet - #undef AONEventAuxWakeUpSet - #define AONEventAuxWakeUpSet ROM_AONEventAuxWakeUpSet - #endif - #ifdef ROM_AONEventAuxWakeUpGet - #undef AONEventAuxWakeUpGet - #define AONEventAuxWakeUpGet ROM_AONEventAuxWakeUpGet - #endif - #ifdef ROM_AONEventMcuSet - #undef AONEventMcuSet - #define AONEventMcuSet ROM_AONEventMcuSet - #endif - #ifdef ROM_AONEventMcuGet - #undef AONEventMcuGet - #define AONEventMcuGet ROM_AONEventMcuGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONEventMcuWakeUpSet +#undef AONEventMcuWakeUpSet +#define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet +#endif +#ifdef ROM_AONEventMcuWakeUpGet +#undef AONEventMcuWakeUpGet +#define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet +#endif +#ifdef ROM_AONEventAuxWakeUpSet +#undef AONEventAuxWakeUpSet +#define AONEventAuxWakeUpSet ROM_AONEventAuxWakeUpSet +#endif +#ifdef ROM_AONEventAuxWakeUpGet +#undef AONEventAuxWakeUpGet +#define AONEventAuxWakeUpGet ROM_AONEventAuxWakeUpGet +#endif +#ifdef ROM_AONEventMcuSet +#undef AONEventMcuSet +#define AONEventMcuSet ROM_AONEventMcuSet +#endif +#ifdef ROM_AONEventMcuGet +#undef AONEventMcuGet +#define AONEventMcuGet ROM_AONEventMcuGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_ioc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_ioc.h index 513e0e2d..f60cb031 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_ioc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_ioc.h @@ -186,7 +186,7 @@ AONIOCDriveStrengthGet(uint32_t ui32DriveLevel) (ui32DriveLevel == AONIOC_DRV_LVL_MAX)); // Return the drive strength value. - return( HWREG(AON_IOC_BASE + ui32DriveLevel) ); + return ( HWREG(AON_IOC_BASE + ui32DriveLevel) ); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_rtc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_rtc.h index eb98dec9..569fe222 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_rtc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_rtc.h @@ -80,8 +80,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONRTCCurrentCompareValueGet NOROM_AONRTCCurrentCompareValueGet - #define AONRTCCurrent64BitValueGet NOROM_AONRTCCurrent64BitValueGet +#define AONRTCCurrentCompareValueGet NOROM_AONRTCCurrentCompareValueGet +#define AONRTCCurrent64BitValueGet NOROM_AONRTCCurrent64BitValueGet #endif //***************************************************************************** @@ -227,7 +227,7 @@ __STATIC_INLINE bool AONRTCActive(void) { // Read if RTC is enabled - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN)); } //***************************************************************************** @@ -250,22 +250,22 @@ AONRTCChannelActive(uint32_t ui32Channel) { uint32_t uint32Status = 0; - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { uint32Status = HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN); } - return(uint32Status); + return (uint32Status); } //***************************************************************************** @@ -372,17 +372,17 @@ AONRTCEventClear(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH0; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH1; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREG(AON_RTC_BASE + AON_RTC_O_EVFLAGS) = AON_RTC_EVFLAGS_CH2; } @@ -415,22 +415,22 @@ AONRTCEventGet(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH0_BITN); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH1_BITN); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { uint32Event = HWREGBITW(AON_RTC_BASE + AON_RTC_O_EVFLAGS, AON_RTC_EVFLAGS_CH2_BITN); } - return(uint32Event); + return (uint32Event); } //***************************************************************************** @@ -458,7 +458,7 @@ AONRTCSecGet(void) { // The following read gets the seconds, but also latches the fractional // part. - return(HWREG(AON_RTC_BASE + AON_RTC_O_SEC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SEC)); } //***************************************************************************** @@ -490,7 +490,7 @@ AONRTCFractionGet(void) // consistent reading. // Note3: Interrupts must be disabled between the call to AONRTCSecGet() and this // call since there are interrupt functions that reads AON_RTC_O_SEC - return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC)); } //***************************************************************************** @@ -514,7 +514,7 @@ AONRTCFractionGet(void) __STATIC_INLINE uint32_t AONRTCSubSecIncrGet(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSECINC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_SUBSECINC)); } //***************************************************************************** @@ -565,7 +565,7 @@ AONRTCModeCh1Set(uint32_t ui32Mode) __STATIC_INLINE uint32_t AONRTCModeCh1Get(void) { - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_CAPT_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_CAPT_EN_BITN)); } //***************************************************************************** @@ -622,7 +622,7 @@ AONRTCModeCh2Set(uint32_t ui32Mode) __STATIC_INLINE uint32_t AONRTCModeCh2Get(void) { - return(HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_CONT_EN_BITN)); + return (HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_CONT_EN_BITN)); } //***************************************************************************** @@ -652,17 +652,17 @@ AONRTCChannelEnable(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN) = 1; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN) = 1; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN) = 1; } @@ -695,17 +695,17 @@ AONRTCChannelDisable(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH0_EN_BITN) = 0; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH1_EN_BITN) = 0; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREGBITW(AON_RTC_BASE + AON_RTC_O_CHCTL, AON_RTC_CHCTL_CH2_EN_BITN) = 0; } @@ -742,17 +742,17 @@ AONRTCCompareValueSet(uint32_t ui32Channel, uint32_t ui32CompValue) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { HWREG(AON_RTC_BASE + AON_RTC_O_CH0CMP) = ui32CompValue; } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { HWREG(AON_RTC_BASE + AON_RTC_O_CH1CMP) = ui32CompValue; } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMP) = ui32CompValue; } @@ -783,22 +783,22 @@ AONRTCCompareValueGet(uint32_t ui32Channel) (ui32Channel == AON_RTC_CH1) || (ui32Channel == AON_RTC_CH2)); - if(ui32Channel & AON_RTC_CH0) + if (ui32Channel & AON_RTC_CH0) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH0CMP); } - if(ui32Channel & AON_RTC_CH1) + if (ui32Channel & AON_RTC_CH1) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH1CMP); } - if(ui32Channel & AON_RTC_CH2) + if (ui32Channel & AON_RTC_CH2) { ui32Value = HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMP); } - return(ui32Value); + return (ui32Value); } //***************************************************************************** @@ -877,7 +877,7 @@ AONRTCIncValueCh2Set(uint32_t ui32IncValue) __STATIC_INLINE uint32_t AONRTCIncValueCh2Get(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMPINC)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_CH2CMPINC)); } //***************************************************************************** @@ -895,7 +895,7 @@ AONRTCIncValueCh2Get(void) __STATIC_INLINE uint32_t AONRTCCaptureValueCh1Get(void) { - return(HWREG(AON_RTC_BASE + AON_RTC_O_CH1CAPT)); + return (HWREG(AON_RTC_BASE + AON_RTC_O_CH1CAPT)); } //***************************************************************************** @@ -905,15 +905,15 @@ AONRTCCaptureValueCh1Get(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONRTCCurrentCompareValueGet - #undef AONRTCCurrentCompareValueGet - #define AONRTCCurrentCompareValueGet ROM_AONRTCCurrentCompareValueGet - #endif - #ifdef ROM_AONRTCCurrent64BitValueGet - #undef AONRTCCurrent64BitValueGet - #define AONRTCCurrent64BitValueGet ROM_AONRTCCurrent64BitValueGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONRTCCurrentCompareValueGet +#undef AONRTCCurrentCompareValueGet +#define AONRTCCurrentCompareValueGet ROM_AONRTCCurrentCompareValueGet +#endif +#ifdef ROM_AONRTCCurrent64BitValueGet +#undef AONRTCCurrent64BitValueGet +#define AONRTCCurrent64BitValueGet ROM_AONRTCCurrent64BitValueGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_wuc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_wuc.h index bb8dd13e..a915840c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_wuc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aon_wuc.h @@ -83,9 +83,9 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AONWUCAuxReset NOROM_AONWUCAuxReset - #define AONWUCRechargeCtrlConfigSet NOROM_AONWUCRechargeCtrlConfigSet - #define AONWUCOscConfig NOROM_AONWUCOscConfig +#define AONWUCAuxReset NOROM_AONWUCAuxReset +#define AONWUCRechargeCtrlConfigSet NOROM_AONWUCRechargeCtrlConfigSet +#define AONWUCOscConfig NOROM_AONWUCOscConfig #endif //***************************************************************************** @@ -94,11 +94,11 @@ extern "C" // //***************************************************************************** #define AONWUC_CLOCK_SRC_HF 0x00000003 // System clock high frequency - - // 48 MHz. +// 48 MHz. #define AONWUC_CLOCK_SRC_LF 0x00000001 // System clock low frequency - - // 32 kHz. +// 32 kHz. #define AONWUC_NO_CLOCK 0x00000000 // System clock low frequency - - // 32 kHz. +// 32 kHz. //***************************************************************************** // @@ -186,15 +186,15 @@ extern "C" //***************************************************************************** #define RC_RATE_MAX 768 // Maximum recharge rate for the - // recharge controller. +// recharge controller. #define RC_RATE_MIN 2 // Minimum recharge rate for the - // recharge controller. +// recharge controller. //***************************************************************************** #define AONWUC_MCU_RESET_SRC 0x00000002 // MCU reset source can be SW or - // JTAG +// JTAG #define AONWUC_MCU_WARM_RESET 0x00000001 // MCU reset type and can be warm - // or not warm. +// or not warm. //***************************************************************************** // @@ -235,8 +235,8 @@ AONWUCMcuPowerDownConfig(uint32_t ui32ClkSrc) ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_MCUCLK); ui32Reg &= ~AON_WUC_MCUCLK_PWR_DWN_SRC_M; HWREG(AON_WUC_BASE + AON_WUC_O_MCUCLK) = ui32Reg | - (ui32ClkSrc << - AON_WUC_MCUCLK_PWR_DWN_SRC_S); + (ui32ClkSrc << + AON_WUC_MCUCLK_PWR_DWN_SRC_S); } //***************************************************************************** @@ -365,7 +365,7 @@ AONWUCAuxClockConfigGet(void) // Return the clock divider value. return ((HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK) & AON_WUC_AUXCLK_SCLK_HF_DIV_M) >> - AON_WUC_AUXCLK_SCLK_HF_DIV_S); + AON_WUC_AUXCLK_SCLK_HF_DIV_S); } //***************************************************************************** @@ -399,8 +399,8 @@ AONWUCAuxPowerDownConfig(uint32_t ui32ClkSrc) ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK); ui32Reg &= ~AON_WUC_AUXCLK_PWR_DWN_SRC_M; HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK) = ui32Reg | - (ui32ClkSrc << - AON_WUC_AUXCLK_PWR_DWN_SRC_S); + (ui32ClkSrc << + AON_WUC_AUXCLK_PWR_DWN_SRC_S); } @@ -734,7 +734,7 @@ __STATIC_INLINE uint32_t AONWUCRechargeCtrlConfigGet(void) { // Return the current configuration. - return(HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG)); + return (HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG)); } //***************************************************************************** @@ -803,19 +803,19 @@ AONWUCJtagPowerOff(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AONWUCAuxReset - #undef AONWUCAuxReset - #define AONWUCAuxReset ROM_AONWUCAuxReset - #endif - #ifdef ROM_AONWUCRechargeCtrlConfigSet - #undef AONWUCRechargeCtrlConfigSet - #define AONWUCRechargeCtrlConfigSet ROM_AONWUCRechargeCtrlConfigSet - #endif - #ifdef ROM_AONWUCOscConfig - #undef AONWUCOscConfig - #define AONWUCOscConfig ROM_AONWUCOscConfig - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AONWUCAuxReset +#undef AONWUCAuxReset +#define AONWUCAuxReset ROM_AONWUCAuxReset +#endif +#ifdef ROM_AONWUCRechargeCtrlConfigSet +#undef AONWUCRechargeCtrlConfigSet +#define AONWUCRechargeCtrlConfigSet ROM_AONWUCRechargeCtrlConfigSet +#endif +#ifdef ROM_AONWUCOscConfig +#undef AONWUCOscConfig +#define AONWUCOscConfig ROM_AONWUCOscConfig +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_adc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_adc.h index 55631d7d..34a0557d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_adc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_adc.h @@ -84,19 +84,19 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXADCDisable NOROM_AUXADCDisable - #define AUXADCEnableAsync NOROM_AUXADCEnableAsync - #define AUXADCEnableSync NOROM_AUXADCEnableSync - #define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling - #define AUXADCFlushFifo NOROM_AUXADCFlushFifo - #define AUXADCReadFifo NOROM_AUXADCReadFifo - #define AUXADCPopFifo NOROM_AUXADCPopFifo - #define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain - #define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset - #define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts - #define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue - #define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset - #define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset +#define AUXADCDisable NOROM_AUXADCDisable +#define AUXADCEnableAsync NOROM_AUXADCEnableAsync +#define AUXADCEnableSync NOROM_AUXADCEnableSync +#define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling +#define AUXADCFlushFifo NOROM_AUXADCFlushFifo +#define AUXADCReadFifo NOROM_AUXADCReadFifo +#define AUXADCPopFifo NOROM_AUXADCPopFifo +#define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain +#define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset +#define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts +#define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue +#define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset +#define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset #endif //***************************************************************************** @@ -515,59 +515,59 @@ extern int32_t AUXADCUnadjustValueForGainAndOffset(int32_t adcValue, int32_t gai // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXADCDisable - #undef AUXADCDisable - #define AUXADCDisable ROM_AUXADCDisable - #endif - #ifdef ROM_AUXADCEnableAsync - #undef AUXADCEnableAsync - #define AUXADCEnableAsync ROM_AUXADCEnableAsync - #endif - #ifdef ROM_AUXADCEnableSync - #undef AUXADCEnableSync - #define AUXADCEnableSync ROM_AUXADCEnableSync - #endif - #ifdef ROM_AUXADCDisableInputScaling - #undef AUXADCDisableInputScaling - #define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling - #endif - #ifdef ROM_AUXADCFlushFifo - #undef AUXADCFlushFifo - #define AUXADCFlushFifo ROM_AUXADCFlushFifo - #endif - #ifdef ROM_AUXADCReadFifo - #undef AUXADCReadFifo - #define AUXADCReadFifo ROM_AUXADCReadFifo - #endif - #ifdef ROM_AUXADCPopFifo - #undef AUXADCPopFifo - #define AUXADCPopFifo ROM_AUXADCPopFifo - #endif - #ifdef ROM_AUXADCGetAdjustmentGain - #undef AUXADCGetAdjustmentGain - #define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain - #endif - #ifdef ROM_AUXADCGetAdjustmentOffset - #undef AUXADCGetAdjustmentOffset - #define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset - #endif - #ifdef ROM_AUXADCValueToMicrovolts - #undef AUXADCValueToMicrovolts - #define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts - #endif - #ifdef ROM_AUXADCMicrovoltsToValue - #undef AUXADCMicrovoltsToValue - #define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue - #endif - #ifdef ROM_AUXADCAdjustValueForGainAndOffset - #undef AUXADCAdjustValueForGainAndOffset - #define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset - #endif - #ifdef ROM_AUXADCUnadjustValueForGainAndOffset - #undef AUXADCUnadjustValueForGainAndOffset - #define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXADCDisable +#undef AUXADCDisable +#define AUXADCDisable ROM_AUXADCDisable +#endif +#ifdef ROM_AUXADCEnableAsync +#undef AUXADCEnableAsync +#define AUXADCEnableAsync ROM_AUXADCEnableAsync +#endif +#ifdef ROM_AUXADCEnableSync +#undef AUXADCEnableSync +#define AUXADCEnableSync ROM_AUXADCEnableSync +#endif +#ifdef ROM_AUXADCDisableInputScaling +#undef AUXADCDisableInputScaling +#define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling +#endif +#ifdef ROM_AUXADCFlushFifo +#undef AUXADCFlushFifo +#define AUXADCFlushFifo ROM_AUXADCFlushFifo +#endif +#ifdef ROM_AUXADCReadFifo +#undef AUXADCReadFifo +#define AUXADCReadFifo ROM_AUXADCReadFifo +#endif +#ifdef ROM_AUXADCPopFifo +#undef AUXADCPopFifo +#define AUXADCPopFifo ROM_AUXADCPopFifo +#endif +#ifdef ROM_AUXADCGetAdjustmentGain +#undef AUXADCGetAdjustmentGain +#define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain +#endif +#ifdef ROM_AUXADCGetAdjustmentOffset +#undef AUXADCGetAdjustmentOffset +#define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset +#endif +#ifdef ROM_AUXADCValueToMicrovolts +#undef AUXADCValueToMicrovolts +#define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts +#endif +#ifdef ROM_AUXADCMicrovoltsToValue +#undef AUXADCMicrovoltsToValue +#define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue +#endif +#ifdef ROM_AUXADCAdjustValueForGainAndOffset +#undef AUXADCAdjustValueForGainAndOffset +#define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset +#endif +#ifdef ROM_AUXADCUnadjustValueForGainAndOffset +#undef AUXADCUnadjustValueForGainAndOffset +#define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_smph.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_smph.h index 4ff13143..a83b6198 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_smph.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_smph.h @@ -137,7 +137,7 @@ AUXSMPHAcquire(uint32_t ui32Semaphore) // Wait for semaphore to be released such that it can be claimed // Semaphore register reads 1 when lock was acquired otherwise 0 // (i.e. AUX_SMPH_CLAIMED). - while(HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) == + while (HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) == AUX_SMPH_CLAIMED) { } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_tdc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_tdc.h index a8f567fe..4a6691c2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_tdc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_tdc.h @@ -81,8 +81,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXTDCConfigSet NOROM_AUXTDCConfigSet - #define AUXTDCMeasurementDone NOROM_AUXTDCMeasurementDone +#define AUXTDCConfigSet NOROM_AUXTDCConfigSet +#define AUXTDCMeasurementDone NOROM_AUXTDCMeasurementDone #endif //***************************************************************************** @@ -240,7 +240,7 @@ extern "C" static bool AUXTDCBaseValid(uint32_t ui32Base) { - return(ui32Base == AUX_TDC_BASE); + return (ui32Base == AUX_TDC_BASE); } #endif @@ -274,8 +274,8 @@ AUXTDCStatusGet(uint32_t ui32Base) ASSERT(AUXTDCBaseValid(ui32Base)); // Return the status value for the correct ADI Slave. - return((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >> - AUX_TDC_STAT_STATE_S); + return ((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >> + AUX_TDC_STAT_STATE_S); } //***************************************************************************** @@ -620,7 +620,7 @@ AUXTDCCounterEnable(uint32_t ui32Base) // Check if the AUX TDC is in idle mode. If not in Idle mode, the counter // will not be enabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -656,7 +656,7 @@ AUXTDCCounterDisable(uint32_t ui32Base) // Check if the AUX TDC is in Idle mode. If not in Idle mode, the counter // will not be disabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -697,7 +697,7 @@ AUXTDCCounterSet(uint32_t ui32Base, uint32_t ui32Events) // Check if the AUX TDC is in idle mode. If not in idle mode, the counter // will not be disabled. - if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == + if (!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) == AUX_TDC_STAT_STATE_IDLE)) { return false; @@ -745,15 +745,15 @@ AUXTDCCounterGet(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXTDCConfigSet - #undef AUXTDCConfigSet - #define AUXTDCConfigSet ROM_AUXTDCConfigSet - #endif - #ifdef ROM_AUXTDCMeasurementDone - #undef AUXTDCMeasurementDone - #define AUXTDCMeasurementDone ROM_AUXTDCMeasurementDone - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXTDCConfigSet +#undef AUXTDCConfigSet +#define AUXTDCConfigSet ROM_AUXTDCConfigSet +#endif +#ifdef ROM_AUXTDCMeasurementDone +#undef AUXTDCMeasurementDone +#define AUXTDCMeasurementDone ROM_AUXTDCMeasurementDone +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_timer.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_timer.h index b3266dde..45289b71 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_timer.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_timer.h @@ -82,11 +82,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXTimerConfigure NOROM_AUXTimerConfigure - #define AUXTimerStart NOROM_AUXTimerStart - #define AUXTimerStop NOROM_AUXTimerStop - #define AUXTimerPrescaleSet NOROM_AUXTimerPrescaleSet - #define AUXTimerPrescaleGet NOROM_AUXTimerPrescaleGet +#define AUXTimerConfigure NOROM_AUXTimerConfigure +#define AUXTimerStart NOROM_AUXTimerStart +#define AUXTimerStop NOROM_AUXTimerStop +#define AUXTimerPrescaleSet NOROM_AUXTimerPrescaleSet +#define AUXTimerPrescaleGet NOROM_AUXTimerPrescaleGet #endif //***************************************************************************** @@ -355,9 +355,9 @@ AUXTimerTargetValGet(uint32_t ui32Timer) // Check the arguments. ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1)); - return(HWREG((ui32Timer & AUX_TIMER_0) ? - (AUX_TIMER_BASE + AUX_TIMER_O_T0TARGET) : - (AUX_TIMER_BASE + AUX_TIMER_O_T1TARGET))); + return (HWREG((ui32Timer & AUX_TIMER_0) ? + (AUX_TIMER_BASE + AUX_TIMER_O_T0TARGET) : + (AUX_TIMER_BASE + AUX_TIMER_O_T1TARGET))); } //***************************************************************************** @@ -439,27 +439,27 @@ extern uint32_t AUXTimerPrescaleGet(uint32_t ui32Timer); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXTimerConfigure - #undef AUXTimerConfigure - #define AUXTimerConfigure ROM_AUXTimerConfigure - #endif - #ifdef ROM_AUXTimerStart - #undef AUXTimerStart - #define AUXTimerStart ROM_AUXTimerStart - #endif - #ifdef ROM_AUXTimerStop - #undef AUXTimerStop - #define AUXTimerStop ROM_AUXTimerStop - #endif - #ifdef ROM_AUXTimerPrescaleSet - #undef AUXTimerPrescaleSet - #define AUXTimerPrescaleSet ROM_AUXTimerPrescaleSet - #endif - #ifdef ROM_AUXTimerPrescaleGet - #undef AUXTimerPrescaleGet - #define AUXTimerPrescaleGet ROM_AUXTimerPrescaleGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXTimerConfigure +#undef AUXTimerConfigure +#define AUXTimerConfigure ROM_AUXTimerConfigure +#endif +#ifdef ROM_AUXTimerStart +#undef AUXTimerStart +#define AUXTimerStart ROM_AUXTimerStart +#endif +#ifdef ROM_AUXTimerStop +#undef AUXTimerStop +#define AUXTimerStop ROM_AUXTimerStop +#endif +#ifdef ROM_AUXTimerPrescaleSet +#undef AUXTimerPrescaleSet +#define AUXTimerPrescaleSet ROM_AUXTimerPrescaleSet +#endif +#ifdef ROM_AUXTimerPrescaleGet +#undef AUXTimerPrescaleGet +#define AUXTimerPrescaleGet ROM_AUXTimerPrescaleGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_wuc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_wuc.h index 532d1e99..a8125361 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_wuc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/aux_wuc.h @@ -80,10 +80,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define AUXWUCClockEnable NOROM_AUXWUCClockEnable - #define AUXWUCClockDisable NOROM_AUXWUCClockDisable - #define AUXWUCClockStatus NOROM_AUXWUCClockStatus - #define AUXWUCPowerCtrl NOROM_AUXWUCPowerCtrl +#define AUXWUCClockEnable NOROM_AUXWUCClockEnable +#define AUXWUCClockDisable NOROM_AUXWUCClockDisable +#define AUXWUCClockStatus NOROM_AUXWUCClockStatus +#define AUXWUCPowerCtrl NOROM_AUXWUCPowerCtrl #endif //***************************************************************************** @@ -308,23 +308,23 @@ AUXWUCFreezeDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_AUXWUCClockEnable - #undef AUXWUCClockEnable - #define AUXWUCClockEnable ROM_AUXWUCClockEnable - #endif - #ifdef ROM_AUXWUCClockDisable - #undef AUXWUCClockDisable - #define AUXWUCClockDisable ROM_AUXWUCClockDisable - #endif - #ifdef ROM_AUXWUCClockStatus - #undef AUXWUCClockStatus - #define AUXWUCClockStatus ROM_AUXWUCClockStatus - #endif - #ifdef ROM_AUXWUCPowerCtrl - #undef AUXWUCPowerCtrl - #define AUXWUCPowerCtrl ROM_AUXWUCPowerCtrl - #endif +#include "../driverlib/rom.h" +#ifdef ROM_AUXWUCClockEnable +#undef AUXWUCClockEnable +#define AUXWUCClockEnable ROM_AUXWUCClockEnable +#endif +#ifdef ROM_AUXWUCClockDisable +#undef AUXWUCClockDisable +#define AUXWUCClockDisable ROM_AUXWUCClockDisable +#endif +#ifdef ROM_AUXWUCClockStatus +#undef AUXWUCClockStatus +#define AUXWUCClockStatus ROM_AUXWUCClockStatus +#endif +#ifdef ROM_AUXWUCPowerCtrl +#undef AUXWUCPowerCtrl +#define AUXWUCPowerCtrl ROM_AUXWUCPowerCtrl +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ccfgread.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ccfgread.h index e3397e93..3dec1eb5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ccfgread.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ccfgread.h @@ -89,8 +89,8 @@ __STATIC_INLINE bool CCFGRead_DIS_GPRAM( void ) { return (( HWREG( CCFG_BASE + CCFG_O_SIZE_AND_DIS_FLAGS ) & - CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_M ) >> - CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_S ) ; + CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_M ) >> + CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM_S ) ; } //***************************************************************************** @@ -104,8 +104,8 @@ __STATIC_INLINE bool CCFGRead_EXT_LF_CLK_DIO( void ) { return (( HWREG( CCFG_BASE + CCFG_O_EXT_LF_CLK ) & - CCFG_EXT_LF_CLK_DIO_M ) >> - CCFG_EXT_LF_CLK_DIO_S ) ; + CCFG_EXT_LF_CLK_DIO_M ) >> + CCFG_EXT_LF_CLK_DIO_S ) ; } //***************************************************************************** @@ -134,8 +134,8 @@ __STATIC_INLINE uint32_t CCFGRead_SCLK_LF_OPTION( void ) { return (( HWREG( CCFG_BASE + CCFG_O_MODE_CONF ) & - CCFG_MODE_CONF_SCLK_LF_OPTION_M ) >> - CCFG_MODE_CONF_SCLK_LF_OPTION_S ) ; + CCFG_MODE_CONF_SCLK_LF_OPTION_M ) >> + CCFG_MODE_CONF_SCLK_LF_OPTION_S ) ; } //***************************************************************************** @@ -163,8 +163,8 @@ __STATIC_INLINE uint32_t CCFGRead_XOSC_FREQ( void ) { return (( HWREG( CCFG_BASE + CCFG_O_MODE_CONF ) & - CCFG_MODE_CONF_XOSC_FREQ_M ) >> - CCFG_MODE_CONF_XOSC_FREQ_S ) ; + CCFG_MODE_CONF_XOSC_FREQ_M ) >> + CCFG_MODE_CONF_XOSC_FREQ_S ) ; } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/chipinfo.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/chipinfo.h index 2b4a2580..c1ce08af 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/chipinfo.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/chipinfo.h @@ -79,12 +79,12 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV - #define ChipInfo_GetPackageType NOROM_ChipInfo_GetPackageType - #define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType - #define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily - #define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision - #define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated +#define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV +#define ChipInfo_GetPackageType NOROM_ChipInfo_GetPackageType +#define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType +#define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily +#define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision +#define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated #endif //***************************************************************************** @@ -96,11 +96,12 @@ extern "C" //! E.g: 0x06 means that the chip supports both BLE and IEEE 802.15.4 // //***************************************************************************** -typedef enum { - PROTOCOL_Unknown = 0 , //!< None of the known protocols are supported. - PROTOCOLBIT_BLE = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported. - PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported. - PROTOCOLBIT_Proprietary = 0x08 //!< Bit[3] set, indicates that proprietary protocols are supported. +typedef enum +{ + PROTOCOL_Unknown = 0, //!< None of the known protocols are supported. + PROTOCOLBIT_BLE = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported. + PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported. + PROTOCOLBIT_Proprietary = 0x08 //!< Bit[3] set, indicates that proprietary protocols are supported. } ProtocolBitVector_t; //***************************************************************************** @@ -124,7 +125,7 @@ extern ProtocolBitVector_t ChipInfo_GetSupportedProtocol_BV( void ); __STATIC_INLINE bool ChipInfo_SupportsBLE( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 ); } //***************************************************************************** @@ -138,7 +139,7 @@ ChipInfo_SupportsBLE( void ) __STATIC_INLINE bool ChipInfo_SupportsIEEE_802_15_4( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 ); } //***************************************************************************** @@ -152,7 +153,7 @@ ChipInfo_SupportsIEEE_802_15_4( void ) __STATIC_INLINE bool ChipInfo_SupportsPROPRIETARY( void ) { - return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 ); + return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 ); } //***************************************************************************** @@ -163,14 +164,15 @@ ChipInfo_SupportsPROPRIETARY( void ) //! Packages available for a specific device are shown in the device datasheet. // //***************************************************************************** -typedef enum { - PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown. - PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package. - PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package. - PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package. - PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die). - PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV). - PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks. +typedef enum +{ + PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown. + PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package. + PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package. + PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package. + PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die). + PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV). + PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks. } PackageType_t; //***************************************************************************** @@ -194,7 +196,7 @@ extern PackageType_t ChipInfo_GetPackageType( void ); __STATIC_INLINE bool ChipInfo_PackageTypeIs4x4( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_4x4 ); + return ( ChipInfo_GetPackageType() == PACKAGE_4x4 ); } //***************************************************************************** @@ -208,7 +210,7 @@ ChipInfo_PackageTypeIs4x4( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs5x5( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_5x5 ); + return ( ChipInfo_GetPackageType() == PACKAGE_5x5 ); } //***************************************************************************** @@ -222,7 +224,7 @@ ChipInfo_PackageTypeIs5x5( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs7x7( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_7x7 ); + return ( ChipInfo_GetPackageType() == PACKAGE_7x7 ); } //***************************************************************************** @@ -236,7 +238,7 @@ ChipInfo_PackageTypeIs7x7( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIsWAFER( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_WAFER ); + return ( ChipInfo_GetPackageType() == PACKAGE_WAFER ); } //***************************************************************************** @@ -250,7 +252,7 @@ ChipInfo_PackageTypeIsWAFER( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIsWCSP( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_WCSP ); + return ( ChipInfo_GetPackageType() == PACKAGE_WCSP ); } //***************************************************************************** @@ -264,7 +266,7 @@ ChipInfo_PackageTypeIsWCSP( void ) __STATIC_INLINE bool ChipInfo_PackageTypeIs7x7Q1( void ) { - return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 ); + return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 ); } //***************************************************************************** @@ -277,8 +279,8 @@ ChipInfo_PackageTypeIs7x7Q1( void ) __STATIC_INLINE uint32_t ChipInfo_GetDeviceIdHwRevCode( void ) { - // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28] - return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 ); + // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28] + return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 ); } //***************************************************************************** @@ -295,15 +297,16 @@ ChipInfo_GetDeviceIdHwRevCode( void ) __STATIC_INLINE uint32_t ChipInfo_GetMinorHwRev( void ) { - uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) & - FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >> - FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ; + uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) & + FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >> + FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ; - if ( minorRev >= 0x80 ) { - minorRev = 0; - } + if ( minorRev >= 0x80 ) + { + minorRev = 0; + } - return( minorRev ); + return ( minorRev ); } //***************************************************************************** @@ -319,7 +322,7 @@ ChipInfo_GetMinorHwRev( void ) __STATIC_INLINE uint32_t ChipInfo_GetUserId( void ) { - return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID )); + return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID )); } //***************************************************************************** @@ -327,23 +330,24 @@ ChipInfo_GetUserId( void ) //! \brief Chip type enumeration // //***************************************************************************** -typedef enum { - CHIP_TYPE_Unknown = -1, //!< -1 means that the chip type is unknown. - CHIP_TYPE_CC1310 = 0, //!< 0 means that this is a CC1310 chip. - CHIP_TYPE_CC1350 = 1, //!< 1 means that this is a CC1350 chip. - CHIP_TYPE_CC2620 = 2, //!< 2 means that this is a CC2620 chip. - CHIP_TYPE_CC2630 = 3, //!< 3 means that this is a CC2630 chip. - CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip. - CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip. - CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip. - CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip. - CHIP_TYPE_CC2640R2 = 8, //!< 8 means that this is a CC2640R2 chip. - CHIP_TYPE_CC2642 = 9, //!< 9 means that this is a CC2642 chip. - CHIP_TYPE_unused = 10,//!< 10 unused value - CHIP_TYPE_CC2652 = 11,//!< 11 means that this is a CC2652 chip. - CHIP_TYPE_CC1312 = 12,//!< 12 means that this is a CC1312 chip. - CHIP_TYPE_CC1352 = 13,//!< 13 means that this is a CC1352 chip. - CHIP_TYPE_CC1352P = 14 //!< 14 means that this is a CC1352P chip. +typedef enum +{ + CHIP_TYPE_Unknown = -1, //!< -1 means that the chip type is unknown. + CHIP_TYPE_CC1310 = 0, //!< 0 means that this is a CC1310 chip. + CHIP_TYPE_CC1350 = 1, //!< 1 means that this is a CC1350 chip. + CHIP_TYPE_CC2620 = 2, //!< 2 means that this is a CC2620 chip. + CHIP_TYPE_CC2630 = 3, //!< 3 means that this is a CC2630 chip. + CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip. + CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip. + CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip. + CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip. + CHIP_TYPE_CC2640R2 = 8, //!< 8 means that this is a CC2640R2 chip. + CHIP_TYPE_CC2642 = 9, //!< 9 means that this is a CC2642 chip. + CHIP_TYPE_unused = 10,//!< 10 unused value + CHIP_TYPE_CC2652 = 11,//!< 11 means that this is a CC2652 chip. + CHIP_TYPE_CC1312 = 12,//!< 12 means that this is a CC1312 chip. + CHIP_TYPE_CC1352 = 13,//!< 13 means that this is a CC1352 chip. + CHIP_TYPE_CC1352P = 14 //!< 14 means that this is a CC1352P chip. } ChipType_t; //***************************************************************************** @@ -361,13 +365,14 @@ extern ChipType_t ChipInfo_GetChipType( void ); //! \brief Chip family enumeration // //***************************************************************************** -typedef enum { - FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown. - FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member. - FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member. - FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member. - FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents). - FAMILY_CC13x2_CC26x2 = 4 //!< 4 means that the chip is a CC13x2, CC26x2 family member. +typedef enum +{ + FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown. + FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member. + FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member. + FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member. + FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents). + FAMILY_CC13x2_CC26x2 = 4 //!< 4 means that the chip is a CC13x2, CC26x2 family member. } ChipFamily_t; //***************************************************************************** @@ -411,7 +416,7 @@ extern ChipFamily_t ChipInfo_GetChipFamily( void ); __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC13x0( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 ); } //***************************************************************************** @@ -425,7 +430,7 @@ ChipInfo_ChipFamilyIs_CC13x0( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x0( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 ); } //***************************************************************************** @@ -439,7 +444,7 @@ ChipInfo_ChipFamilyIs_CC26x0( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x0R2( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 ); } //***************************************************************************** @@ -453,7 +458,7 @@ ChipInfo_ChipFamilyIs_CC26x0R2( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC26x1( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 ); } //***************************************************************************** @@ -467,7 +472,7 @@ ChipInfo_ChipFamilyIs_CC26x1( void ) __STATIC_INLINE bool ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void ) { - return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 ); + return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 ); } //***************************************************************************** @@ -475,15 +480,16 @@ ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void ) //! \brief HW revision enumeration. // //***************************************************************************** -typedef enum { - HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown. - HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0 - HWREV_1_1 = 11, //!< 11 means that the chip's HW revision is 1.1 - HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0 - HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1 - HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2 - HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3 - HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4 +typedef enum +{ + HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown. + HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0 + HWREV_1_1 = 11, //!< 11 means that the chip's HW revision is 1.1 + HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0 + HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1 + HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2 + HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3 + HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4 } HwRevision_t; //***************************************************************************** @@ -507,7 +513,7 @@ extern HwRevision_t ChipInfo_GetHwRevision( void ); __STATIC_INLINE bool ChipInfo_HwRevisionIs_1_0( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_1_0 ); + return ( ChipInfo_GetHwRevision() == HWREV_1_0 ); } //***************************************************************************** @@ -521,7 +527,7 @@ ChipInfo_HwRevisionIs_1_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_0( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_0 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_0 ); } //***************************************************************************** @@ -535,7 +541,7 @@ ChipInfo_HwRevisionIs_2_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_0( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_0 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_0 ); } //***************************************************************************** @@ -549,7 +555,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_0( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_1( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_1 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_1 ); } //***************************************************************************** @@ -563,7 +569,7 @@ ChipInfo_HwRevisionIs_2_1( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_1( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_1 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_1 ); } //***************************************************************************** @@ -577,7 +583,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_1( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_2_2( void ) { - return ( ChipInfo_GetHwRevision() == HWREV_2_2 ); + return ( ChipInfo_GetHwRevision() == HWREV_2_2 ); } //***************************************************************************** @@ -591,7 +597,7 @@ ChipInfo_HwRevisionIs_2_2( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_2( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_2 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_2 ); } //***************************************************************************** @@ -605,7 +611,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_2( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_3( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_3 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_3 ); } //***************************************************************************** @@ -619,7 +625,7 @@ ChipInfo_HwRevisionIs_GTEQ_2_3( void ) __STATIC_INLINE bool ChipInfo_HwRevisionIs_GTEQ_2_4( void ) { - return ( ChipInfo_GetHwRevision() >= HWREV_2_4 ); + return ( ChipInfo_GetHwRevision() >= HWREV_2_4 ); } //***************************************************************************** @@ -638,31 +644,31 @@ extern void ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated( void ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_ChipInfo_GetSupportedProtocol_BV - #undef ChipInfo_GetSupportedProtocol_BV - #define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV - #endif - #ifdef ROM_ChipInfo_GetPackageType - #undef ChipInfo_GetPackageType - #define ChipInfo_GetPackageType ROM_ChipInfo_GetPackageType - #endif - #ifdef ROM_ChipInfo_GetChipType - #undef ChipInfo_GetChipType - #define ChipInfo_GetChipType ROM_ChipInfo_GetChipType - #endif - #ifdef ROM_ChipInfo_GetChipFamily - #undef ChipInfo_GetChipFamily - #define ChipInfo_GetChipFamily ROM_ChipInfo_GetChipFamily - #endif - #ifdef ROM_ChipInfo_GetHwRevision - #undef ChipInfo_GetHwRevision - #define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision - #endif - #ifdef ROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated - #undef ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated - #define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated - #endif +#include "../driverlib/rom.h" +#ifdef ROM_ChipInfo_GetSupportedProtocol_BV +#undef ChipInfo_GetSupportedProtocol_BV +#define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV +#endif +#ifdef ROM_ChipInfo_GetPackageType +#undef ChipInfo_GetPackageType +#define ChipInfo_GetPackageType ROM_ChipInfo_GetPackageType +#endif +#ifdef ROM_ChipInfo_GetChipType +#undef ChipInfo_GetChipType +#define ChipInfo_GetChipType ROM_ChipInfo_GetChipType +#endif +#ifdef ROM_ChipInfo_GetChipFamily +#undef ChipInfo_GetChipFamily +#define ChipInfo_GetChipFamily ROM_ChipInfo_GetChipFamily +#endif +#ifdef ROM_ChipInfo_GetHwRevision +#undef ChipInfo_GetHwRevision +#define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision +#endif +#ifdef ROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated +#undef ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated +#define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/cpu.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/cpu.h index e2b0561a..947687f1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/cpu.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/cpu.h @@ -80,11 +80,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define CPUcpsid NOROM_CPUcpsid - #define CPUprimask NOROM_CPUprimask - #define CPUcpsie NOROM_CPUcpsie - #define CPUbasepriGet NOROM_CPUbasepriGet - #define CPUdelay NOROM_CPUdelay +#define CPUcpsid NOROM_CPUcpsid +#define CPUprimask NOROM_CPUprimask +#define CPUcpsie NOROM_CPUcpsie +#define CPUbasepriGet NOROM_CPUbasepriGet +#define CPUdelay NOROM_CPUdelay #endif //***************************************************************************** @@ -423,27 +423,27 @@ CPU_WriteBufferEnable( void ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_CPUcpsid - #undef CPUcpsid - #define CPUcpsid ROM_CPUcpsid - #endif - #ifdef ROM_CPUprimask - #undef CPUprimask - #define CPUprimask ROM_CPUprimask - #endif - #ifdef ROM_CPUcpsie - #undef CPUcpsie - #define CPUcpsie ROM_CPUcpsie - #endif - #ifdef ROM_CPUbasepriGet - #undef CPUbasepriGet - #define CPUbasepriGet ROM_CPUbasepriGet - #endif - #ifdef ROM_CPUdelay - #undef CPUdelay - #define CPUdelay ROM_CPUdelay - #endif +#include "../driverlib/rom.h" +#ifdef ROM_CPUcpsid +#undef CPUcpsid +#define CPUcpsid ROM_CPUcpsid +#endif +#ifdef ROM_CPUprimask +#undef CPUprimask +#define CPUprimask ROM_CPUprimask +#endif +#ifdef ROM_CPUcpsie +#undef CPUcpsie +#define CPUcpsie ROM_CPUcpsie +#endif +#ifdef ROM_CPUbasepriGet +#undef CPUbasepriGet +#define CPUbasepriGet ROM_CPUbasepriGet +#endif +#ifdef ROM_CPUdelay +#undef CPUdelay +#define CPUdelay ROM_CPUdelay +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/crypto.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/crypto.h index bb411ec8..11760a6f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/crypto.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/crypto.h @@ -83,19 +83,19 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define CRYPTOAesLoadKey NOROM_CRYPTOAesLoadKey - #define CRYPTOAesCbc NOROM_CRYPTOAesCbc - #define CRYPTOAesCbcStatus NOROM_CRYPTOAesCbcStatus - #define CRYPTOAesEcb NOROM_CRYPTOAesEcb - #define CRYPTOAesEcbStatus NOROM_CRYPTOAesEcbStatus - #define CRYPTOCcmAuthEncrypt NOROM_CRYPTOCcmAuthEncrypt - #define CRYPTOCcmAuthEncryptStatus NOROM_CRYPTOCcmAuthEncryptStatus - #define CRYPTOCcmAuthEncryptResultGet NOROM_CRYPTOCcmAuthEncryptResultGet - #define CRYPTOCcmInvAuthDecrypt NOROM_CRYPTOCcmInvAuthDecrypt - #define CRYPTOCcmInvAuthDecryptStatus NOROM_CRYPTOCcmInvAuthDecryptStatus - #define CRYPTOCcmInvAuthDecryptResultGet NOROM_CRYPTOCcmInvAuthDecryptResultGet - #define CRYPTODmaEnable NOROM_CRYPTODmaEnable - #define CRYPTODmaDisable NOROM_CRYPTODmaDisable +#define CRYPTOAesLoadKey NOROM_CRYPTOAesLoadKey +#define CRYPTOAesCbc NOROM_CRYPTOAesCbc +#define CRYPTOAesCbcStatus NOROM_CRYPTOAesCbcStatus +#define CRYPTOAesEcb NOROM_CRYPTOAesEcb +#define CRYPTOAesEcbStatus NOROM_CRYPTOAesEcbStatus +#define CRYPTOCcmAuthEncrypt NOROM_CRYPTOCcmAuthEncrypt +#define CRYPTOCcmAuthEncryptStatus NOROM_CRYPTOCcmAuthEncryptStatus +#define CRYPTOCcmAuthEncryptResultGet NOROM_CRYPTOCcmAuthEncryptResultGet +#define CRYPTOCcmInvAuthDecrypt NOROM_CRYPTOCcmInvAuthDecrypt +#define CRYPTOCcmInvAuthDecryptStatus NOROM_CRYPTOCcmInvAuthDecryptStatus +#define CRYPTOCcmInvAuthDecryptResultGet NOROM_CRYPTOCcmInvAuthDecryptResultGet +#define CRYPTODmaEnable NOROM_CRYPTODmaEnable +#define CRYPTODmaDisable NOROM_CRYPTODmaDisable #endif //***************************************************************************** @@ -227,7 +227,7 @@ extern "C" //! - \ref AES_KEYSTORE_READ_ERROR // //***************************************************************************** -extern uint32_t CRYPTOAesLoadKey(uint32_t *pui32AesKey, +extern uint32_t CRYPTOAesLoadKey(uint32_t* pui32AesKey, uint32_t ui32KeyLocation); //***************************************************************************** @@ -263,8 +263,8 @@ extern uint32_t CRYPTOAesLoadKey(uint32_t *pui32AesKey, //! \sa \ref CRYPTOAesCbcStatus() // //***************************************************************************** -extern uint32_t CRYPTOAesCbc(uint32_t *pui32MsgIn, uint32_t *pui32MsgOut, - uint32_t ui32MsgLength, uint32_t *pui32Nonce, +extern uint32_t CRYPTOAesCbc(uint32_t* pui32MsgIn, uint32_t* pui32MsgOut, + uint32_t ui32MsgLength, uint32_t* pui32Nonce, uint32_t ui32KeyLocation, bool bEncrypt, bool bIntEnable); @@ -315,7 +315,7 @@ extern uint32_t CRYPTOAesCbcStatus(void); //! \sa \ref CRYPTOAesEcbStatus() // //***************************************************************************** -extern uint32_t CRYPTOAesEcb(uint32_t *pui32MsgIn, uint32_t *pui32MsgOut, +extern uint32_t CRYPTOAesEcb(uint32_t* pui32MsgIn, uint32_t* pui32MsgOut, uint32_t ui32KeyLocation, bool bEncrypt, bool bIntEnable); @@ -416,10 +416,10 @@ CRYPTOAesCbcFinish(void) // //***************************************************************************** extern uint32_t CRYPTOCcmAuthEncrypt(bool bEncrypt, uint32_t ui32AuthLength, - uint32_t *pui32Nonce, - uint32_t *pui32PlainText, + uint32_t* pui32Nonce, + uint32_t* pui32PlainText, uint32_t ui32PlainTextLength, - uint32_t *pui32Header, + uint32_t* pui32Header, uint32_t ui32HeaderLength, uint32_t ui32KeyLocation, uint32_t ui32FieldLength, @@ -457,7 +457,7 @@ extern uint32_t CRYPTOCcmAuthEncryptStatus(void); // //***************************************************************************** extern uint32_t CRYPTOCcmAuthEncryptResultGet(uint32_t ui32TagLength, - uint32_t *pui32CcmTag); + uint32_t* pui32CcmTag); //***************************************************************************** // @@ -495,10 +495,10 @@ extern uint32_t CRYPTOCcmAuthEncryptResultGet(uint32_t ui32TagLength, // //***************************************************************************** extern uint32_t CRYPTOCcmInvAuthDecrypt(bool bDecrypt, uint32_t ui32AuthLength, - uint32_t *pui32Nonce, - uint32_t *pui32CipherText, + uint32_t* pui32Nonce, + uint32_t* pui32CipherText, uint32_t ui32CipherTextLength, - uint32_t *pui32Header, + uint32_t* pui32Header, uint32_t ui32HeaderLength, uint32_t ui32KeyLocation, uint32_t ui32FieldLength, @@ -530,9 +530,9 @@ extern uint32_t CRYPTOCcmInvAuthDecryptStatus(void); // //***************************************************************************** extern uint32_t CRYPTOCcmInvAuthDecryptResultGet(uint32_t ui32AuthLength, - uint32_t *pui32CipherText, - uint32_t ui32CipherTextLength, - uint32_t *pui32CcmTag); + uint32_t* pui32CipherText, + uint32_t ui32CipherTextLength, + uint32_t* pui32CcmTag); //***************************************************************************** // @@ -666,14 +666,14 @@ CRYPTOIntStatus(bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN); - return(ui32Mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); + return (ui32Mask & HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT)); } else { - return(HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT) & 0x00000003); + return (HWREG(CRYPTO_BASE + CRYPTO_O_IRQSTAT) & 0x00000003); } } @@ -781,59 +781,59 @@ CRYPTOIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_CRYPTOAesLoadKey - #undef CRYPTOAesLoadKey - #define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey - #endif - #ifdef ROM_CRYPTOAesCbc - #undef CRYPTOAesCbc - #define CRYPTOAesCbc ROM_CRYPTOAesCbc - #endif - #ifdef ROM_CRYPTOAesCbcStatus - #undef CRYPTOAesCbcStatus - #define CRYPTOAesCbcStatus ROM_CRYPTOAesCbcStatus - #endif - #ifdef ROM_CRYPTOAesEcb - #undef CRYPTOAesEcb - #define CRYPTOAesEcb ROM_CRYPTOAesEcb - #endif - #ifdef ROM_CRYPTOAesEcbStatus - #undef CRYPTOAesEcbStatus - #define CRYPTOAesEcbStatus ROM_CRYPTOAesEcbStatus - #endif - #ifdef ROM_CRYPTOCcmAuthEncrypt - #undef CRYPTOCcmAuthEncrypt - #define CRYPTOCcmAuthEncrypt ROM_CRYPTOCcmAuthEncrypt - #endif - #ifdef ROM_CRYPTOCcmAuthEncryptStatus - #undef CRYPTOCcmAuthEncryptStatus - #define CRYPTOCcmAuthEncryptStatus ROM_CRYPTOCcmAuthEncryptStatus - #endif - #ifdef ROM_CRYPTOCcmAuthEncryptResultGet - #undef CRYPTOCcmAuthEncryptResultGet - #define CRYPTOCcmAuthEncryptResultGet ROM_CRYPTOCcmAuthEncryptResultGet - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecrypt - #undef CRYPTOCcmInvAuthDecrypt - #define CRYPTOCcmInvAuthDecrypt ROM_CRYPTOCcmInvAuthDecrypt - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecryptStatus - #undef CRYPTOCcmInvAuthDecryptStatus - #define CRYPTOCcmInvAuthDecryptStatus ROM_CRYPTOCcmInvAuthDecryptStatus - #endif - #ifdef ROM_CRYPTOCcmInvAuthDecryptResultGet - #undef CRYPTOCcmInvAuthDecryptResultGet - #define CRYPTOCcmInvAuthDecryptResultGet ROM_CRYPTOCcmInvAuthDecryptResultGet - #endif - #ifdef ROM_CRYPTODmaEnable - #undef CRYPTODmaEnable - #define CRYPTODmaEnable ROM_CRYPTODmaEnable - #endif - #ifdef ROM_CRYPTODmaDisable - #undef CRYPTODmaDisable - #define CRYPTODmaDisable ROM_CRYPTODmaDisable - #endif +#include "../driverlib/rom.h" +#ifdef ROM_CRYPTOAesLoadKey +#undef CRYPTOAesLoadKey +#define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey +#endif +#ifdef ROM_CRYPTOAesCbc +#undef CRYPTOAesCbc +#define CRYPTOAesCbc ROM_CRYPTOAesCbc +#endif +#ifdef ROM_CRYPTOAesCbcStatus +#undef CRYPTOAesCbcStatus +#define CRYPTOAesCbcStatus ROM_CRYPTOAesCbcStatus +#endif +#ifdef ROM_CRYPTOAesEcb +#undef CRYPTOAesEcb +#define CRYPTOAesEcb ROM_CRYPTOAesEcb +#endif +#ifdef ROM_CRYPTOAesEcbStatus +#undef CRYPTOAesEcbStatus +#define CRYPTOAesEcbStatus ROM_CRYPTOAesEcbStatus +#endif +#ifdef ROM_CRYPTOCcmAuthEncrypt +#undef CRYPTOCcmAuthEncrypt +#define CRYPTOCcmAuthEncrypt ROM_CRYPTOCcmAuthEncrypt +#endif +#ifdef ROM_CRYPTOCcmAuthEncryptStatus +#undef CRYPTOCcmAuthEncryptStatus +#define CRYPTOCcmAuthEncryptStatus ROM_CRYPTOCcmAuthEncryptStatus +#endif +#ifdef ROM_CRYPTOCcmAuthEncryptResultGet +#undef CRYPTOCcmAuthEncryptResultGet +#define CRYPTOCcmAuthEncryptResultGet ROM_CRYPTOCcmAuthEncryptResultGet +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecrypt +#undef CRYPTOCcmInvAuthDecrypt +#define CRYPTOCcmInvAuthDecrypt ROM_CRYPTOCcmInvAuthDecrypt +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecryptStatus +#undef CRYPTOCcmInvAuthDecryptStatus +#define CRYPTOCcmInvAuthDecryptStatus ROM_CRYPTOCcmInvAuthDecryptStatus +#endif +#ifdef ROM_CRYPTOCcmInvAuthDecryptResultGet +#undef CRYPTOCcmInvAuthDecryptResultGet +#define CRYPTOCcmInvAuthDecryptResultGet ROM_CRYPTOCcmInvAuthDecryptResultGet +#endif +#ifdef ROM_CRYPTODmaEnable +#undef CRYPTODmaEnable +#define CRYPTODmaEnable ROM_CRYPTODmaEnable +#endif +#ifdef ROM_CRYPTODmaDisable +#undef CRYPTODmaDisable +#define CRYPTODmaDisable ROM_CRYPTODmaDisable +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ddi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ddi.h index e3b63a06..e0a3036b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ddi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ddi.h @@ -82,11 +82,11 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define DDI32RegWrite NOROM_DDI32RegWrite - #define DDI16BitWrite NOROM_DDI16BitWrite - #define DDI16BitfieldWrite NOROM_DDI16BitfieldWrite - #define DDI16BitRead NOROM_DDI16BitRead - #define DDI16BitfieldRead NOROM_DDI16BitfieldRead +#define DDI32RegWrite NOROM_DDI32RegWrite +#define DDI16BitWrite NOROM_DDI16BitWrite +#define DDI16BitfieldWrite NOROM_DDI16BitfieldWrite +#define DDI16BitRead NOROM_DDI16BitRead +#define DDI16BitfieldRead NOROM_DDI16BitfieldRead #endif //***************************************************************************** @@ -138,16 +138,31 @@ AuxAdiDdiSafeWrite(uint32_t nAddr, uint32_t nData, uint32_t nSize) { // Disable interrupts and remember whether to re-enable bool bIrqEnabled = !CPUcpsid(); + // Acquire semaphore for accessing ADI/DDI in AUX, perform access, release semaphore while (!HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0)); - switch (nSize) { - case 1: HWREGB(nAddr) = (uint8_t)nData; break; - case 2: HWREGH(nAddr) = (uint16_t)nData; break; - case 4: default: HWREG(nAddr) = nData; break; + + switch (nSize) + { + case 1: + HWREGB(nAddr) = (uint8_t)nData; + break; + + case 2: + HWREGH(nAddr) = (uint16_t)nData; + break; + + case 4: + default: + HWREG(nAddr) = nData; + break; } + HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0) = 1; + // Restore interrupt enable - if (bIrqEnabled) { + if (bIrqEnabled) + { CPUcpsie(); } } @@ -171,18 +186,34 @@ AuxAdiDdiSafeRead(uint32_t nAddr, uint32_t nSize) uint32_t nRet; // Disable interrupts and remember whether to re-enable bool bIrqEnabled = !CPUcpsid(); + // Acquire semaphore for accessing ADI/DDI in AUX, perform access, release semaphore while (!HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0)); - switch (nSize) { - case 1: nRet = HWREGB(nAddr); break; - case 2: nRet = HWREGH(nAddr); break; - case 4: default: nRet = HWREG(nAddr); break; + + switch (nSize) + { + case 1: + nRet = HWREGB(nAddr); + break; + + case 2: + nRet = HWREGH(nAddr); + break; + + case 4: + default: + nRet = HWREG(nAddr); + break; } + HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0) = 1; + // Restore interrupt enable - if (bIrqEnabled) { + if (bIrqEnabled) + { CPUcpsie(); } + return nRet; } @@ -206,7 +237,7 @@ AuxAdiDdiSafeRead(uint32_t nAddr, uint32_t nSize) static bool DDIBaseValid(uint32_t ui32Base) { - return(ui32Base == AUX_DDI0_OSC_BASE); + return (ui32Base == AUX_DDI0_OSC_BASE); } #endif @@ -516,27 +547,27 @@ extern uint16_t DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg, // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_DDI32RegWrite - #undef DDI32RegWrite - #define DDI32RegWrite ROM_DDI32RegWrite - #endif - #ifdef ROM_DDI16BitWrite - #undef DDI16BitWrite - #define DDI16BitWrite ROM_DDI16BitWrite - #endif - #ifdef ROM_DDI16BitfieldWrite - #undef DDI16BitfieldWrite - #define DDI16BitfieldWrite ROM_DDI16BitfieldWrite - #endif - #ifdef ROM_DDI16BitRead - #undef DDI16BitRead - #define DDI16BitRead ROM_DDI16BitRead - #endif - #ifdef ROM_DDI16BitfieldRead - #undef DDI16BitfieldRead - #define DDI16BitfieldRead ROM_DDI16BitfieldRead - #endif +#include "../driverlib/rom.h" +#ifdef ROM_DDI32RegWrite +#undef DDI32RegWrite +#define DDI32RegWrite ROM_DDI32RegWrite +#endif +#ifdef ROM_DDI16BitWrite +#undef DDI16BitWrite +#define DDI16BitWrite ROM_DDI16BitWrite +#endif +#ifdef ROM_DDI16BitfieldWrite +#undef DDI16BitfieldWrite +#define DDI16BitfieldWrite ROM_DDI16BitfieldWrite +#endif +#ifdef ROM_DDI16BitRead +#undef DDI16BitRead +#define DDI16BitRead ROM_DDI16BitRead +#endif +#ifdef ROM_DDI16BitfieldRead +#undef DDI16BitfieldRead +#define DDI16BitfieldRead ROM_DDI16BitfieldRead +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/debug.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/debug.h index 704fd5c7..cbd45279 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/debug.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/debug.h @@ -53,7 +53,7 @@ //! Function stub for allowing compile with DRIVERLIB_DEBUG flag asserted. // //***************************************************************************** -extern void __error__(char *pcFilename, uint32_t ui32Line); +extern void __error__(char* pcFilename, uint32_t ui32Line); //***************************************************************************** // @@ -63,11 +63,11 @@ extern void __error__(char *pcFilename, uint32_t ui32Line); //***************************************************************************** #ifdef DRIVERLIB_DEBUG #define ASSERT(expr) { \ - if(!(expr)) \ - { \ - __error__(__FILE__, __LINE__); \ - } \ - } + if(!(expr)) \ + { \ + __error__(__FILE__, __LINE__); \ + } \ + } #else #define ASSERT(expr) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/event.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/event.h index 2f849027..f8f0c215 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/event.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/event.h @@ -244,7 +244,7 @@ EventSwEventGet(uint32_t ui32SwEvent) ASSERT( ui32SwEvent <= 3 ); // Each software event is byte accessible - return( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent)); + return ( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent)); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/flash.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/flash.h index 75b7da4d..d9c3aadb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/flash.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/flash.h @@ -84,15 +84,15 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define FlashPowerModeSet NOROM_FlashPowerModeSet - #define FlashPowerModeGet NOROM_FlashPowerModeGet - #define FlashProtectionSet NOROM_FlashProtectionSet - #define FlashProtectionGet NOROM_FlashProtectionGet - #define FlashProtectionSave NOROM_FlashProtectionSave - #define FlashSectorErase NOROM_FlashSectorErase - #define FlashProgram NOROM_FlashProgram - #define FlashEfuseReadRow NOROM_FlashEfuseReadRow - #define FlashDisableSectorsForWrite NOROM_FlashDisableSectorsForWrite +#define FlashPowerModeSet NOROM_FlashPowerModeSet +#define FlashPowerModeGet NOROM_FlashPowerModeGet +#define FlashProtectionSet NOROM_FlashProtectionSet +#define FlashProtectionGet NOROM_FlashProtectionGet +#define FlashProtectionSave NOROM_FlashProtectionSave +#define FlashSectorErase NOROM_FlashSectorErase +#define FlashProgram NOROM_FlashProgram +#define FlashEfuseReadRow NOROM_FlashEfuseReadRow +#define FlashDisableSectorsForWrite NOROM_FlashDisableSectorsForWrite #endif //***************************************************************************** @@ -104,7 +104,7 @@ extern "C" #define FAPI_STATUS_FSM_BUSY 0x00000001 // FSM is Busy #define FAPI_STATUS_FSM_READY 0x00000002 // FSM is Ready #define FAPI_STATUS_INCORRECT_DATABUFFER_LENGTH \ - 0x00000003 // Incorrect parameter value + 0x00000003 // Incorrect parameter value #define FAPI_STATUS_FSM_ERROR 0x00000004 // Operation failed //***************************************************************************** @@ -124,7 +124,7 @@ extern "C" #define FLASH_PWR_ACTIVE_MODE 0x00000000 #define FLASH_PWR_OFF_MODE 0x00000001 #define FLASH_PWR_DEEP_STDBY_MODE \ - 0x00000002 + 0x00000002 //***************************************************************************** // @@ -133,7 +133,7 @@ extern "C" //***************************************************************************** #define FLASH_NO_PROTECT 0x00000000 // Sector not protected #define FLASH_WRITE_PROTECT 0x00000001 // Sector erase and program - // protected +// protected //***************************************************************************** // @@ -255,7 +255,7 @@ FlashSectorSizeGet(void) FLASH_FCFG_B0_SSIZE0_B0_SECT_SIZE_S; // Return flash sector size in number of bytes. - return(ui32SectorSizeInKbyte * 1024); + return (ui32SectorSizeInKbyte * 1024); } //***************************************************************************** @@ -278,7 +278,7 @@ FlashSizeGet(void) FLASH_FLASH_SIZE_SECTORS_S; // Return flash size in number of bytes - return(ui32NoOfSectors * FlashSectorSizeGet()); + return (ui32NoOfSectors * FlashSectorSizeGet()); } //***************************************************************************** @@ -419,13 +419,13 @@ extern uint32_t FlashProtectionSave(uint32_t ui32SectorAddress); __STATIC_INLINE uint32_t FlashCheckFsmForError(void) { - if(HWREG(FLASH_BASE + FLASH_O_FMSTAT) & FLASH_FMSTAT_CSTAT) + if (HWREG(FLASH_BASE + FLASH_O_FMSTAT) & FLASH_FMSTAT_CSTAT) { - return(FAPI_STATUS_FSM_ERROR); + return (FAPI_STATUS_FSM_ERROR); } else { - return(FAPI_STATUS_SUCCESS); + return (FAPI_STATUS_SUCCESS); } } @@ -449,13 +449,13 @@ FlashCheckFsmForError(void) __STATIC_INLINE uint32_t FlashCheckFsmForReady(void) { - if(HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_BUSY) + if (HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_BUSY) { - return(FAPI_STATUS_FSM_BUSY); + return (FAPI_STATUS_FSM_BUSY); } else { - return(FAPI_STATUS_FSM_READY); + return (FAPI_STATUS_FSM_READY); } } @@ -577,18 +577,18 @@ FlashIntStatus(void) ui32IntFlags = 0; // Check if FSM_DONE interrupt status is set. - if(HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_FSM_DONE) + if (HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_FSM_DONE) { ui32IntFlags = FLASH_INT_FSM_DONE; } // Check if RVF_INT interrupt status is set. - if(HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_RVF_INT) + if (HWREG(FLASH_BASE + FLASH_O_FEDACSTAT) & FLASH_FEDACSTAT_RVF_INT) { ui32IntFlags |= FLASH_INT_RV; } - return(ui32IntFlags); + return (ui32IntFlags); } //***************************************************************************** @@ -629,12 +629,12 @@ FlashIntClear(uint32_t ui32IntFlags) ui32TempVal = 0; - if(ui32IntFlags & FLASH_INT_FSM_DONE) + if (ui32IntFlags & FLASH_INT_FSM_DONE) { ui32TempVal = FLASH_FEDACSTAT_FSM_DONE; } - if(ui32IntFlags & FLASH_INT_RV) + if (ui32IntFlags & FLASH_INT_RV) { ui32TempVal |= FLASH_FEDACSTAT_RVF_INT; } @@ -711,7 +711,7 @@ extern uint32_t FlashSectorErase(uint32_t ui32SectorAddress); //! - \ref FAPI_STATUS_FSM_ERROR : A programming error is encountered. // //***************************************************************************** -extern uint32_t FlashProgram(uint8_t *pui8DataBuffer, +extern uint32_t FlashProgram(uint8_t* pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count); //***************************************************************************** @@ -730,7 +730,7 @@ extern uint32_t FlashProgram(uint8_t *pui8DataBuffer, //! - \c true : Error status // //***************************************************************************** -extern bool FlashEfuseReadRow(uint32_t *pui32EfuseData, +extern bool FlashEfuseReadRow(uint32_t* pui32EfuseData, uint32_t ui32RowAddress); //***************************************************************************** @@ -758,43 +758,43 @@ extern void FlashDisableSectorsForWrite(void); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_FlashPowerModeSet - #undef FlashPowerModeSet - #define FlashPowerModeSet ROM_FlashPowerModeSet - #endif - #ifdef ROM_FlashPowerModeGet - #undef FlashPowerModeGet - #define FlashPowerModeGet ROM_FlashPowerModeGet - #endif - #ifdef ROM_FlashProtectionSet - #undef FlashProtectionSet - #define FlashProtectionSet ROM_FlashProtectionSet - #endif - #ifdef ROM_FlashProtectionGet - #undef FlashProtectionGet - #define FlashProtectionGet ROM_FlashProtectionGet - #endif - #ifdef ROM_FlashProtectionSave - #undef FlashProtectionSave - #define FlashProtectionSave ROM_FlashProtectionSave - #endif - #ifdef ROM_FlashSectorErase - #undef FlashSectorErase - #define FlashSectorErase ROM_FlashSectorErase - #endif - #ifdef ROM_FlashProgram - #undef FlashProgram - #define FlashProgram ROM_FlashProgram - #endif - #ifdef ROM_FlashEfuseReadRow - #undef FlashEfuseReadRow - #define FlashEfuseReadRow ROM_FlashEfuseReadRow - #endif - #ifdef ROM_FlashDisableSectorsForWrite - #undef FlashDisableSectorsForWrite - #define FlashDisableSectorsForWrite ROM_FlashDisableSectorsForWrite - #endif +#include "../driverlib/rom.h" +#ifdef ROM_FlashPowerModeSet +#undef FlashPowerModeSet +#define FlashPowerModeSet ROM_FlashPowerModeSet +#endif +#ifdef ROM_FlashPowerModeGet +#undef FlashPowerModeGet +#define FlashPowerModeGet ROM_FlashPowerModeGet +#endif +#ifdef ROM_FlashProtectionSet +#undef FlashProtectionSet +#define FlashProtectionSet ROM_FlashProtectionSet +#endif +#ifdef ROM_FlashProtectionGet +#undef FlashProtectionGet +#define FlashProtectionGet ROM_FlashProtectionGet +#endif +#ifdef ROM_FlashProtectionSave +#undef FlashProtectionSave +#define FlashProtectionSave ROM_FlashProtectionSave +#endif +#ifdef ROM_FlashSectorErase +#undef FlashSectorErase +#define FlashSectorErase ROM_FlashSectorErase +#endif +#ifdef ROM_FlashProgram +#undef FlashProgram +#define FlashProgram ROM_FlashProgram +#endif +#ifdef ROM_FlashEfuseReadRow +#undef FlashEfuseReadRow +#define FlashEfuseReadRow ROM_FlashEfuseReadRow +#endif +#ifdef ROM_FlashDisableSectorsForWrite +#undef FlashDisableSectorsForWrite +#define FlashDisableSectorsForWrite ROM_FlashDisableSectorsForWrite +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/gpio.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/gpio.h index 9a4bf16a..ffc16ef0 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/gpio.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/gpio.h @@ -79,8 +79,8 @@ dioNumberLegal( uint32_t dioNumber ) { uint32_t ioCount = (( HWREG( FCFG1_BASE + FCFG1_O_IOCONF ) & - FCFG1_IOCONF_GPIO_CNT_M ) >> - FCFG1_IOCONF_GPIO_CNT_S ) ; + FCFG1_IOCONF_GPIO_CNT_M ) >> + FCFG1_IOCONF_GPIO_CNT_S ) ; // CC13x2 + CC26x2 if ( ChipInfo_ChipFamilyIs_CC13x2_CC26x2() ) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2c.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2c.h index d1e29698..c4ece780 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2c.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2c.h @@ -84,10 +84,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define I2CMasterInitExpClk NOROM_I2CMasterInitExpClk - #define I2CMasterErr NOROM_I2CMasterErr - #define I2CIntRegister NOROM_I2CIntRegister - #define I2CIntUnregister NOROM_I2CIntUnregister +#define I2CMasterInitExpClk NOROM_I2CMasterInitExpClk +#define I2CMasterErr NOROM_I2CMasterErr +#define I2CIntRegister NOROM_I2CIntRegister +#define I2CIntUnregister NOROM_I2CIntUnregister #endif //***************************************************************************** @@ -96,25 +96,25 @@ extern "C" // //***************************************************************************** #define I2C_MASTER_CMD_SINGLE_SEND \ - 0x00000007 + 0x00000007 #define I2C_MASTER_CMD_SINGLE_RECEIVE \ - 0x00000007 + 0x00000007 #define I2C_MASTER_CMD_BURST_SEND_START \ - 0x00000003 + 0x00000003 #define I2C_MASTER_CMD_BURST_SEND_CONT \ - 0x00000001 + 0x00000001 #define I2C_MASTER_CMD_BURST_SEND_FINISH \ - 0x00000005 + 0x00000005 #define I2C_MASTER_CMD_BURST_SEND_ERROR_STOP \ - 0x00000004 + 0x00000004 #define I2C_MASTER_CMD_BURST_RECEIVE_START \ - 0x0000000b + 0x0000000b #define I2C_MASTER_CMD_BURST_RECEIVE_CONT \ - 0x00000009 + 0x00000009 #define I2C_MASTER_CMD_BURST_RECEIVE_FINISH \ - 0x00000005 + 0x00000005 #define I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP \ - 0x00000004 + 0x00000004 //***************************************************************************** // @@ -169,7 +169,7 @@ extern "C" static bool I2CBaseValid(uint32_t ui32Base) { - return(ui32Base == I2C0_BASE); + return (ui32Base == I2C0_BASE); } #endif @@ -226,7 +226,7 @@ I2CMasterControl(uint32_t ui32Base, uint32_t ui32Cmd) // Check the arguments. ASSERT(I2CBaseValid(ui32Base)); ASSERT((ui32Cmd == I2C_MASTER_CMD_SINGLE_SEND) || - // (ui32Cmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || -> Equal to SINGLE_SEND + // (ui32Cmd == I2C_MASTER_CMD_SINGLE_RECEIVE) || -> Equal to SINGLE_SEND (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_START) || (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_CONT) || (ui32Cmd == I2C_MASTER_CMD_BURST_SEND_FINISH) || @@ -344,13 +344,13 @@ I2CMasterBusy(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the busy status. - if(HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSY) + if (HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSY) { - return(true); + return (true); } else { - return(false); + return (false); } } @@ -376,13 +376,13 @@ I2CMasterBusBusy(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the bus busy status. - if(HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSBSY) + if (HWREG(I2C0_BASE + I2C_O_MSTAT) & I2C_MSTAT_BUSBSY) { - return(true); + return (true); } else { - return(false); + return (false); } } @@ -405,7 +405,7 @@ I2CMasterDataGet(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Read a byte. - return(HWREG(I2C0_BASE + I2C_O_MDR)); + return (HWREG(I2C0_BASE + I2C_O_MDR)); } //***************************************************************************** @@ -554,13 +554,13 @@ I2CMasterIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return((HWREG(I2C0_BASE + I2C_O_MMIS)) ? true : false); + return ((HWREG(I2C0_BASE + I2C_O_MMIS)) ? true : false); } else { - return((HWREG(I2C0_BASE + I2C_O_MRIS)) ? true : false); + return ((HWREG(I2C0_BASE + I2C_O_MRIS)) ? true : false); } } @@ -689,7 +689,7 @@ I2CSlaveStatus(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Return the slave status. - return(HWREG(I2C0_BASE + I2C_O_SSTAT)); + return (HWREG(I2C0_BASE + I2C_O_SSTAT)); } //***************************************************************************** @@ -711,7 +711,7 @@ I2CSlaveDataGet(uint32_t ui32Base) ASSERT(I2CBaseValid(ui32Base)); // Read a byte. - return(HWREG(I2C0_BASE + I2C_O_SDR)); + return (HWREG(I2C0_BASE + I2C_O_SDR)); } //***************************************************************************** @@ -874,13 +874,13 @@ I2CSlaveIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(I2C0_BASE + I2C_O_SMIS)); + return (HWREG(I2C0_BASE + I2C_O_SMIS)); } else { - return(HWREG(I2C0_BASE + I2C_O_SRIS)); + return (HWREG(I2C0_BASE + I2C_O_SRIS)); } } @@ -935,23 +935,23 @@ extern void I2CIntUnregister(uint32_t ui32Base); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_I2CMasterInitExpClk - #undef I2CMasterInitExpClk - #define I2CMasterInitExpClk ROM_I2CMasterInitExpClk - #endif - #ifdef ROM_I2CMasterErr - #undef I2CMasterErr - #define I2CMasterErr ROM_I2CMasterErr - #endif - #ifdef ROM_I2CIntRegister - #undef I2CIntRegister - #define I2CIntRegister ROM_I2CIntRegister - #endif - #ifdef ROM_I2CIntUnregister - #undef I2CIntUnregister - #define I2CIntUnregister ROM_I2CIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_I2CMasterInitExpClk +#undef I2CMasterInitExpClk +#define I2CMasterInitExpClk ROM_I2CMasterInitExpClk +#endif +#ifdef ROM_I2CMasterErr +#undef I2CMasterErr +#define I2CMasterErr ROM_I2CMasterErr +#endif +#ifdef ROM_I2CIntRegister +#undef I2CIntRegister +#define I2CIntRegister ROM_I2CIntRegister +#endif +#ifdef ROM_I2CIntUnregister +#undef I2CIntUnregister +#define I2CIntUnregister ROM_I2CIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2s.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2s.h index ab50cd61..116b252e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2s.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/i2s.h @@ -82,14 +82,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define I2SEnable NOROM_I2SEnable - #define I2SAudioFormatConfigure NOROM_I2SAudioFormatConfigure - #define I2SChannelConfigure NOROM_I2SChannelConfigure - #define I2SBufferConfig NOROM_I2SBufferConfig - #define I2SPointerUpdate NOROM_I2SPointerUpdate - #define I2SPointerSet NOROM_I2SPointerSet - #define I2SSampleStampConfigure NOROM_I2SSampleStampConfigure - #define I2SSampleStampGet NOROM_I2SSampleStampGet +#define I2SEnable NOROM_I2SEnable +#define I2SAudioFormatConfigure NOROM_I2SAudioFormatConfigure +#define I2SChannelConfigure NOROM_I2SChannelConfigure +#define I2SBufferConfig NOROM_I2SBufferConfig +#define I2SPointerUpdate NOROM_I2SPointerUpdate +#define I2SPointerSet NOROM_I2SPointerSet +#define I2SSampleStampConfigure NOROM_I2SSampleStampConfigure +#define I2SSampleStampGet NOROM_I2SSampleStampGet #endif //***************************************************************************** @@ -142,7 +142,7 @@ typedef struct // //***************************************************************************** #ifndef DEPRECATED -extern I2SControlTable *g_pControlTable; +extern I2SControlTable* g_pControlTable; #endif //***************************************************************************** @@ -233,7 +233,7 @@ extern I2SControlTable *g_pControlTable; #define I2S_STMP1 0x00000002 // Sample stamp counter channel 1 #endif #define I2S_STMP_SATURATION 0x0000FFFF // The saturation value used when - // calculating the sample stamp +// calculating the sample stamp //***************************************************************************** // @@ -272,7 +272,7 @@ extern I2SControlTable *g_pControlTable; static bool I2SBaseValid(uint32_t ui32Base) { - return(ui32Base == I2S0_BASE); + return (ui32Base == I2S0_BASE); } #endif @@ -459,8 +459,8 @@ I2SClockConfigure(uint32_t ui32Base, uint32_t ui32ClkConfig) // Setup register WCLK Source. HWREG(I2S0_BASE + I2S_O_AIFWCLKSRC) = ui32ClkConfig & - (I2S_AIFWCLKSRC_WCLK_INV_M | - I2S_AIFWCLKSRC_WCLK_SRC_M); + (I2S_AIFWCLKSRC_WCLK_INV_M | + I2S_AIFWCLKSRC_WCLK_SRC_M); } #endif @@ -550,7 +550,7 @@ extern void I2SPointerUpdate(uint32_t ui32Base, bool bInput); // //**************************************************************************** #ifndef DEPRECATED -extern void I2SPointerSet(uint32_t ui32Base, bool bInput, void * pNextPointer); +extern void I2SPointerSet(uint32_t ui32Base, bool bInput, void* pNextPointer); #endif //***************************************************************************** @@ -742,14 +742,14 @@ I2SIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(I2S0_BASE + I2S_O_IRQFLAGS); - return(ui32Mask & HWREG(I2S0_BASE + I2S_O_IRQMASK)); + return (ui32Mask & HWREG(I2S0_BASE + I2S_O_IRQMASK)); } else { - return(HWREG(I2S0_BASE + I2S_O_IRQFLAGS)); + return (HWREG(I2S0_BASE + I2S_O_IRQFLAGS)); } } @@ -969,11 +969,11 @@ I2SFormatConfigure(uint32_t ui32Base, // Setup register AIFFMTCFG Source. HWREGH(I2S0_BASE + I2S_O_AIFFMTCFG) = - (ui8iDataDelay << I2S_AIFFMTCFG_DATA_DELAY_S) | - (ui8iMemory24Bits << I2S_AIFFMTCFG_MEM_LEN_24_S) | - (ui8iSamplingEdge << I2S_AIFFMTCFG_SMPL_EDGE_S ) | - (boolDualPhase << I2S_AIFFMTCFG_DUAL_PHASE_S) | - (ui8BitsPerSample << I2S_AIFFMTCFG_WORD_LEN_S ); + (ui8iDataDelay << I2S_AIFFMTCFG_DATA_DELAY_S) | + (ui8iMemory24Bits << I2S_AIFFMTCFG_MEM_LEN_24_S) | + (ui8iSamplingEdge << I2S_AIFFMTCFG_SMPL_EDGE_S ) | + (boolDualPhase << I2S_AIFFMTCFG_DUAL_PHASE_S) | + (ui8BitsPerSample << I2S_AIFFMTCFG_WORD_LEN_S ); // Number of WCLK periods before the first read / write HWREGH(I2S0_BASE + I2S_O_STMPWPER) = ui16transmissionDelay; @@ -1071,8 +1071,8 @@ I2SWclkConfigure(uint32_t ui32Base, // Setup register WCLK Source. HWREGB(I2S0_BASE + I2S_O_AIFWCLKSRC) = - ((ui8ClkSource << I2S_AIFWCLKSRC_WCLK_SRC_S) | - (boolWCLKInvert << I2S_AIFWCLKSRC_WCLK_INV_S )); + ((ui8ClkSource << I2S_AIFWCLKSRC_WCLK_SRC_S) | + (boolWCLKInvert << I2S_AIFWCLKSRC_WCLK_INV_S )); } //**************************************************************************** @@ -1304,39 +1304,39 @@ I2SWclkCounterReset(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_I2SEnable - #undef I2SEnable - #define I2SEnable ROM_I2SEnable - #endif - #ifdef ROM_I2SAudioFormatConfigure - #undef I2SAudioFormatConfigure - #define I2SAudioFormatConfigure ROM_I2SAudioFormatConfigure - #endif - #ifdef ROM_I2SChannelConfigure - #undef I2SChannelConfigure - #define I2SChannelConfigure ROM_I2SChannelConfigure - #endif - #ifdef ROM_I2SBufferConfig - #undef I2SBufferConfig - #define I2SBufferConfig ROM_I2SBufferConfig - #endif - #ifdef ROM_I2SPointerUpdate - #undef I2SPointerUpdate - #define I2SPointerUpdate ROM_I2SPointerUpdate - #endif - #ifdef ROM_I2SPointerSet - #undef I2SPointerSet - #define I2SPointerSet ROM_I2SPointerSet - #endif - #ifdef ROM_I2SSampleStampConfigure - #undef I2SSampleStampConfigure - #define I2SSampleStampConfigure ROM_I2SSampleStampConfigure - #endif - #ifdef ROM_I2SSampleStampGet - #undef I2SSampleStampGet - #define I2SSampleStampGet ROM_I2SSampleStampGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_I2SEnable +#undef I2SEnable +#define I2SEnable ROM_I2SEnable +#endif +#ifdef ROM_I2SAudioFormatConfigure +#undef I2SAudioFormatConfigure +#define I2SAudioFormatConfigure ROM_I2SAudioFormatConfigure +#endif +#ifdef ROM_I2SChannelConfigure +#undef I2SChannelConfigure +#define I2SChannelConfigure ROM_I2SChannelConfigure +#endif +#ifdef ROM_I2SBufferConfig +#undef I2SBufferConfig +#define I2SBufferConfig ROM_I2SBufferConfig +#endif +#ifdef ROM_I2SPointerUpdate +#undef I2SPointerUpdate +#define I2SPointerUpdate ROM_I2SPointerUpdate +#endif +#ifdef ROM_I2SPointerSet +#undef I2SPointerSet +#define I2SPointerSet ROM_I2SPointerSet +#endif +#ifdef ROM_I2SSampleStampConfigure +#undef I2SSampleStampConfigure +#define I2SSampleStampConfigure ROM_I2SSampleStampConfigure +#endif +#ifdef ROM_I2SSampleStampGet +#undef I2SSampleStampGet +#define I2SSampleStampGet ROM_I2SSampleStampGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/interrupt.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/interrupt.h index 3cb39699..c297aebe 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/interrupt.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/interrupt.h @@ -81,17 +81,17 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define IntRegister NOROM_IntRegister - #define IntUnregister NOROM_IntUnregister - #define IntPriorityGroupingSet NOROM_IntPriorityGroupingSet - #define IntPriorityGroupingGet NOROM_IntPriorityGroupingGet - #define IntPrioritySet NOROM_IntPrioritySet - #define IntPriorityGet NOROM_IntPriorityGet - #define IntEnable NOROM_IntEnable - #define IntDisable NOROM_IntDisable - #define IntPendSet NOROM_IntPendSet - #define IntPendGet NOROM_IntPendGet - #define IntPendClear NOROM_IntPendClear +#define IntRegister NOROM_IntRegister +#define IntUnregister NOROM_IntUnregister +#define IntPriorityGroupingSet NOROM_IntPriorityGroupingSet +#define IntPriorityGroupingGet NOROM_IntPriorityGroupingGet +#define IntPrioritySet NOROM_IntPrioritySet +#define IntPriorityGet NOROM_IntPriorityGet +#define IntEnable NOROM_IntEnable +#define IntDisable NOROM_IntDisable +#define IntPendSet NOROM_IntPendSet +#define IntPendGet NOROM_IntPendGet +#define IntPendClear NOROM_IntPendClear #endif //***************************************************************************** @@ -549,7 +549,7 @@ __STATIC_INLINE bool IntMasterEnable(void) { // Enable CPU interrupts. - return(CPUcpsie()); + return (CPUcpsie()); } //***************************************************************************** @@ -569,7 +569,7 @@ __STATIC_INLINE bool IntMasterDisable(void) { // Disable CPU interrupts. - return(CPUcpsid()); + return (CPUcpsid()); } //***************************************************************************** @@ -625,7 +625,7 @@ IntPriorityMaskSet(uint32_t ui32PriorityMask) __STATIC_INLINE uint32_t IntPriorityMaskGet(void) { - return(CPUbasepriGet()); + return (CPUbasepriGet()); } //***************************************************************************** @@ -635,51 +635,51 @@ IntPriorityMaskGet(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_IntRegister - #undef IntRegister - #define IntRegister ROM_IntRegister - #endif - #ifdef ROM_IntUnregister - #undef IntUnregister - #define IntUnregister ROM_IntUnregister - #endif - #ifdef ROM_IntPriorityGroupingSet - #undef IntPriorityGroupingSet - #define IntPriorityGroupingSet ROM_IntPriorityGroupingSet - #endif - #ifdef ROM_IntPriorityGroupingGet - #undef IntPriorityGroupingGet - #define IntPriorityGroupingGet ROM_IntPriorityGroupingGet - #endif - #ifdef ROM_IntPrioritySet - #undef IntPrioritySet - #define IntPrioritySet ROM_IntPrioritySet - #endif - #ifdef ROM_IntPriorityGet - #undef IntPriorityGet - #define IntPriorityGet ROM_IntPriorityGet - #endif - #ifdef ROM_IntEnable - #undef IntEnable - #define IntEnable ROM_IntEnable - #endif - #ifdef ROM_IntDisable - #undef IntDisable - #define IntDisable ROM_IntDisable - #endif - #ifdef ROM_IntPendSet - #undef IntPendSet - #define IntPendSet ROM_IntPendSet - #endif - #ifdef ROM_IntPendGet - #undef IntPendGet - #define IntPendGet ROM_IntPendGet - #endif - #ifdef ROM_IntPendClear - #undef IntPendClear - #define IntPendClear ROM_IntPendClear - #endif +#include "../driverlib/rom.h" +#ifdef ROM_IntRegister +#undef IntRegister +#define IntRegister ROM_IntRegister +#endif +#ifdef ROM_IntUnregister +#undef IntUnregister +#define IntUnregister ROM_IntUnregister +#endif +#ifdef ROM_IntPriorityGroupingSet +#undef IntPriorityGroupingSet +#define IntPriorityGroupingSet ROM_IntPriorityGroupingSet +#endif +#ifdef ROM_IntPriorityGroupingGet +#undef IntPriorityGroupingGet +#define IntPriorityGroupingGet ROM_IntPriorityGroupingGet +#endif +#ifdef ROM_IntPrioritySet +#undef IntPrioritySet +#define IntPrioritySet ROM_IntPrioritySet +#endif +#ifdef ROM_IntPriorityGet +#undef IntPriorityGet +#define IntPriorityGet ROM_IntPriorityGet +#endif +#ifdef ROM_IntEnable +#undef IntEnable +#define IntEnable ROM_IntEnable +#endif +#ifdef ROM_IntDisable +#undef IntDisable +#define IntDisable ROM_IntDisable +#endif +#ifdef ROM_IntPendSet +#undef IntPendSet +#define IntPendSet ROM_IntPendSet +#endif +#ifdef ROM_IntPendGet +#undef IntPendGet +#define IntPendGet ROM_IntPendGet +#endif +#ifdef ROM_IntPendClear +#undef IntPendClear +#define IntPendClear ROM_IntPendClear +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ioc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ioc.h index 1b852a81..b6124102 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ioc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ioc.h @@ -83,26 +83,26 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define IOCPortConfigureSet NOROM_IOCPortConfigureSet - #define IOCPortConfigureGet NOROM_IOCPortConfigureGet - #define IOCIOShutdownSet NOROM_IOCIOShutdownSet - #define IOCIOModeSet NOROM_IOCIOModeSet - #define IOCIOIntSet NOROM_IOCIOIntSet - #define IOCIOPortPullSet NOROM_IOCIOPortPullSet - #define IOCIOHystSet NOROM_IOCIOHystSet - #define IOCIOInputSet NOROM_IOCIOInputSet - #define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet - #define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet - #define IOCIOPortIdSet NOROM_IOCIOPortIdSet - #define IOCIntEnable NOROM_IOCIntEnable - #define IOCIntDisable NOROM_IOCIntDisable - #define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput - #define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput - #define IOCPinTypeUart NOROM_IOCPinTypeUart - #define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster - #define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave - #define IOCPinTypeI2c NOROM_IOCPinTypeI2c - #define IOCPinTypeAux NOROM_IOCPinTypeAux +#define IOCPortConfigureSet NOROM_IOCPortConfigureSet +#define IOCPortConfigureGet NOROM_IOCPortConfigureGet +#define IOCIOShutdownSet NOROM_IOCIOShutdownSet +#define IOCIOModeSet NOROM_IOCIOModeSet +#define IOCIOIntSet NOROM_IOCIOIntSet +#define IOCIOPortPullSet NOROM_IOCIOPortPullSet +#define IOCIOHystSet NOROM_IOCIOHystSet +#define IOCIOInputSet NOROM_IOCIOInputSet +#define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet +#define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet +#define IOCIOPortIdSet NOROM_IOCIOPortIdSet +#define IOCIntEnable NOROM_IOCIntEnable +#define IOCIntDisable NOROM_IOCIntDisable +#define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput +#define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput +#define IOCPinTypeUart NOROM_IOCPinTypeUart +#define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster +#define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave +#define IOCPinTypeI2c NOROM_IOCPinTypeI2c +#define IOCPinTypeAux NOROM_IOCPinTypeAux #endif //***************************************************************************** @@ -237,15 +237,15 @@ extern "C" #define IOC_IOMODE_NORMAL 0x00000000 // Normal Input/Output #define IOC_IOMODE_INV 0x01000000 // Inverted Input/Output #define IOC_IOMODE_OPEN_DRAIN_NORMAL \ - 0x04000000 // Open Drain, Normal Input/Output + 0x04000000 // Open Drain, Normal Input/Output #define IOC_IOMODE_OPEN_DRAIN_INV \ - 0x05000000 // Open Drain, Inverted - // Input/Output + 0x05000000 // Open Drain, Inverted +// Input/Output #define IOC_IOMODE_OPEN_SRC_NORMAL \ - 0x06000000 // Open Source, Normal Input/Output + 0x06000000 // Open Source, Normal Input/Output #define IOC_IOMODE_OPEN_SRC_INV \ - 0x07000000 // Open Source, Inverted - // Input/Output + 0x07000000 // Open Source, Inverted +// Input/Output //***************************************************************************** // @@ -281,13 +281,13 @@ extern "C" #define IOC_CURRENT_8MA 0x00000800 // 4 or 8mA drive strength #define IOC_STRENGTH_AUTO 0x00000000 // Automatic Drive Strength - // (2/4/8 mA @ VVDS) +// (2/4/8 mA @ VVDS) #define IOC_STRENGTH_MAX 0x00000300 // Maximum Drive Strength - // (2/4/8 mA @ 1.8V) +// (2/4/8 mA @ 1.8V) #define IOC_STRENGTH_MED 0x00000200 // Medium Drive Strength - // (2/4/8 mA @ 2.5V) +// (2/4/8 mA @ 2.5V) #define IOC_STRENGTH_MIN 0x00000100 // Minimum Drive Strength - // (2/4/8 mA @ 3.3V) +// (2/4/8 mA @ 3.3V) //***************************************************************************** // @@ -1051,87 +1051,87 @@ extern void IOCPinTypeAux(uint32_t ui32IOId); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_IOCPortConfigureSet - #undef IOCPortConfigureSet - #define IOCPortConfigureSet ROM_IOCPortConfigureSet - #endif - #ifdef ROM_IOCPortConfigureGet - #undef IOCPortConfigureGet - #define IOCPortConfigureGet ROM_IOCPortConfigureGet - #endif - #ifdef ROM_IOCIOShutdownSet - #undef IOCIOShutdownSet - #define IOCIOShutdownSet ROM_IOCIOShutdownSet - #endif - #ifdef ROM_IOCIOModeSet - #undef IOCIOModeSet - #define IOCIOModeSet ROM_IOCIOModeSet - #endif - #ifdef ROM_IOCIOIntSet - #undef IOCIOIntSet - #define IOCIOIntSet ROM_IOCIOIntSet - #endif - #ifdef ROM_IOCIOPortPullSet - #undef IOCIOPortPullSet - #define IOCIOPortPullSet ROM_IOCIOPortPullSet - #endif - #ifdef ROM_IOCIOHystSet - #undef IOCIOHystSet - #define IOCIOHystSet ROM_IOCIOHystSet - #endif - #ifdef ROM_IOCIOInputSet - #undef IOCIOInputSet - #define IOCIOInputSet ROM_IOCIOInputSet - #endif - #ifdef ROM_IOCIOSlewCtrlSet - #undef IOCIOSlewCtrlSet - #define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet - #endif - #ifdef ROM_IOCIODrvStrengthSet - #undef IOCIODrvStrengthSet - #define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet - #endif - #ifdef ROM_IOCIOPortIdSet - #undef IOCIOPortIdSet - #define IOCIOPortIdSet ROM_IOCIOPortIdSet - #endif - #ifdef ROM_IOCIntEnable - #undef IOCIntEnable - #define IOCIntEnable ROM_IOCIntEnable - #endif - #ifdef ROM_IOCIntDisable - #undef IOCIntDisable - #define IOCIntDisable ROM_IOCIntDisable - #endif - #ifdef ROM_IOCPinTypeGpioInput - #undef IOCPinTypeGpioInput - #define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput - #endif - #ifdef ROM_IOCPinTypeGpioOutput - #undef IOCPinTypeGpioOutput - #define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput - #endif - #ifdef ROM_IOCPinTypeUart - #undef IOCPinTypeUart - #define IOCPinTypeUart ROM_IOCPinTypeUart - #endif - #ifdef ROM_IOCPinTypeSsiMaster - #undef IOCPinTypeSsiMaster - #define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster - #endif - #ifdef ROM_IOCPinTypeSsiSlave - #undef IOCPinTypeSsiSlave - #define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave - #endif - #ifdef ROM_IOCPinTypeI2c - #undef IOCPinTypeI2c - #define IOCPinTypeI2c ROM_IOCPinTypeI2c - #endif - #ifdef ROM_IOCPinTypeAux - #undef IOCPinTypeAux - #define IOCPinTypeAux ROM_IOCPinTypeAux - #endif +#include "../driverlib/rom.h" +#ifdef ROM_IOCPortConfigureSet +#undef IOCPortConfigureSet +#define IOCPortConfigureSet ROM_IOCPortConfigureSet +#endif +#ifdef ROM_IOCPortConfigureGet +#undef IOCPortConfigureGet +#define IOCPortConfigureGet ROM_IOCPortConfigureGet +#endif +#ifdef ROM_IOCIOShutdownSet +#undef IOCIOShutdownSet +#define IOCIOShutdownSet ROM_IOCIOShutdownSet +#endif +#ifdef ROM_IOCIOModeSet +#undef IOCIOModeSet +#define IOCIOModeSet ROM_IOCIOModeSet +#endif +#ifdef ROM_IOCIOIntSet +#undef IOCIOIntSet +#define IOCIOIntSet ROM_IOCIOIntSet +#endif +#ifdef ROM_IOCIOPortPullSet +#undef IOCIOPortPullSet +#define IOCIOPortPullSet ROM_IOCIOPortPullSet +#endif +#ifdef ROM_IOCIOHystSet +#undef IOCIOHystSet +#define IOCIOHystSet ROM_IOCIOHystSet +#endif +#ifdef ROM_IOCIOInputSet +#undef IOCIOInputSet +#define IOCIOInputSet ROM_IOCIOInputSet +#endif +#ifdef ROM_IOCIOSlewCtrlSet +#undef IOCIOSlewCtrlSet +#define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet +#endif +#ifdef ROM_IOCIODrvStrengthSet +#undef IOCIODrvStrengthSet +#define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet +#endif +#ifdef ROM_IOCIOPortIdSet +#undef IOCIOPortIdSet +#define IOCIOPortIdSet ROM_IOCIOPortIdSet +#endif +#ifdef ROM_IOCIntEnable +#undef IOCIntEnable +#define IOCIntEnable ROM_IOCIntEnable +#endif +#ifdef ROM_IOCIntDisable +#undef IOCIntDisable +#define IOCIntDisable ROM_IOCIntDisable +#endif +#ifdef ROM_IOCPinTypeGpioInput +#undef IOCPinTypeGpioInput +#define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput +#endif +#ifdef ROM_IOCPinTypeGpioOutput +#undef IOCPinTypeGpioOutput +#define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput +#endif +#ifdef ROM_IOCPinTypeUart +#undef IOCPinTypeUart +#define IOCPinTypeUart ROM_IOCPinTypeUart +#endif +#ifdef ROM_IOCPinTypeSsiMaster +#undef IOCPinTypeSsiMaster +#define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster +#endif +#ifdef ROM_IOCPinTypeSsiSlave +#undef IOCPinTypeSsiSlave +#define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave +#endif +#ifdef ROM_IOCPinTypeI2c +#undef IOCPinTypeI2c +#define IOCPinTypeI2c ROM_IOCPinTypeI2c +#endif +#ifdef ROM_IOCPinTypeAux +#undef IOCPinTypeAux +#define IOCPinTypeAux ROM_IOCPinTypeAux +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/osc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/osc.h index 4281a961..3bfb71c4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/osc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/osc.h @@ -84,17 +84,17 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define OSCClockSourceSet NOROM_OSCClockSourceSet - #define OSCClockSourceGet NOROM_OSCClockSourceGet - #define OSCHF_GetStartupTime NOROM_OSCHF_GetStartupTime - #define OSCHF_TurnOnXosc NOROM_OSCHF_TurnOnXosc - #define OSCHF_AttemptToSwitchToXosc NOROM_OSCHF_AttemptToSwitchToXosc - #define OSCHF_SwitchToRcOscTurnOffXosc NOROM_OSCHF_SwitchToRcOscTurnOffXosc - #define OSCHF_DebugGetCrystalAmplitude NOROM_OSCHF_DebugGetCrystalAmplitude - #define OSCHF_DebugGetExpectedAverageCrystalAmplitude NOROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #define OSC_HPOSCRelativeFrequencyOffsetGet NOROM_OSC_HPOSCRelativeFrequencyOffsetGet - #define OSC_AdjustXoscHfCapArray NOROM_OSC_AdjustXoscHfCapArray - #define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert NOROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#define OSCClockSourceSet NOROM_OSCClockSourceSet +#define OSCClockSourceGet NOROM_OSCClockSourceGet +#define OSCHF_GetStartupTime NOROM_OSCHF_GetStartupTime +#define OSCHF_TurnOnXosc NOROM_OSCHF_TurnOnXosc +#define OSCHF_AttemptToSwitchToXosc NOROM_OSCHF_AttemptToSwitchToXosc +#define OSCHF_SwitchToRcOscTurnOffXosc NOROM_OSCHF_SwitchToRcOscTurnOffXosc +#define OSCHF_DebugGetCrystalAmplitude NOROM_OSCHF_DebugGetCrystalAmplitude +#define OSCHF_DebugGetExpectedAverageCrystalAmplitude NOROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#define OSC_HPOSCRelativeFrequencyOffsetGet NOROM_OSC_HPOSCRelativeFrequencyOffsetGet +#define OSC_AdjustXoscHfCapArray NOROM_OSC_AdjustXoscHfCapArray +#define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert NOROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert #endif //***************************************************************************** @@ -178,8 +178,8 @@ __STATIC_INLINE void OSCClockLossEventEnable( void ) { DDI16BitfieldWrite( AUX_DDI0_OSC_BASE, DDI_0_OSC_O_CTL0, - DDI_0_OSC_CTL0_CLK_LOSS_EN_M, - DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 1 ); + DDI_0_OSC_CTL0_CLK_LOSS_EN_M, + DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 1 ); } //***************************************************************************** @@ -201,8 +201,8 @@ __STATIC_INLINE void OSCClockLossEventDisable( void ) { DDI16BitfieldWrite( AUX_DDI0_OSC_BASE, DDI_0_OSC_O_CTL0, - DDI_0_OSC_CTL0_CLK_LOSS_EN_M, - DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 0 ); + DDI_0_OSC_CTL0_CLK_LOSS_EN_M, + DDI_0_OSC_CTL0_CLK_LOSS_EN_S, 0 ); } //***************************************************************************** @@ -290,7 +290,7 @@ OSCHfSourceReady(void) return (DDI16BitfieldRead(AUX_DDI0_OSC_BASE, DDI_0_OSC_O_STAT0, DDI_0_OSC_STAT0_PENDINGSCLKHFSWITCHING_M, DDI_0_OSC_STAT0_PENDINGSCLKHFSWITCHING_S)) ? - true : false; + true : false; } //***************************************************************************** @@ -495,51 +495,51 @@ extern int16_t OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert( int32_t HP // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_OSCClockSourceSet - #undef OSCClockSourceSet - #define OSCClockSourceSet ROM_OSCClockSourceSet - #endif - #ifdef ROM_OSCClockSourceGet - #undef OSCClockSourceGet - #define OSCClockSourceGet ROM_OSCClockSourceGet - #endif - #ifdef ROM_OSCHF_GetStartupTime - #undef OSCHF_GetStartupTime - #define OSCHF_GetStartupTime ROM_OSCHF_GetStartupTime - #endif - #ifdef ROM_OSCHF_TurnOnXosc - #undef OSCHF_TurnOnXosc - #define OSCHF_TurnOnXosc ROM_OSCHF_TurnOnXosc - #endif - #ifdef ROM_OSCHF_AttemptToSwitchToXosc - #undef OSCHF_AttemptToSwitchToXosc - #define OSCHF_AttemptToSwitchToXosc ROM_OSCHF_AttemptToSwitchToXosc - #endif - #ifdef ROM_OSCHF_SwitchToRcOscTurnOffXosc - #undef OSCHF_SwitchToRcOscTurnOffXosc - #define OSCHF_SwitchToRcOscTurnOffXosc ROM_OSCHF_SwitchToRcOscTurnOffXosc - #endif - #ifdef ROM_OSCHF_DebugGetCrystalAmplitude - #undef OSCHF_DebugGetCrystalAmplitude - #define OSCHF_DebugGetCrystalAmplitude ROM_OSCHF_DebugGetCrystalAmplitude - #endif - #ifdef ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #undef OSCHF_DebugGetExpectedAverageCrystalAmplitude - #define OSCHF_DebugGetExpectedAverageCrystalAmplitude ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude - #endif - #ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetGet - #undef OSC_HPOSCRelativeFrequencyOffsetGet - #define OSC_HPOSCRelativeFrequencyOffsetGet ROM_OSC_HPOSCRelativeFrequencyOffsetGet - #endif - #ifdef ROM_OSC_AdjustXoscHfCapArray - #undef OSC_AdjustXoscHfCapArray - #define OSC_AdjustXoscHfCapArray ROM_OSC_AdjustXoscHfCapArray - #endif - #ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #undef OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert - #endif +#include "../driverlib/rom.h" +#ifdef ROM_OSCClockSourceSet +#undef OSCClockSourceSet +#define OSCClockSourceSet ROM_OSCClockSourceSet +#endif +#ifdef ROM_OSCClockSourceGet +#undef OSCClockSourceGet +#define OSCClockSourceGet ROM_OSCClockSourceGet +#endif +#ifdef ROM_OSCHF_GetStartupTime +#undef OSCHF_GetStartupTime +#define OSCHF_GetStartupTime ROM_OSCHF_GetStartupTime +#endif +#ifdef ROM_OSCHF_TurnOnXosc +#undef OSCHF_TurnOnXosc +#define OSCHF_TurnOnXosc ROM_OSCHF_TurnOnXosc +#endif +#ifdef ROM_OSCHF_AttemptToSwitchToXosc +#undef OSCHF_AttemptToSwitchToXosc +#define OSCHF_AttemptToSwitchToXosc ROM_OSCHF_AttemptToSwitchToXosc +#endif +#ifdef ROM_OSCHF_SwitchToRcOscTurnOffXosc +#undef OSCHF_SwitchToRcOscTurnOffXosc +#define OSCHF_SwitchToRcOscTurnOffXosc ROM_OSCHF_SwitchToRcOscTurnOffXosc +#endif +#ifdef ROM_OSCHF_DebugGetCrystalAmplitude +#undef OSCHF_DebugGetCrystalAmplitude +#define OSCHF_DebugGetCrystalAmplitude ROM_OSCHF_DebugGetCrystalAmplitude +#endif +#ifdef ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#undef OSCHF_DebugGetExpectedAverageCrystalAmplitude +#define OSCHF_DebugGetExpectedAverageCrystalAmplitude ROM_OSCHF_DebugGetExpectedAverageCrystalAmplitude +#endif +#ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetGet +#undef OSC_HPOSCRelativeFrequencyOffsetGet +#define OSC_HPOSCRelativeFrequencyOffsetGet ROM_OSC_HPOSCRelativeFrequencyOffsetGet +#endif +#ifdef ROM_OSC_AdjustXoscHfCapArray +#undef OSC_AdjustXoscHfCapArray +#define OSC_AdjustXoscHfCapArray ROM_OSC_AdjustXoscHfCapArray +#endif +#ifdef ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#undef OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#define OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert ROM_OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/prcm.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/prcm.h index 663afd19..becf1cd9 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/prcm.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/prcm.h @@ -86,22 +86,22 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet - #define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet - #define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet - #define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride - #define PRCMAudioClockInternalSource NOROM_PRCMAudioClockInternalSource - #define PRCMAudioClockExternalSource NOROM_PRCMAudioClockExternalSource - #define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn - #define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff - #define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable - #define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable - #define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable - #define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable - #define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable - #define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable - #define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus - #define PRCMDeepSleep NOROM_PRCMDeepSleep +#define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet +#define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet +#define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet +#define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride +#define PRCMAudioClockInternalSource NOROM_PRCMAudioClockInternalSource +#define PRCMAudioClockExternalSource NOROM_PRCMAudioClockExternalSource +#define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn +#define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff +#define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable +#define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable +#define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable +#define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable +#define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable +#define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable +#define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus +#define PRCMDeepSleep NOROM_PRCMDeepSleep #endif //***************************************************************************** @@ -135,28 +135,28 @@ extern "C" // //***************************************************************************** #define PRCM_DOMAIN_RFCORE 0x00000001 // RF Core domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_SERIAL 0x00000002 // Serial domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_PERIPH 0x00000004 // Peripheral domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_SYSBUS 0x00000008 // Bus domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_VIMS 0x00000010 // VIMS domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_CPU 0x00000020 // CPU domain ID for clock/power - // control. +// control. #define PRCM_DOMAIN_TIMER 0x00000040 // GPT domain ID for clock - // control. +// control. #define PRCM_DOMAIN_CLKCTRL 0x00000080 // Clock Control domain ID for - // clock/power control. +// clock/power control. #define PRCM_DOMAIN_MCU 0x00000100 // Reset control for entire MCU - // domain. +// domain. #define PRCM_DOMAIN_POWER_OFF 0x00000002 // The domain is powered off #define PRCM_DOMAIN_POWER_ON 0x00000001 // The domain is powered on #define PRCM_DOMAIN_POWER_DOWN_READY \ - 0x00000000 // The domain is ready to be - // powered down. + 0x00000000 // The domain is ready to be +// powered down. //***************************************************************************** // @@ -224,19 +224,19 @@ extern "C" static bool PRCMPeripheralValid(uint32_t ui32Peripheral) { - return((ui32Peripheral == PRCM_PERIPH_TIMER0) || - (ui32Peripheral == PRCM_PERIPH_TIMER1) || - (ui32Peripheral == PRCM_PERIPH_TIMER2) || - (ui32Peripheral == PRCM_PERIPH_TIMER3) || - (ui32Peripheral == PRCM_PERIPH_SSI0) || - (ui32Peripheral == PRCM_PERIPH_SSI1) || - (ui32Peripheral == PRCM_PERIPH_UART0) || - (ui32Peripheral == PRCM_PERIPH_I2C0) || - (ui32Peripheral == PRCM_PERIPH_CRYPTO) || - (ui32Peripheral == PRCM_PERIPH_TRNG) || - (ui32Peripheral == PRCM_PERIPH_UDMA) || - (ui32Peripheral == PRCM_PERIPH_GPIO) || - (ui32Peripheral == PRCM_PERIPH_I2S)); + return ((ui32Peripheral == PRCM_PERIPH_TIMER0) || + (ui32Peripheral == PRCM_PERIPH_TIMER1) || + (ui32Peripheral == PRCM_PERIPH_TIMER2) || + (ui32Peripheral == PRCM_PERIPH_TIMER3) || + (ui32Peripheral == PRCM_PERIPH_SSI0) || + (ui32Peripheral == PRCM_PERIPH_SSI1) || + (ui32Peripheral == PRCM_PERIPH_UART0) || + (ui32Peripheral == PRCM_PERIPH_I2C0) || + (ui32Peripheral == PRCM_PERIPH_CRYPTO) || + (ui32Peripheral == PRCM_PERIPH_TRNG) || + (ui32Peripheral == PRCM_PERIPH_UDMA) || + (ui32Peripheral == PRCM_PERIPH_GPIO) || + (ui32Peripheral == PRCM_PERIPH_I2S)); } #endif @@ -530,7 +530,7 @@ extern void PRCMAudioClockConfigSet(uint32_t ui32ClkConfig, //***************************************************************************** #ifndef DEPRECATED extern void PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui32MstDiv, - uint32_t ui32BitDiv, uint32_t ui32WordDiv); + uint32_t ui32BitDiv, uint32_t ui32WordDiv); #endif //***************************************************************************** @@ -555,11 +555,11 @@ extern void PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui3 //! //***************************************************************************** extern void PRCMAudioClockConfigOverride - (uint8_t ui8SamplingEdge, - uint8_t ui8WCLKPhase, - uint32_t ui32MstDiv, - uint32_t ui32BitDiv, - uint32_t ui32WordDiv); +(uint8_t ui8SamplingEdge, + uint8_t ui8WCLKPhase, + uint32_t ui32MstDiv, + uint32_t ui32BitDiv, + uint32_t ui32WordDiv); //***************************************************************************** // @@ -668,11 +668,12 @@ PRCMDomainEnable(uint32_t ui32Domains) (ui32Domains & PRCM_DOMAIN_VIMS)); // Enable the clock domain(s). - if(ui32Domains & PRCM_DOMAIN_RFCORE) + if (ui32Domains & PRCM_DOMAIN_RFCORE) { HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = PRCM_RFCCLKG_CLK_EN; } - if(ui32Domains & PRCM_DOMAIN_VIMS) + + if (ui32Domains & PRCM_DOMAIN_VIMS) { HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = PRCM_VIMSCLKG_CLK_EN_M; } @@ -707,11 +708,12 @@ PRCMDomainDisable(uint32_t ui32Domains) (ui32Domains & PRCM_DOMAIN_VIMS)); // Disable the power domains. - if(ui32Domains & PRCM_DOMAIN_RFCORE) + if (ui32Domains & PRCM_DOMAIN_RFCORE) { HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = 0x0; } - if(ui32Domains & PRCM_DOMAIN_VIMS) + + if (ui32Domains & PRCM_DOMAIN_VIMS) { HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = 0x0; } @@ -1139,7 +1141,7 @@ extern void PRCMDeepSleep(void); __STATIC_INLINE void PRCMCacheRetentionEnable( void ) { - HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) |= PRCM_RAMRETEN_VIMS_M; + HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) |= PRCM_RAMRETEN_VIMS_M; } //***************************************************************************** @@ -1154,7 +1156,7 @@ PRCMCacheRetentionEnable( void ) __STATIC_INLINE void PRCMCacheRetentionDisable( void ) { - HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) &= ~PRCM_RAMRETEN_VIMS_M; + HWREG( PRCM_BASE + PRCM_O_RAMRETEN ) &= ~PRCM_RAMRETEN_VIMS_M; } @@ -1165,71 +1167,71 @@ PRCMCacheRetentionDisable( void ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PRCMInfClockConfigureSet - #undef PRCMInfClockConfigureSet - #define PRCMInfClockConfigureSet ROM_PRCMInfClockConfigureSet - #endif - #ifdef ROM_PRCMInfClockConfigureGet - #undef PRCMInfClockConfigureGet - #define PRCMInfClockConfigureGet ROM_PRCMInfClockConfigureGet - #endif - #ifdef ROM_PRCMAudioClockConfigSet - #undef PRCMAudioClockConfigSet - #define PRCMAudioClockConfigSet ROM_PRCMAudioClockConfigSet - #endif - #ifdef ROM_PRCMAudioClockConfigSetOverride - #undef PRCMAudioClockConfigSetOverride - #define PRCMAudioClockConfigSetOverride ROM_PRCMAudioClockConfigSetOverride - #endif - #ifdef ROM_PRCMAudioClockInternalSource - #undef PRCMAudioClockInternalSource - #define PRCMAudioClockInternalSource ROM_PRCMAudioClockInternalSource - #endif - #ifdef ROM_PRCMAudioClockExternalSource - #undef PRCMAudioClockExternalSource - #define PRCMAudioClockExternalSource ROM_PRCMAudioClockExternalSource - #endif - #ifdef ROM_PRCMPowerDomainOn - #undef PRCMPowerDomainOn - #define PRCMPowerDomainOn ROM_PRCMPowerDomainOn - #endif - #ifdef ROM_PRCMPowerDomainOff - #undef PRCMPowerDomainOff - #define PRCMPowerDomainOff ROM_PRCMPowerDomainOff - #endif - #ifdef ROM_PRCMPeripheralRunEnable - #undef PRCMPeripheralRunEnable - #define PRCMPeripheralRunEnable ROM_PRCMPeripheralRunEnable - #endif - #ifdef ROM_PRCMPeripheralRunDisable - #undef PRCMPeripheralRunDisable - #define PRCMPeripheralRunDisable ROM_PRCMPeripheralRunDisable - #endif - #ifdef ROM_PRCMPeripheralSleepEnable - #undef PRCMPeripheralSleepEnable - #define PRCMPeripheralSleepEnable ROM_PRCMPeripheralSleepEnable - #endif - #ifdef ROM_PRCMPeripheralSleepDisable - #undef PRCMPeripheralSleepDisable - #define PRCMPeripheralSleepDisable ROM_PRCMPeripheralSleepDisable - #endif - #ifdef ROM_PRCMPeripheralDeepSleepEnable - #undef PRCMPeripheralDeepSleepEnable - #define PRCMPeripheralDeepSleepEnable ROM_PRCMPeripheralDeepSleepEnable - #endif - #ifdef ROM_PRCMPeripheralDeepSleepDisable - #undef PRCMPeripheralDeepSleepDisable - #define PRCMPeripheralDeepSleepDisable ROM_PRCMPeripheralDeepSleepDisable - #endif - #ifdef ROM_PRCMPowerDomainStatus - #undef PRCMPowerDomainStatus - #define PRCMPowerDomainStatus ROM_PRCMPowerDomainStatus - #endif - #ifdef ROM_PRCMDeepSleep - #undef PRCMDeepSleep - #define PRCMDeepSleep ROM_PRCMDeepSleep - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PRCMInfClockConfigureSet +#undef PRCMInfClockConfigureSet +#define PRCMInfClockConfigureSet ROM_PRCMInfClockConfigureSet +#endif +#ifdef ROM_PRCMInfClockConfigureGet +#undef PRCMInfClockConfigureGet +#define PRCMInfClockConfigureGet ROM_PRCMInfClockConfigureGet +#endif +#ifdef ROM_PRCMAudioClockConfigSet +#undef PRCMAudioClockConfigSet +#define PRCMAudioClockConfigSet ROM_PRCMAudioClockConfigSet +#endif +#ifdef ROM_PRCMAudioClockConfigSetOverride +#undef PRCMAudioClockConfigSetOverride +#define PRCMAudioClockConfigSetOverride ROM_PRCMAudioClockConfigSetOverride +#endif +#ifdef ROM_PRCMAudioClockInternalSource +#undef PRCMAudioClockInternalSource +#define PRCMAudioClockInternalSource ROM_PRCMAudioClockInternalSource +#endif +#ifdef ROM_PRCMAudioClockExternalSource +#undef PRCMAudioClockExternalSource +#define PRCMAudioClockExternalSource ROM_PRCMAudioClockExternalSource +#endif +#ifdef ROM_PRCMPowerDomainOn +#undef PRCMPowerDomainOn +#define PRCMPowerDomainOn ROM_PRCMPowerDomainOn +#endif +#ifdef ROM_PRCMPowerDomainOff +#undef PRCMPowerDomainOff +#define PRCMPowerDomainOff ROM_PRCMPowerDomainOff +#endif +#ifdef ROM_PRCMPeripheralRunEnable +#undef PRCMPeripheralRunEnable +#define PRCMPeripheralRunEnable ROM_PRCMPeripheralRunEnable +#endif +#ifdef ROM_PRCMPeripheralRunDisable +#undef PRCMPeripheralRunDisable +#define PRCMPeripheralRunDisable ROM_PRCMPeripheralRunDisable +#endif +#ifdef ROM_PRCMPeripheralSleepEnable +#undef PRCMPeripheralSleepEnable +#define PRCMPeripheralSleepEnable ROM_PRCMPeripheralSleepEnable +#endif +#ifdef ROM_PRCMPeripheralSleepDisable +#undef PRCMPeripheralSleepDisable +#define PRCMPeripheralSleepDisable ROM_PRCMPeripheralSleepDisable +#endif +#ifdef ROM_PRCMPeripheralDeepSleepEnable +#undef PRCMPeripheralDeepSleepEnable +#define PRCMPeripheralDeepSleepEnable ROM_PRCMPeripheralDeepSleepEnable +#endif +#ifdef ROM_PRCMPeripheralDeepSleepDisable +#undef PRCMPeripheralDeepSleepDisable +#define PRCMPeripheralDeepSleepDisable ROM_PRCMPeripheralDeepSleepDisable +#endif +#ifdef ROM_PRCMPowerDomainStatus +#undef PRCMPowerDomainStatus +#define PRCMPowerDomainStatus ROM_PRCMPowerDomainStatus +#endif +#ifdef ROM_PRCMDeepSleep +#undef PRCMDeepSleep +#define PRCMDeepSleep ROM_PRCMDeepSleep +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/pwr_ctrl.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/pwr_ctrl.h index 4cbff1b6..e0ac7cee 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/pwr_ctrl.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/pwr_ctrl.h @@ -90,7 +90,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet +#define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet #endif //***************************************************************************** @@ -183,7 +183,8 @@ PowerCtrlSourceGet(void) // Return the current power source ui32PowerConfig = HWREG(AON_SYSCTL_BASE + AON_SYSCTL_O_PWRCTL); - if(ui32PowerConfig & AON_SYSCTL_PWRCTL_DCDC_ACTIVE) + + if (ui32PowerConfig & AON_SYSCTL_PWRCTL_DCDC_ACTIVE) { return (PWRCTRL_PWRSRC_DCDC); } @@ -223,8 +224,8 @@ PowerCtrlResetSourceGet(void) { // Get the reset source. return (( HWREG( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL ) & - AON_SYSCTL_RESETCTL_RESET_SRC_M ) >> - AON_SYSCTL_RESETCTL_RESET_SRC_S ) ; + AON_SYSCTL_RESETCTL_RESET_SRC_M ) >> + AON_SYSCTL_RESETCTL_RESET_SRC_S ) ; } //***************************************************************************** @@ -269,11 +270,11 @@ PowerCtrlPadSleepDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_PowerCtrlSourceSet - #undef PowerCtrlSourceSet - #define PowerCtrlSourceSet ROM_PowerCtrlSourceSet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_PowerCtrlSourceSet +#undef PowerCtrlSourceSet +#define PowerCtrlSourceSet ROM_PowerCtrlSourceSet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ble_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ble_cmd.h index 668d69b4..f271ccd2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ble_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ble_cmd.h @@ -40,17 +40,17 @@ #define __BLE_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -95,39 +95,43 @@ typedef struct __RFC_STRUCT rfc_bleRxStatus_s rfc_bleRxStatus_t; //! \addtogroup bleRadioOp //! @{ -struct __RFC_STRUCT rfc_bleRadioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - uint8_t* pParams; //!< Pointer to command specific parameter structure - uint8_t* pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_bleRadioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + uint8_t* pParams; //!< Pointer to command specific parameter structure + uint8_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -136,39 +140,43 @@ struct __RFC_STRUCT rfc_bleRadioOp_s { //! @{ #define CMD_BLE_SLAVE 0x1801 //! BLE Slave Command -struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s { - uint16_t commandNo; //!< The command ID number 0x1801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleSlavePar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s +{ + uint16_t commandNo; //!< The command ID number 0x1801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleSlavePar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -177,39 +185,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s { //! @{ #define CMD_BLE_MASTER 0x1802 //! BLE Master Command -struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s { - uint16_t commandNo; //!< The command ID number 0x1802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleMasterPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleMasterSlaveOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s +{ + uint16_t commandNo; //!< The command ID number 0x1802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleMasterPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleMasterSlaveOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -218,39 +230,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s { //! @{ #define CMD_BLE_ADV 0x1803 //! BLE Connectable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_s { - uint16_t commandNo; //!< The command ID number 0x1803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x1803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -259,39 +275,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_s { //! @{ #define CMD_BLE_ADV_DIR 0x1804 //! BLE Connectable Directed Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s { - uint16_t commandNo; //!< The command ID number 0x1804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s +{ + uint16_t commandNo; //!< The command ID number 0x1804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -300,39 +320,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s { //! @{ #define CMD_BLE_ADV_NC 0x1805 //! BLE Non-Connectable Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s { - uint16_t commandNo; //!< The command ID number 0x1805 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s +{ + uint16_t commandNo; //!< The command ID number 0x1805 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -341,39 +365,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s { //! @{ #define CMD_BLE_ADV_SCAN 0x1806 //! BLE Scannable Undirected Advertiser Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s { - uint16_t commandNo; //!< The command ID number 0x1806 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleAdvPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleAdvOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s +{ + uint16_t commandNo; //!< The command ID number 0x1806 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleAdvPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleAdvOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -382,39 +410,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s { //! @{ #define CMD_BLE_SCANNER 0x1807 //! BLE Scanner Command -struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s { - uint16_t commandNo; //!< The command ID number 0x1807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleScannerPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleScannerOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s +{ + uint16_t commandNo; //!< The command ID number 0x1807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleScannerPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleScannerOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -423,39 +455,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s { //! @{ #define CMD_BLE_INITIATOR 0x1808 //! BLE Initiator Command -struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s { - uint16_t commandNo; //!< The command ID number 0x1808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleInitiatorPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleInitiatorOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s +{ + uint16_t commandNo; //!< The command ID number 0x1808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleInitiatorPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleInitiatorOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -464,39 +500,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s { //! @{ #define CMD_BLE_GENERIC_RX 0x1809 //! BLE Generic Receiver Command -struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s { - uint16_t commandNo; //!< The command ID number 0x1809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleGenericRxPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleGenericRxOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x1809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleGenericRxPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleGenericRxOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -505,39 +545,43 @@ struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s { //! @{ #define CMD_BLE_TX_TEST 0x180A //! BLE PHY Test Transmitter Command -struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x180A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to use
- //!< 0--39: BLE advertising/data channel number
- //!< 60--207: Custom frequency; (2300 + channel) MHz
- //!< 255: Use existing frequency
- //!< Others: Reserved - struct { - uint8_t init:7; //!< \brief If bOverride = 1 or custom frequency is used:
- //!< 0: Do not use whitening
- //!< Other value: Initialization for 7-bit LFSR whitener - uint8_t bOverride:1; //!< \brief 0: Use default whitening for BLE advertising/data channels
- //!< 1: Override whitening initialization with value of init - } whitening; - rfc_bleTxTestPar_t *pParams; //!< Pointer to command specific parameter structure - rfc_bleTxTestOutput_t *pOutput; //!< Pointer to command specific output structure +struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x180A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to use
+ //!< 0--39: BLE advertising/data channel number
+ //!< 60--207: Custom frequency; (2300 + channel) MHz
+ //!< 255: Use existing frequency
+ //!< Others: Reserved + struct + { + uint8_t init: 7; //!< \brief If bOverride = 1 or custom frequency is used:
+ //!< 0: Do not use whitening
+ //!< Other value: Initialization for 7-bit LFSR whitener + uint8_t bOverride: 1; //!< \brief 0: Use default whitening for BLE advertising/data channels
+ //!< 1: Override whitening initialization with value of init + } whitening; + rfc_bleTxTestPar_t* pParams; //!< Pointer to command specific parameter structure + rfc_bleTxTestOutput_t* pOutput; //!< Pointer to command specific output structure } __RFC_STRUCT_ATTR; //! @} @@ -546,13 +590,14 @@ struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s { //! @{ #define CMD_BLE_ADV_PAYLOAD 0x1001 //! BLE Update Advertising Payload Command -struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s { - uint16_t commandNo; //!< The command ID number 0x1001 - uint8_t payloadType; //!< \brief 0: Advertising data
- //!< 1: Scan response data - uint8_t newLen; //!< Length of the new payload - uint8_t* pNewData; //!< Pointer to the buffer containing the new data - rfc_bleAdvPar_t *pParams; //!< Pointer to the parameter structure to update +struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s +{ + uint16_t commandNo; //!< The command ID number 0x1001 + uint8_t payloadType; //!< \brief 0: Advertising data
+ //!< 1: Scan response data + uint8_t newLen; //!< Length of the new payload + uint8_t* pNewData; //!< Pointer to the buffer containing the new data + rfc_bleAdvPar_t* pParams; //!< Pointer to the parameter structure to update } __RFC_STRUCT_ATTR; //! @} @@ -561,43 +606,47 @@ struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s { //! @{ #define CMD_BLE5_RADIO_SETUP 0x1820 //! Define only for compatibility with CC26XXR2F family. Command will result in error if sent. -struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s { - uint8_t dummy0; +struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s +{ + uint8_t dummy0; } __RFC_STRUCT_ATTR; //! @} //! \addtogroup bleMasterSlavePar //! @{ -struct __RFC_STRUCT rfc_bleMasterSlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte +struct __RFC_STRUCT rfc_bleMasterSlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte } __RFC_STRUCT_ATTR; //! @} @@ -606,45 +655,49 @@ struct __RFC_STRUCT rfc_bleMasterSlavePar_s { //! @{ //! Parameter structure for master (CMD_BLE_MASTER) -struct __RFC_STRUCT rfc_bleMasterPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_bleMasterPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -653,57 +706,62 @@ struct __RFC_STRUCT rfc_bleMasterPar_s { //! @{ //! Parameter structure for slave (CMD_BLE_SLAVE) -struct __RFC_STRUCT rfc_bleSlavePar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - dataQueue_t* pTxQ; //!< Pointer to transmit queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t lastRxSn:1; //!< The SN bit of the header of the last packet received with CRC OK - uint8_t lastTxSn:1; //!< The SN bit of the header of the last transmitted packet - uint8_t nextTxSn:1; //!< The SN bit of the header of the next packet to transmit - uint8_t bFirstPkt:1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise - uint8_t bAutoEmpty:1; //!< 1 if the last transmitted packet was an auto-empty packet - uint8_t bLlCtrlTx:1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) - uint8_t bLlCtrlAckRx:1; //!< 1 if the last received packet was the ACK of an LL control packet - uint8_t bLlCtrlAckPending:1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed - } seqStat; - uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit - uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first - //!< receive operation - uint16_t __dummy0; - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< connection event as soon as allowed +struct __RFC_STRUCT rfc_bleSlavePar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + dataQueue_t* pTxQ; //!< Pointer to transmit queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t lastRxSn: 1; //!< The SN bit of the header of the last packet received with CRC OK + uint8_t lastTxSn: 1; //!< The SN bit of the header of the last transmitted packet + uint8_t nextTxSn: 1; //!< The SN bit of the header of the next packet to transmit + uint8_t bFirstPkt: 1; //!< For slave: 0 if a packet has been transmitted on the connection, 1 otherwise + uint8_t bAutoEmpty: 1; //!< 1 if the last transmitted packet was an auto-empty packet + uint8_t bLlCtrlTx: 1; //!< 1 if the last transmitted packet was an LL control packet (LLID = 11) + uint8_t bLlCtrlAckRx: 1; //!< 1 if the last received packet was the ACK of an LL control packet + uint8_t bLlCtrlAckPending: 1; //!< 1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed + } seqStat; + uint8_t maxNack; //!< Maximum number of NACKs received before operation ends. 0: No limit + uint8_t maxPkt; //!< Maximum number of packets transmitted in the operation before it ends. 0: No limit + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that defines timeout of the first receive operation + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that defines timeout of the first + //!< receive operation + uint16_t __dummy0; + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the connection event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< connection event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -712,53 +770,57 @@ struct __RFC_STRUCT rfc_bleSlavePar_s { //! @{ //! Parameter structure for advertiser (CMD_BLE_ADV*) -struct __RFC_STRUCT rfc_bleAdvPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t advFilterPolicy:2; //!< \brief Advertiser filter policy
- //!< 0: Process scan and connect requests from all devices
- //!< 1: Process connect requests from all devices and only scan requests from - //!< devices that are in the white list
- //!< 2: Process scan requests from all devices and only connect requests from - //!< devices that are in the white list
- //!< 3: Process scan and connect requests only from devices in the white list - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< Directed advertiser: The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t :2; - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } advConfig; - uint8_t advLen; //!< Size of advertiser data - uint8_t scanRspLen; //!< Size of scan response data - uint8_t* pAdvData; //!< Pointer to buffer containing ADV*_IND data - uint8_t* pScanRspData; //!< Pointer to buffer containing SCAN_RSP data - uint16_t* pDeviceAddress; //!< Pointer to device address used for this device - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list or peer address (directed advertiser) - uint16_t __dummy0; - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the advertiser event as soon as allowed - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< advertiser event as soon as allowed +struct __RFC_STRUCT rfc_bleAdvPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t advFilterPolicy: 2; //!< \brief Advertiser filter policy
+ //!< 0: Process scan and connect requests from all devices
+ //!< 1: Process connect requests from all devices and only scan requests from + //!< devices that are in the white list
+ //!< 2: Process scan requests from all devices and only connect requests from + //!< devices that are in the white list
+ //!< 3: Process scan and connect requests only from devices in the white list + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< Directed advertiser: The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t : 2; + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } advConfig; + uint8_t advLen; //!< Size of advertiser data + uint8_t scanRspLen; //!< Size of scan response data + uint8_t* pAdvData; //!< Pointer to buffer containing ADV*_IND data + uint8_t* pScanRspData; //!< Pointer to buffer containing SCAN_RSP data + uint16_t* pDeviceAddress; //!< Pointer to device address used for this device + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list or peer address (directed advertiser) + uint16_t __dummy0; + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the advertiser event as soon as allowed + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< advertiser event as soon as allowed } __RFC_STRUCT_ATTR; //! @} @@ -767,70 +829,76 @@ struct __RFC_STRUCT rfc_bleAdvPar_s { //! @{ //! Parameter structure for scanner (CMD_BLE_SCANNER) -struct __RFC_STRUCT rfc_bleScannerPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t scanFilterPolicy:1; //!< \brief Scanning filter policy
- //!< 0: Accept all advertisement packets
- //!< 1: Accept only advertisement packets from devices where the advertiser's address - //!< is in the White list. - uint8_t bActiveScan:1; //!< \brief 0: Passive scan
- //!< 1: Active scan - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t :1; - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - uint8_t bAutoWlIgnore:1; //!< 1: Automatically set ignore bit in white list - uint8_t bEndOnRpt:1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
- //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP - uint8_t rpaMode:1; //!< \brief Resolvable private address mode
- //!< 0: Normal operation
- //!< 1: Use white list for a received RPA regardless of filter policy - } scanConfig; - uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure - uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth 4.0 spec - struct { - uint8_t logUpperLimit:4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure - uint8_t bLastSucceeded:1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit - //!< not changed - uint8_t bLastFailed:1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not - //!< changed - } backoffPar; - uint8_t scanReqLen; //!< Size of scan request data - uint8_t* pScanReqData; //!< Pointer to buffer containing SCAN_REQ data - uint16_t* pDeviceAddress; //!< Pointer to device address used for this device - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list - uint16_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED +struct __RFC_STRUCT rfc_bleScannerPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t scanFilterPolicy: 1; //!< \brief Scanning filter policy
+ //!< 0: Accept all advertisement packets
+ //!< 1: Accept only advertisement packets from devices where the advertiser's address + //!< is in the White list. + uint8_t bActiveScan: 1; //!< \brief 0: Passive scan
+ //!< 1: Active scan + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t : 1; + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + uint8_t bAutoWlIgnore: 1; //!< 1: Automatically set ignore bit in white list + uint8_t bEndOnRpt: 1; //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP
+ //!< 1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP + uint8_t rpaMode: 1; //!< \brief Resolvable private address mode
+ //!< 0: Normal operation
+ //!< 1: Use white list for a received RPA regardless of filter policy + } scanConfig; + uint16_t randomState; //!< State for pseudo-random number generation used in backoff procedure + uint16_t backoffCount; //!< Parameter backoffCount used in backoff procedure, cf. Bluetooth 4.0 spec + struct + { + uint8_t logUpperLimit: 4; //!< Binary logarithm of parameter upperLimit used in scanner backoff procedure + uint8_t bLastSucceeded: 1; //!< \brief 1 if the last SCAN_RSP was successfully received and upperLimit + //!< not changed + uint8_t bLastFailed: 1; //!< \brief 1 if reception of the last SCAN_RSP failed and upperLimit was not + //!< changed + } backoffPar; + uint8_t scanReqLen; //!< Size of scan request data + uint8_t* pScanReqData; //!< Pointer to buffer containing SCAN_REQ data + uint16_t* pDeviceAddress; //!< Pointer to device address used for this device + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list + uint16_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED } __RFC_STRUCT_ATTR; //! @} @@ -839,58 +907,63 @@ struct __RFC_STRUCT rfc_bleScannerPar_s { //! @{ //! Parameter structure for initiator (CMD_BLE_INITIATOR) -struct __RFC_STRUCT rfc_bleInitiatorPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - struct { - uint8_t bUseWhiteList:1; //!< \brief Initiator filter policy
- //!< 0: Use specific peer address
- //!< 1: Use white list - uint8_t bDynamicWinOffset:1; //!< \brief 0: No dynamic WinOffset insertion
- //!< 1: Use dynamic WinOffset insertion - uint8_t deviceAddrType:1; //!< The type of the device address -- public (0) or random (1) - uint8_t peerAddrType:1; //!< The type of the peer address -- public (0) or random (1) - uint8_t bStrictLenFilter:1; //!< \brief 0: Accept any packet with a valid advertising packet length
- //!< 1: Discard messages with illegal length for the given packet type - } initConfig; - uint8_t __dummy0; - uint8_t connectReqLen; //!< Size of connect request data - uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_REQ - uint16_t* pDeviceAddress; //!< Pointer to device address used for this device - rfc_bleWhiteListEntry_t *pWhiteList; //!< Pointer to white list or peer address - ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. - //!< Set to the calculated value if a connection is made and to the next possible connection - //!< time if not. - uint16_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed - ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop - //!< receiving as soon as allowed, ending with BLE_DONE_ENDED +struct __RFC_STRUCT rfc_bleInitiatorPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + struct + { + uint8_t bUseWhiteList: 1; //!< \brief Initiator filter policy
+ //!< 0: Use specific peer address
+ //!< 1: Use white list + uint8_t bDynamicWinOffset: 1; //!< \brief 0: No dynamic WinOffset insertion
+ //!< 1: Use dynamic WinOffset insertion + uint8_t deviceAddrType: 1; //!< The type of the device address -- public (0) or random (1) + uint8_t peerAddrType: 1; //!< The type of the peer address -- public (0) or random (1) + uint8_t bStrictLenFilter: 1; //!< \brief 0: Accept any packet with a valid advertising packet length
+ //!< 1: Discard messages with illegal length for the given packet type + } initConfig; + uint8_t __dummy0; + uint8_t connectReqLen; //!< Size of connect request data + uint8_t* pConnectReqData; //!< Pointer to buffer containing LLData to go in the CONNECT_REQ + uint16_t* pDeviceAddress; //!< Pointer to device address used for this device + rfc_bleWhiteListEntry_t* pWhiteList; //!< Pointer to white list or peer address + ratmr_t connectTime; //!< \brief Indication of timer value of the first possible start time of the first connection event. + //!< Set to the calculated value if a connection is made and to the next possible connection + //!< time if not. + uint16_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } timeoutTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to stop receiving as soon as allowed + ratmr_t timeoutTime; //!< \brief Time used together with timeoutTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to stop + //!< receiving as soon as allowed, ending with BLE_DONE_ENDED } __RFC_STRUCT_ATTR; //! @} @@ -899,35 +972,38 @@ struct __RFC_STRUCT rfc_bleInitiatorPar_s { //! @{ //! Parameter structure for generic Rx (CMD_BLE_GENERIC_RX) -struct __RFC_STRUCT rfc_bleGenericRxPar_s { - dataQueue_t* pRxQ; //!< Pointer to receive queue. May be NULL; if so, received packets are not stored - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically remove ignored packets from Rx queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushEmpty:1; //!< If 1, automatically remove empty packets from Rx queue - uint8_t bIncludeLenByte:1; //!< If 1, include the received length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; //!< Configuration bits for the receive queue entries - uint8_t bRepeat; //!< \brief 0: End operation after receiving a packet
- //!< 1: Restart receiver after receiving a packet - uint16_t __dummy0; - uint32_t accessAddress; //!< Access address used on the connection - uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte - uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte - uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< Rx operation +struct __RFC_STRUCT rfc_bleGenericRxPar_s +{ + dataQueue_t* pRxQ; //!< Pointer to receive queue. May be NULL; if so, received packets are not stored + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically remove ignored packets from Rx queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushEmpty: 1; //!< If 1, automatically remove empty packets from Rx queue + uint8_t bIncludeLenByte: 1; //!< If 1, include the received length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the Rx queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; //!< Configuration bits for the receive queue entries + uint8_t bRepeat; //!< \brief 0: End operation after receiving a packet
+ //!< 1: Restart receiver after receiving a packet + uint16_t __dummy0; + uint32_t accessAddress; //!< Access address used on the connection + uint8_t crcInit0; //!< CRC initialization value used on the connection -- least significant byte + uint8_t crcInit1; //!< CRC initialization value used on the connection -- middle byte + uint8_t crcInit2; //!< CRC initialization value used on the connection -- most significant byte + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< Rx operation } __RFC_STRUCT_ATTR; //! @} @@ -936,33 +1012,36 @@ struct __RFC_STRUCT rfc_bleGenericRxPar_s { //! @{ //! Parameter structure for Tx test (CMD_BLE_TX_TEST) -struct __RFC_STRUCT rfc_bleTxTestPar_s { - uint16_t numPackets; //!< \brief Number of packets to transmit
- //!< 0: Transmit unlimited number of packets - uint8_t payloadLength; //!< The number of payload bytes in each packet. - uint8_t packetType; //!< \brief The packet type to be used, encoded according to the Bluetooth 4.0 spec, Volume 2, Part E, - //!< Section 7.8.29 - ratmr_t period; //!< Number of radio timer cycles between the start of each packet - struct { - uint8_t bOverrideDefault:1; //!< \brief 0: Use default packet encoding
- //!< 1: Override packet contents - uint8_t bUsePrbs9:1; //!< \brief If bOverride is 1:
- //!< 1: Use PRBS9 encoding of packet - uint8_t bUsePrbs15:1; //!< \brief If bOverride is 1:
- //!< 1: Use PRBS15 encoding of packet - } config; - uint8_t byteVal; //!< If config.bOverride is 1, value of each byte to be sent - uint8_t __dummy0; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Test Tx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< Test Tx operation +struct __RFC_STRUCT rfc_bleTxTestPar_s +{ + uint16_t numPackets; //!< \brief Number of packets to transmit
+ //!< 0: Transmit unlimited number of packets + uint8_t payloadLength; //!< The number of payload bytes in each packet. + uint8_t packetType; //!< \brief The packet type to be used, encoded according to the Bluetooth 4.0 spec, Volume 2, Part E, + //!< Section 7.8.29 + ratmr_t period; //!< Number of radio timer cycles between the start of each packet + struct + { + uint8_t bOverrideDefault: 1; //!< \brief 0: Use default packet encoding
+ //!< 1: Override packet contents + uint8_t bUsePrbs9: 1; //!< \brief If bOverride is 1:
+ //!< 1: Use PRBS9 encoding of packet + uint8_t bUsePrbs15: 1; //!< \brief If bOverride is 1:
+ //!< 1: Use PRBS15 encoding of packet + } config; + uint8_t byteVal; //!< If config.bOverride is 1, value of each byte to be sent + uint8_t __dummy0; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Test Tx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< Test Tx operation } __RFC_STRUCT_ATTR; //! @} @@ -971,37 +1050,39 @@ struct __RFC_STRUCT rfc_bleTxTestPar_s { //! @{ //! Output structure for master and slave (CMD_BLE_MASTER and CMD_BLE_SLAVE) -struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s { - uint8_t nTx; //!< \brief Total number of packets (including auto-empty and retransmissions) that have been - //!< transmitted - uint8_t nTxAck; //!< Total number of transmitted packets (including auto-empty) that have been ACK'ed - uint8_t nTxCtrl; //!< Number of unique LL control packets from the Tx queue that have been transmitted - uint8_t nTxCtrlAck; //!< Number of LL control packets from the Tx queue that have been finished (ACK'ed) - uint8_t nTxCtrlAckAck; //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in - //!< response - uint8_t nTxRetrans; //!< Number of retransmissions that has been done - uint8_t nTxEntryDone; //!< Number of packets from the Tx queue that have been finished (ACK'ed) - uint8_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored - uint8_t nRxCtrl; //!< Number of LL control packets that have been received with CRC OK and not ignored - uint8_t nRxCtrlAck; //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and - //!< then ACK'ed - uint8_t nRxNok; //!< Number of packets that have been received with CRC error - uint8_t nRxIgnored; //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated - //!< sequence number - uint8_t nRxEmpty; //!< Number of packets that have been received with CRC OK and no payload - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - struct { - uint8_t bTimeStampValid:1; //!< 1 if a valid time stamp has been written to timeStamp; 0 otherwise - uint8_t bLastCrcErr:1; //!< 1 if the last received packet had CRC error; 0 otherwise - uint8_t bLastIgnored:1; //!< 1 if the last received packet with CRC OK was ignored; 0 otherwise - uint8_t bLastEmpty:1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise - uint8_t bLastCtrl:1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise - uint8_t bLastMd:1; //!< 1 if the last received packet with CRC OK had MD = 1; 0 otherwise - uint8_t bLastAck:1; //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet; - //!< 0 otherwise - } pktStatus; - ratmr_t timeStamp; //!< Slave operation: Time stamp of first received packet +struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s +{ + uint8_t nTx; //!< \brief Total number of packets (including auto-empty and retransmissions) that have been + //!< transmitted + uint8_t nTxAck; //!< Total number of transmitted packets (including auto-empty) that have been ACK'ed + uint8_t nTxCtrl; //!< Number of unique LL control packets from the Tx queue that have been transmitted + uint8_t nTxCtrlAck; //!< Number of LL control packets from the Tx queue that have been finished (ACK'ed) + uint8_t nTxCtrlAckAck; //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in + //!< response + uint8_t nTxRetrans; //!< Number of retransmissions that has been done + uint8_t nTxEntryDone; //!< Number of packets from the Tx queue that have been finished (ACK'ed) + uint8_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored + uint8_t nRxCtrl; //!< Number of LL control packets that have been received with CRC OK and not ignored + uint8_t nRxCtrlAck; //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and + //!< then ACK'ed + uint8_t nRxNok; //!< Number of packets that have been received with CRC error + uint8_t nRxIgnored; //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated + //!< sequence number + uint8_t nRxEmpty; //!< Number of packets that have been received with CRC OK and no payload + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + struct + { + uint8_t bTimeStampValid: 1; //!< 1 if a valid time stamp has been written to timeStamp; 0 otherwise + uint8_t bLastCrcErr: 1; //!< 1 if the last received packet had CRC error; 0 otherwise + uint8_t bLastIgnored: 1; //!< 1 if the last received packet with CRC OK was ignored; 0 otherwise + uint8_t bLastEmpty: 1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise + uint8_t bLastCtrl: 1; //!< 1 if the last received packet with CRC OK was empty; 0 otherwise + uint8_t bLastMd: 1; //!< 1 if the last received packet with CRC OK had MD = 1; 0 otherwise + uint8_t bLastAck: 1; //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet; + //!< 0 otherwise + } pktStatus; + ratmr_t timeStamp; //!< Slave operation: Time stamp of first received packet } __RFC_STRUCT_ATTR; //! @} @@ -1010,17 +1091,18 @@ struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s { //! @{ //! Output structure for advertiser (CMD_BLE_ADV*) -struct __RFC_STRUCT rfc_bleAdvOutput_s { - uint16_t nTxAdvInd; //!< Number of ADV*_IND packets completely transmitted - uint8_t nTxScanRsp; //!< Number of SCAN_RSP packets transmitted - uint8_t nRxScanReq; //!< Number of SCAN_REQ packets received OK and not ignored - uint8_t nRxConnectReq; //!< Number of CONNECT_REQ packets received OK and not ignored - uint8_t __dummy0; - uint16_t nRxNok; //!< Number of packets received with CRC error - uint16_t nRxIgnored; //!< Number of packets received with CRC OK, but ignored - uint8_t nRxBufFull; //!< Number of packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet - ratmr_t timeStamp; //!< Time stamp of the last received packet +struct __RFC_STRUCT rfc_bleAdvOutput_s +{ + uint16_t nTxAdvInd; //!< Number of ADV*_IND packets completely transmitted + uint8_t nTxScanRsp; //!< Number of SCAN_RSP packets transmitted + uint8_t nRxScanReq; //!< Number of SCAN_REQ packets received OK and not ignored + uint8_t nRxConnectReq; //!< Number of CONNECT_REQ packets received OK and not ignored + uint8_t __dummy0; + uint16_t nRxNok; //!< Number of packets received with CRC error + uint16_t nRxIgnored; //!< Number of packets received with CRC OK, but ignored + uint8_t nRxBufFull; //!< Number of packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet + ratmr_t timeStamp; //!< Time stamp of the last received packet } __RFC_STRUCT_ATTR; //! @} @@ -1029,20 +1111,21 @@ struct __RFC_STRUCT rfc_bleAdvOutput_s { //! @{ //! Output structure for scanner (CMD_BLE_SCANNER) -struct __RFC_STRUCT rfc_bleScannerOutput_s { - uint16_t nTxScanReq; //!< Number of transmitted SCAN_REQ packets - uint16_t nBackedOffScanReq; //!< Number of SCAN_REQ packets not sent due to backoff procedure - uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint16_t nRxScanRspOk; //!< Number of SCAN_RSP packets received with CRC OK and not ignored - uint16_t nRxScanRspIgnored; //!< Number of SCAN_RSP packets received with CRC OK, but ignored - uint16_t nRxScanRspNok; //!< Number of SCAN_RSP packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - uint8_t nRxScanRspBufFull; //!< Number of SCAN_RSP packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last successfully received ADV*_IND packet that was not ignored +struct __RFC_STRUCT rfc_bleScannerOutput_s +{ + uint16_t nTxScanReq; //!< Number of transmitted SCAN_REQ packets + uint16_t nBackedOffScanReq; //!< Number of SCAN_REQ packets not sent due to backoff procedure + uint16_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint16_t nRxScanRspOk; //!< Number of SCAN_RSP packets received with CRC OK and not ignored + uint16_t nRxScanRspIgnored; //!< Number of SCAN_RSP packets received with CRC OK, but ignored + uint16_t nRxScanRspNok; //!< Number of SCAN_RSP packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + uint8_t nRxScanRspBufFull; //!< Number of SCAN_RSP packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last successfully received ADV*_IND packet that was not ignored } __RFC_STRUCT_ATTR; //! @} @@ -1051,14 +1134,15 @@ struct __RFC_STRUCT rfc_bleScannerOutput_s { //! @{ //! Output structure for initiator (CMD_BLE_INITIATOR) -struct __RFC_STRUCT rfc_bleInitiatorOutput_s { - uint8_t nTxConnectReq; //!< Number of transmitted CONNECT_REQ packets - uint8_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored - uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored - uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error - uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue - int8_t lastRssi; //!< The RSSI of the last received packet - ratmr_t timeStamp; //!< Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_REQ +struct __RFC_STRUCT rfc_bleInitiatorOutput_s +{ + uint8_t nTxConnectReq; //!< Number of transmitted CONNECT_REQ packets + uint8_t nRxAdvOk; //!< Number of ADV*_IND packets received with CRC OK and not ignored + uint16_t nRxAdvIgnored; //!< Number of ADV*_IND packets received with CRC OK, but ignored + uint16_t nRxAdvNok; //!< Number of ADV*_IND packets received with CRC error + uint8_t nRxAdvBufFull; //!< Number of ADV*_IND packets received that did not fit in Rx queue + int8_t lastRssi; //!< The RSSI of the last received packet + ratmr_t timeStamp; //!< Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_REQ } __RFC_STRUCT_ATTR; //! @} @@ -1067,13 +1151,14 @@ struct __RFC_STRUCT rfc_bleInitiatorOutput_s { //! @{ //! Output structure for generic Rx (CMD_BLE_GENERIC_RX) -struct __RFC_STRUCT rfc_bleGenericRxOutput_s { - uint16_t nRxOk; //!< Number of packets received with CRC OK - uint16_t nRxNok; //!< Number of packets received with CRC error - uint16_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< The RSSI of the last received packet - uint8_t __dummy0; - ratmr_t timeStamp; //!< Time stamp of the last received packet +struct __RFC_STRUCT rfc_bleGenericRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets received with CRC OK + uint16_t nRxNok; //!< Number of packets received with CRC error + uint16_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< The RSSI of the last received packet + uint8_t __dummy0; + ratmr_t timeStamp; //!< Time stamp of the last received packet } __RFC_STRUCT_ATTR; //! @} @@ -1082,8 +1167,9 @@ struct __RFC_STRUCT rfc_bleGenericRxOutput_s { //! @{ //! Output structure for Tx test (CMD_BLE_TX_TEST) -struct __RFC_STRUCT rfc_bleTxTestOutput_s { - uint16_t nTx; //!< Number of packets transmitted +struct __RFC_STRUCT rfc_bleTxTestOutput_s +{ + uint16_t nTx; //!< Number of packets transmitted } __RFC_STRUCT_ATTR; //! @} @@ -1092,19 +1178,21 @@ struct __RFC_STRUCT rfc_bleTxTestOutput_s { //! @{ //! White list entry structure -struct __RFC_STRUCT rfc_bleWhiteListEntry_s { - uint8_t size; //!< Number of while list entries. Used in the first entry of the list only - struct { - uint8_t bEnable:1; //!< 1 if the entry is in use, 0 if the entry is not in use - uint8_t addrType:1; //!< The type address in the entry -- public (0) or random (1) - uint8_t bWlIgn:1; //!< \brief 1 if the entry is to be ignored by a scanner, 0 otherwise. Used to mask out - //!< entries that have already been scanned and reported. - uint8_t :1; - uint8_t bIrkValid:1; //!< \brief 1 if a valid IRK exists, so that the entry is to be ignored by an initiator, - //!< 0 otherwise - } conf; - uint16_t address; //!< Least significant 16 bits of the address contained in the entry - uint32_t addressHi; //!< Most significant 32 bits of the address contained in the entry +struct __RFC_STRUCT rfc_bleWhiteListEntry_s +{ + uint8_t size; //!< Number of while list entries. Used in the first entry of the list only + struct + { + uint8_t bEnable: 1; //!< 1 if the entry is in use, 0 if the entry is not in use + uint8_t addrType: 1; //!< The type address in the entry -- public (0) or random (1) + uint8_t bWlIgn: 1; //!< \brief 1 if the entry is to be ignored by a scanner, 0 otherwise. Used to mask out + //!< entries that have already been scanned and reported. + uint8_t : 1; + uint8_t bIrkValid: 1; //!< \brief 1 if a valid IRK exists, so that the entry is to be ignored by an initiator, + //!< 0 otherwise + } conf; + uint16_t address; //!< Least significant 16 bits of the address contained in the entry + uint32_t addressHi; //!< Most significant 32 bits of the address contained in the entry } __RFC_STRUCT_ATTR; //! @} @@ -1113,13 +1201,15 @@ struct __RFC_STRUCT rfc_bleWhiteListEntry_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_bleRxStatus_s { - struct { - uint8_t channel:6; //!< \brief The channel on which the packet was received, provided channel is in the range - //!< 0--39; otherwise 0x3F - uint8_t bIgnore:1; //!< 1 if the packet is marked as ignored, 0 otherwise - uint8_t bCrcErr:1; //!< 1 if the packet was received with CRC error, 0 otherwise - } status; +struct __RFC_STRUCT rfc_bleRxStatus_s +{ + struct + { + uint8_t channel: 6; //!< \brief The channel on which the packet was received, provided channel is in the range + //!< 0--39; otherwise 0x3F + uint8_t bIgnore: 1; //!< 1 if the packet is marked as ignored, 0 otherwise + uint8_t bCrcErr: 1; //!< 1 if the packet was received with CRC error, 0 otherwise + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_common_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_common_cmd.h index 0a0dba66..bb5bf761 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_common_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_common_cmd.h @@ -40,17 +40,17 @@ #define __COMMON_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -104,8 +104,9 @@ typedef struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s rfc_CMD_BUS_REQUEST_t; //! \addtogroup command //! @{ -struct __RFC_STRUCT rfc_command_s { - uint16_t commandNo; //!< The command ID number +struct __RFC_STRUCT rfc_command_s +{ + uint16_t commandNo; //!< The command ID number } __RFC_STRUCT_ATTR; //! @} @@ -114,25 +115,28 @@ struct __RFC_STRUCT rfc_command_s { //! @{ //! Common definition for radio operation commands -struct __RFC_STRUCT rfc_radioOp_s { - uint16_t commandNo; //!< The command ID number - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_radioOp_s +{ + uint16_t commandNo; //!< The command ID number + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -141,25 +145,28 @@ struct __RFC_STRUCT rfc_radioOp_s { //! @{ #define CMD_NOP 0x0801 //! No Operation Command -struct __RFC_STRUCT rfc_CMD_NOP_s { - uint16_t commandNo; //!< The command ID number 0x0801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_NOP_s +{ + uint16_t commandNo; //!< The command ID number 0x0801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -168,61 +175,65 @@ struct __RFC_STRUCT rfc_CMD_NOP_s { //! @{ #define CMD_RADIO_SETUP 0x0802 //! Radio Setup Command for Pre-Defined Schemes -struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x0802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t mode; //!< \brief The main mode to use
- //!< 0x00: BLE
- //!< 0x01: IEEE 802.15.4
- //!< 0x02: 2 Mbps GFSK
- //!< 0x05: 5 Mbps coded 8-FSK
- //!< 0xFF: Keep existing mode; update overrides only
- //!< Others: Reserved - uint8_t __dummy0; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< \brief Transmit power - //!< Bits 0--5: IB - //!< Value to write to the PA power control field at 25 °C - //!< Bits 6--7: GC - //!< Value to write to the gain control of the 1st stage of the PA - //!< Bits 8--15: tempCoeff - //!< Temperature coefficient for IB. 0: No temperature compensation - uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no - //!< override is used. +struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x0802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t mode; //!< \brief The main mode to use
+ //!< 0x00: BLE
+ //!< 0x01: IEEE 802.15.4
+ //!< 0x02: 2 Mbps GFSK
+ //!< 0x05: 5 Mbps coded 8-FSK
+ //!< 0xFF: Keep existing mode; update overrides only
+ //!< Others: Reserved + uint8_t __dummy0; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< \brief Transmit power + //!< Bits 0--5: IB + //!< Value to write to the PA power control field at 25 °C + //!< Bits 6--7: GC + //!< Value to write to the gain control of the 1st stage of the PA + //!< Bits 8--15: tempCoeff + //!< Temperature coefficient for IB. 0: No temperature compensation + uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no + //!< override is used. } __RFC_STRUCT_ATTR; //! @} @@ -231,36 +242,40 @@ struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { //! @{ #define CMD_FS 0x0803 //! Frequency Synthesizer Programming Command -struct __RFC_STRUCT rfc_CMD_FS_s { - uint16_t commandNo; //!< The command ID number 0x0803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t frequency; //!< The frequency in MHz to tune to - uint16_t fractFreq; //!< Fractional part of the frequency to tune to - struct { - uint8_t bTxMode:1; //!< \brief 0: Start synth in RX mode
- //!< 1: Start synth in TX mode - uint8_t refFreq:6; //!< Reserved - } synthConf; - uint8_t __dummy0; //!< Reserved, always write 0 - uint8_t __dummy1; //!< Reserved - uint8_t __dummy2; //!< Reserved - uint16_t __dummy3; //!< Reserved +struct __RFC_STRUCT rfc_CMD_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t frequency; //!< The frequency in MHz to tune to + uint16_t fractFreq; //!< Fractional part of the frequency to tune to + struct + { + uint8_t bTxMode: 1; //!< \brief 0: Start synth in RX mode
+ //!< 1: Start synth in TX mode + uint8_t refFreq: 6; //!< Reserved + } synthConf; + uint8_t __dummy0; //!< Reserved, always write 0 + uint8_t __dummy1; //!< Reserved + uint8_t __dummy2; //!< Reserved + uint16_t __dummy3; //!< Reserved } __RFC_STRUCT_ATTR; //! @} @@ -269,25 +284,28 @@ struct __RFC_STRUCT rfc_CMD_FS_s { //! @{ #define CMD_FS_OFF 0x0804 //! Command for Turning off Frequency Synthesizer -struct __RFC_STRUCT rfc_CMD_FS_OFF_s { - uint16_t commandNo; //!< The command ID number 0x0804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_FS_OFF_s +{ + uint16_t commandNo; //!< The command ID number 0x0804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -296,43 +314,48 @@ struct __RFC_STRUCT rfc_CMD_FS_OFF_s { //! @{ #define CMD_RX_TEST 0x0807 //! Receiver Test Command -struct __RFC_STRUCT rfc_CMD_RX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x0807 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bEnaFifo:1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available
- //!< 1: Enable FIFO in modem -- the data must be read out by the application - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bNoSync:1; //!< \brief 0: Run sync search as normal for the configured mode
- //!< 1: Write correlation thresholds to the maximum value to avoid getting sync - } config; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - uint32_t syncWord; //!< Sync word to use for receiver - ratmr_t endTime; //!< Time to end the operation +struct __RFC_STRUCT rfc_CMD_RX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x0807 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bEnaFifo: 1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available
+ //!< 1: Enable FIFO in modem -- the data must be read out by the application + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bNoSync: 1; //!< \brief 0: Run sync search as normal for the configured mode
+ //!< 1: Write correlation thresholds to the maximum value to avoid getting sync + } config; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + uint32_t syncWord; //!< Sync word to use for receiver + ratmr_t endTime; //!< Time to end the operation } __RFC_STRUCT_ATTR; //! @} @@ -341,48 +364,53 @@ struct __RFC_STRUCT rfc_CMD_RX_TEST_s { //! @{ #define CMD_TX_TEST 0x0808 //! Transmitter Test Command -struct __RFC_STRUCT rfc_CMD_TX_TEST_s { - uint16_t commandNo; //!< The command ID number 0x0808 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bUseCw:1; //!< \brief 0: Send modulated signal
- //!< 1: Send continuous wave - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t whitenMode:2; //!< \brief 0: No whitening
- //!< 1: Default whitening
- //!< 2: PRBS-15
- //!< 3: PRBS-32 - } config; - uint8_t __dummy0; - uint16_t txWord; //!< Value to send to the modem before whitening - uint8_t __dummy1; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - uint32_t syncWord; //!< Sync word to use for transmitter - ratmr_t endTime; //!< Time to end the operation +struct __RFC_STRUCT rfc_CMD_TX_TEST_s +{ + uint16_t commandNo; //!< The command ID number 0x0808 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bUseCw: 1; //!< \brief 0: Send modulated signal
+ //!< 1: Send continuous wave + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t whitenMode: 2; //!< \brief 0: No whitening
+ //!< 1: Default whitening
+ //!< 2: PRBS-15
+ //!< 3: PRBS-32 + } config; + uint8_t __dummy0; + uint16_t txWord; //!< Value to send to the modem before whitening + uint8_t __dummy1; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + uint32_t syncWord; //!< Sync word to use for transmitter + ratmr_t endTime; //!< Time to end the operation } __RFC_STRUCT_ATTR; //! @} @@ -391,28 +419,31 @@ struct __RFC_STRUCT rfc_CMD_TX_TEST_s { //! @{ #define CMD_SYNC_STOP_RAT 0x0809 //! Synchronize and Stop Radio Timer Command -struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0809 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero +struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0809 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero } __RFC_STRUCT_ATTR; //! @} @@ -421,28 +452,31 @@ struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { //! @{ #define CMD_SYNC_START_RAT 0x080A //! Synchrously Start Radio Timer Command -struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { - uint16_t commandNo; //!< The command ID number 0x080A - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the - //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT +struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x080A + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the + //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT } __RFC_STRUCT_ATTR; //! @} @@ -451,27 +485,30 @@ struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { //! @{ #define CMD_COUNT 0x080B //! Counter Command -struct __RFC_STRUCT rfc_CMD_COUNT_s { - uint16_t commandNo; //!< The command ID number 0x080B - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation - //!< differs if the result is zero +struct __RFC_STRUCT rfc_CMD_COUNT_s +{ + uint16_t commandNo; //!< The command ID number 0x080B + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation + //!< differs if the result is zero } __RFC_STRUCT_ATTR; //! @} @@ -480,27 +517,30 @@ struct __RFC_STRUCT rfc_CMD_COUNT_s { //! @{ #define CMD_FS_POWERUP 0x080C //! Power up Frequency Syntheszier Command -struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { - uint16_t commandNo; //!< The command ID number 0x080C - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. +struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s +{ + uint16_t commandNo; //!< The command ID number 0x080C + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. } __RFC_STRUCT_ATTR; //! @} @@ -509,25 +549,28 @@ struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { //! @{ #define CMD_FS_POWERDOWN 0x080D //! Power down Frequency Syntheszier Command -struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { - uint16_t commandNo; //!< The command ID number 0x080D - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s +{ + uint16_t commandNo; //!< The command ID number 0x080D + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -536,28 +579,31 @@ struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { //! @{ #define CMD_SCH_IMM 0x0810 //! Run Immidiate Command as Radio Operation Command -struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { - uint16_t commandNo; //!< The command ID number 0x0810 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t __dummy0; - uint32_t cmdrVal; //!< Value as would be written to CMDR - uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA +struct __RFC_STRUCT rfc_CMD_SCH_IMM_s +{ + uint16_t commandNo; //!< The command ID number 0x0810 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t __dummy0; + uint32_t cmdrVal; //!< Value as would be written to CMDR + uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA } __RFC_STRUCT_ATTR; //! @} @@ -566,28 +612,31 @@ struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { //! @{ #define CMD_COUNT_BRANCH 0x0812 //! Counter Command with Branch of Command Chain -struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { - uint16_t commandNo; //!< The command ID number 0x0812 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation - //!< differs if the result is zero - rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if counter did not expire +struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s +{ + uint16_t commandNo; //!< The command ID number 0x0812 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation + //!< differs if the result is zero + rfc_radioOp_t* pNextOpIfOk; //!< Pointer to next operation if counter did not expire } __RFC_STRUCT_ATTR; //! @} @@ -596,45 +645,49 @@ struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { //! @{ #define CMD_PATTERN_CHECK 0x0813 //! Command for Checking a Value in Memory aginst a Pattern -struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { - uint16_t commandNo; //!< The command ID number 0x0813 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t operation:2; //!< \brief Operation to perform
- //!< 0: True if value == compareVal
- //!< 1: True if value < compareVal
- //!< 2: True if value > compareVal
- //!< 3: Reserved - uint16_t bByteRev:1; //!< \brief If 1, interchange the four bytes of the value, so that they are read - //!< most-significant-byte-first. - uint16_t bBitRev:1; //!< If 1, perform bit reversal of the value - uint16_t signExtend:5; //!< \brief 0: Treat value and compareVal as unsigned
- //!< 1--31: Treat value and compareVal as signed, where the value - //!< gives the number of the most significant bit in the signed number. - uint16_t bRxVal:1; //!< \brief 0: Use pValue as a pointer
- //!< 1: Use pValue as a signed offset to the start of the last - //!< committed RX entry element - } patternOpt; //!< Options for comparison - rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if comparison result was true - uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if patternOpt.bRxVal == 1 - uint32_t mask; //!< Bit mask to apply before comparison - uint32_t compareVal; //!< Value to compare to +struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s +{ + uint16_t commandNo; //!< The command ID number 0x0813 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t operation: 2; //!< \brief Operation to perform
+ //!< 0: True if value == compareVal
+ //!< 1: True if value < compareVal
+ //!< 2: True if value > compareVal
+ //!< 3: Reserved + uint16_t bByteRev: 1; //!< \brief If 1, interchange the four bytes of the value, so that they are read + //!< most-significant-byte-first. + uint16_t bBitRev: 1; //!< If 1, perform bit reversal of the value + uint16_t signExtend: 5; //!< \brief 0: Treat value and compareVal as unsigned
+ //!< 1--31: Treat value and compareVal as signed, where the value + //!< gives the number of the most significant bit in the signed number. + uint16_t bRxVal: 1; //!< \brief 0: Use pValue as a pointer
+ //!< 1: Use pValue as a signed offset to the start of the last + //!< committed RX entry element + } patternOpt; //!< Options for comparison + rfc_radioOp_t* pNextOpIfOk; //!< Pointer to next operation if comparison result was true + uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if patternOpt.bRxVal == 1 + uint32_t mask; //!< Bit mask to apply before comparison + uint32_t compareVal; //!< Value to compare to } __RFC_STRUCT_ATTR; //! @} @@ -643,8 +696,9 @@ struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { //! @{ #define CMD_ABORT 0x0401 //! Abort Running Radio Operation Command -struct __RFC_STRUCT rfc_CMD_ABORT_s { - uint16_t commandNo; //!< The command ID number 0x0401 +struct __RFC_STRUCT rfc_CMD_ABORT_s +{ + uint16_t commandNo; //!< The command ID number 0x0401 } __RFC_STRUCT_ATTR; //! @} @@ -653,8 +707,9 @@ struct __RFC_STRUCT rfc_CMD_ABORT_s { //! @{ #define CMD_STOP 0x0402 //! Stop Running Radio Operation Command Gracefully -struct __RFC_STRUCT rfc_CMD_STOP_s { - uint16_t commandNo; //!< The command ID number 0x0402 +struct __RFC_STRUCT rfc_CMD_STOP_s +{ + uint16_t commandNo; //!< The command ID number 0x0402 } __RFC_STRUCT_ATTR; //! @} @@ -663,8 +718,9 @@ struct __RFC_STRUCT rfc_CMD_STOP_s { //! @{ #define CMD_GET_RSSI 0x0403 //! Read RSSI Command -struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { - uint16_t commandNo; //!< The command ID number 0x0403 +struct __RFC_STRUCT rfc_CMD_GET_RSSI_s +{ + uint16_t commandNo; //!< The command ID number 0x0403 } __RFC_STRUCT_ATTR; //! @} @@ -673,10 +729,11 @@ struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { //! @{ #define CMD_UPDATE_RADIO_SETUP 0x0001 //! Update Radio Settings Command -struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x0001 - uint16_t __dummy0; - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override +struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x0001 + uint16_t __dummy0; + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override } __RFC_STRUCT_ATTR; //! @} @@ -685,9 +742,10 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { //! @{ #define CMD_TRIGGER 0x0404 //! Generate Command Trigger -struct __RFC_STRUCT rfc_CMD_TRIGGER_s { - uint16_t commandNo; //!< The command ID number 0x0404 - uint8_t triggerNo; //!< Command trigger number +struct __RFC_STRUCT rfc_CMD_TRIGGER_s +{ + uint16_t commandNo; //!< The command ID number 0x0404 + uint8_t triggerNo; //!< Command trigger number } __RFC_STRUCT_ATTR; //! @} @@ -696,12 +754,13 @@ struct __RFC_STRUCT rfc_CMD_TRIGGER_s { //! @{ #define CMD_GET_FW_INFO 0x0002 //! Request Information on the RF Core ROM Firmware -struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { - uint16_t commandNo; //!< The command ID number 0x0002 - uint16_t versionNo; //!< Firmware version number - uint16_t startOffset; //!< The start of free RAM - uint16_t freeRamSz; //!< The size of free RAM - uint16_t availRatCh; //!< Bitmap of available RAT channels +struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s +{ + uint16_t commandNo; //!< The command ID number 0x0002 + uint16_t versionNo; //!< Firmware version number + uint16_t startOffset; //!< The start of free RAM + uint16_t freeRamSz; //!< The size of free RAM + uint16_t availRatCh; //!< Bitmap of available RAT channels } __RFC_STRUCT_ATTR; //! @} @@ -710,8 +769,9 @@ struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { //! @{ #define CMD_START_RAT 0x0405 //! Asynchronously Start Radio Timer Command -struct __RFC_STRUCT rfc_CMD_START_RAT_s { - uint16_t commandNo; //!< The command ID number 0x0405 +struct __RFC_STRUCT rfc_CMD_START_RAT_s +{ + uint16_t commandNo; //!< The command ID number 0x0405 } __RFC_STRUCT_ATTR; //! @} @@ -720,8 +780,9 @@ struct __RFC_STRUCT rfc_CMD_START_RAT_s { //! @{ #define CMD_PING 0x0406 //! Respond with Command ACK Only -struct __RFC_STRUCT rfc_CMD_PING_s { - uint16_t commandNo; //!< The command ID number 0x0406 +struct __RFC_STRUCT rfc_CMD_PING_s +{ + uint16_t commandNo; //!< The command ID number 0x0406 } __RFC_STRUCT_ATTR; //! @} @@ -730,10 +791,11 @@ struct __RFC_STRUCT rfc_CMD_PING_s { //! @{ #define CMD_READ_RFREG 0x0601 //! Read RF Core Hardware Register -struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { - uint16_t commandNo; //!< The command ID number 0x0601 - uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) - uint32_t value; //!< Returned value of the register +struct __RFC_STRUCT rfc_CMD_READ_RFREG_s +{ + uint16_t commandNo; //!< The command ID number 0x0601 + uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) + uint32_t value; //!< Returned value of the register } __RFC_STRUCT_ATTR; //! @} @@ -742,11 +804,12 @@ struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { //! @{ #define CMD_ADD_DATA_ENTRY 0x0005 //! Add Data Entry to Queue -struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { - uint16_t commandNo; //!< The command ID number 0x0005 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added - uint8_t* pEntry; //!< Pointer to the entry +struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s +{ + uint16_t commandNo; //!< The command ID number 0x0005 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added + uint8_t* pEntry; //!< Pointer to the entry } __RFC_STRUCT_ATTR; //! @} @@ -755,11 +818,12 @@ struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { //! @{ #define CMD_REMOVE_DATA_ENTRY 0x0006 //! Remove First Data Entry from Queue -struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { - uint16_t commandNo; //!< The command ID number 0x0006 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed - uint8_t* pEntry; //!< Pointer to the entry that was removed +struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s +{ + uint16_t commandNo; //!< The command ID number 0x0006 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed + uint8_t* pEntry; //!< Pointer to the entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -768,11 +832,12 @@ struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { //! @{ #define CMD_FLUSH_QUEUE 0x0007 //! Flush Data Queue -struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { - uint16_t commandNo; //!< The command ID number 0x0007 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed - uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed +struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s +{ + uint16_t commandNo; //!< The command ID number 0x0007 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed + uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -781,10 +846,11 @@ struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { //! @{ #define CMD_CLEAR_RX 0x0008 //! Clear all RX Queue Entries -struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { - uint16_t commandNo; //!< The command ID number 0x0008 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared +struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x0008 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared } __RFC_STRUCT_ATTR; //! @} @@ -793,11 +859,12 @@ struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { //! @{ #define CMD_REMOVE_PENDING_ENTRIES 0x0009 //! Remove Pending Entries from Queue -struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { - uint16_t commandNo; //!< The command ID number 0x0009 - uint16_t __dummy0; - dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed - uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed +struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s +{ + uint16_t commandNo; //!< The command ID number 0x0009 + uint16_t __dummy0; + dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed + uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed } __RFC_STRUCT_ATTR; //! @} @@ -806,11 +873,12 @@ struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { //! @{ #define CMD_SET_RAT_CMP 0x000A //! Set Radio Timer Channel in Compare Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { - uint16_t commandNo; //!< The command ID number 0x000A - uint8_t ratCh; //!< The radio timer channel number - uint8_t __dummy0; - ratmr_t compareTime; //!< The time at which the compare occurs +struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s +{ + uint16_t commandNo; //!< The command ID number 0x000A + uint8_t ratCh; //!< The radio timer channel number + uint8_t __dummy0; + ratmr_t compareTime; //!< The time at which the compare occurs } __RFC_STRUCT_ATTR; //! @} @@ -819,20 +887,22 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { //! @{ #define CMD_SET_RAT_CPT 0x0603 //! Set Radio Timer Channel in Capture Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { - uint16_t commandNo; //!< The command ID number 0x0603 - struct { - uint16_t :3; - uint16_t inputSrc:5; //!< Input source indicator - uint16_t ratCh:4; //!< The radio timer channel number - uint16_t bRepeated:1; //!< \brief 0: Single capture mode
- //!< 1: Repeated capture mode - uint16_t inputMode:2; //!< \brief Input mode:
- //!< 0: Capture on rising edge
- //!< 1: Capture on falling edge
- //!< 2: Capture on both edges
- //!< 3: Reserved - } config; +struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s +{ + uint16_t commandNo; //!< The command ID number 0x0603 + struct + { + uint16_t : 3; + uint16_t inputSrc: 5; //!< Input source indicator + uint16_t ratCh: 4; //!< The radio timer channel number + uint16_t bRepeated: 1; //!< \brief 0: Single capture mode
+ //!< 1: Repeated capture mode + uint16_t inputMode: 2; //!< \brief Input mode:
+ //!< 0: Capture on rising edge
+ //!< 1: Capture on falling edge
+ //!< 2: Capture on both edges
+ //!< 3: Reserved + } config; } __RFC_STRUCT_ATTR; //! @} @@ -841,9 +911,10 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { //! @{ #define CMD_DISABLE_RAT_CH 0x0408 //! Disable Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x0408 - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x0408 + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -852,20 +923,22 @@ struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { //! @{ #define CMD_SET_RAT_OUTPUT 0x0604 //! Set Radio Timer Output to a Specified Mode -struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { - uint16_t commandNo; //!< The command ID number 0x0604 - struct { - uint16_t :2; - uint16_t outputSel:3; //!< Output event indicator - uint16_t outputMode:3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).
- //!< 1: Set output line high on event
- //!< 2: Set output line low on event
- //!< 3: Toggle (invert) output line state on event
- //!< 4: Immediately set output line to low (does not change upon event)
- //!< 5: Immediately set output line to high (does not change upon event)
- //!< Others: Reserved - uint16_t ratCh:4; //!< The radio timer channel number - } config; +struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s +{ + uint16_t commandNo; //!< The command ID number 0x0604 + struct + { + uint16_t : 2; + uint16_t outputSel: 3; //!< Output event indicator + uint16_t outputMode: 3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).
+ //!< 1: Set output line high on event
+ //!< 2: Set output line low on event
+ //!< 3: Toggle (invert) output line state on event
+ //!< 4: Immediately set output line to low (does not change upon event)
+ //!< 5: Immediately set output line to high (does not change upon event)
+ //!< Others: Reserved + uint16_t ratCh: 4; //!< The radio timer channel number + } config; } __RFC_STRUCT_ATTR; //! @} @@ -874,9 +947,10 @@ struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { //! @{ #define CMD_ARM_RAT_CH 0x0409 //! Arm Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x0409 - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x0409 + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -885,9 +959,10 @@ struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { //! @{ #define CMD_DISARM_RAT_CH 0x040A //! Disarm Radio Timer Channel -struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { - uint16_t commandNo; //!< The command ID number 0x040A - uint8_t ratCh; //!< The radio timer channel number +struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s +{ + uint16_t commandNo; //!< The command ID number 0x040A + uint8_t ratCh; //!< The radio timer channel number } __RFC_STRUCT_ATTR; //! @} @@ -896,15 +971,16 @@ struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { //! @{ #define CMD_SET_TX_POWER 0x0010 //! Set Transmit Power -struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { - uint16_t commandNo; //!< The command ID number 0x0010 - uint16_t txPower; //!< \brief New TX power setting - //!< Bits 0--5: IB - //!< Value to write to the PA power control field at 25 °C - //!< Bits 6--7: GC - //!< Value to write to the gain control of the 1st stage of the PA - //!< Bits 8--15: tempCoeff - //!< Temperature coefficient for IB. 0: No temperature compensation +struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s +{ + uint16_t commandNo; //!< The command ID number 0x0010 + uint16_t txPower; //!< \brief New TX power setting + //!< Bits 0--5: IB + //!< Value to write to the PA power control field at 25 °C + //!< Bits 6--7: GC + //!< Value to write to the gain control of the 1st stage of the PA + //!< Bits 8--15: tempCoeff + //!< Temperature coefficient for IB. 0: No temperature compensation } __RFC_STRUCT_ATTR; //! @} @@ -913,14 +989,15 @@ struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { //! @{ #define CMD_UPDATE_FS 0x0011 //! Set New Synthesizer Frequency without Recalibration -struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { - uint16_t commandNo; //!< The command ID number 0x0011 - uint16_t __dummy0; - uint32_t __dummy1; - uint32_t __dummy2; - uint16_t __dummy3; - uint16_t frequency; //!< The frequency in MHz to tune to - uint16_t fractFreq; //!< Fractional part of the frequency to tune to +struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s +{ + uint16_t commandNo; //!< The command ID number 0x0011 + uint16_t __dummy0; + uint32_t __dummy1; + uint32_t __dummy2; + uint16_t __dummy3; + uint16_t frequency; //!< The frequency in MHz to tune to + uint16_t fractFreq; //!< Fractional part of the frequency to tune to } __RFC_STRUCT_ATTR; //! @} @@ -929,10 +1006,11 @@ struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { //! @{ #define CMD_BUS_REQUEST 0x040E //! Request System Bus to be Availbale -struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s { - uint16_t commandNo; //!< The command ID number 0x040E - uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep
- //!< 1: System bus access needed +struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s +{ + uint16_t commandNo; //!< The command ID number 0x040E + uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep
+ //!< 1: System bus access needed } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_data_entry.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_data_entry.h index 026ba9db..137b7b4b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_data_entry.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_data_entry.h @@ -40,17 +40,17 @@ #define __DATA_ENTRY_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -70,25 +70,27 @@ typedef struct __RFC_STRUCT rfc_dataEntryPartial_s rfc_dataEntryPartial_t; //! \addtogroup dataEntry //! @{ -struct __RFC_STRUCT rfc_dataEntry_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field +struct __RFC_STRUCT rfc_dataEntry_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field } __RFC_STRUCT_ATTR; //! @} @@ -97,26 +99,28 @@ struct __RFC_STRUCT rfc_dataEntry_s { //! @{ //! General data entry structure (type = 0) -struct __RFC_STRUCT rfc_dataEntryGeneral_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint8_t data; //!< First byte of the data array to be received or transmitted +struct __RFC_STRUCT rfc_dataEntryGeneral_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint8_t data; //!< First byte of the data array to be received or transmitted } __RFC_STRUCT_ATTR; //! @} @@ -125,28 +129,30 @@ struct __RFC_STRUCT rfc_dataEntryGeneral_s { //! @{ //! Multi-element data entry structure (type = 1) -struct __RFC_STRUCT rfc_dataEntryMulti_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint16_t numElements; //!< Number of entry elements committed in the entry - uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU - uint8_t rxData; //!< First byte of the data array of received data entry elements +struct __RFC_STRUCT rfc_dataEntryMulti_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint16_t numElements; //!< Number of entry elements committed in the entry + uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU + uint8_t rxData; //!< First byte of the data array of received data entry elements } __RFC_STRUCT_ATTR; //! @} @@ -155,26 +161,28 @@ struct __RFC_STRUCT rfc_dataEntryMulti_s { //! @{ //! Pointer data entry structure (type = 2) -struct __RFC_STRUCT rfc_dataEntryPointer_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted +struct __RFC_STRUCT rfc_dataEntryPointer_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted } __RFC_STRUCT_ATTR; //! @} @@ -183,33 +191,36 @@ struct __RFC_STRUCT rfc_dataEntryPointer_s { //! @{ //! Partial read data entry structure (type = 3) -struct __RFC_STRUCT rfc_dataEntryPartial_s { - uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry - uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to - struct { - uint8_t type:2; //!< \brief Type of data entry structure
- //!< 0: General data entry
- //!< 1: Multi-element Rx entry
- //!< 2: Pointer entry
- //!< 3: Partial read Rx entry - uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element
- //!< 0: No length indicator
- //!< 1: One byte length indicator
- //!< 2: Two bytes length indicator
- //!< 3: Reserved - uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated - //!< by the radio CPU (0: 16 bytes) - } config; - uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
- //!< For other entries: Number of bytes following this length field - struct { - uint16_t numElements:13; //!< Number of entry elements committed in the entry - uint16_t bEntryOpen:1; //!< 1 if the entry contains an element that is still open for appending data - uint16_t bFirstCont:1; //!< 1 if the first element is a continuation of the last packet from the previous entry - uint16_t bLastCont:1; //!< 1 if the packet in the last element continues in the next entry - } pktStatus; - uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU - uint8_t rxData; //!< First byte of the data array of received data entry elements +struct __RFC_STRUCT rfc_dataEntryPartial_s +{ + uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry + uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to + struct + { + uint8_t type: 2; //!< \brief Type of data entry structure
+ //!< 0: General data entry
+ //!< 1: Multi-element Rx entry
+ //!< 2: Pointer entry
+ //!< 3: Partial read Rx entry + uint8_t lenSz: 2; //!< \brief Size of length word in start of each Rx entry element
+ //!< 0: No length indicator
+ //!< 1: One byte length indicator
+ //!< 2: Two bytes length indicator
+ //!< 3: Reserved + uint8_t irqIntv: 4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated + //!< by the radio CPU (0: 16 bytes) + } config; + uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to
+ //!< For other entries: Number of bytes following this length field + struct + { + uint16_t numElements: 13; //!< Number of entry elements committed in the entry + uint16_t bEntryOpen: 1; //!< 1 if the entry contains an element that is still open for appending data + uint16_t bFirstCont: 1; //!< 1 if the first element is a continuation of the last packet from the previous entry + uint16_t bLastCont: 1; //!< 1 if the packet in the last element continues in the next entry + } pktStatus; + uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU + uint8_t rxData; //!< First byte of the data array of received data entry elements } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_cmd.h index 02bd359a..254541bd 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_cmd.h @@ -40,17 +40,17 @@ #define __IEEE_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -83,127 +83,135 @@ typedef struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s rfc_ieeeRxCorrCrc_t; //! @{ #define CMD_IEEE_RX 0x2801 //! IEEE 802.15.4 Receive Command -struct __RFC_STRUCT rfc_CMD_IEEE_RX_s { - uint16_t commandNo; //!< The command ID number 0x2801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to tune to in the start of the operation
- //!< 0: Use existing channel
- //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
- //!< 60--207: Frequency is (2300 + channel) MHz
- //!< Others: Reserved - struct { - uint8_t bAutoFlushCrc:1; //!< If 1, automatically remove packets with CRC error from Rx queue - uint8_t bAutoFlushIgn:1; //!< If 1, automatically remove packets that can be ignored according to frame filtering from Rx queue - uint8_t bIncludePhyHdr:1; //!< If 1, include the received PHY header field in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue - uint8_t bAppendCorrCrc:1; //!< If 1, append a correlation value and CRC result byte to the packet in the Rx queue - uint8_t bAppendSrcInd:1; //!< If 1, append an index from the source matching algorithm - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue - } rxConfig; - dataQueue_t* pRxQ; //!< Pointer to receive queue - rfc_ieeeRxOutput_t *pOutput; //!< Pointer to output structure (NULL: Do not store results) - struct { - uint16_t frameFiltEn:1; //!< \brief 0: Disable frame filtering
- //!< 1: Enable frame filtering - uint16_t frameFiltStop:1; //!< \brief 0: Receive all packets to the end
- //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. - uint16_t autoAckEn:1; //!< \brief 0: Disable auto ACK
- //!< 1: Enable auto ACK. - uint16_t slottedAckEn:1; //!< \brief 0: Non-slotted ACK
- //!< 1: Slotted ACK. - uint16_t autoPendEn:1; //!< \brief 0: Auto-pend disabled
- //!< 1: Auto-pend enabled - uint16_t defaultPend:1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend - uint16_t bPendDataReqOnly:1; //!< \brief 0: Use auto-pend for any packet
- //!< 1: Use auto-pend for data request packets only - uint16_t bPanCoord:1; //!< \brief 0: Device is not PAN coordinator
- //!< 1: Device is PAN coordinator - uint16_t maxFrameVersion:2; //!< Reject frames where the frame version field in the FCF is greater than this value - uint16_t fcfReservedMask:3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero - uint16_t modifyFtFilter:2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
- //!< 0: No modification
- //!< 1: Invert MSB
- //!< 2: Set MSB to 0
- //!< 3: Set MSB to 1 - uint16_t bStrictLenFilter:1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
- //!< 1: Accept only acknowledgement frames of length 5 - } frameFiltOpt; //!< Frame filtering options - struct { - uint8_t bAcceptFt0Beacon:1; //!< \brief Treatment of frames with frame type 000 (beacon):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt1Data:1; //!< \brief Treatment of frames with frame type 001 (data):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt2Ack:1; //!< \brief Treatment of frames with frame type 010 (ACK):
- //!< 0: Reject, unless running ACK receive command
- //!< 1: Always accept - uint8_t bAcceptFt3MacCmd:1; //!< \brief Treatment of frames with frame type 011 (MAC command):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt4Reserved:1; //!< \brief Treatment of frames with frame type 100 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt5Reserved:1; //!< \brief Treatment of frames with frame type 101 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt6Reserved:1; //!< \brief Treatment of frames with frame type 110 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt7Reserved:1; //!< \brief Treatment of frames with frame type 111 (reserved):
- //!< 0: Reject
- //!< 1: Accept - } frameTypes; //!< Frame types to receive in frame filtering - struct { - uint8_t ccaEnEnergy:1; //!< Enable energy scan as CCA source - uint8_t ccaEnCorr:1; //!< Enable correlator based carrier sense as CCA source - uint8_t ccaEnSync:1; //!< Enable sync found based carrier sense as CCA source - uint8_t ccaCorrOp:1; //!< \brief Operator to use between energy based and correlator based CCA
- //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
- //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy - uint8_t ccaSyncOp:1; //!< \brief Operator to use between sync found based CCA and the others
- //!< 0: Always report busy channel if ccaSync is busy
- //!< 1: Always report idle channel if ccaSync is idle - uint8_t ccaCorrThr:2; //!< Threshold for number of correlation peaks in correlator based carrier sense - } ccaOpt; //!< CCA options - int8_t ccaRssiThr; //!< RSSI threshold for CCA - uint8_t __dummy0; - uint8_t numExtEntries; //!< Number of extended address entries - uint8_t numShortEntries; //!< Number of short address entries - uint32_t* pExtEntryList; //!< Pointer to list of extended address entries - uint32_t* pShortEntryList; //!< Pointer to list of short address entries - uint64_t localExtAddr; //!< The extended address of the local device - uint16_t localShortAddr; //!< The short address of the local device - uint16_t localPanID; //!< The PAN ID of the local device - uint16_t __dummy1; - uint8_t __dummy2; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx - //!< operation +struct __RFC_STRUCT rfc_CMD_IEEE_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x2801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to tune to in the start of the operation
+ //!< 0: Use existing channel
+ //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
+ //!< 60--207: Frequency is (2300 + channel) MHz
+ //!< Others: Reserved + struct + { + uint8_t bAutoFlushCrc: 1; //!< If 1, automatically remove packets with CRC error from Rx queue + uint8_t bAutoFlushIgn: 1; //!< If 1, automatically remove packets that can be ignored according to frame filtering from Rx queue + uint8_t bIncludePhyHdr: 1; //!< If 1, include the received PHY header field in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the Rx queue + uint8_t bAppendCorrCrc: 1; //!< If 1, append a correlation value and CRC result byte to the packet in the Rx queue + uint8_t bAppendSrcInd: 1; //!< If 1, append an index from the source matching algorithm + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the Rx queue + } rxConfig; + dataQueue_t* pRxQ; //!< Pointer to receive queue + rfc_ieeeRxOutput_t* pOutput; //!< Pointer to output structure (NULL: Do not store results) + struct + { + uint16_t frameFiltEn: 1; //!< \brief 0: Disable frame filtering
+ //!< 1: Enable frame filtering + uint16_t frameFiltStop: 1; //!< \brief 0: Receive all packets to the end
+ //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. + uint16_t autoAckEn: 1; //!< \brief 0: Disable auto ACK
+ //!< 1: Enable auto ACK. + uint16_t slottedAckEn: 1; //!< \brief 0: Non-slotted ACK
+ //!< 1: Slotted ACK. + uint16_t autoPendEn: 1; //!< \brief 0: Auto-pend disabled
+ //!< 1: Auto-pend enabled + uint16_t defaultPend: 1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend + uint16_t bPendDataReqOnly: 1; //!< \brief 0: Use auto-pend for any packet
+ //!< 1: Use auto-pend for data request packets only + uint16_t bPanCoord: 1; //!< \brief 0: Device is not PAN coordinator
+ //!< 1: Device is PAN coordinator + uint16_t maxFrameVersion: 2; //!< Reject frames where the frame version field in the FCF is greater than this value + uint16_t fcfReservedMask: 3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero + uint16_t modifyFtFilter: 2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
+ //!< 0: No modification
+ //!< 1: Invert MSB
+ //!< 2: Set MSB to 0
+ //!< 3: Set MSB to 1 + uint16_t bStrictLenFilter: 1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
+ //!< 1: Accept only acknowledgement frames of length 5 + } frameFiltOpt; //!< Frame filtering options + struct + { + uint8_t bAcceptFt0Beacon: 1; //!< \brief Treatment of frames with frame type 000 (beacon):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt1Data: 1; //!< \brief Treatment of frames with frame type 001 (data):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt2Ack: 1; //!< \brief Treatment of frames with frame type 010 (ACK):
+ //!< 0: Reject, unless running ACK receive command
+ //!< 1: Always accept + uint8_t bAcceptFt3MacCmd: 1; //!< \brief Treatment of frames with frame type 011 (MAC command):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt4Reserved: 1; //!< \brief Treatment of frames with frame type 100 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt5Reserved: 1; //!< \brief Treatment of frames with frame type 101 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt6Reserved: 1; //!< \brief Treatment of frames with frame type 110 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt7Reserved: 1; //!< \brief Treatment of frames with frame type 111 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + } frameTypes; //!< Frame types to receive in frame filtering + struct + { + uint8_t ccaEnEnergy: 1; //!< Enable energy scan as CCA source + uint8_t ccaEnCorr: 1; //!< Enable correlator based carrier sense as CCA source + uint8_t ccaEnSync: 1; //!< Enable sync found based carrier sense as CCA source + uint8_t ccaCorrOp: 1; //!< \brief Operator to use between energy based and correlator based CCA
+ //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
+ //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy + uint8_t ccaSyncOp: 1; //!< \brief Operator to use between sync found based CCA and the others
+ //!< 0: Always report busy channel if ccaSync is busy
+ //!< 1: Always report idle channel if ccaSync is idle + uint8_t ccaCorrThr: 2; //!< Threshold for number of correlation peaks in correlator based carrier sense + } ccaOpt; //!< CCA options + int8_t ccaRssiThr; //!< RSSI threshold for CCA + uint8_t __dummy0; + uint8_t numExtEntries; //!< Number of extended address entries + uint8_t numShortEntries; //!< Number of short address entries + uint32_t* pExtEntryList; //!< Pointer to list of extended address entries + uint32_t* pShortEntryList; //!< Pointer to list of short address entries + uint64_t localExtAddr; //!< The extended address of the local device + uint16_t localShortAddr; //!< The short address of the local device + uint16_t localPanID; //!< The PAN ID of the local device + uint16_t __dummy1; + uint8_t __dummy2; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx + //!< operation } __RFC_STRUCT_ATTR; //! @} @@ -212,55 +220,60 @@ struct __RFC_STRUCT rfc_CMD_IEEE_RX_s { //! @{ #define CMD_IEEE_ED_SCAN 0x2802 //! IEEE 802.15.4 Energy Detect Scan Command -struct __RFC_STRUCT rfc_CMD_IEEE_ED_SCAN_s { - uint16_t commandNo; //!< The command ID number 0x2802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t channel; //!< \brief Channel to tune to in the start of the operation
- //!< 0: Use existing channel
- //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
- //!< 60--207: Frequency is (2300 + channel) MHz
- //!< Others: Reserved - struct { - uint8_t ccaEnEnergy:1; //!< Enable energy scan as CCA source - uint8_t ccaEnCorr:1; //!< Enable correlator based carrier sense as CCA source - uint8_t ccaEnSync:1; //!< Enable sync found based carrier sense as CCA source - uint8_t ccaCorrOp:1; //!< \brief Operator to use between energy based and correlator based CCA
- //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
- //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy - uint8_t ccaSyncOp:1; //!< \brief Operator to use between sync found based CCA and the others
- //!< 0: Always report busy channel if ccaSync is busy
- //!< 1: Always report idle channel if ccaSync is idle - uint8_t ccaCorrThr:2; //!< Threshold for number of correlation peaks in correlator based carrier sense - } ccaOpt; //!< CCA options - int8_t ccaRssiThr; //!< RSSI threshold for CCA - uint8_t __dummy0; - int8_t maxRssi; //!< The maximum RSSI recorded during the ED scan - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the Rx operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx - //!< operation +struct __RFC_STRUCT rfc_CMD_IEEE_ED_SCAN_s +{ + uint16_t commandNo; //!< The command ID number 0x2802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t channel; //!< \brief Channel to tune to in the start of the operation
+ //!< 0: Use existing channel
+ //!< 11--26: Use as IEEE 802.15.4 channel, i.e. frequency is (2405 + 5 × (channel - 11)) MHz
+ //!< 60--207: Frequency is (2300 + channel) MHz
+ //!< Others: Reserved + struct + { + uint8_t ccaEnEnergy: 1; //!< Enable energy scan as CCA source + uint8_t ccaEnCorr: 1; //!< Enable correlator based carrier sense as CCA source + uint8_t ccaEnSync: 1; //!< Enable sync found based carrier sense as CCA source + uint8_t ccaCorrOp: 1; //!< \brief Operator to use between energy based and correlator based CCA
+ //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
+ //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy + uint8_t ccaSyncOp: 1; //!< \brief Operator to use between sync found based CCA and the others
+ //!< 0: Always report busy channel if ccaSync is busy
+ //!< 1: Always report idle channel if ccaSync is idle + uint8_t ccaCorrThr: 2; //!< Threshold for number of correlation peaks in correlator based carrier sense + } ccaOpt; //!< CCA options + int8_t ccaRssiThr; //!< RSSI threshold for CCA + uint8_t __dummy0; + int8_t maxRssi; //!< The maximum RSSI recorded during the ED scan + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the Rx operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the Rx + //!< operation } __RFC_STRUCT_ATTR; //! @} @@ -269,37 +282,41 @@ struct __RFC_STRUCT rfc_CMD_IEEE_ED_SCAN_s { //! @{ #define CMD_IEEE_TX 0x2C01 //! IEEE 802.15.4 Transmit Command -struct __RFC_STRUCT rfc_CMD_IEEE_TX_s { - uint16_t commandNo; //!< The command ID number 0x2C01 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bIncludePhyHdr:1; //!< \brief 0: Find PHY header automatically
- //!< 1: Insert PHY header from the buffer - uint8_t bIncludeCrc:1; //!< \brief 0: Append automatically calculated CRC
- //!< 1: Insert FCS (CRC) from the buffer - uint8_t :1; - uint8_t payloadLenMsb:5; //!< \brief Most significant bits of payload length. Should only be non-zero to create long - //!< non-standard packets for test purposes - } txOpt; - uint8_t payloadLen; //!< Number of bytes in the payload - uint8_t* pPayload; //!< Pointer to payload buffer of size payloadLen - ratmr_t timeStamp; //!< Time stamp of transmitted frame +struct __RFC_STRUCT rfc_CMD_IEEE_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x2C01 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bIncludePhyHdr: 1; //!< \brief 0: Find PHY header automatically
+ //!< 1: Insert PHY header from the buffer + uint8_t bIncludeCrc: 1; //!< \brief 0: Append automatically calculated CRC
+ //!< 1: Insert FCS (CRC) from the buffer + uint8_t : 1; + uint8_t payloadLenMsb: 5; //!< \brief Most significant bits of payload length. Should only be non-zero to create long + //!< non-standard packets for test purposes + } txOpt; + uint8_t payloadLen; //!< Number of bytes in the payload + uint8_t* pPayload; //!< Pointer to payload buffer of size payloadLen + ratmr_t timeStamp; //!< Time stamp of transmitted frame } __RFC_STRUCT_ATTR; //! @} @@ -308,53 +325,58 @@ struct __RFC_STRUCT rfc_CMD_IEEE_TX_s { //! @{ #define CMD_IEEE_CSMA 0x2C02 //! IEEE 802.15.4 CSMA-CA Command -struct __RFC_STRUCT rfc_CMD_IEEE_CSMA_s { - uint16_t commandNo; //!< The command ID number 0x2C02 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint16_t randomState; //!< The state of the pseudo-random generator - uint8_t macMaxBE; //!< The IEEE 802.15.4 MAC parameter macMaxBE - uint8_t macMaxCSMABackoffs; //!< The IEEE 802.15.4 MAC parameter macMaxCSMABackoffs - struct { - uint8_t initCW:5; //!< The initialization value for the CW parameter - uint8_t bSlotted:1; //!< \brief 0: non-slotted CSMA
- //!< 1: slotted CSMA - uint8_t rxOffMode:2; //!< \brief 0: RX stays on during CSMA backoffs
- //!< 1: The CSMA-CA algorithm will suspend the receiver if no frame is being received
- //!< 2: The CSMA-CA algorithm will suspend the receiver if no frame is being received, - //!< or after finishing it (including auto ACK) otherwise
- //!< 3: The CSMA-CA algorithm will suspend the receiver immediately during back-offs - } csmaConfig; - uint8_t NB; //!< The NB parameter from the IEEE 802.15.4 CSMA-CA algorithm - uint8_t BE; //!< The BE parameter from the IEEE 802.15.4 CSMA-CA algorithm - uint8_t remainingPeriods; //!< The number of remaining periods from a paused backoff countdown - int8_t lastRssi; //!< RSSI measured at the last CCA operation - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to end the CSMA-CA operation - ratmr_t lastTimeStamp; //!< Time of the last CCA operation - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the - //!< CSMA-CA operation +struct __RFC_STRUCT rfc_CMD_IEEE_CSMA_s +{ + uint16_t commandNo; //!< The command ID number 0x2C02 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint16_t randomState; //!< The state of the pseudo-random generator + uint8_t macMaxBE; //!< The IEEE 802.15.4 MAC parameter macMaxBE + uint8_t macMaxCSMABackoffs; //!< The IEEE 802.15.4 MAC parameter macMaxCSMABackoffs + struct + { + uint8_t initCW: 5; //!< The initialization value for the CW parameter + uint8_t bSlotted: 1; //!< \brief 0: non-slotted CSMA
+ //!< 1: slotted CSMA + uint8_t rxOffMode: 2; //!< \brief 0: RX stays on during CSMA backoffs
+ //!< 1: The CSMA-CA algorithm will suspend the receiver if no frame is being received
+ //!< 2: The CSMA-CA algorithm will suspend the receiver if no frame is being received, + //!< or after finishing it (including auto ACK) otherwise
+ //!< 3: The CSMA-CA algorithm will suspend the receiver immediately during back-offs + } csmaConfig; + uint8_t NB; //!< The NB parameter from the IEEE 802.15.4 CSMA-CA algorithm + uint8_t BE; //!< The BE parameter from the IEEE 802.15.4 CSMA-CA algorithm + uint8_t remainingPeriods; //!< The number of remaining periods from a paused backoff countdown + int8_t lastRssi; //!< RSSI measured at the last CCA operation + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to end the CSMA-CA operation + ratmr_t lastTimeStamp; //!< Time of the last CCA operation + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to end the + //!< CSMA-CA operation } __RFC_STRUCT_ATTR; //! @} @@ -363,36 +385,40 @@ struct __RFC_STRUCT rfc_CMD_IEEE_CSMA_s { //! @{ #define CMD_IEEE_RX_ACK 0x2C03 //! IEEE 802.15.4 Receive Acknowledgement Command -struct __RFC_STRUCT rfc_CMD_IEEE_RX_ACK_s { - uint16_t commandNo; //!< The command ID number 0x2C03 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - uint8_t seqNo; //!< Sequence number to expect - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger that causes the device to give up acknowledgement reception - ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to give up - //!< acknowledgement reception +struct __RFC_STRUCT rfc_CMD_IEEE_RX_ACK_s +{ + uint16_t commandNo; //!< The command ID number 0x2C03 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + uint8_t seqNo; //!< Sequence number to expect + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger that causes the device to give up acknowledgement reception + ratmr_t endTime; //!< \brief Time used together with endTrigger that causes the device to give up + //!< acknowledgement reception } __RFC_STRUCT_ATTR; //! @} @@ -401,25 +427,28 @@ struct __RFC_STRUCT rfc_CMD_IEEE_RX_ACK_s { //! @{ #define CMD_IEEE_ABORT_BG 0x2C04 //! IEEE 802.15.4 Abort Background Level Command -struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_BG_s { - uint16_t commandNo; //!< The command ID number 0x2C04 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; +struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_BG_s +{ + uint16_t commandNo; //!< The command ID number 0x2C04 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; } __RFC_STRUCT_ATTR; //! @} @@ -428,21 +457,23 @@ struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_BG_s { //! @{ #define CMD_IEEE_MOD_CCA 0x2001 //! IEEE 802.15.4 Modify CCA Parameter Command -struct __RFC_STRUCT rfc_CMD_IEEE_MOD_CCA_s { - uint16_t commandNo; //!< The command ID number 0x2001 - struct { - uint8_t ccaEnEnergy:1; //!< Enable energy scan as CCA source - uint8_t ccaEnCorr:1; //!< Enable correlator based carrier sense as CCA source - uint8_t ccaEnSync:1; //!< Enable sync found based carrier sense as CCA source - uint8_t ccaCorrOp:1; //!< \brief Operator to use between energy based and correlator based CCA
- //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
- //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy - uint8_t ccaSyncOp:1; //!< \brief Operator to use between sync found based CCA and the others
- //!< 0: Always report busy channel if ccaSync is busy
- //!< 1: Always report idle channel if ccaSync is idle - uint8_t ccaCorrThr:2; //!< Threshold for number of correlation peaks in correlator based carrier sense - } newCcaOpt; //!< New value of ccaOpt for the running background level operation - int8_t newCcaRssiThr; //!< New value of ccaRssiThr for the running background level operation +struct __RFC_STRUCT rfc_CMD_IEEE_MOD_CCA_s +{ + uint16_t commandNo; //!< The command ID number 0x2001 + struct + { + uint8_t ccaEnEnergy: 1; //!< Enable energy scan as CCA source + uint8_t ccaEnCorr: 1; //!< Enable correlator based carrier sense as CCA source + uint8_t ccaEnSync: 1; //!< Enable sync found based carrier sense as CCA source + uint8_t ccaCorrOp: 1; //!< \brief Operator to use between energy based and correlator based CCA
+ //!< 0: Report busy channel if either ccaEnergy or ccaCorr are busy
+ //!< 1: Report busy channel if both ccaEnergy and ccaCorr are busy + uint8_t ccaSyncOp: 1; //!< \brief Operator to use between sync found based CCA and the others
+ //!< 0: Always report busy channel if ccaSync is busy
+ //!< 1: Always report idle channel if ccaSync is idle + uint8_t ccaCorrThr: 2; //!< Threshold for number of correlation peaks in correlator based carrier sense + } newCcaOpt; //!< New value of ccaOpt for the running background level operation + int8_t newCcaRssiThr; //!< New value of ccaRssiThr for the running background level operation } __RFC_STRUCT_ATTR; //! @} @@ -451,60 +482,63 @@ struct __RFC_STRUCT rfc_CMD_IEEE_MOD_CCA_s { //! @{ #define CMD_IEEE_MOD_FILT 0x2002 //! IEEE 802.15.4 Modify Frame Filtering Parameter Command -struct __RFC_STRUCT rfc_CMD_IEEE_MOD_FILT_s { - uint16_t commandNo; //!< The command ID number 0x2002 - struct { - uint16_t frameFiltEn:1; //!< \brief 0: Disable frame filtering
- //!< 1: Enable frame filtering - uint16_t frameFiltStop:1; //!< \brief 0: Receive all packets to the end
- //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. - uint16_t autoAckEn:1; //!< \brief 0: Disable auto ACK
- //!< 1: Enable auto ACK. - uint16_t slottedAckEn:1; //!< \brief 0: Non-slotted ACK
- //!< 1: Slotted ACK. - uint16_t autoPendEn:1; //!< \brief 0: Auto-pend disabled
- //!< 1: Auto-pend enabled - uint16_t defaultPend:1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend - uint16_t bPendDataReqOnly:1; //!< \brief 0: Use auto-pend for any packet
- //!< 1: Use auto-pend for data request packets only - uint16_t bPanCoord:1; //!< \brief 0: Device is not PAN coordinator
- //!< 1: Device is PAN coordinator - uint16_t maxFrameVersion:2; //!< Reject frames where the frame version field in the FCF is greater than this value - uint16_t fcfReservedMask:3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero - uint16_t modifyFtFilter:2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
- //!< 0: No modification
- //!< 1: Invert MSB
- //!< 2: Set MSB to 0
- //!< 3: Set MSB to 1 - uint16_t bStrictLenFilter:1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
- //!< 1: Accept only acknowledgement frames of length 5 - } newFrameFiltOpt; //!< New value of frameFiltOpt for the running background level operation - struct { - uint8_t bAcceptFt0Beacon:1; //!< \brief Treatment of frames with frame type 000 (beacon):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt1Data:1; //!< \brief Treatment of frames with frame type 001 (data):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt2Ack:1; //!< \brief Treatment of frames with frame type 010 (ACK):
- //!< 0: Reject, unless running ACK receive command
- //!< 1: Always accept - uint8_t bAcceptFt3MacCmd:1; //!< \brief Treatment of frames with frame type 011 (MAC command):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt4Reserved:1; //!< \brief Treatment of frames with frame type 100 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt5Reserved:1; //!< \brief Treatment of frames with frame type 101 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt6Reserved:1; //!< \brief Treatment of frames with frame type 110 (reserved):
- //!< 0: Reject
- //!< 1: Accept - uint8_t bAcceptFt7Reserved:1; //!< \brief Treatment of frames with frame type 111 (reserved):
- //!< 0: Reject
- //!< 1: Accept - } newFrameTypes; //!< New value of frameTypes for the running background level operation +struct __RFC_STRUCT rfc_CMD_IEEE_MOD_FILT_s +{ + uint16_t commandNo; //!< The command ID number 0x2002 + struct + { + uint16_t frameFiltEn: 1; //!< \brief 0: Disable frame filtering
+ //!< 1: Enable frame filtering + uint16_t frameFiltStop: 1; //!< \brief 0: Receive all packets to the end
+ //!< 1: Stop receiving frame once frame filtering has caused the frame to be rejected. + uint16_t autoAckEn: 1; //!< \brief 0: Disable auto ACK
+ //!< 1: Enable auto ACK. + uint16_t slottedAckEn: 1; //!< \brief 0: Non-slotted ACK
+ //!< 1: Slotted ACK. + uint16_t autoPendEn: 1; //!< \brief 0: Auto-pend disabled
+ //!< 1: Auto-pend enabled + uint16_t defaultPend: 1; //!< The value of the pending data bit in auto ACK packets that are not subject to auto-pend + uint16_t bPendDataReqOnly: 1; //!< \brief 0: Use auto-pend for any packet
+ //!< 1: Use auto-pend for data request packets only + uint16_t bPanCoord: 1; //!< \brief 0: Device is not PAN coordinator
+ //!< 1: Device is PAN coordinator + uint16_t maxFrameVersion: 2; //!< Reject frames where the frame version field in the FCF is greater than this value + uint16_t fcfReservedMask: 3; //!< Value to be AND-ed with the reserved part of the FCF; frame rejected if result is non-zero + uint16_t modifyFtFilter: 2; //!< \brief Treatment of MSB of frame type field before frame-type filtering:
+ //!< 0: No modification
+ //!< 1: Invert MSB
+ //!< 2: Set MSB to 0
+ //!< 3: Set MSB to 1 + uint16_t bStrictLenFilter: 1; //!< \brief 0: Accept acknowledgement frames of any length >= 5
+ //!< 1: Accept only acknowledgement frames of length 5 + } newFrameFiltOpt; //!< New value of frameFiltOpt for the running background level operation + struct + { + uint8_t bAcceptFt0Beacon: 1; //!< \brief Treatment of frames with frame type 000 (beacon):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt1Data: 1; //!< \brief Treatment of frames with frame type 001 (data):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt2Ack: 1; //!< \brief Treatment of frames with frame type 010 (ACK):
+ //!< 0: Reject, unless running ACK receive command
+ //!< 1: Always accept + uint8_t bAcceptFt3MacCmd: 1; //!< \brief Treatment of frames with frame type 011 (MAC command):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt4Reserved: 1; //!< \brief Treatment of frames with frame type 100 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt5Reserved: 1; //!< \brief Treatment of frames with frame type 101 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt6Reserved: 1; //!< \brief Treatment of frames with frame type 110 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + uint8_t bAcceptFt7Reserved: 1; //!< \brief Treatment of frames with frame type 111 (reserved):
+ //!< 0: Reject
+ //!< 1: Accept + } newFrameTypes; //!< New value of frameTypes for the running background level operation } __RFC_STRUCT_ATTR; //! @} @@ -513,16 +547,18 @@ struct __RFC_STRUCT rfc_CMD_IEEE_MOD_FILT_s { //! @{ #define CMD_IEEE_MOD_SRC_MATCH 0x2003 //! IEEE 802.15.4 Enable/Disable Source Matching Entry Command -struct __RFC_STRUCT rfc_CMD_IEEE_MOD_SRC_MATCH_s { - uint16_t commandNo; //!< The command ID number 0x2003 - struct { - uint8_t bEnable:1; //!< \brief 0: Disable entry
- //!< 1: Enable entry - uint8_t srcPend:1; //!< New value of the pending bit for the entry - uint8_t entryType:1; //!< \brief 0: Short address
- //!< 1: Extended address - } options; - uint8_t entryNo; //!< Index of entry to enable or disable +struct __RFC_STRUCT rfc_CMD_IEEE_MOD_SRC_MATCH_s +{ + uint16_t commandNo; //!< The command ID number 0x2003 + struct + { + uint8_t bEnable: 1; //!< \brief 0: Disable entry
+ //!< 1: Enable entry + uint8_t srcPend: 1; //!< New value of the pending bit for the entry + uint8_t entryType: 1; //!< \brief 0: Short address
+ //!< 1: Extended address + } options; + uint8_t entryNo; //!< Index of entry to enable or disable } __RFC_STRUCT_ATTR; //! @} @@ -531,8 +567,9 @@ struct __RFC_STRUCT rfc_CMD_IEEE_MOD_SRC_MATCH_s { //! @{ #define CMD_IEEE_ABORT_FG 0x2401 //! IEEE 802.15.4 Abort Foreground Level Command -struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_FG_s { - uint16_t commandNo; //!< The command ID number 0x2401 +struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_FG_s +{ + uint16_t commandNo; //!< The command ID number 0x2401 } __RFC_STRUCT_ATTR; //! @} @@ -541,8 +578,9 @@ struct __RFC_STRUCT rfc_CMD_IEEE_ABORT_FG_s { //! @{ #define CMD_IEEE_STOP_FG 0x2402 //! IEEE 802.15.4 Gracefully Stop Foreground Level Command -struct __RFC_STRUCT rfc_CMD_IEEE_STOP_FG_s { - uint16_t commandNo; //!< The command ID number 0x2402 +struct __RFC_STRUCT rfc_CMD_IEEE_STOP_FG_s +{ + uint16_t commandNo; //!< The command ID number 0x2402 } __RFC_STRUCT_ATTR; //! @} @@ -551,27 +589,29 @@ struct __RFC_STRUCT rfc_CMD_IEEE_STOP_FG_s { //! @{ #define CMD_IEEE_CCA_REQ 0x2403 //! IEEE 802.15.4 CCA and RSSI Information Request Command -struct __RFC_STRUCT rfc_CMD_IEEE_CCA_REQ_s { - uint16_t commandNo; //!< The command ID number 0x2403 - int8_t currentRssi; //!< The RSSI currently observed on the channel - int8_t maxRssi; //!< The maximum RSSI observed on the channel since Rx was started - struct { - uint8_t ccaState:2; //!< \brief Value of the current CCA state
- //!< 0: Idle
- //!< 1: Busy
- //!< 2: Invalid - uint8_t ccaEnergy:2; //!< \brief Value of the current energy detect CCA state
- //!< 0: Idle
- //!< 1: Busy
- //!< 2: Invalid - uint8_t ccaCorr:2; //!< \brief Value of the current correlator based carrier sense CCA state
- //!< 0: Idle
- //!< 1: Busy
- //!< 2: Invalid - uint8_t ccaSync:1; //!< \brief Value of the current sync found based carrier sense CCA state
- //!< 0: Idle
- //!< 1: Busy - } ccaInfo; +struct __RFC_STRUCT rfc_CMD_IEEE_CCA_REQ_s +{ + uint16_t commandNo; //!< The command ID number 0x2403 + int8_t currentRssi; //!< The RSSI currently observed on the channel + int8_t maxRssi; //!< The maximum RSSI observed on the channel since Rx was started + struct + { + uint8_t ccaState: 2; //!< \brief Value of the current CCA state
+ //!< 0: Idle
+ //!< 1: Busy
+ //!< 2: Invalid + uint8_t ccaEnergy: 2; //!< \brief Value of the current energy detect CCA state
+ //!< 0: Idle
+ //!< 1: Busy
+ //!< 2: Invalid + uint8_t ccaCorr: 2; //!< \brief Value of the current correlator based carrier sense CCA state
+ //!< 0: Idle
+ //!< 1: Busy
+ //!< 2: Invalid + uint8_t ccaSync: 1; //!< \brief Value of the current sync found based carrier sense CCA state
+ //!< 0: Idle
+ //!< 1: Busy + } ccaInfo; } __RFC_STRUCT_ATTR; //! @} @@ -580,20 +620,21 @@ struct __RFC_STRUCT rfc_CMD_IEEE_CCA_REQ_s { //! @{ //! Output structure for CMD_IEEE_RX -struct __RFC_STRUCT rfc_ieeeRxOutput_s { - uint8_t nTxAck; //!< Total number of transmitted ACK frames - uint8_t nRxBeacon; //!< Number of received beacon frames - uint8_t nRxData; //!< Number of received data frames - uint8_t nRxAck; //!< Number of received acknowledgement frames - uint8_t nRxMacCmd; //!< Number of received MAC command frames - uint8_t nRxReserved; //!< Number of received frames with reserved frame type - uint8_t nRxNok; //!< Number of received frames with CRC error - uint8_t nRxIgnored; //!< Number of frames received that are to be ignored - uint8_t nRxBufFull; //!< Number of received frames discarded because the Rx buffer was full - int8_t lastRssi; //!< RSSI of last received frame - int8_t maxRssi; //!< Highest RSSI observed in the operation - uint8_t __dummy0; - ratmr_t beaconTimeStamp; //!< Time stamp of last received beacon frame +struct __RFC_STRUCT rfc_ieeeRxOutput_s +{ + uint8_t nTxAck; //!< Total number of transmitted ACK frames + uint8_t nRxBeacon; //!< Number of received beacon frames + uint8_t nRxData; //!< Number of received data frames + uint8_t nRxAck; //!< Number of received acknowledgement frames + uint8_t nRxMacCmd; //!< Number of received MAC command frames + uint8_t nRxReserved; //!< Number of received frames with reserved frame type + uint8_t nRxNok; //!< Number of received frames with CRC error + uint8_t nRxIgnored; //!< Number of frames received that are to be ignored + uint8_t nRxBufFull; //!< Number of received frames discarded because the Rx buffer was full + int8_t lastRssi; //!< RSSI of last received frame + int8_t maxRssi; //!< Highest RSSI observed in the operation + uint8_t __dummy0; + ratmr_t beaconTimeStamp; //!< Time stamp of last received beacon frame } __RFC_STRUCT_ATTR; //! @} @@ -602,9 +643,10 @@ struct __RFC_STRUCT rfc_ieeeRxOutput_s { //! @{ //! Structure for short address entries -struct __RFC_STRUCT rfc_shortAddrEntry_s { - uint16_t shortAddr; //!< Short address - uint16_t panId; //!< PAN ID +struct __RFC_STRUCT rfc_shortAddrEntry_s +{ + uint16_t shortAddr; //!< Short address + uint16_t panId; //!< PAN ID } __RFC_STRUCT_ATTR; //! @} @@ -613,12 +655,14 @@ struct __RFC_STRUCT rfc_shortAddrEntry_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s { - struct { - uint8_t corr:6; //!< The correlation value - uint8_t bIgnore:1; //!< 1 if the packet should be rejected by frame filtering, 0 otherwise - uint8_t bCrcErr:1; //!< 1 if the packet was received with CRC error, 0 otherwise - } status; +struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s +{ + struct + { + uint8_t corr: 6; //!< The correlation value + uint8_t bIgnore: 1; //!< 1 if the packet should be rejected by frame filtering, 0 otherwise + uint8_t bCrcErr: 1; //!< 1 if the packet was received with CRC error, 0 otherwise + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_mailbox.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_mailbox.h index e3902c2d..8c9682a3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_mailbox.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_ieee_mailbox.h @@ -57,7 +57,7 @@ #define IEEE_DONE_ACKPEND 0x2404 ///< ACK packet received with pending data bit set #define IEEE_DONE_TIMEOUT 0x2405 ///< Operation ended due to timeout #define IEEE_DONE_BGEND 0x2406 ///< FG operation ended because necessary background level - ///< operation ended +///< operation ended #define IEEE_DONE_ABORT 0x2407 ///< Operation aborted by command ///@} /// \name Operation finished with error diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_mailbox.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_mailbox.h index 956e78d8..5d6009ba 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_mailbox.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_mailbox.h @@ -60,9 +60,10 @@ typedef uint32_t ratmr_t; /// Type definition for a data queue -typedef struct { - uint8_t *pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue - uint8_t *pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue +typedef struct +{ + uint8_t* pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue + uint8_t* pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue } dataQueue_t; @@ -144,17 +145,17 @@ typedef struct { #define CMDSTA_IllegalPointer 0x81 ///< The pointer signaled in CMDR is not valid #define CMDSTA_UnknownCommand 0x82 ///< The command number in the command structure is unknown #define CMDSTA_UnknownDirCommand 0x83 ///< The command number for a direct command is unknown, or the - ///< command is not a direct command +///< command is not a direct command #define CMDSTA_ContextError 0x85 ///< An immediate or direct command was issued in a context - ///< where it is not supported +///< where it is not supported #define CMDSTA_SchedulingError 0x86 ///< A radio operation command was attempted to be scheduled - ///< while another operation was already running in the RF core +///< while another operation was already running in the RF core #define CMDSTA_ParError 0x87 ///< There were errors in the command parameters that are parsed - ///< on submission. +///< on submission. #define CMDSTA_QueueError 0x88 ///< An operation on a data entry queue was attempted that was - ///< not supported by the queue in its current state +///< not supported by the queue in its current state #define CMDSTA_QueueBusy 0x89 ///< An operation on a data entry was attempted while that entry - ///< was busy +///< was busy ///@} @@ -188,7 +189,7 @@ typedef struct { #define TRIG_REL_EVT2 9 ///< Trigs at a time relative to the context defined "Event 2" #define TRIG_EXTERNAL 10 ///< Trigs at an external event to the radio timer #define TRIG_PAST_BM 0x80 ///< Bitmask for setting pastTrig bit in order to trig immediately if - ///< trigger happened in the past +///< trigger happened in the past ///@} @@ -197,13 +198,13 @@ typedef struct { #define COND_ALWAYS 0 ///< Always run next command (except in case of Abort) #define COND_NEVER 1 ///< Never run next command #define COND_STOP_ON_FALSE 2 ///< Run next command if this command returned True, stop if it returned - ///< False +///< False #define COND_STOP_ON_TRUE 3 ///< Stop if this command returned True, run next command if it returned - ///< False +///< False #define COND_SKIP_ON_FALSE 4 ///< Run next command if this command returned True, skip a number of - ///< commands if it returned False +///< commands if it returned False #define COND_SKIP_ON_TRUE 5 ///< Skip a number of commands if this command returned True, run next - ///< command if it returned False +///< command if it returned False ///@} @@ -235,7 +236,7 @@ typedef struct { #define ERROR_PAR 0x0803 ///< Error in a command specific parameter #define ERROR_POINTER 0x0804 ///< Invalid pointer to next operation #define ERROR_CMDID 0x0805 ///< Next operation has a command ID that is undefined or not a radio - ///< operation command +///< operation command #define ERROR_WRONG_BG 0x0806 ///< FG level command not compatible with running BG level command #define ERROR_NO_SETUP 0x0807 ///< Operation using Rx or Tx attemted without CMD_RADIO_SETUP #define ERROR_NO_FS 0x0808 ///< Operation using Rx or Tx attemted without frequency synth configured @@ -272,56 +273,56 @@ typedef struct { ///@{ /// Macro for ADI half-size value-mask combination #define ADI_VAL_MASK(addr, mask, value) \ -(((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \ - ((((mask) & 0x0F) << 4) | ((value) & 0x0F))) + (((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \ + ((((mask) & 0x0F) << 4) | ((value) & 0x0F))) /// 32-bit write of 16-bit value #define HW_REG_OVERRIDE(addr, val) ((((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(val) << 16)) /// ADI register, full-size write #define ADI_REG_OVERRIDE(adiNo, addr, val) (2 | ((uint32_t)(val) << 16) | \ -(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) + (((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) /// 2 ADI registers, full-size write #define ADI_2REG_OVERRIDE(adiNo, addr, val, addr2, val2) \ -(2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \ -(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) + (2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \ + (((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31)) /// ADI register, half-size read-modify-write #define ADI_HALFREG_OVERRIDE(adiNo, addr, mask, val) (2 | (ADI_VAL_MASK(addr, mask, val) << 16) | \ -(((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) + (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) /// 2 ADI registers, half-size read-modify-write #define ADI_2HALFREG_OVERRIDE(adiNo, addr, mask, val, addr2, mask2, val2) \ -(2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \ -(ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) + (2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \ + (ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31)) /// 16-bit SW register as defined in radio_par_def.txt #define SW_REG_OVERRIDE(cmd, field, val) (3 | ((_POSITION_##cmd##_##field) << 4) | ((uint32_t)(val) << 16)) /// SW register as defined in radio_par_def.txt with added index (for use with registers > 16 bits). #define SW_REG_IND_OVERRIDE(cmd, field, offset, val) (3 | \ -(((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16)) + (((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16)) /// 8-bit SW register as defined in radio_par_def.txt #define SW_REG_BYTE_OVERRIDE(cmd, field, val) (0x8003 | ((_POSITION_##cmd##_##field) << 4) | \ -((uint32_t)(val) << 16)) + ((uint32_t)(val) << 16)) /// Two 8-bit SW registers as defined in radio_par_def.txt; the one given by field and the next byte. #define SW_REG_2BYTE_OVERRIDE(cmd, field, val0, val1) (3 | (((_POSITION_##cmd##_##field) & 0xFFFE) << 4) | \ - (((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24)) + (((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24)) #define HW16_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(length) << 16)) #define HW32_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | \ -((uint32_t)(length) << 16) | (1U << 30)) + ((uint32_t)(length) << 16) | (1U << 30)) #define ADI_ARRAY_OVERRIDE(adiNo, addr, bHalfSize, length) (1 | ((((addr) & 0x3F) << 2)) | \ -((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30)) + ((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30)) #define SW_ARRAY_OVERRIDE(cmd, firstfield, length) (1 | (((_POSITION_##cmd##_##firstfield)) << 2) | \ -((uint32_t)(length) << 16) | (3U << 30)) + ((uint32_t)(length) << 16) | (3U << 30)) #define MCE_RFE_OVERRIDE(bMceRam, mceRomBank, mceMode, bRfeRam, rfeRomBank, rfeMode) \ - (7 | ((!!(bMceRam)) << 8) | (((mceRomBank) & 0x07) << 9) | ((!!(bRfeRam)) << 12) | (((rfeRomBank) & 0x07) << 13) | \ - (((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24)) + (7 | ((!!(bMceRam)) << 8) | (((mceRomBank) & 0x07) << 9) | ((!!(bRfeRam)) << 12) | (((rfeRomBank) & 0x07) << 13) | \ + (((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24)) #define NEW_OVERRIDE_SEGMENT(address) (((((uintptr_t)(address)) & 0x03FFFFFC) << 6) | 0x000F | \ - (((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \ - (((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \ - (((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \ - (((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \ - (((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \ - (((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \ - (((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \ - (((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \ - 0x09) << 4)) // Use illegal value for illegal address range + (((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \ + (((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \ + (((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \ + (((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \ + (((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \ + (((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \ + (((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \ + (((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \ + 0x09) << 4)) // Use illegal value for illegal address range /// End of string for override register #define END_OVERRIDE 0xFFFFFFFF diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_prop_cmd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_prop_cmd.h index d97d45db..872dbd12 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_prop_cmd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rf_prop_cmd.h @@ -40,17 +40,17 @@ #define __PROP_CMD_H #ifndef __RFC_STRUCT -#define __RFC_STRUCT + #define __RFC_STRUCT #endif #ifndef __RFC_STRUCT_ATTR -#if defined(__GNUC__) -#define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) -#elif defined(__TI_ARM__) -#define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) -#else -#define __RFC_STRUCT_ATTR -#endif + #if defined(__GNUC__) + #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) + #elif defined(__TI_ARM__) + #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) + #else + #define __RFC_STRUCT_ATTR + #endif #endif //! \addtogroup rfc @@ -78,37 +78,41 @@ typedef struct __RFC_STRUCT rfc_propRxStatus_s rfc_propRxStatus_t; //! @{ #define CMD_PROP_TX 0x3801 //! Proprietary Mode Transmit Command -struct __RFC_STRUCT rfc_CMD_PROP_TX_s { - uint16_t commandNo; //!< The command ID number 0x3801 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t :2; - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Transmit length as first byte - } pktConf; - uint8_t pktLen; //!< Packet length - uint32_t syncWord; //!< Sync word to transmit - uint8_t* pPkt; //!< Pointer to packet +struct __RFC_STRUCT rfc_CMD_PROP_TX_s +{ + uint16_t commandNo; //!< The command ID number 0x3801 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t : 2; + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Transmit length as first byte + } pktConf; + uint8_t pktLen; //!< Packet length + uint32_t syncWord; //!< Sync word to transmit + uint8_t* pPkt; //!< Pointer to packet } __RFC_STRUCT_ATTR; //! @} @@ -117,70 +121,76 @@ struct __RFC_STRUCT rfc_CMD_PROP_TX_s { //! @{ #define CMD_PROP_RX 0x3802 //! Proprietary Mode Receive Command -struct __RFC_STRUCT rfc_CMD_PROP_RX_s { - uint16_t commandNo; //!< The command ID number 0x3802 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bVarLen:1; //!< \brief 0: Fixed length
- //!< 1: Receive length as first byte - uint8_t bChkAddress:1; //!< \brief 0: No address check
- //!< 1: Check address - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord; //!< Sync word to listen for - uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - uint8_t address0; //!< Address - uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept - //!< 0x00 as well) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_PROP_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3802 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bVarLen: 1; //!< \brief 0: Fixed length
+ //!< 1: Receive length as first byte + uint8_t bChkAddress: 1; //!< \brief 0: No address check
+ //!< 1: Check address + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord; //!< Sync word to listen for + uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + uint8_t address0; //!< Address + uint8_t address1; //!< \brief Address (set equal to address0 to accept only one address. If 0xFF, accept + //!< 0x00 as well) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -189,62 +199,68 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_s { //! @{ #define CMD_PROP_TX_ADV 0x3803 //! Proprietary Mode Advanced Transmit Command -struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s { - uint16_t commandNo; //!< The command ID number 0x3803 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t :2; - uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC
- //!< 1: Append CRC - uint8_t bCrcIncSw:1; //!< \brief 0:Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - } pktConf; - uint8_t numHdrBits; //!< Number of bits in header (0--32) - uint16_t pktLen; //!< Packet length. 0: Unlimited - struct { - uint8_t bExtTxTrig:1; //!< \brief 0: Start packet on a fixed time from the command start trigger
- //!< 1: Start packet on an external trigger (input event to RAT) - uint8_t inputMode:2; //!< \brief Input mode if external trigger is used for TX start
- //!< 0: Rising edge
- //!< 1: Falling edge
- //!< 2: Both edges
- //!< 3: Reserved - uint8_t source:5; //!< RAT input event number used for capture if external trigger is used for TX start - } startConf; - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } preTrigger; //!< Trigger for transition from preamble to sync word - ratmr_t preTime; //!< \brief Time used together with preTrigger for transition from preamble to sync - //!< word. If preTrigger.triggerType is set to "now", one preamble as - //!< configured in the setup will be sent. Otherwise, the preamble will be repeated until - //!< this trigger is observed. - uint32_t syncWord; //!< Sync word to transmit - uint8_t* pPkt; //!< Pointer to packet, or TX queue for unlimited length +struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x3803 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t : 2; + uint8_t bUseCrc: 1; //!< \brief 0: Do not append CRC
+ //!< 1: Append CRC + uint8_t bCrcIncSw: 1; //!< \brief 0:Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + } pktConf; + uint8_t numHdrBits; //!< Number of bits in header (0--32) + uint16_t pktLen; //!< Packet length. 0: Unlimited + struct + { + uint8_t bExtTxTrig: 1; //!< \brief 0: Start packet on a fixed time from the command start trigger
+ //!< 1: Start packet on an external trigger (input event to RAT) + uint8_t inputMode: 2; //!< \brief Input mode if external trigger is used for TX start
+ //!< 0: Rising edge
+ //!< 1: Falling edge
+ //!< 2: Both edges
+ //!< 3: Reserved + uint8_t source: 5; //!< RAT input event number used for capture if external trigger is used for TX start + } startConf; + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } preTrigger; //!< Trigger for transition from preamble to sync word + ratmr_t preTime; //!< \brief Time used together with preTrigger for transition from preamble to sync + //!< word. If preTrigger.triggerType is set to "now", one preamble as + //!< configured in the setup will be sent. Otherwise, the preamble will be repeated until + //!< this trigger is observed. + uint32_t syncWord; //!< Sync word to transmit + uint8_t* pPkt; //!< Pointer to packet, or TX queue for unlimited length } __RFC_STRUCT_ATTR; //! @} @@ -253,84 +269,92 @@ struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s { //! @{ #define CMD_PROP_RX_ADV 0x3804 //! Proprietary Mode Advanced Receive Command -struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s { - uint16_t commandNo; //!< The command ID number 0x3804 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command
- //!< 1: Turn frequency synth off after command - uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly
- //!< 1: Go back to sync search after receiving a packet correctly - uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error
- //!< 1: Go back to sync search after receiving a packet with CRC error - uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC
- //!< 1: Check CRC - uint8_t bCrcIncSw:1; //!< \brief 0: Do not include sync word in CRC calculation
- //!< 1: Include sync word in CRC calculation - uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation
- //!< 1: Include header in CRC calculation - uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
- //!< 1: Packet reception is stopped if end trigger happens - uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
- //!< 1: Receive packet and mark it as ignored on address mismatch - } pktConf; - struct { - uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue - uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue - uint8_t :1; - uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it - uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it - uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue - uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue - uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue - } rxConf; //!< RX configuration - uint32_t syncWord0; //!< Sync word to listen for - uint32_t syncWord1; //!< Alternative sync word if non-zero - uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
- //!< 0: Unlimited or unknown length - struct { - uint16_t numHdrBits:6; //!< Number of bits in header (0--32) - uint16_t lenPos:5; //!< Position of length field in header (0--31) - uint16_t numLenBits:5; //!< Number of bits in length field (0--16) - } hdrConf; - struct { - uint16_t addrType:1; //!< \brief 0: Address after header
- //!< 1: Address in header - uint16_t addrSize:5; //!< \brief If addrType = 0: Address size in bytes
- //!< If addrType = 1: Address size in bits - uint16_t addrPos:5; //!< \brief If addrType = 1: Bit position of address in header
- //!< If addrType = 0: Non-zero to extend address with sync word identifier - uint16_t numAddr:5; //!< Number of addresses in address list - } addrConf; - int8_t lenOffset; //!< Signed value to add to length field - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } endTrigger; //!< Trigger classifier for ending the operation - ratmr_t endTime; //!< Time used together with endTrigger for ending the operation - uint8_t* pAddr; //!< Pointer to address list - dataQueue_t* pQueue; //!< Pointer to receive queue - uint8_t* pOutput; //!< Pointer to output structure +struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s +{ + uint16_t commandNo; //!< The command ID number 0x3804 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint8_t bFsOff: 1; //!< \brief 0: Keep frequency synth on after command
+ //!< 1: Turn frequency synth off after command + uint8_t bRepeatOk: 1; //!< \brief 0: End operation after receiving a packet correctly
+ //!< 1: Go back to sync search after receiving a packet correctly + uint8_t bRepeatNok: 1; //!< \brief 0: End operation after receiving a packet with CRC error
+ //!< 1: Go back to sync search after receiving a packet with CRC error + uint8_t bUseCrc: 1; //!< \brief 0: Do not check CRC
+ //!< 1: Check CRC + uint8_t bCrcIncSw: 1; //!< \brief 0: Do not include sync word in CRC calculation
+ //!< 1: Include sync word in CRC calculation + uint8_t bCrcIncHdr: 1; //!< \brief 0: Do not include header in CRC calculation
+ //!< 1: Include header in CRC calculation + uint8_t endType: 1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained
+ //!< 1: Packet reception is stopped if end trigger happens + uint8_t filterOp: 1; //!< \brief 0: Stop receiver and restart sync search on address mismatch
+ //!< 1: Receive packet and mark it as ignored on address mismatch + } pktConf; + struct + { + uint8_t bAutoFlushIgnored: 1; //!< If 1, automatically discard ignored packets from RX queue + uint8_t bAutoFlushCrcErr: 1; //!< If 1, automatically discard packets with CRC error from RX queue + uint8_t : 1; + uint8_t bIncludeHdr: 1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it + uint8_t bIncludeCrc: 1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it + uint8_t bAppendRssi: 1; //!< If 1, append an RSSI byte to the packet in the RX queue + uint8_t bAppendTimestamp: 1; //!< If 1, append a timestamp to the packet in the RX queue + uint8_t bAppendStatus: 1; //!< If 1, append a status byte to the packet in the RX queue + } rxConf; //!< RX configuration + uint32_t syncWord0; //!< Sync word to listen for + uint32_t syncWord1; //!< Alternative sync word if non-zero + uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length
+ //!< 0: Unlimited or unknown length + struct + { + uint16_t numHdrBits: 6; //!< Number of bits in header (0--32) + uint16_t lenPos: 5; //!< Position of length field in header (0--31) + uint16_t numLenBits: 5; //!< Number of bits in length field (0--16) + } hdrConf; + struct + { + uint16_t addrType: 1; //!< \brief 0: Address after header
+ //!< 1: Address in header + uint16_t addrSize: 5; //!< \brief If addrType = 0: Address size in bytes
+ //!< If addrType = 1: Address size in bits + uint16_t addrPos: 5; //!< \brief If addrType = 1: Bit position of address in header
+ //!< If addrType = 0: Non-zero to extend address with sync word identifier + uint16_t numAddr: 5; //!< Number of addresses in address list + } addrConf; + int8_t lenOffset; //!< Signed value to add to length field + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } endTrigger; //!< Trigger classifier for ending the operation + ratmr_t endTime; //!< Time used together with endTrigger for ending the operation + uint8_t* pAddr; //!< Pointer to address list + dataQueue_t* pQueue; //!< Pointer to receive queue + uint8_t* pOutput; //!< Pointer to output structure } __RFC_STRUCT_ATTR; //! @} @@ -339,92 +363,100 @@ struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s { //! @{ #define CMD_PROP_RADIO_SETUP 0x3806 //! Proprietary Mode Radio Setup Command -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s { - uint16_t commandNo; //!< The command ID number 0x3806 - uint16_t status; //!< \brief An integer telling the status of the command. This value is - //!< updated by the radio CPU during operation and may be read by the - //!< system CPU at any time. - rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done - ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) - struct { - uint8_t triggerType:4; //!< The type of trigger - uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command
- //!< 1: CMD_TRIGGER can be used as an alternative trigger - uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action - uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
- //!< 1: A trigger in the past is triggered as soon as possible - } startTrigger; //!< Identification of the trigger that starts the operation - struct { - uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed - uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... - } condition; - struct { - uint16_t modType:3; //!< \brief 0: FSK
- //!< 1: GFSK
- //!< Others: Reserved - uint16_t deviation:13; //!< Deviation (250 Hz steps) - } modulation; - struct { - uint32_t preScale:4; //!< Prescaler value - uint32_t :4; - uint32_t rateWord:21; //!< Rate word - } symbolRate; //!< Symbol rate setting - uint8_t rxBw; //!< Receiver bandwidth - struct { - uint8_t nPreamBytes:6; //!< \brief 0: 1 preamble bit
- //!< 1--16: Number of preamble bytes
- //!< 18, 20, ..., 30: Number of preamble bytes
- //!< 31: 4 preamble bits
- //!< 32: 32 preamble bytes
- //!< Others: Reserved - uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit
- //!< 1: Send 1 as the first preamble bit
- //!< 2: Send same first bit in preamble and sync word
- //!< 3: Send different first bit in preamble and sync word - } preamConf; - struct { - uint16_t nSwBits:6; //!< Number of sync word bits (8--32) - uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1
- //!< 1: Use positive deviation for 0 - uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first
- //!< 1: Most significant bit transmitted first - uint16_t fecMode:4; //!< \brief Select coding
- //!< 0: Uncoded binary modulation
- //!< Others: Reserved - uint16_t bOuterCode:1; //!< Reserved - uint16_t whitenMode:2; //!< \brief 0: No whitening
- //!< 1: CC1101/CC2500 compatible whitening
- //!< 2: PN9 whitening without byte reversal
- //!< 3: Reserved - uint16_t bAgcDisable:1; //!< Reserved - } formatConf; - struct { - uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode
- //!< 0x01: Single-ended mode RFP
- //!< 0x02: Single-ended mode RFN
- //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
- //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
- //!< Others: Reserved - uint16_t biasMode:1; //!< \brief 0: Internal bias
- //!< 1: External bias - uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.
- //!< Required first time after boot and when changing frequency band - //!< or front-end configuration
- //!< 0x2D: Keep analog configuration.
- //!< May be used after standby or when changing mode with the same frequency - //!< band and front-end configuration
- //!< Others: Reserved - uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth
- //!< 1: Do not power up frequency synth - } config; //!< Configuration options - uint16_t txPower; //!< \brief Transmit power - //!< Bits 0--5: IB - //!< Value to write to the PA power control field at 25 °C - //!< Bits 6--7: GC - //!< Value to write to the gain control of the 1st stage of the PA - //!< Bits 8--15: tempCoeff - //!< Temperature coefficient for IB. 0: No temperature compensation - uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s +{ + uint16_t commandNo; //!< The command ID number 0x3806 + uint16_t status; //!< \brief An integer telling the status of the command. This value is + //!< updated by the radio CPU during operation and may be read by the + //!< system CPU at any time. + rfc_radioOp_t* pNextOp; //!< Pointer to the next operation to run after this operation is done + ratmr_t startTime; //!< Absolute or relative start time (depending on the value of startTrigger) + struct + { + uint8_t triggerType: 4; //!< The type of trigger + uint8_t bEnaCmd: 1; //!< \brief 0: No alternative trigger command
+ //!< 1: CMD_TRIGGER can be used as an alternative trigger + uint8_t triggerNo: 2; //!< The trigger number of the CMD_TRIGGER command that triggers this action + uint8_t pastTrig: 1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error
+ //!< 1: A trigger in the past is triggered as soon as possible + } startTrigger; //!< Identification of the trigger that starts the operation + struct + { + uint8_t rule: 4; //!< Condition for running next command: Rule for how to proceed + uint8_t nSkip: 4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... + } condition; + struct + { + uint16_t modType: 3; //!< \brief 0: FSK
+ //!< 1: GFSK
+ //!< Others: Reserved + uint16_t deviation: 13; //!< Deviation (250 Hz steps) + } modulation; + struct + { + uint32_t preScale: 4; //!< Prescaler value + uint32_t : 4; + uint32_t rateWord: 21; //!< Rate word + } symbolRate; //!< Symbol rate setting + uint8_t rxBw; //!< Receiver bandwidth + struct + { + uint8_t nPreamBytes: 6; //!< \brief 0: 1 preamble bit
+ //!< 1--16: Number of preamble bytes
+ //!< 18, 20, ..., 30: Number of preamble bytes
+ //!< 31: 4 preamble bits
+ //!< 32: 32 preamble bytes
+ //!< Others: Reserved + uint8_t preamMode: 2; //!< \brief 0: Send 0 as the first preamble bit
+ //!< 1: Send 1 as the first preamble bit
+ //!< 2: Send same first bit in preamble and sync word
+ //!< 3: Send different first bit in preamble and sync word + } preamConf; + struct + { + uint16_t nSwBits: 6; //!< Number of sync word bits (8--32) + uint16_t bBitReversal: 1; //!< \brief 0: Use positive deviation for 1
+ //!< 1: Use positive deviation for 0 + uint16_t bMsbFirst: 1; //!< \brief 0: Least significant bit transmitted first
+ //!< 1: Most significant bit transmitted first + uint16_t fecMode: 4; //!< \brief Select coding
+ //!< 0: Uncoded binary modulation
+ //!< Others: Reserved + uint16_t bOuterCode: 1; //!< Reserved + uint16_t whitenMode: 2; //!< \brief 0: No whitening
+ //!< 1: CC1101/CC2500 compatible whitening
+ //!< 2: PN9 whitening without byte reversal
+ //!< 3: Reserved + uint16_t bAgcDisable: 1; //!< Reserved + } formatConf; + struct + { + uint16_t frontEndMode: 3; //!< \brief 0x00: Differential mode
+ //!< 0x01: Single-ended mode RFP
+ //!< 0x02: Single-ended mode RFN
+ //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)
+ //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)
+ //!< Others: Reserved + uint16_t biasMode: 1; //!< \brief 0: Internal bias
+ //!< 1: External bias + uint16_t analogCfgMode: 6; //!< \brief 0x00: Write analog configuration.
+ //!< Required first time after boot and when changing frequency band + //!< or front-end configuration
+ //!< 0x2D: Keep analog configuration.
+ //!< May be used after standby or when changing mode with the same frequency + //!< band and front-end configuration
+ //!< Others: Reserved + uint16_t bNoFsPowerUp: 1; //!< \brief 0: Power up frequency synth
+ //!< 1: Do not power up frequency synth + } config; //!< Configuration options + uint16_t txPower; //!< \brief Transmit power + //!< Bits 0--5: IB + //!< Value to write to the PA power control field at 25 °C + //!< Bits 6--7: GC + //!< Value to write to the gain control of the 1st stage of the PA + //!< Bits 8--15: tempCoeff + //!< Temperature coefficient for IB. 0: No temperature compensation + uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. } __RFC_STRUCT_ATTR; //! @} @@ -433,8 +465,9 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s { //! @{ #define CMD_PROP_RADIO_DIV_SETUP 0x3807 //! Define only for compatibility with CC13XX family. Command will result in error if sent. -struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s { - uint8_t dummy0; +struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s +{ + uint8_t dummy0; } __RFC_STRUCT_ATTR; //! @} @@ -443,9 +476,10 @@ struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s { //! @{ #define CMD_PROP_SET_LEN 0x3401 //! Set Packet Length Command -struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s { - uint16_t commandNo; //!< The command ID number 0x3401 - uint16_t rxLen; //!< Payload length to use +struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s +{ + uint16_t commandNo; //!< The command ID number 0x3401 + uint16_t rxLen; //!< Payload length to use } __RFC_STRUCT_ATTR; //! @} @@ -454,8 +488,9 @@ struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s { //! @{ #define CMD_PROP_RESTART_RX 0x3402 //! Restart Packet Command -struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s { - uint16_t commandNo; //!< The command ID number 0x3402 +struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s +{ + uint16_t commandNo; //!< The command ID number 0x3402 } __RFC_STRUCT_ATTR; //! @} @@ -464,14 +499,15 @@ struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s { //! @{ //! Output structure for RX operations -struct __RFC_STRUCT rfc_propRxOutput_s { - uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored - uint16_t nRxNok; //!< Number of packets that have been received with CRC error - uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch - uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1 - uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space - int8_t lastRssi; //!< RSSI of last received packet - ratmr_t timeStamp; //!< Time stamp of last received packet +struct __RFC_STRUCT rfc_propRxOutput_s +{ + uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored + uint16_t nRxNok; //!< Number of packets that have been received with CRC error + uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch + uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1 + uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space + int8_t lastRssi; //!< RSSI of last received packet + ratmr_t timeStamp; //!< Time stamp of last received packet } __RFC_STRUCT_ATTR; //! @} @@ -480,15 +516,17 @@ struct __RFC_STRUCT rfc_propRxOutput_s { //! @{ //! Receive status byte that may be appended to message in receive buffer -struct __RFC_STRUCT rfc_propRxStatus_s { - struct { - uint8_t addressInd:5; //!< Index of address found (0 if not applicable) - uint8_t syncWordId:1; //!< 0 for primary sync word, 1 for alternate sync word - uint8_t result:2; //!< \brief 0: Packet received correctly, not ignored
- //!< 1: Packet received with CRC error
- //!< 2: Packet received correctly, but can be ignored
- //!< 3: Packet reception was aborted - } status; +struct __RFC_STRUCT rfc_propRxStatus_s +{ + struct + { + uint8_t addressInd: 5; //!< Index of address found (0 if not applicable) + uint8_t syncWordId: 1; //!< 0 for primary sync word, 1 for alternate sync word + uint8_t result: 2; //!< \brief 0: Packet received correctly, not ignored
+ //!< 1: Packet received with CRC error
+ //!< 2: Packet received correctly, but can be ignored
+ //!< 3: Packet reception was aborted + } status; } __RFC_STRUCT_ATTR; //! @} diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rfc.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rfc.h index 6ad3a442..a2377ced 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rfc.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rfc.h @@ -71,11 +71,12 @@ extern "C" #include "rf_ble_cmd.h" // Definition of RFTRIM container -typedef struct { - uint32_t configIfAdc; - uint32_t configRfFrontend; - uint32_t configSynth; - uint32_t configMiscAdc; +typedef struct +{ + uint32_t configIfAdc; + uint32_t configRfFrontend; + uint32_t configSynth; + uint32_t configMiscAdc; } rfTrim_t; // Definition of maximum search depth used by the RFCOverrideUpdate function @@ -95,17 +96,17 @@ typedef struct { // //***************************************************************************** #if !defined(DOXYGEN) - #define RFCCpeIntGetAndClear NOROM_RFCCpeIntGetAndClear - #define RFCDoorbellSendTo NOROM_RFCDoorbellSendTo - #define RFCSynthPowerDown NOROM_RFCSynthPowerDown - #define RFCCpePatchReset NOROM_RFCCpePatchReset - #define RFCOverrideSearch NOROM_RFCOverrideSearch - #define RFCOverrideUpdate NOROM_RFCOverrideUpdate - #define RFCHwIntGetAndClear NOROM_RFCHwIntGetAndClear - #define RFCRfTrimRead NOROM_RFCRfTrimRead - #define RFCRfTrimSet NOROM_RFCRfTrimSet - #define RFCRTrim NOROM_RFCRTrim - #define RFCAdi3VcoLdoVoltageMode NOROM_RFCAdi3VcoLdoVoltageMode +#define RFCCpeIntGetAndClear NOROM_RFCCpeIntGetAndClear +#define RFCDoorbellSendTo NOROM_RFCDoorbellSendTo +#define RFCSynthPowerDown NOROM_RFCSynthPowerDown +#define RFCCpePatchReset NOROM_RFCCpePatchReset +#define RFCOverrideSearch NOROM_RFCOverrideSearch +#define RFCOverrideUpdate NOROM_RFCOverrideUpdate +#define RFCHwIntGetAndClear NOROM_RFCHwIntGetAndClear +#define RFCRfTrimRead NOROM_RFCRfTrimRead +#define RFCRfTrimSet NOROM_RFCRfTrimSet +#define RFCRTrim NOROM_RFCRTrim +#define RFCAdi3VcoLdoVoltageMode NOROM_RFCAdi3VcoLdoVoltageMode #endif //***************************************************************************** @@ -130,8 +131,8 @@ RFCClockEnable(void) { // Enable basic clocks to get the CPE run HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = RFC_PWR_PWMCLKEN_CPERAM - | RFC_PWR_PWMCLKEN_CPE - | RFC_PWR_PWMCLKEN_RFC; + | RFC_PWR_PWMCLKEN_CPE + | RFC_PWR_PWMCLKEN_RFC; } @@ -170,7 +171,7 @@ RFCCpeIntClear(uint32_t ui32Mask) do { HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) = ~ui32Mask; - }while(HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) & ui32Mask); + } while (HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) & ui32Mask); } @@ -353,7 +354,7 @@ extern void RFCCpePatchReset(void); // Function to search an override list for the provided pattern within the search depth. // //***************************************************************************** -extern uint8_t RFCOverrideSearch(const uint32_t *pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth); +extern uint8_t RFCOverrideSearch(const uint32_t* pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth); //***************************************************************************** @@ -361,7 +362,7 @@ extern uint8_t RFCOverrideSearch(const uint32_t *pOverride, const uint32_t patte //! Function to update override list // //***************************************************************************** -extern uint8_t RFCOverrideUpdate(rfc_radioOp_t *pOpSetup, uint32_t *pParams); +extern uint8_t RFCOverrideUpdate(rfc_radioOp_t* pOpSetup, uint32_t* pParams); //***************************************************************************** @@ -384,7 +385,7 @@ extern uint32_t RFCHwIntGetAndClear(uint32_t ui32Mask); //! Read RF trim from flash using CM3. // //***************************************************************************** -extern void RFCRfTrimRead(rfc_radioOp_t *pOpSetup, rfTrim_t* rfTrim); +extern void RFCRfTrimRead(rfc_radioOp_t* pOpSetup, rfTrim_t* rfTrim); //***************************************************************************** @@ -400,7 +401,7 @@ extern void RFCRfTrimSet(rfTrim_t* rfTrim); //! Check Override RTrim vs FCFG RTrim. // //***************************************************************************** -extern uint8_t RFCRTrim(rfc_radioOp_t *pOpSetup); +extern uint8_t RFCRTrim(rfc_radioOp_t* pOpSetup); //***************************************************************************** @@ -417,51 +418,51 @@ extern void RFCAdi3VcoLdoVoltageMode(bool bEnable); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_RFCCpeIntGetAndClear - #undef RFCCpeIntGetAndClear - #define RFCCpeIntGetAndClear ROM_RFCCpeIntGetAndClear - #endif - #ifdef ROM_RFCDoorbellSendTo - #undef RFCDoorbellSendTo - #define RFCDoorbellSendTo ROM_RFCDoorbellSendTo - #endif - #ifdef ROM_RFCSynthPowerDown - #undef RFCSynthPowerDown - #define RFCSynthPowerDown ROM_RFCSynthPowerDown - #endif - #ifdef ROM_RFCCpePatchReset - #undef RFCCpePatchReset - #define RFCCpePatchReset ROM_RFCCpePatchReset - #endif - #ifdef ROM_RFCOverrideSearch - #undef RFCOverrideSearch - #define RFCOverrideSearch ROM_RFCOverrideSearch - #endif - #ifdef ROM_RFCOverrideUpdate - #undef RFCOverrideUpdate - #define RFCOverrideUpdate ROM_RFCOverrideUpdate - #endif - #ifdef ROM_RFCHwIntGetAndClear - #undef RFCHwIntGetAndClear - #define RFCHwIntGetAndClear ROM_RFCHwIntGetAndClear - #endif - #ifdef ROM_RFCRfTrimRead - #undef RFCRfTrimRead - #define RFCRfTrimRead ROM_RFCRfTrimRead - #endif - #ifdef ROM_RFCRfTrimSet - #undef RFCRfTrimSet - #define RFCRfTrimSet ROM_RFCRfTrimSet - #endif - #ifdef ROM_RFCRTrim - #undef RFCRTrim - #define RFCRTrim ROM_RFCRTrim - #endif - #ifdef ROM_RFCAdi3VcoLdoVoltageMode - #undef RFCAdi3VcoLdoVoltageMode - #define RFCAdi3VcoLdoVoltageMode ROM_RFCAdi3VcoLdoVoltageMode - #endif +#include "../driverlib/rom.h" +#ifdef ROM_RFCCpeIntGetAndClear +#undef RFCCpeIntGetAndClear +#define RFCCpeIntGetAndClear ROM_RFCCpeIntGetAndClear +#endif +#ifdef ROM_RFCDoorbellSendTo +#undef RFCDoorbellSendTo +#define RFCDoorbellSendTo ROM_RFCDoorbellSendTo +#endif +#ifdef ROM_RFCSynthPowerDown +#undef RFCSynthPowerDown +#define RFCSynthPowerDown ROM_RFCSynthPowerDown +#endif +#ifdef ROM_RFCCpePatchReset +#undef RFCCpePatchReset +#define RFCCpePatchReset ROM_RFCCpePatchReset +#endif +#ifdef ROM_RFCOverrideSearch +#undef RFCOverrideSearch +#define RFCOverrideSearch ROM_RFCOverrideSearch +#endif +#ifdef ROM_RFCOverrideUpdate +#undef RFCOverrideUpdate +#define RFCOverrideUpdate ROM_RFCOverrideUpdate +#endif +#ifdef ROM_RFCHwIntGetAndClear +#undef RFCHwIntGetAndClear +#define RFCHwIntGetAndClear ROM_RFCHwIntGetAndClear +#endif +#ifdef ROM_RFCRfTrimRead +#undef RFCRfTrimRead +#define RFCRfTrimRead ROM_RFCRfTrimRead +#endif +#ifdef ROM_RFCRfTrimSet +#undef RFCRfTrimSet +#define RFCRfTrimSet ROM_RFCRfTrimSet +#endif +#ifdef ROM_RFCRTrim +#undef RFCRTrim +#define RFCRTrim ROM_RFCRTrim +#endif +#ifdef ROM_RFCAdi3VcoLdoVoltageMode +#undef RFCAdi3VcoLdoVoltageMode +#define RFCAdi3VcoLdoVoltageMode ROM_RFCAdi3VcoLdoVoltageMode +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom.h index 38a95197..ac2061f1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom.h @@ -59,9 +59,9 @@ extern "C" #define ROM_HAPI_TABLE_ADDR 0x10000048 // ROM Hard-API function interface types -typedef uint32_t (* FPTR_CRC32_T) ( uint8_t* /* pui8Data */,\ - uint32_t /* ui32ByteCount */,\ - uint32_t /* ui32RepeatCount */); +typedef uint32_t (* FPTR_CRC32_T) ( uint8_t* /* pui8Data */, \ + uint32_t /* ui32ByteCount */, \ + uint32_t /* ui32RepeatCount */); typedef uint32_t (* FPTR_GETFLSIZE_T) ( void ); @@ -71,26 +71,26 @@ typedef uint32_t (* FPTR_RESERVED1_T) ( uint32_t ); typedef uint32_t (* FPTR_RESERVED2_T) ( void ); -typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t* ,\ - uint32_t ,\ - uint32_t ); +typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t*, \ + uint32_t, \ + uint32_t ); typedef void (* FPTR_RESETDEV_T) ( void ); -typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */,\ - uint16_t /* ui16WordCount */,\ - uint16_t /* ui16RepeatCount */); +typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */, \ + uint16_t /* ui16WordCount */, \ + uint16_t /* ui16RepeatCount */); -typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); -typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */,\ - uint32_t /* ui32DataCount */); +typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */, \ + uint32_t /* ui32DataCount */); typedef void (* FPTR_HFSOURCESAFESWITCH_T) ( void ); @@ -106,9 +106,9 @@ typedef void (* FPTR_ADCCOMPBIN_T) ( uint8_t /* ut8Signal typedef void (* FPTR_COMPBREF_T) ( uint8_t /* ut8Signal */); -extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer, - uint32_t ui32Address, - uint32_t ui32Count); +extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t* pui8DataBuffer, + uint32_t ui32Address, + uint32_t ui32Count); extern uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address); @@ -273,405 +273,405 @@ extern void SafeHapiAuxAdiSelect( FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal ); // AON_EVENT FUNCTIONS #define ROM_AONEventMcuWakeUpSet \ ((void (*)(uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[0]) + ROM_API_AON_EVENT_TABLE[0]) #define ROM_AONEventMcuWakeUpGet \ ((uint32_t (*)(uint32_t ui32MCUWUEvent)) \ - ROM_API_AON_EVENT_TABLE[1]) + ROM_API_AON_EVENT_TABLE[1]) #define ROM_AONEventAuxWakeUpSet \ ((void (*)(uint32_t ui32AUXWUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[2]) + ROM_API_AON_EVENT_TABLE[2]) #define ROM_AONEventAuxWakeUpGet \ ((uint32_t (*)(uint32_t ui32AUXWUEvent)) \ - ROM_API_AON_EVENT_TABLE[3]) + ROM_API_AON_EVENT_TABLE[3]) #define ROM_AONEventMcuSet \ ((void (*)(uint32_t ui32MCUEvent, uint32_t ui32EventSrc)) \ - ROM_API_AON_EVENT_TABLE[4]) + ROM_API_AON_EVENT_TABLE[4]) #define ROM_AONEventMcuGet \ ((uint32_t (*)(uint32_t ui32MCUEvent)) \ - ROM_API_AON_EVENT_TABLE[5]) + ROM_API_AON_EVENT_TABLE[5]) // AON_WUC FUNCTIONS #define ROM_AONWUCAuxReset \ ((void (*)(void)) \ - ROM_API_AON_WUC_TABLE[3]) + ROM_API_AON_WUC_TABLE[3]) #define ROM_AONWUCRechargeCtrlConfigSet \ ((void (*)(bool bAdaptEnable, uint32_t ui32AdaptRate, uint32_t ui32Period, uint32_t ui32MaxPeriod)) \ - ROM_API_AON_WUC_TABLE[4]) + ROM_API_AON_WUC_TABLE[4]) #define ROM_AONWUCOscConfig \ ((void (*)(uint32_t ui32Period)) \ - ROM_API_AON_WUC_TABLE[5]) + ROM_API_AON_WUC_TABLE[5]) // AUX_TDC FUNCTIONS #define ROM_AUXTDCConfigSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32StartCondition, uint32_t ui32StopCondition)) \ - ROM_API_AUX_TDC_TABLE[0]) + ROM_API_AUX_TDC_TABLE[0]) #define ROM_AUXTDCMeasurementDone \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_AUX_TDC_TABLE[1]) + ROM_API_AUX_TDC_TABLE[1]) // AUX_WUC FUNCTIONS #define ROM_AUXWUCClockEnable \ ((void (*)(uint32_t ui32Clocks)) \ - ROM_API_AUX_WUC_TABLE[0]) + ROM_API_AUX_WUC_TABLE[0]) #define ROM_AUXWUCClockDisable \ ((void (*)(uint32_t ui32Clocks)) \ - ROM_API_AUX_WUC_TABLE[1]) + ROM_API_AUX_WUC_TABLE[1]) #define ROM_AUXWUCClockStatus \ ((uint32_t (*)(uint32_t ui32Clocks)) \ - ROM_API_AUX_WUC_TABLE[2]) + ROM_API_AUX_WUC_TABLE[2]) #define ROM_AUXWUCPowerCtrl \ ((void (*)(uint32_t ui32PowerMode)) \ - ROM_API_AUX_WUC_TABLE[3]) + ROM_API_AUX_WUC_TABLE[3]) // FLASH FUNCTIONS #define ROM_FlashPowerModeGet \ ((uint32_t (*)(void)) \ - ROM_API_FLASH_TABLE[1]) + ROM_API_FLASH_TABLE[1]) #define ROM_FlashProtectionSet \ ((void (*)(uint32_t ui32SectorAddress, uint32_t ui32ProtectMode)) \ - ROM_API_FLASH_TABLE[2]) + ROM_API_FLASH_TABLE[2]) #define ROM_FlashProtectionGet \ ((uint32_t (*)(uint32_t ui32SectorAddress)) \ - ROM_API_FLASH_TABLE[3]) + ROM_API_FLASH_TABLE[3]) #define ROM_FlashProtectionSave \ ((uint32_t (*)(uint32_t ui32SectorAddress)) \ - ROM_API_FLASH_TABLE[4]) + ROM_API_FLASH_TABLE[4]) #define ROM_FlashEfuseReadRow \ ((bool (*)(uint32_t *pui32EfuseData, uint32_t ui32RowAddress)) \ - ROM_API_FLASH_TABLE[8]) + ROM_API_FLASH_TABLE[8]) #define ROM_FlashDisableSectorsForWrite \ ((void (*)(void)) \ - ROM_API_FLASH_TABLE[9]) + ROM_API_FLASH_TABLE[9]) // I2C FUNCTIONS #define ROM_I2CMasterInitExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32I2CClk, bool bFast)) \ - ROM_API_I2C_TABLE[0]) + ROM_API_I2C_TABLE[0]) #define ROM_I2CMasterErr \ ((uint32_t (*)(uint32_t ui32Base)) \ - ROM_API_I2C_TABLE[1]) + ROM_API_I2C_TABLE[1]) // INTERRUPT FUNCTIONS #define ROM_IntPriorityGroupingSet \ ((void (*)(uint32_t ui32Bits)) \ - ROM_API_INTERRUPT_TABLE[0]) + ROM_API_INTERRUPT_TABLE[0]) #define ROM_IntPriorityGroupingGet \ ((uint32_t (*)(void)) \ - ROM_API_INTERRUPT_TABLE[1]) + ROM_API_INTERRUPT_TABLE[1]) #define ROM_IntPrioritySet \ ((void (*)(uint32_t ui32Interrupt, uint8_t ui8Priority)) \ - ROM_API_INTERRUPT_TABLE[2]) + ROM_API_INTERRUPT_TABLE[2]) #define ROM_IntPriorityGet \ ((int32_t (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[3]) + ROM_API_INTERRUPT_TABLE[3]) #define ROM_IntEnable \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[4]) + ROM_API_INTERRUPT_TABLE[4]) #define ROM_IntDisable \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[5]) + ROM_API_INTERRUPT_TABLE[5]) #define ROM_IntPendSet \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[6]) + ROM_API_INTERRUPT_TABLE[6]) #define ROM_IntPendGet \ ((bool (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[7]) + ROM_API_INTERRUPT_TABLE[7]) #define ROM_IntPendClear \ ((void (*)(uint32_t ui32Interrupt)) \ - ROM_API_INTERRUPT_TABLE[8]) + ROM_API_INTERRUPT_TABLE[8]) // IOC FUNCTIONS #define ROM_IOCPortConfigureSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId, uint32_t ui32IOConfig)) \ - ROM_API_IOC_TABLE[0]) + ROM_API_IOC_TABLE[0]) #define ROM_IOCPortConfigureGet \ ((uint32_t (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[1]) + ROM_API_IOC_TABLE[1]) #define ROM_IOCIOShutdownSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOShutdown)) \ - ROM_API_IOC_TABLE[2]) + ROM_API_IOC_TABLE[2]) #define ROM_IOCIOModeSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOMode)) \ - ROM_API_IOC_TABLE[4]) + ROM_API_IOC_TABLE[4]) #define ROM_IOCIOIntSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Int, uint32_t ui32EdgeDet)) \ - ROM_API_IOC_TABLE[5]) + ROM_API_IOC_TABLE[5]) #define ROM_IOCIOPortPullSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Pull)) \ - ROM_API_IOC_TABLE[6]) + ROM_API_IOC_TABLE[6]) #define ROM_IOCIOHystSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Hysteresis)) \ - ROM_API_IOC_TABLE[7]) + ROM_API_IOC_TABLE[7]) #define ROM_IOCIOInputSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32Input)) \ - ROM_API_IOC_TABLE[8]) + ROM_API_IOC_TABLE[8]) #define ROM_IOCIOSlewCtrlSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32SlewEnable)) \ - ROM_API_IOC_TABLE[9]) + ROM_API_IOC_TABLE[9]) #define ROM_IOCIODrvStrengthSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32IOCurrent, uint32_t ui32DrvStrength)) \ - ROM_API_IOC_TABLE[10]) + ROM_API_IOC_TABLE[10]) #define ROM_IOCIOPortIdSet \ ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId)) \ - ROM_API_IOC_TABLE[11]) + ROM_API_IOC_TABLE[11]) #define ROM_IOCIntEnable \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[12]) + ROM_API_IOC_TABLE[12]) #define ROM_IOCIntDisable \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[13]) + ROM_API_IOC_TABLE[13]) #define ROM_IOCPinTypeGpioInput \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[14]) + ROM_API_IOC_TABLE[14]) #define ROM_IOCPinTypeGpioOutput \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[15]) + ROM_API_IOC_TABLE[15]) #define ROM_IOCPinTypeUart \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Cts, uint32_t ui32Rts)) \ - ROM_API_IOC_TABLE[16]) + ROM_API_IOC_TABLE[16]) #define ROM_IOCPinTypeSsiMaster \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[17]) + ROM_API_IOC_TABLE[17]) #define ROM_IOCPinTypeSsiSlave \ ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[18]) + ROM_API_IOC_TABLE[18]) #define ROM_IOCPinTypeI2c \ ((void (*)(uint32_t ui32Base, uint32_t ui32Data, uint32_t ui32Clk)) \ - ROM_API_IOC_TABLE[19]) + ROM_API_IOC_TABLE[19]) #define ROM_IOCPinTypeAux \ ((void (*)(uint32_t ui32IOId)) \ - ROM_API_IOC_TABLE[21]) + ROM_API_IOC_TABLE[21]) // PRCM FUNCTIONS #define ROM_PRCMInfClockConfigureSet \ ((void (*)(uint32_t ui32ClkDiv, uint32_t ui32PowerMode)) \ - ROM_API_PRCM_TABLE[0]) + ROM_API_PRCM_TABLE[0]) #define ROM_PRCMInfClockConfigureGet \ ((uint32_t (*)(uint32_t ui32PowerMode)) \ - ROM_API_PRCM_TABLE[1]) + ROM_API_PRCM_TABLE[1]) #define ROM_PRCMAudioClockConfigSet \ ((void (*)(uint32_t ui32ClkConfig, uint32_t ui32SampleRate)) \ - ROM_API_PRCM_TABLE[4]) + ROM_API_PRCM_TABLE[4]) #define ROM_PRCMPowerDomainOn \ ((void (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[5]) + ROM_API_PRCM_TABLE[5]) #define ROM_PRCMPowerDomainOff \ ((void (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[6]) + ROM_API_PRCM_TABLE[6]) #define ROM_PRCMPeripheralRunEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[7]) + ROM_API_PRCM_TABLE[7]) #define ROM_PRCMPeripheralRunDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[8]) + ROM_API_PRCM_TABLE[8]) #define ROM_PRCMPeripheralSleepEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[9]) + ROM_API_PRCM_TABLE[9]) #define ROM_PRCMPeripheralSleepDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[10]) + ROM_API_PRCM_TABLE[10]) #define ROM_PRCMPeripheralDeepSleepEnable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[11]) + ROM_API_PRCM_TABLE[11]) #define ROM_PRCMPeripheralDeepSleepDisable \ ((void (*)(uint32_t ui32Peripheral)) \ - ROM_API_PRCM_TABLE[12]) + ROM_API_PRCM_TABLE[12]) #define ROM_PRCMPowerDomainStatus \ ((uint32_t (*)(uint32_t ui32Domains)) \ - ROM_API_PRCM_TABLE[13]) + ROM_API_PRCM_TABLE[13]) #define ROM_PRCMDeepSleep \ ((void (*)(void)) \ - ROM_API_PRCM_TABLE[14]) + ROM_API_PRCM_TABLE[14]) // SMPH FUNCTIONS #define ROM_SMPHAcquire \ ((void (*)(uint32_t ui32Semaphore)) \ - ROM_API_SMPH_TABLE[0]) + ROM_API_SMPH_TABLE[0]) // SSI FUNCTIONS #define ROM_SSIConfigSetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32SSIClk, uint32_t ui32Protocol, uint32_t ui32Mode, uint32_t ui32BitRate, uint32_t ui32DataWidth)) \ - ROM_API_SSI_TABLE[0]) + ROM_API_SSI_TABLE[0]) #define ROM_SSIDataPut \ ((void (*)(uint32_t ui32Base, uint32_t ui32Data)) \ - ROM_API_SSI_TABLE[1]) + ROM_API_SSI_TABLE[1]) #define ROM_SSIDataPutNonBlocking \ ((int32_t (*)(uint32_t ui32Base, uint32_t ui32Data)) \ - ROM_API_SSI_TABLE[2]) + ROM_API_SSI_TABLE[2]) #define ROM_SSIDataGet \ ((void (*)(uint32_t ui32Base, uint32_t *pui32Data)) \ - ROM_API_SSI_TABLE[3]) + ROM_API_SSI_TABLE[3]) #define ROM_SSIDataGetNonBlocking \ ((int32_t (*)(uint32_t ui32Base, uint32_t *pui32Data)) \ - ROM_API_SSI_TABLE[4]) + ROM_API_SSI_TABLE[4]) // TIMER FUNCTIONS #define ROM_TimerConfigure \ ((void (*)(uint32_t ui32Base, uint32_t ui32Config)) \ - ROM_API_TIMER_TABLE[0]) + ROM_API_TIMER_TABLE[0]) #define ROM_TimerLevelControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bInvert)) \ - ROM_API_TIMER_TABLE[1]) + ROM_API_TIMER_TABLE[1]) #define ROM_TimerStallControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bStall)) \ - ROM_API_TIMER_TABLE[3]) + ROM_API_TIMER_TABLE[3]) #define ROM_TimerWaitOnTriggerControl \ ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bWait)) \ - ROM_API_TIMER_TABLE[4]) + ROM_API_TIMER_TABLE[4]) // TRNG FUNCTIONS #define ROM_TRNGNumberGet \ ((uint32_t (*)(uint32_t ui32Word)) \ - ROM_API_TRNG_TABLE[1]) + ROM_API_TRNG_TABLE[1]) // UART FUNCTIONS #define ROM_UARTFIFOLevelGet \ ((void (*)(uint32_t ui32Base, uint32_t *pui32TxLevel, uint32_t *pui32RxLevel)) \ - ROM_API_UART_TABLE[0]) + ROM_API_UART_TABLE[0]) #define ROM_UARTConfigSetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t ui32Baud, uint32_t ui32Config)) \ - ROM_API_UART_TABLE[1]) + ROM_API_UART_TABLE[1]) #define ROM_UARTConfigGetExpClk \ ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t *pui32Baud, uint32_t *pui32Config)) \ - ROM_API_UART_TABLE[2]) + ROM_API_UART_TABLE[2]) #define ROM_UARTDisable \ ((void (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[3]) + ROM_API_UART_TABLE[3]) #define ROM_UARTCharGetNonBlocking \ ((int32_t (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[4]) + ROM_API_UART_TABLE[4]) #define ROM_UARTCharGet \ ((int32_t (*)(uint32_t ui32Base)) \ - ROM_API_UART_TABLE[5]) + ROM_API_UART_TABLE[5]) #define ROM_UARTCharPutNonBlocking \ ((bool (*)(uint32_t ui32Base, uint8_t ui8Data)) \ - ROM_API_UART_TABLE[6]) + ROM_API_UART_TABLE[6]) #define ROM_UARTCharPut \ ((void (*)(uint32_t ui32Base, uint8_t ui8Data)) \ - ROM_API_UART_TABLE[7]) + ROM_API_UART_TABLE[7]) // UDMA FUNCTIONS #define ROM_uDMAChannelAttributeEnable \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \ - ROM_API_UDMA_TABLE[0]) + ROM_API_UDMA_TABLE[0]) #define ROM_uDMAChannelAttributeDisable \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \ - ROM_API_UDMA_TABLE[1]) + ROM_API_UDMA_TABLE[1]) #define ROM_uDMAChannelAttributeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelNum)) \ - ROM_API_UDMA_TABLE[2]) + ROM_API_UDMA_TABLE[2]) #define ROM_uDMAChannelControlSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, uint32_t ui32Control)) \ - ROM_API_UDMA_TABLE[3]) + ROM_API_UDMA_TABLE[3]) #define ROM_uDMAChannelScatterGatherSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, void *pvTaskList, uint32_t ui32IsPeriphSG)) \ - ROM_API_UDMA_TABLE[5]) + ROM_API_UDMA_TABLE[5]) #define ROM_uDMAChannelSizeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \ - ROM_API_UDMA_TABLE[6]) + ROM_API_UDMA_TABLE[6]) #define ROM_uDMAChannelModeGet \ ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \ - ROM_API_UDMA_TABLE[7]) + ROM_API_UDMA_TABLE[7]) // VIMS FUNCTIONS #define ROM_VIMSConfigure \ ((void (*)(uint32_t ui32Base, bool bRoundRobin, bool bPrefetch)) \ - ROM_API_VIMS_TABLE[0]) + ROM_API_VIMS_TABLE[0]) #define ROM_VIMSModeSet \ ((void (*)(uint32_t ui32Base, uint32_t ui32Mode)) \ - ROM_API_VIMS_TABLE[1]) + ROM_API_VIMS_TABLE[1]) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom_crypto.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom_crypto.h index cfec1dbe..89744069 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom_crypto.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/rom_crypto.h @@ -67,7 +67,7 @@ extern "C" * \return None */ //***************************************************************************** -extern void AES_ECB_EncryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey); +extern void AES_ECB_EncryptData(uint8_t* text, uint16_t textLen, uint8_t* aesKey); //***************************************************************************** /*! @@ -81,7 +81,7 @@ extern void AES_ECB_EncryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey * \return None */ //***************************************************************************** -extern void AES_ECB_DecryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey); +extern void AES_ECB_DecryptData(uint8_t* text, uint16_t textLen, uint8_t* aesKey); //***************************************************************************** /*! @@ -103,10 +103,10 @@ extern void AES_ECB_DecryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey * \return Zero when successful. */ //***************************************************************************** -extern int8_t AES_CCM_EncryptData(uint8_t encryptFlag, uint8_t MACLen, uint8_t *nonce, - uint8_t *plainText, uint16_t textLen, - uint8_t *addDataBuf, uint16_t addBufLen, - uint8_t *aesKey, uint8_t *MAC, uint8_t ccmLVal); +extern int8_t AES_CCM_EncryptData(uint8_t encryptFlag, uint8_t MACLen, uint8_t* nonce, + uint8_t* plainText, uint16_t textLen, + uint8_t* addDataBuf, uint16_t addBufLen, + uint8_t* aesKey, uint8_t* MAC, uint8_t ccmLVal); //***************************************************************************** /*! @@ -128,10 +128,10 @@ extern int8_t AES_CCM_EncryptData(uint8_t encryptFlag, uint8_t MACLen, uint8_t * * \return Zero when Successful. */ //***************************************************************************** -extern int8_t AES_CCM_DecryptData(uint8_t decryptFlag, uint8_t MACLen, uint8_t *nonce, - uint8_t *cipherText, uint16_t textLen, - uint8_t *addDataBuf, uint16_t addBufLen, - uint8_t *aesKey, uint8_t *MAC, uint8_t ccmLVal); +extern int8_t AES_CCM_DecryptData(uint8_t decryptFlag, uint8_t MACLen, uint8_t* nonce, + uint8_t* cipherText, uint16_t textLen, + uint8_t* addDataBuf, uint16_t addBufLen, + uint8_t* aesKey, uint8_t* MAC, uint8_t ccmLVal); //***************************************************************************** /*! @@ -146,9 +146,9 @@ extern int8_t AES_CCM_DecryptData(uint8_t decryptFlag, uint8_t MACLen, uint8_t * * \return None */ //***************************************************************************** -extern uint8_t AES_CTR_EncryptData(uint8_t *plainText, uint16_t textLen, - uint8_t *aesKey, uint8_t *nonce, - uint8_t *initVector); +extern uint8_t AES_CTR_EncryptData(uint8_t* plainText, uint16_t textLen, + uint8_t* aesKey, uint8_t* nonce, + uint8_t* initVector); //***************************************************************************** /*! @@ -163,9 +163,9 @@ extern uint8_t AES_CTR_EncryptData(uint8_t *plainText, uint16_t textLen, * \return None */ //***************************************************************************** -extern uint8_t AES_CTR_DecryptData(uint8_t *cipherText, uint16_t textLen, - uint8_t *aesKey, uint8_t *nonce, - uint8_t *initVector); +extern uint8_t AES_CTR_DecryptData(uint8_t* cipherText, uint16_t textLen, + uint8_t* aesKey, uint8_t* nonce, + uint8_t* initVector); ////////////////////////////////////* ECC *///////////////////////////////////// @@ -239,24 +239,24 @@ extern uint8_t AES_CTR_DecryptData(uint8_t *cipherText, uint16_t textLen, * \return None */ //***************************************************************************** - extern void ECC_initialize(uint32_t *pWorkzone); +extern void ECC_initialize(uint32_t* pWorkzone); //***************************************************************************** - /*! - * \brief Generate a key. - * - * This is used for both ECDH and ECDSA. - * - * \param randString Pointer to random string, input. - * \param privateKey Pointer to the private key, output. - * \param publicKey_x Pointer to public key X-coordinate, output. - * \param publicKey_y Pointer to public key Y-coordinate, output. - * - * \return Status - */ +/*! +* \brief Generate a key. +* +* This is used for both ECDH and ECDSA. +* +* \param randString Pointer to random string, input. +* \param privateKey Pointer to the private key, output. +* \param publicKey_x Pointer to public key X-coordinate, output. +* \param publicKey_y Pointer to public key Y-coordinate, output. +* +* \return Status +*/ //***************************************************************************** -extern uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey, - uint32_t *publicKey_x, uint32_t *publicKey_y); +extern uint8_t ECC_generateKey(uint32_t* randString, uint32_t* privateKey, + uint32_t* publicKey_x, uint32_t* publicKey_y); //***************************************************************************** /*! @@ -271,8 +271,8 @@ extern uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey, * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *randString, - uint32_t *sign1, uint32_t *sign2); +extern uint8_t ECC_ECDSA_sign(uint32_t* secretKey, uint32_t* text, uint32_t* randString, + uint32_t* sign1, uint32_t* sign2); //***************************************************************************** /*! @@ -287,8 +287,8 @@ extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *ran * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y, - uint32_t *text, uint32_t *sign1, uint32_t *sign2); +extern uint8_t ECC_ECDSA_verify(uint32_t* publicKey_x, uint32_t* publicKey_y, + uint32_t* text, uint32_t* sign1, uint32_t* sign2); //***************************************************************************** /*! @@ -303,11 +303,11 @@ extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y, * \return Status */ //***************************************************************************** -extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t *privateKey, - uint32_t *publicKey_x, - uint32_t *publicKey_y, - uint32_t *sharedSecret_x, - uint32_t *sharedSecret_y); +extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t* privateKey, + uint32_t* publicKey_x, + uint32_t* publicKey_y, + uint32_t* sharedSecret_x, + uint32_t* sharedSecret_y); ///////////////////////////////////* SHA-256 *////////////////////////////////// @@ -316,9 +316,9 @@ extern uint8_t ECC_ECDH_computeSharedSecret(uint32_t *privateKey, //! SHA256 functions. typedef struct { - uint32_t state[8]; - uint32_t textLen[2]; - uint32_t W[16]; + uint32_t state[8]; + uint32_t textLen[2]; + uint32_t W[16]; } SHA256_memory_t; //***************************************************************************** @@ -337,8 +337,8 @@ typedef struct * \return Status */ //***************************************************************************** -extern uint8_t SHA256_runFullAlgorithm(SHA256_memory_t *memory, uint8_t *pBufIn, - uint32_t bufLen, uint8_t *pBufOut); +extern uint8_t SHA256_runFullAlgorithm(SHA256_memory_t* memory, uint8_t* pBufIn, + uint32_t bufLen, uint8_t* pBufOut); //***************************************************************************** /*! @@ -352,7 +352,7 @@ extern uint8_t SHA256_runFullAlgorithm(SHA256_memory_t *memory, uint8_t *pBufIn, * \return Status */ //***************************************************************************** -extern uint8_t SHA256_initialize(SHA256_memory_t *workZone); +extern uint8_t SHA256_initialize(SHA256_memory_t* workZone); //***************************************************************************** /*! @@ -367,7 +367,7 @@ extern uint8_t SHA256_initialize(SHA256_memory_t *workZone); * \return Status */ //***************************************************************************** -extern uint8_t SHA256_execute(SHA256_memory_t *config, uint8_t *pBufIn, +extern uint8_t SHA256_execute(SHA256_memory_t* config, uint8_t* pBufIn, uint32_t bufLen); //***************************************************************************** @@ -380,7 +380,7 @@ extern uint8_t SHA256_execute(SHA256_memory_t *config, uint8_t *pBufIn, * \return Status */ //***************************************************************************** -extern uint8_t SHA256_output(SHA256_memory_t *memory, uint8_t *pBufOut); +extern uint8_t SHA256_output(SHA256_memory_t* memory, uint8_t* pBufOut); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup.h index 496b17a6..923bc710 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup.h @@ -78,7 +78,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SetupTrimDevice NOROM_SetupTrimDevice +#define SetupTrimDevice NOROM_SetupTrimDevice #endif //***************************************************************************** @@ -114,11 +114,11 @@ extern void SetupTrimDevice( void ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SetupTrimDevice - #undef SetupTrimDevice - #define SetupTrimDevice ROM_SetupTrimDevice - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SetupTrimDevice +#undef SetupTrimDevice +#define SetupTrimDevice ROM_SetupTrimDevice +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup_rom.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup_rom.h index f32a5a8f..e79d9088 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup_rom.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/setup_rom.h @@ -78,25 +78,25 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn - #define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn - #define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl - #define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1 - #define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2 - #define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1 - #define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage - #define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg - #define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim - #define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl - #define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart - #define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm - #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting - #define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc +#define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn +#define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn +#define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl +#define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1 +#define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2 +#define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1 +#define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage +#define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg +#define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim +#define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl +#define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart +#define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm +#define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting +#define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc #endif //***************************************************************************** @@ -318,9 +318,12 @@ SetupSignExtendVddrTrimValue( uint32_t ui32VddrTrimVal ) // The VDDR trim value is 5 bits representing the range from -10 to +21 // (where -10=0x16, -1=0x1F, 0=0x00, 1=0x01 and +21=0x15) int32_t i32SignedVddrVal = ui32VddrTrimVal; - if ( i32SignedVddrVal > 0x15 ) { + + if ( i32SignedVddrVal > 0x15 ) + { i32SignedVddrVal -= 0x20; } + return ( i32SignedVddrVal ); } @@ -351,83 +354,83 @@ extern void SetupSetAonRtcSubSecInc( uint32_t subSecInc ); // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #undef SetupAfterColdResetWakeupFromShutDownCfg1 - #define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1 - #endif - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #undef SetupAfterColdResetWakeupFromShutDownCfg2 - #define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2 - #endif - #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #undef SetupAfterColdResetWakeupFromShutDownCfg3 - #define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3 - #endif - #ifdef ROM_SetupGetTrimForAdcShModeEn - #undef SetupGetTrimForAdcShModeEn - #define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn - #endif - #ifdef ROM_SetupGetTrimForAdcShVbufEn - #undef SetupGetTrimForAdcShVbufEn - #define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn - #endif - #ifdef ROM_SetupGetTrimForAmpcompCtrl - #undef SetupGetTrimForAmpcompCtrl - #define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl - #endif - #ifdef ROM_SetupGetTrimForAmpcompTh1 - #undef SetupGetTrimForAmpcompTh1 - #define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1 - #endif - #ifdef ROM_SetupGetTrimForAmpcompTh2 - #undef SetupGetTrimForAmpcompTh2 - #define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2 - #endif - #ifdef ROM_SetupGetTrimForAnabypassValue1 - #undef SetupGetTrimForAnabypassValue1 - #define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1 - #endif - #ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage - #undef SetupGetTrimForDblrLoopFilterResetVoltage - #define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage - #endif - #ifdef ROM_SetupGetTrimForRadcExtCfg - #undef SetupGetTrimForRadcExtCfg - #define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg - #endif - #ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim - #undef SetupGetTrimForRcOscLfIBiasTrim - #define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim - #endif - #ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #undef SetupGetTrimForRcOscLfRtuneCtuneTrim - #define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim - #endif - #ifdef ROM_SetupGetTrimForXoscHfCtl - #undef SetupGetTrimForXoscHfCtl - #define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl - #endif - #ifdef ROM_SetupGetTrimForXoscHfFastStart - #undef SetupGetTrimForXoscHfFastStart - #define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart - #endif - #ifdef ROM_SetupGetTrimForXoscHfIbiastherm - #undef SetupGetTrimForXoscHfIbiastherm - #define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm - #endif - #ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio - #endif - #ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting - #undef SetupSetCacheModeAccordingToCcfgSetting - #define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting - #endif - #ifdef ROM_SetupSetAonRtcSubSecInc - #undef SetupSetAonRtcSubSecInc - #define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#undef SetupAfterColdResetWakeupFromShutDownCfg1 +#define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1 +#endif +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#undef SetupAfterColdResetWakeupFromShutDownCfg2 +#define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2 +#endif +#ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#undef SetupAfterColdResetWakeupFromShutDownCfg3 +#define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3 +#endif +#ifdef ROM_SetupGetTrimForAdcShModeEn +#undef SetupGetTrimForAdcShModeEn +#define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn +#endif +#ifdef ROM_SetupGetTrimForAdcShVbufEn +#undef SetupGetTrimForAdcShVbufEn +#define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn +#endif +#ifdef ROM_SetupGetTrimForAmpcompCtrl +#undef SetupGetTrimForAmpcompCtrl +#define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl +#endif +#ifdef ROM_SetupGetTrimForAmpcompTh1 +#undef SetupGetTrimForAmpcompTh1 +#define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1 +#endif +#ifdef ROM_SetupGetTrimForAmpcompTh2 +#undef SetupGetTrimForAmpcompTh2 +#define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2 +#endif +#ifdef ROM_SetupGetTrimForAnabypassValue1 +#undef SetupGetTrimForAnabypassValue1 +#define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1 +#endif +#ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage +#undef SetupGetTrimForDblrLoopFilterResetVoltage +#define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage +#endif +#ifdef ROM_SetupGetTrimForRadcExtCfg +#undef SetupGetTrimForRadcExtCfg +#define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg +#endif +#ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim +#undef SetupGetTrimForRcOscLfIBiasTrim +#define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim +#endif +#ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#undef SetupGetTrimForRcOscLfRtuneCtuneTrim +#define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim +#endif +#ifdef ROM_SetupGetTrimForXoscHfCtl +#undef SetupGetTrimForXoscHfCtl +#define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl +#endif +#ifdef ROM_SetupGetTrimForXoscHfFastStart +#undef SetupGetTrimForXoscHfFastStart +#define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart +#endif +#ifdef ROM_SetupGetTrimForXoscHfIbiastherm +#undef SetupGetTrimForXoscHfIbiastherm +#define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm +#endif +#ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio +#endif +#ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting +#undef SetupSetCacheModeAccordingToCcfgSetting +#define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting +#endif +#ifdef ROM_SetupSetAonRtcSubSecInc +#undef SetupSetAonRtcSubSecInc +#define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/smph.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/smph.h index 636979d1..e1bfc445 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/smph.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/smph.h @@ -80,7 +80,7 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SMPHAcquire NOROM_SMPHAcquire +#define SMPHAcquire NOROM_SMPHAcquire #endif //***************************************************************************** @@ -285,11 +285,11 @@ SMPHRelease(uint32_t ui32Semaphore) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SMPHAcquire - #undef SMPHAcquire - #define SMPHAcquire ROM_SMPHAcquire - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SMPHAcquire +#undef SMPHAcquire +#define SMPHAcquire ROM_SMPHAcquire +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ssi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ssi.h index 87a97454..74eaa08c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ssi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/ssi.h @@ -82,13 +82,13 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SSIConfigSetExpClk NOROM_SSIConfigSetExpClk - #define SSIDataPut NOROM_SSIDataPut - #define SSIDataPutNonBlocking NOROM_SSIDataPutNonBlocking - #define SSIDataGet NOROM_SSIDataGet - #define SSIDataGetNonBlocking NOROM_SSIDataGetNonBlocking - #define SSIIntRegister NOROM_SSIIntRegister - #define SSIIntUnregister NOROM_SSIIntUnregister +#define SSIConfigSetExpClk NOROM_SSIConfigSetExpClk +#define SSIDataPut NOROM_SSIDataPut +#define SSIDataPutNonBlocking NOROM_SSIDataPutNonBlocking +#define SSIDataGet NOROM_SSIDataGet +#define SSIDataGetNonBlocking NOROM_SSIDataGetNonBlocking +#define SSIIntRegister NOROM_SSIIntRegister +#define SSIIntUnregister NOROM_SSIIntUnregister #endif //***************************************************************************** @@ -161,7 +161,7 @@ extern "C" static bool SSIBaseValid(uint32_t ui32Base) { - return(ui32Base == SSI0_BASE || ui32Base == SSI1_BASE); + return (ui32Base == SSI0_BASE || ui32Base == SSI1_BASE); } #endif @@ -331,7 +331,7 @@ extern int32_t SSIDataPutNonBlocking(uint32_t ui32Base, uint32_t ui32Data); //! \return None // //***************************************************************************** -extern void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data); +extern void SSIDataGet(uint32_t ui32Base, uint32_t* pui32Data); //***************************************************************************** // @@ -355,7 +355,7 @@ extern void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data); //! \return Returns the number of elements read from the SSI receive FIFO. // //***************************************************************************** -extern int32_t SSIDataGetNonBlocking(uint32_t ui32Base, uint32_t *pui32Data); +extern int32_t SSIDataGetNonBlocking(uint32_t ui32Base, uint32_t* pui32Data); //***************************************************************************** // @@ -380,7 +380,7 @@ SSIBusy(uint32_t ui32Base) ASSERT(SSIBaseValid(ui32Base)); // Determine if the SSI is busy. - return((HWREG(ui32Base + SSI_O_SR) & SSI_SR_BSY) ? true : false); + return ((HWREG(ui32Base + SSI_O_SR) & SSI_SR_BSY) ? true : false); } //***************************************************************************** @@ -577,13 +577,13 @@ SSIIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(ui32Base + SSI_O_MIS)); + return (HWREG(ui32Base + SSI_O_MIS)); } else { - return(HWREG(ui32Base + SSI_O_RIS)); + return (HWREG(ui32Base + SSI_O_RIS)); } } @@ -649,35 +649,35 @@ SSIDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SSIConfigSetExpClk - #undef SSIConfigSetExpClk - #define SSIConfigSetExpClk ROM_SSIConfigSetExpClk - #endif - #ifdef ROM_SSIDataPut - #undef SSIDataPut - #define SSIDataPut ROM_SSIDataPut - #endif - #ifdef ROM_SSIDataPutNonBlocking - #undef SSIDataPutNonBlocking - #define SSIDataPutNonBlocking ROM_SSIDataPutNonBlocking - #endif - #ifdef ROM_SSIDataGet - #undef SSIDataGet - #define SSIDataGet ROM_SSIDataGet - #endif - #ifdef ROM_SSIDataGetNonBlocking - #undef SSIDataGetNonBlocking - #define SSIDataGetNonBlocking ROM_SSIDataGetNonBlocking - #endif - #ifdef ROM_SSIIntRegister - #undef SSIIntRegister - #define SSIIntRegister ROM_SSIIntRegister - #endif - #ifdef ROM_SSIIntUnregister - #undef SSIIntUnregister - #define SSIIntUnregister ROM_SSIIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SSIConfigSetExpClk +#undef SSIConfigSetExpClk +#define SSIConfigSetExpClk ROM_SSIConfigSetExpClk +#endif +#ifdef ROM_SSIDataPut +#undef SSIDataPut +#define SSIDataPut ROM_SSIDataPut +#endif +#ifdef ROM_SSIDataPutNonBlocking +#undef SSIDataPutNonBlocking +#define SSIDataPutNonBlocking ROM_SSIDataPutNonBlocking +#endif +#ifdef ROM_SSIDataGet +#undef SSIDataGet +#define SSIDataGet ROM_SSIDataGet +#endif +#ifdef ROM_SSIDataGetNonBlocking +#undef SSIDataGetNonBlocking +#define SSIDataGetNonBlocking ROM_SSIDataGetNonBlocking +#endif +#ifdef ROM_SSIIntRegister +#undef SSIIntRegister +#define SSIIntRegister ROM_SSIIntRegister +#endif +#ifdef ROM_SSIIntUnregister +#undef SSIIntUnregister +#define SSIIntUnregister ROM_SSIIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-config.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-config.h index e8885f72..2b338bda 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-config.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-config.h @@ -18,45 +18,45 @@ * The LITTLE endian machines: */ #if ( ! defined(ECRYPT_LITTLE_ENDIAN)) -#if defined(__ultrix) /* Older MIPS */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__alpha) /* Alpha */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_M_IX86) /* x86 (MSC, Borland) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_MSC_VER) /* x86 (surely MSC) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ -#define ECRYPT_LITTLE_ENDIAN - -/* - * The BIG endian machines: - */ -#elif defined(sun) /* Newer Sparc's */ -#define ECRYPT_BIG_ENDIAN -#elif defined(__ppc__) /* PowerPC */ -#define ECRYPT_BIG_ENDIAN - -/* - * Finally machines with UNKNOWN endianness: - */ -#elif defined (_AIX) /* RS6000 */ -#define ECRYPT_UNKNOWN -#elif defined(__hpux) /* HP-PA */ -#define ECRYPT_UNKNOWN -#elif defined(__aux) /* 68K */ -#define ECRYPT_UNKNOWN -#elif defined(__dgux) /* 88K (but P6 in latest boxes) */ -#define ECRYPT_UNKNOWN -#elif defined(__sgi) /* Newer MIPS */ -#define ECRYPT_UNKNOWN -#else /* Any other processor */ -#define ECRYPT_UNKNOWN -#endif + #if defined(__ultrix) /* Older MIPS */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__alpha) /* Alpha */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(i386) /* x86 (gcc) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__i386) /* x86 (gcc) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(_M_IX86) /* x86 (MSC, Borland) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(_MSC_VER) /* x86 (surely MSC) */ + #define ECRYPT_LITTLE_ENDIAN + #elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ + #define ECRYPT_LITTLE_ENDIAN + + /* + * The BIG endian machines: + */ + #elif defined(sun) /* Newer Sparc's */ + #define ECRYPT_BIG_ENDIAN + #elif defined(__ppc__) /* PowerPC */ + #define ECRYPT_BIG_ENDIAN + + /* + * Finally machines with UNKNOWN endianness: + */ + #elif defined (_AIX) /* RS6000 */ + #define ECRYPT_UNKNOWN + #elif defined(__hpux) /* HP-PA */ + #define ECRYPT_UNKNOWN + #elif defined(__aux) /* 68K */ + #define ECRYPT_UNKNOWN + #elif defined(__dgux) /* 88K (but P6 in latest boxes) */ + #define ECRYPT_UNKNOWN + #elif defined(__sgi) /* Newer MIPS */ + #define ECRYPT_UNKNOWN + #else /* Any other processor */ + #define ECRYPT_UNKNOWN + #endif #endif /* ------------------------------------------------------------------------- */ @@ -75,188 +75,188 @@ /* --- check char --- */ #if (UCHAR_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T char -#define U8C(v) (v##U) + #ifndef I8T + #define I8T char + #define U8C(v) (v##U) -#if (UCHAR_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (UCHAR_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (UCHAR_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T char -#define U16C(v) (v##U) -#endif + #if (UCHAR_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T char + #define U16C(v) (v##U) + #endif -#if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T char -#define U32C(v) (v##U) -#endif + #if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T char + #define U32C(v) (v##U) + #endif -#if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T char -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T char + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check short --- */ #if (USHRT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T short -#define U8C(v) (v##U) + #ifndef I8T + #define I8T short + #define U8C(v) (v##U) -#if (USHRT_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (USHRT_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (USHRT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T short -#define U16C(v) (v##U) -#endif + #if (USHRT_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T short + #define U16C(v) (v##U) + #endif -#if (USHRT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T short -#define U32C(v) (v##U) -#endif + #if (USHRT_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T short + #define U32C(v) (v##U) + #endif -#if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T short -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T short + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check int --- */ #if (UINT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T int -#define U8C(v) (v##U) + #ifndef I8T + #define I8T int + #define U8C(v) (v##U) -#if (ULONG_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULONG_MAX == 0xFFU) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (UINT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T int -#define U16C(v) (v##U) -#endif + #if (UINT_MAX / 0xFFU > 0xFFU) + #ifndef I16T + #define I16T int + #define U16C(v) (v##U) + #endif -#if (UINT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T int -#define U32C(v) (v##U) -#endif + #if (UINT_MAX / 0xFFFFU > 0xFFFFU) + #ifndef I32T + #define I32T int + #define U32C(v) (v##U) + #endif -#if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T int -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif + #if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) + #ifndef I64T + #define I64T int + #define U64C(v) (v##U) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check long --- */ #if (ULONG_MAX / 0xFUL > 0xFUL) -#ifndef I8T -#define I8T long -#define U8C(v) (v##UL) + #ifndef I8T + #define I8T long + #define U8C(v) (v##UL) -#if (ULONG_MAX == 0xFFUL) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULONG_MAX == 0xFFUL) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (ULONG_MAX / 0xFFUL > 0xFFUL) -#ifndef I16T -#define I16T long -#define U16C(v) (v##UL) -#endif + #if (ULONG_MAX / 0xFFUL > 0xFFUL) + #ifndef I16T + #define I16T long + #define U16C(v) (v##UL) + #endif -#if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) -#ifndef I32T -#define I32T long -#define U32C(v) (v##UL) -#endif + #if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) + #ifndef I32T + #define I32T long + #define U32C(v) (v##UL) + #endif -#if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) -#ifndef I64T -#define I64T long -#define U64C(v) (v##UL) -#define ECRYPT_NATIVE64 -#endif + #if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) + #ifndef I64T + #define I64T long + #define U64C(v) (v##UL) + #define ECRYPT_NATIVE64 + #endif -#endif -#endif -#endif + #endif + #endif + #endif #endif /* --- check long long --- */ #ifdef ULLONG_MAX -#if (ULLONG_MAX / 0xFULL > 0xFULL) -#ifndef I8T -#define I8T long long -#define U8C(v) (v##ULL) + #if (ULLONG_MAX / 0xFULL > 0xFULL) + #ifndef I8T + #define I8T long long + #define U8C(v) (v##ULL) -#if (ULLONG_MAX == 0xFFULL) -#define ECRYPT_I8T_IS_BYTE -#endif + #if (ULLONG_MAX == 0xFFULL) + #define ECRYPT_I8T_IS_BYTE + #endif -#endif + #endif -#if (ULLONG_MAX / 0xFFULL > 0xFFULL) -#ifndef I16T -#define I16T long long -#define U16C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFULL > 0xFFULL) + #ifndef I16T + #define I16T long long + #define U16C(v) (v##ULL) + #endif -#if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) -#ifndef I32T -#define I32T long long -#define U32C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) + #ifndef I32T + #define I32T long long + #define U32C(v) (v##ULL) + #endif -#if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) -#ifndef I64T -#define I64T long long -#define U64C(v) (v##ULL) -#endif + #if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) + #ifndef I64T + #define I64T long long + #define U64C(v) (v##ULL) + #endif -#endif -#endif -#endif -#endif + #endif + #endif + #endif + #endif #endif @@ -264,13 +264,13 @@ #ifdef _UI64_MAX -#if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) -#ifndef I64T -#define I64T __int64 -#define U64C(v) (v##ui64) -#endif + #if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) + #ifndef I64T + #define I64T __int64 + #define U64C(v) (v##ui64) + #endif -#endif + #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-machine.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-machine.h index 4d2a2e55..a3eba887 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-machine.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-machine.h @@ -16,23 +16,23 @@ #if (defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT)) -#define ECRYPT_MACHINE_ROT + #define ECRYPT_MACHINE_ROT -#if (defined(WIN32) && defined(_MSC_VER)) + #if (defined(WIN32) && defined(_MSC_VER)) -#undef ROTL32 -#undef ROTR32 -#undef ROTL64 -#undef ROTR64 + #undef ROTL32 + #undef ROTR32 + #undef ROTL64 + #undef ROTR64 -#include + #include -#define ROTL32(v, n) _lrotl(v, n) -#define ROTR32(v, n) _lrotr(v, n) -#define ROTL64(v, n) _rotl64(v, n) -#define ROTR64(v, n) _rotr64(v, n) + #define ROTL32(v, n) _lrotl(v, n) + #define ROTR32(v, n) _lrotr(v, n) + #define ROTL64(v, n) _rotl64(v, n) + #define ROTR64(v, n) _rotr64(v, n) -#endif + #endif #endif @@ -40,11 +40,11 @@ #if (defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP)) -#define ECRYPT_MACHINE_SWAP + #define ECRYPT_MACHINE_SWAP -/* - * If you want to overwrite the default swap macros, put it here. And so on. - */ + /* + * If you want to overwrite the default swap macros, put it here. And so on. + */ #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-portable.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-portable.h index 8ce940d9..600c7186 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-portable.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-portable.h @@ -46,23 +46,23 @@ */ #ifdef I8T -typedef signed I8T s8; -typedef unsigned I8T u8; + typedef signed I8T s8; + typedef unsigned I8T u8; #endif #ifdef I16T -typedef signed I16T s16; -typedef unsigned I16T u16; + typedef signed I16T s16; + typedef unsigned I16T u16; #endif #ifdef I32T -typedef signed I32T s32; -typedef unsigned I32T u32; + typedef signed I32T s32; + typedef unsigned I32T u32; #endif #ifdef I64T -typedef signed I64T s64; -typedef unsigned I64T u64; + typedef signed I64T s64; + typedef unsigned I64T u64; #endif /* @@ -84,16 +84,16 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_ROT #define ROTL8(v, n) \ - (U8V((v) << (n)) | ((v) >> (8 - (n)))) + (U8V((v) << (n)) | ((v) >> (8 - (n)))) #define ROTL16(v, n) \ - (U16V((v) << (n)) | ((v) >> (16 - (n)))) + (U16V((v) << (n)) | ((v) >> (16 - (n)))) #define ROTL32(v, n) \ - (U32V((v) << (n)) | ((v) >> (32 - (n)))) + (U32V((v) << (n)) | ((v) >> (32 - (n)))) #define ROTL64(v, n) \ - (U64V((v) << (n)) | ((v) >> (64 - (n)))) + (U64V((v) << (n)) | ((v) >> (64 - (n)))) #define ROTR8(v, n) ROTL8(v, 8 - (n)) #define ROTR16(v, n) ROTL16(v, 16 - (n)) @@ -111,21 +111,21 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_SWAP #define SWAP16(v) \ - ROTL16(v, 8) + ROTL16(v, 8) #define SWAP32(v) \ - ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ - (ROTL32(v, 24) & U32C(0xFF00FF00))) + ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ + (ROTL32(v, 24) & U32C(0xFF00FF00))) #ifdef ECRYPT_NATIVE64 #define SWAP64(v) \ - ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ - (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ - (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ - (ROTL64(v, 56) & U64C(0xFF000000FF000000))) + ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ + (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ + (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ + (ROTL64(v, 56) & U64C(0xFF000000FF000000))) #else #define SWAP64(v) \ - (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) + (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) #endif #include "sw_ecrypt-machine.h" @@ -133,23 +133,23 @@ typedef unsigned I64T u64; #define ECRYPT_DEFAULT_WTOW #ifdef ECRYPT_LITTLE_ENDIAN -#define U16TO16_LITTLE(v) (v) -#define U32TO32_LITTLE(v) (v) -#define U64TO64_LITTLE(v) (v) + #define U16TO16_LITTLE(v) (v) + #define U32TO32_LITTLE(v) (v) + #define U64TO64_LITTLE(v) (v) -#define U16TO16_BIG(v) SWAP16(v) -#define U32TO32_BIG(v) SWAP32(v) -#define U64TO64_BIG(v) SWAP64(v) + #define U16TO16_BIG(v) SWAP16(v) + #define U32TO32_BIG(v) SWAP32(v) + #define U64TO64_BIG(v) SWAP64(v) #endif #ifdef ECRYPT_BIG_ENDIAN -#define U16TO16_LITTLE(v) SWAP16(v) -#define U32TO32_LITTLE(v) SWAP32(v) -#define U64TO64_LITTLE(v) SWAP64(v) + #define U16TO16_LITTLE(v) SWAP16(v) + #define U32TO32_LITTLE(v) SWAP32(v) + #define U64TO64_LITTLE(v) SWAP64(v) -#define U16TO16_BIG(v) (v) -#define U32TO32_BIG(v) (v) -#define U64TO64_BIG(v) (v) + #define U16TO16_BIG(v) (v) + #define U32TO32_BIG(v) (v) + #define U64TO64_BIG(v) (v) #endif #include "sw_ecrypt-machine.h" @@ -182,121 +182,121 @@ typedef unsigned I64T u64; #else #define U8TO16_LITTLE(p) \ - (((u16)((p)[0]) ) | \ - ((u16)((p)[1]) << 8)) + (((u16)((p)[0]) ) | \ + ((u16)((p)[1]) << 8)) #define U8TO32_LITTLE(p) \ - (((u32)((p)[0]) ) | \ - ((u32)((p)[1]) << 8) | \ - ((u32)((p)[2]) << 16) | \ - ((u32)((p)[3]) << 24)) + (((u32)((p)[0]) ) | \ + ((u32)((p)[1]) << 8) | \ + ((u32)((p)[2]) << 16) | \ + ((u32)((p)[3]) << 24)) #ifdef ECRYPT_NATIVE64 #define U8TO64_LITTLE(p) \ - (((u64)((p)[0]) ) | \ - ((u64)((p)[1]) << 8) | \ - ((u64)((p)[2]) << 16) | \ - ((u64)((p)[3]) << 24) | \ - ((u64)((p)[4]) << 32) | \ - ((u64)((p)[5]) << 40) | \ - ((u64)((p)[6]) << 48) | \ - ((u64)((p)[7]) << 56)) + (((u64)((p)[0]) ) | \ + ((u64)((p)[1]) << 8) | \ + ((u64)((p)[2]) << 16) | \ + ((u64)((p)[3]) << 24) | \ + ((u64)((p)[4]) << 32) | \ + ((u64)((p)[5]) << 40) | \ + ((u64)((p)[6]) << 48) | \ + ((u64)((p)[7]) << 56)) #else #define U8TO64_LITTLE(p) \ - ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) + ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) #endif #define U8TO16_BIG(p) \ - (((u16)((p)[0]) << 8) | \ - ((u16)((p)[1]) )) + (((u16)((p)[0]) << 8) | \ + ((u16)((p)[1]) )) #define U8TO32_BIG(p) \ - (((u32)((p)[0]) << 24) | \ - ((u32)((p)[1]) << 16) | \ - ((u32)((p)[2]) << 8) | \ - ((u32)((p)[3]) )) + (((u32)((p)[0]) << 24) | \ + ((u32)((p)[1]) << 16) | \ + ((u32)((p)[2]) << 8) | \ + ((u32)((p)[3]) )) #ifdef ECRYPT_NATIVE64 #define U8TO64_BIG(p) \ - (((u64)((p)[0]) << 56) | \ - ((u64)((p)[1]) << 48) | \ - ((u64)((p)[2]) << 40) | \ - ((u64)((p)[3]) << 32) | \ - ((u64)((p)[4]) << 24) | \ - ((u64)((p)[5]) << 16) | \ - ((u64)((p)[6]) << 8) | \ - ((u64)((p)[7]) )) + (((u64)((p)[0]) << 56) | \ + ((u64)((p)[1]) << 48) | \ + ((u64)((p)[2]) << 40) | \ + ((u64)((p)[3]) << 32) | \ + ((u64)((p)[4]) << 24) | \ + ((u64)((p)[5]) << 16) | \ + ((u64)((p)[6]) << 8) | \ + ((u64)((p)[7]) )) #else #define U8TO64_BIG(p) \ - (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) + (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) #endif #define U16TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) #define U32TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - (p)[2] = U8V((v) >> 16); \ - (p)[3] = U8V((v) >> 24); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + } while (0) #ifdef ECRYPT_NATIVE64 #define U64TO8_LITTLE(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - (p)[2] = U8V((v) >> 16); \ - (p)[3] = U8V((v) >> 24); \ - (p)[4] = U8V((v) >> 32); \ - (p)[5] = U8V((v) >> 40); \ - (p)[6] = U8V((v) >> 48); \ - (p)[7] = U8V((v) >> 56); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + (p)[4] = U8V((v) >> 32); \ + (p)[5] = U8V((v) >> 40); \ + (p)[6] = U8V((v) >> 48); \ + (p)[7] = U8V((v) >> 56); \ + } while (0) #else #define U64TO8_LITTLE(p, v) \ - do { \ - U32TO8_LITTLE((p), U32V((v) )); \ - U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ - } while (0) + do { \ + U32TO8_LITTLE((p), U32V((v) )); \ + U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ + } while (0) #endif #define U16TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) ); \ - (p)[1] = U8V((v) >> 8); \ - } while (0) + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) #define U32TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) >> 24); \ - (p)[1] = U8V((v) >> 16); \ - (p)[2] = U8V((v) >> 8); \ - (p)[3] = U8V((v) ); \ - } while (0) + do { \ + (p)[0] = U8V((v) >> 24); \ + (p)[1] = U8V((v) >> 16); \ + (p)[2] = U8V((v) >> 8); \ + (p)[3] = U8V((v) ); \ + } while (0) #ifdef ECRYPT_NATIVE64 #define U64TO8_BIG(p, v) \ - do { \ - (p)[0] = U8V((v) >> 56); \ - (p)[1] = U8V((v) >> 48); \ - (p)[2] = U8V((v) >> 40); \ - (p)[3] = U8V((v) >> 32); \ - (p)[4] = U8V((v) >> 24); \ - (p)[5] = U8V((v) >> 16); \ - (p)[6] = U8V((v) >> 8); \ - (p)[7] = U8V((v) ); \ - } while (0) + do { \ + (p)[0] = U8V((v) >> 56); \ + (p)[1] = U8V((v) >> 48); \ + (p)[2] = U8V((v) >> 40); \ + (p)[3] = U8V((v) >> 32); \ + (p)[4] = U8V((v) >> 24); \ + (p)[5] = U8V((v) >> 16); \ + (p)[6] = U8V((v) >> 8); \ + (p)[7] = U8V((v) ); \ + } while (0) #else #define U64TO8_BIG(p, v) \ - do { \ - U32TO8_BIG((p), U32V((v) >> 32)); \ - U32TO8_BIG((p) + 4, U32V((v) )); \ - } while (0) + do { \ + U32TO8_BIG((p), U32V((v) >> 32)); \ + U32TO8_BIG((p) + 4, U32V((v) )); \ + } while (0) #endif #endif diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-sync.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-sync.h index dddb384e..7d9a344c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-sync.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_ecrypt-sync.h @@ -59,12 +59,12 @@ typedef struct { - u32 input[16]; /* could be compressed */ - /* - * [edit] - * - * Put here all state variable needed during the encryption process. - */ + u32 input[16]; /* could be compressed */ + /* + * [edit] + * + * Put here all state variable needed during the encryption process. + */ } ECRYPT_ctx; /* ------------------------------------------------------------------------- */ @@ -84,10 +84,10 @@ void ECRYPT_init(void); * above. */ void ECRYPT_keysetup( - ECRYPT_ctx* ctx, - const u8* key, - u32 keysize, /* Key size in bits. */ - u32 ivsize); /* IV size in bits. */ + ECRYPT_ctx* ctx, + const u8* key, + u32 keysize, /* Key size in bits. */ + u32 ivsize); /* IV size in bits. */ /* * IV setup. After having called ECRYPT_keysetup(), the user is @@ -96,8 +96,8 @@ void ECRYPT_keysetup( * IV's. */ void ECRYPT_ivsetup( - ECRYPT_ctx* ctx, - const u8* iv); + ECRYPT_ctx* ctx, + const u8* iv); /* * Encryption/decryption of arbitrary length messages. @@ -138,16 +138,16 @@ void ECRYPT_ivsetup( */ void ECRYPT_encrypt_bytes( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 msglen); /* Message length in bytes. */ void ECRYPT_decrypt_bytes( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* Message length in bytes. */ /* ------------------------------------------------------------------------- */ @@ -165,9 +165,9 @@ void ECRYPT_decrypt_bytes( #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_bytes( - ECRYPT_ctx* ctx, - u8* keystream, - u32 length); /* Length of keystream in bytes. */ + ECRYPT_ctx* ctx, + u8* keystream, + u32 length); /* Length of keystream in bytes. */ #endif @@ -191,18 +191,18 @@ void ECRYPT_keystream_bytes( #define ECRYPT_USES_DEFAULT_ALL_IN_ONE /* [edit] */ void ECRYPT_encrypt_packet( - ECRYPT_ctx* ctx, - const u8* iv, - const u8* plaintext, - u8* ciphertext, - u32 msglen); + ECRYPT_ctx* ctx, + const u8* iv, + const u8* plaintext, + u8* ciphertext, + u32 msglen); void ECRYPT_decrypt_packet( - ECRYPT_ctx* ctx, - const u8* iv, - const u8* ciphertext, - u8* plaintext, - u32 msglen); + ECRYPT_ctx* ctx, + const u8* iv, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* * Encryption/decryption of blocks. @@ -219,41 +219,41 @@ void ECRYPT_decrypt_packet( #ifdef ECRYPT_USES_DEFAULT_BLOCK_MACROS #define ECRYPT_encrypt_blocks(ctx, plaintext, ciphertext, blocks) \ - ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ + (blocks) * ECRYPT_BLOCKLENGTH) #define ECRYPT_decrypt_blocks(ctx, ciphertext, plaintext, blocks) \ - ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ + (blocks) * ECRYPT_BLOCKLENGTH) #ifdef ECRYPT_GENERATES_KEYSTREAM #define ECRYPT_keystream_blocks(ctx, keystream, blocks) \ - ECRYPT_keystream_bytes(ctx, keystream, \ - (blocks) * ECRYPT_BLOCKLENGTH) + ECRYPT_keystream_bytes(ctx, keystream, \ + (blocks) * ECRYPT_BLOCKLENGTH) #endif #else void ECRYPT_encrypt_blocks( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 blocks); /* Message length in blocks. */ void ECRYPT_decrypt_blocks( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 blocks); /* Message length in blocks. */ #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_blocks( - ECRYPT_ctx* ctx, - const u8* keystream, - u32 blocks); /* Keystream length in blocks. */ + ECRYPT_ctx* ctx, + const u8* keystream, + u32 blocks); /* Keystream length in blocks. */ #endif @@ -272,11 +272,11 @@ void ECRYPT_keystream_blocks( #define ECRYPT_MAXVARIANT 1 /* [edit] */ #ifndef ECRYPT_VARIANT -#define ECRYPT_VARIANT 1 + #define ECRYPT_VARIANT 1 #endif #if (ECRYPT_VARIANT > ECRYPT_MAXVARIANT) -#error this variant does not exist + #error this variant does not exist #endif /* ------------------------------------------------------------------------- */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna-32.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna-32.h index 2aa2eeb6..3e4eb10f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna-32.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna-32.h @@ -8,216 +8,253 @@ */ #if defined(_MSC_VER) - #define POLY1305_NOINLINE __declspec(noinline) + #define POLY1305_NOINLINE __declspec(noinline) #elif defined(__GNUC__) - #define POLY1305_NOINLINE __attribute__((noinline)) + #define POLY1305_NOINLINE __attribute__((noinline)) #else - #define POLY1305_NOINLINE + #define POLY1305_NOINLINE #endif #define poly1305_block_size 16 /* 17 + sizeof(size_t) + 14*sizeof(unsigned long) */ -typedef struct { - unsigned long r[5]; - unsigned long h[5]; - unsigned long pad[4]; - size_t leftover; - unsigned char buffer[poly1305_block_size]; - unsigned char final; +typedef struct +{ + unsigned long r[5]; + unsigned long h[5]; + unsigned long pad[4]; + size_t leftover; + unsigned char buffer[poly1305_block_size]; + unsigned char final; } poly1305_state_internal_t; /* interpret four 8 bit unsigned integers as a 32 bit unsigned integer in little endian */ -static unsigned long -U8TO32(const unsigned char *p) { - return - (((unsigned long)(p[0] & 0xff) ) | - ((unsigned long)(p[1] & 0xff) << 8) | - ((unsigned long)(p[2] & 0xff) << 16) | - ((unsigned long)(p[3] & 0xff) << 24)); +static unsigned long U8TO32(const unsigned char* p) +{ + return + (((unsigned long)(p[0] & 0xff) ) | + ((unsigned long)(p[1] & 0xff) << 8) | + ((unsigned long)(p[2] & 0xff) << 16) | + ((unsigned long)(p[3] & 0xff) << 24)); } /* store a 32 bit unsigned integer as four 8 bit unsigned integers in little endian */ -static void -U32TO8(unsigned char *p, unsigned long v) { - p[0] = (v ) & 0xff; - p[1] = (v >> 8) & 0xff; - p[2] = (v >> 16) & 0xff; - p[3] = (v >> 24) & 0xff; +static void U32TO8(unsigned char* p, unsigned long v) +{ + p[0] = (v ) & 0xff; + p[1] = (v >> 8) & 0xff; + p[2] = (v >> 16) & 0xff; + p[3] = (v >> 24) & 0xff; } -void -poly1305_init(poly1305_context *ctx, const unsigned char key[32]) { - poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx; - - /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ - st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff; - st->r[1] = (U8TO32(&key[ 3]) >> 2) & 0x3ffff03; - st->r[2] = (U8TO32(&key[ 6]) >> 4) & 0x3ffc0ff; - st->r[3] = (U8TO32(&key[ 9]) >> 6) & 0x3f03fff; - st->r[4] = (U8TO32(&key[12]) >> 8) & 0x00fffff; - - /* h = 0 */ - st->h[0] = 0; - st->h[1] = 0; - st->h[2] = 0; - st->h[3] = 0; - st->h[4] = 0; - - /* save pad for later */ - st->pad[0] = U8TO32(&key[16]); - st->pad[1] = U8TO32(&key[20]); - st->pad[2] = U8TO32(&key[24]); - st->pad[3] = U8TO32(&key[28]); - - st->leftover = 0; - st->final = 0; +void poly1305_init(poly1305_context* ctx, const unsigned char key[32]) +{ + poly1305_state_internal_t* st = (poly1305_state_internal_t*)ctx; + + /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ + st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff; + st->r[1] = (U8TO32(&key[ 3]) >> 2) & 0x3ffff03; + st->r[2] = (U8TO32(&key[ 6]) >> 4) & 0x3ffc0ff; + st->r[3] = (U8TO32(&key[ 9]) >> 6) & 0x3f03fff; + st->r[4] = (U8TO32(&key[12]) >> 8) & 0x00fffff; + + /* h = 0 */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + + /* save pad for later */ + st->pad[0] = U8TO32(&key[16]); + st->pad[1] = U8TO32(&key[20]); + st->pad[2] = U8TO32(&key[24]); + st->pad[3] = U8TO32(&key[28]); + + st->leftover = 0; + st->final = 0; } -static void -poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m, size_t bytes) { - const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ - unsigned long r0,r1,r2,r3,r4; - unsigned long s1,s2,s3,s4; - unsigned long h0,h1,h2,h3,h4; - unsigned long long d0,d1,d2,d3,d4; - unsigned long c; - - r0 = st->r[0]; - r1 = st->r[1]; - r2 = st->r[2]; - r3 = st->r[3]; - r4 = st->r[4]; - - s1 = r1 * 5; - s2 = r2 * 5; - s3 = r3 * 5; - s4 = r4 * 5; - - h0 = st->h[0]; - h1 = st->h[1]; - h2 = st->h[2]; - h3 = st->h[3]; - h4 = st->h[4]; - - while (bytes >= poly1305_block_size) { - /* h += m[i] */ - h0 += (U8TO32(m+ 0) ) & 0x3ffffff; - h1 += (U8TO32(m+ 3) >> 2) & 0x3ffffff; - h2 += (U8TO32(m+ 6) >> 4) & 0x3ffffff; - h3 += (U8TO32(m+ 9) >> 6) & 0x3ffffff; - h4 += (U8TO32(m+12) >> 8) | hibit; - - /* h *= r */ - d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1); - d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2); - d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3); - d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4); - d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0); - - /* (partial) h %= p */ - c = (unsigned long)(d0 >> 26); h0 = (unsigned long)d0 & 0x3ffffff; - d1 += c; c = (unsigned long)(d1 >> 26); h1 = (unsigned long)d1 & 0x3ffffff; - d2 += c; c = (unsigned long)(d2 >> 26); h2 = (unsigned long)d2 & 0x3ffffff; - d3 += c; c = (unsigned long)(d3 >> 26); h3 = (unsigned long)d3 & 0x3ffffff; - d4 += c; c = (unsigned long)(d4 >> 26); h4 = (unsigned long)d4 & 0x3ffffff; - h0 += c * 5; c = (h0 >> 26); h0 = h0 & 0x3ffffff; - h1 += c; - - m += poly1305_block_size; - bytes -= poly1305_block_size; - } - - st->h[0] = h0; - st->h[1] = h1; - st->h[2] = h2; - st->h[3] = h3; - st->h[4] = h4; +static void poly1305_blocks(poly1305_state_internal_t* st, const unsigned char* m, size_t bytes) +{ + const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ + unsigned long r0, r1, r2, r3, r4; + unsigned long s1, s2, s3, s4; + unsigned long h0, h1, h2, h3, h4; + unsigned long long d0, d1, d2, d3, d4; + unsigned long c; + + r0 = st->r[0]; + r1 = st->r[1]; + r2 = st->r[2]; + r3 = st->r[3]; + r4 = st->r[4]; + + s1 = r1 * 5; + s2 = r2 * 5; + s3 = r3 * 5; + s4 = r4 * 5; + + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + while (bytes >= poly1305_block_size) + { + /* h += m[i] */ + h0 += (U8TO32(m + 0) ) & 0x3ffffff; + h1 += (U8TO32(m + 3) >> 2) & 0x3ffffff; + h2 += (U8TO32(m + 6) >> 4) & 0x3ffffff; + h3 += (U8TO32(m + 9) >> 6) & 0x3ffffff; + h4 += (U8TO32(m + 12) >> 8) | hibit; + + /* h *= r */ + d0 = ((unsigned long long)h0 * r0) + ((unsigned long long)h1 * s4) + ((unsigned long long)h2 * s3) + ((unsigned long long)h3 * s2) + ((unsigned long long)h4 * s1); + d1 = ((unsigned long long)h0 * r1) + ((unsigned long long)h1 * r0) + ((unsigned long long)h2 * s4) + ((unsigned long long)h3 * s3) + ((unsigned long long)h4 * s2); + d2 = ((unsigned long long)h0 * r2) + ((unsigned long long)h1 * r1) + ((unsigned long long)h2 * r0) + ((unsigned long long)h3 * s4) + ((unsigned long long)h4 * s3); + d3 = ((unsigned long long)h0 * r3) + ((unsigned long long)h1 * r2) + ((unsigned long long)h2 * r1) + ((unsigned long long)h3 * r0) + ((unsigned long long)h4 * s4); + d4 = ((unsigned long long)h0 * r4) + ((unsigned long long)h1 * r3) + ((unsigned long long)h2 * r2) + ((unsigned long long)h3 * r1) + ((unsigned long long)h4 * r0); + + /* (partial) h %= p */ + c = (unsigned long)(d0 >> 26); + h0 = (unsigned long)d0 & 0x3ffffff; + d1 += c; + c = (unsigned long)(d1 >> 26); + h1 = (unsigned long)d1 & 0x3ffffff; + d2 += c; + c = (unsigned long)(d2 >> 26); + h2 = (unsigned long)d2 & 0x3ffffff; + d3 += c; + c = (unsigned long)(d3 >> 26); + h3 = (unsigned long)d3 & 0x3ffffff; + d4 += c; + c = (unsigned long)(d4 >> 26); + h4 = (unsigned long)d4 & 0x3ffffff; + h0 += c * 5; + c = (h0 >> 26); + h0 = h0 & 0x3ffffff; + h1 += c; + + m += poly1305_block_size; + bytes -= poly1305_block_size; + } + + st->h[0] = h0; + st->h[1] = h1; + st->h[2] = h2; + st->h[3] = h3; + st->h[4] = h4; } -POLY1305_NOINLINE void -poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) { - poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx; - unsigned long h0,h1,h2,h3,h4,c; - unsigned long g0,g1,g2,g3,g4; - unsigned long long f; - unsigned long mask; - - /* process the remaining block */ - if (st->leftover) { - size_t i = st->leftover; - st->buffer[i++] = 1; - for (; i < poly1305_block_size; i++) - st->buffer[i] = 0; - st->final = 1; - poly1305_blocks(st, st->buffer, poly1305_block_size); - } - - /* fully carry h */ - h0 = st->h[0]; - h1 = st->h[1]; - h2 = st->h[2]; - h3 = st->h[3]; - h4 = st->h[4]; - - c = h1 >> 26; h1 = h1 & 0x3ffffff; - h2 += c; c = h2 >> 26; h2 = h2 & 0x3ffffff; - h3 += c; c = h3 >> 26; h3 = h3 & 0x3ffffff; - h4 += c; c = h4 >> 26; h4 = h4 & 0x3ffffff; - h0 += c * 5; c = h0 >> 26; h0 = h0 & 0x3ffffff; - h1 += c; - - /* compute h + -p */ - g0 = h0 + 5; c = g0 >> 26; g0 &= 0x3ffffff; - g1 = h1 + c; c = g1 >> 26; g1 &= 0x3ffffff; - g2 = h2 + c; c = g2 >> 26; g2 &= 0x3ffffff; - g3 = h3 + c; c = g3 >> 26; g3 &= 0x3ffffff; - g4 = h4 + c - (1UL << 26); - - /* select h if h < p, or h + -p if h >= p */ - mask = (g4 >> ((sizeof(unsigned long) * 8) - 1)) - 1; - g0 &= mask; - g1 &= mask; - g2 &= mask; - g3 &= mask; - g4 &= mask; - mask = ~mask; - h0 = (h0 & mask) | g0; - h1 = (h1 & mask) | g1; - h2 = (h2 & mask) | g2; - h3 = (h3 & mask) | g3; - h4 = (h4 & mask) | g4; - - /* h = h % (2^128) */ - h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; - h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; - h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; - h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; - - /* mac = (h + pad) % (2^128) */ - f = (unsigned long long)h0 + st->pad[0] ; h0 = (unsigned long)f; - f = (unsigned long long)h1 + st->pad[1] + (f >> 32); h1 = (unsigned long)f; - f = (unsigned long long)h2 + st->pad[2] + (f >> 32); h2 = (unsigned long)f; - f = (unsigned long long)h3 + st->pad[3] + (f >> 32); h3 = (unsigned long)f; - - U32TO8(mac + 0, h0); - U32TO8(mac + 4, h1); - U32TO8(mac + 8, h2); - U32TO8(mac + 12, h3); - - /* zero out the state */ - st->h[0] = 0; - st->h[1] = 0; - st->h[2] = 0; - st->h[3] = 0; - st->h[4] = 0; - st->r[0] = 0; - st->r[1] = 0; - st->r[2] = 0; - st->r[3] = 0; - st->r[4] = 0; - st->pad[0] = 0; - st->pad[1] = 0; - st->pad[2] = 0; - st->pad[3] = 0; +POLY1305_NOINLINE void poly1305_finish(poly1305_context* ctx, unsigned char mac[16]) +{ + poly1305_state_internal_t* st = (poly1305_state_internal_t*)ctx; + unsigned long h0, h1, h2, h3, h4, c; + unsigned long g0, g1, g2, g3, g4; + unsigned long long f; + unsigned long mask; + + /* process the remaining block */ + if (st->leftover) + { + size_t i = st->leftover; + st->buffer[i++] = 1; + + for (; i < poly1305_block_size; i++) + st->buffer[i] = 0; + + st->final = 1; + poly1305_blocks(st, st->buffer, poly1305_block_size); + } + + /* fully carry h */ + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + c = h1 >> 26; + h1 = h1 & 0x3ffffff; + h2 += c; + c = h2 >> 26; + h2 = h2 & 0x3ffffff; + h3 += c; + c = h3 >> 26; + h3 = h3 & 0x3ffffff; + h4 += c; + c = h4 >> 26; + h4 = h4 & 0x3ffffff; + h0 += c * 5; + c = h0 >> 26; + h0 = h0 & 0x3ffffff; + h1 += c; + + /* compute h + -p */ + g0 = h0 + 5; + c = g0 >> 26; + g0 &= 0x3ffffff; + g1 = h1 + c; + c = g1 >> 26; + g1 &= 0x3ffffff; + g2 = h2 + c; + c = g2 >> 26; + g2 &= 0x3ffffff; + g3 = h3 + c; + c = g3 >> 26; + g3 &= 0x3ffffff; + g4 = h4 + c - (1UL << 26); + + /* select h if h < p, or h + -p if h >= p */ + mask = (g4 >> ((sizeof(unsigned long) * 8) - 1)) - 1; + g0 &= mask; + g1 &= mask; + g2 &= mask; + g3 &= mask; + g4 &= mask; + mask = ~mask; + h0 = (h0 & mask) | g0; + h1 = (h1 & mask) | g1; + h2 = (h2 & mask) | g2; + h3 = (h3 & mask) | g3; + h4 = (h4 & mask) | g4; + + /* h = h % (2^128) */ + h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; + h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; + h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; + h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; + + /* mac = (h + pad) % (2^128) */ + f = (unsigned long long)h0 + st->pad[0] ; + h0 = (unsigned long)f; + f = (unsigned long long)h1 + st->pad[1] + (f >> 32); + h1 = (unsigned long)f; + f = (unsigned long long)h2 + st->pad[2] + (f >> 32); + h2 = (unsigned long)f; + f = (unsigned long long)h3 + st->pad[3] + (f >> 32); + h3 = (unsigned long)f; + + U32TO8(mac + 0, h0); + U32TO8(mac + 4, h1); + U32TO8(mac + 8, h2); + U32TO8(mac + 12, h3); + + /* zero out the state */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + st->r[0] = 0; + st->r[1] = 0; + st->r[2] = 0; + st->r[3] = 0; + st->r[4] = 0; + st->pad[0] = 0; + st->pad[1] = 0; + st->pad[2] = 0; + st->pad[3] = 0; } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna.h index 574efabd..a5449272 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sw_poly1305-donna.h @@ -9,15 +9,16 @@ #include -typedef struct { - size_t aligner; - unsigned char opaque[136]; +typedef struct +{ + size_t aligner; + unsigned char opaque[136]; } poly1305_context; -void poly1305_init(poly1305_context *ctx, const unsigned char key[32]); -void poly1305_update(poly1305_context *ctx, const unsigned char *m, size_t bytes); -void poly1305_finish(poly1305_context *ctx, unsigned char mac[16]); -void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, const unsigned char key[32]); +void poly1305_init(poly1305_context* ctx, const unsigned char key[32]); +void poly1305_update(poly1305_context* ctx, const unsigned char* m, size_t bytes); +void poly1305_finish(poly1305_context* ctx, unsigned char mac[16]); +void poly1305_auth(unsigned char mac[16], const unsigned char* m, size_t bytes, const unsigned char key[32]); int poly1305_verify(const unsigned char mac1[16], const unsigned char mac2[16]); int poly1305_power_on_self_test(void); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sys_ctrl.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sys_ctrl.h index 02d37896..7ecddc4d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sys_ctrl.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/sys_ctrl.h @@ -103,10 +103,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define SysCtrlSetRechargeBeforePowerDown NOROM_SysCtrlSetRechargeBeforePowerDown - #define SysCtrlAdjustRechargeAfterPowerDown NOROM_SysCtrlAdjustRechargeAfterPowerDown - #define SysCtrl_DCDC_VoltageConditionalControl NOROM_SysCtrl_DCDC_VoltageConditionalControl - #define SysCtrlResetSourceGet NOROM_SysCtrlResetSourceGet +#define SysCtrlSetRechargeBeforePowerDown NOROM_SysCtrlSetRechargeBeforePowerDown +#define SysCtrlAdjustRechargeAfterPowerDown NOROM_SysCtrlAdjustRechargeAfterPowerDown +#define SysCtrl_DCDC_VoltageConditionalControl NOROM_SysCtrl_DCDC_VoltageConditionalControl +#define SysCtrlResetSourceGet NOROM_SysCtrlResetSourceGet #endif //***************************************************************************** @@ -156,7 +156,7 @@ __STATIC_INLINE uint32_t SysCtrlClockGet( void ) { // Return fixed clock speed - return( GET_MCU_CLOCK ); + return ( GET_MCU_CLOCK ); } //***************************************************************************** @@ -318,14 +318,16 @@ extern uint32_t SysCtrlResetSourceGet( void ); __STATIC_INLINE void SysCtrlSystemReset( void ) { - // Disable CPU interrupts - CPUcpsid(); - // Write reset register - HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1; - // Finally, wait until the above write propagates - while ( 1 ) { - // Do nothing, just wait for the reset (and never return from here) - } + // Disable CPU interrupts + CPUcpsid(); + // Write reset register + HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1; + + // Finally, wait until the above write propagates + while ( 1 ) + { + // Do nothing, just wait for the reset (and never return from here) + } } //***************************************************************************** @@ -379,23 +381,23 @@ SysCtrlClockLossResetDisable(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_SysCtrlSetRechargeBeforePowerDown - #undef SysCtrlSetRechargeBeforePowerDown - #define SysCtrlSetRechargeBeforePowerDown ROM_SysCtrlSetRechargeBeforePowerDown - #endif - #ifdef ROM_SysCtrlAdjustRechargeAfterPowerDown - #undef SysCtrlAdjustRechargeAfterPowerDown - #define SysCtrlAdjustRechargeAfterPowerDown ROM_SysCtrlAdjustRechargeAfterPowerDown - #endif - #ifdef ROM_SysCtrl_DCDC_VoltageConditionalControl - #undef SysCtrl_DCDC_VoltageConditionalControl - #define SysCtrl_DCDC_VoltageConditionalControl ROM_SysCtrl_DCDC_VoltageConditionalControl - #endif - #ifdef ROM_SysCtrlResetSourceGet - #undef SysCtrlResetSourceGet - #define SysCtrlResetSourceGet ROM_SysCtrlResetSourceGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_SysCtrlSetRechargeBeforePowerDown +#undef SysCtrlSetRechargeBeforePowerDown +#define SysCtrlSetRechargeBeforePowerDown ROM_SysCtrlSetRechargeBeforePowerDown +#endif +#ifdef ROM_SysCtrlAdjustRechargeAfterPowerDown +#undef SysCtrlAdjustRechargeAfterPowerDown +#define SysCtrlAdjustRechargeAfterPowerDown ROM_SysCtrlAdjustRechargeAfterPowerDown +#endif +#ifdef ROM_SysCtrl_DCDC_VoltageConditionalControl +#undef SysCtrl_DCDC_VoltageConditionalControl +#define SysCtrl_DCDC_VoltageConditionalControl ROM_SysCtrl_DCDC_VoltageConditionalControl +#endif +#ifdef ROM_SysCtrlResetSourceGet +#undef SysCtrlResetSourceGet +#define SysCtrlResetSourceGet ROM_SysCtrlResetSourceGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/systick.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/systick.h index 735171df..d0654401 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/systick.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/systick.h @@ -247,7 +247,7 @@ __STATIC_INLINE uint32_t SysTickPeriodGet(void) { // Return the period of the SysTick counter. - return(HWREG(NVIC_ST_RELOAD) + 1); + return (HWREG(NVIC_ST_RELOAD) + 1); } //***************************************************************************** @@ -264,7 +264,7 @@ __STATIC_INLINE uint32_t SysTickValueGet(void) { // Return the current value of the SysTick counter. - return(HWREG(NVIC_ST_CURRENT)); + return (HWREG(NVIC_ST_CURRENT)); } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/timer.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/timer.h index da130749..b010b3b3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/timer.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/timer.h @@ -80,14 +80,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define TimerConfigure NOROM_TimerConfigure - #define TimerLevelControl NOROM_TimerLevelControl - #define TimerStallControl NOROM_TimerStallControl - #define TimerWaitOnTriggerControl NOROM_TimerWaitOnTriggerControl - #define TimerIntRegister NOROM_TimerIntRegister - #define TimerIntUnregister NOROM_TimerIntUnregister - #define TimerMatchUpdateMode NOROM_TimerMatchUpdateMode - #define TimerIntervalLoadMode NOROM_TimerIntervalLoadMode +#define TimerConfigure NOROM_TimerConfigure +#define TimerLevelControl NOROM_TimerLevelControl +#define TimerStallControl NOROM_TimerStallControl +#define TimerWaitOnTriggerControl NOROM_TimerWaitOnTriggerControl +#define TimerIntRegister NOROM_TimerIntRegister +#define TimerIntUnregister NOROM_TimerIntUnregister +#define TimerMatchUpdateMode NOROM_TimerMatchUpdateMode +#define TimerIntervalLoadMode NOROM_TimerIntervalLoadMode #endif //***************************************************************************** @@ -210,8 +210,8 @@ extern "C" static bool TimerBaseValid(uint32_t ui32Base) { - return((ui32Base == GPT0_BASE) || (ui32Base == GPT1_BASE) || - (ui32Base == GPT2_BASE) || (ui32Base == GPT3_BASE)); + return ((ui32Base == GPT0_BASE) || (ui32Base == GPT1_BASE) || + (ui32Base == GPT2_BASE) || (ui32Base == GPT3_BASE)); } #endif @@ -474,13 +474,13 @@ TimerPrescaleSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) ASSERT(ui32Value < 256); // Set the timer A prescaler if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAPR) = ui32Value; } // Set the timer B prescaler if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBPR) = ui32Value; } @@ -522,8 +522,8 @@ TimerPrescaleGet(uint32_t ui32Base, uint32_t ui32Timer) (ui32Timer == TIMER_BOTH)); // Return the appropriate prescale value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPR) : - HWREG(ui32Base + GPT_O_TBPR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPR) : + HWREG(ui32Base + GPT_O_TBPR)); } //***************************************************************************** @@ -558,13 +558,13 @@ TimerPrescaleMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) ASSERT(ui32Value < 256); // Set the timer A prescale match if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAPMR) = ui32Value; } // Set the timer B prescale match if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBPMR) = ui32Value; } @@ -597,8 +597,8 @@ TimerPrescaleMatchGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate prescale match value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPMR) : - HWREG(ui32Base + GPT_O_TBPMR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAPMR) : + HWREG(ui32Base + GPT_O_TBPMR)); } //***************************************************************************** @@ -633,13 +633,13 @@ TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) (ui32Timer == TIMER_BOTH)); // Set the timer A load value if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAILR) = ui32Value; } // Set the timer B load value if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBILR) = ui32Value; } @@ -674,8 +674,8 @@ TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate load value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAILR) : - HWREG(ui32Base + GPT_O_TBILR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAILR) : + HWREG(ui32Base + GPT_O_TBILR)); } //***************************************************************************** @@ -706,8 +706,8 @@ TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate timer value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAR) : - HWREG(ui32Base + GPT_O_TBR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAR) : + HWREG(ui32Base + GPT_O_TBR)); } //***************************************************************************** @@ -745,13 +745,13 @@ TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) (ui32Timer == TIMER_BOTH)); // Set the timer A match value if requested. - if(ui32Timer & TIMER_A) + if (ui32Timer & TIMER_A) { HWREG(ui32Base + GPT_O_TAMATCHR) = ui32Value; } // Set the timer B match value if requested. - if(ui32Timer & TIMER_B) + if (ui32Timer & TIMER_B) { HWREG(ui32Base + GPT_O_TBMATCHR) = ui32Value; } @@ -786,8 +786,8 @@ TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer) ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B)); // Return the appropriate match value. - return((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAMATCHR) : - HWREG(ui32Base + GPT_O_TBMATCHR)); + return ((ui32Timer == TIMER_A) ? HWREG(ui32Base + GPT_O_TAMATCHR) : + HWREG(ui32Base + GPT_O_TBMATCHR)); } //***************************************************************************** @@ -936,8 +936,8 @@ TimerIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - return(bMasked ? HWREG(ui32Base + GPT_O_MIS) : - HWREG(ui32Base + GPT_O_RIS)); + return (bMasked ? HWREG(ui32Base + GPT_O_MIS) : + HWREG(ui32Base + GPT_O_RIS)); } //***************************************************************************** @@ -1121,39 +1121,39 @@ extern void TimerIntervalLoadMode(uint32_t ui32Base, uint32_t ui32Timer, uint32_ // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_TimerConfigure - #undef TimerConfigure - #define TimerConfigure ROM_TimerConfigure - #endif - #ifdef ROM_TimerLevelControl - #undef TimerLevelControl - #define TimerLevelControl ROM_TimerLevelControl - #endif - #ifdef ROM_TimerStallControl - #undef TimerStallControl - #define TimerStallControl ROM_TimerStallControl - #endif - #ifdef ROM_TimerWaitOnTriggerControl - #undef TimerWaitOnTriggerControl - #define TimerWaitOnTriggerControl ROM_TimerWaitOnTriggerControl - #endif - #ifdef ROM_TimerIntRegister - #undef TimerIntRegister - #define TimerIntRegister ROM_TimerIntRegister - #endif - #ifdef ROM_TimerIntUnregister - #undef TimerIntUnregister - #define TimerIntUnregister ROM_TimerIntUnregister - #endif - #ifdef ROM_TimerMatchUpdateMode - #undef TimerMatchUpdateMode - #define TimerMatchUpdateMode ROM_TimerMatchUpdateMode - #endif - #ifdef ROM_TimerIntervalLoadMode - #undef TimerIntervalLoadMode - #define TimerIntervalLoadMode ROM_TimerIntervalLoadMode - #endif +#include "../driverlib/rom.h" +#ifdef ROM_TimerConfigure +#undef TimerConfigure +#define TimerConfigure ROM_TimerConfigure +#endif +#ifdef ROM_TimerLevelControl +#undef TimerLevelControl +#define TimerLevelControl ROM_TimerLevelControl +#endif +#ifdef ROM_TimerStallControl +#undef TimerStallControl +#define TimerStallControl ROM_TimerStallControl +#endif +#ifdef ROM_TimerWaitOnTriggerControl +#undef TimerWaitOnTriggerControl +#define TimerWaitOnTriggerControl ROM_TimerWaitOnTriggerControl +#endif +#ifdef ROM_TimerIntRegister +#undef TimerIntRegister +#define TimerIntRegister ROM_TimerIntRegister +#endif +#ifdef ROM_TimerIntUnregister +#undef TimerIntUnregister +#define TimerIntUnregister ROM_TimerIntUnregister +#endif +#ifdef ROM_TimerMatchUpdateMode +#undef TimerMatchUpdateMode +#define TimerMatchUpdateMode ROM_TimerMatchUpdateMode +#endif +#ifdef ROM_TimerIntervalLoadMode +#undef TimerIntervalLoadMode +#define TimerIntervalLoadMode ROM_TimerIntervalLoadMode +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/trng.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/trng.h index 08a485b4..e3cfd1e4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/trng.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/trng.h @@ -83,8 +83,8 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define TRNGConfigure NOROM_TRNGConfigure - #define TRNGNumberGet NOROM_TRNGNumberGet +#define TRNGConfigure NOROM_TRNGConfigure +#define TRNGNumberGet NOROM_TRNGNumberGet #endif //***************************************************************************** @@ -304,14 +304,14 @@ TRNGIntStatus(bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { ui32Mask = HWREG(TRNG_BASE + TRNG_O_IRQFLAGMASK); - return(ui32Mask & HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT)); + return (ui32Mask & HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT)); } else { - return(HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT) & 0x00000003); + return (HWREG(TRNG_BASE + TRNG_O_IRQFLAGSTAT) & 0x00000003); } } @@ -420,15 +420,15 @@ TRNGIntUnregister(void) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_TRNGConfigure - #undef TRNGConfigure - #define TRNGConfigure ROM_TRNGConfigure - #endif - #ifdef ROM_TRNGNumberGet - #undef TRNGNumberGet - #define TRNGNumberGet ROM_TRNGNumberGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_TRNGConfigure +#undef TRNGConfigure +#define TRNGConfigure ROM_TRNGConfigure +#endif +#ifdef ROM_TRNGNumberGet +#undef TRNGNumberGet +#define TRNGNumberGet ROM_TRNGNumberGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/uart.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/uart.h index e9e71cad..05cd2eb8 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/uart.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/uart.h @@ -82,16 +82,16 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define UARTFIFOLevelGet NOROM_UARTFIFOLevelGet - #define UARTConfigSetExpClk NOROM_UARTConfigSetExpClk - #define UARTConfigGetExpClk NOROM_UARTConfigGetExpClk - #define UARTDisable NOROM_UARTDisable - #define UARTCharGetNonBlocking NOROM_UARTCharGetNonBlocking - #define UARTCharGet NOROM_UARTCharGet - #define UARTCharPutNonBlocking NOROM_UARTCharPutNonBlocking - #define UARTCharPut NOROM_UARTCharPut - #define UARTIntRegister NOROM_UARTIntRegister - #define UARTIntUnregister NOROM_UARTIntUnregister +#define UARTFIFOLevelGet NOROM_UARTFIFOLevelGet +#define UARTConfigSetExpClk NOROM_UARTConfigSetExpClk +#define UARTConfigGetExpClk NOROM_UARTConfigGetExpClk +#define UARTDisable NOROM_UARTDisable +#define UARTCharGetNonBlocking NOROM_UARTCharGetNonBlocking +#define UARTCharGet NOROM_UARTCharGet +#define UARTCharPutNonBlocking NOROM_UARTCharPutNonBlocking +#define UARTCharPut NOROM_UARTCharPut +#define UARTIntRegister NOROM_UARTIntRegister +#define UARTIntUnregister NOROM_UARTIntUnregister #endif //***************************************************************************** @@ -208,7 +208,7 @@ extern "C" static bool UARTBaseValid(uint32_t ui32Base) { - return(( ui32Base == UART0_BASE ) || ( ui32Base == UART0_NONBUF_BASE )); + return (( ui32Base == UART0_BASE ) || ( ui32Base == UART0_NONBUF_BASE )); } #endif @@ -273,8 +273,8 @@ UARTParityModeGet(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the current parity setting - return(HWREG(ui32Base + UART_O_LCRH) & - (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); + return (HWREG(ui32Base + UART_O_LCRH) & + (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); } //***************************************************************************** @@ -348,8 +348,8 @@ UARTFIFOLevelSet(uint32_t ui32Base, uint32_t ui32TxLevel, //! \return None // //***************************************************************************** -extern void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t *pui32TxLevel, - uint32_t *pui32RxLevel); +extern void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t* pui32TxLevel, + uint32_t* pui32RxLevel); //***************************************************************************** // @@ -412,7 +412,7 @@ extern void UARTConfigSetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, // //***************************************************************************** extern void UARTConfigGetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, - uint32_t *pui32Baud, uint32_t *pui32Config); + uint32_t* pui32Baud, uint32_t* pui32Config); //***************************************************************************** // @@ -517,7 +517,7 @@ UARTCharsAvail(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the availability of characters. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); } //***************************************************************************** @@ -541,7 +541,7 @@ UARTSpaceAvail(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the availability of space. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); } //***************************************************************************** @@ -639,8 +639,8 @@ UARTBusy(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Determine if the UART is busy. - return((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? - UART_BUSY : UART_IDLE); + return ((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? + UART_BUSY : UART_IDLE); } //***************************************************************************** @@ -666,7 +666,7 @@ UARTBreakCtl(uint32_t ui32Base, bool bBreakState) // Set the break condition as requested. HWREG(ui32Base + UART_O_LCRH) = - (bBreakState ? + (bBreakState ? (HWREG(ui32Base + UART_O_LCRH) | UART_LCRH_BRK) : (HWREG(ui32Base + UART_O_LCRH) & ~(UART_LCRH_BRK))); } @@ -811,13 +811,13 @@ UARTIntStatus(uint32_t ui32Base, bool bMasked) // Return either the interrupt status or the raw interrupt status as // requested. - if(bMasked) + if (bMasked) { - return(HWREG(ui32Base + UART_O_MIS)); + return (HWREG(ui32Base + UART_O_MIS)); } else { - return(HWREG(ui32Base + UART_O_RIS)); + return (HWREG(ui32Base + UART_O_RIS)); } } @@ -952,7 +952,7 @@ UARTRxErrorGet(uint32_t ui32Base) ASSERT(UARTBaseValid(ui32Base)); // Return the current value of the receive status register. - return(HWREG(ui32Base + UART_O_RSR) & 0x0000000F); + return (HWREG(ui32Base + UART_O_RSR) & 0x0000000F); } //***************************************************************************** @@ -1028,47 +1028,47 @@ UARTHwFlowControlDisable( uint32_t ui32Base ) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_UARTFIFOLevelGet - #undef UARTFIFOLevelGet - #define UARTFIFOLevelGet ROM_UARTFIFOLevelGet - #endif - #ifdef ROM_UARTConfigSetExpClk - #undef UARTConfigSetExpClk - #define UARTConfigSetExpClk ROM_UARTConfigSetExpClk - #endif - #ifdef ROM_UARTConfigGetExpClk - #undef UARTConfigGetExpClk - #define UARTConfigGetExpClk ROM_UARTConfigGetExpClk - #endif - #ifdef ROM_UARTDisable - #undef UARTDisable - #define UARTDisable ROM_UARTDisable - #endif - #ifdef ROM_UARTCharGetNonBlocking - #undef UARTCharGetNonBlocking - #define UARTCharGetNonBlocking ROM_UARTCharGetNonBlocking - #endif - #ifdef ROM_UARTCharGet - #undef UARTCharGet - #define UARTCharGet ROM_UARTCharGet - #endif - #ifdef ROM_UARTCharPutNonBlocking - #undef UARTCharPutNonBlocking - #define UARTCharPutNonBlocking ROM_UARTCharPutNonBlocking - #endif - #ifdef ROM_UARTCharPut - #undef UARTCharPut - #define UARTCharPut ROM_UARTCharPut - #endif - #ifdef ROM_UARTIntRegister - #undef UARTIntRegister - #define UARTIntRegister ROM_UARTIntRegister - #endif - #ifdef ROM_UARTIntUnregister - #undef UARTIntUnregister - #define UARTIntUnregister ROM_UARTIntUnregister - #endif +#include "../driverlib/rom.h" +#ifdef ROM_UARTFIFOLevelGet +#undef UARTFIFOLevelGet +#define UARTFIFOLevelGet ROM_UARTFIFOLevelGet +#endif +#ifdef ROM_UARTConfigSetExpClk +#undef UARTConfigSetExpClk +#define UARTConfigSetExpClk ROM_UARTConfigSetExpClk +#endif +#ifdef ROM_UARTConfigGetExpClk +#undef UARTConfigGetExpClk +#define UARTConfigGetExpClk ROM_UARTConfigGetExpClk +#endif +#ifdef ROM_UARTDisable +#undef UARTDisable +#define UARTDisable ROM_UARTDisable +#endif +#ifdef ROM_UARTCharGetNonBlocking +#undef UARTCharGetNonBlocking +#define UARTCharGetNonBlocking ROM_UARTCharGetNonBlocking +#endif +#ifdef ROM_UARTCharGet +#undef UARTCharGet +#define UARTCharGet ROM_UARTCharGet +#endif +#ifdef ROM_UARTCharPutNonBlocking +#undef UARTCharPutNonBlocking +#define UARTCharPutNonBlocking ROM_UARTCharPutNonBlocking +#endif +#ifdef ROM_UARTCharPut +#undef UARTCharPut +#define UARTCharPut ROM_UARTCharPut +#endif +#ifdef ROM_UARTIntRegister +#undef UARTIntRegister +#define UARTIntRegister ROM_UARTIntRegister +#endif +#ifdef ROM_UARTIntUnregister +#undef UARTIntUnregister +#define UARTIntUnregister ROM_UARTIntUnregister +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/udma.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/udma.h index 443da6ef..0ac722a5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/udma.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/udma.h @@ -82,14 +82,14 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define uDMAChannelAttributeEnable NOROM_uDMAChannelAttributeEnable - #define uDMAChannelAttributeDisable NOROM_uDMAChannelAttributeDisable - #define uDMAChannelAttributeGet NOROM_uDMAChannelAttributeGet - #define uDMAChannelControlSet NOROM_uDMAChannelControlSet - #define uDMAChannelTransferSet NOROM_uDMAChannelTransferSet - #define uDMAChannelScatterGatherSet NOROM_uDMAChannelScatterGatherSet - #define uDMAChannelSizeGet NOROM_uDMAChannelSizeGet - #define uDMAChannelModeGet NOROM_uDMAChannelModeGet +#define uDMAChannelAttributeEnable NOROM_uDMAChannelAttributeEnable +#define uDMAChannelAttributeDisable NOROM_uDMAChannelAttributeDisable +#define uDMAChannelAttributeGet NOROM_uDMAChannelAttributeGet +#define uDMAChannelControlSet NOROM_uDMAChannelControlSet +#define uDMAChannelTransferSet NOROM_uDMAChannelTransferSet +#define uDMAChannelScatterGatherSet NOROM_uDMAChannelScatterGatherSet +#define uDMAChannelSizeGet NOROM_uDMAChannelSizeGet +#define uDMAChannelModeGet NOROM_uDMAChannelModeGet #endif //***************************************************************************** @@ -102,8 +102,8 @@ extern "C" //***************************************************************************** typedef struct { - volatile void *pvSrcEndAddr; //!< The ending source address of the data transfer. - volatile void *pvDstEndAddr; //!< The ending destination address of the data transfer. + volatile void* pvSrcEndAddr; //!< The ending source address of the data transfer. + volatile void* pvDstEndAddr; //!< The ending destination address of the data transfer. volatile uint32_t ui32Control; //!< The channel control mode. volatile uint32_t ui32Spare; //!< An unused location. } @@ -185,19 +185,19 @@ tDMAControlTable; pvDstAddr, \ ui32ArbSize, \ ui32Mode) \ - { \ - (((ui32SrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ - ((void *)(&((uint8_t *)(pvSrcAddr))[((ui32TransferCount) << \ - ((ui32SrcIncrement) >> 26)) - 1]))), \ - (((ui32DstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ - ((void *)(&((uint8_t *)(pvDstAddr))[((ui32TransferCount) << \ - ((ui32DstIncrement) >> 30)) - 1]))), \ - (ui32SrcIncrement) | (ui32DstIncrement) | (ui32ItemSize) | \ - (ui32ArbSize) | (((ui32TransferCount) - 1) << 4) | \ - ((((ui32Mode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ - ((ui32Mode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ - (ui32Mode) | UDMA_MODE_ALT_SELECT : (ui32Mode)), 0 \ - } +{ \ + (((ui32SrcIncrement) == UDMA_SRC_INC_NONE) ? (pvSrcAddr) : \ + ((void *)(&((uint8_t *)(pvSrcAddr))[((ui32TransferCount) << \ + ((ui32SrcIncrement) >> 26)) - 1]))), \ + (((ui32DstIncrement) == UDMA_DST_INC_NONE) ? (pvDstAddr) : \ + ((void *)(&((uint8_t *)(pvDstAddr))[((ui32TransferCount) << \ + ((ui32DstIncrement) >> 30)) - 1]))), \ + (ui32SrcIncrement) | (ui32DstIncrement) | (ui32ItemSize) | \ + (ui32ArbSize) | (((ui32TransferCount) - 1) << 4) | \ + ((((ui32Mode) == UDMA_MODE_MEM_SCATTER_GATHER) || \ + ((ui32Mode) == UDMA_MODE_PER_SCATTER_GATHER)) ? \ + (ui32Mode) | UDMA_MODE_ALT_SELECT : (ui32Mode)), 0 \ +} //***************************************************************************** // @@ -237,9 +237,9 @@ tDMAControlTable; #define UDMA_MODE_AUTO 0x00000002 #define UDMA_MODE_PINGPONG 0x00000003 #define UDMA_MODE_MEM_SCATTER_GATHER \ - 0x00000004 + 0x00000004 #define UDMA_MODE_PER_SCATTER_GATHER \ - 0x00000006 + 0x00000006 #define UDMA_MODE_M 0x00000007 // uDMA Transfer Mode #define UDMA_MODE_ALT_SELECT 0x00000001 @@ -342,7 +342,7 @@ tDMAControlTable; static bool uDMABaseValid(uint32_t ui32Base) { - return(ui32Base == UDMA0_BASE); + return (ui32Base == UDMA0_BASE); } #endif @@ -410,7 +410,7 @@ uDMAErrorStatusGet(uint32_t ui32Base) ASSERT(uDMABaseValid(ui32Base)); // Return the uDMA error status. - return(HWREG(ui32Base + UDMA_O_ERROR)); + return (HWREG(ui32Base + UDMA_O_ERROR)); } //***************************************************************************** @@ -514,8 +514,8 @@ uDMAChannelIsEnabled(uint32_t ui32Base, uint32_t ui32ChannelNum) // AND the specified channel bit with the enable register, and return the // result. - return((HWREG(ui32Base + UDMA_O_SETCHANNELEN) & (1 << ui32ChannelNum)) ? - true : false); + return ((HWREG(ui32Base + UDMA_O_SETCHANNELEN) & (1 << ui32ChannelNum)) ? + true : false); } //***************************************************************************** @@ -547,7 +547,7 @@ uDMAChannelIsEnabled(uint32_t ui32Base, uint32_t ui32ChannelNum) // //***************************************************************************** __STATIC_INLINE void -uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) +uDMAControlBaseSet(uint32_t ui32Base, void* pControlTable) { // Check the arguments. ASSERT(uDMABaseValid(ui32Base)); @@ -572,7 +572,7 @@ uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) //! \return Returns a pointer to the base address of the channel control table. // //***************************************************************************** -__STATIC_INLINE void * +__STATIC_INLINE void* uDMAControlBaseGet(uint32_t ui32Base) { // Check the arguments. @@ -580,7 +580,7 @@ uDMAControlBaseGet(uint32_t ui32Base) ASSERT(uDMABaseValid(ui32Base)); // Read the current value of the control base register, and return it to // the caller. - return((void *)HWREG(ui32Base + UDMA_O_CTRL)); + return ((void*)HWREG(ui32Base + UDMA_O_CTRL)); } //***************************************************************************** @@ -596,7 +596,7 @@ uDMAControlBaseGet(uint32_t ui32Base) //! channel control table. // //***************************************************************************** -__STATIC_INLINE void * +__STATIC_INLINE void* uDMAControlAlternateBaseGet(uint32_t ui32Base) { // Check the arguments. @@ -604,7 +604,7 @@ uDMAControlAlternateBaseGet(uint32_t ui32Base) // Read the current value of the control base register, and return it to // the caller. - return((void *)HWREG(ui32Base + UDMA_O_ALTCTRL)); + return ((void*)HWREG(ui32Base + UDMA_O_ALTCTRL)); } //***************************************************************************** @@ -818,8 +818,8 @@ extern void uDMAChannelControlSet(uint32_t ui32Base, //***************************************************************************** extern void uDMAChannelTransferSet(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, - uint32_t ui32Mode, void *pvSrcAddr, - void *pvDstAddr, uint32_t ui32TransferSize); + uint32_t ui32Mode, void* pvSrcAddr, + void* pvDstAddr, uint32_t ui32TransferSize); //***************************************************************************** // @@ -852,7 +852,7 @@ extern void uDMAChannelTransferSet(uint32_t ui32Base, extern void uDMAChannelScatterGatherSet(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, - void *pvTaskList, + void* pvTaskList, uint32_t ui32IsPeriphSG); //***************************************************************************** @@ -1150,8 +1150,8 @@ uDMAChannelPriorityGet(uint32_t ui32Base, uint32_t ui32ChannelNum) ASSERT(ui32ChannelNum < UDMA_NUM_CHANNELS); // Return the channel priority. - return(HWREG(ui32Base + UDMA_O_SETCHNLPRIORITY) & (1 << ui32ChannelNum) ? - UDMA_PRIORITY_HIGH : UDMA_PRIORITY_LOW); + return (HWREG(ui32Base + UDMA_O_SETCHNLPRIORITY) & (1 << ui32ChannelNum) ? + UDMA_PRIORITY_HIGH : UDMA_PRIORITY_LOW); } //***************************************************************************** @@ -1185,39 +1185,39 @@ uDMAChannelPriorityClear(uint32_t ui32Base, uint32_t ui32ChannelNum) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_uDMAChannelAttributeEnable - #undef uDMAChannelAttributeEnable - #define uDMAChannelAttributeEnable ROM_uDMAChannelAttributeEnable - #endif - #ifdef ROM_uDMAChannelAttributeDisable - #undef uDMAChannelAttributeDisable - #define uDMAChannelAttributeDisable ROM_uDMAChannelAttributeDisable - #endif - #ifdef ROM_uDMAChannelAttributeGet - #undef uDMAChannelAttributeGet - #define uDMAChannelAttributeGet ROM_uDMAChannelAttributeGet - #endif - #ifdef ROM_uDMAChannelControlSet - #undef uDMAChannelControlSet - #define uDMAChannelControlSet ROM_uDMAChannelControlSet - #endif - #ifdef ROM_uDMAChannelTransferSet - #undef uDMAChannelTransferSet - #define uDMAChannelTransferSet ROM_uDMAChannelTransferSet - #endif - #ifdef ROM_uDMAChannelScatterGatherSet - #undef uDMAChannelScatterGatherSet - #define uDMAChannelScatterGatherSet ROM_uDMAChannelScatterGatherSet - #endif - #ifdef ROM_uDMAChannelSizeGet - #undef uDMAChannelSizeGet - #define uDMAChannelSizeGet ROM_uDMAChannelSizeGet - #endif - #ifdef ROM_uDMAChannelModeGet - #undef uDMAChannelModeGet - #define uDMAChannelModeGet ROM_uDMAChannelModeGet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_uDMAChannelAttributeEnable +#undef uDMAChannelAttributeEnable +#define uDMAChannelAttributeEnable ROM_uDMAChannelAttributeEnable +#endif +#ifdef ROM_uDMAChannelAttributeDisable +#undef uDMAChannelAttributeDisable +#define uDMAChannelAttributeDisable ROM_uDMAChannelAttributeDisable +#endif +#ifdef ROM_uDMAChannelAttributeGet +#undef uDMAChannelAttributeGet +#define uDMAChannelAttributeGet ROM_uDMAChannelAttributeGet +#endif +#ifdef ROM_uDMAChannelControlSet +#undef uDMAChannelControlSet +#define uDMAChannelControlSet ROM_uDMAChannelControlSet +#endif +#ifdef ROM_uDMAChannelTransferSet +#undef uDMAChannelTransferSet +#define uDMAChannelTransferSet ROM_uDMAChannelTransferSet +#endif +#ifdef ROM_uDMAChannelScatterGatherSet +#undef uDMAChannelScatterGatherSet +#define uDMAChannelScatterGatherSet ROM_uDMAChannelScatterGatherSet +#endif +#ifdef ROM_uDMAChannelSizeGet +#undef uDMAChannelSizeGet +#define uDMAChannelSizeGet ROM_uDMAChannelSizeGet +#endif +#ifdef ROM_uDMAChannelModeGet +#undef uDMAChannelModeGet +#define uDMAChannelModeGet ROM_uDMAChannelModeGet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/vims.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/vims.h index 9e6ecaf7..ac48eaf1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/vims.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/vims.h @@ -80,10 +80,10 @@ extern "C" // //***************************************************************************** #if !defined(DOXYGEN) - #define VIMSConfigure NOROM_VIMSConfigure - #define VIMSModeSet NOROM_VIMSModeSet - #define VIMSModeGet NOROM_VIMSModeGet - #define VIMSModeSafeSet NOROM_VIMSModeSafeSet +#define VIMSConfigure NOROM_VIMSConfigure +#define VIMSModeSet NOROM_VIMSModeSet +#define VIMSModeGet NOROM_VIMSModeGet +#define VIMSModeSafeSet NOROM_VIMSModeSafeSet #endif //***************************************************************************** @@ -93,7 +93,7 @@ extern "C" // //***************************************************************************** #define VIMS_MODE_CHANGING 0x4 // VIMS mode is changing now and VIMS_MODE - // can not be changed at moment. +// can not be changed at moment. #define VIMS_MODE_DISABLED (VIMS_CTL_MODE_GPRAM) // Disabled mode (GPRAM enabled). #define VIMS_MODE_ENABLED (VIMS_CTL_MODE_CACHE) // Enabled mode, only USERCODE is cached. #define VIMS_MODE_OFF (VIMS_CTL_MODE_OFF) // VIMS Cache RAM is off @@ -120,7 +120,7 @@ extern "C" static bool VIMSBaseValid(uint32_t ui32Base) { - return(ui32Base == VIMS_BASE); + return (ui32Base == VIMS_BASE); } #endif @@ -277,8 +277,8 @@ extern uint32_t VIMSModeGet(uint32_t ui32Base); //! \sa \ref VIMSModeSet() and \ref VIMSModeGet() // //***************************************************************************** -extern void VIMSModeSafeSet( uint32_t ui32Base , - uint32_t ui32NewMode , +extern void VIMSModeSafeSet( uint32_t ui32Base, + uint32_t ui32NewMode, bool blocking ); //***************************************************************************** @@ -300,7 +300,7 @@ VIMSLineBufDisable(uint32_t ui32Base) { // Disable line buffers HWREG(ui32Base + VIMS_O_CTL) |= VIMS_CTL_IDCODE_LB_DIS_M | - VIMS_CTL_SYSBUS_LB_DIS_M; + VIMS_CTL_SYSBUS_LB_DIS_M; } //***************************************************************************** @@ -322,7 +322,7 @@ VIMSLineBufEnable(uint32_t ui32Base) { // Enable linebuffers HWREG(ui32Base + VIMS_O_CTL) &= ~(VIMS_CTL_IDCODE_LB_DIS_M | - VIMS_CTL_SYSBUS_LB_DIS_M); + VIMS_CTL_SYSBUS_LB_DIS_M); } //***************************************************************************** @@ -332,23 +332,23 @@ VIMSLineBufEnable(uint32_t ui32Base) // //***************************************************************************** #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) - #include "../driverlib/rom.h" - #ifdef ROM_VIMSConfigure - #undef VIMSConfigure - #define VIMSConfigure ROM_VIMSConfigure - #endif - #ifdef ROM_VIMSModeSet - #undef VIMSModeSet - #define VIMSModeSet ROM_VIMSModeSet - #endif - #ifdef ROM_VIMSModeGet - #undef VIMSModeGet - #define VIMSModeGet ROM_VIMSModeGet - #endif - #ifdef ROM_VIMSModeSafeSet - #undef VIMSModeSafeSet - #define VIMSModeSafeSet ROM_VIMSModeSafeSet - #endif +#include "../driverlib/rom.h" +#ifdef ROM_VIMSConfigure +#undef VIMSConfigure +#define VIMSConfigure ROM_VIMSConfigure +#endif +#ifdef ROM_VIMSModeSet +#undef VIMSModeSet +#define VIMSModeSet ROM_VIMSModeSet +#endif +#ifdef ROM_VIMSModeGet +#undef VIMSModeGet +#define VIMSModeGet ROM_VIMSModeGet +#endif +#ifdef ROM_VIMSModeSafeSet +#undef VIMSModeSafeSet +#define VIMSModeSafeSet ROM_VIMSModeSafeSet +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/watchdog.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/watchdog.h index 373fb528..a964eb38 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/watchdog.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/driverlib/watchdog.h @@ -114,7 +114,7 @@ __STATIC_INLINE bool WatchdogRunning(void) { // See if the watchdog timer module is enabled, and return. - return((HWREG(WDT_BASE + WDT_O_CTL) & WDT_CTL_INTEN) ? true : false); + return ((HWREG(WDT_BASE + WDT_O_CTL) & WDT_CTL_INTEN) ? true : false); } //***************************************************************************** @@ -231,8 +231,8 @@ __STATIC_INLINE bool WatchdogLockState(void) { // Get the lock state. - return((HWREG(WDT_BASE + WDT_O_LOCK) == WATCHDOG_LOCK_LOCKED) ? - true : false); + return ((HWREG(WDT_BASE + WDT_O_LOCK) == WATCHDOG_LOCK_LOCKED) ? + true : false); } //***************************************************************************** @@ -277,7 +277,7 @@ __STATIC_INLINE uint32_t WatchdogReloadGet(void) { // Get the load register. - return(HWREG(WDT_BASE + WDT_O_LOAD)); + return (HWREG(WDT_BASE + WDT_O_LOAD)); } //***************************************************************************** @@ -293,7 +293,7 @@ __STATIC_INLINE uint32_t WatchdogValueGet(void) { // Get the current watchdog timer register value. - return(HWREG(WDT_BASE + WDT_O_VALUE)); + return (HWREG(WDT_BASE + WDT_O_VALUE)); } //***************************************************************************** @@ -397,7 +397,7 @@ WatchdogIntStatus(void) { // Return either the interrupt status or the raw interrupt status as // requested. - return(HWREG(WDT_BASE + WDT_O_RIS)); + return (HWREG(WDT_BASE + WDT_O_RIS)); } //***************************************************************************** @@ -458,7 +458,7 @@ WatchdogIntTypeSet(uint32_t ui32Type) (ui32Type == WATCHDOG_INT_TYPE_NMI)); // Set the interrupt type. - HWREGBITW(WDT_BASE + WDT_O_CTL, WDT_CTL_INTTYPE_BITN) = (ui32Type == WATCHDOG_INT_TYPE_INT)? 0 : 1; + HWREGBITW(WDT_BASE + WDT_O_CTL, WDT_CTL_INTTYPE_BITN) = (ui32Type == WATCHDOG_INT_TYPE_INT) ? 0 : 1; } //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/asmdefs.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/asmdefs.h index 1768b4c4..ddb53153 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/asmdefs.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/asmdefs.h @@ -46,27 +46,27 @@ //***************************************************************************** #ifdef __IAR_SYSTEMS_ICC__ -// -// Section headers. -// -#define __LIBRARY__ module -#define __TEXT__ rseg CODE:CODE(2) -#define __DATA__ rseg DATA:DATA(2) -#define __BSS__ rseg DATA:DATA(2) -#define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) - -// -// Assembler mnemonics. -// -#define __ALIGN__ alignrom 2 -#define __END__ end -#define __EXPORT__ export -#define __IMPORT__ import -#define __LABEL__ -#define __STR__ dcb -#define __THUMB_LABEL__ thumb -#define __WORD__ dcd -#define __INLINE_DATA__ data + // + // Section headers. + // + #define __LIBRARY__ module + #define __TEXT__ rseg CODE:CODE(2) + #define __DATA__ rseg DATA:DATA(2) + #define __BSS__ rseg DATA:DATA(2) + #define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) + + // + // Assembler mnemonics. + // + #define __ALIGN__ alignrom 2 + #define __END__ end + #define __EXPORT__ export + #define __IMPORT__ import + #define __LABEL__ + #define __STR__ dcb + #define __THUMB_LABEL__ thumb + #define __WORD__ dcd + #define __INLINE_DATA__ data #endif // __IAR_SYSTEMS_ICC__ @@ -77,34 +77,34 @@ //***************************************************************************** #if defined(__GNUC__) -// -// The assembly code preamble required to put the assembler into the correct -// configuration. -// + // + // The assembly code preamble required to put the assembler into the correct + // configuration. + // .syntax unified .thumb -// -// Section headers. -// -#define __LIBRARY__ @ -#define __TEXT__ .text -#define __DATA__ .data -#define __BSS__ .bss -#define __TEXT_NOROOT__ .text - -// -// Assembler mnemonics. -// -#define __ALIGN__ .balign 4 -#define __END__ .end -#define __EXPORT__ .globl -#define __IMPORT__ .extern -#define __LABEL__ : -#define __STR__ .ascii -#define __THUMB_LABEL__ .thumb_func -#define __WORD__ .word -#define __INLINE_DATA__ + // + // Section headers. + // + #define __LIBRARY__ @ + #define __TEXT__ .text + #define __DATA__ .data + #define __BSS__ .bss + #define __TEXT_NOROOT__ .text + + // + // Assembler mnemonics. + // + #define __ALIGN__ .balign 4 + #define __END__ .end + #define __EXPORT__ .globl + #define __IMPORT__ .extern + #define __LABEL__ : + #define __STR__ .ascii + #define __THUMB_LABEL__ .thumb_func + #define __WORD__ .word + #define __INLINE_DATA__ #endif // __GNUC__ @@ -115,35 +115,35 @@ //***************************************************************************** #if defined(__CC_ARM) -// -// The assembly code preamble required to put the assembler into the correct -// configuration. -// + // + // The assembly code preamble required to put the assembler into the correct + // configuration. + // thumb require8 preserve8 -// -// Section headers. -// -#define __LIBRARY__ ; -#define __TEXT__ area ||.text||, code, readonly, align=2 -#define __DATA__ area ||.data||, data, align=2 -#define __BSS__ area ||.bss||, noinit, align=2 -#define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 - -// -// Assembler mnemonics. -// -#define __ALIGN__ align 4 -#define __END__ end -#define __EXPORT__ export -#define __IMPORT__ import -#define __LABEL__ -#define __STR__ dcb -#define __THUMB_LABEL__ -#define __WORD__ dcd -#define __INLINE_DATA__ + // + // Section headers. + // + #define __LIBRARY__ ; + #define __TEXT__ area ||.text||, code, readonly, align=2 + #define __DATA__ area ||.data||, data, align=2 + #define __BSS__ area ||.bss||, noinit, align=2 + #define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 + + // + // Assembler mnemonics. + // + #define __ALIGN__ align 4 + #define __END__ end + #define __EXPORT__ export + #define __IMPORT__ import + #define __LABEL__ + #define __STR__ dcb + #define __THUMB_LABEL__ + #define __WORD__ dcd + #define __INLINE_DATA__ #endif // __CC_ARM diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_adi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_adi.h index d55fe0fd..7e7b603c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_adi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_adi.h @@ -155,24 +155,24 @@ // //***************************************************************************** #define ADI_O_DIR 0x00000000 // Offset for the direct access - // instruction +// instruction #define ADI_O_SET 0x00000010 // Offset for 'Set' instruction. #define ADI_O_CLR 0x00000020 // Offset for 'Clear' instruction. #define ADI_O_MASK4B 0x00000040 // Offset for 4-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). - // Bits 7:4 are mask. Bits 3:0 are data. - // Requires 'byte' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). +// Bits 7:4 are mask. Bits 3:0 are data. +// Requires 'byte' write. #define ADI_O_MASK8B 0x00000060 // Offset for 8-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). Bits 15:8 are - // mask. Bits 7:0 are data. Requires - // 'short' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). Bits 15:8 are +// mask. Bits 7:0 are data. Requires +// 'short' write. #define ADI_O_MASK16B 0x00000080 // Offset for 16-bit masked access. - // Data bit[n] is written if mask - // bit[n] is set ('1'). Bits 31:16 - // are mask. Bits 15:0 are data. - // Requires 'long' write. +// Data bit[n] is written if mask +// bit[n] is set ('1'). Bits 31:16 +// are mask. Bits 15:0 are data. +// Requires 'long' write. //***************************************************************************** // @@ -189,16 +189,16 @@ // //***************************************************************************** #define ADI_SLAVESTAT_DI_REQ 0x00000002 // Read current value of DI_REQ - // signal. Writing 0 to this bit - // forces a sync with slave, - // ensuring that req will be 0. It - // is recommended to write 0 to - // this register before power down - // of the master. +// signal. Writing 0 to this bit +// forces a sync with slave, +// ensuring that req will be 0. It +// is recommended to write 0 to +// this register before power down +// of the master. #define ADI_SLAVESTAT_DI_REQ_M 0x00000002 #define ADI_SLAVESTAT_DI_REQ_S 1 #define ADI_SLAVESTAT_DI_ACK 0x00000001 // Read current value of DI_ACK - // signal +// signal #define ADI_SLAVESTAT_DI_ACK_M 0x00000001 #define ADI_SLAVESTAT_DI_ACK_S 0 //***************************************************************************** @@ -208,38 +208,38 @@ // //***************************************************************************** #define ADI_SLAVECONF_CONFLOCK 0x00000080 // This register is no longer - // accessible when this bit is set. - // (unless sticky_bit_overwrite is - // asserted on top module) +// accessible when this bit is set. +// (unless sticky_bit_overwrite is +// asserted on top module) #define ADI_SLAVECONF_CONFLOCK_M \ - 0x00000080 + 0x00000080 #define ADI_SLAVECONF_CONFLOCK_S 7 #define ADI_SLAVECONF_WAITFORACK \ - 0x00000004 // A transaction on the ADI - // interface does not end until ack - // has been received from the slave - // when this bit is set. + 0x00000004 // A transaction on the ADI +// interface does not end until ack +// has been received from the slave +// when this bit is set. #define ADI_SLAVECONF_WAITFORACK_M \ - 0x00000004 + 0x00000004 #define ADI_SLAVECONF_WAITFORACK_S 2 #define ADI_SLAVECONF_ADICLKSPEED_M \ - 0x00000003 // Sets the period of an ADI - // transactions. All transactions - // takes an even number of clock - // cycles,- ADI clock rising edge - // occurs in the middle of the - // period. Data and ctrl to slave - // is set up in beginning of cycle, - // and data from slave is read in - // after the transaction 00: An ADI - // transaction takes 2 master clock - // cyclkes 01: An ADI transaction - // takes 4 master clock cycles 10: - // And ADI Transaction takes 8 - // master clock cycles 11: An ADI - // transaction takes 16 master - // clock cycles + 0x00000003 // Sets the period of an ADI +// transactions. All transactions +// takes an even number of clock +// cycles,- ADI clock rising edge +// occurs in the middle of the +// period. Data and ctrl to slave +// is set up in beginning of cycle, +// and data from slave is read in +// after the transaction 00: An ADI +// transaction takes 2 master clock +// cyclkes 01: An ADI transaction +// takes 4 master clock cycles 10: +// And ADI Transaction takes 8 +// master clock cycles 11: An ADI +// transaction takes 16 master +// clock cycles #define ADI_SLAVECONF_ADICLKSPEED_S 0 @@ -251,104 +251,104 @@ // //***************************************************************************** #define ADI_O_DIR03 0x00000000 // Direct access for adi byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_DIR47 0x00000004 // Direct access for adi byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_DIR811 0x00000008 // Direct access for adi byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_DIR1215 0x0000000C // Direct access for adi byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_SET03 0x00000010 // Set register for ADI byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_SET47 0x00000014 // Set register for ADI byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_SET811 0x00000018 // Set register for ADI byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_SET1215 0x0000001C // Set register for ADI byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_CLR03 0x00000020 // Clear register for ADI byte - // offsets 0 to 3 +// offsets 0 to 3 #define ADI_O_CLR47 0x00000024 // Clear register for ADI byte - // offsets 4 to 7 +// offsets 4 to 7 #define ADI_O_CLR811 0x00000028 // Clear register for ADI byte - // offsets 8 to 11 +// offsets 8 to 11 #define ADI_O_CLR1215 0x0000002C // Clear register for ADI byte - // offsets 12 to 15 +// offsets 12 to 15 #define ADI_O_SLAVESTAT 0x00000030 // ADI Slave status register #define ADI_O_SLAVECONF 0x00000038 // ADI Master configuration - // register +// register #define ADI_O_MASK4B01 0x00000040 // Masked access (4m/4d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK4B23 0x00000044 // Masked access (4m/4d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK4B45 0x00000048 // Masked access (4m/4d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK4B67 0x0000004C // Masked access (4m/4d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK4B89 0x00000050 // Masked access (4m/4d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK4B1011 0x00000054 // Masked access (4m/4d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK4B1213 0x00000058 // Masked access (4m/4d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK4B1415 0x0000005C // Masked access (4m/4d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 #define ADI_O_MASK8B01 0x00000060 // Masked access (8m/8d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK8B23 0x00000064 // Masked access (8m/8d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK8B45 0x00000068 // Masked access (8m/8d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK8B67 0x0000006C // Masked access (8m/8d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK8B89 0x00000070 // Masked access (8m/8d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK8B1011 0x00000074 // Masked access (8m/8d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK8B1213 0x00000078 // Masked access (8m/8d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK8B1415 0x0000007C // Masked access (8m/8d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 #define ADI_O_MASK16B01 0x00000080 // Masked access (16m/16d) for ADI - // Registers at byte offsets 0 and - // 1 +// Registers at byte offsets 0 and +// 1 #define ADI_O_MASK16B23 0x00000084 // Masked access (16m/16d) for ADI - // Registers at byte offsets 2 and - // 3 +// Registers at byte offsets 2 and +// 3 #define ADI_O_MASK16B45 0x00000088 // Masked access (16m/16d) for ADI - // Registers at byte offsets 4 and - // 5 +// Registers at byte offsets 4 and +// 5 #define ADI_O_MASK16B67 0x0000008C // Masked access (16m/16d) for ADI - // Registers at byte offsets 6 and - // 7 +// Registers at byte offsets 6 and +// 7 #define ADI_O_MASK16B89 0x00000090 // Masked access (16m/16d) for ADI - // Registers at byte offsets 8 and - // 9 +// Registers at byte offsets 8 and +// 9 #define ADI_O_MASK16B1011 0x00000094 // Masked access (16m/16d) for ADI - // Registers at byte offsets 10 and - // 11 +// Registers at byte offsets 10 and +// 11 #define ADI_O_MASK16B1213 0x00000098 // Masked access (16m/16d) for ADI - // Registers at byte offsets 12 and - // 13 +// Registers at byte offsets 12 and +// 13 #define ADI_O_MASK16B1415 0x0000009C // Masked access (16m/16d) for ADI - // Registers at byte offsets 14 and - // 15 +// Registers at byte offsets 14 and +// 15 //***************************************************************************** // @@ -382,10 +382,10 @@ // //***************************************************************************** #define ADI_DIR811_B3_M 0xFF000000 // Direct access to ADI register - // 11 +// 11 #define ADI_DIR811_B3_S 24 #define ADI_DIR811_B2_M 0x00FF0000 // Direct access to ADI register - // 10 +// 10 #define ADI_DIR811_B2_S 16 #define ADI_DIR811_B1_M 0x0000FF00 // Direct access to ADI register 9 #define ADI_DIR811_B1_S 8 @@ -397,16 +397,16 @@ // //***************************************************************************** #define ADI_DIR1215_B3_M 0xFF000000 // Direct access to ADI register - // 15 +// 15 #define ADI_DIR1215_B3_S 24 #define ADI_DIR1215_B2_M 0x00FF0000 // Direct access to ADI register - // 14 +// 14 #define ADI_DIR1215_B2_S 16 #define ADI_DIR1215_B1_M 0x0000FF00 // Direct access to ADI register - // 13 +// 13 #define ADI_DIR1215_B1_S 8 #define ADI_DIR1215_B0_M 0x000000FF // Direct access to ADI register - // 12 +// 12 #define ADI_DIR1215_B0_S 0 //***************************************************************************** // @@ -414,20 +414,20 @@ // //***************************************************************************** #define ADI_SET03_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 3. Read returns 0. +// corresponding bit in ADI +// register 3. Read returns 0. #define ADI_SET03_S3_S 24 #define ADI_SET03_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 2. Read returns 0. +// corresponding bit in ADI +// register 2. Read returns 0. #define ADI_SET03_S2_S 16 #define ADI_SET03_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 1. Read returns 0. +// corresponding bit in ADI +// register 1. Read returns 0. #define ADI_SET03_S1_S 8 #define ADI_SET03_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 0. Read returns 0. +// corresponding bit in ADI +// register 0. Read returns 0. #define ADI_SET03_S0_S 0 //***************************************************************************** // @@ -435,20 +435,20 @@ // //***************************************************************************** #define ADI_SET47_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 7. Read returns 0. +// corresponding bit in ADI +// register 7. Read returns 0. #define ADI_SET47_S3_S 24 #define ADI_SET47_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 6. Read returns 0. +// corresponding bit in ADI +// register 6. Read returns 0. #define ADI_SET47_S2_S 16 #define ADI_SET47_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 5. Read returns 0. +// corresponding bit in ADI +// register 5. Read returns 0. #define ADI_SET47_S1_S 8 #define ADI_SET47_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 4. Read returns 0. +// corresponding bit in ADI +// register 4. Read returns 0. #define ADI_SET47_S0_S 0 //***************************************************************************** // @@ -456,20 +456,20 @@ // //***************************************************************************** #define ADI_SET811_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 11. Read returns 0. +// corresponding bit in ADI +// register 11. Read returns 0. #define ADI_SET811_S3_S 24 #define ADI_SET811_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 10. Read returns 0. +// corresponding bit in ADI +// register 10. Read returns 0. #define ADI_SET811_S2_S 16 #define ADI_SET811_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 9. Read returns 0. +// corresponding bit in ADI +// register 9. Read returns 0. #define ADI_SET811_S1_S 8 #define ADI_SET811_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 8. Read returns 0. +// corresponding bit in ADI +// register 8. Read returns 0. #define ADI_SET811_S0_S 0 //***************************************************************************** // @@ -477,20 +477,20 @@ // //***************************************************************************** #define ADI_SET1215_S3_M 0xFF000000 // A high bit value will set the - // corresponding bit in ADI - // register 15. Read returns 0. +// corresponding bit in ADI +// register 15. Read returns 0. #define ADI_SET1215_S3_S 24 #define ADI_SET1215_S2_M 0x00FF0000 // A high bit value will set the - // corresponding bit in ADI - // register 14. Read returns 0. +// corresponding bit in ADI +// register 14. Read returns 0. #define ADI_SET1215_S2_S 16 #define ADI_SET1215_S1_M 0x0000FF00 // A high bit value will set the - // corresponding bit in ADI - // register 13. Read returns 0. +// corresponding bit in ADI +// register 13. Read returns 0. #define ADI_SET1215_S1_S 8 #define ADI_SET1215_S0_M 0x000000FF // A high bit value will set the - // corresponding bit in ADI - // register 12. Read returns 0. +// corresponding bit in ADI +// register 12. Read returns 0. #define ADI_SET1215_S0_S 0 //***************************************************************************** // @@ -498,20 +498,20 @@ // //***************************************************************************** #define ADI_CLR03_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 3 +// corresponding bit in ADI +// register 3 #define ADI_CLR03_S3_S 24 #define ADI_CLR03_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 2 +// corresponding bit in ADI +// register 2 #define ADI_CLR03_S2_S 16 #define ADI_CLR03_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 1 +// corresponding bit in ADI +// register 1 #define ADI_CLR03_S1_S 8 #define ADI_CLR03_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 0 +// corresponding bit in ADI +// register 0 #define ADI_CLR03_S0_S 0 //***************************************************************************** // @@ -519,20 +519,20 @@ // //***************************************************************************** #define ADI_CLR47_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 7 +// corresponding bit in ADI +// register 7 #define ADI_CLR47_S3_S 24 #define ADI_CLR47_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 6 +// corresponding bit in ADI +// register 6 #define ADI_CLR47_S2_S 16 #define ADI_CLR47_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 5 +// corresponding bit in ADI +// register 5 #define ADI_CLR47_S1_S 8 #define ADI_CLR47_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 4 +// corresponding bit in ADI +// register 4 #define ADI_CLR47_S0_S 0 //***************************************************************************** // @@ -540,20 +540,20 @@ // //***************************************************************************** #define ADI_CLR811_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 11 +// corresponding bit in ADI +// register 11 #define ADI_CLR811_S3_S 24 #define ADI_CLR811_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 10 +// corresponding bit in ADI +// register 10 #define ADI_CLR811_S2_S 16 #define ADI_CLR811_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 9 +// corresponding bit in ADI +// register 9 #define ADI_CLR811_S1_S 8 #define ADI_CLR811_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 8 +// corresponding bit in ADI +// register 8 #define ADI_CLR811_S0_S 0 //***************************************************************************** // @@ -561,20 +561,20 @@ // //***************************************************************************** #define ADI_CLR1215_S3_M 0xFF000000 // A high bit value will clear the - // corresponding bit in ADI - // register 15 +// corresponding bit in ADI +// register 15 #define ADI_CLR1215_S3_S 24 #define ADI_CLR1215_S2_M 0x00FF0000 // A high bit value will clear the - // corresponding bit in ADI - // register 14 +// corresponding bit in ADI +// register 14 #define ADI_CLR1215_S2_S 16 #define ADI_CLR1215_S1_M 0x0000FF00 // A high bit value will clear the - // corresponding bit in ADI - // register 13 +// corresponding bit in ADI +// register 13 #define ADI_CLR1215_S1_S 8 #define ADI_CLR1215_S0_M 0x000000FF // A high bit value will clear the - // corresponding bit in ADI - // register 12 +// corresponding bit in ADI +// register 12 #define ADI_CLR1215_S0_S 0 //***************************************************************************** // @@ -583,16 +583,16 @@ // //***************************************************************************** #define ADI_SLAVESTAT_DI_REQ 0x00000002 // Read current value of DI_REQ - // signal. Writing 0 to this bit - // forces a sync with slave, - // ensuring that req will be 0. It - // is recommended to write 0 to - // this register before power down - // of the master. +// signal. Writing 0 to this bit +// forces a sync with slave, +// ensuring that req will be 0. It +// is recommended to write 0 to +// this register before power down +// of the master. #define ADI_SLAVESTAT_DI_REQ_M 0x00000002 #define ADI_SLAVESTAT_DI_REQ_S 1 #define ADI_SLAVESTAT_DI_ACK 0x00000001 // Read current value of DI_ACK - // signal +// signal #define ADI_SLAVESTAT_DI_ACK_M 0x00000001 #define ADI_SLAVESTAT_DI_ACK_S 0 //***************************************************************************** @@ -602,38 +602,38 @@ // //***************************************************************************** #define ADI_SLAVECONF_CONFLOCK 0x00000080 // This register is no longer - // accessible when this bit is set. - // (unless sticky_bit_overwrite is - // asserted on top module) +// accessible when this bit is set. +// (unless sticky_bit_overwrite is +// asserted on top module) #define ADI_SLAVECONF_CONFLOCK_M \ - 0x00000080 + 0x00000080 #define ADI_SLAVECONF_CONFLOCK_S 7 #define ADI_SLAVECONF_WAITFORACK \ - 0x00000004 // A transaction on the ADI - // interface does not end until ack - // has been received from the slave - // when this bit is set. + 0x00000004 // A transaction on the ADI +// interface does not end until ack +// has been received from the slave +// when this bit is set. #define ADI_SLAVECONF_WAITFORACK_M \ - 0x00000004 + 0x00000004 #define ADI_SLAVECONF_WAITFORACK_S 2 #define ADI_SLAVECONF_ADICLKSPEED_M \ - 0x00000003 // Sets the period of an ADI - // transactions. All transactions - // takes an even number of clock - // cycles,- ADI clock rising edge - // occurs in the middle of the - // period. Data and ctrl to slave - // is set up in beginning of cycle, - // and data from slave is read in - // after the transaction 00: An ADI - // transaction takes 2 master clock - // cyclkes 01: An ADI transaction - // takes 4 master clock cycles 10: - // And ADI Transaction takes 8 - // master clock cycles 11: An ADI - // transaction takes 16 master - // clock cycles + 0x00000003 // Sets the period of an ADI +// transactions. All transactions +// takes an even number of clock +// cycles,- ADI clock rising edge +// occurs in the middle of the +// period. Data and ctrl to slave +// is set up in beginning of cycle, +// and data from slave is read in +// after the transaction 00: An ADI +// transaction takes 2 master clock +// cyclkes 01: An ADI transaction +// takes 4 master clock cycles 10: +// And ADI Transaction takes 8 +// master clock cycles 11: An ADI +// transaction takes 16 master +// clock cycles #define ADI_SLAVECONF_ADICLKSPEED_S 0 //***************************************************************************** @@ -642,36 +642,36 @@ // //***************************************************************************** #define ADI_MASK4B01_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 1 +// register 1 #define ADI_MASK4B01_M1H_S 28 #define ADI_MASK4B01_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 1, - only bits selected - // by mask M1H will be affected by - // access +// register 1, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B01_D1H_S 24 #define ADI_MASK4B01_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 1 +// register 1 #define ADI_MASK4B01_M1L_S 20 #define ADI_MASK4B01_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 1, - only bits selected - // by mask M1L will be affected by - // access +// register 1, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B01_D1L_S 16 #define ADI_MASK4B01_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 0 +// register 0 #define ADI_MASK4B01_M0H_S 12 #define ADI_MASK4B01_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 0, - only bits selected - // by mask M0H will be affected by - // access +// register 0, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B01_D0H_S 8 #define ADI_MASK4B01_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 0 +// register 0 #define ADI_MASK4B01_M0L_S 4 #define ADI_MASK4B01_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 0, - only bits selected - // by mask M0L will be affected by - // access +// register 0, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B01_D0L_S 0 //***************************************************************************** // @@ -679,36 +679,36 @@ // //***************************************************************************** #define ADI_MASK4B23_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 3 +// register 3 #define ADI_MASK4B23_M1H_S 28 #define ADI_MASK4B23_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 3, - only bits selected - // by mask M1H will be affected by - // access +// register 3, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B23_D1H_S 24 #define ADI_MASK4B23_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 3 +// register 3 #define ADI_MASK4B23_M1L_S 20 #define ADI_MASK4B23_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 3, - only bits selected - // by mask M1L will be affected by - // access +// register 3, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B23_D1L_S 16 #define ADI_MASK4B23_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 2 +// register 2 #define ADI_MASK4B23_M0H_S 12 #define ADI_MASK4B23_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 2, - only bits selected - // by mask M0H will be affected by - // access +// register 2, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B23_D0H_S 8 #define ADI_MASK4B23_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 2 +// register 2 #define ADI_MASK4B23_M0L_S 4 #define ADI_MASK4B23_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 2, - only bits selected - // by mask M0L will be affected by - // access +// register 2, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B23_D0L_S 0 //***************************************************************************** // @@ -716,36 +716,36 @@ // //***************************************************************************** #define ADI_MASK4B45_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 5 +// register 5 #define ADI_MASK4B45_M1H_S 28 #define ADI_MASK4B45_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 5, - only bits selected - // by mask M1H will be affected by - // access +// register 5, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B45_D1H_S 24 #define ADI_MASK4B45_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 5 +// register 5 #define ADI_MASK4B45_M1L_S 20 #define ADI_MASK4B45_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 5, - only bits selected - // by mask M1L will be affected by - // access +// register 5, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B45_D1L_S 16 #define ADI_MASK4B45_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 4 +// register 4 #define ADI_MASK4B45_M0H_S 12 #define ADI_MASK4B45_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 4, - only bits selected - // by mask M0H will be affected by - // access +// register 4, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B45_D0H_S 8 #define ADI_MASK4B45_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 4 +// register 4 #define ADI_MASK4B45_M0L_S 4 #define ADI_MASK4B45_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 4, - only bits selected - // by mask M0L will be affected by - // access +// register 4, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B45_D0L_S 0 //***************************************************************************** // @@ -753,36 +753,36 @@ // //***************************************************************************** #define ADI_MASK4B67_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 7 +// register 7 #define ADI_MASK4B67_M1H_S 28 #define ADI_MASK4B67_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 7, - only bits selected - // by mask M1H will be affected by - // access +// register 7, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B67_D1H_S 24 #define ADI_MASK4B67_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 7 +// register 7 #define ADI_MASK4B67_M1L_S 20 #define ADI_MASK4B67_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 7, - only bits selected - // by mask M1L will be affected by - // access +// register 7, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B67_D1L_S 16 #define ADI_MASK4B67_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 6 +// register 6 #define ADI_MASK4B67_M0H_S 12 #define ADI_MASK4B67_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 6, - only bits selected - // by mask M0H will be affected by - // access +// register 6, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B67_D0H_S 8 #define ADI_MASK4B67_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 6 +// register 6 #define ADI_MASK4B67_M0L_S 4 #define ADI_MASK4B67_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 6, - only bits selected - // by mask M0L will be affected by - // access +// register 6, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B67_D0L_S 0 //***************************************************************************** // @@ -790,36 +790,36 @@ // //***************************************************************************** #define ADI_MASK4B89_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 9 +// register 9 #define ADI_MASK4B89_M1H_S 28 #define ADI_MASK4B89_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 9, - only bits selected - // by mask M1H will be affected by - // access +// register 9, - only bits selected +// by mask M1H will be affected by +// access #define ADI_MASK4B89_D1H_S 24 #define ADI_MASK4B89_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 9 +// register 9 #define ADI_MASK4B89_M1L_S 20 #define ADI_MASK4B89_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 9, - only bits selected - // by mask M1L will be affected by - // access +// register 9, - only bits selected +// by mask M1L will be affected by +// access #define ADI_MASK4B89_D1L_S 16 #define ADI_MASK4B89_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 8 +// register 8 #define ADI_MASK4B89_M0H_S 12 #define ADI_MASK4B89_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 8, - only bits selected - // by mask M0H will be affected by - // access +// register 8, - only bits selected +// by mask M0H will be affected by +// access #define ADI_MASK4B89_D0H_S 8 #define ADI_MASK4B89_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 8 +// register 8 #define ADI_MASK4B89_M0L_S 4 #define ADI_MASK4B89_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 8, - only bits selected - // by mask M0L will be affected by - // access +// register 8, - only bits selected +// by mask M0L will be affected by +// access #define ADI_MASK4B89_D0L_S 0 //***************************************************************************** // @@ -828,36 +828,36 @@ // //***************************************************************************** #define ADI_MASK4B1011_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 11 +// register 11 #define ADI_MASK4B1011_M1H_S 28 #define ADI_MASK4B1011_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 11, - only bits - // selected by mask M1H will be - // affected by access +// register 11, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1011_D1H_S 24 #define ADI_MASK4B1011_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 11 +// register 11 #define ADI_MASK4B1011_M1L_S 20 #define ADI_MASK4B1011_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 11, - only bits - // selected by mask M1L will be - // affected by access +// register 11, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1011_D1L_S 16 #define ADI_MASK4B1011_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 10 +// register 10 #define ADI_MASK4B1011_M0H_S 12 #define ADI_MASK4B1011_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 10, - only bits - // selected by mask M0H will be - // affected by access +// register 10, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1011_D0H_S 8 #define ADI_MASK4B1011_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 10 +// register 10 #define ADI_MASK4B1011_M0L_S 4 #define ADI_MASK4B1011_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 10, - only bits - // selected by mask M0L will be - // affected by access +// register 10, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1011_D0L_S 0 //***************************************************************************** // @@ -866,36 +866,36 @@ // //***************************************************************************** #define ADI_MASK4B1213_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 13 +// register 13 #define ADI_MASK4B1213_M1H_S 28 #define ADI_MASK4B1213_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 13, - only bits - // selected by mask M1H will be - // affected by access +// register 13, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1213_D1H_S 24 #define ADI_MASK4B1213_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 13 +// register 13 #define ADI_MASK4B1213_M1L_S 20 #define ADI_MASK4B1213_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 13, - only bits - // selected by mask M1L will be - // affected by access +// register 13, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1213_D1L_S 16 #define ADI_MASK4B1213_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 12 +// register 12 #define ADI_MASK4B1213_M0H_S 12 #define ADI_MASK4B1213_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 12, - only bits - // selected by mask M0H will be - // affected by access +// register 12, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1213_D0H_S 8 #define ADI_MASK4B1213_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 12 +// register 12 #define ADI_MASK4B1213_M0L_S 4 #define ADI_MASK4B1213_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 12, - only bits - // selected by mask M0L will be - // affected by access +// register 12, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1213_D0L_S 0 //***************************************************************************** // @@ -904,36 +904,36 @@ // //***************************************************************************** #define ADI_MASK4B1415_M1H_M 0xF0000000 // Mask for bits [7:4] in ADI - // register 15 +// register 15 #define ADI_MASK4B1415_M1H_S 28 #define ADI_MASK4B1415_D1H_M 0x0F000000 // Data for bits [7:4] in ADI - // register 15, - only bits - // selected by mask M1H will be - // affected by access +// register 15, - only bits +// selected by mask M1H will be +// affected by access #define ADI_MASK4B1415_D1H_S 24 #define ADI_MASK4B1415_M1L_M 0x00F00000 // Mask for bits [3:0] in ADI - // register 15 +// register 15 #define ADI_MASK4B1415_M1L_S 20 #define ADI_MASK4B1415_D1L_M 0x000F0000 // Data for bits [3:0] in ADI - // register 15, - only bits - // selected by mask M1L will be - // affected by access +// register 15, - only bits +// selected by mask M1L will be +// affected by access #define ADI_MASK4B1415_D1L_S 16 #define ADI_MASK4B1415_M0H_M 0x0000F000 // Mask for bits [7:4] in ADI - // register 14 +// register 14 #define ADI_MASK4B1415_M0H_S 12 #define ADI_MASK4B1415_D0H_M 0x00000F00 // Data for bits [7:4] in ADI - // register 14, - only bits - // selected by mask M0H will be - // affected by access +// register 14, - only bits +// selected by mask M0H will be +// affected by access #define ADI_MASK4B1415_D0H_S 8 #define ADI_MASK4B1415_M0L_M 0x000000F0 // Mask for bits [3:0] in ADI - // register 14 +// register 14 #define ADI_MASK4B1415_M0L_S 4 #define ADI_MASK4B1415_D0L_M 0x0000000F // Data for bits [3:0] in ADI - // register 14, - only bits - // selected by mask M0L will be - // affected by access +// register 14, - only bits +// selected by mask M0L will be +// affected by access #define ADI_MASK4B1415_D0L_S 0 //***************************************************************************** // @@ -943,14 +943,14 @@ #define ADI_MASK8B01_M1_M 0xFF000000 // Mask for ADI register 1 #define ADI_MASK8B01_M1_S 24 #define ADI_MASK8B01_D1_M 0x00FF0000 // Data for ADI register 1, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B01_D1_S 16 #define ADI_MASK8B01_M0_M 0x0000FF00 // Mask for ADI register 0 #define ADI_MASK8B01_M0_S 8 #define ADI_MASK8B01_D0_M 0x000000FF // Data for ADI register 0, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B01_D0_S 0 //***************************************************************************** // @@ -960,14 +960,14 @@ #define ADI_MASK8B23_M1_M 0xFF000000 // Mask for ADI register 3 #define ADI_MASK8B23_M1_S 24 #define ADI_MASK8B23_D1_M 0x00FF0000 // Data for ADI register 3, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B23_D1_S 16 #define ADI_MASK8B23_M0_M 0x0000FF00 // Mask for ADI register 2 #define ADI_MASK8B23_M0_S 8 #define ADI_MASK8B23_D0_M 0x000000FF // Data for ADI register 2, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B23_D0_S 0 //***************************************************************************** // @@ -977,14 +977,14 @@ #define ADI_MASK8B45_M1_M 0xFF000000 // Mask for ADI register 5 #define ADI_MASK8B45_M1_S 24 #define ADI_MASK8B45_D1_M 0x00FF0000 // Data for ADI register 5, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B45_D1_S 16 #define ADI_MASK8B45_M0_M 0x0000FF00 // Mask for ADI register 4 #define ADI_MASK8B45_M0_S 8 #define ADI_MASK8B45_D0_M 0x000000FF // Data for ADI register 4, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B45_D0_S 0 //***************************************************************************** // @@ -994,14 +994,14 @@ #define ADI_MASK8B67_M1_M 0xFF000000 // Mask for ADI register 7 #define ADI_MASK8B67_M1_S 24 #define ADI_MASK8B67_D1_M 0x00FF0000 // Data for ADI register 7, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B67_D1_S 16 #define ADI_MASK8B67_M0_M 0x0000FF00 // Mask for ADI register 6 #define ADI_MASK8B67_M0_S 8 #define ADI_MASK8B67_D0_M 0x000000FF // Data for ADI register 6, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B67_D0_S 0 //***************************************************************************** // @@ -1011,14 +1011,14 @@ #define ADI_MASK8B89_M1_M 0xFF000000 // Mask for ADI register 9 #define ADI_MASK8B89_M1_S 24 #define ADI_MASK8B89_D1_M 0x00FF0000 // Data for ADI register 9, - only - // bits selected by mask M1 will be - // affected by access +// bits selected by mask M1 will be +// affected by access #define ADI_MASK8B89_D1_S 16 #define ADI_MASK8B89_M0_M 0x0000FF00 // Mask for ADI register 8 #define ADI_MASK8B89_M0_S 8 #define ADI_MASK8B89_D0_M 0x000000FF // Data for ADI register 8, - only - // bits selected by mask M0 will be - // affected by access +// bits selected by mask M0 will be +// affected by access #define ADI_MASK8B89_D0_S 0 //***************************************************************************** // @@ -1029,14 +1029,14 @@ #define ADI_MASK8B1011_M1_M 0xFF000000 // Mask for ADI register 11 #define ADI_MASK8B1011_M1_S 24 #define ADI_MASK8B1011_D1_M 0x00FF0000 // Data for ADI register 11, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1011_D1_S 16 #define ADI_MASK8B1011_M0_M 0x0000FF00 // Mask for ADI register 10 #define ADI_MASK8B1011_M0_S 8 #define ADI_MASK8B1011_D0_M 0x000000FF // Data for ADI register 10, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1011_D0_S 0 //***************************************************************************** // @@ -1047,14 +1047,14 @@ #define ADI_MASK8B1213_M1_M 0xFF000000 // Mask for ADI register 13 #define ADI_MASK8B1213_M1_S 24 #define ADI_MASK8B1213_D1_M 0x00FF0000 // Data for ADI register 13, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1213_D1_S 16 #define ADI_MASK8B1213_M0_M 0x0000FF00 // Mask for ADI register 12 #define ADI_MASK8B1213_M0_S 8 #define ADI_MASK8B1213_D0_M 0x000000FF // Data for ADI register 12, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1213_D0_S 0 //***************************************************************************** // @@ -1065,14 +1065,14 @@ #define ADI_MASK8B1415_M1_M 0xFF000000 // Mask for ADI register 15 #define ADI_MASK8B1415_M1_S 24 #define ADI_MASK8B1415_D1_M 0x00FF0000 // Data for ADI register 15, - - // only bits selected by mask M1 - // will be affected by access +// only bits selected by mask M1 +// will be affected by access #define ADI_MASK8B1415_D1_S 16 #define ADI_MASK8B1415_M0_M 0x0000FF00 // Mask for ADI register 14 #define ADI_MASK8B1415_M0_S 8 #define ADI_MASK8B1415_D0_M 0x000000FF // Data for ADI register 14, - - // only bits selected by mask M0 - // will be affected by access +// only bits selected by mask M0 +// will be affected by access #define ADI_MASK8B1415_D0_S 0 //***************************************************************************** // @@ -1083,9 +1083,9 @@ #define ADI_MASK16B01_M_M 0xFFFF0000 // Mask for ADI register 0 and 1 #define ADI_MASK16B01_M_S 16 #define ADI_MASK16B01_D_M 0x0000FFFF // Data for ADI register at - // offsets 0 and 1, - only bits - // selected by mask M will be - // affected by access +// offsets 0 and 1, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B01_D_S 0 //***************************************************************************** // @@ -1096,9 +1096,9 @@ #define ADI_MASK16B23_M_M 0xFFFF0000 // Mask for ADI register 2 and 3 #define ADI_MASK16B23_M_S 16 #define ADI_MASK16B23_D_M 0x0000FFFF // Data for ADI register at - // offsets 2 and 3, - only bits - // selected by mask M will be - // affected by access +// offsets 2 and 3, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B23_D_S 0 //***************************************************************************** // @@ -1109,9 +1109,9 @@ #define ADI_MASK16B45_M_M 0xFFFF0000 // Mask for ADI register 4 and 5 #define ADI_MASK16B45_M_S 16 #define ADI_MASK16B45_D_M 0x0000FFFF // Data for ADI register at - // offsets 4 and 5, - only bits - // selected by mask M will be - // affected by access +// offsets 4 and 5, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B45_D_S 0 //***************************************************************************** // @@ -1122,9 +1122,9 @@ #define ADI_MASK16B67_M_M 0xFFFF0000 // Mask for ADI register 6 and 7 #define ADI_MASK16B67_M_S 16 #define ADI_MASK16B67_D_M 0x0000FFFF // Data for ADI register at - // offsets 6 and 7, - only bits - // selected by mask M will be - // affected by access +// offsets 6 and 7, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B67_D_S 0 //***************************************************************************** // @@ -1135,9 +1135,9 @@ #define ADI_MASK16B89_M_M 0xFFFF0000 // Mask for ADI register 8 and 9 #define ADI_MASK16B89_M_S 16 #define ADI_MASK16B89_D_M 0x0000FFFF // Data for ADI register at - // offsets 8 and 9, - only bits - // selected by mask M will be - // affected by access +// offsets 8 and 9, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B89_D_S 0 //***************************************************************************** // @@ -1148,9 +1148,9 @@ #define ADI_MASK16B1011_M_M 0xFFFF0000 // Mask for ADI register 10 and 11 #define ADI_MASK16B1011_M_S 16 #define ADI_MASK16B1011_D_M 0x0000FFFF // Data for ADI register at - // offsets 10 and 11, - only bits - // selected by mask M will be - // affected by access +// offsets 10 and 11, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1011_D_S 0 //***************************************************************************** // @@ -1161,9 +1161,9 @@ #define ADI_MASK16B1213_M_M 0xFFFF0000 // Mask for ADI register 12 and 13 #define ADI_MASK16B1213_M_S 16 #define ADI_MASK16B1213_D_M 0x0000FFFF // Data for ADI register at - // offsets 12 and 13, - only bits - // selected by mask M will be - // affected by access +// offsets 12 and 13, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1213_D_S 0 //***************************************************************************** // @@ -1174,9 +1174,9 @@ #define ADI_MASK16B1415_M_M 0xFFFF0000 // Mask for ADI register 14 and 15 #define ADI_MASK16B1415_M_S 16 #define ADI_MASK16B1415_D_M 0x0000FFFF // Data for ADI register at - // offsets 14 and 15, - only bits - // selected by mask M will be - // affected by access +// offsets 14 and 15, - only bits +// selected by mask M will be +// affected by access #define ADI_MASK16B1415_D_S 0 #endif // __HW_ADI_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ccfg_simple_struct.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ccfg_simple_struct.h index 12cfc019..1a2c740a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ccfg_simple_struct.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ccfg_simple_struct.h @@ -45,7 +45,8 @@ // //***************************************************************************** typedef struct -{ // Mapped to address +{ + // Mapped to address uint32_t CCFG_EXT_LF_CLK ; // 0x50003FA8 uint32_t CCFG_MODE_CONF_1 ; // 0x50003FAC uint32_t CCFG_SIZE_AND_DIS_FLAGS ; // 0x50003FB0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_chip_def.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_chip_def.h index 6bc9c99d..de21888d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_chip_def.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_chip_def.h @@ -65,132 +65,132 @@ extern "C" //***************************************************************************** /* CC2620F128 */ #if defined(CC2620F128RGZ_R20) || defined(CC2620F128RGZ_R21) - #define CC_CHIP_ID 0x26200720 +#define CC_CHIP_ID 0x26200720 #elif defined(CC2620F128RHB_R20) || defined(CC2620F128RHB_R21) - #define CC_CHIP_ID 0x26200520 +#define CC_CHIP_ID 0x26200520 #elif defined(CC2620F128RSM_R20) || defined(CC2620F128RSM_R21) - #define CC_CHIP_ID 0x26200420 +#define CC_CHIP_ID 0x26200420 #elif defined(CC2620F128_R20) || defined(CC2620F128_R21) - #define CC_CHIP_ID 0x26200020 +#define CC_CHIP_ID 0x26200020 #elif defined(CC2620F128RGZ_R22) || defined(CC2620F128RGZ) - #define CC_CHIP_ID 0x26200722 +#define CC_CHIP_ID 0x26200722 #elif defined(CC2620F128RHB_R22) || defined(CC2620F128RHB) - #define CC_CHIP_ID 0x26200522 +#define CC_CHIP_ID 0x26200522 #elif defined(CC2620F128RSM_R22) || defined(CC2620F128RSM) - #define CC_CHIP_ID 0x26200422 +#define CC_CHIP_ID 0x26200422 #elif defined(CC2620F128_R22) || defined(CC2620F128) - #define CC_CHIP_ID 0x26200022 +#define CC_CHIP_ID 0x26200022 /* CC2630F128 */ #elif defined(CC2630F128RGZ_R20) || defined(CC2630F128RGZ_R21) - #define CC_CHIP_ID 0x26300720 +#define CC_CHIP_ID 0x26300720 #elif defined(CC2630F128RHB_R20) || defined(CC2630F128RHB_R21) - #define CC_CHIP_ID 0x26300520 +#define CC_CHIP_ID 0x26300520 #elif defined(CC2630F128RSM_R20) || defined(CC2630F128RSM_R21) - #define CC_CHIP_ID 0x26300420 +#define CC_CHIP_ID 0x26300420 #elif defined(CC2630F128_R20) || defined(CC2630F128_R21) - #define CC_CHIP_ID 0x26300020 +#define CC_CHIP_ID 0x26300020 #elif defined(CC2630F128RGZ_R22) || defined(CC2630F128RGZ) - #define CC_CHIP_ID 0x26300722 +#define CC_CHIP_ID 0x26300722 #elif defined(CC2630F128RHB_R22) || defined(CC2630F128RHB) - #define CC_CHIP_ID 0x26300522 +#define CC_CHIP_ID 0x26300522 #elif defined(CC2630F128RSM_R22) || defined(CC2630F128RSM) - #define CC_CHIP_ID 0x26300422 +#define CC_CHIP_ID 0x26300422 #elif defined(CC2630F128_R22) || defined(CC2630F128) - #define CC_CHIP_ID 0x26300022 +#define CC_CHIP_ID 0x26300022 /* CC2640F128 */ #elif defined(CC2640F128RGZ_R20) || defined(CC2640F128RGZ_R21) - #define CC_CHIP_ID 0x26400720 +#define CC_CHIP_ID 0x26400720 #elif defined(CC2640F128RHB_R20) || defined(CC2640F128RHB_R21) - #define CC_CHIP_ID 0x26400520 +#define CC_CHIP_ID 0x26400520 #elif defined(CC2640F128RSM_R20) || defined(CC2640F128RSM_R21) - #define CC_CHIP_ID 0x26400420 +#define CC_CHIP_ID 0x26400420 #elif defined(CC2640F128_R20) || defined(CC2640F128_R21) - #define CC_CHIP_ID 0x26400020 +#define CC_CHIP_ID 0x26400020 #elif defined(CC2640F128RGZ_R22) || defined(CC2640F128RGZ) - #define CC_CHIP_ID 0x26400722 +#define CC_CHIP_ID 0x26400722 #elif defined(CC2640F128RHB_R22) || defined(CC2640F128RHB) - #define CC_CHIP_ID 0x26400522 +#define CC_CHIP_ID 0x26400522 #elif defined(CC2640F128RSM_R22) || defined(CC2640F128RSM) - #define CC_CHIP_ID 0x26400422 +#define CC_CHIP_ID 0x26400422 #elif defined(CC2640F128_R22) || defined(CC2640F128) - #define CC_CHIP_ID 0x26400022 +#define CC_CHIP_ID 0x26400022 /* CC2650F128 */ #elif defined(CC2650F128RGZ_R20) || defined(CC2650F128RGZ_R21) - #define CC_CHIP_ID 0x26500720 +#define CC_CHIP_ID 0x26500720 #elif defined(CC2650F128RHB_R20) || defined(CC2650F128RHB_R21) - #define CC_CHIP_ID 0x26500520 +#define CC_CHIP_ID 0x26500520 #elif defined(CC2650F128RSM_R20) || defined(CC2650F128RSM_R21) - #define CC_CHIP_ID 0x26500420 +#define CC_CHIP_ID 0x26500420 #elif defined(CC2650F128_R20) || defined(CC2650F128_R21) - #define CC_CHIP_ID 0x26500020 +#define CC_CHIP_ID 0x26500020 #elif defined(CC2650F128RGZ_R22) || defined(CC2650F128RGZ) - #define CC_CHIP_ID 0x26500722 +#define CC_CHIP_ID 0x26500722 #elif defined(CC2650F128RHB_R22) || defined(CC2650F128RHB) - #define CC_CHIP_ID 0x26500522 +#define CC_CHIP_ID 0x26500522 #elif defined(CC2650F128RSM_R22) || defined(CC2650F128RSM) - #define CC_CHIP_ID 0x26500422 +#define CC_CHIP_ID 0x26500422 #elif defined(CC2650F128_R22) || defined(CC2650F128) - #define CC_CHIP_ID 0x26500022 +#define CC_CHIP_ID 0x26500022 /* CC2650L128 (OTP) */ #elif defined(CC2650L128) - #define CC_CHIP_ID 0x26501710 +#define CC_CHIP_ID 0x26501710 /* CC1310F128 */ #elif defined(CC1310F128RGZ_R20) || defined(CC1310F128RGZ) - #define CC_CHIP_ID 0x13100720 +#define CC_CHIP_ID 0x13100720 #elif defined(CC1310F128RHB_R20) || defined(CC1310F128RHB) - #define CC_CHIP_ID 0x13100520 +#define CC_CHIP_ID 0x13100520 #elif defined(CC1310F128RSM_R20) || defined(CC1310F128RSM) - #define CC_CHIP_ID 0x13100420 +#define CC_CHIP_ID 0x13100420 #elif defined(CC1310F128_R20) || defined(CC1310F128) - #define CC_CHIP_ID 0x13100020 +#define CC_CHIP_ID 0x13100020 /* CC1350F128 */ #elif defined(CC1350F128RGZ_R20) || defined(CC1350F128RGZ) - #define CC_CHIP_ID 0x13500720 +#define CC_CHIP_ID 0x13500720 #elif defined(CC1350F128RHB_R20) || defined(CC1350F128RHB) - #define CC_CHIP_ID 0x13500520 +#define CC_CHIP_ID 0x13500520 #elif defined(CC1350F128RSM_R20) || defined(CC1350F128RSM) - #define CC_CHIP_ID 0x13500420 +#define CC_CHIP_ID 0x13500420 #elif defined(CC1350F128_R20) || defined(CC1350F128) - #define CC_CHIP_ID 0x13500020 +#define CC_CHIP_ID 0x13500020 /* CC2640R2F */ #elif defined(CC2640R2FRGZ_R25) || defined(CC2640R2FRGZ) - #define CC_CHIP_ID 0x26401710 +#define CC_CHIP_ID 0x26401710 #elif defined(CC2640R2FRHB_R25) || defined(CC2640R2FRHB) - #define CC_CHIP_ID 0x26401510 +#define CC_CHIP_ID 0x26401510 #elif defined(CC2640R2FRSM_R25) || defined(CC2640R2FRSM) - #define CC_CHIP_ID 0x26401410 +#define CC_CHIP_ID 0x26401410 #elif defined(CC2640R2F_R25) || defined(CC2640R2F) - #define CC_CHIP_ID 0x26401010 +#define CC_CHIP_ID 0x26401010 /* CC2652R1F */ #elif defined(CC2652R1FRGZ_R10) || defined(CC2652R1FRGZ) - #define CC_CHIP_ID 0x26523710 +#define CC_CHIP_ID 0x26523710 #elif defined(CC2652R1F_R10) || defined(CC2652R1F) - #define CC_CHIP_ID 0x26523010 +#define CC_CHIP_ID 0x26523010 /* CC2644R1F */ #elif defined(CC2644R1FRGZ_R10) || defined(CC2644R1FRGZ) - #define CC_CHIP_ID 0x26443710 +#define CC_CHIP_ID 0x26443710 #elif defined(CC2644R1F_R10) || defined(CC2644R1F) - #define CC_CHIP_ID 0x26443010 +#define CC_CHIP_ID 0x26443010 /* CC2642R1F */ #elif defined(CC2642R1FRGZ_R10) || defined(CC2642R1FRGZ) - #define CC_CHIP_ID 0x26423710 +#define CC_CHIP_ID 0x26423710 #elif defined(CC2642R1F_R10) || defined(CC2642R1F) - #define CC_CHIP_ID 0x26423010 +#define CC_CHIP_ID 0x26423010 /* CC1354R1F */ #elif defined(CC1354R1FRGZ_R10) || defined(CC1354R1FRGZ) - #define CC_CHIP_ID 0x13543710 +#define CC_CHIP_ID 0x13543710 #elif defined(CC1354R1F_R10) || defined(CC1354R1F) - #define CC_CHIP_ID 0x13543010 +#define CC_CHIP_ID 0x13543010 /* CC1352R1F */ #elif defined(CC1352R1FRGZ_R10) || defined(CC1352R1FRGZ) - #define CC_CHIP_ID 0x13523710 +#define CC_CHIP_ID 0x13523710 #elif defined(CC1352R1F_R10) || defined(CC1352R1F) - #define CC_CHIP_ID 0x13523010 +#define CC_CHIP_ID 0x13523010 /* CC1312R1F */ #elif defined(CC1312R1FRGZ_R10) || defined(CC1312R1FRGZ) - #define CC_CHIP_ID 0x13123710 +#define CC_CHIP_ID 0x13123710 #elif defined(CC1312R1F_R10) || defined(CC1312R1F) - #define CC_CHIP_ID 0x13123010 +#define CC_CHIP_ID 0x13123010 #endif #define CC_GET_CHIP_FAMILY 0x26 @@ -198,24 +198,24 @@ extern "C" #define CC_GET_CHIP_HWREV 0x22 #ifdef CC_CHIP_ID - /* Define chip package only if specified */ - #if (CC_CHIP_ID & 0x00000F00) != 0 - #define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) - #endif +/* Define chip package only if specified */ +#if (CC_CHIP_ID & 0x00000F00) != 0 +#define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) +#endif - /* Define chip device */ - #define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) +/* Define chip device */ +#define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) - /* The chip family, option and package shall match the DriverLib release */ - #if (CC_GET_CHIP_FAMILY != ((CC_CHIP_ID & 0xFF000000) >> 24)) - #error "Specified chip family does not match DriverLib release" - #endif - #if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) - #error "Specified chip option does not match DriverLib release" - #endif - #if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) - #error "Specified chip hardware revision does not match DriverLib release" - #endif +/* The chip family, option and package shall match the DriverLib release */ +#if (CC_GET_CHIP_FAMILY != ((CC_CHIP_ID & 0xFF000000) >> 24)) +#error "Specified chip family does not match DriverLib release" +#endif +#if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) +#error "Specified chip option does not match DriverLib release" +#endif +#if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) +#error "Specified chip hardware revision does not match DriverLib release" +#endif #endif //***************************************************************************** diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ddi.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ddi.h index a83653f7..d81a93ae 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ddi.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ddi.h @@ -180,17 +180,17 @@ #define DDI_O_SET 0x00000040 // Offset for 'Set' instruction. #define DDI_O_CLR 0x00000080 // Offset for 'Clear' instruction. #define DDI_O_MASK4B 0x00000100 // Offset for 4-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 7:4 are mask. Bits 3:0 are data. - // Requires 'byte' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 7:4 are mask. Bits 3:0 are data. +// Requires 'byte' write. #define DDI_O_MASK8B 0x00000180 // Offset for 8-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 15:8 are mask. Bits 7:0 are data. - // Requires 'short' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 15:8 are mask. Bits 7:0 are data. +// Requires 'short' write. #define DDI_O_MASK16B 0x00000200 // Offset for 16-bit masked access. - // Data bit[n] is written if mask bit[n] is set ('1'). - // Bits 31:16 are mask. Bits 15:0 are data. - // Requires 'long' write. +// Data bit[n] is written if mask bit[n] is set ('1'). +// Bits 31:16 are mask. Bits 15:0 are data. +// Requires 'long' write. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_device.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_device.h index 0214c002..7ce61f6a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_device.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_device.h @@ -41,128 +41,128 @@ #ifdef CC_GET_CHIP_PACKAGE -#if ( CC_GET_CHIP_PACKAGE == 0x7 ) -//***************************************************************************** -// -// The following are defines for edge detection on wake up events for the -// CC26xx 7x7 packaged device. -// -//***************************************************************************** -#define AON_EVENT_DIO0 18 -#define AON_EVENT_DIO1 17 -#define AON_EVENT_DIO2 16 -#define AON_EVENT_DIO3 15 -#define AON_EVENT_DIO4 14 -#define AON_EVENT_DIO5 13 -#define AON_EVENT_DIO6 12 -#define AON_EVENT_DIO7 11 -#define AON_EVENT_DIO8 10 -#define AON_EVENT_DIO9 9 -#define AON_EVENT_DIO10 8 -#define AON_EVENT_DIO11 7 -#define AON_EVENT_DIO12 6 -#define AON_EVENT_DIO13 5 -#define AON_EVENT_DIO14 4 -#define AON_EVENT_DIO15 3 -#define AON_EVENT_DIO16 2 -#define AON_EVENT_DIO17 1 -#define AON_EVENT_DIO18 31 -#define AON_EVENT_DIO19 30 -#define AON_EVENT_DIO20 29 -#define AON_EVENT_DIO21 28 -#define AON_EVENT_DIO22 27 -#define AON_EVENT_DIO23 26 -#define AON_EVENT_DIO24 25 -#define AON_EVENT_DIO25 24 -#define AON_EVENT_DIO26 23 -#define AON_EVENT_DIO27 22 -#define AON_EVENT_DIO28 21 -#define AON_EVENT_DIO29 20 -#define AON_EVENT_DIO30 19 -#define AON_EVENT_DIO31 0x3F -#endif // ( CC_GET_CHIP_PACKAGE == 0x7 ) + #if ( CC_GET_CHIP_PACKAGE == 0x7 ) + //***************************************************************************** + // + // The following are defines for edge detection on wake up events for the + // CC26xx 7x7 packaged device. + // + //***************************************************************************** + #define AON_EVENT_DIO0 18 + #define AON_EVENT_DIO1 17 + #define AON_EVENT_DIO2 16 + #define AON_EVENT_DIO3 15 + #define AON_EVENT_DIO4 14 + #define AON_EVENT_DIO5 13 + #define AON_EVENT_DIO6 12 + #define AON_EVENT_DIO7 11 + #define AON_EVENT_DIO8 10 + #define AON_EVENT_DIO9 9 + #define AON_EVENT_DIO10 8 + #define AON_EVENT_DIO11 7 + #define AON_EVENT_DIO12 6 + #define AON_EVENT_DIO13 5 + #define AON_EVENT_DIO14 4 + #define AON_EVENT_DIO15 3 + #define AON_EVENT_DIO16 2 + #define AON_EVENT_DIO17 1 + #define AON_EVENT_DIO18 31 + #define AON_EVENT_DIO19 30 + #define AON_EVENT_DIO20 29 + #define AON_EVENT_DIO21 28 + #define AON_EVENT_DIO22 27 + #define AON_EVENT_DIO23 26 + #define AON_EVENT_DIO24 25 + #define AON_EVENT_DIO25 24 + #define AON_EVENT_DIO26 23 + #define AON_EVENT_DIO27 22 + #define AON_EVENT_DIO28 21 + #define AON_EVENT_DIO29 20 + #define AON_EVENT_DIO30 19 + #define AON_EVENT_DIO31 0x3F + #endif // ( CC_GET_CHIP_PACKAGE == 0x7 ) -#if ( CC_GET_CHIP_PACKAGE == 0x5 ) -//***************************************************************************** -// -// The following are defines for edge detection on wake up events for the -// CC26xx 5x5 packaged device. -// -//***************************************************************************** -#define AON_EVENT_DIO0 15 -#define AON_EVENT_DIO1 14 -#define AON_EVENT_DIO2 13 -#define AON_EVENT_DIO3 12 -#define AON_EVENT_DIO4 11 -#define AON_EVENT_DIO5 2 -#define AON_EVENT_DIO6 1 -#define AON_EVENT_DIO7 26 -#define AON_EVENT_DIO8 25 -#define AON_EVENT_DIO9 23 -#define AON_EVENT_DIO10 24 -#define AON_EVENT_DIO11 22 -#define AON_EVENT_DIO12 21 -#define AON_EVENT_DIO13 20 -#define AON_EVENT_DIO14 19 -#define AON_EVENT_DIO15 0x3F -#define AON_EVENT_DIO16 0x3F -#define AON_EVENT_DIO17 0x3F -#define AON_EVENT_DIO18 0x3F -#define AON_EVENT_DIO19 0x3F -#define AON_EVENT_DIO20 0x3F -#define AON_EVENT_DIO21 0x3F -#define AON_EVENT_DIO22 0x3F -#define AON_EVENT_DIO23 0x3F -#define AON_EVENT_DIO24 0x3F -#define AON_EVENT_DIO25 0x3F -#define AON_EVENT_DIO26 0x3F -#define AON_EVENT_DIO27 0x3F -#define AON_EVENT_DIO28 0x3F -#define AON_EVENT_DIO29 0x3F -#define AON_EVENT_DIO30 0x3F -#define AON_EVENT_DIO31 0x3F -#endif // ( CC_GET_CHIP_PACKAGE == 0x5 ) + #if ( CC_GET_CHIP_PACKAGE == 0x5 ) + //***************************************************************************** + // + // The following are defines for edge detection on wake up events for the + // CC26xx 5x5 packaged device. + // + //***************************************************************************** + #define AON_EVENT_DIO0 15 + #define AON_EVENT_DIO1 14 + #define AON_EVENT_DIO2 13 + #define AON_EVENT_DIO3 12 + #define AON_EVENT_DIO4 11 + #define AON_EVENT_DIO5 2 + #define AON_EVENT_DIO6 1 + #define AON_EVENT_DIO7 26 + #define AON_EVENT_DIO8 25 + #define AON_EVENT_DIO9 23 + #define AON_EVENT_DIO10 24 + #define AON_EVENT_DIO11 22 + #define AON_EVENT_DIO12 21 + #define AON_EVENT_DIO13 20 + #define AON_EVENT_DIO14 19 + #define AON_EVENT_DIO15 0x3F + #define AON_EVENT_DIO16 0x3F + #define AON_EVENT_DIO17 0x3F + #define AON_EVENT_DIO18 0x3F + #define AON_EVENT_DIO19 0x3F + #define AON_EVENT_DIO20 0x3F + #define AON_EVENT_DIO21 0x3F + #define AON_EVENT_DIO22 0x3F + #define AON_EVENT_DIO23 0x3F + #define AON_EVENT_DIO24 0x3F + #define AON_EVENT_DIO25 0x3F + #define AON_EVENT_DIO26 0x3F + #define AON_EVENT_DIO27 0x3F + #define AON_EVENT_DIO28 0x3F + #define AON_EVENT_DIO29 0x3F + #define AON_EVENT_DIO30 0x3F + #define AON_EVENT_DIO31 0x3F + #endif // ( CC_GET_CHIP_PACKAGE == 0x5 ) -#if ( CC_GET_CHIP_PACKAGE == 0x4 ) -//***************************************************************************** -// -// The following are defines for edge detection on wake up events for the -// CC26xx 4x4 packaged device. -// -//***************************************************************************** -#define AON_EVENT_DIO0 13 -#define AON_EVENT_DIO1 12 -#define AON_EVENT_DIO2 11 -#define AON_EVENT_DIO3 2 -#define AON_EVENT_DIO4 1 -#define AON_EVENT_DIO5 26 -#define AON_EVENT_DIO6 25 -#define AON_EVENT_DIO7 24 -#define AON_EVENT_DIO8 23 -#define AON_EVENT_DIO9 22 -#define AON_EVENT_DIO10 0x3F -#define AON_EVENT_DIO11 0x3F -#define AON_EVENT_DIO12 0x3F -#define AON_EVENT_DIO13 0x3F -#define AON_EVENT_DIO14 0x3F -#define AON_EVENT_DIO15 0x3F -#define AON_EVENT_DIO16 0x3F -#define AON_EVENT_DIO17 0x3F -#define AON_EVENT_DIO18 0x3F -#define AON_EVENT_DIO19 0x3F -#define AON_EVENT_DIO20 0x3F -#define AON_EVENT_DIO21 0x3F -#define AON_EVENT_DIO22 0x3F -#define AON_EVENT_DIO23 0x3F -#define AON_EVENT_DIO24 0x3F -#define AON_EVENT_DIO25 0x3F -#define AON_EVENT_DIO26 0x3F -#define AON_EVENT_DIO27 0x3F -#define AON_EVENT_DIO28 0x3F -#define AON_EVENT_DIO29 0x3F -#define AON_EVENT_DIO30 0x3F -#define AON_EVENT_DIO31 0x3F -#endif // ( CC_GET_CHIP_PACKAGE == 0x4 ) + #if ( CC_GET_CHIP_PACKAGE == 0x4 ) + //***************************************************************************** + // + // The following are defines for edge detection on wake up events for the + // CC26xx 4x4 packaged device. + // + //***************************************************************************** + #define AON_EVENT_DIO0 13 + #define AON_EVENT_DIO1 12 + #define AON_EVENT_DIO2 11 + #define AON_EVENT_DIO3 2 + #define AON_EVENT_DIO4 1 + #define AON_EVENT_DIO5 26 + #define AON_EVENT_DIO6 25 + #define AON_EVENT_DIO7 24 + #define AON_EVENT_DIO8 23 + #define AON_EVENT_DIO9 22 + #define AON_EVENT_DIO10 0x3F + #define AON_EVENT_DIO11 0x3F + #define AON_EVENT_DIO12 0x3F + #define AON_EVENT_DIO13 0x3F + #define AON_EVENT_DIO14 0x3F + #define AON_EVENT_DIO15 0x3F + #define AON_EVENT_DIO16 0x3F + #define AON_EVENT_DIO17 0x3F + #define AON_EVENT_DIO18 0x3F + #define AON_EVENT_DIO19 0x3F + #define AON_EVENT_DIO20 0x3F + #define AON_EVENT_DIO21 0x3F + #define AON_EVENT_DIO22 0x3F + #define AON_EVENT_DIO23 0x3F + #define AON_EVENT_DIO24 0x3F + #define AON_EVENT_DIO25 0x3F + #define AON_EVENT_DIO26 0x3F + #define AON_EVENT_DIO27 0x3F + #define AON_EVENT_DIO28 0x3F + #define AON_EVENT_DIO29 0x3F + #define AON_EVENT_DIO30 0x3F + #define AON_EVENT_DIO31 0x3F + #endif // ( CC_GET_CHIP_PACKAGE == 0x4 ) #endif // defined( CC_GET_CHIP_PACKAGE ) #endif // __HW_DEVICE_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_fcfg1.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_fcfg1.h index 0862ecb8..44459f57 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_fcfg1.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_fcfg1.h @@ -929,11 +929,11 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_SHDW_OSC_BIAS_LDO_TRIM_SET_RCOSC_HF_COARSE_RESISTOR_W \ - 2 + 2 #define FCFG1_SHDW_OSC_BIAS_LDO_TRIM_SET_RCOSC_HF_COARSE_RESISTOR_M \ - 0x18000000 + 0x18000000 #define FCFG1_SHDW_OSC_BIAS_LDO_TRIM_SET_RCOSC_HF_COARSE_RESISTOR_S \ - 27 + 27 // Field: [26:23] TRIMMAG // @@ -2228,11 +2228,11 @@ // // Internal. Only to be used through TI provided API. #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_W \ - 6 + 6 #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_M \ - 0x0000003F + 0x0000003F #define FCFG1_SOC_ADC_REF_TRIM_AND_OFFSET_EXT_SOC_ADC_REF_VOLTAGE_TRIM_TEMP1_S \ - 0 + 0 //***************************************************************************** // diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ints.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ints.h index 3d38283f..8fc6fddd 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ints.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_ints.h @@ -45,28 +45,28 @@ #define INT_NMI_FAULT 2 // NMI Fault #define INT_HARD_FAULT 3 // Hard Fault #define INT_MEMMANAGE_FAULT 4 // Memory Management (MemManage) - // Fault +// Fault #define INT_BUS_FAULT 5 // Bus Fault #define INT_USAGE_FAULT 6 // Usage Fault #define INT_SVCALL 11 // Supervisor Call (SVCall) #define INT_DEBUG 12 // Debug Monitor #define INT_PENDSV 14 // Pending Service Call (PendSV) #define INT_SYSTICK 15 // SysTick Interrupt from the - // System Timer in NVIC. +// System Timer in NVIC. #define INT_AON_GPIO_EDGE 16 // Edge detect event from IOC #define INT_I2C_IRQ 17 // Interrupt event from I2C #define INT_RFC_CPE_1 18 // Combined Interrupt for CPE - // Generated events +// Generated events #define INT_AON_RTC_COMB 20 // Event from AON_RTC #define INT_UART0_COMB 21 // UART0 combined interrupt #define INT_AUX_SWEV0 22 // AUX software event 0 #define INT_SSI0_COMB 23 // SSI0 combined interrupt #define INT_SSI1_COMB 24 // SSI1 combined interrupt #define INT_RFC_CPE_0 25 // Combined Interrupt for CPE - // Generated events +// Generated events #define INT_RFC_HW_COMB 26 // Combined RFC hardware interrupt #define INT_RFC_CMD_ACK 27 // RFC Doorbell Command - // Acknowledgement Interrupt +// Acknowledgement Interrupt #define INT_I2S_IRQ 28 // Interrupt event from I2S #define INT_AUX_SWEV1 29 // AUX software event 1 #define INT_WDT_IRQ 30 // Watchdog interrupt event @@ -79,7 +79,7 @@ #define INT_GPT3A 37 // GPT3A interrupt event #define INT_GPT3B 38 // GPT3B interrupt event #define INT_CRYPTO_RESULT_AVAIL_IRQ 39 // CRYPTO result available interupt - // event +// event #define INT_DMA_DONE_COMB 40 // Combined DMA done #define INT_DMA_ERR 41 // DMA bus error #define INT_FLASH 42 // FLASH controller error event diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_memmap.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_memmap.h index 6377d81e..cfad06d6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_memmap.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_memmap.h @@ -96,7 +96,7 @@ #define FCFG1_BASE 0x50001000 // FCFG1 #define FCFG2_BASE 0x50002000 // FCFG2 #ifndef CCFG_BASE -#define CCFG_BASE 0x50003000 // CCFG + #define CCFG_BASE 0x50003000 // CCFG #endif #define CCFG_BASE_DEFAULT 0x50003000 // CCFG #define SSI0_NONBUF_BASE 0x60000000 // SSI CPU nonbuf base @@ -132,9 +132,9 @@ #define AON_IOC_NONBUF_BASE 0x60094000 // AON_IOC CPU nonbuf base #define AON_BATMON_NONBUF_BASE 0x60095000 // AON_BATMON CPU nonbuf base #define AUX_AIODIO0_NONBUF_BASE \ - 0x600C1000 // AUX_AIODIO CPU nonbuf base + 0x600C1000 // AUX_AIODIO CPU nonbuf base #define AUX_AIODIO1_NONBUF_BASE \ - 0x600C2000 // AUX_AIODIO CPU nonbuf base + 0x600C2000 // AUX_AIODIO CPU nonbuf base #define AUX_TDC_NONBUF_BASE 0x600C4000 // AUX_TDC CPU nonbuf base #define AUX_EVCTL_NONBUF_BASE 0x600C5000 // AUX_EVCTL CPU nonbuf base #define AUX_WUC_NONBUF_BASE 0x600C6000 // AUX_WUC CPU nonbuf base @@ -142,7 +142,7 @@ #define AUX_SMPH_NONBUF_BASE 0x600C8000 // AUX_SMPH CPU nonbuf base #define AUX_ANAIF_NONBUF_BASE 0x600C9000 // AUX_ANAIF CPU nonbuf base #define AUX_DDI0_OSC_NONBUF_BASE \ - 0x600CA000 // DDI CPU nonbuf base + 0x600CA000 // DDI CPU nonbuf base #define AUX_ADI4_NONBUF_BASE 0x600CB000 // ADI CPU nonbuf base #define AUX_RAM_NONBUF_BASE 0x600E0000 // AUX_RAM CPU nonbuf base #define AUX_SCE_NONBUF_BASE 0x600E1000 // AUX_SCE CPU nonbuf base diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_nvic.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_nvic.h index 3bdeb8b7..6f1f2d03 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_nvic.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_nvic.h @@ -45,7 +45,7 @@ #define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg #define NVIC_ACTLR 0xE000E008 // Auxiliary Control #define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status - // Register +// Register #define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register #define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register #define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg @@ -77,7 +77,7 @@ #define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State #define NVIC_VTABLE 0xE000ED08 // Vector Table Offset #define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset - // Control +// Control #define NVIC_SYS_CTRL 0xE000ED10 // System Control #define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control #define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1 @@ -96,13 +96,13 @@ #define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size #define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1 #define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size - // Alias 1 +// Alias 1 #define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2 #define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size - // Alias 2 +// Alias 2 #define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3 #define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size - // Alias 3 +// Alias 3 #define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg #define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select #define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data @@ -125,7 +125,7 @@ #define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding #define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer #define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple - // Cycle Instructions +// Cycle Instructions //***************************************************************************** // @@ -735,21 +735,21 @@ #undef NVIC_INT_CTRL_VEC_PEN_M #define NVIC_INT_CTRL_VEC_PEN_M 0x000FF000 // Interrupt Pending Vector Number #define NVIC_INT_CTRL_VEC_PEN_NMI \ - 0x00002000 // NMI + 0x00002000 // NMI #define NVIC_INT_CTRL_VEC_PEN_HARD \ - 0x00003000 // Hard fault + 0x00003000 // Hard fault #define NVIC_INT_CTRL_VEC_PEN_MEM \ - 0x00004000 // Memory management fault + 0x00004000 // Memory management fault #define NVIC_INT_CTRL_VEC_PEN_BUS \ - 0x00005000 // Bus fault + 0x00005000 // Bus fault #define NVIC_INT_CTRL_VEC_PEN_USG \ - 0x00006000 // Usage fault + 0x00006000 // Usage fault #define NVIC_INT_CTRL_VEC_PEN_SVC \ - 0x0000B000 // SVCall + 0x0000B000 // SVCall #define NVIC_INT_CTRL_VEC_PEN_PNDSV \ - 0x0000E000 // PendSV + 0x0000E000 // PendSV #define NVIC_INT_CTRL_VEC_PEN_TICK \ - 0x0000F000 // SysTick + 0x0000F000 // SysTick #define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base #define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number #undef NVIC_INT_CTRL_VEC_ACT_M @@ -806,9 +806,9 @@ // //***************************************************************************** #define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception - // Entry +// Entry #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and - // Fault +// Fault #define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0 #define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger @@ -859,7 +859,7 @@ #define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending #define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending #define NVIC_SYS_HND_CTRL_USAGEP \ - 0x00001000 // Usage Fault Pending + 0x00001000 // Usage Fault Pending #define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active #define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active @@ -880,20 +880,20 @@ #define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault #define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault #define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage - // Fault +// Fault #define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid #define NVIC_FAULT_STAT_BLSPERR 0x00002000 // Bus Fault on Floating-Point Lazy - // State Preservation +// State Preservation #define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault #define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault #define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error #define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error #define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error #define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address - // Register Valid +// Register Valid #define NVIC_FAULT_STAT_MLSPERR 0x00000020 // Memory Management Fault on - // Floating-Point Lazy State - // Preservation +// Floating-Point Lazy State +// Preservation #define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation #define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation #define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation @@ -946,16 +946,16 @@ #define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask #define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key #define NVIC_DBG_CTRL_S_RESET_ST \ - 0x02000000 // Core has reset since last read + 0x02000000 // Core has reset since last read #define NVIC_DBG_CTRL_S_RETIRE_ST \ - 0x01000000 // Core has executed insruction - // since last read + 0x01000000 // Core has executed insruction +// since last read #define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up #define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping #define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt #define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available #define NVIC_DBG_CTRL_C_SNAPSTALL \ - 0x00000020 // Breaks a stalled load/store + 0x00000020 // Breaks a stalled load/store #define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping #define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core #define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_types.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_types.h index dfa4281d..142601bc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_types.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/inc/hw_types.h @@ -58,7 +58,7 @@ typedef void (* FPTR_VOID_UINT8_T) (uint8_t); // //***************************************************************************** #ifndef __STATIC_INLINE -#define __STATIC_INLINE static inline + #define __STATIC_INLINE static inline #endif //***************************************************************************** @@ -80,19 +80,19 @@ typedef unsigned int __UINT32; // Read example : my32BitVar = HWREG(base_addr + offset) ; // Write example : HWREG(base_addr + offset) = my32BitVar ; #define HWREG(x) \ - (*((volatile unsigned long *)(x))) + (*((volatile unsigned long *)(x))) // Half word (16 bit) access to address x // Read example : my16BitVar = HWREGH(base_addr + offset) ; // Write example : HWREGH(base_addr + offset) = my16BitVar ; #define HWREGH(x) \ - (*((volatile unsigned short *)(x))) + (*((volatile unsigned short *)(x))) // Byte (8 bit) access to address x // Read example : my8BitVar = HWREGB(base_addr + offset) ; // Write example : HWREGB(base_addr + offset) = my8BitVar ; #define HWREGB(x) \ - (*((volatile unsigned char *)(x))) + (*((volatile unsigned char *)(x))) //***************************************************************************** // @@ -106,18 +106,18 @@ typedef unsigned int __UINT32; //***************************************************************************** // Bit-band access to address x bit number b using word access (32 bit) #define HWREGBITW(x, b) \ - HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) // Bit-band access to address x bit number b using half word access (16 bit) #define HWREGBITH(x, b) \ - HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREGH(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) // Bit-band access to address x bit number b using byte access (8 bit) #define HWREGBITB(x, b) \ - HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ - (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) + HWREGB(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ + (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) #endif // __HW_TYPES_H__ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble.h index 393d9cb3..4a505760 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble.h @@ -70,114 +70,115 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageBle[] = { - 0x210004b9, - 0x21000539, - 0x2100047d, - 0x2100058f, - 0x4c17b5f0, - 0x18612140, - 0x280278c8, - 0x4809d005, - 0x60012100, - 0x47884908, - 0x6e25bdf0, - 0x60354e07, - 0x43280760, - 0x68276620, - 0x480e6024, - 0x60274780, - 0xbdf06035, - 0x4004112c, - 0x000065a5, - 0x40044028, - 0x4c07b510, - 0x29007da1, - 0x2101d105, - 0x024875a1, - 0x393e4904, - 0x68204788, - 0xd0002800, - 0xbd104780, - 0x21000254, - 0x0000398b, - 0x4905b510, - 0xb6724a05, - 0x280178c8, - 0x2001dc02, - 0x1d127048, - 0x4710b662, - 0x21000294, - 0x0000476d, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01dfb085, - 0x47204c01, - 0x00003d5b, - 0x00003f23, - 0x4e1ab5f8, - 0x6b314605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6334, - 0x07c00a40, - 0x2001d00c, - 0x6af10380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x490762f1, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x21000296, - 0x00003cdf, - 0x40044040, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597c49, - 0x689b4b09, - 0xff8df7ff, - 0xb510bd10, - 0xff84f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003a39, - 0x40045080, - 0x21000280, - 0x40044000, +CPE_PATCH_TYPE patchImageBle[] = +{ + 0x210004b9, + 0x21000539, + 0x2100047d, + 0x2100058f, + 0x4c17b5f0, + 0x18612140, + 0x280278c8, + 0x4809d005, + 0x60012100, + 0x47884908, + 0x6e25bdf0, + 0x60354e07, + 0x43280760, + 0x68276620, + 0x480e6024, + 0x60274780, + 0xbdf06035, + 0x4004112c, + 0x000065a5, + 0x40044028, + 0x4c07b510, + 0x29007da1, + 0x2101d105, + 0x024875a1, + 0x393e4904, + 0x68204788, + 0xd0002800, + 0xbd104780, + 0x21000254, + 0x0000398b, + 0x4905b510, + 0xb6724a05, + 0x280178c8, + 0x2001dc02, + 0x1d127048, + 0x4710b662, + 0x21000294, + 0x0000476d, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01dfb085, + 0x47204c01, + 0x00003d5b, + 0x00003f23, + 0x4e1ab5f8, + 0x6b314605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6334, + 0x07c00a40, + 0x2001d00c, + 0x6af10380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x490762f1, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x21000296, + 0x00003cdf, + 0x40044040, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597c49, + 0x689b4b09, + 0xff8df7ff, + 0xb510bd10, + 0xff84f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003a39, + 0x40045080, + 0x21000280, + 0x40044000, }; #define _NWORD_PATCHIMAGE_BLE 107 @@ -205,9 +206,9 @@ CPE_PATCH_TYPE patchImageBle[] = { PATCH_FUN_SPEC void enterBleCpePatch(void) { #if (_NWORD_PATCHIMAGE_BLE > 0) - uint32_t *pPatchVec = (uint32_t *) (_BLE_CPERAM_START + _BLE_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_BLE_CPERAM_START + _BLE_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageBle, sizeof(patchImageBle)); + memcpy(pPatchVec, patchImageBle, sizeof(patchImageBle)); #endif } @@ -217,35 +218,35 @@ PATCH_FUN_SPEC void enterBleSysPatch(void) PATCH_FUN_SPEC void configureBlePatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_BLE_CPERAM_START + _BLE_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_BLE_CPERAM_START + _BLE_IRQPATCH_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_BLE_CPERAM_START + _BLE_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_BLE_CPERAM_START + _BLE_IRQPATCH_OFFSET); - pPatchTab[103] = 0; - pPatchTab[60] = 1; - pPatchTab[48] = 2; - pPatchTab[43] = 3; + pPatchTab[103] = 0; + pPatchTab[60] = 1; + pPatchTab[48] = 2; + pPatchTab[43] = 3; - pIrqPatch[1] = _IRQ_PATCH_0; - pIrqPatch[9] = _IRQ_PATCH_1; + pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[9] = _IRQ_PATCH_1; } PATCH_FUN_SPEC void applyBlePatch(void) { - enterBleSysPatch(); - enterBleCpePatch(); - configureBlePatch(); + enterBleSysPatch(); + enterBleCpePatch(); + configureBlePatch(); } PATCH_FUN_SPEC void refreshBlePatch(void) { - enterBleCpePatch(); - configureBlePatch(); + enterBleCpePatch(); + configureBlePatch(); } PATCH_FUN_SPEC void rf_patch_cpe_ble(void) { - applyBlePatch(); + applyBlePatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h index a4a36cff..e1897c93 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ble_priv_1_2.h @@ -70,208 +70,209 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageBlePriv12[] = { - 0x210005e5, - 0x21000631, - 0x210006b1, - 0x21000481, - 0x21000707, - 0x4c17b5f0, - 0x18612140, - 0x280278c8, - 0x4809d005, - 0x60012100, - 0x47884908, - 0x6e25bdf0, - 0x60354e07, - 0x43280760, - 0x68276620, - 0x480e6024, - 0x60274780, - 0xbdf06035, - 0x4004112c, - 0x000065a5, - 0x40044028, - 0x4c07b510, - 0x29007da1, - 0x2101d105, - 0x024875a1, - 0x393e4904, - 0x68204788, - 0xd0002800, - 0xbd104780, - 0x21000254, - 0x0000398b, - 0x4905b510, - 0xb6724a05, - 0x280178c8, - 0x2001dc02, - 0x1d127048, - 0x4710b662, - 0x21000294, - 0x0000476d, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01dfb085, - 0x47204c01, - 0x00003d5b, - 0x00003f23, - 0x4d53b5fe, - 0x462c4628, - 0x90003040, - 0x7e014627, - 0x78383760, - 0xd0022900, - 0xd10707c0, - 0x09c1e050, - 0x07c0d04e, - 0x7d20d14c, - 0xd5490640, - 0x31724629, - 0x20064a48, - 0x98004790, - 0x28007e00, - 0x7d20d007, - 0xd5010640, - 0xe0002003, - 0x26132001, - 0x6f68e008, - 0x28010f80, - 0x2006d002, - 0xe0014606, - 0x26072003, - 0x02312201, - 0x1a890412, - 0x02008a7a, - 0x43020412, - 0x35806f6b, - 0x68a89501, - 0x47a84d37, - 0x2e062201, - 0x2e07d002, - 0xe007d002, - 0xe00543c0, - 0x70797839, - 0x70394311, - 0x61089901, - 0xda012800, - 0x55022039, - 0x7e809800, - 0xd0022800, - 0x201e2106, - 0x6a61e002, - 0x201f1f89, - 0x6ca162a1, - 0x64e04788, - 0xbdfe2000, - 0x47804826, - 0x4822bdfe, - 0x78413060, - 0xd0022900, - 0x21007001, - 0x48217041, - 0x470038b0, - 0x4e1cb5f8, - 0x4635481f, - 0x7fec3540, - 0x09e14637, - 0x6db1d01a, - 0xd0172901, - 0x29007f69, - 0x07a1d002, - 0xe011d502, - 0xd10f07e1, - 0x06497d39, - 0x2103d50c, - 0x77e94321, - 0x6f314780, - 0x29010f89, - 0x2100d002, - 0x76793720, - 0xbdf877ec, - 0xbdf84780, - 0x31404909, - 0x28157508, - 0x281bd008, - 0x281dd008, - 0x490ad008, - 0x18400080, - 0x47706980, - 0x47704808, - 0x47704808, - 0x47704808, - 0x21000144, - 0x0000b8af, - 0x0000a001, - 0x0000be03, - 0x0000b98d, - 0x0000ccc0, - 0x21000599, - 0x21000583, - 0x210004bd, - 0x4e1ab5f8, - 0x6b314605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6334, - 0x07c00a40, - 0x2001d00c, - 0x6af10380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x490762f1, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x21000296, - 0x00003cdf, - 0x40044040, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597c49, - 0x689b4b09, - 0xfed3f7ff, - 0xb510bd10, - 0xfecaf7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003a39, - 0x40045080, - 0x21000280, - 0x40044000, +CPE_PATCH_TYPE patchImageBlePriv12[] = +{ + 0x210005e5, + 0x21000631, + 0x210006b1, + 0x21000481, + 0x21000707, + 0x4c17b5f0, + 0x18612140, + 0x280278c8, + 0x4809d005, + 0x60012100, + 0x47884908, + 0x6e25bdf0, + 0x60354e07, + 0x43280760, + 0x68276620, + 0x480e6024, + 0x60274780, + 0xbdf06035, + 0x4004112c, + 0x000065a5, + 0x40044028, + 0x4c07b510, + 0x29007da1, + 0x2101d105, + 0x024875a1, + 0x393e4904, + 0x68204788, + 0xd0002800, + 0xbd104780, + 0x21000254, + 0x0000398b, + 0x4905b510, + 0xb6724a05, + 0x280178c8, + 0x2001dc02, + 0x1d127048, + 0x4710b662, + 0x21000294, + 0x0000476d, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01dfb085, + 0x47204c01, + 0x00003d5b, + 0x00003f23, + 0x4d53b5fe, + 0x462c4628, + 0x90003040, + 0x7e014627, + 0x78383760, + 0xd0022900, + 0xd10707c0, + 0x09c1e050, + 0x07c0d04e, + 0x7d20d14c, + 0xd5490640, + 0x31724629, + 0x20064a48, + 0x98004790, + 0x28007e00, + 0x7d20d007, + 0xd5010640, + 0xe0002003, + 0x26132001, + 0x6f68e008, + 0x28010f80, + 0x2006d002, + 0xe0014606, + 0x26072003, + 0x02312201, + 0x1a890412, + 0x02008a7a, + 0x43020412, + 0x35806f6b, + 0x68a89501, + 0x47a84d37, + 0x2e062201, + 0x2e07d002, + 0xe007d002, + 0xe00543c0, + 0x70797839, + 0x70394311, + 0x61089901, + 0xda012800, + 0x55022039, + 0x7e809800, + 0xd0022800, + 0x201e2106, + 0x6a61e002, + 0x201f1f89, + 0x6ca162a1, + 0x64e04788, + 0xbdfe2000, + 0x47804826, + 0x4822bdfe, + 0x78413060, + 0xd0022900, + 0x21007001, + 0x48217041, + 0x470038b0, + 0x4e1cb5f8, + 0x4635481f, + 0x7fec3540, + 0x09e14637, + 0x6db1d01a, + 0xd0172901, + 0x29007f69, + 0x07a1d002, + 0xe011d502, + 0xd10f07e1, + 0x06497d39, + 0x2103d50c, + 0x77e94321, + 0x6f314780, + 0x29010f89, + 0x2100d002, + 0x76793720, + 0xbdf877ec, + 0xbdf84780, + 0x31404909, + 0x28157508, + 0x281bd008, + 0x281dd008, + 0x490ad008, + 0x18400080, + 0x47706980, + 0x47704808, + 0x47704808, + 0x47704808, + 0x21000144, + 0x0000b8af, + 0x0000a001, + 0x0000be03, + 0x0000b98d, + 0x0000ccc0, + 0x21000599, + 0x21000583, + 0x210004bd, + 0x4e1ab5f8, + 0x6b314605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6334, + 0x07c00a40, + 0x2001d00c, + 0x6af10380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x490762f1, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x21000296, + 0x00003cdf, + 0x40044040, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597c49, + 0x689b4b09, + 0xfed3f7ff, + 0xb510bd10, + 0xfecaf7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003a39, + 0x40045080, + 0x21000280, + 0x40044000, }; #define _NWORD_PATCHIMAGE_BLE_PRIV_1_2 201 @@ -299,9 +300,9 @@ CPE_PATCH_TYPE patchImageBlePriv12[] = { PATCH_FUN_SPEC void enterBlePriv12CpePatch(void) { #if (_NWORD_PATCHIMAGE_BLE_PRIV_1_2 > 0) - uint32_t *pPatchVec = (uint32_t *) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageBlePriv12, sizeof(patchImageBlePriv12)); + memcpy(pPatchVec, patchImageBlePriv12, sizeof(patchImageBlePriv12)); #endif } @@ -311,36 +312,36 @@ PATCH_FUN_SPEC void enterBlePriv12SysPatch(void) PATCH_FUN_SPEC void configureBlePriv12Patch(void) { - uint8_t *pPatchTab = (uint8_t *) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_IRQPATCH_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_BLE_PRIV_1_2_CPERAM_START + _BLE_PRIV_1_2_IRQPATCH_OFFSET); - pPatchTab[1] = 0; - pPatchTab[103] = 1; - pPatchTab[60] = 2; - pPatchTab[48] = 3; - pPatchTab[43] = 4; + pPatchTab[1] = 0; + pPatchTab[103] = 1; + pPatchTab[60] = 2; + pPatchTab[48] = 3; + pPatchTab[43] = 4; - pIrqPatch[1] = _IRQ_PATCH_0; - pIrqPatch[9] = _IRQ_PATCH_1; + pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[9] = _IRQ_PATCH_1; } PATCH_FUN_SPEC void applyBlePriv12Patch(void) { - enterBlePriv12SysPatch(); - enterBlePriv12CpePatch(); - configureBlePriv12Patch(); + enterBlePriv12SysPatch(); + enterBlePriv12CpePatch(); + configureBlePriv12Patch(); } PATCH_FUN_SPEC void refreshBlePriv12Patch(void) { - enterBlePriv12CpePatch(); - configureBlePriv12Patch(); + enterBlePriv12CpePatch(); + configureBlePriv12Patch(); } PATCH_FUN_SPEC void rf_patch_cpe_ble_priv_1_2(void) { - applyBlePriv12Patch(); + applyBlePriv12Patch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_genfsk.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_genfsk.h index f92413f1..a07b879e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_genfsk.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_genfsk.h @@ -70,105 +70,106 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageGenfsk[] = { - 0x21000495, - 0x21000515, - 0x2100056b, - 0x4c17b5f0, - 0x18612140, - 0x280278c8, - 0x4809d005, - 0x60012100, - 0x47884908, - 0x6e25bdf0, - 0x60354e07, - 0x43280760, - 0x68276620, - 0x480e6024, - 0x60274780, - 0xbdf06035, - 0x4004112c, - 0x000065a5, - 0x40044028, - 0x4c07b510, - 0x29007da1, - 0x2101d105, - 0x024875a1, - 0x393e4904, - 0x68204788, - 0xd0002800, - 0xbd104780, - 0x21000254, - 0x0000398b, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01dfb085, - 0x47204c01, - 0x00003d5b, - 0x00003f23, - 0x4e1ab5f8, - 0x6b314605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6334, - 0x07c00a40, - 0x2001d00c, - 0x6af10380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x490762f1, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x21000296, - 0x00003cdf, - 0x40044040, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597c49, - 0x689b4b09, - 0xff8df7ff, - 0xb510bd10, - 0xff84f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003a39, - 0x40045080, - 0x21000280, - 0x40044000, +CPE_PATCH_TYPE patchImageGenfsk[] = +{ + 0x21000495, + 0x21000515, + 0x2100056b, + 0x4c17b5f0, + 0x18612140, + 0x280278c8, + 0x4809d005, + 0x60012100, + 0x47884908, + 0x6e25bdf0, + 0x60354e07, + 0x43280760, + 0x68276620, + 0x480e6024, + 0x60274780, + 0xbdf06035, + 0x4004112c, + 0x000065a5, + 0x40044028, + 0x4c07b510, + 0x29007da1, + 0x2101d105, + 0x024875a1, + 0x393e4904, + 0x68204788, + 0xd0002800, + 0xbd104780, + 0x21000254, + 0x0000398b, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01dfb085, + 0x47204c01, + 0x00003d5b, + 0x00003f23, + 0x4e1ab5f8, + 0x6b314605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6334, + 0x07c00a40, + 0x2001d00c, + 0x6af10380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x490762f1, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x21000296, + 0x00003cdf, + 0x40044040, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597c49, + 0x689b4b09, + 0xff8df7ff, + 0xb510bd10, + 0xff84f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003a39, + 0x40045080, + 0x21000280, + 0x40044000, }; #define _NWORD_PATCHIMAGE_GENFSK 98 @@ -196,9 +197,9 @@ CPE_PATCH_TYPE patchImageGenfsk[] = { PATCH_FUN_SPEC void enterGenfskCpePatch(void) { #if (_NWORD_PATCHIMAGE_GENFSK > 0) - uint32_t *pPatchVec = (uint32_t *) (_GENFSK_CPERAM_START + _GENFSK_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_GENFSK_CPERAM_START + _GENFSK_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageGenfsk, sizeof(patchImageGenfsk)); + memcpy(pPatchVec, patchImageGenfsk, sizeof(patchImageGenfsk)); #endif } @@ -208,34 +209,34 @@ PATCH_FUN_SPEC void enterGenfskSysPatch(void) PATCH_FUN_SPEC void configureGenfskPatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_GENFSK_CPERAM_START + _GENFSK_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_GENFSK_CPERAM_START + _GENFSK_IRQPATCH_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_GENFSK_CPERAM_START + _GENFSK_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_GENFSK_CPERAM_START + _GENFSK_IRQPATCH_OFFSET); - pPatchTab[103] = 0; - pPatchTab[60] = 1; - pPatchTab[43] = 2; + pPatchTab[103] = 0; + pPatchTab[60] = 1; + pPatchTab[43] = 2; - pIrqPatch[1] = _IRQ_PATCH_0; - pIrqPatch[9] = _IRQ_PATCH_1; + pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[9] = _IRQ_PATCH_1; } PATCH_FUN_SPEC void applyGenfskPatch(void) { - enterGenfskSysPatch(); - enterGenfskCpePatch(); - configureGenfskPatch(); + enterGenfskSysPatch(); + enterGenfskCpePatch(); + configureGenfskPatch(); } PATCH_FUN_SPEC void refreshGenfskPatch(void) { - enterGenfskCpePatch(); - configureGenfskPatch(); + enterGenfskCpePatch(); + configureGenfskPatch(); } PATCH_FUN_SPEC void rf_patch_cpe_genfsk(void) { - applyGenfskPatch(); + applyGenfskPatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ieee.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ieee.h index f134e296..fdf1a22c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ieee.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_cpe_ieee.h @@ -70,146 +70,147 @@ extern "C" #endif -CPE_PATCH_TYPE patchImageIeee[] = { - 0x2100050f, - 0x2100041d, - 0x21000539, - 0x210005b9, - 0x210004b5, - 0x2100060f, - 0x22024823, - 0x421a7dc3, - 0xd0034472, - 0x1dc04678, - 0xb5f84686, - 0x4c1f4710, - 0x200834ae, - 0x490347a0, - 0x60082008, - 0x3cec6008, - 0xbdf847a0, - 0x40045004, - 0x4c17b5f0, - 0x18612140, - 0x280278c8, - 0x4809d005, - 0x60012100, - 0x47884908, - 0x6e25bdf0, - 0x60354e07, - 0x43280760, - 0x68276620, - 0x480e6024, - 0x60274780, - 0xbdf06035, - 0x4004112c, - 0x000065a5, - 0x40044028, - 0x4c07b510, - 0x29007da1, - 0x2101d105, - 0x024875a1, - 0x393e4904, - 0x68204788, - 0xd0002800, - 0xbd104780, - 0x21000254, - 0x0000398b, - 0x6a034807, - 0x46784907, - 0x46861dc0, - 0x4788b5f8, - 0x009b089b, - 0x6a014802, - 0xd10007c9, - 0xbdf86203, - 0x40045040, - 0x0000f1ab, - 0x4605b5ff, - 0x4c03b085, - 0xb5ff4720, - 0x01dfb085, - 0x47204c01, - 0x00003d5b, - 0x00003f23, - 0x6a00480b, - 0xd00407c0, - 0x2201480a, - 0x43117801, - 0x48097001, - 0x72c84700, - 0xd006280d, - 0x00802285, - 0x18800252, - 0x60486840, - 0x48044770, - 0x0000e7fb, - 0x40045040, - 0x21000268, - 0x0000ff39, - 0x210004f9, - 0x4e1ab5f8, - 0x6b314605, - 0x09cc4819, - 0x2d0001e4, - 0x4918d011, - 0x29027809, - 0x7b00d00f, - 0xb6724304, - 0x4f152001, - 0x47b80240, - 0x38204811, - 0x09c18800, - 0xd00407c9, - 0x7ac0e016, - 0x7b40e7f0, - 0x490fe7ee, - 0x61cc6334, - 0x07c00a40, - 0x2001d00c, - 0x6af10380, - 0xd0012d00, - 0xe0004301, - 0x46084381, - 0x490762f1, - 0x63483940, - 0x47b82000, - 0xbdf8b662, - 0x21000280, - 0x21000088, - 0x21000296, - 0x00003cdf, - 0x40044040, - 0x28004907, - 0x2004d000, - 0xb6724a06, - 0x07c97809, - 0x5810d001, - 0x2080e000, - 0xb240b662, - 0x00004770, - 0x2100026b, - 0x40046058, - 0x2041b510, - 0x00c0490e, - 0x490e4788, - 0x6b884602, - 0x24906b49, - 0x04c1014b, - 0x430b0ec9, - 0x4363490a, - 0x43597c49, - 0x689b4b09, - 0xff6df7ff, - 0xb510bd10, - 0xff64f7ff, - 0xd1010004, - 0xffe2f7ff, - 0xbd104620, - 0x00003a39, - 0x40045080, - 0x21000280, - 0x40044000, +CPE_PATCH_TYPE patchImageIeee[] = +{ + 0x2100050f, + 0x2100041d, + 0x21000539, + 0x210005b9, + 0x210004b5, + 0x2100060f, + 0x22024823, + 0x421a7dc3, + 0xd0034472, + 0x1dc04678, + 0xb5f84686, + 0x4c1f4710, + 0x200834ae, + 0x490347a0, + 0x60082008, + 0x3cec6008, + 0xbdf847a0, + 0x40045004, + 0x4c17b5f0, + 0x18612140, + 0x280278c8, + 0x4809d005, + 0x60012100, + 0x47884908, + 0x6e25bdf0, + 0x60354e07, + 0x43280760, + 0x68276620, + 0x480e6024, + 0x60274780, + 0xbdf06035, + 0x4004112c, + 0x000065a5, + 0x40044028, + 0x4c07b510, + 0x29007da1, + 0x2101d105, + 0x024875a1, + 0x393e4904, + 0x68204788, + 0xd0002800, + 0xbd104780, + 0x21000254, + 0x0000398b, + 0x6a034807, + 0x46784907, + 0x46861dc0, + 0x4788b5f8, + 0x009b089b, + 0x6a014802, + 0xd10007c9, + 0xbdf86203, + 0x40045040, + 0x0000f1ab, + 0x4605b5ff, + 0x4c03b085, + 0xb5ff4720, + 0x01dfb085, + 0x47204c01, + 0x00003d5b, + 0x00003f23, + 0x6a00480b, + 0xd00407c0, + 0x2201480a, + 0x43117801, + 0x48097001, + 0x72c84700, + 0xd006280d, + 0x00802285, + 0x18800252, + 0x60486840, + 0x48044770, + 0x0000e7fb, + 0x40045040, + 0x21000268, + 0x0000ff39, + 0x210004f9, + 0x4e1ab5f8, + 0x6b314605, + 0x09cc4819, + 0x2d0001e4, + 0x4918d011, + 0x29027809, + 0x7b00d00f, + 0xb6724304, + 0x4f152001, + 0x47b80240, + 0x38204811, + 0x09c18800, + 0xd00407c9, + 0x7ac0e016, + 0x7b40e7f0, + 0x490fe7ee, + 0x61cc6334, + 0x07c00a40, + 0x2001d00c, + 0x6af10380, + 0xd0012d00, + 0xe0004301, + 0x46084381, + 0x490762f1, + 0x63483940, + 0x47b82000, + 0xbdf8b662, + 0x21000280, + 0x21000088, + 0x21000296, + 0x00003cdf, + 0x40044040, + 0x28004907, + 0x2004d000, + 0xb6724a06, + 0x07c97809, + 0x5810d001, + 0x2080e000, + 0xb240b662, + 0x00004770, + 0x2100026b, + 0x40046058, + 0x2041b510, + 0x00c0490e, + 0x490e4788, + 0x6b884602, + 0x24906b49, + 0x04c1014b, + 0x430b0ec9, + 0x4363490a, + 0x43597c49, + 0x689b4b09, + 0xff6df7ff, + 0xb510bd10, + 0xff64f7ff, + 0xd1010004, + 0xffe2f7ff, + 0xbd104620, + 0x00003a39, + 0x40045080, + 0x21000280, + 0x40044000, }; #define _NWORD_PATCHIMAGE_IEEE 139 @@ -237,9 +238,9 @@ CPE_PATCH_TYPE patchImageIeee[] = { PATCH_FUN_SPEC void enterIeeeCpePatch(void) { #if (_NWORD_PATCHIMAGE_IEEE > 0) - uint32_t *pPatchVec = (uint32_t *) (_IEEE_CPERAM_START + _IEEE_PATCH_VEC_OFFSET); + uint32_t* pPatchVec = (uint32_t*) (_IEEE_CPERAM_START + _IEEE_PATCH_VEC_OFFSET); - memcpy(pPatchVec, patchImageIeee, sizeof(patchImageIeee)); + memcpy(pPatchVec, patchImageIeee, sizeof(patchImageIeee)); #endif } @@ -249,37 +250,37 @@ PATCH_FUN_SPEC void enterIeeeSysPatch(void) PATCH_FUN_SPEC void configureIeeePatch(void) { - uint8_t *pPatchTab = (uint8_t *) (_IEEE_CPERAM_START + _IEEE_PATCH_TAB_OFFSET); - uint32_t *pIrqPatch = (uint32_t *) (_IEEE_CPERAM_START + _IEEE_IRQPATCH_OFFSET); + uint8_t* pPatchTab = (uint8_t*) (_IEEE_CPERAM_START + _IEEE_PATCH_TAB_OFFSET); + uint32_t* pIrqPatch = (uint32_t*) (_IEEE_CPERAM_START + _IEEE_IRQPATCH_OFFSET); - pPatchTab[5] = 0; - pPatchTab[52] = 1; - pPatchTab[103] = 2; - pPatchTab[60] = 3; - pPatchTab[38] = 4; - pPatchTab[43] = 5; + pPatchTab[5] = 0; + pPatchTab[52] = 1; + pPatchTab[103] = 2; + pPatchTab[60] = 3; + pPatchTab[38] = 4; + pPatchTab[43] = 5; - pIrqPatch[1] = _IRQ_PATCH_0; - pIrqPatch[9] = _IRQ_PATCH_1; + pIrqPatch[1] = _IRQ_PATCH_0; + pIrqPatch[9] = _IRQ_PATCH_1; } PATCH_FUN_SPEC void applyIeeePatch(void) { - enterIeeeSysPatch(); - enterIeeeCpePatch(); - configureIeeePatch(); + enterIeeeSysPatch(); + enterIeeeCpePatch(); + configureIeeePatch(); } PATCH_FUN_SPEC void refreshIeeePatch(void) { - enterIeeeCpePatch(); - configureIeeePatch(); + enterIeeeCpePatch(); + configureIeeePatch(); } PATCH_FUN_SPEC void rf_patch_cpe_ieee(void) { - applyIeeePatch(); + applyIeeePatch(); } #undef _IRQ_PATCH_0 diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_genfsk.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_genfsk.h index e9fe2aed..e2e5dd52 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_genfsk.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_genfsk.h @@ -43,524 +43,529 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchGenfskMce[460] = { - 0x2fcf603c, - 0x030c3f9d, - 0x070c680a, - 0x003f0387, - 0x00fffff0, - 0x0000ff00, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00070003, - 0x00003d1f, - 0x04000000, - 0x0000000f, - 0x000b0387, - 0x004340f4, - 0x80828000, - 0x00000670, - 0x0510091e, - 0x00050054, - 0x3e100200, - 0x00000061, - 0x3030002f, - 0x0000027f, - 0x00000000, - 0x0000aa00, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72487220, - 0x7303a32d, - 0x72037305, - 0x73067304, - 0x73767204, - 0xc7c07276, - 0x00018001, - 0x90109001, - 0x90010801, - 0x720d720c, - 0xb0c0720e, - 0xb0f07100, - 0x7218a0c0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x60796c01, - 0x60ec607b, - 0x60796352, - 0x60796079, - 0x6079607a, - 0x60ec607b, - 0x60796352, - 0x60796079, - 0x1210607a, - 0x730f7220, - 0x73117310, - 0x00108181, - 0xb0709180, - 0x606f6051, - 0xc030606f, - 0xc1416791, - 0xc470c282, - 0x6f131820, - 0x16116e23, - 0x68811612, - 0x9ab07830, - 0x9ac07840, - 0x9ad07850, - 0x9ae07860, - 0xc5a0c482, - 0x40961820, - 0x6e231203, - 0x68931612, - 0x8160606f, - 0x81409490, - 0x2a703980, - 0x16111001, - 0x84448432, - 0xc0f5c0f3, - 0x1c01c200, - 0xc10040bb, - 0x40b11c10, - 0x10134cb3, - 0x18301803, - 0x1a101a13, - 0x68ae3912, - 0x13f360bb, - 0x13f360bb, - 0xc1001015, - 0x1a151850, - 0x39141a10, - 0xb0d868b9, - 0xb1087100, - 0xb200a0d8, - 0xb003b480, - 0xb002b013, - 0x7229b012, - 0x7100b0d0, - 0x8140b100, - 0x71009290, - 0x8140b100, - 0x44cb22f0, - 0x1c0313f0, - 0x929340d7, - 0x71009492, - 0x9295b100, - 0x71009494, - 0xb0d0b100, - 0x7000a480, - 0xc030a0d1, - 0xc0409760, - 0xb0f19780, - 0x7100b0c1, - 0xa0c1b0f1, - 0xa0037276, - 0x7000a002, - 0x7310730f, - 0x6791c040, - 0x91c0c100, - 0xb4836497, - 0xb0c3b0f3, - 0xa0c37100, - 0x606f64de, - 0xb016b006, - 0xb014b004, - 0xb012b002, - 0x78728400, - 0x81430420, - 0x2a733983, - 0xc1f29473, - 0x31621832, - 0x31511021, - 0x00200012, - 0x10309400, - 0x10011610, - 0x39303121, - 0x41172210, - 0x31501220, - 0x31801003, - 0x16300010, - 0x12029350, - 0x22731204, - 0x8430412a, - 0x87d297c0, - 0x84501a82, - 0x87d497c0, - 0x612c1a84, - 0x41372263, - 0x97c08440, - 0x1a8087d0, - 0x84601402, - 0x87d097c0, - 0x14041a80, - 0x84406143, - 0x041078a1, - 0x87d297c0, - 0x84601a42, - 0x041078a1, - 0x87d497c0, - 0x31521a44, - 0x39633154, - 0x16130633, - 0x38343832, - 0x39823182, - 0x00423184, - 0x78109572, - 0x90509030, - 0x90407820, - 0xb2059060, - 0x83038ae2, - 0xc00c9302, - 0x8140c00b, - 0x39803180, - 0x81413940, - 0x0431c0f3, - 0x1441c014, - 0x1412c002, - 0x31226965, - 0xc010847d, - 0x312d140d, - 0x8ace142d, - 0x311e318e, - 0x8ac9397e, - 0x39793149, - 0x31293949, - 0xb072109a, - 0xb06ea04e, - 0xb06cb011, - 0x7276978a, - 0xa764b764, - 0x9762c662, - 0x66d3c04f, - 0x22f18ab1, - 0x8ad1458b, - 0x458b22f1, - 0x71006231, - 0xb760b073, - 0x220780b7, - 0xa76045c2, - 0x22f18ab1, - 0x2237419c, - 0xb113419c, - 0x223080b0, - 0x61aa4597, - 0x41af22e1, - 0x22508090, - 0xb0f541af, - 0x22208210, - 0x9789418b, - 0xa764b764, - 0x618bb0f6, - 0xb764978d, - 0xb0f6a764, - 0x8ad0618b, - 0x41bb22f0, - 0x41bb2237, - 0xb113b075, - 0x223080b0, - 0xb08745b5, - 0x22d1618b, - 0x80904316, - 0x43162220, - 0x618b6699, - 0xc7f3978f, - 0x31808410, - 0x31833980, - 0x94100030, - 0xa0e3b087, - 0xa0c2b0f2, - 0xa0c5b0f5, - 0xb0c1b0f1, - 0xb110a0c6, - 0x80b0b113, - 0x45d32200, - 0x45d32230, - 0x12607100, - 0xb0f19780, - 0x8961b88f, - 0x18018570, - 0x8a609551, - 0xa4888a71, - 0xc022a487, - 0x1c211801, - 0x14124df3, - 0x61f449f1, - 0x41f41c01, - 0xb4874df3, - 0xb48861f4, - 0xb061b041, - 0x22e08ad0, - 0x821041fc, - 0x45772220, - 0xb04e7100, - 0x80b1b06e, - 0x468b2201, - 0x468b2231, - 0xb0f67276, - 0x31218471, - 0x1410c260, - 0xc7e09780, - 0xc6f09760, - 0xb0f69760, - 0xa0c1b0c6, - 0x8a63b7b0, - 0x8a838a74, - 0x71008a94, - 0x220180b1, - 0x2231468b, - 0x8ab0468b, - 0x462322c0, - 0x22018991, - 0x81c14177, - 0x91c0c000, - 0x81a28470, - 0x91c16a27, - 0x9070c300, - 0xa0e0b201, - 0xa044a0e3, - 0x71007000, - 0xb760b073, - 0x220780b7, - 0x22374650, - 0xa760466e, - 0x22e18ab1, - 0x80904249, - 0x42492250, - 0x8210b0f5, - 0x42312220, - 0xb764978d, - 0xb0f6a764, - 0x22d16231, - 0x80904316, - 0x43162220, - 0x62316699, - 0xb0f2978f, - 0xb0f5a0c2, - 0xb0f1a0c5, - 0xa0c6b0c1, - 0xb113b110, - 0x220080b0, - 0x22304658, - 0x71004658, - 0x97801260, - 0xb88fb0f1, - 0x85708961, - 0x3d803180, - 0x95511801, - 0x8a718a60, - 0x61e5a182, - 0xb0f2978f, - 0xb0f5a0c2, - 0xb0f1a0c5, - 0xa0c6b0c1, - 0xb113b110, - 0x220080b0, - 0x22304676, - 0x71004676, - 0x97801260, - 0xb88fb0f1, - 0x85708961, - 0x18013d80, - 0x8a809551, - 0xb1828a91, - 0xb07361e5, - 0xb760a760, - 0xb072a7b0, - 0xb06ea04e, - 0x8ab0b011, - 0x45c222f0, - 0x46502201, - 0x8ab0626e, - 0x469f22b0, - 0x46d11e3b, - 0x1e7b62a1, - 0xc00b46d1, - 0x8940b889, - 0x3d803180, - 0x3d301610, - 0x80b0140c, - 0x42ad2200, - 0x8ab37000, - 0x06f33983, - 0xcff08ab1, - 0x30310401, - 0x4ec91c1c, - 0x18101200, - 0x4acb1c0c, - 0x220080b0, - 0x700042be, - 0x161210c2, - 0x8ae13c32, - 0x22108320, - 0x62cf42cd, - 0xb0f29301, - 0x101c7000, - 0x100c62ba, - 0x182162ba, - 0x142162c6, - 0x161b62c6, - 0xb0f662c7, - 0xb110b0f1, - 0xb0f5b113, - 0x720cb0f2, - 0x720e720d, - 0xb0e3b0e0, - 0x22f28ab2, - 0xb0c642e4, - 0x62e7b763, - 0x22f08ad0, - 0xb4054307, - 0xb428a404, - 0xcaa0a429, - 0xcaa13180, - 0x94510001, - 0x8ad39461, - 0x39833183, - 0x31808410, - 0x31833980, - 0x94100030, - 0x31508400, - 0x8ad33950, - 0x06f33983, - 0x1834c1f4, - 0x31343184, - 0x94000040, - 0x22e2b089, - 0x8aca4311, - 0x398a394a, - 0x978a312a, - 0xb0c6b0c5, - 0x8ab2b763, - 0x431522d2, - 0x7000b0c2, - 0xa0e0b20f, - 0x978ea0e3, - 0xa764b764, - 0xb110b0f6, - 0x8210b113, - 0x431f22f0, - 0x8002b0f5, - 0xa006a004, - 0x7203a001, - 0xc0507204, - 0x71006791, - 0xb0f6b764, - 0xa20fb0c5, - 0xb0f57100, - 0x7810a0c5, - 0x90029030, - 0x90407820, - 0xb0729060, - 0x66d3a20f, - 0xa764978a, - 0x6184b0f6, - 0x8180b88c, - 0x392489a4, - 0x00043184, - 0xc0609184, - 0x73766791, - 0x72487276, - 0x72027206, - 0x73057204, - 0x606f7306, - 0x91b01300, - 0xc070b32d, - 0xb0f86791, - 0x120064fa, - 0x97801a10, - 0x9760c380, - 0x9760c280, - 0xb0c6a0c1, - 0x22008090, - 0x81544451, - 0x43621e04, - 0xb0f69784, - 0xd0808552, - 0x67919862, - 0x22118991, - 0x8a824378, - 0xe0908a93, - 0x98739862, - 0x637e6791, - 0x8a738a62, - 0x9862e0a0, - 0x67919873, - 0x87818790, - 0x4b8e1c01, - 0x1ef11801, - 0x87814b8c, - 0x97811af1, - 0xb0f67100, - 0x978116f1, - 0x7100a205, - 0xa0c6b0f6, - 0x98506340, - 0x22008840, - 0xb8304792, - 0x00007000 +MCE_PATCH_TYPE patchGenfskMce[460] = +{ + 0x2fcf603c, + 0x030c3f9d, + 0x070c680a, + 0x003f0387, + 0x00fffff0, + 0x0000ff00, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00070003, + 0x00003d1f, + 0x04000000, + 0x0000000f, + 0x000b0387, + 0x004340f4, + 0x80828000, + 0x00000670, + 0x0510091e, + 0x00050054, + 0x3e100200, + 0x00000061, + 0x3030002f, + 0x0000027f, + 0x00000000, + 0x0000aa00, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72487220, + 0x7303a32d, + 0x72037305, + 0x73067304, + 0x73767204, + 0xc7c07276, + 0x00018001, + 0x90109001, + 0x90010801, + 0x720d720c, + 0xb0c0720e, + 0xb0f07100, + 0x7218a0c0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x60796c01, + 0x60ec607b, + 0x60796352, + 0x60796079, + 0x6079607a, + 0x60ec607b, + 0x60796352, + 0x60796079, + 0x1210607a, + 0x730f7220, + 0x73117310, + 0x00108181, + 0xb0709180, + 0x606f6051, + 0xc030606f, + 0xc1416791, + 0xc470c282, + 0x6f131820, + 0x16116e23, + 0x68811612, + 0x9ab07830, + 0x9ac07840, + 0x9ad07850, + 0x9ae07860, + 0xc5a0c482, + 0x40961820, + 0x6e231203, + 0x68931612, + 0x8160606f, + 0x81409490, + 0x2a703980, + 0x16111001, + 0x84448432, + 0xc0f5c0f3, + 0x1c01c200, + 0xc10040bb, + 0x40b11c10, + 0x10134cb3, + 0x18301803, + 0x1a101a13, + 0x68ae3912, + 0x13f360bb, + 0x13f360bb, + 0xc1001015, + 0x1a151850, + 0x39141a10, + 0xb0d868b9, + 0xb1087100, + 0xb200a0d8, + 0xb003b480, + 0xb002b013, + 0x7229b012, + 0x7100b0d0, + 0x8140b100, + 0x71009290, + 0x8140b100, + 0x44cb22f0, + 0x1c0313f0, + 0x929340d7, + 0x71009492, + 0x9295b100, + 0x71009494, + 0xb0d0b100, + 0x7000a480, + 0xc030a0d1, + 0xc0409760, + 0xb0f19780, + 0x7100b0c1, + 0xa0c1b0f1, + 0xa0037276, + 0x7000a002, + 0x7310730f, + 0x6791c040, + 0x91c0c100, + 0xb4836497, + 0xb0c3b0f3, + 0xa0c37100, + 0x606f64de, + 0xb016b006, + 0xb014b004, + 0xb012b002, + 0x78728400, + 0x81430420, + 0x2a733983, + 0xc1f29473, + 0x31621832, + 0x31511021, + 0x00200012, + 0x10309400, + 0x10011610, + 0x39303121, + 0x41172210, + 0x31501220, + 0x31801003, + 0x16300010, + 0x12029350, + 0x22731204, + 0x8430412a, + 0x87d297c0, + 0x84501a82, + 0x87d497c0, + 0x612c1a84, + 0x41372263, + 0x97c08440, + 0x1a8087d0, + 0x84601402, + 0x87d097c0, + 0x14041a80, + 0x84406143, + 0x041078a1, + 0x87d297c0, + 0x84601a42, + 0x041078a1, + 0x87d497c0, + 0x31521a44, + 0x39633154, + 0x16130633, + 0x38343832, + 0x39823182, + 0x00423184, + 0x78109572, + 0x90509030, + 0x90407820, + 0xb2059060, + 0x83038ae2, + 0xc00c9302, + 0x8140c00b, + 0x39803180, + 0x81413940, + 0x0431c0f3, + 0x1441c014, + 0x1412c002, + 0x31226965, + 0xc010847d, + 0x312d140d, + 0x8ace142d, + 0x311e318e, + 0x8ac9397e, + 0x39793149, + 0x31293949, + 0xb072109a, + 0xb06ea04e, + 0xb06cb011, + 0x7276978a, + 0xa764b764, + 0x9762c662, + 0x66d3c04f, + 0x22f18ab1, + 0x8ad1458b, + 0x458b22f1, + 0x71006231, + 0xb760b073, + 0x220780b7, + 0xa76045c2, + 0x22f18ab1, + 0x2237419c, + 0xb113419c, + 0x223080b0, + 0x61aa4597, + 0x41af22e1, + 0x22508090, + 0xb0f541af, + 0x22208210, + 0x9789418b, + 0xa764b764, + 0x618bb0f6, + 0xb764978d, + 0xb0f6a764, + 0x8ad0618b, + 0x41bb22f0, + 0x41bb2237, + 0xb113b075, + 0x223080b0, + 0xb08745b5, + 0x22d1618b, + 0x80904316, + 0x43162220, + 0x618b6699, + 0xc7f3978f, + 0x31808410, + 0x31833980, + 0x94100030, + 0xa0e3b087, + 0xa0c2b0f2, + 0xa0c5b0f5, + 0xb0c1b0f1, + 0xb110a0c6, + 0x80b0b113, + 0x45d32200, + 0x45d32230, + 0x12607100, + 0xb0f19780, + 0x8961b88f, + 0x18018570, + 0x8a609551, + 0xa4888a71, + 0xc022a487, + 0x1c211801, + 0x14124df3, + 0x61f449f1, + 0x41f41c01, + 0xb4874df3, + 0xb48861f4, + 0xb061b041, + 0x22e08ad0, + 0x821041fc, + 0x45772220, + 0xb04e7100, + 0x80b1b06e, + 0x468b2201, + 0x468b2231, + 0xb0f67276, + 0x31218471, + 0x1410c260, + 0xc7e09780, + 0xc6f09760, + 0xb0f69760, + 0xa0c1b0c6, + 0x8a63b7b0, + 0x8a838a74, + 0x71008a94, + 0x220180b1, + 0x2231468b, + 0x8ab0468b, + 0x462322c0, + 0x22018991, + 0x81c14177, + 0x91c0c000, + 0x81a28470, + 0x91c16a27, + 0x9070c300, + 0xa0e0b201, + 0xa044a0e3, + 0x71007000, + 0xb760b073, + 0x220780b7, + 0x22374650, + 0xa760466e, + 0x22e18ab1, + 0x80904249, + 0x42492250, + 0x8210b0f5, + 0x42312220, + 0xb764978d, + 0xb0f6a764, + 0x22d16231, + 0x80904316, + 0x43162220, + 0x62316699, + 0xb0f2978f, + 0xb0f5a0c2, + 0xb0f1a0c5, + 0xa0c6b0c1, + 0xb113b110, + 0x220080b0, + 0x22304658, + 0x71004658, + 0x97801260, + 0xb88fb0f1, + 0x85708961, + 0x3d803180, + 0x95511801, + 0x8a718a60, + 0x61e5a182, + 0xb0f2978f, + 0xb0f5a0c2, + 0xb0f1a0c5, + 0xa0c6b0c1, + 0xb113b110, + 0x220080b0, + 0x22304676, + 0x71004676, + 0x97801260, + 0xb88fb0f1, + 0x85708961, + 0x18013d80, + 0x8a809551, + 0xb1828a91, + 0xb07361e5, + 0xb760a760, + 0xb072a7b0, + 0xb06ea04e, + 0x8ab0b011, + 0x45c222f0, + 0x46502201, + 0x8ab0626e, + 0x469f22b0, + 0x46d11e3b, + 0x1e7b62a1, + 0xc00b46d1, + 0x8940b889, + 0x3d803180, + 0x3d301610, + 0x80b0140c, + 0x42ad2200, + 0x8ab37000, + 0x06f33983, + 0xcff08ab1, + 0x30310401, + 0x4ec91c1c, + 0x18101200, + 0x4acb1c0c, + 0x220080b0, + 0x700042be, + 0x161210c2, + 0x8ae13c32, + 0x22108320, + 0x62cf42cd, + 0xb0f29301, + 0x101c7000, + 0x100c62ba, + 0x182162ba, + 0x142162c6, + 0x161b62c6, + 0xb0f662c7, + 0xb110b0f1, + 0xb0f5b113, + 0x720cb0f2, + 0x720e720d, + 0xb0e3b0e0, + 0x22f28ab2, + 0xb0c642e4, + 0x62e7b763, + 0x22f08ad0, + 0xb4054307, + 0xb428a404, + 0xcaa0a429, + 0xcaa13180, + 0x94510001, + 0x8ad39461, + 0x39833183, + 0x31808410, + 0x31833980, + 0x94100030, + 0x31508400, + 0x8ad33950, + 0x06f33983, + 0x1834c1f4, + 0x31343184, + 0x94000040, + 0x22e2b089, + 0x8aca4311, + 0x398a394a, + 0x978a312a, + 0xb0c6b0c5, + 0x8ab2b763, + 0x431522d2, + 0x7000b0c2, + 0xa0e0b20f, + 0x978ea0e3, + 0xa764b764, + 0xb110b0f6, + 0x8210b113, + 0x431f22f0, + 0x8002b0f5, + 0xa006a004, + 0x7203a001, + 0xc0507204, + 0x71006791, + 0xb0f6b764, + 0xa20fb0c5, + 0xb0f57100, + 0x7810a0c5, + 0x90029030, + 0x90407820, + 0xb0729060, + 0x66d3a20f, + 0xa764978a, + 0x6184b0f6, + 0x8180b88c, + 0x392489a4, + 0x00043184, + 0xc0609184, + 0x73766791, + 0x72487276, + 0x72027206, + 0x73057204, + 0x606f7306, + 0x91b01300, + 0xc070b32d, + 0xb0f86791, + 0x120064fa, + 0x97801a10, + 0x9760c380, + 0x9760c280, + 0xb0c6a0c1, + 0x22008090, + 0x81544451, + 0x43621e04, + 0xb0f69784, + 0xd0808552, + 0x67919862, + 0x22118991, + 0x8a824378, + 0xe0908a93, + 0x98739862, + 0x637e6791, + 0x8a738a62, + 0x9862e0a0, + 0x67919873, + 0x87818790, + 0x4b8e1c01, + 0x1ef11801, + 0x87814b8c, + 0x97811af1, + 0xb0f67100, + 0x978116f1, + 0x7100a205, + 0xa0c6b0f6, + 0x98506340, + 0x22008840, + 0xb8304792, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_mce_genfsk(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 460; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskMce[i]; - } + uint32_t i; + + for (i = 0; i < 460; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchGenfskMce[i]; + } + #else - const uint32_t *pS = patchGenfskMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 57; + const uint32_t* pS = patchGenfskMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 57; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_ieee_s.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_ieee_s.h index cfce70cd..c2d32cd6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_ieee_s.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_mce_ieee_s.h @@ -43,311 +43,317 @@ #include "../inc/hw_types.h" #ifndef MCE_PATCH_TYPE -#define MCE_PATCH_TYPE static const uint32_t + #define MCE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_MCERAM_BASE -#define RFC_MCERAM_BASE 0x21008000 + #define RFC_MCERAM_BASE 0x21008000 #endif #ifndef MCE_PATCH_MODE -#define MCE_PATCH_MODE 0 + #define MCE_PATCH_MODE 0 #endif -MCE_PATCH_TYPE patchZigbeeXsIsMce[256] = { - 0xf703605f, - 0x70399b3a, - 0x039bb3af, - 0x39b33af7, - 0x9b3aaf70, - 0xb3aff703, - 0x3af77039, - 0xaf70039b, - 0x08fcb9b3, - 0x8fc664c5, - 0xfc644c50, - 0xc64cc508, - 0x64c5508f, - 0x4c5008fc, - 0xc5088fc6, - 0x508ffc64, - 0x0fcfc64c, - 0x7f7f079c, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000003, - 0x0000001f, - 0x80000000, - 0x0004000c, - 0x000114c4, - 0x00000009, - 0x00008000, - 0x002b0670, - 0x0a11121d, - 0x0b600000, - 0x40100000, - 0x00000040, - 0x1e1e0006, - 0x0000001e, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72200000, - 0x720d720c, - 0x7248720e, - 0x7203a32d, - 0x73057204, - 0x73767306, - 0xc7c07276, - 0xb0c09010, - 0xa0c07100, - 0x7218b0f0, - 0x10208132, - 0x06703952, - 0x16300020, - 0x14011101, - 0x609b6c01, - 0x60c860a9, - 0x6147612c, - 0x609b609b, - 0x609b609c, - 0x609b609b, - 0x609b609b, - 0x609b609b, - 0x609b609c, - 0x609b609b, - 0x609b609b, - 0x609b609b, - 0x609b609c, - 0x609b609b, - 0x609b609b, - 0x609b609b, - 0x60a0609c, - 0x60a0664e, - 0x60a11220, - 0x730f1210, - 0x73117310, - 0x00108181, - 0xb0709180, - 0xc301606d, - 0xc420c282, - 0x6f131820, - 0x16116e23, - 0x68ad1612, - 0xc810c482, - 0x40ba1820, - 0x6e231203, - 0x68b71612, - 0x60a072ab, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc1307276, - 0xb0f391c0, - 0xb0d8b108, - 0xb1087100, - 0xb200a0d8, - 0x1e008ab0, - 0xb76040da, - 0xb0f19780, - 0x7100b0c1, - 0xb013b483, - 0xb012b003, - 0xb0f1b002, - 0x7276a0c1, - 0x7100b0c3, - 0xa0c3b0f3, - 0xc0301000, - 0xc0209760, - 0xb0c19780, - 0xb0f17100, - 0x7276a0c1, - 0xa0037248, - 0x7248a002, - 0x73067305, - 0x72767376, - 0x9010c7c0, - 0x000060a0, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc0307276, - 0xb00291b0, - 0xb006b004, - 0x90507a10, - 0x7a209030, - 0x90409060, - 0x94507810, - 0x94607820, - 0xc0f18160, - 0xc0120410, - 0x14023110, - 0x94306f20, - 0x6f201612, - 0x84209440, - 0x84213180, - 0x39813181, - 0x94100010, - 0xb2051200, - 0x31858165, - 0x39853145, - 0x120e3945, - 0x12061217, - 0x940012f0, - 0x9400c190, - 0xb119b011, - 0xa0ecb0e9, - 0x7100b089, - 0xa0e9b119, - 0xb0ecb11c, - 0x7100a404, - 0x659bb11c, - 0x417e1e76, - 0x45471eaf, - 0x1c90c140, - 0x12054d47, - 0x12761202, - 0x9070c300, - 0xc070b200, - 0xc0c065fa, - 0x7a309400, - 0x61859410, - 0x919f1647, - 0x1e008150, - 0x1c704185, - 0x7100498a, - 0x22008090, - 0x61684470, - 0x7276a205, - 0x72047203, - 0x73067305, - 0xa004a002, - 0x7248a006, - 0x73067305, - 0x72767376, - 0x9010c7c0, - 0x120960a0, - 0xc0cc120a, - 0xb88e120d, - 0x1c898928, - 0x1c8a49a6, - 0x61b34dac, - 0x12001089, - 0x100a1880, - 0x61b310db, - 0x1200108a, - 0x10091880, - 0x168b10db, - 0x161d61b3, - 0x41b81e8d, - 0x619f908c, - 0x1e8210bf, - 0x149541c3, - 0x1e821612, - 0x312545c3, - 0x00058180, - 0x1e8b9185, - 0x1a8b49c6, - 0x18b0c070, - 0x11011630, - 0x6c011401, - 0x908c908c, - 0x908c908c, - 0x908c908c, - 0x908c908c, - 0x1000b082, - 0x8923b88e, - 0xb083b083, - 0xb88e1000, - 0x1e8f8924, - 0x1ca349e4, - 0x1ca449e9, - 0x700049eb, - 0x4de91c93, - 0x4deb1c94, - 0x1a1e7000, - 0x161e61ed, - 0xc04061ed, - 0x49f41ce0, - 0x164010e0, - 0x700049f7, - 0xb085c00e, - 0xc00e7000, - 0x7000b084, - 0x88409850, - 0x45fb2200, - 0x7000b830 +MCE_PATCH_TYPE patchZigbeeXsIsMce[256] = +{ + 0xf703605f, + 0x70399b3a, + 0x039bb3af, + 0x39b33af7, + 0x9b3aaf70, + 0xb3aff703, + 0x3af77039, + 0xaf70039b, + 0x08fcb9b3, + 0x8fc664c5, + 0xfc644c50, + 0xc64cc508, + 0x64c5508f, + 0x4c5008fc, + 0xc5088fc6, + 0x508ffc64, + 0x0fcfc64c, + 0x7f7f079c, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000003, + 0x0000001f, + 0x80000000, + 0x0004000c, + 0x000114c4, + 0x00000009, + 0x00008000, + 0x002b0670, + 0x0a11121d, + 0x0b600000, + 0x40100000, + 0x00000040, + 0x1e1e0006, + 0x0000001e, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72200000, + 0x720d720c, + 0x7248720e, + 0x7203a32d, + 0x73057204, + 0x73767306, + 0xc7c07276, + 0xb0c09010, + 0xa0c07100, + 0x7218b0f0, + 0x10208132, + 0x06703952, + 0x16300020, + 0x14011101, + 0x609b6c01, + 0x60c860a9, + 0x6147612c, + 0x609b609b, + 0x609b609c, + 0x609b609b, + 0x609b609b, + 0x609b609b, + 0x609b609c, + 0x609b609b, + 0x609b609b, + 0x609b609b, + 0x609b609c, + 0x609b609b, + 0x609b609b, + 0x609b609b, + 0x60a0609c, + 0x60a0664e, + 0x60a11220, + 0x730f1210, + 0x73117310, + 0x00108181, + 0xb0709180, + 0xc301606d, + 0xc420c282, + 0x6f131820, + 0x16116e23, + 0x68ad1612, + 0xc810c482, + 0x40ba1820, + 0x6e231203, + 0x68b71612, + 0x60a072ab, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc1307276, + 0xb0f391c0, + 0xb0d8b108, + 0xb1087100, + 0xb200a0d8, + 0x1e008ab0, + 0xb76040da, + 0xb0f19780, + 0x7100b0c1, + 0xb013b483, + 0xb012b003, + 0xb0f1b002, + 0x7276a0c1, + 0x7100b0c3, + 0xa0c3b0f3, + 0xc0301000, + 0xc0209760, + 0xb0c19780, + 0xb0f17100, + 0x7276a0c1, + 0xa0037248, + 0x7248a002, + 0x73067305, + 0x72767376, + 0x9010c7c0, + 0x000060a0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc0307276, + 0xb00291b0, + 0xb006b004, + 0x90507a10, + 0x7a209030, + 0x90409060, + 0x94507810, + 0x94607820, + 0xc0f18160, + 0xc0120410, + 0x14023110, + 0x94306f20, + 0x6f201612, + 0x84209440, + 0x84213180, + 0x39813181, + 0x94100010, + 0xb2051200, + 0x31858165, + 0x39853145, + 0x120e3945, + 0x12061217, + 0x940012f0, + 0x9400c190, + 0xb119b011, + 0xa0ecb0e9, + 0x7100b089, + 0xa0e9b119, + 0xb0ecb11c, + 0x7100a404, + 0x659bb11c, + 0x417e1e76, + 0x45471eaf, + 0x1c90c140, + 0x12054d47, + 0x12761202, + 0x9070c300, + 0xc070b200, + 0xc0c065fa, + 0x7a309400, + 0x61859410, + 0x919f1647, + 0x1e008150, + 0x1c704185, + 0x7100498a, + 0x22008090, + 0x61684470, + 0x7276a205, + 0x72047203, + 0x73067305, + 0xa004a002, + 0x7248a006, + 0x73067305, + 0x72767376, + 0x9010c7c0, + 0x120960a0, + 0xc0cc120a, + 0xb88e120d, + 0x1c898928, + 0x1c8a49a6, + 0x61b34dac, + 0x12001089, + 0x100a1880, + 0x61b310db, + 0x1200108a, + 0x10091880, + 0x168b10db, + 0x161d61b3, + 0x41b81e8d, + 0x619f908c, + 0x1e8210bf, + 0x149541c3, + 0x1e821612, + 0x312545c3, + 0x00058180, + 0x1e8b9185, + 0x1a8b49c6, + 0x18b0c070, + 0x11011630, + 0x6c011401, + 0x908c908c, + 0x908c908c, + 0x908c908c, + 0x908c908c, + 0x1000b082, + 0x8923b88e, + 0xb083b083, + 0xb88e1000, + 0x1e8f8924, + 0x1ca349e4, + 0x1ca449e9, + 0x700049eb, + 0x4de91c93, + 0x4deb1c94, + 0x1a1e7000, + 0x161e61ed, + 0xc04061ed, + 0x49f41ce0, + 0x164010e0, + 0x700049f7, + 0xb085c00e, + 0xc00e7000, + 0x7000b084, + 0x88409850, + 0x45fb2200, + 0x7000b830 }; PATCH_FUN_SPEC void rf_patch_mce_ieee_s(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 256; i++) { - HWREG(RFC_MCERAM_BASE + 4 * i) = patchZigbeeXsIsMce[i]; - } + uint32_t i; + + for (i = 0; i < 256; i++) + { + HWREG(RFC_MCERAM_BASE + 4 * i) = patchZigbeeXsIsMce[i]; + } + #else - const uint32_t *pS = patchZigbeeXsIsMce; - volatile unsigned long *pD = &HWREG(RFC_MCERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 32; + const uint32_t* pS = patchZigbeeXsIsMce; + volatile unsigned long* pD = &HWREG(RFC_MCERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 32; + + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ble.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ble.h index 969f21fb..8cf72303 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ble.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ble.h @@ -44,377 +44,382 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchBleRfe[315] = { - 0x00006154, - 0x0002147f, - 0x00050006, - 0x0008000f, - 0x00520048, - 0x003fff80, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x00000000, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x00000000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0x00000007, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x40632241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x686f1614, - 0x10257000, - 0x9100c050, - 0xc140c3f4, - 0x6f031420, - 0x04411031, - 0x22f08250, - 0x26514084, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x64537000, - 0x1031c052, - 0x31610631, - 0x645602c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006456, - 0x9101c051, - 0xc0e2cc01, - 0x64536456, - 0xc0c2c111, - 0xb0546456, - 0xa0547100, - 0x80f0b064, - 0x40b52200, - 0x90b01240, - 0xc2f0b032, - 0xc11168c0, - 0x6456c122, - 0x68c5c0b0, - 0x9101c051, - 0x3182c0e2, - 0x00028260, - 0xb1109132, - 0x39538253, - 0x649d3953, - 0x68d3c050, - 0x12800000, - 0xb03290b0, - 0x64537000, - 0xc122c101, - 0xc1016456, - 0x6456c0c2, - 0x649d8253, - 0x90b012c0, - 0x7000b032, - 0xc2726453, - 0x6456c081, - 0xc111c122, - 0xc0026456, - 0x6456c111, - 0xc331c062, - 0xc3626456, - 0x6456c111, - 0xc111c302, - 0x82536456, - 0x649d3953, - 0x645bc3e2, - 0x40fc2211, - 0xc881c242, - 0xc2526456, - 0x6456c111, - 0xcee1c272, - 0xc2026456, - 0x6456c881, - 0xc801c202, - 0xc0b06456, - 0x70006910, - 0xc2426453, - 0x6456c801, - 0xc011c252, - 0xc2726456, - 0x6456c0e1, - 0xc101c002, - 0xc0626456, - 0x6456c301, - 0xc101c122, - 0xc3626456, - 0x6456c101, - 0xc101c302, - 0x82536456, - 0x7000649d, - 0x3162c102, - 0x80a0c001, - 0x41361e00, - 0x61381a10, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006938, - 0x82d092e0, - 0x453f2200, - 0x7000b2c0, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xb0608081, - 0x8092a050, - 0x92f1eff0, - 0x653e9302, - 0x45782241, - 0xc1f18080, - 0x16300410, - 0x14011101, - 0x618b6c01, - 0x618d618c, - 0x618f618e, - 0x61916190, - 0x61956193, - 0x61996197, - 0x62736270, - 0xc0f28091, - 0x31210421, - 0x2a428082, - 0x16321412, - 0x14211101, - 0x61a66c01, - 0x61ac61c7, - 0x61a66273, - 0x61ac61c7, - 0x619b6273, - 0x619b619b, - 0x619b619b, - 0x64ac619b, - 0x64d9619b, - 0x64e6619b, - 0x6512619b, - 0x652e619b, - 0x8082619b, - 0x92f2dfe0, - 0xb0b0653e, - 0xb0b161a2, - 0x72057306, - 0x6158b030, - 0x653ecfd0, - 0xc003c284, - 0x6468c3c0, - 0x91507890, - 0x31107860, - 0x14107861, - 0x78509200, - 0x78613140, - 0x31400010, - 0x00107871, - 0x78b09210, - 0x78819260, - 0x78309221, - 0x78413140, - 0x92300010, - 0x91f0c010, - 0xa054619b, - 0x225080f0, - 0x804045cf, - 0x46662200, - 0xc80061c7, - 0x81599160, - 0x8091b050, - 0x462e2241, - 0x653ecfc0, - 0x31828212, - 0x39423982, - 0x64771028, - 0x12f18212, - 0x102f0412, - 0x142f311f, - 0x1420c140, - 0x396d6f0d, - 0xc3f410de, - 0xc082044e, - 0x002e3182, - 0xc0a2396d, - 0x002d3182, - 0x398a821a, - 0x31808220, - 0xc00b3980, - 0x78ac180b, - 0x39408230, - 0xc0111002, - 0xc0103001, - 0x18021801, - 0x00213182, - 0x919126c1, - 0xb013b003, - 0xb053b063, - 0x14398203, - 0x22018041, - 0x81b44666, - 0x81d591c4, - 0x1cb51895, - 0x1cc54e1c, - 0x91654a54, - 0x221080f0, - 0x622c420c, - 0xb110913d, - 0xb110913e, - 0x920f9165, - 0x14f98159, - 0x10bc18ab, - 0x225080f0, - 0x221041c7, - 0x620c462c, - 0x653ecfb0, - 0x8230b063, - 0xc0f21000, - 0x10020420, - 0x3001c011, - 0x1801c010, - 0x31821802, - 0x26c10021, - 0x91919191, - 0xb003b013, - 0xb053b063, - 0xb054b064, - 0x80417100, - 0x46662201, - 0xb064b063, - 0x225080f0, - 0x81b141c7, - 0x81d191c1, - 0x91611891, - 0x6244b031, - 0x31828212, - 0x39423982, - 0x64771028, - 0x82058159, - 0x82201459, - 0x180bc00b, - 0xc08078ac, - 0xb0637100, - 0x620c6a62, - 0x81628201, - 0x3d823182, - 0x92f1efa0, - 0x653e9302, - 0x619ba003, - 0x647780a2, - 0xb050619b, - 0x619b7100 +RFE_PATCH_TYPE patchBleRfe[315] = +{ + 0x00006154, + 0x0002147f, + 0x00050006, + 0x0008000f, + 0x00520048, + 0x003fff80, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x00000000, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x00000000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x40632241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x686f1614, + 0x10257000, + 0x9100c050, + 0xc140c3f4, + 0x6f031420, + 0x04411031, + 0x22f08250, + 0x26514084, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x64537000, + 0x1031c052, + 0x31610631, + 0x645602c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006456, + 0x9101c051, + 0xc0e2cc01, + 0x64536456, + 0xc0c2c111, + 0xb0546456, + 0xa0547100, + 0x80f0b064, + 0x40b52200, + 0x90b01240, + 0xc2f0b032, + 0xc11168c0, + 0x6456c122, + 0x68c5c0b0, + 0x9101c051, + 0x3182c0e2, + 0x00028260, + 0xb1109132, + 0x39538253, + 0x649d3953, + 0x68d3c050, + 0x12800000, + 0xb03290b0, + 0x64537000, + 0xc122c101, + 0xc1016456, + 0x6456c0c2, + 0x649d8253, + 0x90b012c0, + 0x7000b032, + 0xc2726453, + 0x6456c081, + 0xc111c122, + 0xc0026456, + 0x6456c111, + 0xc331c062, + 0xc3626456, + 0x6456c111, + 0xc111c302, + 0x82536456, + 0x649d3953, + 0x645bc3e2, + 0x40fc2211, + 0xc881c242, + 0xc2526456, + 0x6456c111, + 0xcee1c272, + 0xc2026456, + 0x6456c881, + 0xc801c202, + 0xc0b06456, + 0x70006910, + 0xc2426453, + 0x6456c801, + 0xc011c252, + 0xc2726456, + 0x6456c0e1, + 0xc101c002, + 0xc0626456, + 0x6456c301, + 0xc101c122, + 0xc3626456, + 0x6456c101, + 0xc101c302, + 0x82536456, + 0x7000649d, + 0x3162c102, + 0x80a0c001, + 0x41361e00, + 0x61381a10, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006938, + 0x82d092e0, + 0x453f2200, + 0x7000b2c0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xb0608081, + 0x8092a050, + 0x92f1eff0, + 0x653e9302, + 0x45782241, + 0xc1f18080, + 0x16300410, + 0x14011101, + 0x618b6c01, + 0x618d618c, + 0x618f618e, + 0x61916190, + 0x61956193, + 0x61996197, + 0x62736270, + 0xc0f28091, + 0x31210421, + 0x2a428082, + 0x16321412, + 0x14211101, + 0x61a66c01, + 0x61ac61c7, + 0x61a66273, + 0x61ac61c7, + 0x619b6273, + 0x619b619b, + 0x619b619b, + 0x64ac619b, + 0x64d9619b, + 0x64e6619b, + 0x6512619b, + 0x652e619b, + 0x8082619b, + 0x92f2dfe0, + 0xb0b0653e, + 0xb0b161a2, + 0x72057306, + 0x6158b030, + 0x653ecfd0, + 0xc003c284, + 0x6468c3c0, + 0x91507890, + 0x31107860, + 0x14107861, + 0x78509200, + 0x78613140, + 0x31400010, + 0x00107871, + 0x78b09210, + 0x78819260, + 0x78309221, + 0x78413140, + 0x92300010, + 0x91f0c010, + 0xa054619b, + 0x225080f0, + 0x804045cf, + 0x46662200, + 0xc80061c7, + 0x81599160, + 0x8091b050, + 0x462e2241, + 0x653ecfc0, + 0x31828212, + 0x39423982, + 0x64771028, + 0x12f18212, + 0x102f0412, + 0x142f311f, + 0x1420c140, + 0x396d6f0d, + 0xc3f410de, + 0xc082044e, + 0x002e3182, + 0xc0a2396d, + 0x002d3182, + 0x398a821a, + 0x31808220, + 0xc00b3980, + 0x78ac180b, + 0x39408230, + 0xc0111002, + 0xc0103001, + 0x18021801, + 0x00213182, + 0x919126c1, + 0xb013b003, + 0xb053b063, + 0x14398203, + 0x22018041, + 0x81b44666, + 0x81d591c4, + 0x1cb51895, + 0x1cc54e1c, + 0x91654a54, + 0x221080f0, + 0x622c420c, + 0xb110913d, + 0xb110913e, + 0x920f9165, + 0x14f98159, + 0x10bc18ab, + 0x225080f0, + 0x221041c7, + 0x620c462c, + 0x653ecfb0, + 0x8230b063, + 0xc0f21000, + 0x10020420, + 0x3001c011, + 0x1801c010, + 0x31821802, + 0x26c10021, + 0x91919191, + 0xb003b013, + 0xb053b063, + 0xb054b064, + 0x80417100, + 0x46662201, + 0xb064b063, + 0x225080f0, + 0x81b141c7, + 0x81d191c1, + 0x91611891, + 0x6244b031, + 0x31828212, + 0x39423982, + 0x64771028, + 0x82058159, + 0x82201459, + 0x180bc00b, + 0xc08078ac, + 0xb0637100, + 0x620c6a62, + 0x81628201, + 0x3d823182, + 0x92f1efa0, + 0x653e9302, + 0x619ba003, + 0x647780a2, + 0xb050619b, + 0x619b7100 }; PATCH_FUN_SPEC void rf_patch_rfe_ble(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 315; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchBleRfe[i]; - } + uint32_t i; + + for (i = 0; i < 315; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchBleRfe[i]; + } + #else - const uint32_t *pS = patchBleRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 39; + const uint32_t* pS = patchBleRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 39; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_genfsk.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_genfsk.h index 350b3ae7..ff6ed56d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_genfsk.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_genfsk.h @@ -44,501 +44,506 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchGenfskRfe[431] = { - 0x000061a9, - 0x1307147f, - 0x00080053, - 0x1f2e24f1, - 0x0ab03f13, - 0xff07003f, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x0008000f, - 0x003f0000, - 0x00400000, - 0x0000003f, - 0x00680004, - 0x00dc000e, - 0x00430006, - 0x0005001a, - 0x00000000, - 0x00000002, - 0x0000003f, - 0x00040000, - 0x000000c0, - 0x00c00004, - 0x00070000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x404f2241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x685b1614, - 0x10257000, - 0x9100c050, - 0xc0c0c3f4, - 0x6f031420, - 0x04411031, - 0x22f08250, - 0x26514070, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x643f7000, - 0x1031c052, - 0x31610631, - 0x644202c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006442, - 0x659d658e, - 0x8220c088, - 0x39803950, - 0x40a31e00, - 0x3001c041, - 0x1a181418, - 0x8230c089, - 0x39803960, - 0x40ad1e00, - 0x3001c041, - 0x1a191419, - 0x9136643c, - 0x9134b110, - 0xb054b110, - 0xa0547100, - 0x80f0b064, - 0x40b32200, - 0x90b01240, - 0x8253b032, - 0x39533953, - 0x643f6489, - 0xc122c111, - 0xc1706442, - 0xc11168c6, - 0x6442c0c2, - 0x68cbc170, - 0x9100c050, - 0x92987227, - 0x16141615, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0xb270b051, - 0x72276576, - 0xb2709299, - 0x10731062, - 0x8231c3f0, - 0x39213121, - 0x101b3981, - 0xc0e26576, - 0x82603182, - 0x39803180, - 0xb0610002, - 0x91327100, - 0xa051b110, - 0x7227b061, - 0x68f7c230, - 0x12800000, - 0xb03290b0, - 0xc0507000, - 0x72279100, - 0x10629299, - 0xc3f01073, - 0x31218231, - 0x39813921, - 0xb270b051, - 0x72276582, - 0xb2709298, - 0x10531042, - 0x8221c1f0, - 0x39313131, - 0x31313981, - 0x6582101a, - 0xb061a051, - 0xc0b07227, - 0x643f691c, - 0xc122c101, - 0xc1016442, - 0x6442c0c2, - 0x643c1a15, - 0xb1109135, - 0x64898253, - 0x90b012c0, - 0x7000b032, - 0xc272643f, - 0x6442c081, - 0xc111c122, - 0xc0026442, - 0x6442c111, - 0xc331c062, - 0xc3626442, - 0x6442c111, - 0xc111c302, - 0x82536442, - 0x64893953, - 0x6447c3e2, - 0x41442211, - 0xc881c242, - 0xc2526442, - 0x6442c111, - 0xcee1c272, - 0xc2026442, - 0x6442c881, - 0xc801c202, - 0xc0b06442, - 0x70006958, - 0xc242643f, - 0x6442c801, - 0xc011c252, - 0xc2726442, - 0x6442c0e1, - 0xc101c002, - 0xc0626442, - 0x6442c301, - 0xc101c122, - 0xc3626442, - 0x6442c101, - 0xc101c302, - 0x82536442, - 0x70006489, - 0x7100b061, - 0x1c231412, - 0x91334d7e, - 0x7000b110, - 0xb1109132, - 0x70006976, - 0x7100b061, - 0x1c321813, - 0x9132498a, - 0x7000b110, - 0xb1109133, - 0x70006982, - 0x6447c0c2, - 0xc0c21015, - 0x64471612, - 0x14153141, - 0x3180c0c0, - 0x10541405, - 0x040478b0, - 0xc0e67000, - 0x82613186, - 0x0401cc00, - 0x10671416, - 0xc3f08261, - 0x14170401, - 0x73067000, - 0x720b7205, - 0xb050720e, - 0x80817100, - 0xa050b060, - 0x22418092, - 0x808045c9, - 0x0410c1f1, - 0x11011630, - 0x6c011401, - 0x61dd61dc, - 0x61df61de, - 0x61e161e0, - 0x61e461e2, - 0x61e861e6, - 0x633961ea, - 0x8091633c, - 0x0421c0f2, - 0x80823121, - 0x14122a42, - 0x11011632, - 0x6c011421, - 0x621161f3, - 0x633c61f9, - 0x621161f3, - 0x633c61f9, - 0x61eb61eb, - 0x61eb61eb, - 0x61eb61eb, - 0x61eb6498, - 0x61eb64fd, - 0x61eb652e, - 0x61eb655a, - 0x121061eb, - 0x720e90b0, - 0x72057306, - 0x90301210, - 0xcff061ad, - 0xc1d4673f, - 0xc3c0c003, - 0x78406454, - 0x78609150, - 0x78709210, - 0x78809220, - 0x78909230, - 0x78a09240, - 0x78509260, - 0x783091f0, - 0x82109190, - 0x06f03940, - 0x31101001, - 0x92001410, - 0xa0bc61eb, - 0xa054a0e2, - 0x225080f0, - 0x8040461b, - 0x472e2200, - 0xa0406213, - 0x318d822d, - 0x8210398d, - 0x0410c0f1, - 0x821a1009, - 0x041a394a, - 0x39808210, - 0x100e0410, - 0x10bc10ab, - 0x646310c2, - 0xcfe07229, - 0xb013673f, - 0x66cdb003, - 0xb050b053, - 0xb064b054, - 0x66abb013, - 0x22e08210, - 0x66b4463e, - 0x80417100, - 0x472e2201, - 0x221080f0, - 0x22f04651, - 0xb064471b, - 0x423e2231, - 0x66d3b063, - 0x22e08210, - 0x6676463e, - 0xb064623e, - 0x318f816f, - 0xdfd03d8f, - 0x673f92ff, - 0x80417100, - 0x472e2201, - 0x80f0b064, - 0x426b2250, - 0x8211b063, - 0x466622c1, - 0x670866d3, - 0x22d18211, - 0x66764658, - 0x81616258, - 0x31818172, - 0x31823d81, - 0xefc03d82, - 0x930292f1, - 0x6211673f, - 0x91c081b0, - 0x829781d3, - 0x18d3a290, - 0x0bf34e85, - 0x1ce31613, - 0x91c34aaa, - 0x143b81e3, - 0x1cba6296, - 0x1e234691, - 0x1ce34a91, - 0xb2904e91, - 0x42912207, - 0x1a1ba290, - 0x1ce3629c, - 0x91c34aaa, - 0x183b81e3, - 0x4ea61cab, - 0x4aa81c9b, - 0x42aa1cbc, - 0x821010b2, - 0x42a322d0, - 0x221080f0, - 0x646346aa, - 0x62aa66ab, - 0x629a10ab, - 0x629a109b, - 0x82307000, - 0x0410c0f1, - 0x7100b063, - 0x10bc6aae, - 0x7000b0e0, - 0x91c281b2, - 0x820181d2, - 0x81511812, - 0x82411812, - 0x3d813181, - 0x4ac41c12, - 0xb032b0e2, - 0x673fcfb0, - 0x1421c7f1, - 0xc8124ec8, - 0x91729162, - 0xb0e1b031, - 0x12087000, - 0xc800c006, - 0x91709160, - 0x82017000, - 0x91c081b0, - 0x181081d0, - 0x18108151, - 0x80e11406, - 0x31828242, - 0x1c203d82, - 0xb0e24ae7, - 0x46eb2221, - 0xcfa0b032, - 0x2221673f, - 0xa0e242eb, - 0x8231b032, - 0xc0f03941, - 0x1e010401, - 0x161842f9, - 0x3010c010, - 0x47071c08, - 0x3c101060, - 0xc7f11006, - 0x4efd1461, - 0x9166c816, - 0x31818171, - 0x1c163d81, - 0x91764b04, - 0xc006b031, - 0x70001208, - 0x31818161, - 0x82403d81, - 0x18013980, - 0x4b1a1cf1, - 0x80b01401, - 0x471a22c0, - 0xb033b0bc, - 0x92f1ef90, - 0x673f930f, - 0xa0037000, - 0xb064b063, - 0x655ab0ef, - 0x80407100, - 0x472e2200, - 0x652eb064, - 0x7100a0ef, - 0x22008040, - 0xb064472e, - 0x623eb003, - 0x81628201, - 0x3d823182, - 0x92f1ef80, - 0x673f9302, - 0x655aa003, - 0x80a261eb, - 0x61eb6463, - 0x7100b050, - 0x92e061eb, - 0x220082d0, - 0xb2c04740, - 0x80a07000, - 0x435c22f0, - 0xc102b030, - 0xc0013162, - 0x1e0080a0, - 0x22f04355, - 0xf5d04356, - 0x39603160, - 0x10206356, - 0x6f131a10, - 0x16116e23, - 0x6b571612, - 0x00007000 +RFE_PATCH_TYPE patchGenfskRfe[431] = +{ + 0x000061a9, + 0x1307147f, + 0x00080053, + 0x1f2e24f1, + 0x0ab03f13, + 0xff07003f, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x0008000f, + 0x003f0000, + 0x00400000, + 0x0000003f, + 0x00680004, + 0x00dc000e, + 0x00430006, + 0x0005001a, + 0x00000000, + 0x00000002, + 0x0000003f, + 0x00040000, + 0x000000c0, + 0x00c00004, + 0x00070000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x404f2241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x685b1614, + 0x10257000, + 0x9100c050, + 0xc0c0c3f4, + 0x6f031420, + 0x04411031, + 0x22f08250, + 0x26514070, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x643f7000, + 0x1031c052, + 0x31610631, + 0x644202c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006442, + 0x659d658e, + 0x8220c088, + 0x39803950, + 0x40a31e00, + 0x3001c041, + 0x1a181418, + 0x8230c089, + 0x39803960, + 0x40ad1e00, + 0x3001c041, + 0x1a191419, + 0x9136643c, + 0x9134b110, + 0xb054b110, + 0xa0547100, + 0x80f0b064, + 0x40b32200, + 0x90b01240, + 0x8253b032, + 0x39533953, + 0x643f6489, + 0xc122c111, + 0xc1706442, + 0xc11168c6, + 0x6442c0c2, + 0x68cbc170, + 0x9100c050, + 0x92987227, + 0x16141615, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0xb270b051, + 0x72276576, + 0xb2709299, + 0x10731062, + 0x8231c3f0, + 0x39213121, + 0x101b3981, + 0xc0e26576, + 0x82603182, + 0x39803180, + 0xb0610002, + 0x91327100, + 0xa051b110, + 0x7227b061, + 0x68f7c230, + 0x12800000, + 0xb03290b0, + 0xc0507000, + 0x72279100, + 0x10629299, + 0xc3f01073, + 0x31218231, + 0x39813921, + 0xb270b051, + 0x72276582, + 0xb2709298, + 0x10531042, + 0x8221c1f0, + 0x39313131, + 0x31313981, + 0x6582101a, + 0xb061a051, + 0xc0b07227, + 0x643f691c, + 0xc122c101, + 0xc1016442, + 0x6442c0c2, + 0x643c1a15, + 0xb1109135, + 0x64898253, + 0x90b012c0, + 0x7000b032, + 0xc272643f, + 0x6442c081, + 0xc111c122, + 0xc0026442, + 0x6442c111, + 0xc331c062, + 0xc3626442, + 0x6442c111, + 0xc111c302, + 0x82536442, + 0x64893953, + 0x6447c3e2, + 0x41442211, + 0xc881c242, + 0xc2526442, + 0x6442c111, + 0xcee1c272, + 0xc2026442, + 0x6442c881, + 0xc801c202, + 0xc0b06442, + 0x70006958, + 0xc242643f, + 0x6442c801, + 0xc011c252, + 0xc2726442, + 0x6442c0e1, + 0xc101c002, + 0xc0626442, + 0x6442c301, + 0xc101c122, + 0xc3626442, + 0x6442c101, + 0xc101c302, + 0x82536442, + 0x70006489, + 0x7100b061, + 0x1c231412, + 0x91334d7e, + 0x7000b110, + 0xb1109132, + 0x70006976, + 0x7100b061, + 0x1c321813, + 0x9132498a, + 0x7000b110, + 0xb1109133, + 0x70006982, + 0x6447c0c2, + 0xc0c21015, + 0x64471612, + 0x14153141, + 0x3180c0c0, + 0x10541405, + 0x040478b0, + 0xc0e67000, + 0x82613186, + 0x0401cc00, + 0x10671416, + 0xc3f08261, + 0x14170401, + 0x73067000, + 0x720b7205, + 0xb050720e, + 0x80817100, + 0xa050b060, + 0x22418092, + 0x808045c9, + 0x0410c1f1, + 0x11011630, + 0x6c011401, + 0x61dd61dc, + 0x61df61de, + 0x61e161e0, + 0x61e461e2, + 0x61e861e6, + 0x633961ea, + 0x8091633c, + 0x0421c0f2, + 0x80823121, + 0x14122a42, + 0x11011632, + 0x6c011421, + 0x621161f3, + 0x633c61f9, + 0x621161f3, + 0x633c61f9, + 0x61eb61eb, + 0x61eb61eb, + 0x61eb61eb, + 0x61eb6498, + 0x61eb64fd, + 0x61eb652e, + 0x61eb655a, + 0x121061eb, + 0x720e90b0, + 0x72057306, + 0x90301210, + 0xcff061ad, + 0xc1d4673f, + 0xc3c0c003, + 0x78406454, + 0x78609150, + 0x78709210, + 0x78809220, + 0x78909230, + 0x78a09240, + 0x78509260, + 0x783091f0, + 0x82109190, + 0x06f03940, + 0x31101001, + 0x92001410, + 0xa0bc61eb, + 0xa054a0e2, + 0x225080f0, + 0x8040461b, + 0x472e2200, + 0xa0406213, + 0x318d822d, + 0x8210398d, + 0x0410c0f1, + 0x821a1009, + 0x041a394a, + 0x39808210, + 0x100e0410, + 0x10bc10ab, + 0x646310c2, + 0xcfe07229, + 0xb013673f, + 0x66cdb003, + 0xb050b053, + 0xb064b054, + 0x66abb013, + 0x22e08210, + 0x66b4463e, + 0x80417100, + 0x472e2201, + 0x221080f0, + 0x22f04651, + 0xb064471b, + 0x423e2231, + 0x66d3b063, + 0x22e08210, + 0x6676463e, + 0xb064623e, + 0x318f816f, + 0xdfd03d8f, + 0x673f92ff, + 0x80417100, + 0x472e2201, + 0x80f0b064, + 0x426b2250, + 0x8211b063, + 0x466622c1, + 0x670866d3, + 0x22d18211, + 0x66764658, + 0x81616258, + 0x31818172, + 0x31823d81, + 0xefc03d82, + 0x930292f1, + 0x6211673f, + 0x91c081b0, + 0x829781d3, + 0x18d3a290, + 0x0bf34e85, + 0x1ce31613, + 0x91c34aaa, + 0x143b81e3, + 0x1cba6296, + 0x1e234691, + 0x1ce34a91, + 0xb2904e91, + 0x42912207, + 0x1a1ba290, + 0x1ce3629c, + 0x91c34aaa, + 0x183b81e3, + 0x4ea61cab, + 0x4aa81c9b, + 0x42aa1cbc, + 0x821010b2, + 0x42a322d0, + 0x221080f0, + 0x646346aa, + 0x62aa66ab, + 0x629a10ab, + 0x629a109b, + 0x82307000, + 0x0410c0f1, + 0x7100b063, + 0x10bc6aae, + 0x7000b0e0, + 0x91c281b2, + 0x820181d2, + 0x81511812, + 0x82411812, + 0x3d813181, + 0x4ac41c12, + 0xb032b0e2, + 0x673fcfb0, + 0x1421c7f1, + 0xc8124ec8, + 0x91729162, + 0xb0e1b031, + 0x12087000, + 0xc800c006, + 0x91709160, + 0x82017000, + 0x91c081b0, + 0x181081d0, + 0x18108151, + 0x80e11406, + 0x31828242, + 0x1c203d82, + 0xb0e24ae7, + 0x46eb2221, + 0xcfa0b032, + 0x2221673f, + 0xa0e242eb, + 0x8231b032, + 0xc0f03941, + 0x1e010401, + 0x161842f9, + 0x3010c010, + 0x47071c08, + 0x3c101060, + 0xc7f11006, + 0x4efd1461, + 0x9166c816, + 0x31818171, + 0x1c163d81, + 0x91764b04, + 0xc006b031, + 0x70001208, + 0x31818161, + 0x82403d81, + 0x18013980, + 0x4b1a1cf1, + 0x80b01401, + 0x471a22c0, + 0xb033b0bc, + 0x92f1ef90, + 0x673f930f, + 0xa0037000, + 0xb064b063, + 0x655ab0ef, + 0x80407100, + 0x472e2200, + 0x652eb064, + 0x7100a0ef, + 0x22008040, + 0xb064472e, + 0x623eb003, + 0x81628201, + 0x3d823182, + 0x92f1ef80, + 0x673f9302, + 0x655aa003, + 0x80a261eb, + 0x61eb6463, + 0x7100b050, + 0x92e061eb, + 0x220082d0, + 0xb2c04740, + 0x80a07000, + 0x435c22f0, + 0xc102b030, + 0xc0013162, + 0x1e0080a0, + 0x22f04355, + 0xf5d04356, + 0x39603160, + 0x10206356, + 0x6f131a10, + 0x16116e23, + 0x6b571612, + 0x00007000 }; PATCH_FUN_SPEC void rf_patch_rfe_genfsk(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 431; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskRfe[i]; - } + uint32_t i; + + for (i = 0; i < 431; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskRfe[i]; + } + #else - const uint32_t *pS = patchGenfskRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 53; + const uint32_t* pS = patchGenfskRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 53; - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee.h index b8637b74..21381f51 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee.h @@ -44,359 +44,365 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchZigbeeXsIsRfe[304] = { - 0x00006154, - 0x07f7177f, - 0x004507ff, - 0x0000000f, - 0x002e0004, - 0x0000003f, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x00000000, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x00000000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0x00000007, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x40632241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x686f1614, - 0x10257000, - 0x9100c050, - 0xc140c3f4, - 0x6f031420, - 0x04411031, - 0x22f08250, - 0x26514084, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x64537000, - 0x1031c052, - 0x31610631, - 0x645602c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006456, - 0x9101c051, - 0xc0e2cc01, - 0x64536456, - 0xc0c2c111, - 0xb0546456, - 0xa0547100, - 0x80f0b064, - 0x40b52200, - 0xc122c111, - 0xc0516456, - 0xc0e29101, - 0x82603182, - 0x91320002, - 0xc300b110, - 0x645368c8, - 0x90b01240, - 0xc300b032, - 0xc24068ce, - 0x128068d0, - 0xb03290b0, - 0x64537000, - 0xc122c101, - 0xc1016456, - 0x6456c0c2, - 0x649d8253, - 0x90b012c0, - 0x7000b032, - 0xc2726453, - 0x6456c081, - 0xc111c122, - 0xc0026456, - 0x6456c111, - 0xc331c062, - 0xc3626456, - 0x6456c111, - 0xc111c302, - 0x82536456, - 0x649d3953, - 0x645bc3e2, - 0x40f82211, - 0xc881c242, - 0xc2526456, - 0x6456c111, - 0xcee1c272, - 0xc2026456, - 0x6456c881, - 0xc801c202, - 0xc0b06456, - 0x7000690c, - 0xc2426453, - 0x6456c801, - 0xc011c252, - 0xc2726456, - 0x6456c0e1, - 0xc101c002, - 0xc0626456, - 0x6456c301, - 0xc101c122, - 0xc3626456, - 0x6456c101, - 0xc101c302, - 0x82536456, - 0x7000649d, - 0x3162c102, - 0x80a0c001, - 0x41321e00, - 0x61341a10, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006934, - 0x82d092e0, - 0x453b2200, - 0x7000b2c0, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xb0608081, - 0x8092a050, - 0x92f1ef90, - 0x653a9302, - 0x45782241, - 0xc1f18080, - 0x16300410, - 0x14011101, - 0x61896c01, - 0x618b618a, - 0x618d618c, - 0x618f618e, - 0x61936191, - 0x61976195, - 0x625d625a, - 0x31218091, - 0x2a428082, - 0x16321412, - 0x14211101, - 0x61a76c01, - 0x61ad61c1, - 0x61a7625d, - 0x61ad61c1, - 0x6199625d, - 0x61996199, - 0x61996199, - 0x64ac6199, - 0x64d56199, - 0x64e26199, - 0x650e6199, - 0x652a6199, - 0x80826199, - 0x92f2df80, - 0x1210653a, - 0x61a290b0, - 0x90b01220, - 0x72057306, - 0x90301210, - 0xcf706158, - 0xc284653a, - 0xc3c0c003, - 0x78506468, - 0x78609150, - 0x78613110, - 0x92001410, - 0x31407880, - 0x00107861, - 0x78713140, - 0x92100010, - 0x92207890, - 0x926078a0, - 0xa0546199, - 0x225080f0, - 0x804045c9, - 0x46502200, - 0xcf6061c1, - 0x821e653a, - 0x06f910e9, - 0x10ea394e, - 0x10ac06fa, - 0x06fe394e, - 0x647710c2, - 0x10cb822d, - 0x91907820, - 0xb013661b, - 0xb063b053, - 0xb054b050, - 0xb003b064, - 0x225080f0, - 0x710041c1, - 0x22018041, - 0x22414650, - 0xb06441ec, - 0x81b0b063, - 0x81df91c0, - 0x220080f0, - 0x8090464e, - 0x464e2240, - 0x18d310f3, - 0x0bf34e01, - 0x1ce31613, - 0x91c34a4e, - 0x143b81e3, - 0x1ce36206, - 0x91c34a4e, - 0x183b81e3, - 0x4e171cab, - 0x4a191c9b, - 0x424e1cbc, - 0x10b210bc, - 0x662b6477, - 0xb063662b, - 0xb0637100, - 0xb0637100, - 0x10ab61e2, - 0x109b620a, - 0x7837620a, - 0x18707840, - 0xc0011a10, - 0x16176e71, - 0x78376a20, - 0xc0061208, - 0x9160c800, - 0x10007000, - 0x10f01000, - 0x18108201, - 0x6d716d71, - 0x14061816, - 0x16176e70, - 0x1c177841, - 0x78374638, - 0x1e881618, - 0x1060464b, - 0x81513d30, - 0x80f11810, - 0x41c12251, - 0x81719160, - 0x3d813181, - 0x4a491c10, - 0xb0319170, - 0x70001278, - 0x10001000, - 0x61e2662b, - 0x81628201, - 0x3d823182, - 0x92f1ef50, - 0x653a9302, - 0x6199a003, - 0x647780a2, - 0xb0506199, - 0x61997100 +RFE_PATCH_TYPE patchZigbeeXsIsRfe[304] = +{ + 0x00006154, + 0x07f7177f, + 0x004507ff, + 0x0000000f, + 0x002e0004, + 0x0000003f, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x00000000, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x00000000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x40632241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x686f1614, + 0x10257000, + 0x9100c050, + 0xc140c3f4, + 0x6f031420, + 0x04411031, + 0x22f08250, + 0x26514084, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x64537000, + 0x1031c052, + 0x31610631, + 0x645602c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006456, + 0x9101c051, + 0xc0e2cc01, + 0x64536456, + 0xc0c2c111, + 0xb0546456, + 0xa0547100, + 0x80f0b064, + 0x40b52200, + 0xc122c111, + 0xc0516456, + 0xc0e29101, + 0x82603182, + 0x91320002, + 0xc300b110, + 0x645368c8, + 0x90b01240, + 0xc300b032, + 0xc24068ce, + 0x128068d0, + 0xb03290b0, + 0x64537000, + 0xc122c101, + 0xc1016456, + 0x6456c0c2, + 0x649d8253, + 0x90b012c0, + 0x7000b032, + 0xc2726453, + 0x6456c081, + 0xc111c122, + 0xc0026456, + 0x6456c111, + 0xc331c062, + 0xc3626456, + 0x6456c111, + 0xc111c302, + 0x82536456, + 0x649d3953, + 0x645bc3e2, + 0x40f82211, + 0xc881c242, + 0xc2526456, + 0x6456c111, + 0xcee1c272, + 0xc2026456, + 0x6456c881, + 0xc801c202, + 0xc0b06456, + 0x7000690c, + 0xc2426453, + 0x6456c801, + 0xc011c252, + 0xc2726456, + 0x6456c0e1, + 0xc101c002, + 0xc0626456, + 0x6456c301, + 0xc101c122, + 0xc3626456, + 0x6456c101, + 0xc101c302, + 0x82536456, + 0x7000649d, + 0x3162c102, + 0x80a0c001, + 0x41321e00, + 0x61341a10, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006934, + 0x82d092e0, + 0x453b2200, + 0x7000b2c0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xb0608081, + 0x8092a050, + 0x92f1ef90, + 0x653a9302, + 0x45782241, + 0xc1f18080, + 0x16300410, + 0x14011101, + 0x61896c01, + 0x618b618a, + 0x618d618c, + 0x618f618e, + 0x61936191, + 0x61976195, + 0x625d625a, + 0x31218091, + 0x2a428082, + 0x16321412, + 0x14211101, + 0x61a76c01, + 0x61ad61c1, + 0x61a7625d, + 0x61ad61c1, + 0x6199625d, + 0x61996199, + 0x61996199, + 0x64ac6199, + 0x64d56199, + 0x64e26199, + 0x650e6199, + 0x652a6199, + 0x80826199, + 0x92f2df80, + 0x1210653a, + 0x61a290b0, + 0x90b01220, + 0x72057306, + 0x90301210, + 0xcf706158, + 0xc284653a, + 0xc3c0c003, + 0x78506468, + 0x78609150, + 0x78613110, + 0x92001410, + 0x31407880, + 0x00107861, + 0x78713140, + 0x92100010, + 0x92207890, + 0x926078a0, + 0xa0546199, + 0x225080f0, + 0x804045c9, + 0x46502200, + 0xcf6061c1, + 0x821e653a, + 0x06f910e9, + 0x10ea394e, + 0x10ac06fa, + 0x06fe394e, + 0x647710c2, + 0x10cb822d, + 0x91907820, + 0xb013661b, + 0xb063b053, + 0xb054b050, + 0xb003b064, + 0x225080f0, + 0x710041c1, + 0x22018041, + 0x22414650, + 0xb06441ec, + 0x81b0b063, + 0x81df91c0, + 0x220080f0, + 0x8090464e, + 0x464e2240, + 0x18d310f3, + 0x0bf34e01, + 0x1ce31613, + 0x91c34a4e, + 0x143b81e3, + 0x1ce36206, + 0x91c34a4e, + 0x183b81e3, + 0x4e171cab, + 0x4a191c9b, + 0x424e1cbc, + 0x10b210bc, + 0x662b6477, + 0xb063662b, + 0xb0637100, + 0xb0637100, + 0x10ab61e2, + 0x109b620a, + 0x7837620a, + 0x18707840, + 0xc0011a10, + 0x16176e71, + 0x78376a20, + 0xc0061208, + 0x9160c800, + 0x10007000, + 0x10f01000, + 0x18108201, + 0x6d716d71, + 0x14061816, + 0x16176e70, + 0x1c177841, + 0x78374638, + 0x1e881618, + 0x1060464b, + 0x81513d30, + 0x80f11810, + 0x41c12251, + 0x81719160, + 0x3d813181, + 0x4a491c10, + 0xb0319170, + 0x70001278, + 0x10001000, + 0x61e2662b, + 0x81628201, + 0x3d823182, + 0x92f1ef50, + 0x653a9302, + 0x6199a003, + 0x647780a2, + 0xb0506199, + 0x61997100 }; PATCH_FUN_SPEC void rf_patch_rfe_ieee(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 304; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchZigbeeXsIsRfe[i]; - } + uint32_t i; + + for (i = 0; i < 304; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchZigbeeXsIsRfe[i]; + } + #else - const uint32_t *pS = patchZigbeeXsIsRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 38; + const uint32_t* pS = patchZigbeeXsIsRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 38; + + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee_s.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee_s.h index 19c30bb5..0522370e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee_s.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/devices/cc26x0/rf_patches/rf_patch_rfe_ieee_s.h @@ -44,359 +44,365 @@ #include "../inc/hw_types.h" #ifndef RFE_PATCH_TYPE -#define RFE_PATCH_TYPE static const uint32_t + #define RFE_PATCH_TYPE static const uint32_t #endif #ifndef PATCH_FUN_SPEC -#define PATCH_FUN_SPEC static inline + #define PATCH_FUN_SPEC static inline #endif #ifndef RFC_RFERAM_BASE -#define RFC_RFERAM_BASE 0x2100C000 + #define RFC_RFERAM_BASE 0x2100C000 #endif #ifndef RFE_PATCH_MODE -#define RFE_PATCH_MODE 0 + #define RFE_PATCH_MODE 0 #endif -RFE_PATCH_TYPE patchZigbeeXsIsRfe[304] = { - 0x00006154, - 0x07f7177f, - 0x004507ff, - 0x0000000f, - 0x002e0004, - 0x0000003f, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x40004030, - 0x40034001, - 0x400f4007, - 0x40cf404f, - 0x43cf41cf, - 0x4fcf47cf, - 0x2fcf3fcf, - 0x0fcf1fcf, - 0x00000000, - 0x00000000, - 0x000f0000, - 0x00000008, - 0x0000003f, - 0x003f0040, - 0x00040000, - 0x000e0068, - 0x000600dc, - 0x001a0043, - 0x00000005, - 0x00020000, - 0x00000000, - 0x00000000, - 0x00c00004, - 0x00040000, - 0x000000c0, - 0x00000007, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x9100c050, - 0xc0707000, - 0x70009100, - 0x00213182, - 0xb1109131, - 0x81017000, - 0xa100b101, - 0x91323182, - 0x9101b110, - 0x81411011, - 0x40632241, - 0x700006f1, - 0x9101c051, - 0x39101830, - 0xd0083183, - 0x6f413118, - 0x91310031, - 0x1483b110, - 0x686f1614, - 0x10257000, - 0x9100c050, - 0xc140c3f4, - 0x6f031420, - 0x04411031, - 0x22f08250, - 0x26514084, - 0x3182c022, - 0x91310021, - 0x3963b110, - 0x04411031, - 0x3182c082, - 0x91310021, - 0x3963b110, - 0xc0a21031, - 0x00213182, - 0xb1109131, - 0x31151050, - 0x92051405, - 0x64537000, - 0x1031c052, - 0x31610631, - 0x645602c1, - 0x1031c112, - 0x06713921, - 0x02e13151, - 0x70006456, - 0x9101c051, - 0xc0e2cc01, - 0x64536456, - 0xc0c2c111, - 0xb0546456, - 0xa0547100, - 0x80f0b064, - 0x40b52200, - 0xc122c111, - 0xc0516456, - 0xc0e29101, - 0x82603182, - 0x91320002, - 0xc300b110, - 0x645368c8, - 0x90b01240, - 0xc300b032, - 0xc24068ce, - 0x128068d0, - 0xb03290b0, - 0x64537000, - 0xc122c101, - 0xc1016456, - 0x6456c0c2, - 0x649d8253, - 0x90b012c0, - 0x7000b032, - 0xc2726453, - 0x6456c081, - 0xc111c122, - 0xc0026456, - 0x6456c111, - 0xc331c062, - 0xc3626456, - 0x6456c111, - 0xc111c302, - 0x82536456, - 0x649d3953, - 0x645bc3e2, - 0x40f82211, - 0xc881c242, - 0xc2526456, - 0x6456c111, - 0xcee1c272, - 0xc2026456, - 0x6456c881, - 0xc801c202, - 0xc0b06456, - 0x7000690c, - 0xc2426453, - 0x6456c801, - 0xc011c252, - 0xc2726456, - 0x6456c0e1, - 0xc101c002, - 0xc0626456, - 0x6456c301, - 0xc101c122, - 0xc3626456, - 0x6456c101, - 0xc101c302, - 0x82536456, - 0x7000649d, - 0x3162c102, - 0x80a0c001, - 0x41321e00, - 0x61341a10, - 0x1a101020, - 0x6e236f13, - 0x16121611, - 0x70006934, - 0x82d092e0, - 0x453b2200, - 0x7000b2c0, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x72057306, - 0x720e720b, - 0x7100b050, - 0xb0608081, - 0x8092a050, - 0x92f1ef90, - 0x653a9302, - 0x45782241, - 0xc1f18080, - 0x16300410, - 0x14011101, - 0x61896c01, - 0x618b618a, - 0x618d618c, - 0x618f618e, - 0x61936191, - 0x61976195, - 0x625d625a, - 0x31218091, - 0x2a428082, - 0x16321412, - 0x14211101, - 0x61a76c01, - 0x61ad61c1, - 0x61a7625d, - 0x61ad61c1, - 0x6199625d, - 0x61996199, - 0x61996199, - 0x64ac6199, - 0x64d56199, - 0x64e26199, - 0x650e6199, - 0x652a6199, - 0x80826199, - 0x92f2df80, - 0x1210653a, - 0x61a290b0, - 0x90b01220, - 0x72057306, - 0x90301210, - 0xcf706158, - 0xc284653a, - 0xc3c0c003, - 0x78506468, - 0x78609150, - 0x78613110, - 0x92001410, - 0x31407880, - 0x00107861, - 0x78713140, - 0x92100010, - 0x92207890, - 0x926078a0, - 0xa0546199, - 0x225080f0, - 0x804045c9, - 0x46502200, - 0xcf6061c1, - 0x821e653a, - 0x06f910e9, - 0x10ea394e, - 0x10ac06fa, - 0x06fe394e, - 0x647710c2, - 0x10cb822d, - 0x91907820, - 0xb013661b, - 0xb063b053, - 0xb054b050, - 0xb003b064, - 0x225080f0, - 0x710041c1, - 0x22018041, - 0x22414650, - 0xb06441ec, - 0x81b0b063, - 0x81df91c0, - 0x220080f0, - 0x8090464e, - 0x464e2240, - 0x18d310f3, - 0x0bf34e01, - 0x1ce31613, - 0x91c34a4e, - 0x143b81e3, - 0x1ce36206, - 0x91c34a4e, - 0x183b81e3, - 0x4e171cab, - 0x4a191c9b, - 0x424e1cbc, - 0x10b210bc, - 0x662b6477, - 0xb063662b, - 0xb0637100, - 0xb0637100, - 0x10ab61e2, - 0x109b620a, - 0x7837620a, - 0x18707840, - 0xc0011a10, - 0x16176e71, - 0x78376a20, - 0xc0061208, - 0x9160c800, - 0x10007000, - 0x10f01000, - 0x18108201, - 0x6d716d71, - 0x14061816, - 0x16176e70, - 0x1c177841, - 0x78374638, - 0x1e881618, - 0x1060464b, - 0x81513d30, - 0x80f11810, - 0x41c12251, - 0x81719160, - 0x3d813181, - 0x4a491c10, - 0xb0319170, - 0x70001278, - 0x10001000, - 0x61e2662b, - 0x81628201, - 0x3d823182, - 0x92f1ef50, - 0x653a9302, - 0x6199a003, - 0x647780a2, - 0xb0506199, - 0x61997100 +RFE_PATCH_TYPE patchZigbeeXsIsRfe[304] = +{ + 0x00006154, + 0x07f7177f, + 0x004507ff, + 0x0000000f, + 0x002e0004, + 0x0000003f, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x40004030, + 0x40034001, + 0x400f4007, + 0x40cf404f, + 0x43cf41cf, + 0x4fcf47cf, + 0x2fcf3fcf, + 0x0fcf1fcf, + 0x00000000, + 0x00000000, + 0x000f0000, + 0x00000008, + 0x0000003f, + 0x003f0040, + 0x00040000, + 0x000e0068, + 0x000600dc, + 0x001a0043, + 0x00000005, + 0x00020000, + 0x00000000, + 0x00000000, + 0x00c00004, + 0x00040000, + 0x000000c0, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x9100c050, + 0xc0707000, + 0x70009100, + 0x00213182, + 0xb1109131, + 0x81017000, + 0xa100b101, + 0x91323182, + 0x9101b110, + 0x81411011, + 0x40632241, + 0x700006f1, + 0x9101c051, + 0x39101830, + 0xd0083183, + 0x6f413118, + 0x91310031, + 0x1483b110, + 0x686f1614, + 0x10257000, + 0x9100c050, + 0xc140c3f4, + 0x6f031420, + 0x04411031, + 0x22f08250, + 0x26514084, + 0x3182c022, + 0x91310021, + 0x3963b110, + 0x04411031, + 0x3182c082, + 0x91310021, + 0x3963b110, + 0xc0a21031, + 0x00213182, + 0xb1109131, + 0x31151050, + 0x92051405, + 0x64537000, + 0x1031c052, + 0x31610631, + 0x645602c1, + 0x1031c112, + 0x06713921, + 0x02e13151, + 0x70006456, + 0x9101c051, + 0xc0e2cc01, + 0x64536456, + 0xc0c2c111, + 0xb0546456, + 0xa0547100, + 0x80f0b064, + 0x40b52200, + 0xc122c111, + 0xc0516456, + 0xc0e29101, + 0x82603182, + 0x91320002, + 0xc300b110, + 0x645368c8, + 0x90b01240, + 0xc300b032, + 0xc24068ce, + 0x128068d0, + 0xb03290b0, + 0x64537000, + 0xc122c101, + 0xc1016456, + 0x6456c0c2, + 0x649d8253, + 0x90b012c0, + 0x7000b032, + 0xc2726453, + 0x6456c081, + 0xc111c122, + 0xc0026456, + 0x6456c111, + 0xc331c062, + 0xc3626456, + 0x6456c111, + 0xc111c302, + 0x82536456, + 0x649d3953, + 0x645bc3e2, + 0x40f82211, + 0xc881c242, + 0xc2526456, + 0x6456c111, + 0xcee1c272, + 0xc2026456, + 0x6456c881, + 0xc801c202, + 0xc0b06456, + 0x7000690c, + 0xc2426453, + 0x6456c801, + 0xc011c252, + 0xc2726456, + 0x6456c0e1, + 0xc101c002, + 0xc0626456, + 0x6456c301, + 0xc101c122, + 0xc3626456, + 0x6456c101, + 0xc101c302, + 0x82536456, + 0x7000649d, + 0x3162c102, + 0x80a0c001, + 0x41321e00, + 0x61341a10, + 0x1a101020, + 0x6e236f13, + 0x16121611, + 0x70006934, + 0x82d092e0, + 0x453b2200, + 0x7000b2c0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x72057306, + 0x720e720b, + 0x7100b050, + 0xb0608081, + 0x8092a050, + 0x92f1ef90, + 0x653a9302, + 0x45782241, + 0xc1f18080, + 0x16300410, + 0x14011101, + 0x61896c01, + 0x618b618a, + 0x618d618c, + 0x618f618e, + 0x61936191, + 0x61976195, + 0x625d625a, + 0x31218091, + 0x2a428082, + 0x16321412, + 0x14211101, + 0x61a76c01, + 0x61ad61c1, + 0x61a7625d, + 0x61ad61c1, + 0x6199625d, + 0x61996199, + 0x61996199, + 0x64ac6199, + 0x64d56199, + 0x64e26199, + 0x650e6199, + 0x652a6199, + 0x80826199, + 0x92f2df80, + 0x1210653a, + 0x61a290b0, + 0x90b01220, + 0x72057306, + 0x90301210, + 0xcf706158, + 0xc284653a, + 0xc3c0c003, + 0x78506468, + 0x78609150, + 0x78613110, + 0x92001410, + 0x31407880, + 0x00107861, + 0x78713140, + 0x92100010, + 0x92207890, + 0x926078a0, + 0xa0546199, + 0x225080f0, + 0x804045c9, + 0x46502200, + 0xcf6061c1, + 0x821e653a, + 0x06f910e9, + 0x10ea394e, + 0x10ac06fa, + 0x06fe394e, + 0x647710c2, + 0x10cb822d, + 0x91907820, + 0xb013661b, + 0xb063b053, + 0xb054b050, + 0xb003b064, + 0x225080f0, + 0x710041c1, + 0x22018041, + 0x22414650, + 0xb06441ec, + 0x81b0b063, + 0x81df91c0, + 0x220080f0, + 0x8090464e, + 0x464e2240, + 0x18d310f3, + 0x0bf34e01, + 0x1ce31613, + 0x91c34a4e, + 0x143b81e3, + 0x1ce36206, + 0x91c34a4e, + 0x183b81e3, + 0x4e171cab, + 0x4a191c9b, + 0x424e1cbc, + 0x10b210bc, + 0x662b6477, + 0xb063662b, + 0xb0637100, + 0xb0637100, + 0x10ab61e2, + 0x109b620a, + 0x7837620a, + 0x18707840, + 0xc0011a10, + 0x16176e71, + 0x78376a20, + 0xc0061208, + 0x9160c800, + 0x10007000, + 0x10f01000, + 0x18108201, + 0x6d716d71, + 0x14061816, + 0x16176e70, + 0x1c177841, + 0x78374638, + 0x1e881618, + 0x1060464b, + 0x81513d30, + 0x80f11810, + 0x41c12251, + 0x81719160, + 0x3d813181, + 0x4a491c10, + 0xb0319170, + 0x70001278, + 0x10001000, + 0x61e2662b, + 0x81628201, + 0x3d823182, + 0x92f1ef50, + 0x653a9302, + 0x6199a003, + 0x647780a2, + 0xb0506199, + 0x61997100 }; PATCH_FUN_SPEC void rf_patch_rfe_ieee_s(void) { #ifdef __PATCH_NO_UNROLLING - uint32_t i; - for (i = 0; i < 304; i++) { - HWREG(RFC_RFERAM_BASE + 4 * i) = patchZigbeeXsIsRfe[i]; - } + uint32_t i; + + for (i = 0; i < 304; i++) + { + HWREG(RFC_RFERAM_BASE + 4 * i) = patchZigbeeXsIsRfe[i]; + } + #else - const uint32_t *pS = patchZigbeeXsIsRfe; - volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE); - uint32_t t1, t2, t3, t4, t5, t6, t7, t8; - uint32_t nIterations = 38; + const uint32_t* pS = patchZigbeeXsIsRfe; + volatile unsigned long* pD = &HWREG(RFC_RFERAM_BASE); + uint32_t t1, t2, t3, t4, t5, t6, t7, t8; + uint32_t nIterations = 38; + + do + { + t1 = *pS++; + t2 = *pS++; + t3 = *pS++; + t4 = *pS++; + t5 = *pS++; + t6 = *pS++; + t7 = *pS++; + t8 = *pS++; + *pD++ = t1; + *pD++ = t2; + *pD++ = t3; + *pD++ = t4; + *pD++ = t5; + *pD++ = t6; + *pD++ = t7; + *pD++ = t8; + } while (--nIterations); - do { - t1 = *pS++; - t2 = *pS++; - t3 = *pS++; - t4 = *pS++; - t5 = *pS++; - t6 = *pS++; - t7 = *pS++; - t8 = *pS++; - *pD++ = t1; - *pD++ = t2; - *pD++ = t3; - *pD++ = t4; - *pD++ = t5; - *pD++ = t6; - *pD++ = t7; - *pD++ = t8; - } while (--nIterations); #endif } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADC.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADC.h index 3fd196c4..0de5a189 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADC.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADC.h @@ -245,7 +245,7 @@ extern "C" { /*! * @brief A handle that is returned from an ADC_open() call. */ -typedef struct ADC_Config *ADC_Handle; +typedef struct ADC_Config* ADC_Handle; /*! * @brief ADC Parameters used with ADC_open(). @@ -255,8 +255,9 @@ typedef struct ADC_Config *ADC_Handle; * * @sa ADC_Params_init() */ -typedef struct { - void *custom; /*!< Custom argument used by driver +typedef struct +{ + void* custom; /*!< Custom argument used by driver implementation */ bool isProtected; /*!< By default ADC uses a semaphore to guarantee thread safety. Setting @@ -280,14 +281,14 @@ typedef void (*ADC_CloseFxn) (ADC_Handle handle); * ADC_control(). */ typedef int_fast16_t (*ADC_ControlFxn) (ADC_Handle handle, uint_fast16_t cmd, - void *arg); + void* arg); /*! * @private * @brief A function pointer to a driver specific implementation of * ADC_ConvertFxn(). */ -typedef int_fast16_t (*ADC_ConvertFxn) (ADC_Handle handle, uint16_t *value); +typedef int_fast16_t (*ADC_ConvertFxn) (ADC_Handle handle, uint16_t* value); /*! * @private @@ -295,7 +296,7 @@ typedef int_fast16_t (*ADC_ConvertFxn) (ADC_Handle handle, uint16_t *value); * ADC_convertToMicroVolts(). */ typedef uint32_t (*ADC_ConvertToMicroVoltsFxn) (ADC_Handle handle, - uint16_t adcValue); + uint16_t adcValue); /*! * @private @@ -309,14 +310,15 @@ typedef void (*ADC_InitFxn) (ADC_Handle handle); * @brief A function pointer to a driver specific implementation of * ADC_open(). */ -typedef ADC_Handle (*ADC_OpenFxn) (ADC_Handle handle, ADC_Params *params); +typedef ADC_Handle (*ADC_OpenFxn) (ADC_Handle handle, ADC_Params* params); /*! * @brief The definition of an ADC function table that contains the * required set of functions to control a specific ADC driver * implementation. */ -typedef struct { +typedef struct +{ /*! Function to close the specified peripheral */ ADC_CloseFxn closeFxn; @@ -343,17 +345,18 @@ typedef struct { * @sa ADC_init() * @sa ADC_open() */ -typedef struct ADC_Config { +typedef struct ADC_Config +{ /*! Pointer to a @ref driver_function_table "function pointer table" * with driver-specific implementations of ADC APIs */ - ADC_FxnTable const *fxnTablePtr; + ADC_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific @ref driver_objects "data object". */ - void *object; + void* object; /*! Pointer to a driver specific @ref driver_hardware_attributes * "hardware attributes structure". */ - void const *hwAttrs; + void const* hwAttrs; } ADC_Config; /*! @@ -387,7 +390,7 @@ extern void ADC_close(ADC_Handle handle); * the device specific implementation. */ extern int_fast16_t ADC_control(ADC_Handle handle, uint_fast16_t cmd, - void *arg); + void* arg); /*! * @brief Function to perform an ADC conversion @@ -406,7 +409,7 @@ extern int_fast16_t ADC_control(ADC_Handle handle, uint_fast16_t cmd, * * @sa ADC_convertToMicroVolts() */ -extern int_fast16_t ADC_convert(ADC_Handle handle, uint16_t *value); +extern int_fast16_t ADC_convert(ADC_Handle handle, uint16_t* value); /*! * @brief Function to convert a raw ADC sample into microvolts. @@ -422,7 +425,7 @@ extern int_fast16_t ADC_convert(ADC_Handle handle, uint16_t *value); * @sa ADC_convert() */ extern uint32_t ADC_convertToMicroVolts(ADC_Handle handle, - uint16_t adcValue); + uint16_t adcValue); /*! * @brief Function to initialize the ADC driver. @@ -448,7 +451,7 @@ extern void ADC_init(void); * @sa ADC_init() * @sa ADC_close() */ -extern ADC_Handle ADC_open(uint_least8_t index, ADC_Params *params); +extern ADC_Handle ADC_open(uint_least8_t index, ADC_Params* params); /*! * @brief Initialize an #ADC_Params structure to its default values. @@ -459,7 +462,7 @@ extern ADC_Handle ADC_open(uint_least8_t index, ADC_Params *params); * @arg #ADC_Params.custom = NULL * @arg #ADC_Params.isProtected = true */ -extern void ADC_Params_init(ADC_Params *params); +extern void ADC_Params_init(ADC_Params* params); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADCBuf.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADCBuf.h index bd2637e2..cdaa8815 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADCBuf.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ADCBuf.h @@ -303,7 +303,7 @@ extern "C" { /*! * @brief A handle that is returned from an ADCBuf_open() call. */ -typedef struct ADCBuf_Config *ADCBuf_Handle; +typedef struct ADCBuf_Config* ADCBuf_Handle; /*! * @brief Defines a conversion to be used with ADCBuf_convert(). @@ -327,7 +327,7 @@ typedef struct * (#ADCBuf_Conversion.samplesRequestedCount * 2) bytes. When using * #ADCBuf_RECURRENCE_MODE_ONE_SHOT, only this buffer is used. */ - void *sampleBuffer; + void* sampleBuffer; /*! * Buffer to store ADCBuf conversion results. This buffer must be at least @@ -338,7 +338,7 @@ typedef struct * * @sa #ADCBuf_RECURRENCE_MODE_CONTINUOUS */ - void *sampleBufferTwo; + void* sampleBufferTwo; /*! * Pointer to a custom argument to be passed to the #ADCBuf_Callback @@ -350,7 +350,7 @@ typedef struct * @sa #ADCBuf_RETURN_MODE_CALLBACK * @sa #ADCBuf_Callback */ - void *arg; + void* arg; /*! * ADCBuf channel to perform conversions on. Mapping of channel to pin or @@ -389,8 +389,8 @@ typedef struct * @sa ADCBuf_RETURN_MODE_CALLBACK */ typedef void (*ADCBuf_Callback) (ADCBuf_Handle handle, - ADCBuf_Conversion *conversion, - void *completedADCBuffer, + ADCBuf_Conversion* conversion, + void* completedADCBuffer, uint32_t completedChannel); /*! @@ -515,7 +515,7 @@ typedef struct ADCBuf_Recurrence_Mode recurrenceMode; /*! Pointer to a device specific extension of the #ADCBuf_Params */ - void *custom; + void* custom; } ADCBuf_Params; /*! @@ -531,7 +531,7 @@ typedef void (*ADCBuf_CloseFxn) (ADCBuf_Handle handle); * ADCBuf_open(). */ typedef ADCBuf_Handle (*ADCBuf_OpenFxn) (ADCBuf_Handle handle, - const ADCBuf_Params *params); + const ADCBuf_Params* params); /*! * @private @@ -539,8 +539,8 @@ typedef ADCBuf_Handle (*ADCBuf_OpenFxn) (ADCBuf_Handle handle, * ADCBuf_control(). */ typedef int_fast16_t (*ADCBuf_ControlFxn) (ADCBuf_Handle handle, - uint_fast8_t cmd, - void *arg); + uint_fast8_t cmd, + void* arg); /*! * @private * @brief A function pointer to a driver specific implementation of @@ -554,8 +554,8 @@ typedef void (*ADCBuf_InitFxn) (ADCBuf_Handle handle); * ADCBuf_convert(). */ typedef int_fast16_t (*ADCBuf_ConvertFxn) (ADCBuf_Handle handle, - ADCBuf_Conversion conversions[], - uint_fast8_t channelCount); + ADCBuf_Conversion conversions[], + uint_fast8_t channelCount); /*! * @private * @brief A function pointer to a driver specific implementation of @@ -576,9 +576,9 @@ typedef uint_fast8_t (*ADCBuf_GetResolutionFxn) (ADCBuf_Handle handle); * ADCBuf_adjustRawValues(); */ typedef int_fast16_t (*ADCBuf_adjustRawValuesFxn)(ADCBuf_Handle handle, - void *sampleBuffer, - uint_fast16_t sampleCount, - uint32_t adcChannel); + void* sampleBuffer, + uint_fast16_t sampleCount, + uint32_t adcChannel); /*! * @private @@ -586,11 +586,11 @@ typedef int_fast16_t (*ADCBuf_adjustRawValuesFxn)(ADCBuf_Handle handle, * ADCBuf_convertAdjustedToMicroVolts(); */ typedef int_fast16_t (*ADCBuf_convertAdjustedToMicroVoltsFxn) ( - ADCBuf_Handle handle, - uint32_t adcChannel, - void *adjustedSampleBuffer, - uint32_t outputMicroVoltBuffer[], - uint_fast16_t sampleCount); + ADCBuf_Handle handle, + uint32_t adcChannel, + void* adjustedSampleBuffer, + uint32_t outputMicroVoltBuffer[], + uint_fast16_t sampleCount); /*! * @brief The definition of an ADCBuf function table that contains the @@ -632,14 +632,14 @@ typedef struct ADCBuf_Config { /*! Pointer to a @ref driver_function_table "function pointer table" * with driver-specific implementations of ADC APIs */ - const ADCBuf_FxnTable *fxnTablePtr; + const ADCBuf_FxnTable* fxnTablePtr; /*! Pointer to a driver specific @ref driver_objects "data object". */ - void *object; + void* object; /*! Pointer to a driver specific @ref driver_hardware_attributes * "hardware attributes structure". */ - void const *hwAttrs; + void const* hwAttrs; } ADCBuf_Config; /*! @@ -679,7 +679,7 @@ extern void ADCBuf_close(ADCBuf_Handle handle); */ extern int_fast16_t ADCBuf_control(ADCBuf_Handle handle, uint_fast16_t cmd, - void *cmdArg); + void* cmdArg); /*! * @brief Function to initialize the ADCBuf driver. @@ -702,7 +702,7 @@ extern void ADCBuf_init(void); * @arg #ADCBuf_Params.samplingFrequency = 10000, * @arg #ADCBuf_Params.custom = NULL */ -extern void ADCBuf_Params_init(ADCBuf_Params *params); +extern void ADCBuf_Params_init(ADCBuf_Params* params); /*! * @brief This function opens a given ADCBuf peripheral. @@ -716,7 +716,7 @@ extern void ADCBuf_Params_init(ADCBuf_Params *params); * * @sa ADCBuf_close() */ -extern ADCBuf_Handle ADCBuf_open(uint_least8_t index, ADCBuf_Params *params); +extern ADCBuf_Handle ADCBuf_open(uint_least8_t index, ADCBuf_Params* params); /*! * @brief Starts ADCBuf conversions on one or more channels. @@ -771,59 +771,59 @@ extern int_fast16_t ADCBuf_convertCancel(ADCBuf_Handle handle); */ extern uint_fast8_t ADCBuf_getResolution(ADCBuf_Handle handle); - /*! - * @brief Adjust a raw ADC output buffer. The function does - * the adjustment in-place. - * - * @param[in] handle An ADCBuf_Handle returned from ADCBuf_open(). - * - * @param[in,out] sampleBuf A buffer full of raw sample values. - * - * @param[in] sampleCount The number of samples to adjust. - * - * @param[in] adcChan The channel the buffer was sampled on. - * - * @retval #ADCBuf_STATUS_SUCCESS The operation was successful. - * @p sampleBuf contains valid values. - * - * @retval #ADCBuf_STATUS_ERROR if an error occurred. - * - * @retval #ADCBuf_STATUS_UNSUPPORTED The function is not supported by the - * device specific implementation. - * - * @pre ADCBuf_convert() must have returned a valid buffer with samples. - */ +/*! +* @brief Adjust a raw ADC output buffer. The function does +* the adjustment in-place. +* +* @param[in] handle An ADCBuf_Handle returned from ADCBuf_open(). +* +* @param[in,out] sampleBuf A buffer full of raw sample values. +* +* @param[in] sampleCount The number of samples to adjust. +* +* @param[in] adcChan The channel the buffer was sampled on. +* +* @retval #ADCBuf_STATUS_SUCCESS The operation was successful. +* @p sampleBuf contains valid values. +* +* @retval #ADCBuf_STATUS_ERROR if an error occurred. +* +* @retval #ADCBuf_STATUS_UNSUPPORTED The function is not supported by the +* device specific implementation. +* +* @pre ADCBuf_convert() must have returned a valid buffer with samples. +*/ extern int_fast16_t ADCBuf_adjustRawValues(ADCBuf_Handle handle, - void *sampleBuf, - uint_fast16_t sampleCount, - uint32_t adcChan); - - /*! - * @brief Convert an adjusted ADC output buffer to microvolts. - * - * @param[in] handle An ADCBuf_Handle returned from ADCBuf_open() - * - * @param[in] adcChan The ADC channel the samples were performed on. - * - * @param[in] adjustedSampleBuffer A buffer full of adjusted samples. - * - * @param[in,out] outputMicroVoltBuffer The output buffer. - * - * @param[in] sampleCount The number of samples to convert. - * - * @retval #ADCBuf_STATUS_SUCCESS The operation was successful. - * @p outputMicroVoltBuffer contains valid values. - * - * @retval #ADCBuf_STATUS_ERROR The operation failed. - * - * @pre ADCBuf_adjustRawValues() must be called on @p adjustedSampleBuffer. - */ + void* sampleBuf, + uint_fast16_t sampleCount, + uint32_t adcChan); + +/*! +* @brief Convert an adjusted ADC output buffer to microvolts. +* +* @param[in] handle An ADCBuf_Handle returned from ADCBuf_open() +* +* @param[in] adcChan The ADC channel the samples were performed on. +* +* @param[in] adjustedSampleBuffer A buffer full of adjusted samples. +* +* @param[in,out] outputMicroVoltBuffer The output buffer. +* +* @param[in] sampleCount The number of samples to convert. +* +* @retval #ADCBuf_STATUS_SUCCESS The operation was successful. +* @p outputMicroVoltBuffer contains valid values. +* +* @retval #ADCBuf_STATUS_ERROR The operation failed. +* +* @pre ADCBuf_adjustRawValues() must be called on @p adjustedSampleBuffer. +*/ extern int_fast16_t ADCBuf_convertAdjustedToMicroVolts( - ADCBuf_Handle handle, - uint32_t adcChan, - void *adjustedSampleBuffer, - uint32_t outputMicroVoltBuffer[], - uint_fast16_t sampleCount); + ADCBuf_Handle handle, + uint32_t adcChan, + void* adjustedSampleBuffer, + uint32_t outputMicroVoltBuffer[], + uint_fast16_t sampleCount); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCBC.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCBC.h index 7c289af0..8fbdc315 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCBC.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCBC.h @@ -365,7 +365,7 @@ extern "C" { /*! * @brief A handle that is returned from an #AESCBC_open() call. */ -typedef struct AESCBC_Config *AESCBC_Handle; +typedef struct AESCBC_Config* AESCBC_Handle; /*! * @brief The way in which CBC function calls return after performing an @@ -388,7 +388,8 @@ typedef struct AESCBC_Config *AESCBC_Handle; * |AESCBC_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ AESCBC_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * CBC operation goes on in the background. The registered * callback function is called after the operation completes. @@ -408,7 +409,8 @@ typedef enum { /*! * @brief Enum for the direction of the CBC operation. */ -typedef enum { +typedef enum +{ AESCBC_MODE_ENCRYPT = 1, AESCBC_MODE_DECRYPT = 2, } AESCBC_Mode; @@ -417,27 +419,28 @@ typedef enum { * @brief Struct containing the parameters required for encrypting/decrypting * a message. */ -typedef struct { - CryptoKey *key; /*!< A previously initialized CryptoKey. */ - const uint8_t *input; /*!< +typedef struct +{ + CryptoKey* key; /*!< A previously initialized CryptoKey. */ + const uint8_t* input; /*!< * - Encryption: The plaintext buffer to be * encrypted in the CBC operation. * - Decryption: The ciphertext to be decrypted. */ - uint8_t *output; /*!< + uint8_t* output; /*!< * - Encryption: The output ciphertext buffer that * the encrypted plaintext is copied to. * - Decryption: The plaintext derived from the * decrypted ciphertext is copied here. */ - uint8_t *iv; /*!< A buffer containing an IV. IVs must be unique to + uint8_t* iv; /*!< A buffer containing an IV. IVs must be unique to * each CBC operation and may not be reused. If * ivInternallyGenerated is set, the iv will be * generated by this function call and copied to * this buffer. */ - size_t inputLength; /*!< Length of the input and output in bytes. */ - bool ivInternallyGenerated; /*!< When true, the iv buffer passed into #AESCBC_oneStepEncrypt() functions + size_t inputLength; /*!< Length of the input and output in bytes. */ + bool ivInternallyGenerated; /*!< When true, the iv buffer passed into #AESCBC_oneStepEncrypt() functions * will be overwritten with a randomly generated iv. * Not supported by all implementations. */ @@ -446,7 +449,8 @@ typedef struct { /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ AESCBC_OPERATION_TYPE_ENCRYPT = 1, AESCBC_OPERATION_TYPE_DECRYPT = 2, } AESCBC_OperationType; @@ -462,12 +466,13 @@ typedef enum { * * @sa #AESCBC_init() */ -typedef struct AESCBC_Config { +typedef struct AESCBC_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } AESCBC_Config; /*! @@ -487,7 +492,7 @@ typedef struct AESCBC_Config { */ typedef void (*AESCBC_CallbackFxn) (AESCBC_Handle handle, int_fast16_t returnValue, - AESCBC_Operation *operation, + AESCBC_Operation* operation, AESCBC_OperationType operationType); /*! @@ -498,13 +503,14 @@ typedef void (*AESCBC_CallbackFxn) (AESCBC_Handle handle, * * @sa #AESCBC_Params_init() */ -typedef struct { +typedef struct +{ AESCBC_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ AESCBC_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout before the driver returns an error in * ::AESCBC_RETURN_BEHAVIOR_BLOCKING */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } AESCBC_Params; @@ -538,7 +544,7 @@ void AESCBC_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void AESCBC_Params_init(AESCBC_Params *params); +void AESCBC_Params_init(AESCBC_Params* params); /*! * @brief This function opens a given CBC peripheral. @@ -557,7 +563,7 @@ void AESCBC_Params_init(AESCBC_Params *params); * @sa #AESCBC_init() * @sa #AESCBC_close() */ -AESCBC_Handle AESCBC_open(uint_least8_t index, AESCBC_Params *params); +AESCBC_Handle AESCBC_open(uint_least8_t index, AESCBC_Params* params); /*! * @brief Function to close a CBC peripheral specified by the CBC handle @@ -578,7 +584,7 @@ void AESCBC_close(AESCBC_Handle handle); * * Defaults values are all zeros. */ -void AESCBC_Operation_init(AESCBC_Operation *operationStruct); +void AESCBC_Operation_init(AESCBC_Operation* operationStruct); /*! * @brief Function to perform an AESCBC encryption operation in one call. @@ -599,7 +605,7 @@ void AESCBC_Operation_init(AESCBC_Operation *operationStruct); * * @sa #AESCBC_oneStepDecrypt() */ -int_fast16_t AESCBC_oneStepEncrypt(AESCBC_Handle handle, AESCBC_Operation *operationStruct); +int_fast16_t AESCBC_oneStepEncrypt(AESCBC_Handle handle, AESCBC_Operation* operationStruct); /*! * @brief Function to perform an AESCBC decryption operation in one call. @@ -620,7 +626,7 @@ int_fast16_t AESCBC_oneStepEncrypt(AESCBC_Handle handle, AESCBC_Operation *opera * * @sa AESCBC_oneStepEncrypt() */ -int_fast16_t AESCBC_oneStepDecrypt(AESCBC_Handle handle, AESCBC_Operation *operationStruct); +int_fast16_t AESCBC_oneStepDecrypt(AESCBC_Handle handle, AESCBC_Operation* operationStruct); /*! * @brief Cancels an ongoing AESCBC operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCCM.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCCM.h index b7181cea..543e5c2e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCCM.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCCM.h @@ -391,7 +391,7 @@ extern "C" { /*! * @brief A handle that is returned from an AESCCM_open() call. */ -typedef struct AESCCM_Config *AESCCM_Handle; +typedef struct AESCCM_Config* AESCCM_Handle; /*! * @brief The way in which CCM function calls return after performing an @@ -414,7 +414,8 @@ typedef struct AESCCM_Config *AESCCM_Handle; * |AESCCM_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ AESCCM_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * CCM operation goes on in the background. The registered * callback function is called after the operation completes. @@ -434,7 +435,8 @@ typedef enum { /*! * @brief Enum for the direction of the CCM operation. */ -typedef enum { +typedef enum +{ AESCCM_MODE_ENCRYPT = 1, AESCCM_MODE_DECRYPT = 2, } AESCCM_Mode; @@ -443,52 +445,53 @@ typedef enum { * @brief Struct containing the parameters required for encrypting/decrypting * and authenticating/verifying a message. */ -typedef struct { - CryptoKey *key; /*!< A previously initialized CryptoKey */ - uint8_t *aad; /*!< A buffer of length \c aadLength containing additional +typedef struct +{ + CryptoKey* key; /*!< A previously initialized CryptoKey */ + uint8_t* aad; /*!< A buffer of length \c aadLength containing additional * authentication data to be authenticated/verified but not * encrypted/decrypted. */ - uint8_t *input; /*!< + uint8_t* input; /*!< * - Encryption: The plaintext buffer to be encrypted and authenticated * in the CCM operation. * - Decryption: The ciphertext to be decrypted and verified. */ - uint8_t *output; /*!< + uint8_t* output; /*!< * - Encryption: The output ciphertext buffer that the encrypted plaintext * is copied to. * - Decryption: The plaintext derived from the decrypted and verified * ciphertext is copied here. */ - uint8_t *nonce; /*!< A buffer containing a nonce. Nonces must be unique to + uint8_t* nonce; /*!< A buffer containing a nonce. Nonces must be unique to * each CCM operation and may not be reused. If * nonceInternallyGenerated is set the nonce will be * generated by this function call and copied to * this buffer. */ - uint8_t *mac; /*!< + uint8_t* mac; /*!< * - Encryption: The buffer where the message authentication * code is copied. * - Decryption: The buffer containing the received message * authentication code. */ - size_t aadLength; /*!< Length of \c aad in bytes. Either \c aadLength or + size_t aadLength; /*!< Length of \c aad in bytes. Either \c aadLength or * \c plaintextLength must benon-zero. * encrypted. */ - size_t inputLength; /*!< Length of the input and output in bytes. Either \c aadLength or + size_t inputLength; /*!< Length of the input and output in bytes. Either \c aadLength or * \c inputLength must be * non-zero. */ - uint8_t nonceLength; /*!< Length of \c nonce in bytes. + uint8_t nonceLength; /*!< Length of \c nonce in bytes. * Valid nonce lengths are [7, 8, ... 13]. */ - uint8_t macLength; /*!< Length of \c mac in bytes. + uint8_t macLength; /*!< Length of \c mac in bytes. * Valid MAC lengths are [0, 4, 6, 8, 10, 12, 14, 16]. * A length of 0 disables authentication and verification. This is * only permitted when using CCM*. */ - bool nonceInternallyGenerated; /*!< When true, the nonce buffer passed into the AESCCM_setupEncrypt() + bool nonceInternallyGenerated; /*!< When true, the nonce buffer passed into the AESCCM_setupEncrypt() * and AESCCM_oneStepEncrypt() functions will be overwritten with a * randomly generated nonce. Not supported by all implementations. */ @@ -497,7 +500,8 @@ typedef struct { /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ AESCCM_OPERATION_TYPE_ENCRYPT = 1, AESCCM_OPERATION_TYPE_DECRYPT = 2, } AESCCM_OperationType; @@ -513,12 +517,13 @@ typedef enum { * * @sa AESCCM_init() */ -typedef struct AESCCM_Config { +typedef struct AESCCM_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } AESCCM_Config; /*! @@ -538,7 +543,7 @@ typedef struct AESCCM_Config { */ typedef void (*AESCCM_CallbackFxn) (AESCCM_Handle handle, int_fast16_t returnValue, - AESCCM_Operation *operation, + AESCCM_Operation* operation, AESCCM_OperationType operationType); /*! @@ -549,13 +554,14 @@ typedef void (*AESCCM_CallbackFxn) (AESCCM_Handle handle, * * @sa AESCCM_Params_init() */ -typedef struct { +typedef struct +{ AESCCM_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ AESCCM_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout before the driver returns an error in * ::AESCCM_RETURN_BEHAVIOR_BLOCKING */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } AESCCM_Params; @@ -589,7 +595,7 @@ void AESCCM_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void AESCCM_Params_init(AESCCM_Params *params); +void AESCCM_Params_init(AESCCM_Params* params); /*! * @brief This function opens a given CCM peripheral. @@ -608,7 +614,7 @@ void AESCCM_Params_init(AESCCM_Params *params); * @sa AESCCM_init() * @sa AESCCM_close() */ -AESCCM_Handle AESCCM_open(uint_least8_t index, AESCCM_Params *params); +AESCCM_Handle AESCCM_open(uint_least8_t index, AESCCM_Params* params); /*! * @brief Function to close a CCM peripheral specified by the CCM handle @@ -629,7 +635,7 @@ void AESCCM_close(AESCCM_Handle handle); * * Defaults values are all zeros. */ -void AESCCM_Operation_init(AESCCM_Operation *operationStruct); +void AESCCM_Operation_init(AESCCM_Operation* operationStruct); /*! * @brief Function to perform an AESCCM encryption + authentication operation in one call. @@ -650,7 +656,7 @@ void AESCCM_Operation_init(AESCCM_Operation *operationStruct); * * @sa AESCCM_oneStepDecrypt() */ -int_fast16_t AESCCM_oneStepEncrypt(AESCCM_Handle handle, AESCCM_Operation *operationStruct); +int_fast16_t AESCCM_oneStepEncrypt(AESCCM_Handle handle, AESCCM_Operation* operationStruct); /*! * @brief Function to perform an AESCCM decryption + verification operation in one call. @@ -672,7 +678,7 @@ int_fast16_t AESCCM_oneStepEncrypt(AESCCM_Handle handle, AESCCM_Operation *opera * * @sa AESCCM_oneStepEncrypt() */ -int_fast16_t AESCCM_oneStepDecrypt(AESCCM_Handle handle, AESCCM_Operation *operationStruct); +int_fast16_t AESCCM_oneStepDecrypt(AESCCM_Handle handle, AESCCM_Operation* operationStruct); /*! * @brief Cancels an ongoing AESCCM operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTR.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTR.h index 4096141c..e16c07dc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTR.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTR.h @@ -377,7 +377,8 @@ extern "C" { * |AESCTR_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ AESCTR_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * CTR operation goes on in the background. The registered * callback function is called after the operation completes. @@ -397,7 +398,8 @@ typedef enum { /*! * @brief Enum for the direction of the CTR operation. */ -typedef enum { +typedef enum +{ AESCTR_MODE_ENCRYPT = 1, AESCTR_MODE_DECRYPT = 2, } AESCTR_Mode; @@ -409,31 +411,33 @@ typedef enum { * The driver may access it at any point during the operation. It must remain * in scope for the entire duration of the operation. */ -typedef struct { - const CryptoKey *key; /*!< A previously initialized CryptoKey. */ - const uint8_t *input; /*!< +typedef struct +{ + const CryptoKey* key; /*!< A previously initialized CryptoKey. */ + const uint8_t* input; /*!< * - Encryption: The plaintext buffer to be * encrypted in the CTR operation. * - Decryption: The ciphertext to be decrypted. */ - uint8_t *output; /*!< + uint8_t* output; /*!< * - Encryption: The output ciphertext buffer that * the encrypted plaintext is copied to. * - Decryption: The plaintext derived from the * decrypted ciphertext is copied here. */ - const uint8_t *initialCounter; /*!< A buffer containing an initial counter. Under + const uint8_t* initialCounter; /*!< A buffer containing an initial counter. Under * the same key, each counter value may only be * used to encrypt or decrypt a single input * block. */ - size_t inputLength; /*!< Length of the input and output in bytes. */ + size_t inputLength; /*!< Length of the input and output in bytes. */ } AESCTR_Operation; /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ AESCTR_OPERATION_TYPE_ENCRYPT = 1, AESCTR_OPERATION_TYPE_DECRYPT = 2, } AESCTR_OperationType; @@ -449,18 +453,19 @@ typedef enum { * * @sa #AESCTR_init() */ -typedef struct AESCTR_Config { +typedef struct AESCTR_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } AESCTR_Config; /*! * @brief A handle that is returned from an #AESCTR_open() call. */ -typedef AESCTR_Config *AESCTR_Handle; +typedef AESCTR_Config* AESCTR_Handle; /*! * @brief The definition of a callback function used by the AESCTR driver @@ -479,7 +484,7 @@ typedef AESCTR_Config *AESCTR_Handle; */ typedef void (*AESCTR_CallbackFxn) (AESCTR_Handle handle, int_fast16_t returnValue, - AESCTR_Operation *operation, + AESCTR_Operation* operation, AESCTR_OperationType operationType); /*! @@ -490,13 +495,14 @@ typedef void (*AESCTR_CallbackFxn) (AESCTR_Handle handle, * * @sa #AESCTR_Params_init() */ -typedef struct { +typedef struct +{ AESCTR_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ AESCTR_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout before the driver returns an error in * ::AESCTR_RETURN_BEHAVIOR_BLOCKING */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } AESCTR_Params; @@ -530,7 +536,7 @@ void AESCTR_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void AESCTR_Params_init(AESCTR_Params *params); +void AESCTR_Params_init(AESCTR_Params* params); /*! * @brief This function opens a given AESCTR peripheral. @@ -549,7 +555,7 @@ void AESCTR_Params_init(AESCTR_Params *params); * @sa #AESCTR_init() * @sa #AESCTR_close() */ -AESCTR_Handle AESCTR_open(uint_least8_t index, const AESCTR_Params *params); +AESCTR_Handle AESCTR_open(uint_least8_t index, const AESCTR_Params* params); /*! * @brief Function to close a CTR peripheral specified by the CTR handle @@ -570,7 +576,7 @@ void AESCTR_close(AESCTR_Handle handle); * * Defaults values are all zeros. */ -void AESCTR_Operation_init(AESCTR_Operation *operationStruct); +void AESCTR_Operation_init(AESCTR_Operation* operationStruct); /*! * @brief Function to perform an AESCTR encryption operation in one call. @@ -591,7 +597,7 @@ void AESCTR_Operation_init(AESCTR_Operation *operationStruct); * * @sa #AESCTR_oneStepDecrypt() */ -int_fast16_t AESCTR_oneStepEncrypt(AESCTR_Handle handle, AESCTR_Operation *operationStruct); +int_fast16_t AESCTR_oneStepEncrypt(AESCTR_Handle handle, AESCTR_Operation* operationStruct); /*! * @brief Function to perform an AESCTR decryption operation in one call. @@ -612,7 +618,7 @@ int_fast16_t AESCTR_oneStepEncrypt(AESCTR_Handle handle, AESCTR_Operation *opera * * @sa AESCTR_oneStepEncrypt() */ -int_fast16_t AESCTR_oneStepDecrypt(AESCTR_Handle handle, AESCTR_Operation *operationStruct); +int_fast16_t AESCTR_oneStepDecrypt(AESCTR_Handle handle, AESCTR_Operation* operationStruct); /*! * @brief Cancels an ongoing AESCTR operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTRDRBG.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTRDRBG.h index ba4bdd30..c276f13b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTRDRBG.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESCTRDRBG.h @@ -303,7 +303,8 @@ extern "C" { /*! * @brief Length in bytes of the internal AES key used by an instance */ -typedef enum { +typedef enum +{ AESCTRDRBG_AES_KEY_LENGTH_128 = 16, AESCTRDRBG_AES_KEY_LENGTH_256 = 32, } AESCTRDRBG_AES_KEY_LENGTH; @@ -311,7 +312,8 @@ typedef enum { /*! * @brief Length in bytes of seed used to instantiate or reseed instance */ -typedef enum { +typedef enum +{ AESCTRDRBG_SEED_LENGTH_AES_128 = AESCTRDRBG_AES_KEY_LENGTH_128 + AESCTRDRBG_AES_BLOCK_SIZE_BYTES, AESCTRDRBG_SEED_LENGTH_AES_256 = AESCTRDRBG_AES_KEY_LENGTH_256 + AESCTRDRBG_AES_BLOCK_SIZE_BYTES, } AESCTRDRBG_SEED_LENGTH; @@ -336,7 +338,8 @@ typedef enum { * |#AESCTRDRBG_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum AESCTRDRBG_ReturnBehavior_ { +typedef enum AESCTRDRBG_ReturnBehavior_ +{ /*!< The function call will block while AESCTRDRBG operation goes * on in the background. AESCTRDRBG operation results are available * after the function returns. @@ -360,18 +363,19 @@ typedef enum AESCTRDRBG_ReturnBehavior_ { * * @sa #AESCTRDRBG_init() */ -typedef struct { +typedef struct +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } AESCTRDRBG_Config; /*! * @brief A handle that is returned from an #AESCTRDRBG_open() call. */ -typedef AESCTRDRBG_Config *AESCTRDRBG_Handle; +typedef AESCTRDRBG_Config* AESCTRDRBG_Handle; /*! * @brief AESCTRDRBG Parameters @@ -381,7 +385,8 @@ typedef AESCTRDRBG_Config *AESCTRDRBG_Handle; * * @sa #AESCTRDRBG_Params_init() */ -typedef struct { +typedef struct +{ AESCTRDRBG_AES_KEY_LENGTH keyLength; /*!< Length of the internal AES key * of the driver instance. */ @@ -389,12 +394,12 @@ typedef struct { * requests before the application is * required to reseed the driver. */ - const void *seed; /*!< Entropy used to seed the internal + const void* seed; /*!< Entropy used to seed the internal * state of the driver. Must be one of * #AESCTRDRBG_SEED_LENGTH long depending * on \c keyLength. */ - const void *personalizationData; /*!< Optional non-secret personalization + const void* personalizationData; /*!< Optional non-secret personalization * data to mix into the driver's internal * state. */ @@ -409,7 +414,7 @@ typedef struct { * 1250 bytes for AES-128 will be common * usecases for this driver instance. */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } AESCTRDRBG_Params; @@ -437,7 +442,7 @@ void AESCTRDRBG_init(void); * @param [out] params Pointer to #AESCTRDRBG_Params structure for * initialization */ -void AESCTRDRBG_Params_init(AESCTRDRBG_Params *params); +void AESCTRDRBG_Params_init(AESCTRDRBG_Params* params); /*! * @brief This function opens a given AESCTRDRBG instance. @@ -456,7 +461,7 @@ void AESCTRDRBG_Params_init(AESCTRDRBG_Params *params); * @sa #AESCTRDRBG_init() * @sa #AESCTRDRBG_close() */ -AESCTRDRBG_Handle AESCTRDRBG_open(uint_least8_t index, const AESCTRDRBG_Params *params); +AESCTRDRBG_Handle AESCTRDRBG_open(uint_least8_t index, const AESCTRDRBG_Params* params); /*! * @brief Function to close an AESCTRDRBG peripheral specified by the #AESCTRDRBG_Handle @@ -482,7 +487,7 @@ void AESCTRDRBG_close(AESCTRDRBG_Handle handle); * @retval #AESCTRDRBG_STATUS_RESOURCE_UNAVAILABLE The requires hardware was unavailable. * @retval #AESCTRDRBG_STATUS_RESEED_REQUIRED Reseed counter >= reseed limit. Reseed required. */ -int_fast16_t AESCTRDRBG_getBytes(AESCTRDRBG_Handle handle, CryptoKey *randomBytes); +int_fast16_t AESCTRDRBG_getBytes(AESCTRDRBG_Handle handle, CryptoKey* randomBytes); /*! * @brief Reseed an AESCTRDRBG instance. @@ -503,8 +508,8 @@ int_fast16_t AESCTRDRBG_getBytes(AESCTRDRBG_Handle handle, CryptoKey *randomByte * @retval #AESCTRDRBG_STATUS_RESOURCE_UNAVAILABLE The requires hardware was unavailable. */ int_fast16_t AESCTRDRBG_reseed(AESCTRDRBG_Handle handle, - const void *seed, - const void *additionalData, + const void* seed, + const void* additionalData, size_t additionalDataLength); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESECB.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESECB.h index f1eee09f..bf7c700b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESECB.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESECB.h @@ -307,7 +307,7 @@ extern "C" { /*! * @brief A handle that is returned from an AESECB_open() call. */ -typedef struct AESECB_Config *AESECB_Handle; +typedef struct AESECB_Config* AESECB_Handle; /*! * @brief The way in which ECB function calls return after performing an @@ -330,7 +330,8 @@ typedef struct AESECB_Config *AESECB_Handle; * |AESECB_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ AESECB_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * ECB operation goes on in the background. The registered * callback function is called after the operation completes. @@ -350,7 +351,8 @@ typedef enum { /*! * @brief Enum for the direction of the ECB operation. */ -typedef enum { +typedef enum +{ AESECB_MODE_ENCRYPT = 1, AESECB_MODE_DECRYPT = 2, } AESECB_Mode; @@ -359,20 +361,21 @@ typedef enum { * @brief Struct containing the parameters required for encrypting/decrypting * and a message. */ -typedef struct { - CryptoKey *key; /*!< A previously initialized CryptoKey */ - uint8_t *input; /*!< +typedef struct +{ + CryptoKey* key; /*!< A previously initialized CryptoKey */ + uint8_t* input; /*!< * - Encryption: The plaintext buffer to be encrypted * in the ECB operation. * - Decryption: The ciphertext to be decrypted. */ - uint8_t *output; /*!< + uint8_t* output; /*!< * - Encryption: The output ciphertext buffer that the encrypted plaintext * is copied to. * - Decryption: The plaintext derived from the decrypted * ciphertext is copied here. */ - size_t inputLength; /*!< Length of the input and output in bytes. Must be a multiple of the + size_t inputLength; /*!< Length of the input and output in bytes. Must be a multiple of the * AES block size (16 bytes) */ } AESECB_Operation; @@ -380,7 +383,8 @@ typedef struct { /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ AESECB_OPERATION_TYPE_ENCRYPT = 1, AESECB_OPERATION_TYPE_DECRYPT = 2, } AESECB_OperationType; @@ -396,12 +400,13 @@ typedef enum { * * @sa AESECB_init() */ -typedef struct AESECB_Config { +typedef struct AESECB_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } AESECB_Config; /*! @@ -421,7 +426,7 @@ typedef struct AESECB_Config { */ typedef void (*AESECB_CallbackFxn) (AESECB_Handle handle, int_fast16_t returnValue, - AESECB_Operation *operation, + AESECB_Operation* operation, AESECB_OperationType operationType); /*! @@ -432,13 +437,14 @@ typedef void (*AESECB_CallbackFxn) (AESECB_Handle handle, * * @sa AESECB_Params_init() */ -typedef struct { +typedef struct +{ AESECB_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ AESECB_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout before the driver returns an error in * ::AESECB_RETURN_BEHAVIOR_BLOCKING */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } AESECB_Params; @@ -472,7 +478,7 @@ void AESECB_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void AESECB_Params_init(AESECB_Params *params); +void AESECB_Params_init(AESECB_Params* params); /*! * @brief This function opens a given ECB peripheral. @@ -491,7 +497,7 @@ void AESECB_Params_init(AESECB_Params *params); * @sa AESECB_init() * @sa AESECB_close() */ -AESECB_Handle AESECB_open(uint_least8_t index, AESECB_Params *params); +AESECB_Handle AESECB_open(uint_least8_t index, AESECB_Params* params); /*! * @brief Function to close an ECB peripheral specified by the ECB handle @@ -512,7 +518,7 @@ void AESECB_close(AESECB_Handle handle); * * Defaults values are all zeros. */ -void AESECB_Operation_init(AESECB_Operation *operationStruct); +void AESECB_Operation_init(AESECB_Operation* operationStruct); /*! * @brief Function to perform an AESECB encryption operation in one call. @@ -533,7 +539,7 @@ void AESECB_Operation_init(AESECB_Operation *operationStruct); * * @sa AESECB_oneStepDecrypt() */ -int_fast16_t AESECB_oneStepEncrypt(AESECB_Handle handle, AESECB_Operation *operation); +int_fast16_t AESECB_oneStepEncrypt(AESECB_Handle handle, AESECB_Operation* operation); /*! * @brief Function to perform an AESECB decryption in one call. @@ -554,7 +560,7 @@ int_fast16_t AESECB_oneStepEncrypt(AESECB_Handle handle, AESECB_Operation *opera * * @sa AESECB_oneStepEncrypt() */ -int_fast16_t AESECB_oneStepDecrypt(AESECB_Handle handle, AESECB_Operation *operation); +int_fast16_t AESECB_oneStepDecrypt(AESECB_Handle handle, AESECB_Operation* operation); /*! * @brief Cancels an ongoing AESECB operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESGCM.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESGCM.h index d3fe33f9..5e82902f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESGCM.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/AESGCM.h @@ -373,7 +373,7 @@ extern "C" { /*! * @brief A handle that is returned from an AESGCM_open() call. */ -typedef struct AESGCM_Config *AESGCM_Handle; +typedef struct AESGCM_Config* AESGCM_Handle; /*! * @brief The way in which GCM function calls return after performing an @@ -396,7 +396,8 @@ typedef struct AESGCM_Config *AESGCM_Handle; * |AESGCM_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ AESGCM_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * GCM operation goes on in the background. The registered * callback function is called after the operation completes. @@ -416,7 +417,8 @@ typedef enum { /*! * @brief Enum for the direction of the GCM operation. */ -typedef enum { +typedef enum +{ AESGCM_MODE_ENCRYPT = 1, AESGCM_MODE_DECRYPT = 2, } AESGCM_Mode; @@ -425,50 +427,51 @@ typedef enum { * @brief Struct containing the parameters required for encrypting/decrypting * and authenticating/verifying a message. */ -typedef struct { - CryptoKey *key; /*!< A previously initialized CryptoKey */ - uint8_t *aad; /*!< A buffer of length \c aadLength containing additional +typedef struct +{ + CryptoKey* key; /*!< A previously initialized CryptoKey */ + uint8_t* aad; /*!< A buffer of length \c aadLength containing additional * authentication data to be authenticated/verified but not * encrypted/decrypted. */ - uint8_t *input; /*!< + uint8_t* input; /*!< * - Encryption: The plaintext buffer to be encrypted and authenticated * in the GCM operation. * - Decryption: The ciphertext to be decrypted and verified. */ - uint8_t *output; /*!< + uint8_t* output; /*!< * - Encryption: The output ciphertext buffer that the encrypted plaintext * is copied to. * - Decryption: The plaintext derived from the decrypted and verified * ciphertext is copied here. */ - uint8_t *iv; /*!< A buffer containing an IV. IVs must be unique to + uint8_t* iv; /*!< A buffer containing an IV. IVs must be unique to * each GCM operation and may not be reused. If * ivInternallyGenerated is set, the IV will be * generated by this function call and copied to * this buffer. */ - uint8_t *mac; /*!< + uint8_t* mac; /*!< * - Encryption: The buffer where the message authentication * code is copied. * - Decryption: The buffer containing the received message * authentication code. */ - size_t aadLength; /*!< Length of \c aad in bytes. Either \c aadLength or + size_t aadLength; /*!< Length of \c aad in bytes. Either \c aadLength or * \c plaintextLength must benon-zero. * encrypted. */ - size_t inputLength; /*!< Length of the input and output in bytes. Either \c aadLength or + size_t inputLength; /*!< Length of the input and output in bytes. Either \c aadLength or * \c inputLength must be * non-zero. */ - uint8_t ivLength; /*!< Length of \c IV in bytes. + uint8_t ivLength; /*!< Length of \c IV in bytes. * The only currently supported IV length is 12 bytes. */ - uint8_t macLength; /*!< Length of \c mac in bytes. + uint8_t macLength; /*!< Length of \c mac in bytes. * Valid MAC lengths are [4, 8, 12, 13, 14, 15, 16]. */ - bool ivInternallyGenerated; /*!< When true, the IV buffer passed into the AESGCM_setupEncrypt() + bool ivInternallyGenerated; /*!< When true, the IV buffer passed into the AESGCM_setupEncrypt() * and AESGCM_oneStepEncrypt() functions will be overwritten with a * randomly generated IV. Not supported by all implementations. */ @@ -477,7 +480,8 @@ typedef struct { /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ AESGCM_OPERATION_TYPE_ENCRYPT = 1, AESGCM_OPERATION_TYPE_DECRYPT = 2, } AESGCM_OperationType; @@ -493,12 +497,13 @@ typedef enum { * * @sa AESGCM_init() */ -typedef struct AESGCM_Config { +typedef struct AESGCM_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } AESGCM_Config; /*! @@ -518,7 +523,7 @@ typedef struct AESGCM_Config { */ typedef void (*AESGCM_CallbackFxn) (AESGCM_Handle handle, int_fast16_t returnValue, - AESGCM_Operation *operation, + AESGCM_Operation* operation, AESGCM_OperationType operationType); /*! @@ -529,13 +534,14 @@ typedef void (*AESGCM_CallbackFxn) (AESGCM_Handle handle, * * @sa AESGCM_Params_init() */ -typedef struct { +typedef struct +{ AESGCM_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ AESGCM_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout before the driver returns an error in * ::AESGCM_RETURN_BEHAVIOR_BLOCKING */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } AESGCM_Params; @@ -569,7 +575,7 @@ void AESGCM_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void AESGCM_Params_init(AESGCM_Params *params); +void AESGCM_Params_init(AESGCM_Params* params); /*! * @brief This function opens a given GCM peripheral. @@ -588,7 +594,7 @@ void AESGCM_Params_init(AESGCM_Params *params); * @sa AESGCM_init() * @sa AESGCM_close() */ -AESGCM_Handle AESGCM_open(uint_least8_t index, AESGCM_Params *params); +AESGCM_Handle AESGCM_open(uint_least8_t index, AESGCM_Params* params); /*! * @brief Function to close a GCM peripheral specified by the GCM handle @@ -609,7 +615,7 @@ void AESGCM_close(AESGCM_Handle handle); * * Defaults values are all zeros. */ -void AESGCM_Operation_init(AESGCM_Operation *operationStruct); +void AESGCM_Operation_init(AESGCM_Operation* operationStruct); /*! * @brief Function to perform an AESGCM encryption + authentication operation in one call. @@ -630,7 +636,7 @@ void AESGCM_Operation_init(AESGCM_Operation *operationStruct); * * @sa AESGCM_oneStepDecrypt() */ -int_fast16_t AESGCM_oneStepEncrypt(AESGCM_Handle handle, AESGCM_Operation *operationStruct); +int_fast16_t AESGCM_oneStepEncrypt(AESGCM_Handle handle, AESGCM_Operation* operationStruct); /*! * @brief Function to perform an AESGCM decryption + verification operation in one call. @@ -652,7 +658,7 @@ int_fast16_t AESGCM_oneStepEncrypt(AESGCM_Handle handle, AESGCM_Operation *opera * * @sa AESGCM_oneStepEncrypt() */ -int_fast16_t AESGCM_oneStepDecrypt(AESGCM_Handle handle, AESGCM_Operation *operationStruct); +int_fast16_t AESGCM_oneStepDecrypt(AESGCM_Handle handle, AESGCM_Operation* operationStruct); /*! * @brief Cancels an ongoing AESGCM operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Board.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Board.h index bb9f047f..4cb56d5a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Board.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Board.h @@ -59,7 +59,7 @@ * : * } * @endcode - * + * * ## Initializing the hardware ## * * \p Board_init() must be called before any other driver API. This function @@ -74,7 +74,7 @@ * * @anchor ti_drivers_I2C_Example_portable * For example, the I2C driver adds \p Board.h symbol definitions of the form - * * bus_name - the I2C bus instance ID, + * * bus_name - the I2C bus instance ID, * * bus_name_MAXBITRATE - the maximum supported BITRATE for the bus * bus_name, and * * Board_I2C_comp_name_ADDR - the slave address for the named I2C diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDH.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDH.h index dd016269..28571e8e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDH.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDH.h @@ -401,7 +401,7 @@ extern "C" { /*! * @brief A handle that is returned from an ECDH_open() call. */ -typedef struct ECDH_Config *ECDH_Handle; +typedef struct ECDH_Config* ECDH_Handle; /*! * @brief The way in which ECC function calls return after performing an @@ -424,7 +424,8 @@ typedef struct ECDH_Config *ECDH_Handle; * |ECDH_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ ECDH_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * ECC operation goes on in the background. The registered * callback function is called after the operation completes. @@ -453,23 +454,25 @@ typedef enum { * * @sa ECDH_init() */ -typedef struct ECDH_Config { +typedef struct ECDH_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } ECDH_Config; /*! * @brief Struct containing the parameters required to generate a public key. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters for myPrivateKey */ - const CryptoKey *myPrivateKey; /*!< A pointer to the private ECC key from which the new public +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters for myPrivateKey */ + const CryptoKey* myPrivateKey; /*!< A pointer to the private ECC key from which the new public * key will be generated. (maybe your static key) */ - CryptoKey *myPublicKey; /*!< A pointer to a public ECC key which has been initialized blank. + CryptoKey* myPublicKey; /*!< A pointer to a public ECC key which has been initialized blank. * Newly generated key will be placed in this location. */ } ECDH_OperationGeneratePublicKey; @@ -477,17 +480,18 @@ typedef struct { /*! * @brief Struct containing the parameters required to compute the shared secret. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters for myPrivateKey. +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters for myPrivateKey. * If ECDH_generateKey() was used, this should be the same private key. */ - const CryptoKey *myPrivateKey; /*!< A pointer to the private ECC key which will be used in to + const CryptoKey* myPrivateKey; /*!< A pointer to the private ECC key which will be used in to * compute the shared secret. */ - const CryptoKey *theirPublicKey; /*!< A pointer to the public key of the party with whom the + const CryptoKey* theirPublicKey; /*!< A pointer to the public key of the party with whom the * shared secret will be generated. */ - CryptoKey *sharedSecret; /*!< A pointer to a CryptoKey which has been initialized blank. + CryptoKey* sharedSecret; /*!< A pointer to a CryptoKey which has been initialized blank. * The shared secret will be placed here. */ } ECDH_OperationComputeSharedSecret; @@ -495,15 +499,17 @@ typedef struct { /*! * @brief Union containing pointers to all supported operation structs. */ -typedef union { - ECDH_OperationGeneratePublicKey *generatePublicKey; /*!< A pointer to an ECDH_OperationGeneratePublicKey struct */ - ECDH_OperationComputeSharedSecret *computeSharedSecret; /*!< A pointer to an ECDH_OperationGeneratePublicKey struct */ +typedef union +{ + ECDH_OperationGeneratePublicKey* generatePublicKey; /*!< A pointer to an ECDH_OperationGeneratePublicKey struct */ + ECDH_OperationComputeSharedSecret* computeSharedSecret; /*!< A pointer to an ECDH_OperationGeneratePublicKey struct */ } ECDH_Operation; /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ ECDH_OPERATION_TYPE_GENERATE_PUBLIC_KEY = 1, ECDH_OPERATION_TYPE_COMPUTE_SHARED_SECRET = 2, } ECDH_OperationType; @@ -539,11 +545,12 @@ typedef void (*ECDH_CallbackFxn) (ECDH_Handle handle, * * @sa ECDH_Params_init() */ -typedef struct { +typedef struct +{ ECDH_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ ECDH_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout of the operation */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } ECDH_Params; @@ -577,7 +584,7 @@ void ECDH_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void ECDH_Params_init(ECDH_Params *params); +void ECDH_Params_init(ECDH_Params* params); /*! * @brief This function opens a given ECC peripheral. @@ -596,7 +603,7 @@ void ECDH_Params_init(ECDH_Params *params); * @sa ECDH_init() * @sa ECDH_close() */ -ECDH_Handle ECDH_open(uint_least8_t index, ECDH_Params *params); +ECDH_Handle ECDH_open(uint_least8_t index, ECDH_Params* params); /*! * @brief Function to close an ECC peripheral specified by the ECC handle @@ -617,7 +624,7 @@ void ECDH_close(ECDH_Handle handle); * * Defaults values are all zeros. */ -void ECDH_OperationGeneratePublicKey_init(ECDH_OperationGeneratePublicKey *operation); +void ECDH_OperationGeneratePublicKey_init(ECDH_OperationGeneratePublicKey* operation); /*! * @brief Function to initialize an ECDH_OperationComputeSharedSecret struct to its defaults @@ -627,7 +634,7 @@ void ECDH_OperationGeneratePublicKey_init(ECDH_OperationGeneratePublicKey *opera * * Defaults values are all zeros. */ -void ECDH_OperationComputeSharedSecret_init(ECDH_OperationComputeSharedSecret *operation); +void ECDH_OperationComputeSharedSecret_init(ECDH_OperationComputeSharedSecret* operation); /*! * @brief Generates a public key for use in key agreement. @@ -651,7 +658,7 @@ void ECDH_OperationComputeSharedSecret_init(ECDH_OperationComputeSharedSecret *o * @retval #ECDH_STATUS_PRIVATE_KEY_ZERO The provided private key is zero. * */ -int_fast16_t ECDH_generatePublicKey(ECDH_Handle handle, ECDH_OperationGeneratePublicKey *operation); +int_fast16_t ECDH_generatePublicKey(ECDH_Handle handle, ECDH_OperationGeneratePublicKey* operation); /*! * @brief Computes a shared secret @@ -672,7 +679,7 @@ int_fast16_t ECDH_generatePublicKey(ECDH_Handle handle, ECDH_OperationGeneratePu * @retval #ECDH_STATUS_PUBLIC_KEY_NOT_ON_CURVE The foreign public key is not a point on the specified curve. * @retval #ECDH_STATUS_PUBLIC_KEY_LARGER_THAN_PRIME One of the public key coordinates is larger the the curve's prime. */ -int_fast16_t ECDH_computeSharedSecret(ECDH_Handle handle, ECDH_OperationComputeSharedSecret *operation); +int_fast16_t ECDH_computeSharedSecret(ECDH_Handle handle, ECDH_OperationComputeSharedSecret* operation); /*! * @brief Cancels an ongoing ECDH operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDSA.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDSA.h index 5776b1b8..eed1f9b5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDSA.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECDSA.h @@ -447,7 +447,7 @@ extern "C" { /*! * @brief A handle that is returned from an ECDSA_open() call. */ -typedef struct ECDSA_Config *ECDSA_Handle; +typedef struct ECDSA_Config* ECDSA_Handle; /*! * @brief The way in which ECDSA function calls return after performing an @@ -470,7 +470,8 @@ typedef struct ECDSA_Config *ECDSA_Handle; * |ECDSA_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ ECDSA_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * ECDSA operation goes on in the background. The registered * callback function is called after the operation completes. @@ -498,37 +499,39 @@ typedef enum { * * @sa ECDSA_init() */ -typedef struct ECDSA_Config { +typedef struct ECDSA_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } ECDSA_Config; /*! * @brief Struct containing the parameters required for signing a message. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters */ - const CryptoKey *myPrivateKey; /*!< A pointer to the private ECC key that will +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters */ + const CryptoKey* myPrivateKey; /*!< A pointer to the private ECC key that will * sign the hash of the message */ - const CryptoKey *pmsn; /*!< A pointer to a per message secret number (PMSN). + const CryptoKey* pmsn; /*!< A pointer to a per message secret number (PMSN). * The number must be provided by the * application and be (0 < PMSN < curve order). * Must be of the same length as * other params of the curve used. */ - const uint8_t *hash; /*!< A pointer to the hash of the message. + const uint8_t* hash; /*!< A pointer to the hash of the message. * Must be the same length as the other curve parameters. */ - uint8_t *r; /*!< A pointer to the buffer the r component of + uint8_t* r; /*!< A pointer to the buffer the r component of * the signature will be written to. * Must be of the same length as other * params of the curve used. */ - uint8_t *s; /*!< A pointer to the buffer the s component of + uint8_t* s; /*!< A pointer to the buffer the s component of * the signature will be written to. * Must be of the same length as other * params of the curve used. @@ -538,19 +541,20 @@ typedef struct { /*! * @brief Struct containing the parameters required for verifying a message. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters */ - const CryptoKey *theirPublicKey; /*!< A pointer to the public key of the party +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters */ + const CryptoKey* theirPublicKey; /*!< A pointer to the public key of the party * that signed the hash of the message */ - const uint8_t *hash; /*!< A pointer to the hash of the message. + const uint8_t* hash; /*!< A pointer to the hash of the message. * Must be the same length as the other curve parameters. */ - const uint8_t *r; /*!< A pointer to the r component of the received + const uint8_t* r; /*!< A pointer to the r component of the received * signature. Must be of the same length * as other params of the curve used. */ - const uint8_t *s; /*!< A pointer to the s component of the received + const uint8_t* s; /*!< A pointer to the s component of the received * signature. Must be of the same length * as other params of the curve used. */ @@ -559,15 +563,17 @@ typedef struct { /*! * @brief Union containing pointers to all supported operation structs. */ -typedef union { - ECDSA_OperationSign *sign; /*!< A pointer to an ECDSA_OperationSign struct */ - ECDSA_OperationVerify *verify; /*!< A pointer to an ECDSA_OperationVerify struct */ +typedef union +{ + ECDSA_OperationSign* sign; /*!< A pointer to an ECDSA_OperationSign struct */ + ECDSA_OperationVerify* verify; /*!< A pointer to an ECDSA_OperationVerify struct */ } ECDSA_Operation; /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ ECDSA_OPERATION_TYPE_SIGN = 1, ECDSA_OPERATION_TYPE_VERIFY = 2, } ECDSA_OperationType; @@ -603,13 +609,14 @@ typedef void (*ECDSA_CallbackFxn) (ECDSA_Handle handle, * * @sa ECDSA_Params_init() */ -typedef struct { +typedef struct +{ ECDSA_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ ECDSA_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout in system ticks before the operation fails * and returns */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } ECDSA_Params; @@ -652,7 +659,7 @@ void ECDSA_close(ECDSA_Handle handle); * @sa ECDSA_init() * @sa ECDSA_close() */ -ECDSA_Handle ECDSA_open(uint_least8_t index, ECDSA_Params *params); +ECDSA_Handle ECDSA_open(uint_least8_t index, ECDSA_Params* params); /*! * @brief Function to initialize the ECDSA_Params struct to its defaults @@ -666,7 +673,7 @@ ECDSA_Handle ECDSA_open(uint_least8_t index, ECDSA_Params *params); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void ECDSA_Params_init(ECDSA_Params *params); +void ECDSA_Params_init(ECDSA_Params* params); /*! * @brief Function to initialize an ECDSA_OperationSign struct to its defaults @@ -676,7 +683,7 @@ void ECDSA_Params_init(ECDSA_Params *params); * * Defaults values are all zeros. */ -void ECDSA_OperationSign_init(ECDSA_OperationSign *operation); +void ECDSA_OperationSign_init(ECDSA_OperationSign* operation); /*! * @brief Function to initialize an ECDSA_OperationSign struct to its defaults @@ -686,7 +693,7 @@ void ECDSA_OperationSign_init(ECDSA_OperationSign *operation); * * Defaults values are all zeros. */ -void ECDSA_OperationVerify_init(ECDSA_OperationVerify *operation); +void ECDSA_OperationVerify_init(ECDSA_OperationVerify* operation); /*! * @brief Signs a hashed message. @@ -708,7 +715,7 @@ void ECDSA_OperationVerify_init(ECDSA_OperationVerify *operation); * @retval #ECDSA_STATUS_CANCELED The operation was canceled. * @retval #ECDSA_STATUS_INVALID_PMSN The PMSN passed into the the call is invalid. */ -int_fast16_t ECDSA_sign(ECDSA_Handle handle, ECDSA_OperationSign *operation); +int_fast16_t ECDSA_sign(ECDSA_Handle handle, ECDSA_OperationSign* operation); /*! * @brief Verifies a received signature matches a hash and public key @@ -733,7 +740,7 @@ int_fast16_t ECDSA_sign(ECDSA_Handle handle, ECDSA_OperationSign *operation); * @retval #ECDSA_STATUS_PUBLIC_KEY_LARGER_THAN_PRIME One of the public key coordinates is larger the the curve's prime. * @retval #ECDSA_STATUS_POINT_AT_INFINITY The public key to verify against is the point at infinity. */ -int_fast16_t ECDSA_verify(ECDSA_Handle handle, ECDSA_OperationVerify *operation); +int_fast16_t ECDSA_verify(ECDSA_Handle handle, ECDSA_OperationVerify* operation); /*! * @brief Cancels an ongoing ECDSA operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECJPAKE.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECJPAKE.h index af69ddcd..eba5ed6b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECJPAKE.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ECJPAKE.h @@ -740,7 +740,7 @@ extern "C" { /*! * @brief A handle that is returned from an ECJPAKE_open() call. */ -typedef struct ECJPAKE_Config *ECJPAKE_Handle; +typedef struct ECJPAKE_Config* ECJPAKE_Handle; /*! * @brief The way in which ECJPAKE function calls return after performing an @@ -763,7 +763,8 @@ typedef struct ECJPAKE_Config *ECJPAKE_Handle; * |ECJPAKE_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ ECJPAKE_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * ECJPAKE operation goes on in the background. The registered * callback function is called after the operation completes. @@ -791,54 +792,56 @@ typedef enum { * * @sa ECJPAKE_init() */ -typedef struct ECJPAKE_Config { +typedef struct ECJPAKE_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } ECJPAKE_Config; /*! * @brief Struct containing the parameters required to generate the first round of keys. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters * used in the operation. */ - CryptoKey *myPrivateKey1; /*!< A pointer to a private ECC key. Must + CryptoKey* myPrivateKey1; /*!< A pointer to a private ECC key. Must * be of the same length as other params * of the curve used. */ - CryptoKey *myPrivateKey2; /*!< A pointer to a private ECC key. Must + CryptoKey* myPrivateKey2; /*!< A pointer to a private ECC key. Must * be of the same length as other params * of the curve used. */ - CryptoKey *myPublicKey1; /*!< A pointer to the blank public key of \c + CryptoKey* myPublicKey1; /*!< A pointer to the blank public key of \c * myPrivateKey1. The keying material will be * written to the buffer specified in the * CryptoKey. */ - CryptoKey *myPublicKey2; /*!< A pointer to the blank public key of \c + CryptoKey* myPublicKey2; /*!< A pointer to the blank public key of \c * myPrivateKey2. The keying material will be * written to the buffer specified in the * CryptoKey. */ - CryptoKey *myPrivateV1; /*!< A pointer to a private ECC key used in the + CryptoKey* myPrivateV1; /*!< A pointer to a private ECC key used in the * first Schnorr ZKP. * Must be of the same length as other params * of the curve used. The CryptoKey and keying material * may be deleted or go out of scope after * generating the ZKP. */ - CryptoKey *myPrivateV2; /*!< A pointer to a private ECC key used in the + CryptoKey* myPrivateV2; /*!< A pointer to a private ECC key used in the * second Schnorr ZKP. * Must be of the same length as other params * of the curve used. The CryptoKey and keying material * may be deleted or go out of scope after * generating the ZKP. */ - CryptoKey *myPublicV1; /*!< A pointer to the blank public key of \c + CryptoKey* myPublicV1; /*!< A pointer to the blank public key of \c * myPrivateV1. The keying material will be * written to the buffer specified in the * CryptoKey. The CryptoKey and keying material @@ -847,7 +850,7 @@ typedef struct { * to the other party with the rest of the * parameters. */ - CryptoKey *myPublicV2; /*!< A pointer to the blank public key of \c + CryptoKey* myPublicV2; /*!< A pointer to the blank public key of \c * myPrivateV2. The keying material will be * written to the buffer specified in the * CryptoKey. The CryptoKey and keying material @@ -861,24 +864,25 @@ typedef struct { /*! * @brief Struct containing the parameters required to generate a ZKP. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters * used in the operation. */ - const CryptoKey *myPrivateKey; /*!< A pointer to a private ECC key to be signed. Must + const CryptoKey* myPrivateKey; /*!< A pointer to a private ECC key to be signed. Must * be of the same length as other params * of the curve used. */ - const CryptoKey *myPrivateV; /*!< A pointer to a private ECC key that will be + const CryptoKey* myPrivateV; /*!< A pointer to a private ECC key that will be * used only to generate a ZKP signature. * Must be of the same length as other params * of the curve used. */ - const uint8_t *hash; /*!< A pointer to the hash of the message. + const uint8_t* hash; /*!< A pointer to the hash of the message. * Must be of the same length as other params * of the curve used. */ - uint8_t *r; /*!< A pointer to where the r component of the + uint8_t* r; /*!< A pointer to where the r component of the * ZKP will be written to. */ } ECJPAKE_OperationGenerateZKP; @@ -886,27 +890,28 @@ typedef struct { /*! * @brief Struct containing the parameters required to verify a ZKP. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters * used in the operation. */ - const CryptoKey *theirGenerator; /*!< A CryptoKey describing the generator point + const CryptoKey* theirGenerator; /*!< A CryptoKey describing the generator point * to be used. In the first round, this will * be the default generator of the curve. * In the second round, this parameter is * computed by ECJPAKE_roundTwoGenerateKeys(). */ - const CryptoKey *theirPublicKey; /*!< A CryptoKey describing the public key + const CryptoKey* theirPublicKey; /*!< A CryptoKey describing the public key * received from the other party that the * ZKP to be verified supposedly signed. */ - const CryptoKey *theirPublicV; /*!< A CryptoKey describing the public V of the + const CryptoKey* theirPublicV; /*!< A CryptoKey describing the public V of the * ZKP. Received from the other party. */ - const uint8_t *hash; /*!< The hash of the ZKP generated as the + const uint8_t* hash; /*!< The hash of the ZKP generated as the * other party generated it to compute r. */ - const uint8_t *r; /*!< R component of the ZKP signature. Received + const uint8_t* r; /*!< R component of the ZKP signature. Received * from the other party. */ } ECJPAKE_OperationVerifyZKP; @@ -914,27 +919,28 @@ typedef struct { /*! * @brief Struct containing the parameters required to generate the second round keys. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters * used in the operation. */ - const CryptoKey *myPrivateKey2; /*!< A pointer to a private ECC key. Must + const CryptoKey* myPrivateKey2; /*!< A pointer to a private ECC key. Must * be of the same length as other params * of the curve used. Generated in round one. */ - const CryptoKey *myPublicKey1; /*!< A pointer to the public key of + const CryptoKey* myPublicKey1; /*!< A pointer to the public key of * myPrivateKey1. Generated in round one. */ - const CryptoKey *myPublicKey2; /*!< A pointer to the second public key. + const CryptoKey* myPublicKey2; /*!< A pointer to the second public key. * Generated in round one. */ - const CryptoKey *theirPublicKey1; /*!< A CryptoKey describing the first public key + const CryptoKey* theirPublicKey1; /*!< A CryptoKey describing the first public key * received from the other party. */ - const CryptoKey *theirPublicKey2; /*!< A CryptoKey describing the second public key + const CryptoKey* theirPublicKey2; /*!< A CryptoKey describing the second public key * received from the other party. */ - const CryptoKey *preSharedSecret; /*!< A CryptoKey describing the secret shared between + const CryptoKey* preSharedSecret; /*!< A CryptoKey describing the secret shared between * the two parties prior to starting the scheme. * This exchange would have happened through some * offline commissioning scheme most likely. @@ -943,34 +949,34 @@ typedef struct { * keying material even if the original pre-shared * secret is shorter than this length. */ - CryptoKey *theirNewGenerator; /*!< A blank CryptoKey describing the generator point + CryptoKey* theirNewGenerator; /*!< A blank CryptoKey describing the generator point * used by the other party in the second round. * After it is computed, the keying material will * be written to the location described in the * CryptoKey. */ - CryptoKey *myNewGenerator; /*!< A blank CryptoKey describing the generator point + CryptoKey* myNewGenerator; /*!< A blank CryptoKey describing the generator point * used by the application in the second round. * After it is computed, the keying material will * be written to the location described in the * CryptoKey. */ - CryptoKey *myCombinedPrivateKey; /*!< A pointer to a public ECC key. Must + CryptoKey* myCombinedPrivateKey; /*!< A pointer to a public ECC key. Must * be of the same length as other params * of the curve used. Result of multiplying * \c myCombinedPrivateKey by \c myNewGenerator. */ - CryptoKey *myCombinedPublicKey; /*!< A pointer to a public ECC key. Result of multiplying + CryptoKey* myCombinedPublicKey; /*!< A pointer to a public ECC key. Result of multiplying * \c myCombinedPrivateKey by \c myNewGenerator. */ - CryptoKey *myPrivateV; /*!< A pointer to a private ECC key used in the + CryptoKey* myPrivateV; /*!< A pointer to a private ECC key used in the * only second-round Schnorr ZKP. * Must be of the same length as other params * of the curve used. The CryptoKey and keying material * may be deleted or go out of scope after * generating the ZKP. */ - CryptoKey *myPublicV; /*!< A pointer to the blank public key of \c + CryptoKey* myPublicV; /*!< A pointer to the blank public key of \c * myPrivateV. The keying material will be * written to the buffer specified in the * CryptoKey. The CryptoKey and keying material @@ -984,27 +990,28 @@ typedef struct { /*! * @brief Struct containing the parameters required to compute the shared secret. */ -typedef struct { - const ECCParams_CurveParams *curve; /*!< A pointer to the elliptic curve parameters +typedef struct +{ + const ECCParams_CurveParams* curve; /*!< A pointer to the elliptic curve parameters * used in the operation. */ - const CryptoKey *myCombinedPrivateKey; /*!< A pointer to a private ECC key. Must + const CryptoKey* myCombinedPrivateKey; /*!< A pointer to a private ECC key. Must * be of the same length as other params * of the curve used. Generated in round one. */ - const CryptoKey *theirCombinedPublicKey; /*!< A CryptoKey describing the second public key + const CryptoKey* theirCombinedPublicKey; /*!< A CryptoKey describing the second public key * received from the other party. */ - const CryptoKey *theirPublicKey2; /*!< A pointer to a private ECC key. Must + const CryptoKey* theirPublicKey2; /*!< A pointer to a private ECC key. Must * be of the same length as other params * of the curve used. Result of multiplying * \c myPrivateKey2 by \c preSharedSecret. */ - const CryptoKey *myPrivateKey2; /*!< Combined public key received in the second + const CryptoKey* myPrivateKey2; /*!< Combined public key received in the second * round and verified by the application against * the second round ZKP signature. */ - CryptoKey *sharedSecret; /*!< The shared secret that is identical between both + CryptoKey* sharedSecret; /*!< The shared secret that is identical between both * parties. */ } ECJPAKE_OperationComputeSharedSecret; @@ -1013,18 +1020,20 @@ typedef struct { /*! * @brief Union containing pointers to all supported operation structs. */ -typedef union { - ECJPAKE_OperationRoundOneGenerateKeys *generateRoundOneKeys; /*!< A pointer to an ECJPAKE_OperationRoundOneGenerateKeys struct */ - ECJPAKE_OperationGenerateZKP *generateZKP; /*!< A pointer to an ECJPAKE_OperationGenerateZKP struct */ - ECJPAKE_OperationVerifyZKP *verifyZKP; /*!< A pointer to an ECJPAKE_OperationVerifyZKP struct */ - ECJPAKE_OperationRoundTwoGenerateKeys *generateRoundTwoKeys; /*!< A pointer to an ECJPAKE_OperationRoundTwoGenerateKeys struct */ - ECJPAKE_OperationComputeSharedSecret *computeSharedSecret; /*!< A pointer to an ECJPAKE_OperationComputeSharedSecret struct */ +typedef union +{ + ECJPAKE_OperationRoundOneGenerateKeys* generateRoundOneKeys; /*!< A pointer to an ECJPAKE_OperationRoundOneGenerateKeys struct */ + ECJPAKE_OperationGenerateZKP* generateZKP; /*!< A pointer to an ECJPAKE_OperationGenerateZKP struct */ + ECJPAKE_OperationVerifyZKP* verifyZKP; /*!< A pointer to an ECJPAKE_OperationVerifyZKP struct */ + ECJPAKE_OperationRoundTwoGenerateKeys* generateRoundTwoKeys; /*!< A pointer to an ECJPAKE_OperationRoundTwoGenerateKeys struct */ + ECJPAKE_OperationComputeSharedSecret* computeSharedSecret; /*!< A pointer to an ECJPAKE_OperationComputeSharedSecret struct */ } ECJPAKE_Operation; /*! * @brief Enum for the operation types supported by the driver. */ -typedef enum { +typedef enum +{ ECJPAKE_OPERATION_TYPE_ROUND_ONE_GENERATE_KEYS = 1, ECJPAKE_OPERATION_TYPE_GENERATE_ZKP = 2, ECJPAKE_OPERATION_TYPE_VERIFY_ZKP = 3, @@ -1063,13 +1072,14 @@ typedef void (*ECJPAKE_CallbackFxn) (ECJPAKE_Handle handle, * * @sa ECJPAKE_Params_init() */ -typedef struct { +typedef struct +{ ECJPAKE_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ ECJPAKE_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout in system ticks before the operation fails * and returns */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } ECJPAKE_Params; @@ -1092,7 +1102,7 @@ void ECJPAKE_init(void); * * Defaults values are all zeros. */ -void ECJPAKE_OperationRoundOneGenerateKeys_init(ECJPAKE_OperationRoundOneGenerateKeys *operation); +void ECJPAKE_OperationRoundOneGenerateKeys_init(ECJPAKE_OperationRoundOneGenerateKeys* operation); /*! * @brief Function to initialize an ECJPAKE_OperationGenerateZKP struct to its defaults @@ -1102,7 +1112,7 @@ void ECJPAKE_OperationRoundOneGenerateKeys_init(ECJPAKE_OperationRoundOneGenerat * * Defaults values are all zeros. */ -void ECJPAKE_OperationGenerateZKP_init(ECJPAKE_OperationGenerateZKP *operation); +void ECJPAKE_OperationGenerateZKP_init(ECJPAKE_OperationGenerateZKP* operation); /*! * @brief Function to initialize an ECJPAKE_OperationVerifyZKP struct to its defaults @@ -1112,7 +1122,7 @@ void ECJPAKE_OperationGenerateZKP_init(ECJPAKE_OperationGenerateZKP *operation); * * Defaults values are all zeros. */ -void ECJPAKE_OperationVerifyZKP_init(ECJPAKE_OperationVerifyZKP *operation); +void ECJPAKE_OperationVerifyZKP_init(ECJPAKE_OperationVerifyZKP* operation); /*! * @brief Function to initialize an ECJPAKE_OperationRoundTwoGenerateKeys struct to its defaults @@ -1122,7 +1132,7 @@ void ECJPAKE_OperationVerifyZKP_init(ECJPAKE_OperationVerifyZKP *operation); * * Defaults values are all zeros. */ -void ECJPAKE_OperationRoundTwoGenerateKeys_init(ECJPAKE_OperationRoundTwoGenerateKeys *operation); +void ECJPAKE_OperationRoundTwoGenerateKeys_init(ECJPAKE_OperationRoundTwoGenerateKeys* operation); /*! @@ -1133,7 +1143,7 @@ void ECJPAKE_OperationRoundTwoGenerateKeys_init(ECJPAKE_OperationRoundTwoGenerat * * Defaults values are all zeros. */ -void ECJPAKE_OperationComputeSharedSecret_init(ECJPAKE_OperationComputeSharedSecret *operation); +void ECJPAKE_OperationComputeSharedSecret_init(ECJPAKE_OperationComputeSharedSecret* operation); /*! * @brief Function to close an ECJPAKE peripheral specified by the ECJPAKE handle @@ -1163,7 +1173,7 @@ void ECJPAKE_close(ECJPAKE_Handle handle); * @sa ECJPAKE_init() * @sa ECJPAKE_close() */ -ECJPAKE_Handle ECJPAKE_open(uint_least8_t index, ECJPAKE_Params *params); +ECJPAKE_Handle ECJPAKE_open(uint_least8_t index, ECJPAKE_Params* params); /*! * @brief Function to initialize the ECJPAKE_Params struct to its defaults @@ -1177,7 +1187,7 @@ ECJPAKE_Handle ECJPAKE_open(uint_least8_t index, ECJPAKE_Params *params); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void ECJPAKE_Params_init(ECJPAKE_Params *params); +void ECJPAKE_Params_init(ECJPAKE_Params* params); /*! * @brief Generates all public and private keying material for the first round of @@ -1204,7 +1214,7 @@ void ECJPAKE_Params_init(ECJPAKE_Params *params); * @retval #ECJPAKE_STATUS_INVALID_PRIVATE_V The private v passed into the the call is invalid. * */ -int_fast16_t ECJPAKE_roundOneGenerateKeys(ECJPAKE_Handle handle, ECJPAKE_OperationRoundOneGenerateKeys *operation); +int_fast16_t ECJPAKE_roundOneGenerateKeys(ECJPAKE_Handle handle, ECJPAKE_OperationRoundOneGenerateKeys* operation); /*! * @brief Generates the \c r component of a Schnorr Zero-Knowledge Proof (ZKP) signature. @@ -1238,32 +1248,32 @@ int_fast16_t ECJPAKE_roundOneGenerateKeys(ECJPAKE_Handle handle, ECJPAKE_Operati * @retval #ECJPAKE_STATUS_RESOURCE_UNAVAILABLE The required hardware resource was not available. Try again later. * @retval #ECJPAKE_STATUS_CANCELED The operation was canceled. */ -int_fast16_t ECJPAKE_generateZKP(ECJPAKE_Handle handle, ECJPAKE_OperationGenerateZKP *operation); +int_fast16_t ECJPAKE_generateZKP(ECJPAKE_Handle handle, ECJPAKE_OperationGenerateZKP* operation); - /*! - * @brief Verifies a Schnorr Zero-Knowledge Proof (ZKP) signature. - * - * This function computes if a received Schnorr ZKP correctly verifies - * a received public key. - * - * @param [in] handle An ECJPAKE handle returned from ECJPAKE_open() - * - * @param [in] operation A pointer to a struct containing the requisite - * parameters to execute the function. - * - * @pre Receive the relevant ZKP signature parameters. Compute the hash. - * If in the second round, compute the generator first by calling - * ECJPAKE_roundTwoGenerateKeys(). - * Call ECJPAKE_OperationVerifyZKP_init() on /c operation. - * - * @retval #ECJPAKE_STATUS_SUCCESS The operation succeeded. - * @retval #ECJPAKE_STATUS_ERROR The operation failed. Signature did not verify correctly. - * @retval #ECJPAKE_STATUS_RESOURCE_UNAVAILABLE The required hardware resource was not available. Try again later. - * @retval #ECJPAKE_STATUS_CANCELED The operation was canceled. - * @retval #ECJPAKE_STATUS_PUBLIC_KEY_NOT_ON_CURVE The public key of the other party does not lie upon the curve. - * @retval #ECJPAKE_STATUS_PUBLIC_KEY_LARGER_THAN_PRIME A coordinate of the public key of the other party is too large. - */ -int_fast16_t ECJPAKE_verifyZKP(ECJPAKE_Handle handle, ECJPAKE_OperationVerifyZKP *operation); +/*! +* @brief Verifies a Schnorr Zero-Knowledge Proof (ZKP) signature. +* +* This function computes if a received Schnorr ZKP correctly verifies +* a received public key. +* +* @param [in] handle An ECJPAKE handle returned from ECJPAKE_open() +* +* @param [in] operation A pointer to a struct containing the requisite +* parameters to execute the function. +* +* @pre Receive the relevant ZKP signature parameters. Compute the hash. +* If in the second round, compute the generator first by calling +* ECJPAKE_roundTwoGenerateKeys(). +* Call ECJPAKE_OperationVerifyZKP_init() on /c operation. +* +* @retval #ECJPAKE_STATUS_SUCCESS The operation succeeded. +* @retval #ECJPAKE_STATUS_ERROR The operation failed. Signature did not verify correctly. +* @retval #ECJPAKE_STATUS_RESOURCE_UNAVAILABLE The required hardware resource was not available. Try again later. +* @retval #ECJPAKE_STATUS_CANCELED The operation was canceled. +* @retval #ECJPAKE_STATUS_PUBLIC_KEY_NOT_ON_CURVE The public key of the other party does not lie upon the curve. +* @retval #ECJPAKE_STATUS_PUBLIC_KEY_LARGER_THAN_PRIME A coordinate of the public key of the other party is too large. +*/ +int_fast16_t ECJPAKE_verifyZKP(ECJPAKE_Handle handle, ECJPAKE_OperationVerifyZKP* operation); /*! * @brief Generates all public and private keying material for the first round of @@ -1288,7 +1298,7 @@ int_fast16_t ECJPAKE_verifyZKP(ECJPAKE_Handle handle, ECJPAKE_OperationVerifyZKP * @retval #ECJPAKE_STATUS_INVALID_PRIVATE_KEY The private key passed into the the call is invalid. * @retval #ECJPAKE_STATUS_INVALID_PRIVATE_V The private v passed into the the call is invalid. */ -int_fast16_t ECJPAKE_roundTwoGenerateKeys(ECJPAKE_Handle handle, ECJPAKE_OperationRoundTwoGenerateKeys *operation); +int_fast16_t ECJPAKE_roundTwoGenerateKeys(ECJPAKE_Handle handle, ECJPAKE_OperationRoundTwoGenerateKeys* operation); /*! * @brief Computes the shared secret. @@ -1315,7 +1325,7 @@ int_fast16_t ECJPAKE_roundTwoGenerateKeys(ECJPAKE_Handle handle, ECJPAKE_Operati * @retval #ECJPAKE_STATUS_RESOURCE_UNAVAILABLE The required hardware resource was not available. Try again later. * @retval #ECJPAKE_STATUS_CANCELED The operation was canceled. */ -int_fast16_t ECJPAKE_computeSharedSecret(ECJPAKE_Handle handle, ECJPAKE_OperationComputeSharedSecret *operation); +int_fast16_t ECJPAKE_computeSharedSecret(ECJPAKE_Handle handle, ECJPAKE_OperationComputeSharedSecret* operation); /*! * @brief Cancels an ongoing ECJPAKE operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/GPIO.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/GPIO.h index 7462f8b0..486b22c6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/GPIO.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/GPIO.h @@ -468,7 +468,7 @@ extern void GPIO_enableInt(uint_least8_t index); * @param pinConfig Location to store device specific pin * configuration settings */ -extern void GPIO_getConfig(uint_least8_t index, GPIO_PinConfig *pinConfig); +extern void GPIO_getConfig(uint_least8_t index, GPIO_PinConfig* pinConfig); /*! * @brief Initializes the GPIO module @@ -531,7 +531,7 @@ extern void GPIO_setCallback(uint_least8_t index, GPIO_CallbackFxn callback); * @param pinConfig device specific pin configuration settings */ extern int_fast16_t GPIO_setConfig(uint_least8_t index, - GPIO_PinConfig pinConfig); + GPIO_PinConfig pinConfig); /*! * @brief Toggles the current state of a GPIO diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2C.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2C.h index f5f6350b..0f5d8372 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2C.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2C.h @@ -370,19 +370,20 @@ extern "C" { /*! * @brief A handle that is returned from an I2C_open() call. */ -typedef struct I2C_Config_ *I2C_Handle; +typedef struct I2C_Config_* I2C_Handle; /*! * @brief Defines a transaction to be used with I2C_transfer() * * @sa I2C_transfer() */ -typedef struct { +typedef struct +{ /*! * Pointer to a buffer of at least #I2C_Transaction.writeCount bytes. * If #I2C_Transaction.writeCount is 0, this pointer is not used. */ - void *writeBuf; + void* writeBuf; /*! * Number of bytes to write to the I2C slave device. A value of 0 @@ -404,7 +405,7 @@ typedef struct { * Pointer to a buffer of at least #I2C_Transaction.readCount bytes. * If #I2C_Transaction.readCount is 0, this pointer is not used. */ - void *readBuf; + void* readBuf; /*! * Number of bytes to read from the I2C slave device. A value of 0 @@ -438,13 +439,13 @@ typedef struct { * @sa #I2C_MODE_CALLBACK * @sa #I2C_CallbackFxn */ - void *arg; + void* arg; /*! * @private This is reserved for use by the driver and must never be * modified by the application. */ - void *nextPtr; + void* nextPtr; } I2C_Transaction; /*! @@ -454,7 +455,8 @@ typedef struct { * * @sa #I2C_Params */ -typedef enum { +typedef enum +{ /*! * In #I2C_MODE_BLOCKING, calls to I2C_transfer() block until the * #I2C_Transaction completes. Other threads calling I2C_transfer() @@ -504,8 +506,8 @@ typedef enum { * was successful. If @p true, the transaction was successful. If @p false, * the transaction failed. */ -typedef void (*I2C_CallbackFxn)(I2C_Handle handle, I2C_Transaction *transaction, - bool transferStatus); +typedef void (*I2C_CallbackFxn)(I2C_Handle handle, I2C_Transaction* transaction, + bool transferStatus); /*! * @brief Bit rate for an I2C driver instance specified in the #I2C_Params. @@ -515,7 +517,8 @@ typedef void (*I2C_CallbackFxn)(I2C_Handle handle, I2C_Transaction *transaction, * @note You must check that the device specific implementation supports the * desired #I2C_BitRate. */ -typedef enum { +typedef enum +{ I2C_100kHz = 0, /*!< I2C Standard-mode. Up to 100 kbit/s. */ I2C_400kHz = 1, /*!< I2C Fast-mode. Up to 400 kbit/s. */ I2C_1000kHz = 2, /*!< I2C Fast-mode Plus. Up to 1Mbit/s. */ @@ -531,7 +534,8 @@ typedef enum { * * @sa I2C_Params_init() */ -typedef struct { +typedef struct +{ /*! #I2C_TransferMode for all I2C transfers. */ I2C_TransferMode transferMode; @@ -548,7 +552,7 @@ typedef struct { I2C_BitRate bitRate; /*! Pointer to a device specific extension of the #I2C_Params */ - void *custom; + void* custom; } I2C_Params; /*! @@ -571,7 +575,7 @@ typedef void (*I2C_CloseFxn) (I2C_Handle handle); * I2C_control(). */ typedef int_fast16_t (*I2C_ControlFxn) (I2C_Handle handle, uint_fast16_t cmd, - void *controlArg); + void* controlArg); /*! * @private @@ -585,7 +589,7 @@ typedef void (*I2C_InitFxn) (I2C_Handle handle); * @brief A function pointer to a driver-specific implementation of * I2C_open(). */ -typedef I2C_Handle (*I2C_OpenFxn) (I2C_Handle handle, I2C_Params *params); +typedef I2C_Handle (*I2C_OpenFxn) (I2C_Handle handle, I2C_Params* params); /*! * @private @@ -593,14 +597,15 @@ typedef I2C_Handle (*I2C_OpenFxn) (I2C_Handle handle, I2C_Params *params); * I2C_transfer(). */ typedef bool (*I2C_TransferFxn) (I2C_Handle handle, - I2C_Transaction *transaction); + I2C_Transaction* transaction); /*! * @brief The definition of an I2C function table that contains the * required set of functions to control a specific I2C driver * implementation. */ -typedef struct I2C_FxnTable_ { +typedef struct I2C_FxnTable_ +{ I2C_CancelFxn cancelFxn; I2C_CloseFxn closeFxn; I2C_ControlFxn controlFxn; @@ -616,17 +621,18 @@ typedef struct I2C_FxnTable_ { * @sa I2C_init() * @sa I2C_open() */ -typedef struct I2C_Config_ { +typedef struct I2C_Config_ +{ /*! Pointer to a @ref driver_function_table "function pointer table" * with driver-specific implementations of I2C APIs */ - I2C_FxnTable const *fxnTablePtr; + I2C_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific @ref driver_objects "data object". */ - void *object; + void* object; /*! Pointer to a driver specific @ref driver_hardware_attributes * "hardware attributes structure". */ - void const *hwAttrs; + void const* hwAttrs; } I2C_Config; /*! @@ -683,7 +689,7 @@ extern void I2C_close(I2C_Handle handle); * the device specific implementation. */ extern int_fast16_t I2C_control(I2C_Handle handle, uint_fast16_t cmd, - void *controlArg); + void* controlArg); /*! * @brief Function to initialize the I2C driver. @@ -707,7 +713,7 @@ extern void I2C_init(void); * @sa I2C_init() * @sa I2C_close() */ -extern I2C_Handle I2C_open(uint_least8_t index, I2C_Params *params); +extern I2C_Handle I2C_open(uint_least8_t index, I2C_Params* params); /*! * @brief Initialize an #I2C_Params structure to its default values. @@ -721,7 +727,7 @@ extern I2C_Handle I2C_open(uint_least8_t index, I2C_Params *params); * @arg #I2C_Params.bitRate = #I2C_100kHz * @arg #I2C_Params.custom = @p NULL */ -extern void I2C_Params_init(I2C_Params *params); +extern void I2C_Params_init(I2C_Params* params); /*! * @brief Perform an I2C transaction with an I2C slave peripheral. @@ -754,7 +760,7 @@ extern void I2C_Params_init(I2C_Params *params); * @sa I2C_open() * @sa I2C_Transaction */ -extern bool I2C_transfer(I2C_Handle handle, I2C_Transaction *transaction); +extern bool I2C_transfer(I2C_Handle handle, I2C_Transaction* transaction); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2S.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2S.h index 690a9522..c775067d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2S.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/I2S.h @@ -578,86 +578,87 @@ extern "C" { #endif - /** - * @defgroup I2S_STATUS Status Codes - * I2S_STATUS_* macros are general status codes used when user callback is called - * @{ - * @ingroup I2S_CONTROL - */ - - /*! - * @brief Successful status code returned by I2S driver functions. - * - * I2S driver functions return I2S_ALL_TRANSACTION_SUCCESS if ALL the queued transactions - * were executed successfully. - */ - #define I2S_ALL_TRANSACTIONS_SUCCESS (0x0001U) - - /*! - * @brief Successful status code returned by I2S driver functions. - * - * I2S driver functions return I2S_TRANSACTION_SUCCESS if ONE queued transaction - * was executed successfully. - */ - #define I2S_TRANSACTION_SUCCESS (0x0002U) - - /*! - * @brief Error status code returned by I2S driver functions. - * - * I2S driver functions return I2S_TIMEOUT_ERROR if I2S module lost the audio clock. - * If this error has been raised, I2S module must be reseted and restarted. - */ - #define I2S_TIMEOUT_ERROR (0x0100U) - - /*! - * @brief Error status code returned by I2S driver functions. - * - * I2S driver functions return I2S_BUS_ERROR if I2S module faced problem with the DMA - * bus (DMA transfer not completed in time). - * If this error has been raised, I2S module must be reseted and restarted. - */ - #define I2S_BUS_ERROR (0x0200U) - - /*! - * @brief Error status code returned by I2S driver functions. - * - * I2S driver functions return I2S_WS_ERROR if I2S module detect noise on the WS signal. - * If this error has been raised, I2S module must be reseted and restarted. - */ - #define I2S_WS_ERROR (0x0400U) - - /*! - * @brief Error status code returned by I2S driver functions. - * - * I2S driver functions return I2S_PTR_READ_ERROR if I2S module ran out of data - * on the read interface (DMA pointer not loaded in time). - * If this error has been raised, I2S module must be reseted and restarted. - */ - #define I2S_PTR_READ_ERROR (0x0800U) - - /*! - * @brief Error status code returned by I2S driver functions. - * - * I2S driver functions return I2S_PTR_WRITE_ERROR if I2S module ran out of data - * on the write interface (DMA pointer not loaded in time). - * If this error has been raised, I2S module must be reseted and restarted. - */ - #define I2S_PTR_WRITE_ERROR (0x1000U) - /** @}*/ +/** + * @defgroup I2S_STATUS Status Codes + * I2S_STATUS_* macros are general status codes used when user callback is called + * @{ + * @ingroup I2S_CONTROL + */ + +/*! + * @brief Successful status code returned by I2S driver functions. + * + * I2S driver functions return I2S_ALL_TRANSACTION_SUCCESS if ALL the queued transactions + * were executed successfully. + */ +#define I2S_ALL_TRANSACTIONS_SUCCESS (0x0001U) + +/*! + * @brief Successful status code returned by I2S driver functions. + * + * I2S driver functions return I2S_TRANSACTION_SUCCESS if ONE queued transaction + * was executed successfully. + */ +#define I2S_TRANSACTION_SUCCESS (0x0002U) + +/*! + * @brief Error status code returned by I2S driver functions. + * + * I2S driver functions return I2S_TIMEOUT_ERROR if I2S module lost the audio clock. + * If this error has been raised, I2S module must be reseted and restarted. + */ +#define I2S_TIMEOUT_ERROR (0x0100U) + +/*! + * @brief Error status code returned by I2S driver functions. + * + * I2S driver functions return I2S_BUS_ERROR if I2S module faced problem with the DMA + * bus (DMA transfer not completed in time). + * If this error has been raised, I2S module must be reseted and restarted. + */ +#define I2S_BUS_ERROR (0x0200U) + +/*! + * @brief Error status code returned by I2S driver functions. + * + * I2S driver functions return I2S_WS_ERROR if I2S module detect noise on the WS signal. + * If this error has been raised, I2S module must be reseted and restarted. + */ +#define I2S_WS_ERROR (0x0400U) + +/*! + * @brief Error status code returned by I2S driver functions. + * + * I2S driver functions return I2S_PTR_READ_ERROR if I2S module ran out of data + * on the read interface (DMA pointer not loaded in time). + * If this error has been raised, I2S module must be reseted and restarted. + */ +#define I2S_PTR_READ_ERROR (0x0800U) + +/*! + * @brief Error status code returned by I2S driver functions. + * + * I2S driver functions return I2S_PTR_WRITE_ERROR if I2S module ran out of data + * on the write interface (DMA pointer not loaded in time). + * If this error has been raised, I2S module must be reseted and restarted. + */ +#define I2S_PTR_WRITE_ERROR (0x1000U) +/** @}*/ /*! * @brief A handle that is returned from a I2S_open() call. */ -typedef struct I2S_Config_ *I2S_Handle; +typedef struct I2S_Config_* I2S_Handle; /*! * @brief I2S transaction descriptor. */ -typedef struct I2S_Transaction_ { +typedef struct I2S_Transaction_ +{ /*! Used internally to link descriptors together */ List_Elem queueElement; /*! Pointer to the buffer */ - void *bufPtr; + void* bufPtr; /*! Size of the buffer. */ size_t bufSize; /*! Internal use only. Number of bytes written to or read from the buffer. */ @@ -683,7 +684,7 @@ typedef struct I2S_Transaction_ { * For error calbacks, transactionPtr points on NULL. * */ -typedef void (*I2S_Callback)(I2S_Handle handle, int_fast16_t status, I2S_Transaction *transactionPtr); +typedef void (*I2S_Callback)(I2S_Handle handle, int_fast16_t status, I2S_Transaction* transactionPtr); /*! * @brief The definition of a function used to set the I2S register @@ -701,7 +702,8 @@ typedef void (*I2S_RegUpdate)(uint32_t ui32Base, uint32_t ui32NextPointer); * The enum defines if the module uses a 16 bits or a 24 bits buffer in memory. * This value has no influence on the number of bit transmitted. */ -typedef enum I2S_MemoryLength_ { +typedef enum I2S_MemoryLength_ +{ I2S_MEMORY_LENGTH_8BITS = 8U, /*!< Buffer used is 8 bits length. Not available for CC26XX. */ I2S_MEMORY_LENGTH_16BITS = 16U, /*!< Buffer used is 16 bits length. */ @@ -716,7 +718,8 @@ typedef enum I2S_MemoryLength_ { * The enum defines if the module acts like a master (clocks are internally generated) * or a slave (the clocks are externally generated). */ -typedef enum I2S_Role_ { +typedef enum I2S_Role_ +{ I2S_SLAVE = 0, /*!< Module is a slave, clocks are externally generated. */ I2S_MASTER = 1 /*!< Module is a master, clocks are internally generated. */ @@ -728,7 +731,8 @@ typedef enum I2S_Role_ { * * The enum defines if sampling is done on BLCK rising or falling edges. */ -typedef enum I2S_SamplingEdge_ { +typedef enum I2S_SamplingEdge_ +{ I2S_SAMPLING_EDGE_FALLING = 0, /*!< Sampling on falling edges. */ I2S_SAMPLING_EDGE_RISING = 1 /*!< Sampling on rising edges. */ @@ -740,7 +744,8 @@ typedef enum I2S_SamplingEdge_ { * * The enum defines if the I2S if set with single or dual phase. */ -typedef enum I2S_PhaseType_ { +typedef enum I2S_PhaseType_ +{ I2S_PHASE_TYPE_SINGLE = 0U, /*!< Single phase */ I2S_PHASE_TYPE_DUAL = 1U, /*!< Dual phase */ @@ -752,7 +757,8 @@ typedef enum I2S_PhaseType_ { * * The enum defines the different settings for the data interfaces (SD0 and SD1). */ -typedef enum I2S_DataInterfaceUse_ { +typedef enum I2S_DataInterfaceUse_ +{ I2S_SD0_DISABLED = 0x00U, /*!< SD0 is disabled */ I2S_SD0_INPUT = 0x01U, /*!< SD0 is an input */ @@ -768,7 +774,8 @@ typedef enum I2S_DataInterfaceUse_ { * * The enum defines different settings to activate the expected channels. */ -typedef enum I2S_ChannelConfig_ { +typedef enum I2S_ChannelConfig_ +{ I2S_CHANNELS_NONE = 0x00U, /*!< No channel activated */ I2S_CHANNELS_MONO = 0x01U, /*!< MONO: only channel one is activated */ @@ -794,7 +801,8 @@ typedef enum I2S_ChannelConfig_ { * * @sa I2S_Params_init() */ -typedef struct I2S_Params_ { +typedef struct I2S_Params_ +{ bool invertWS; /*!< WS must be internally inverted when using I2S data format. @@ -928,7 +936,7 @@ typedef struct I2S_Params_ { I2S_Callback errorCallback; /*!< Pointer to error callback. Cannot be NULL. */ - void *custom; + void* custom; /*!< Pointer to device specific custom params */ } I2S_Params; @@ -949,12 +957,13 @@ extern const I2S_Params I2S_defaultParams; * * @sa I2S_init() */ -typedef struct I2S_Config_ { +typedef struct I2S_Config_ +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } I2S_Config; /*! @@ -999,7 +1008,7 @@ extern void I2S_init(void); * @sa I2S_init() * @sa I2S_close() */ -extern I2S_Handle I2S_open(uint_least8_t index, I2S_Params *params); +extern I2S_Handle I2S_open(uint_least8_t index, I2S_Params* params); /*! * @brief Function to initialize the I2S_Params struct to its defaults @@ -1035,7 +1044,7 @@ extern I2S_Handle I2S_open(uint_least8_t index, I2S_Params *params); * * @param params Parameter structure to initialize */ -extern void I2S_Params_init(I2S_Params *params); +extern void I2S_Params_init(I2S_Params* params); /*! * @brief Initialize an I2S_Transaction struct to known state. @@ -1054,7 +1063,7 @@ extern void I2S_Params_init(I2S_Params *params); * * @param [out] transaction Transaction struct to initialize. */ -extern void I2S_Transaction_init(I2S_Transaction *transaction); +extern void I2S_Transaction_init(I2S_Transaction* transaction); /*! * @brief Function to set the first read-transaction to consider @@ -1072,7 +1081,7 @@ extern void I2S_Transaction_init(I2S_Transaction *transaction); * * @sa I2S_setWriteQueueHead() */ -extern void I2S_setReadQueueHead(I2S_Handle handle, I2S_Transaction *transaction); +extern void I2S_setReadQueueHead(I2S_Handle handle, I2S_Transaction* transaction); /*! * @brief Function to set the first write-transaction to consider @@ -1090,7 +1099,7 @@ extern void I2S_setReadQueueHead(I2S_Handle handle, I2S_Transaction *transaction * * @sa I2S_setReadQueueHead() */ -extern void I2S_setWriteQueueHead(I2S_Handle handle, I2S_Transaction *transaction); +extern void I2S_setWriteQueueHead(I2S_Handle handle, I2S_Transaction* transaction); /*! * @brief Start the WS, SCK and MCLK clocks. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/NVS.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/NVS.h index dcfcbff3..19b98d19 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/NVS.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/NVS.h @@ -437,9 +437,9 @@ extern "C" { * @{ */ - /*! - * @brief NVS_lock() Wait forever define - */ +/*! +* @brief NVS_lock() Wait forever define +*/ #define NVS_LOCK_WAIT_FOREVER (~(0U)) /*! @@ -454,13 +454,13 @@ extern "C" { * @{ */ - /*! - * @brief This region is not directly addressable (e.g.,: SPI flash region) - * - * The NVS_Attrs.regionBase field returned by NVS_getAttrs() is set to this - * value by the NVSSPI driver to indicate that the region is not directly - * addressable. - */ +/*! +* @brief This region is not directly addressable (e.g.,: SPI flash region) +* +* The NVS_Attrs.regionBase field returned by NVS_getAttrs() is set to this +* value by the NVSSPI driver to indicate that the region is not directly +* addressable. +*/ #define NVS_REGION_NOT_ADDRESSABLE ((void *)(~(0U))) /** @} */ @@ -475,7 +475,7 @@ extern "C" { */ typedef struct { - void *custom; /*!< Custom argument used by driver implementation */ + void* custom; /*!< Custom argument used by driver implementation */ } NVS_Params; /*! @@ -487,7 +487,7 @@ typedef struct */ typedef struct { - void *regionBase; /*!< Base address of the NVS region. If the NVS + void* regionBase; /*!< Base address of the NVS region. If the NVS region is not directly accessible by the MCU (such as SPI flash), this field will be set to #NVS_REGION_NOT_ADDRESSABLE. */ @@ -499,7 +499,7 @@ typedef struct /*! * @brief A handle that is returned from the NVS_open() call. */ -typedef struct NVS_Config_ *NVS_Handle; +typedef struct NVS_Config_* NVS_Handle; /*! * @brief A function pointer to a driver specific implementation of @@ -525,7 +525,7 @@ typedef int_fast16_t (*NVS_EraseFxn) (NVS_Handle handle, size_t offset, * @brief A function pointer to a driver specific implementation of * NVS_getAttrs(). */ -typedef void (*NVS_GetAttrsFxn) (NVS_Handle handle, NVS_Attrs *attrs); +typedef void (*NVS_GetAttrsFxn) (NVS_Handle handle, NVS_Attrs* attrs); /*! * @brief A function pointer to a driver specific implementation of @@ -537,21 +537,21 @@ typedef void (*NVS_InitFxn) (void); * @brief A function pointer to a driver specific implementation of * NVS_open(). */ -typedef NVS_Handle (*NVS_OpenFxn) (uint_least8_t index, NVS_Params *params); +typedef NVS_Handle (*NVS_OpenFxn) (uint_least8_t index, NVS_Params* params); /*! * @brief A function pointer to a driver specific implementation of * NVS_read(). */ typedef int_fast16_t (*NVS_ReadFxn) (NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize); + void* buffer, size_t bufferSize); /*! * @brief A function pointer to a driver specific implementation of * NVS_write(). */ typedef int_fast16_t (*NVS_WriteFxn) (NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize, + void* buffer, size_t bufferSize, uint_fast16_t flags); /*! @@ -618,13 +618,13 @@ typedef struct typedef struct NVS_Config_ { /*! Pointer to a table of driver-specific implementations of NVS APIs */ - NVS_FxnTable const *fxnTablePtr; + NVS_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } NVS_Config; /*! @@ -699,7 +699,7 @@ extern int_fast16_t NVS_erase(NVS_Handle handle, size_t offset, size_t size); * * @param attrs Location to store attributes. */ -extern void NVS_getAttrs(NVS_Handle handle, NVS_Attrs *attrs); +extern void NVS_getAttrs(NVS_Handle handle, NVS_Attrs* attrs); /*! * @brief Function to initialize the NVS module @@ -753,7 +753,7 @@ extern int_fast16_t NVS_lock(NVS_Handle handle, uint32_t timeout); * * @return A non-zero handle on success, else NULL. */ -extern NVS_Handle NVS_open(uint_least8_t index, NVS_Params *params); +extern NVS_Handle NVS_open(uint_least8_t index, NVS_Params* params); /*! * @brief Function to initialize the NVS_Params struct to its defaults @@ -761,7 +761,7 @@ extern NVS_Handle NVS_open(uint_least8_t index, NVS_Params *params); * @param params A pointer to NVS_Params structure for * initialization. */ -extern void NVS_Params_init(NVS_Params *params); +extern void NVS_Params_init(NVS_Params* params); /*! * @brief Read data from the NVS region associated with the #NVS_Handle. @@ -779,8 +779,8 @@ extern void NVS_Params_init(NVS_Params *params); * @retval #NVS_STATUS_INV_OFFSET If @p offset + @p size exceed the size * of the region. */ -extern int_fast16_t NVS_read(NVS_Handle handle, size_t offset, void *buffer, - size_t bufferSize); +extern int_fast16_t NVS_read(NVS_Handle handle, size_t offset, void* buffer, + size_t bufferSize); /*! * @brief Function to unlock the NVS driver @@ -832,8 +832,8 @@ extern void NVS_unlock(NVS_Handle handle); * * @remark This call may lock a region to ensure atomic access to the region. */ -extern int_fast16_t NVS_write(NVS_Handle handle, size_t offset, void *buffer, - size_t bufferSize, uint_fast16_t flags); +extern int_fast16_t NVS_write(NVS_Handle handle, size_t offset, void* buffer, + size_t bufferSize, uint_fast16_t flags); #if defined (__cplusplus) } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PIN.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PIN.h index a59460aa..3668d5cb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PIN.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PIN.h @@ -688,7 +688,7 @@ typedef struct PIN_State_s PIN_State; /** @brief A handle that is returned from a PIN_open() call * Used for further PIN client interaction with the PIN driver */ -typedef PIN_State *PIN_Handle; +typedef PIN_State* PIN_Handle; /** @brief I/O Interrupt callback function pointer type @@ -705,7 +705,8 @@ typedef void (*PIN_IntCb)(PIN_Handle handle, PIN_Id pinId); /** @brief underlying data structure for type #PIN_State */ -struct PIN_State_s { +struct PIN_State_s +{ PIN_IntCb callbackFxn; ///< Pointer to interrupt callback function uint32_t portMask; ///< Bitmask for pins allocated in port uintptr_t userArg; ///< User argument for whole handle @@ -713,7 +714,8 @@ struct PIN_State_s { }; /// @brief Return value for many functions in the PIN driver interface -typedef enum { +typedef enum +{ PIN_SUCCESS = 0, ///< Operation succeeded PIN_ALREADY_ALLOCATED = 1, ///< Operation failed, some pin already allocated PIN_NO_ACCESS = 2, ///< Operation failed, client does not have access to pin @@ -754,7 +756,7 @@ extern PIN_Status PIN_init(const PIN_Config aPinCfg[]); * @return A handle for further PIN driver calls or NULL if an error occurred * (already allocated pin in pinList or non-existent pin in pinList) */ -extern PIN_Handle PIN_open(PIN_State *state, const PIN_Config pinList[]); +extern PIN_Handle PIN_open(PIN_State* state, const PIN_Config pinList[]); /** @brief Add pin to pin set for open PIN handle @@ -796,8 +798,10 @@ extern void PIN_close(PIN_Handle handle); * @param handle handle retrieved through an earlier call to PIN_open(). * @param arg User argument */ -static inline void PIN_setUserArg(PIN_Handle handle, uintptr_t arg) { - if (handle) { +static inline void PIN_setUserArg(PIN_Handle handle, uintptr_t arg) +{ + if (handle) + { handle->userArg = arg; } } @@ -810,7 +814,8 @@ static inline void PIN_setUserArg(PIN_Handle handle, uintptr_t arg) { * @param handle handle retrieved through an earlier call to PIN_open(). * @return User argument. Has the value 0 if never initialized */ -static inline uintptr_t PIN_getUserArg(PIN_Handle handle) { +static inline uintptr_t PIN_getUserArg(PIN_Handle handle) +{ return handle->userArg; } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PWM.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PWM.h index ff22ada4..a8329667 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PWM.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/PWM.h @@ -50,7 +50,7 @@ *
* @anchor ti_drivers_PWM_Usage * # Usage - * + * * This documentation provides a basic @ref ti_drivers_PWM_Synopsis * "usage summary" and a set of @ref ti_drivers_PWM_Examples "examples" * in the form of commented code fragments. Detailed descriptions of the @@ -91,25 +91,25 @@ * dutyValue = (uint32_t) (((uint64_t) PWM_DUTY_FRACTION_MAX * 37) / 100); * PWM_setDuty(pwm, dutyValue); // set duty cycle to 37% * @endcode - * + * *
* @anchor ti_drivers_PWM_Examples * # Examples - * + * * @li @ref ti_drivers_PWM_Examples_open "Opening a PWM instance" * @li @ref ti_drivers_PWM_Examples_duty "Setting PWM duty" * @li @ref ti_drivers_PWM_Examples_dutyperiod "Setting PWM Duty and Period" * * @anchor ti_drivers_PWM_Examples_open * # Opening a PWM instance - * + * * @code - * + * * PWM_Handle pwm; * PWM_Params pwmParams; * * PWM_init(); - * + * * PWM_Params_init(&pwmParams); * pwmParams.idleLevel = PWM_IDLE_LOW; * pwmParams.periodUnits = PWM_PERIOD_HZ; @@ -124,10 +124,10 @@ * while (1); * } * @endcode - * + * * @anchor ti_drivers_PWM_Examples_duty * # Setting PWM duty - * + * * Once the PWM instance has been opened and started, the primary API used * by the application will be #PWM_setDuty() to control the duty cycle of a * PWM pin: @@ -140,10 +140,10 @@ * dutyCycle = (uint32_t) (((uint64_t) PWM_DUTY_FRACTION_MAX * 45) / 100); * PWM_setDuty(pwm, dutyCycle); * @endcode - * + * * @anchor ti_drivers_PWM_Examples_dutyperiod * # Setting PWM Duty and Period - * + * * If an application needs to modify the duty and period of a running timer, * an API is available to set both with as little interim time as possible. * This minimises the possibility that a timeout will occur between one set @@ -192,7 +192,7 @@ *
* @anchor ti_drivers_PWM_Configuration * # Configuration - * + * * Refer to the @ref driver_configuration "Driver's Configuration" section * for driver configuration information. *
@@ -288,7 +288,8 @@ extern "C" { * @brief PWM period unit definitions. Refer to device specific * implementation if using #PWM_PERIOD_COUNTS (raw PWM/Timer counts). */ -typedef enum { +typedef enum +{ PWM_PERIOD_US, /*!< Period in microseconds */ PWM_PERIOD_HZ, /*!< Period in (reciprocal) Hertz (for example 2MHz = 0.5us period) */ @@ -299,7 +300,8 @@ typedef enum { * @brief PWM duty cycle unit definitions. Refer to device specific * implementation if using PWM_DUTY_COUNTS (raw PWM/Timer counts). */ -typedef enum { +typedef enum +{ PWM_DUTY_US, /*!< Duty cycle in microseconds */ PWM_DUTY_FRACTION, /*!< Duty as a fractional part of #PWM_DUTY_FRACTION_MAX. * A duty cycle value of 0 will yield a 0% duty cycle @@ -311,7 +313,8 @@ typedef enum { /*! * @brief Idle output level when PWM is not running (stopped / not started). */ -typedef enum { +typedef enum +{ PWM_IDLE_LOW = 0, PWM_IDLE_HIGH = 1, } PWM_IdleLevel; @@ -324,20 +327,21 @@ typedef enum { * * @sa PWM_Params_init() */ -typedef struct { +typedef struct +{ PWM_Period_Units periodUnits; /*!< Units in which the period is specified */ uint32_t periodValue; /*!< PWM initial period */ PWM_Duty_Units dutyUnits; /*!< Units in which the duty is specified */ uint32_t dutyValue; /*!< PWM initial duty */ PWM_IdleLevel idleLevel; /*!< Pin output when PWM is stopped. */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver implementation */ } PWM_Params; /*! * @brief A handle that is returned from a PWM_open() call. */ -typedef struct PWM_Config_ *PWM_Handle; +typedef struct PWM_Config_* PWM_Handle; /*! * @brief A function pointer to a driver specific implementation of @@ -350,7 +354,7 @@ typedef void (*PWM_CloseFxn) (PWM_Handle handle); * PWM_control(). */ typedef int_fast16_t (*PWM_ControlFxn) (PWM_Handle handle, uint_fast16_t cmd, - void *arg); + void* arg); /*! * @brief A function pointer to a driver specific implementation of * PWM_init(). @@ -361,7 +365,7 @@ typedef void (*PWM_InitFxn) (PWM_Handle handle); * @brief A function pointer to a driver specific implementation of * PWM_open(). */ -typedef PWM_Handle (*PWM_OpenFxn) (PWM_Handle handle, PWM_Params *params); +typedef PWM_Handle (*PWM_OpenFxn) (PWM_Handle handle, PWM_Params* params); /*! * @brief A function pointer to a driver specific implementation of @@ -401,7 +405,8 @@ typedef void (*PWM_StopFxn) (PWM_Handle handle); * required set of functions to control a specific PWM driver * implementation. */ -typedef struct PWM_FxnTable_ { +typedef struct PWM_FxnTable_ +{ /*! Function to close the specified instance */ PWM_CloseFxn closeFxn; /*! Function to driver implementation specific control function */ @@ -429,13 +434,14 @@ typedef struct PWM_FxnTable_ { * the PWM driver implementation. * */ -typedef struct PWM_Config_ { +typedef struct PWM_Config_ +{ /*! Pointer to a table of driver-specific implementations of PWM APIs */ - PWM_FxnTable const *fxnTablePtr; + PWM_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } PWM_Config; /*! @@ -472,7 +478,7 @@ extern void PWM_close(PWM_Handle handle); * @sa PWM_open() */ extern int_fast16_t PWM_control(PWM_Handle handle, uint_fast16_t cmd, - void *arg); + void* arg); /*! * @brief This function initializes the PWM module. @@ -500,7 +506,7 @@ extern void PWM_init(void); * * @sa PWM_close() */ -extern PWM_Handle PWM_open(uint_least8_t index, PWM_Params *params); +extern PWM_Handle PWM_open(uint_least8_t index, PWM_Params* params); /*! * @brief Function to initialize the PWM_Params structure to default values. @@ -514,7 +520,7 @@ extern PWM_Handle PWM_open(uint_least8_t index, PWM_Params *params); * Duty cycle: 0% * Idle level: PWM_IDLE_LOW */ -extern void PWM_Params_init(PWM_Params *params); +extern void PWM_Params_init(PWM_Params* params); /*! * @brief Function to set the duty cycle of the specified PWM handle. PWM @@ -585,7 +591,7 @@ extern int_fast16_t PWM_setPeriod(PWM_Handle handle, uint32_t period); * in PWM_open(). * * @retval #PWM_STATUS_SUCCESS The duty and period was set successfully. - * @retval #PWM_STATUS_ERROR The duty and period was not set and + * @retval #PWM_STATUS_ERROR The duty and period was not set and remains unchanged. * * @sa PWM_open() diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Power.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Power.h index 24d8a6e2..cde0060b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Power.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Power.h @@ -428,7 +428,7 @@ typedef void (*Power_PolicyFxn)(void); * @sa @ref ti_drivers_Power_Examples_notify "Using power notify" */ typedef int_fast16_t (*Power_NotifyFxn)(uint_fast16_t eventType, - uintptr_t eventArg, uintptr_t clientArg); + uintptr_t eventArg, uintptr_t clientArg); /*! * @brief Power notify object structure. @@ -440,7 +440,8 @@ typedef int_fast16_t (*Power_NotifyFxn)(uint_fast16_t eventType, * * @sa @ref ti_drivers_Power_Examples_notify "Using power notify" */ -typedef struct { +typedef struct +{ List_Elem link; /*!< for placing on the notify list */ uint_fast16_t eventTypes; /*!< the event type */ Power_NotifyFxn notifyFxn; /*!< notification function */ @@ -573,7 +574,7 @@ uint_fast16_t Power_getPerformanceLevel(void); * @sa @ref ti_drivers_Power_Examples_transistion "Power transitions" */ uint_fast32_t Power_getTransitionLatency(uint_fast16_t sleepState, - uint_fast16_t type); + uint_fast16_t type); /*! * @brief Get the current transition state of the Power Manager @@ -685,7 +686,7 @@ int_fast16_t Power_init(void); * @sa Power_unregisterNotify() * @sa @ref ti_drivers_Power_Examples_notify "Using power notify" */ -int_fast16_t Power_registerNotify(Power_NotifyObj *pNotifyObj, +int_fast16_t Power_registerNotify(Power_NotifyObj* pNotifyObj, uint_fast16_t eventTypes, Power_NotifyFxn notifyFxn, uintptr_t clientArg); @@ -921,7 +922,7 @@ void Power_setPolicy(Power_PolicyFxn policy); * @retval #Power_EBUSY if another transition is already in progress. */ int_fast16_t Power_shutdown(uint_fast16_t shutdownState, - uint_fast32_t shutdownTime); + uint_fast32_t shutdownTime); /*! * @brief Transition the device into a sleep state @@ -961,7 +962,7 @@ int_fast16_t Power_sleep(uint_fast16_t sleepState); * @sa Power_registerNotify() * @sa @ref ti_drivers_Power_Examples_notify "Using power notify" */ -void Power_unregisterNotify(Power_NotifyObj *pNotifyObj); +void Power_unregisterNotify(Power_NotifyObj* pNotifyObj); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SD.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SD.h index ab05d925..057499fb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SD.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SD.h @@ -194,7 +194,8 @@ extern "C" { /*! * @brief SD Card type inserted */ -typedef enum SD_CardType_ { +typedef enum SD_CardType_ +{ SD_NOCARD = 0, /*!< Unrecognized Card */ SD_MMC = 1, /*!< Multi-media Memory Card (MMC) */ SD_SDSC = 2, /*!< Standard SDCard (SDSC) */ @@ -204,7 +205,7 @@ typedef enum SD_CardType_ { /*! * @brief A handle that is returned from a SD_open() call. */ -typedef struct SD_Config_ *SD_Handle; +typedef struct SD_Config_* SD_Handle; /*! * @brief SD Parameters @@ -216,8 +217,9 @@ typedef struct SD_Config_ *SD_Handle; */ /* SD Parameters */ -typedef struct SD_Params_ { - void *custom; /*!< Custom argument used by driver implementation */ +typedef struct SD_Params_ +{ + void* custom; /*!< Custom argument used by driver implementation */ } SD_Params; /*! @@ -231,7 +233,7 @@ typedef void (*SD_CloseFxn) (SD_Handle handle); * SD_controlFxn(). */ typedef int_fast16_t (*SD_ControlFxn) (SD_Handle handle, - uint_fast16_t cmd, void *arg); + uint_fast16_t cmd, void* arg); /*! * @brief A function pointer to a driver specific implementation of @@ -261,28 +263,29 @@ typedef int_fast16_t (*SD_InitializeFxn) (SD_Handle handle); * @brief A function pointer to a driver specific implementation of * SD_OpenFxn(). */ -typedef SD_Handle (*SD_OpenFxn) (SD_Handle handle, SD_Params *params); +typedef SD_Handle (*SD_OpenFxn) (SD_Handle handle, SD_Params* params); /*! * @brief A function pointer to a driver specific implementation of * SD_readFxn(). */ -typedef int_fast16_t (*SD_ReadFxn) (SD_Handle handle, void *buf, - int_fast32_t sector, uint_fast32_t secCount); +typedef int_fast16_t (*SD_ReadFxn) (SD_Handle handle, void* buf, + int_fast32_t sector, uint_fast32_t secCount); /*! * @brief A function pointer to a driver specific implementation of * SD_writeFxn(). */ -typedef int_fast16_t (*SD_WriteFxn) (SD_Handle handle, const void *buf, - int_fast32_t sector, uint_fast32_t secCount); +typedef int_fast16_t (*SD_WriteFxn) (SD_Handle handle, const void* buf, + int_fast32_t sector, uint_fast32_t secCount); /*! * @brief The definition of a SD function table that contains the * required set of functions to control a specific SD driver * implementation. */ -typedef struct SD_FxnTable_ { +typedef struct SD_FxnTable_ +{ /*! Function to close the specified peripheral */ SD_CloseFxn closeFxn; /*! Function to implementation specific control function */ @@ -314,15 +317,16 @@ typedef struct SD_FxnTable_ { * * @sa SD_init() */ -typedef struct SD_Config_ { +typedef struct SD_Config_ +{ /*! Pointer to a table of driver-specific implementations of SD APIs */ - SD_FxnTable const *fxnTablePtr; + SD_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } SD_Config; /*! @@ -374,7 +378,7 @@ extern void SD_close(SD_Handle handle); * * @sa SD_open() */ -extern int_fast16_t SD_control(SD_Handle handle, uint_fast16_t cmd, void *arg); +extern int_fast16_t SD_control(SD_Handle handle, uint_fast16_t cmd, void* arg); /*! * @brief A function pointer to a driver specific implementation of @@ -420,19 +424,19 @@ extern void SD_init(void); * * @param params A pointer to #SD_Params structure for initialization. */ -extern void SD_Params_init(SD_Params *params); +extern void SD_Params_init(SD_Params* params); - /*! - * @brief A function pointer to a driver specific implementation of - * SD_initialize(). - * - * @pre SD controller has been opened by calling SD_open(). - * - * @param handle A #SD_Handle returned from SD_open(). - * - * @return #SD_STATUS_SUCCESS if no errors occurred during the initialization, - * #SD_STATUS_ERROR otherwise. - */ +/*! +* @brief A function pointer to a driver specific implementation of +* SD_initialize(). +* +* @pre SD controller has been opened by calling SD_open(). +* +* @param handle A #SD_Handle returned from SD_open(). +* +* @return #SD_STATUS_SUCCESS if no errors occurred during the initialization, +* #SD_STATUS_ERROR otherwise. +*/ extern int_fast16_t SD_initialize(SD_Handle handle); /*! @@ -454,7 +458,7 @@ extern int_fast16_t SD_initialize(SD_Handle handle); * @sa SD_init() * @sa SD_close() */ -extern SD_Handle SD_open(uint_least8_t index, SD_Params *params); +extern SD_Handle SD_open(uint_least8_t index, SD_Params* params); /*! * @brief A function pointer to a driver specific implementation of @@ -476,8 +480,8 @@ extern SD_Handle SD_open(uint_least8_t index, SD_Params *params); * * @sa SD_initialize() */ -extern int_fast16_t SD_read(SD_Handle handle, void *buf, - int_fast32_t sector, uint_fast32_t secCount); +extern int_fast16_t SD_read(SD_Handle handle, void* buf, + int_fast32_t sector, uint_fast32_t secCount); /*! * @brief A function pointer to a driver specific implementation of @@ -499,8 +503,8 @@ extern int_fast16_t SD_read(SD_Handle handle, void *buf, * * @sa SD_initialize() */ -extern int_fast16_t SD_write(SD_Handle handle, const void *buf, - int_fast32_t sector, uint_fast32_t secCount); +extern int_fast16_t SD_write(SD_Handle handle, const void* buf, + int_fast32_t sector, uint_fast32_t secCount); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SDFatFS.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SDFatFS.h index 4f746437..14e49cb6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SDFatFS.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SDFatFS.h @@ -98,7 +98,8 @@ extern "C" { * @brief SDFatFS Object * The application must not access any member variables of this structure! */ -typedef struct SDFatFS_Object_ { +typedef struct SDFatFS_Object_ +{ uint_fast32_t driveNum; DSTATUS diskState; FATFS filesystem; /* FATFS data object */ @@ -108,7 +109,7 @@ typedef struct SDFatFS_Object_ { /*! * @brief A handle that is returned from a SDFatFS_open() call. */ -typedef struct SDFatFS_Config_ *SDFatFS_Handle; +typedef struct SDFatFS_Config_* SDFatFS_Handle; /*! @@ -122,9 +123,10 @@ typedef struct SDFatFS_Config_ *SDFatFS_Handle; * * @sa SDFatFS_init() */ -typedef struct SDFatFS_Config_ { +typedef struct SDFatFS_Config_ +{ /*! Pointer to a SDFatFS object */ - void *object; + void* object; } SDFatFS_Config; /*! diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SHA2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SHA2.h index 29e63663..2251f53e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SHA2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SHA2.h @@ -281,7 +281,8 @@ extern "C" { * |SHA2_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ SHA2_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * SHA2 operation goes on in the background. The registered * callback function is called after the operation completes. @@ -301,7 +302,8 @@ typedef enum { /*! * @brief Enum for the hash types supported by the driver. */ -typedef enum { +typedef enum +{ SHA2_HASH_TYPE_224 = 0, SHA2_HASH_TYPE_256 = 1, SHA2_HASH_TYPE_384 = 2, @@ -311,7 +313,8 @@ typedef enum { /*! * @brief Enum for the hash digest lengths in bytes supported by the driver. */ -typedef enum { +typedef enum +{ SHA2_DIGEST_LENGTH_BYTES_224 = 28, SHA2_DIGEST_LENGTH_BYTES_256 = 32, SHA2_DIGEST_LENGTH_BYTES_384 = 48, @@ -331,7 +334,8 @@ typedef enum { * the segment lengths for all but the last segment * must be multiples of the relevant block size. */ -typedef enum { +typedef enum +{ SHA2_BLOCK_SIZE_BYTES_224 = 64, SHA2_BLOCK_SIZE_BYTES_256 = 64, SHA2_BLOCK_SIZE_BYTES_384 = 128, @@ -349,12 +353,13 @@ typedef enum { * * @sa SHA2_init() */ -typedef struct SHA2_Config { +typedef struct SHA2_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } SHA2_Config; /*! @@ -382,7 +387,8 @@ typedef void (*SHA2_CallbackFxn) (SHA2_Handle handle, int_fast16_t returnStatus) * * @sa SHA2_Params_init() */ -typedef struct { +typedef struct +{ SHA2_HashType hashType; /*!< SHA2 variant to use. This determines the output digest * length. */ @@ -442,7 +448,7 @@ void SHA2_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void SHA2_Params_init(SHA2_Params *params); +void SHA2_Params_init(SHA2_Params* params); /*! * @brief Initializes a SHA2 driver instance and returns a handle. @@ -460,7 +466,7 @@ void SHA2_Params_init(SHA2_Params *params); * * @sa #SHA2_init(), #SHA2_close() */ -SHA2_Handle SHA2_open(uint_least8_t index, const SHA2_Params *params); +SHA2_Handle SHA2_open(uint_least8_t index, const SHA2_Params* params); /*! * @brief Closes a SHA2 peripheral specified by \a handle. @@ -530,7 +536,7 @@ int_fast16_t SHA2_addData(SHA2_Handle handle, const void* data, size_t length); * * @sa #SHA2_open() */ -int_fast16_t SHA2_hashData(SHA2_Handle handle, const void* data, size_t size, void *digest); +int_fast16_t SHA2_hashData(SHA2_Handle handle, const void* data, size_t size, void* digest); /*! * @brief Finishes hash a operation and writes the result to \a digest. @@ -554,7 +560,7 @@ int_fast16_t SHA2_hashData(SHA2_Handle handle, const void* data, size_t size, vo * * @sa #SHA2_open(), #SHA2_addData() */ -int_fast16_t SHA2_finalize(SHA2_Handle handle, void *digest); +int_fast16_t SHA2_finalize(SHA2_Handle handle, void* digest); /*! * @brief Clears internal buffers and aborts an ongoing SHA2 operation. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SPI.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SPI.h index 329b93cd..c72c8172 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SPI.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/SPI.h @@ -535,12 +535,13 @@ extern "C" { /*! * @brief A handle that is returned from a SPI_open() call. */ -typedef struct SPI_Config_ *SPI_Handle; +typedef struct SPI_Config_* SPI_Handle; /*! * @brief Status codes that are set by the SPI driver. */ -typedef enum { +typedef enum +{ SPI_TRANSFER_COMPLETED = 0, /*!< SPI transfer completed */ SPI_TRANSFER_STARTED, /*!< SPI transfer started and in progress */ SPI_TRANSFER_CANCELED, /*!< SPI transfer was canceled */ @@ -560,17 +561,18 @@ typedef enum { * The arg variable is an user-definable argument which gets passed to the * #SPI_CallbackFxn when the SPI driver is in #SPI_MODE_CALLBACK. */ -typedef struct { +typedef struct +{ /* User input (write-only) fields */ size_t count; /*!< Number of frames for this transaction */ - void *txBuf; /*!< void * to a buffer with data to be transmitted */ - void *rxBuf; /*!< void * to a buffer to receive data */ - void *arg; /*!< Argument to be passed to the callback function */ + void* txBuf; /*!< void * to a buffer with data to be transmitted */ + void* rxBuf; /*!< void * to a buffer to receive data */ + void* arg; /*!< Argument to be passed to the callback function */ /* User output (read-only) fields */ SPI_Status status; /*!< #SPI_Status code set by SPI_transfer */ - void *nextPtr; /*!< Field used internally by the driver and must + void* nextPtr; /*!< Field used internally by the driver and must never be accessed by the application. */ } SPI_Transaction; @@ -582,12 +584,13 @@ typedef struct { * @param SPI_Transaction* Pointer to a #SPI_Transaction */ typedef void (*SPI_CallbackFxn) (SPI_Handle handle, - SPI_Transaction *transaction); + SPI_Transaction* transaction); /*! * @brief * Definitions for various SPI modes of operation. */ -typedef enum { +typedef enum +{ SPI_MASTER = 0, /*!< SPI in master mode */ SPI_SLAVE = 1 /*!< SPI in slave mode */ } SPI_Mode; @@ -596,7 +599,8 @@ typedef enum { * @brief * Definitions for various SPI data frame formats. */ -typedef enum { +typedef enum +{ SPI_POL0_PHA0 = 0, /*!< SPI mode Polarity 0 Phase 0 */ SPI_POL0_PHA1 = 1, /*!< SPI mode Polarity 0 Phase 1 */ SPI_POL1_PHA0 = 2, /*!< SPI mode Polarity 1 Phase 0 */ @@ -617,7 +621,8 @@ typedef enum { * calls a #SPI_CallbackFxn callback function when the transaction has * completed (successfully or not). */ -typedef enum { +typedef enum +{ /*! * SPI_transfer() blocks execution. This mode can only be used when called * within a Task context @@ -639,7 +644,8 @@ typedef enum { * * @sa SPI_Params_init() */ -typedef struct { +typedef struct +{ SPI_TransferMode transferMode; /*!< Blocking or Callback mode */ uint32_t transferTimeout; /*!< Transfer timeout in system ticks */ @@ -661,7 +667,7 @@ typedef struct { uint32_t bitRate; uint32_t dataSize; /*!< SPI data frame size in bits */ SPI_FrameFormat frameFormat; /*!< SPI frame format */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver implementation */ } SPI_Params; @@ -676,7 +682,7 @@ typedef void (*SPI_CloseFxn) (SPI_Handle handle); * SPI_control(). */ typedef int_fast16_t (*SPI_ControlFxn) (SPI_Handle handle, uint_fast16_t cmd, - void *arg); + void* arg); /*! * @brief A function pointer to a driver specific implementation of @@ -688,14 +694,14 @@ typedef void (*SPI_InitFxn) (SPI_Handle handle); * @brief A function pointer to a driver specific implementation of * SPI_open(). */ -typedef SPI_Handle (*SPI_OpenFxn) (SPI_Handle handle, SPI_Params *params); +typedef SPI_Handle (*SPI_OpenFxn) (SPI_Handle handle, SPI_Params* params); /*! * @brief A function pointer to a driver specific implementation of * SPI_transfer(). */ typedef bool (*SPI_TransferFxn) (SPI_Handle handle, - SPI_Transaction *transaction); + SPI_Transaction* transaction); /*! * @brief A function pointer to a driver specific implementation of @@ -708,7 +714,8 @@ typedef void (*SPI_TransferCancelFxn) (SPI_Handle handle); * required set of functions to control a specific SPI driver * implementation. */ -typedef struct { +typedef struct +{ /*! Function to close the specified peripheral */ SPI_CloseFxn closeFxn; @@ -739,15 +746,16 @@ typedef struct { * * @sa SPI_init() */ -typedef struct SPI_Config_{ +typedef struct SPI_Config_ +{ /*! Pointer to a table of driver-specific implementations of SPI APIs */ - SPI_FxnTable const *fxnTablePtr; + SPI_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } SPI_Config; /*! @@ -799,7 +807,7 @@ extern void SPI_close(SPI_Handle handle); * @sa SPI_open() */ extern int_fast16_t SPI_control(SPI_Handle handle, uint_fast16_t cmd, - void *controlArg); + void* controlArg); /*! * @brief This function initializes the SPI module. @@ -828,7 +836,7 @@ extern void SPI_init(void); * @sa SPI_init() * @sa SPI_close() */ -extern SPI_Handle SPI_open(uint_least8_t index, SPI_Params *params); +extern SPI_Handle SPI_open(uint_least8_t index, SPI_Params* params); /*! * @brief Function to initialize the #SPI_Params struct to its defaults @@ -845,7 +853,7 @@ extern SPI_Handle SPI_open(uint_least8_t index, SPI_Params *params); * * SPI_Params.dataSize = 8 (bits) * * SPI_Params.frameFormat = #SPI_POL0_PHA0 */ -extern void SPI_Params_init(SPI_Params *params); +extern void SPI_Params_init(SPI_Params* params); /*! * @brief Function to perform SPI transactions @@ -891,7 +899,7 @@ extern void SPI_Params_init(SPI_Params *params); * @sa #SPI_open * @sa #SPI_transferCancel */ -extern bool SPI_transfer(SPI_Handle handle, SPI_Transaction *transaction); +extern bool SPI_transfer(SPI_Handle handle, SPI_Transaction* transaction); /*! * @brief Function to cancel SPI transactions diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/TRNG.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/TRNG.h index c344c5a0..876271b0 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/TRNG.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/TRNG.h @@ -262,7 +262,7 @@ extern "C" { /*! * @brief A handle that is returned from a TRNG_open() call. */ -typedef struct TRNG_Config *TRNG_Handle; +typedef struct TRNG_Config* TRNG_Handle; /*! * @brief The way in which TRNG function calls return after generating @@ -285,7 +285,8 @@ typedef struct TRNG_Config *TRNG_Handle; * |TRNG_RETURN_BEHAVIOR_POLLING | X | X | X | * */ -typedef enum { +typedef enum +{ TRNG_RETURN_BEHAVIOR_CALLBACK = 1, /*!< The function call will return immediately while the * TRNG operation goes on in the background. The registered * callback function is called after the operation completes. @@ -313,12 +314,13 @@ typedef enum { * * @sa TRNG_init() */ -typedef struct TRNG_Config { +typedef struct TRNG_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } TRNG_Config; /*! @@ -334,7 +336,7 @@ typedef struct TRNG_Config { */ typedef void (*TRNG_CallbackFxn) (TRNG_Handle handle, int_fast16_t returnValue, - CryptoKey *entropy); + CryptoKey* entropy); /*! * @brief TRNG Parameters @@ -344,13 +346,14 @@ typedef void (*TRNG_CallbackFxn) (TRNG_Handle handle, * * @sa TRNG_Params_init() */ -typedef struct { +typedef struct +{ TRNG_ReturnBehavior returnBehavior; /*!< Blocking, callback, or polling return behavior */ TRNG_CallbackFxn callbackFxn; /*!< Callback function pointer */ uint32_t timeout; /*!< Timeout before the driver returns an error in * ::TRNG_RETURN_BEHAVIOR_BLOCKING */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver * implementation */ } TRNG_Params; @@ -384,7 +387,7 @@ void TRNG_init(void); * timeout = SemaphoreP_WAIT_FOREVER * custom = NULL */ -void TRNG_Params_init(TRNG_Params *params); +void TRNG_Params_init(TRNG_Params* params); /*! * @brief This function opens a given TRNG peripheral. @@ -403,7 +406,7 @@ void TRNG_Params_init(TRNG_Params *params); * @sa TRNG_init() * @sa TRNG_close() */ -TRNG_Handle TRNG_open(uint_least8_t index, TRNG_Params *params); +TRNG_Handle TRNG_open(uint_least8_t index, TRNG_Params* params); /*! * @brief Function to close a TRNG peripheral specified by the TRNG handle @@ -435,7 +438,7 @@ void TRNG_close(TRNG_Handle handle); * @retval #TRNG_STATUS_ERROR The operation failed. * @retval #TRNG_STATUS_RESOURCE_UNAVAILABLE The required hardware resource was not available. Try again later. */ -int_fast16_t TRNG_generateEntropy(TRNG_Handle handle, CryptoKey *entropy); +int_fast16_t TRNG_generateEntropy(TRNG_Handle handle, CryptoKey* entropy); diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/UART.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/UART.h index 5955ce33..48983cd8 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/UART.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/UART.h @@ -405,7 +405,7 @@ extern "C" { /*! * @brief A handle that is returned from a UART_open() call. */ -typedef struct UART_Config_ *UART_Handle; +typedef struct UART_Config_* UART_Handle; /*! * @brief The definition of a callback function used by the UART driver @@ -418,14 +418,15 @@ typedef struct UART_Config_ *UART_Handle; * * @param count Number of elements read/written */ -typedef void (*UART_Callback) (UART_Handle handle, void *buf, size_t count); +typedef void (*UART_Callback) (UART_Handle handle, void* buf, size_t count); /*! * @brief UART mode settings * * This enum defines the read and write modes for the configured UART. */ -typedef enum UART_Mode_ { +typedef enum UART_Mode_ +{ /*! * Uses a semaphore to block while data is being sent. Context of the call * must be a Task. @@ -458,7 +459,8 @@ typedef enum UART_Mode_ { * * @pre UART driver must be used in #UART_DATA_TEXT mode. */ -typedef enum UART_ReturnMode_ { +typedef enum UART_ReturnMode_ +{ /*! Unblock/callback when buffer is full. */ UART_RETURN_FULL, @@ -480,7 +482,8 @@ typedef enum UART_ReturnMode_ { * effectively treats all device line endings as LF, and all host PC line * endings as CRLF. */ -typedef enum UART_DataMode_ { +typedef enum UART_DataMode_ +{ UART_DATA_BINARY = 0, /*!< Data is not processed */ UART_DATA_TEXT = 1 /*!< Data is processed according to above */ } UART_DataMode; @@ -498,7 +501,8 @@ typedef enum UART_DataMode_ { * * @pre UART driver must be used in #UART_DATA_TEXT mode. */ -typedef enum UART_Echo_ { +typedef enum UART_Echo_ +{ UART_ECHO_OFF = 0, /*!< Data is not echoed */ UART_ECHO_ON = 1 /*!< Data is echoed */ } UART_Echo; @@ -508,7 +512,8 @@ typedef enum UART_Echo_ { * * This enumeration defines the UART data lengths. */ -typedef enum UART_LEN_ { +typedef enum UART_LEN_ +{ UART_LEN_5 = 0, /*!< Data length is 5 bits */ UART_LEN_6 = 1, /*!< Data length is 6 bits */ UART_LEN_7 = 2, /*!< Data length is 7 bits */ @@ -520,7 +525,8 @@ typedef enum UART_LEN_ { * * This enumeration defines the UART stop bits. */ -typedef enum UART_STOP_ { +typedef enum UART_STOP_ +{ UART_STOP_ONE = 0, /*!< One stop bit */ UART_STOP_TWO = 1 /*!< Two stop bits */ } UART_STOP; @@ -530,7 +536,8 @@ typedef enum UART_STOP_ { * * This enumeration defines the UART parity types. */ -typedef enum UART_PAR_ { +typedef enum UART_PAR_ +{ UART_PAR_NONE = 0, /*!< No parity */ UART_PAR_EVEN = 1, /*!< Parity bit is even */ UART_PAR_ODD = 2, /*!< Parity bit is odd */ @@ -546,7 +553,8 @@ typedef enum UART_PAR_ { * * @sa UART_Params_init() */ -typedef struct UART_Params_ { +typedef struct UART_Params_ +{ UART_Mode readMode; /*!< Mode for all read calls */ UART_Mode writeMode; /*!< Mode for all write calls */ uint32_t readTimeout; /*!< Timeout for read calls in blocking mode. */ @@ -561,7 +569,7 @@ typedef struct UART_Params_ { UART_LEN dataLength; /*!< Data length for UART */ UART_STOP stopBits; /*!< Stop bits for UART */ UART_PAR parityType; /*!< Parity bit type for UART */ - void *custom; /*!< Custom argument used by driver implementation */ + void* custom; /*!< Custom argument used by driver implementation */ } UART_Params; /*! @@ -574,7 +582,7 @@ typedef void (*UART_CloseFxn) (UART_Handle handle); * @brief A function pointer to a driver specific implementation of * UART_ControlFxn(). */ -typedef int_fast16_t (*UART_ControlFxn) (UART_Handle handle, uint_fast16_t cmd, void *arg); +typedef int_fast16_t (*UART_ControlFxn) (UART_Handle handle, uint_fast16_t cmd, void* arg); /*! * @brief A function pointer to a driver specific implementation of @@ -586,20 +594,20 @@ typedef void (*UART_InitFxn) (UART_Handle handle); * @brief A function pointer to a driver specific implementation of * UART_OpenFxn(). */ -typedef UART_Handle (*UART_OpenFxn) (UART_Handle handle, UART_Params *params); +typedef UART_Handle (*UART_OpenFxn) (UART_Handle handle, UART_Params* params); /*! * @brief A function pointer to a driver specific implementation of * UART_ReadFxn(). */ -typedef int_fast32_t (*UART_ReadFxn) (UART_Handle handle, void *buffer, - size_t size); +typedef int_fast32_t (*UART_ReadFxn) (UART_Handle handle, void* buffer, + size_t size); /*! * @brief A function pointer to a driver specific implementation of * UART_ReadPollingFxn(). */ -typedef int_fast32_t (*UART_ReadPollingFxn) (UART_Handle handle, void *buffer, - size_t size); +typedef int_fast32_t (*UART_ReadPollingFxn) (UART_Handle handle, void* buffer, + size_t size); /*! * @brief A function pointer to a driver specific implementation of @@ -611,15 +619,15 @@ typedef void (*UART_ReadCancelFxn) (UART_Handle handle); * @brief A function pointer to a driver specific implementation of * UART_WriteFxn(). */ -typedef int_fast32_t (*UART_WriteFxn) (UART_Handle handle, const void *buffer, - size_t size); +typedef int_fast32_t (*UART_WriteFxn) (UART_Handle handle, const void* buffer, + size_t size); /*! * @brief A function pointer to a driver specific implementation of * UART_WritePollingFxn(). */ typedef int_fast32_t (*UART_WritePollingFxn) (UART_Handle handle, - const void *buffer, size_t size); + const void* buffer, size_t size); /*! * @brief A function pointer to a driver specific implementation of @@ -632,7 +640,8 @@ typedef void (*UART_WriteCancelFxn) (UART_Handle handle); * required set of functions to control a specific UART driver * implementation. */ -typedef struct UART_FxnTable_ { +typedef struct UART_FxnTable_ +{ /*! Function to close the specified peripheral */ UART_CloseFxn closeFxn; @@ -675,15 +684,16 @@ typedef struct UART_FxnTable_ { * * @sa UART_init() */ -typedef struct UART_Config_ { +typedef struct UART_Config_ +{ /*! Pointer to a table of driver-specific implementations of UART APIs */ - UART_FxnTable const *fxnTablePtr; + UART_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } UART_Config; /*! @@ -736,7 +746,7 @@ extern void UART_close(UART_Handle handle); * * @sa UART_open() */ -extern int_fast16_t UART_control(UART_Handle handle, uint_fast16_t cmd, void *arg); +extern int_fast16_t UART_control(UART_Handle handle, uint_fast16_t cmd, void* arg); /*! * @brief Function to initialize the UART module @@ -768,7 +778,7 @@ extern void UART_init(void); * @sa UART_init() * @sa UART_close() */ -extern UART_Handle UART_open(uint_least8_t index, UART_Params *params); +extern UART_Handle UART_open(uint_least8_t index, UART_Params* params); /*! * @brief Function to initialize the UART_Params struct to its defaults @@ -792,7 +802,7 @@ extern UART_Handle UART_open(uint_least8_t index, UART_Params *params); * stopBits = UART_STOP_ONE; * parityType = UART_PAR_NONE; */ -extern void UART_Params_init(UART_Params *params); +extern void UART_Params_init(UART_Params* params); /*! * @brief Function that writes data to a UART with interrupts enabled. @@ -836,7 +846,7 @@ extern void UART_Params_init(UART_Params *params); * If an error occurs, #UART_STATUS_ERROR is returned. * In #UART_MODE_CALLBACK mode, the return value is always 0. */ -extern int_fast32_t UART_write(UART_Handle handle, const void *buffer, size_t size); +extern int_fast32_t UART_write(UART_Handle handle, const void* buffer, size_t size); /*! * @brief Function that writes data to a UART, polling the peripheral to @@ -861,7 +871,7 @@ extern int_fast32_t UART_write(UART_Handle handle, const void *buffer, size_t si * @return Returns the number of bytes that have been written to the UART. * If an error occurs, #UART_STATUS_ERROR is returned. */ -extern int_fast32_t UART_writePolling(UART_Handle handle, const void *buffer, size_t size); +extern int_fast32_t UART_writePolling(UART_Handle handle, const void* buffer, size_t size); /*! * @brief Function that cancels a UART_write() function call. @@ -912,7 +922,7 @@ extern void UART_writeCancel(UART_Handle handle); * @return Returns the number of bytes that have been read from the UART, * #UART_STATUS_ERROR on an error. */ -extern int_fast32_t UART_read(UART_Handle handle, void *buffer, size_t size); +extern int_fast32_t UART_read(UART_Handle handle, void* buffer, size_t size); /*! * @brief Function that reads data from a UART without interrupts. This API @@ -934,7 +944,7 @@ extern int_fast32_t UART_read(UART_Handle handle, void *buffer, size_t size); * @return Returns the number of bytes that have been read from the UART, * #UART_STATUS_ERROR on an error. */ -extern int_fast32_t UART_readPolling(UART_Handle handle, void *buffer, size_t size); +extern int_fast32_t UART_readPolling(UART_Handle handle, void* buffer, size_t size); /*! * @brief Function that cancels a UART_read() function call. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Watchdog.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Watchdog.h index 18fc14fe..0d006459 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Watchdog.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/Watchdog.h @@ -251,7 +251,7 @@ extern "C" { /*! * @brief Watchdog Handle */ -typedef struct Watchdog_Config_ *Watchdog_Handle; +typedef struct Watchdog_Config_* Watchdog_Handle; /*! * @brief Watchdog debug stall settings @@ -261,7 +261,8 @@ typedef struct Watchdog_Config_ *Watchdog_Handle; * session is halted. To avoid unwanted resets, the Watchdog can be set to * stall while the processor is stopped by the debugger. */ -typedef enum Watchdog_DebugMode_ { +typedef enum Watchdog_DebugMode_ +{ Watchdog_DEBUG_STALL_ON, /*!< Watchdog will be stalled at breakpoints */ Watchdog_DEBUG_STALL_OFF /*!< Watchdog will keep running at breakpoints */ } Watchdog_DebugMode; @@ -273,7 +274,8 @@ typedef enum Watchdog_DebugMode_ { * be configured to either generate a reset upon timeout or simply produce a * periodic interrupt. */ -typedef enum Watchdog_ResetMode_ { +typedef enum Watchdog_ResetMode_ +{ Watchdog_RESET_OFF, /*!< Timeouts generate interrupts only */ Watchdog_RESET_ON /*!< Generates reset after timeout */ } Watchdog_ResetMode; @@ -296,14 +298,15 @@ typedef void (*Watchdog_Callback)(uintptr_t handle); * * @sa Watchdog_Params_init() */ -typedef struct Watchdog_Params_ { +typedef struct Watchdog_Params_ +{ Watchdog_Callback callbackFxn; /*!< Pointer to callback. Not supported on all targets. */ Watchdog_ResetMode resetMode; /*!< Mode to enable resets. Not supported on all targets. */ Watchdog_DebugMode debugStallMode; /*!< Mode to stall WDT at breakpoints. Not supported on all targets. */ - void *custom; /*!< Custom argument used by driver + void* custom; /*!< Custom argument used by driver implementation */ } Watchdog_Params; @@ -324,8 +327,8 @@ typedef void (*Watchdog_CloseFxn) (Watchdog_Handle handle); * Watchdog_control(). */ typedef int_fast16_t (*Watchdog_ControlFxn) (Watchdog_Handle handle, - uint_fast16_t cmd, - void *arg); + uint_fast16_t cmd, + void* arg); /*! * @brief A function pointer to a driver specific implementation of @@ -338,28 +341,29 @@ typedef void (*Watchdog_InitFxn) (Watchdog_Handle handle); * Watchdog_open(). */ typedef Watchdog_Handle (*Watchdog_OpenFxn) (Watchdog_Handle handle, - Watchdog_Params *params); + Watchdog_Params* params); /*! * @brief A function pointer to a driver specific implementation of * Watchdog_setReload(). */ typedef int_fast16_t (*Watchdog_SetReloadFxn)(Watchdog_Handle handle, - uint32_t ticks); + uint32_t ticks); /*! * @brief A function pointer to a driver specific implementation of * Watchdog_ConvertMsToTicksFxn(). */ typedef uint32_t (*Watchdog_ConvertMsToTicksFxn) (Watchdog_Handle handle, - uint32_t milliseconds); + uint32_t milliseconds); /*! * @brief The definition of a Watchdog function table that contains the * required set of functions to control a specific Watchdog driver * implementation. */ -typedef struct Watchdog_FxnTable_ { +typedef struct Watchdog_FxnTable_ +{ Watchdog_ClearFxn watchdogClear; Watchdog_CloseFxn watchdogClose; Watchdog_ControlFxn watchdogControl; @@ -380,17 +384,18 @@ typedef struct Watchdog_FxnTable_ { * * @sa Watchdog_init() */ -typedef struct Watchdog_Config_ { +typedef struct Watchdog_Config_ +{ /*! * Pointer to a table of driver-specific implementations of Watchdog APIs */ - Watchdog_FxnTable const *fxnTablePtr; + Watchdog_FxnTable const* fxnTablePtr; /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } Watchdog_Config; /*! @@ -455,7 +460,7 @@ extern void Watchdog_close(Watchdog_Handle handle); */ extern int_fast16_t Watchdog_control(Watchdog_Handle handle, uint_fast16_t cmd, - void *arg); + void* arg); /*! * @brief Initializes the Watchdog module @@ -486,7 +491,7 @@ extern void Watchdog_init(void); * @sa Watchdog_init() * @sa Watchdog_close() */ -extern Watchdog_Handle Watchdog_open(uint_least8_t index, Watchdog_Params *params); +extern Watchdog_Handle Watchdog_open(uint_least8_t index, Watchdog_Params* params); /*! * @brief Function to initialize the #Watchdog_Params structure to its defaults @@ -499,7 +504,7 @@ extern Watchdog_Handle Watchdog_open(uint_least8_t index, Watchdog_Params *param * resetMode = #Watchdog_RESET_ON * debugStallMode = #Watchdog_DEBUG_STALL_ON */ -extern void Watchdog_Params_init(Watchdog_Params *params); +extern void Watchdog_Params_init(Watchdog_Params* params); /*! * @brief Sets the Watchdog reload value @@ -546,7 +551,7 @@ extern int_fast16_t Watchdog_setReload(Watchdog_Handle handle, uint32_t ticks); * @sa Watchdog_setReload() */ extern uint32_t Watchdog_convertMsToTicks(Watchdog_Handle handle, - uint32_t milliseconds); + uint32_t milliseconds); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adc/ADCCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adc/ADCCC26XX.h index 65fef670..47f13988 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adc/ADCCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adc/ADCCC26XX.h @@ -68,7 +68,8 @@ extern "C" { * Larger input loads require longer sample times for the most accurate * results. */ -typedef enum ADCCC26XX_Sampling_Duration { +typedef enum ADCCC26XX_Sampling_Duration +{ ADCCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US, ADCCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US, ADCCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US, @@ -104,7 +105,8 @@ typedef enum ADCCC26XX_Sampling_Duration { * @warning Even though the upper voltage range of the ADC is 4.3 volts in fixed mode with input scaling enabled, the input should never exceed * VDDS as per the data sheet. */ -typedef enum ADCCC26XX_Reference_Source { +typedef enum ADCCC26XX_Reference_Source +{ ADCCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED, ADCCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL } ADCCC26XX_Reference_Source; @@ -115,7 +117,8 @@ typedef enum ADCCC26XX_Reference_Source { * The ADC driver currently only supports the driver manually triggering a conversion. * Support for other trigger sources may be added later. */ -typedef enum ADCCC26XX_Trigger_Source { +typedef enum ADCCC26XX_Trigger_Source +{ ADCCC26XX_TRIGGER_MANUAL = AUXADC_TRIGGER_MANUAL, } ADCCC26XX_Trigger_Source; @@ -128,7 +131,8 @@ extern const ADC_FxnTable ADCCC26XX_fxnTable; * driverlib macro definitions. * */ -typedef struct ADCCC26XX_HWAttrs { +typedef struct ADCCC26XX_HWAttrs +{ uint8_t adcDIO; /*!< DIO that the ADC is routed to */ uint8_t adcCompBInput; /*!< Internal signal routed to comparator B */ bool returnAdjustedVal; /*!< Should the raw output be trimmed before returning it */ @@ -143,7 +147,8 @@ typedef struct ADCCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct ADCCC26XX_Object { +typedef struct ADCCC26XX_Object +{ PIN_State pinState; /*!< Pin state object */ PIN_Handle pinHandle; /*!< Pin handle */ bool isOpen; /*!< Flag if the instance is in use */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26X2.h index eb7dad66..2cf78189 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26X2.h @@ -386,7 +386,8 @@ extern const ADCBuf_FxnTable ADCBufCC26X2_fxnTable; * In ADCBufCC26X2_SYNCHRONOUS mode, the ADC goes into IDLE in between conversions and uses less power. * The minimum sample time for full precision in ADCBufCC26X2_SAMPING_MODE_SYNCHRONOUS is dependent on the input load. */ -typedef enum ADCBufCC26X2_Sampling_Mode { +typedef enum ADCBufCC26X2_Sampling_Mode +{ ADCBufCC26X2_SAMPING_MODE_SYNCHRONOUS, ADCBufCC26X2_SAMPING_MODE_ASYNCHRONOUS } ADCBufCC26X2_Sampling_Mode; @@ -399,7 +400,8 @@ typedef enum ADCBufCC26X2_Sampling_Mode { * analogue input signal. Larger input loads require longer sample times for the most accurate * results. In ADCBufCC26X2_SAMPING_MODE_SYNCHRONOUS mode, this enum specifies the sampling times available. */ -typedef enum ADCBufCC26X2_Sampling_Duration { +typedef enum ADCBufCC26X2_Sampling_Duration +{ ADCBufCC26X2_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US, ADCBufCC26X2_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US, ADCBufCC26X2_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US, @@ -436,7 +438,8 @@ typedef enum ADCBufCC26X2_Sampling_Duration { * @warning Even though the upper voltage range of the ADC is 4.3 volts in fixed mode with input scaling enabled, the input should never exceed * VDDS as per the data sheet. */ -typedef enum ADCBufCC26X2_Reference_Source { +typedef enum ADCBufCC26X2_Reference_Source +{ ADCBufCC26X2_FIXED_REFERENCE = AUXADC_REF_FIXED, ADCBufCC26X2_VDDS_REFERENCE = AUXADC_REF_VDDS_REL } ADCBufCC26X2_Reference_Source; @@ -449,13 +452,14 @@ typedef enum ADCBufCC26X2_Reference_Source { * ============================================================================= */ - /*! - * @brief Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal - * - * Non-dio signals can be used as well. To do this, compBInput is set to the driverlib define corresponding to the - * desired non-dio signal and dio is set to PIN_UNASSIGNED. - */ -typedef struct ADCBufCC26X2_AdcChannelLutEntry{ +/*! +* @brief Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal +* +* Non-dio signals can be used as well. To do this, compBInput is set to the driverlib define corresponding to the +* desired non-dio signal and dio is set to PIN_UNASSIGNED. +*/ +typedef struct ADCBufCC26X2_AdcChannelLutEntry +{ uint8_t dio; /*!< DIO that this virtual channel is mapped to */ uint8_t compBInput; /*!< CompBInput that this virtual channel is mapped to */ } ADCBufCC26X2_AdcChannelLutEntry; @@ -467,7 +471,8 @@ typedef struct ADCBufCC26X2_AdcChannelLutEntry{ * to an instance of this struct must be specified in ADCBuf_Params::custom. Alternatively, * these values can be set using the control function after calling ADCBuf_open(). */ -typedef struct ADCBufCC26X2_ParamsExtension{ +typedef struct ADCBufCC26X2_ParamsExtension +{ /*! Amount of time the ADC spends sampling the analogue input */ ADCBufCC26X2_Sampling_Duration samplingDuration; /*! Specifies whether the ADC spends a fixed amount of time sampling or the entire time since the last conversion */ @@ -510,7 +515,8 @@ typedef struct ADCBufCC26X2_ParamsExtension{ * }; * @endcode */ -typedef struct ADCBufCC26X2_HWAttrs{ +typedef struct ADCBufCC26X2_HWAttrs +{ /*! @brief ADC SWI priority. The higher the number, the higher the priority. The minimum is 0 and the maximum is 15 by default. @@ -532,7 +538,7 @@ typedef struct ADCBufCC26X2_HWAttrs{ */ uint8_t intPriority; /*! Pointer to a table of ADCBufCC26X2_AdcChannelLutEntry's mapping internal CompBInput to DIO */ - ADCBufCC26X2_AdcChannelLutEntry const *adcChannelLut; + ADCBufCC26X2_AdcChannelLutEntry const* adcChannelLut; /*! GPTimer unit index (0A, 0B, 1A..). Currently only the 0A unit index is supported. */ uint8_t gpTimerUnit; } ADCBufCC26X2_HWAttrs; @@ -544,7 +550,8 @@ typedef struct ADCBufCC26X2_HWAttrs{ * * The application must not access any member variables of this structure! */ -typedef struct ADCBufCC26X2_Object{ +typedef struct ADCBufCC26X2_Object +{ /* ADC control variables */ bool isOpen; /*!< Has the obj been opened */ bool conversionInProgress; /*!< Is the ADC currently doing conversions */ @@ -558,14 +565,14 @@ typedef struct ADCBufCC26X2_Object{ ADCBuf_Callback callbackFxn; /*!< Pointer to callback function */ ADCBuf_Recurrence_Mode recurrenceMode; /*!< Should we convert continuously or one-shot */ ADCBuf_Return_Mode returnMode; /*!< Mode for all conversions */ - uint16_t *activeSampleBuffer; /*!< The last complete sample buffer used by the DMA */ + uint16_t* activeSampleBuffer; /*!< The last complete sample buffer used by the DMA */ /* ADC SYS/BIOS objects */ HwiP_Struct hwi; /*!< Hwi object */ SwiP_Struct swi; /*!< Swi object */ SemaphoreP_Struct conversionComplete; /*!< ADC semaphore */ - ADCBuf_Conversion *currentConversion; /*!< Pointer to the current conversion struct */ + ADCBuf_Conversion* currentConversion; /*!< Pointer to the current conversion struct */ /* PIN driver state object and handle */ PIN_State pinState; /*!< Pin state object */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26XX.h index 81a789b8..8295f5c6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/adcbuf/ADCBufCC26XX.h @@ -387,7 +387,8 @@ extern const ADCBuf_FxnTable ADCBufCC26XX_fxnTable; * In ADCBufCC26XX_SYNCHRONOUS mode, the ADC goes into IDLE in between conversions and uses less power. * The minimum sample time for full precision in ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS is dependent on the input load. */ -typedef enum ADCBufCC26XX_Sampling_Mode { +typedef enum ADCBufCC26XX_Sampling_Mode +{ ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS, ADCBufCC26XX_SAMPING_MODE_ASYNCHRONOUS } ADCBufCC26XX_Sampling_Mode; @@ -400,7 +401,8 @@ typedef enum ADCBufCC26XX_Sampling_Mode { * analogue input signal. Larger input loads require longer sample times for the most accurate * results. In ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS mode, this enum specifies the sampling times available. */ -typedef enum ADCBufCC26XX_Sampling_Duration { +typedef enum ADCBufCC26XX_Sampling_Duration +{ ADCBufCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US, ADCBufCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US, ADCBufCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US, @@ -437,7 +439,8 @@ typedef enum ADCBufCC26XX_Sampling_Duration { * @warning Even though the upper voltage range of the ADC is 4.3 volts in fixed mode with input scaling enabled, the input should never exceed * VDDS as per the data sheet. */ -typedef enum ADCBufCC26XX_Reference_Source { +typedef enum ADCBufCC26XX_Reference_Source +{ ADCBufCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED, ADCBufCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL } ADCBufCC26XX_Reference_Source; @@ -450,13 +453,14 @@ typedef enum ADCBufCC26XX_Reference_Source { * ============================================================================= */ - /*! - * @brief Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal - * - * Non-dio signals can be used as well. To do this, compBInput is set to the driverlib define corresponding to the - * desired non-dio signal and dio is set to PIN_UNASSIGNED. - */ -typedef struct ADCBufCC26XX_AdcChannelLutEntry{ +/*! +* @brief Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal +* +* Non-dio signals can be used as well. To do this, compBInput is set to the driverlib define corresponding to the +* desired non-dio signal and dio is set to PIN_UNASSIGNED. +*/ +typedef struct ADCBufCC26XX_AdcChannelLutEntry +{ uint8_t dio; /*!< DIO that this virtual channel is mapped to */ uint8_t compBInput; /*!< CompBInput that this virtual channel is mapped to */ } ADCBufCC26XX_AdcChannelLutEntry; @@ -468,7 +472,8 @@ typedef struct ADCBufCC26XX_AdcChannelLutEntry{ * to an instance of this struct must be specified in ADCBuf_Params::custom. Alternatively, * these values can be set using the control function after calling ADCBuf_open(). */ -typedef struct ADCBufCC26XX_ParamsExtension{ +typedef struct ADCBufCC26XX_ParamsExtension +{ /*! Amount of time the ADC spends sampling the analogue input */ ADCBufCC26XX_Sampling_Duration samplingDuration; /*! Specifies whether the ADC spends a fixed amount of time sampling or the entire time since the last conversion */ @@ -513,7 +518,8 @@ typedef struct ADCBufCC26XX_ParamsExtension{ * }; * @endcode */ -typedef struct ADCBufCC26XX_HWAttrs{ +typedef struct ADCBufCC26XX_HWAttrs +{ /*! @brief ADC SWI priority. The higher the number, the higher the priority. The minimum is 0 and the maximum is 15 by default. @@ -535,7 +541,7 @@ typedef struct ADCBufCC26XX_HWAttrs{ */ uint8_t intPriority; /*! Pointer to a table of ADCBufCC26XX_AdcChannelLutEntry's mapping internal CompBInput to DIO */ - ADCBufCC26XX_AdcChannelLutEntry const *adcChannelLut; + ADCBufCC26XX_AdcChannelLutEntry const* adcChannelLut; } ADCBufCC26XX_HWAttrs; @@ -545,7 +551,8 @@ typedef struct ADCBufCC26XX_HWAttrs{ * * The application must not access any member variables of this structure! */ -typedef struct ADCBufCC26XX_Object{ +typedef struct ADCBufCC26XX_Object +{ /* ADC control variables */ bool isOpen; /*!< Has the obj been opened */ bool conversionInProgress; /*!< Is the ADC currently doing conversions */ @@ -555,18 +562,18 @@ typedef struct ADCBufCC26XX_Object{ uint8_t currentChannel; /*!< The current virtual channel the ADCBuf driver is sampling on */ ADCBufCC26XX_Reference_Source refSource; /*!< Reference source for the ADC to use */ ADCBufCC26XX_Sampling_Mode samplingMode; /*!< Synchronous or asynchronous sampling mode */ - ADCBufCC26XX_Sampling_Duration samplingDuration; /*!< Time the ADC spends sampling in ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS */ + ADCBufCC26XX_Sampling_Duration samplingDuration; /*!< Time the ADC spends sampling in ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS */ ADCBuf_Callback callbackFxn; /*!< Pointer to callback function */ ADCBuf_Recurrence_Mode recurrenceMode; /*!< Should we convert continuously or one-shot */ ADCBuf_Return_Mode returnMode; /*!< Mode for all conversions */ - uint16_t *activeSampleBuffer; /*!< The last complete sample buffer used by the DMA */ + uint16_t* activeSampleBuffer; /*!< The last complete sample buffer used by the DMA */ /* ADC SYS/BIOS objects */ HwiP_Struct hwi; /*!< Hwi object */ SwiP_Struct swi; /*!< Swi object */ SemaphoreP_Struct conversionComplete; /*!< ADC semaphore */ - ADCBuf_Conversion *currentConversion; /*!< Pointer to the current conversion struct */ + ADCBuf_Conversion* currentConversion; /*!< Pointer to the current conversion struct */ /* PIN driver state object and handle */ PIN_State pinState; /*!< Pin state object */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aescbc/AESCBCCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aescbc/AESCBCCC26XX.h index 351e0579..ddf18d1d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aescbc/AESCBCCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aescbc/AESCBCCC26XX.h @@ -89,7 +89,8 @@ extern "C" { * AESCBC26XX hardware attributes should be included in the board file * and pointed to by the AESCBC_config struct. */ -typedef struct AESCBCCC26XX_HWAttrs { +typedef struct AESCBCCC26XX_HWAttrs +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -110,7 +111,8 @@ typedef struct AESCBCCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct AESCBCCC26XX_Object { +typedef struct AESCBCCC26XX_Object +{ bool isOpen; bool operationInProgress; bool operationCanceled; @@ -119,7 +121,7 @@ typedef struct AESCBCCC26XX_Object { AESCBC_OperationType operationType; uint32_t semaphoreTimeout; AESCBC_CallbackFxn callbackFxn; - AESCBC_Operation *operation; + AESCBC_Operation* operation; } AESCBCCC26XX_Object; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesccm/AESCCMCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesccm/AESCCMCC26XX.h index 2dbe1747..94399dcf 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesccm/AESCCMCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesccm/AESCCMCC26XX.h @@ -93,7 +93,8 @@ extern "C" { * AESCCM26XX hardware attributes should be included in the board file * and pointed to by the AESCCM_config struct. */ -typedef struct AESCCMCC26XX_HWAttrs { +typedef struct AESCCMCC26XX_HWAttrs +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -114,7 +115,8 @@ typedef struct AESCCMCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct AESCCMCC26XX_Object { +typedef struct AESCCMCC26XX_Object +{ bool isOpen; bool operationInProgress; bool operationCanceled; @@ -123,7 +125,7 @@ typedef struct AESCCMCC26XX_Object { AESCCM_OperationType operationType; uint32_t semaphoreTimeout; AESCCM_CallbackFxn callbackFxn; - AESCCM_Operation *operation; + AESCCM_Operation* operation; } AESCCMCC26XX_Object; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctr/AESCTRCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctr/AESCTRCC26XX.h index c8edaae4..b6b17b4d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctr/AESCTRCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctr/AESCTRCC26XX.h @@ -86,7 +86,8 @@ extern "C" { * AESCTR26XX hardware attributes should be included in the board file * and pointed to by the AESCTR_config struct. */ -typedef struct { +typedef struct +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -107,7 +108,8 @@ typedef struct { * * The application must not access any member variables of this structure! */ -typedef struct { +typedef struct +{ bool isOpen; bool operationInProgress; bool operationCanceled; @@ -117,7 +119,7 @@ typedef struct { AESCTR_OperationType operationType; uint32_t semaphoreTimeout; AESCTR_CallbackFxn callbackFxn; - AESCTR_Operation *operation; + AESCTR_Operation* operation; } AESCTRCC26XX_Object; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctrdrbg/AESCTRDRBGXX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctrdrbg/AESCTRDRBGXX.h index 3632b323..0c30edd6 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctrdrbg/AESCTRDRBGXX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesctrdrbg/AESCTRDRBGXX.h @@ -78,7 +78,7 @@ extern "C" { * and reducing stack size requirements. */ #ifndef AESCTRDRBG_MAX_KEY_LENGTH - #define AESCTRDRBG_MAX_KEY_LENGTH AESCTRDRBG_AES_KEY_LENGTH_256 +#define AESCTRDRBG_MAX_KEY_LENGTH AESCTRDRBG_AES_KEY_LENGTH_256 #endif /*! @brief Define that specifies the maximum seed length used by the driver */ @@ -90,7 +90,8 @@ extern "C" { * AESCTR26XX hardware attributes should be included in the board file * and pointed to by the AESCTR_config struct. */ -typedef struct { +typedef struct +{ uint_least8_t aesctrIndex; /*! Index into AESCTR_config array */ } AESCTRDRBGXX_HWAttrs; @@ -99,7 +100,8 @@ typedef struct { * * The application must not access any member variables of this structure! */ -typedef struct { +typedef struct +{ uint8_t keyingMaterial[AESCTRDRBG_AES_KEY_LENGTH_256]; uint8_t counter[AESCTRDRBG_AES_BLOCK_SIZE_BYTES]; CryptoKey key; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesecb/AESECBCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesecb/AESECBCC26XX.h index 0c06721a..1f9c0859 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesecb/AESECBCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesecb/AESECBCC26XX.h @@ -93,7 +93,8 @@ extern "C" { * AESECB26XX hardware attributes should be included in the board file * and pointed to by the AESECB_config struct. */ -typedef struct AESECBCC26XX_HWAttrs { +typedef struct AESECBCC26XX_HWAttrs +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -114,7 +115,8 @@ typedef struct AESECBCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct AESECBCC26XX_Object { +typedef struct AESECBCC26XX_Object +{ bool isOpen; bool operationInProgress; bool operationCanceled; @@ -123,7 +125,7 @@ typedef struct AESECBCC26XX_Object { AESECB_OperationType operationType; uint32_t semaphoreTimeout; AESECB_CallbackFxn callbackFxn; - AESECB_Operation *operation; + AESECB_Operation* operation; } AESECBCC26XX_Object; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesgcm/AESGCMCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesgcm/AESGCMCC26XX.h index 43cf3649..fca5a1ad 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesgcm/AESGCMCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/aesgcm/AESGCMCC26XX.h @@ -93,7 +93,8 @@ extern "C" { * AESGCM26XX hardware attributes should be included in the board file * and pointed to by the AESGCM_config struct. */ -typedef struct AESGCMCC26XX_HWAttrs { +typedef struct AESGCMCC26XX_HWAttrs +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -114,7 +115,8 @@ typedef struct AESGCMCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct AESGCMCC26XX_Object { +typedef struct AESGCMCC26XX_Object +{ bool isOpen; bool operationInProgress; bool operationCanceled; @@ -123,7 +125,7 @@ typedef struct AESGCMCC26XX_Object { AESGCM_OperationType operationType; uint32_t semaphoreTimeout; AESGCM_CallbackFxn callbackFxn; - AESGCM_Operation *operation; + AESGCM_Operation* operation; } AESGCMCC26XX_Object; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/crypto/CryptoCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/crypto/CryptoCC26XX.h index 9de0b44a..02009b2d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/crypto/CryptoCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/crypto/CryptoCC26XX.h @@ -418,8 +418,8 @@ extern "C" { #include DeviceFamily_constructPath(driverlib/crypto.h) #if DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2 - #warning "This driver is deprecated for the CC26x2 and CC13x2 families.\ - It is superceded by AESECB and AESCCM." +#warning "This driver is deprecated for the CC26x2 and CC13x2 families.\ +It is superceded by AESECB and AESCCM." #endif /** @@ -480,7 +480,7 @@ extern "C" { /*! * @brief A handle that is returned from a CryptoCC26XX_open() call. */ -typedef struct CryptoCC26XX_Config *CryptoCC26XX_Handle; +typedef struct CryptoCC26XX_Config* CryptoCC26XX_Handle; /*! * @brief CryptoCC26XX Mode Settings @@ -488,7 +488,8 @@ typedef struct CryptoCC26XX_Config *CryptoCC26XX_Handle; * This enum defines the read and write modes for the * configured CryptoCC26XX. */ -typedef enum CryptoCC26XX_Mode { +typedef enum CryptoCC26XX_Mode +{ /*! * Uses a semaphore to block while data is being sent. Context of the call * must be a Task. @@ -524,7 +525,8 @@ typedef uint8_t CryptoCC26XX_Operation; * This enumeration defines the possible key locations in CryptoCC26XX. * */ -typedef enum CryptoCC26XX_KeyLocation { +typedef enum CryptoCC26XX_KeyLocation +{ CRYPTOCC26XX_KEY_0 = 0, CRYPTOCC26XX_KEY_1, CRYPTOCC26XX_KEY_2, @@ -538,7 +540,8 @@ typedef enum CryptoCC26XX_KeyLocation { /*! * @brief CryptoCC26XX Parameters */ -typedef struct CryptoCC26XX_Params { +typedef struct CryptoCC26XX_Params +{ uint32_t timeout; /*!< Timeout for read semaphore */ } CryptoCC26XX_Params; @@ -558,7 +561,8 @@ typedef uint8_t CryptoCC26XX_KeyStore; * functions. The first data of all transactions must hold a type field indicating * which type of transaction to be performed. */ -typedef struct CryptoCC26XX_Transaction { +typedef struct CryptoCC26XX_Transaction +{ CryptoCC26XX_Operation opType; /*!< The type of the crypto operation */ CryptoCC26XX_Mode mode; /*!< The mode of current transaction */ uint8_t data[]; /*!< A void pointer to rest of transaction (transac. specific) */ @@ -614,13 +618,14 @@ typedef struct CryptoCC26XX_Transaction { * The CryptoCC26XX_AESCCM_Transaction structure defines all necessary * parameters for a AES-CCM transaction. */ -typedef struct CryptoCC26XX_AESCCM_Transaction { +typedef struct CryptoCC26XX_AESCCM_Transaction +{ CryptoCC26XX_Operation opType; /*!< The type of the crypto operation */ CryptoCC26XX_Mode mode; /*!< The mode of current transaction. Set by transact function. */ uint8_t keyIndex; /*!< The key store index to be used */ uint8_t authLength; /*!< Is the the length of the authentication field */ - /*!< 0, 2, 4, 6, 8, 10, 12, 14 or 16 octets. */ - char *nonce; /*!< A pointer to a nonce. It must satisfy the equation 15 = q + n, + /*!< 0, 2, 4, 6, 8, 10, 12, 14 or 16 octets. */ + char* nonce; /*!< A pointer to a nonce. It must satisfy the equation 15 = q + n, * where q is the fieldLength and n is the length of the nonce. * * The minimum size of the array containing the nonce is 12 bytes. @@ -637,14 +642,14 @@ typedef struct CryptoCC26XX_AESCCM_Transaction { * * Valid nonce lengths are {7, 8, 9, 10, 11, 12, 13}. */ - char *msgIn; /*!< + char* msgIn; /*!< * - Encryption: A pointer to the octet string input message and after the transaction, * the location of the encrypted cleartext. The cleatext is encrypted in place. * - Decryption: A pointer to the encrypted ciphertext composed of the encrypted cleartext * concatenated with the encrypted message authentication code. */ - char *header; /*!< The Additional Authentication Data (AAD). This header is authenticated but not encrypted. */ - void *msgOut; /*!< A pointer to where the encrypted CBC-MAC shall be written to. + char* header; /*!< The Additional Authentication Data (AAD). This header is authenticated but not encrypted. */ + void* msgOut; /*!< A pointer to where the encrypted CBC-MAC shall be written to. * - Encryption: It is recommended to set this to msgIn + msgInLength. The cyphertext sent out * must be the concatenation of the encrypted message and encrypted MAC anyway. * - Decyption: Do NOT set msgOut to the same location as the received MAC in the @@ -672,13 +677,14 @@ typedef struct CryptoCC26XX_AESCCM_Transaction { * This structure defines the nature of the AES-CBC transaction. An object of this structure must * be initialized by calling CryptoCC26XX_Transac_init(). */ -typedef struct CryptoCC26XX_AESCBC_Transaction { +typedef struct CryptoCC26XX_AESCBC_Transaction +{ CryptoCC26XX_Operation opType; /*!< The type of the crypto operation */ CryptoCC26XX_Mode mode; /*!< The mode of current transaction. Set by transact function. */ uint8_t keyIndex; /*!< The key store index to be used */ - void *nonce; /*!< A pointer to 16 byte Nonce. */ - void *msgIn; /*!< A pointer to the octet string input message */ - void *msgOut; /*!< A pointer to the output message location */ + void* nonce; /*!< A pointer to 16 byte Nonce. */ + void* msgIn; /*!< A pointer to the octet string input message */ + void* msgOut; /*!< A pointer to the output message location */ uint16_t msgInLength; /*!< The length of the message */ } CryptoCC26XX_AESCBC_Transaction; @@ -688,12 +694,13 @@ typedef struct CryptoCC26XX_AESCBC_Transaction { * This structure defines the nature of the AES-ECB transaction. An object of this structure must * be initialized by calling CryptoCC26XX_Transac_init(). */ -typedef struct CryptoCC26XX_AESECB_Transaction { +typedef struct CryptoCC26XX_AESECB_Transaction +{ CryptoCC26XX_Operation opType; /*!< The type of the crypto operation */ CryptoCC26XX_Mode mode; /*!< The mode of current transaction. Set by transact function. */ uint8_t keyIndex; /*!< The key store index to be used. */ - void *msgIn; /*!< A poiner to the octet string input message */ - void *msgOut; /*!< A pointer to the output message location */ + void* msgIn; /*!< A poiner to the octet string input message */ + void* msgOut; /*!< A pointer to the output message location */ } CryptoCC26XX_AESECB_Transaction; /*! @@ -725,7 +732,8 @@ typedef struct CryptoCC26XX_AESECB_Transaction { * }; * @endcode */ -typedef struct CryptoCC26XX_HWAttrs { +typedef struct CryptoCC26XX_HWAttrs +{ /*! Crypto Peripheral's base address */ uint32_t baseAddr; /*! Crypto Peripheral's power manager ID */ @@ -752,12 +760,13 @@ typedef struct CryptoCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct CryptoCC26XX_Object { +typedef struct CryptoCC26XX_Object +{ /* CryptoCC26XX control variables */ int openCnt; /*!< Counting number of clients */ uint32_t timeout; /*!< Timeout for encrypt/decrypt operation */ CryptoCC26XX_KeyStore keyStore; /*!< Key store for Crypto */ - CryptoCC26XX_Transaction *currentTransact; /*!< Pointer to ongoing transaction */ + CryptoCC26XX_Transaction* currentTransact; /*!< Pointer to ongoing transaction */ /*! Crypto notification object */ Power_NotifyObj cryptoNotiObj; @@ -767,12 +776,13 @@ typedef struct CryptoCC26XX_Object { } CryptoCC26XX_Object; /*! @brief CryptoCC26XX Global Configuration */ -typedef struct CryptoCC26XX_Config { +typedef struct CryptoCC26XX_Config +{ /*! Pointer to a driver specific data object */ - void *object; + void* object; /*! Pointer to a driver specific hardware attributes structure */ - void const *hwAttrs; + void const* hwAttrs; } CryptoCC26XX_Config; /*! @@ -826,7 +836,7 @@ void CryptoCC26XX_init(void); * * @sa CryptoCC26XX_close(), CryptoCC26XX_init() */ -CryptoCC26XX_Handle CryptoCC26XX_open(unsigned int index, bool exclusiveAccess, CryptoCC26XX_Params *params); +CryptoCC26XX_Handle CryptoCC26XX_open(unsigned int index, bool exclusiveAccess, CryptoCC26XX_Params* params); /*! * @brief Function to initialize the CryptoCC26XX_Params struct to its defaults. @@ -838,7 +848,7 @@ CryptoCC26XX_Handle CryptoCC26XX_open(unsigned int index, bool exclusiveAccess, * * @param params Parameter structure to initialize. */ -void CryptoCC26XX_Params_init(CryptoCC26XX_Params *params); +void CryptoCC26XX_Params_init(CryptoCC26XX_Params* params); /*! * @brief Function to initialize the CryptoCC26XX_Transaction struct to its defaults. @@ -850,7 +860,7 @@ void CryptoCC26XX_Params_init(CryptoCC26XX_Params *params); * @param opType Cryto Operation type to perform in the transaction. See * ::CryptoCC26XX_Operation for currently supported types. */ -void CryptoCC26XX_Transac_init(CryptoCC26XX_Transaction *trans, CryptoCC26XX_Operation opType); +void CryptoCC26XX_Transac_init(CryptoCC26XX_Transaction* trans, CryptoCC26XX_Operation opType); /*! * @brief Function that allocates key, writes key into key store RAM and returns @@ -880,7 +890,7 @@ void CryptoCC26XX_Transac_init(CryptoCC26XX_Transaction *trans, CryptoCC26XX_Ope * @sa CryptoCC26XX_releaseKey() * @sa CryptoCC26XX_loadKey() */ -int CryptoCC26XX_allocateKey(CryptoCC26XX_Handle handle, CryptoCC26XX_KeyLocation keyLocation, const uint32_t *keySrc); +int CryptoCC26XX_allocateKey(CryptoCC26XX_Handle handle, CryptoCC26XX_KeyLocation keyLocation, const uint32_t* keySrc); /*! @@ -906,7 +916,7 @@ int CryptoCC26XX_allocateKey(CryptoCC26XX_Handle handle, CryptoCC26XX_KeyLocatio * @sa CryptoCC26XX_releaseKey() * @sa CryptoCC26XX_loadKey() */ -int CryptoCC26XX_loadKey(CryptoCC26XX_Handle handle, int keyIndex, const uint32_t *keySrc); +int CryptoCC26XX_loadKey(CryptoCC26XX_Handle handle, int keyIndex, const uint32_t* keySrc); /*! * @brief Function that releases the specified CryptoCC26XX Key. @@ -925,7 +935,7 @@ int CryptoCC26XX_loadKey(CryptoCC26XX_Handle handle, int keyIndex, const uint32_ * * @sa CryptoCC26XX_allocateKey() */ -int CryptoCC26XX_releaseKey(CryptoCC26XX_Handle handle, int *keyIndex); +int CryptoCC26XX_releaseKey(CryptoCC26XX_Handle handle, int* keyIndex); /*! * @brief Function to do a Crypto operation (encryption or decryption) in blocking mode. @@ -947,7 +957,7 @@ int CryptoCC26XX_releaseKey(CryptoCC26XX_Handle handle, int *keyIndex); * * @sa CryptoCC26XX_open(), CryptoCC26XX_allocateKey(), CryptoCC26XX_transactPolling() */ -int CryptoCC26XX_transact(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction *transaction); +int CryptoCC26XX_transact(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction* transaction); /*! * @brief Function to do a Crypto transaction operation (encryption or decryption) in polling mode. @@ -968,7 +978,7 @@ int CryptoCC26XX_transact(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction * * * @sa CryptoCC26XX_open(), CryptoCC26XX_allocateKey(), CryptoCC26XX_transact() */ -int CryptoCC26XX_transactPolling(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction *transaction); +int CryptoCC26XX_transactPolling(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction* transaction); /*! * @brief Function to do a Crypto transaction operation (encryption or decryption) in @@ -993,7 +1003,7 @@ int CryptoCC26XX_transactPolling(CryptoCC26XX_Handle handle, CryptoCC26XX_Transa * * @sa CryptoCC26XX_open(), CryptoCC26XX_allocateKey(), CryptoCC26XX_transact() */ -int CryptoCC26XX_transactCallback(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction *transaction); +int CryptoCC26XX_transactCallback(CryptoCC26XX_Handle handle, CryptoCC26XX_Transaction* transaction); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKey.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKey.h index 531a8a9f..fd4e51fb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKey.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKey.h @@ -95,11 +95,11 @@ extern "C" { */ - /** - * @defgroup CryptoKey_CONTROL Status codes - * These CryptoKey macros are reservations for CryptoKey.h - * @{ - */ +/** +* @defgroup CryptoKey_CONTROL Status codes +* These CryptoKey macros are reservations for CryptoKey.h +* @{ +*/ /*! @@ -156,7 +156,8 @@ extern "C" { * @brief List of the different types of CryptoKey. * */ -typedef enum CryptoKey_Encoding_ { +typedef enum CryptoKey_Encoding_ +{ CryptoKey_PLAINTEXT = 1 << 1, CryptoKey_BLANK_PLAINTEXT = 1 << 2, CryptoKey_KEYSTORE = 1 << 3, @@ -171,8 +172,9 @@ typedef enum CryptoKey_Encoding_ { * This structure contains all the information necessary to access keying material stored * in plaintext form in flash or RAM. */ -typedef struct CryptoKey_Plaintext_ { - uint8_t *keyMaterial; +typedef struct CryptoKey_Plaintext_ +{ + uint8_t* keyMaterial; uint16_t keyLength; } CryptoKey_Plaintext; @@ -182,7 +184,8 @@ typedef struct CryptoKey_Plaintext_ { * This structure contains all the information necessary to access keying material stored * in a dedicated key store or key database with memory access controls. */ -typedef struct CryptoKey_KeyStore_ { +typedef struct CryptoKey_KeyStore_ +{ void* keyStore; uint16_t keyLength; uint32_t keyIndex; @@ -194,8 +197,9 @@ typedef struct CryptoKey_KeyStore_ { * This structure contains all the information necessary to access keying material stored * in an encrypted structure in flash or RAM. */ -typedef struct CryptoKey_KeyBlob_ { - uint8_t *keyBlob; +typedef struct CryptoKey_KeyBlob_ +{ + uint8_t* keyBlob; uint32_t keyBlobLength; } CryptoKey_KeyBlob; @@ -207,9 +211,11 @@ typedef struct CryptoKey_KeyBlob_ { * - CryptoKey_KeyStore * - CryptoKey_KeyBlob */ -typedef struct CryptoKey_ { +typedef struct CryptoKey_ +{ CryptoKey_Encoding encoding; - union { + union + { CryptoKey_Plaintext plaintext; CryptoKey_KeyStore keyStore; CryptoKey_KeyBlob keyBlob; @@ -237,7 +243,7 @@ typedef struct CryptoKey_SecurityPolicy_ CryptoKey_SecurityPolicy; * * @return Returns a status code */ -int_fast16_t CryptoKey_getCryptoKeyType(CryptoKey *keyHandle, CryptoKey_Encoding *keyType); +int_fast16_t CryptoKey_getCryptoKeyType(CryptoKey* keyHandle, CryptoKey_Encoding* keyType); /*! * @brief Wheather the CryptoKey is 'blank' or represents valid keying material @@ -247,7 +253,7 @@ int_fast16_t CryptoKey_getCryptoKeyType(CryptoKey *keyHandle, CryptoKey_Encoding * * @return Returns a status code */ -int_fast16_t CryptoKey_isBlank(CryptoKey *keyHandle, bool *isBlank); +int_fast16_t CryptoKey_isBlank(CryptoKey* keyHandle, bool* isBlank); /*! * @brief Marks a CryptoKey as 'blank'. @@ -258,7 +264,7 @@ int_fast16_t CryptoKey_isBlank(CryptoKey *keyHandle, bool *isBlank); * * @return Returns a status code */ -int_fast16_t CryptoKey_markAsBlank(CryptoKey *keyHandle); +int_fast16_t CryptoKey_markAsBlank(CryptoKey* keyHandle); /*! * @brief Function to initialize the CryptoKey_SecurityPolicy struct to its defaults @@ -269,7 +275,7 @@ int_fast16_t CryptoKey_markAsBlank(CryptoKey *keyHandle); * * @return Returns a status code */ -int_fast16_t CryptoKey_initSecurityPolicy(CryptoKey_SecurityPolicy *policy); +int_fast16_t CryptoKey_initSecurityPolicy(CryptoKey_SecurityPolicy* policy); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKeyPlaintext.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKeyPlaintext.h index 023299f1..a63864d2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKeyPlaintext.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/cryptokey/CryptoKeyPlaintext.h @@ -86,7 +86,7 @@ extern "C" { * * @return Returns a status code from CryptoKey.h */ -int_fast16_t CryptoKeyPlaintext_initKey(CryptoKey *keyHandle, uint8_t *key, size_t keyLength); +int_fast16_t CryptoKeyPlaintext_initKey(CryptoKey* keyHandle, uint8_t* key, size_t keyLength); /*! @@ -101,7 +101,7 @@ int_fast16_t CryptoKeyPlaintext_initKey(CryptoKey *keyHandle, uint8_t *key, size * * @return Returns a status code from CryptoKey.h */ -int_fast16_t CryptoKeyPlaintext_initBlankKey(CryptoKey *keyHandle, uint8_t *keyLocation, size_t keyLength); +int_fast16_t CryptoKeyPlaintext_initBlankKey(CryptoKey* keyHandle, uint8_t* keyLocation, size_t keyLength); /*! * @brief Gets the length of a plaintext key @@ -112,7 +112,7 @@ int_fast16_t CryptoKeyPlaintext_initBlankKey(CryptoKey *keyHandle, uint8_t *keyL * * @return Returns a status code from CryptoKey.h */ -int_fast16_t CryptoKeyPlaintext_getKeyLength(CryptoKey *keyHandle, size_t *length); +int_fast16_t CryptoKeyPlaintext_getKeyLength(CryptoKey* keyHandle, size_t* length); /*! * @brief Sets the CryptoKey keyMaterial pointer @@ -126,7 +126,7 @@ int_fast16_t CryptoKeyPlaintext_getKeyLength(CryptoKey *keyHandle, size_t *lengt * * @return Returns a status code from CryptoKey.h */ -int_fast16_t CryptoKeyPlaintext_setKeyLocation(CryptoKey *keyHandle, uint8_t *location); +int_fast16_t CryptoKeyPlaintext_setKeyLocation(CryptoKey* keyHandle, uint8_t* location); /*! @@ -138,7 +138,7 @@ int_fast16_t CryptoKeyPlaintext_setKeyLocation(CryptoKey *keyHandle, uint8_t *lo * * @return Returns a status code from CryptoKey.h */ -int_fast16_t CryptoKeyPlaintext_getKeyLength(CryptoKey *keyHandle, size_t *length); +int_fast16_t CryptoKeyPlaintext_getKeyLength(CryptoKey* keyHandle, size_t* length); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/ecc/ECCParams.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/ecc/ECCParams.h index 61542f39..5e7217d4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/ecc/ECCParams.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/cryptoutils/ecc/ECCParams.h @@ -92,7 +92,8 @@ extern "C" { * | Edwards | x^2 + y^2 = 1 + dx^2y^2 mod p | * */ -typedef enum ECCParams_CurveType_ { +typedef enum ECCParams_CurveType_ +{ ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS = 0, ECCParams_CURVE_TYPE_MONTGOMERY, ECCParams_CURVE_TYPE_EDWARDS, @@ -108,15 +109,16 @@ typedef enum ECCParams_CurveType_ { * form y^3 = x^2 + a*x + b * */ -typedef struct ECCParams_CurveParams_ { +typedef struct ECCParams_CurveParams_ +{ const ECCParams_CurveType curveType; const size_t length; //!< Length of the curve in bytes. All other buffers have this length. - const uint8_t *prime; //!< The prime that defines the field of the curve. - const uint8_t *order; //!< Order of the curve. - const uint8_t *a; //!< Coefficient a of the equation. - const uint8_t *b; //!< Coefficient b of the equation. - const uint8_t *generatorX; //!< X coordinate of the generator point of the curve. - const uint8_t *generatorY; //!< Y coordinate of the generator point of the curve. + const uint8_t* prime; //!< The prime that defines the field of the curve. + const uint8_t* order; //!< Order of the curve. + const uint8_t* a; //!< Coefficient a of the equation. + const uint8_t* b; //!< Coefficient b of the equation. + const uint8_t* generatorX; //!< X coordinate of the generator point of the curve. + const uint8_t* generatorY; //!< Y coordinate of the generator point of the curve. } ECCParams_CurveParams; @@ -205,7 +207,7 @@ extern const ECCParams_CurveParams ECCParams_Curve25519; * * @pre Initialize the CryptoKey with a 32-byte buffer in a compliant location. */ -int_fast16_t ECCParams_FormatCurve25519PrivateKey(CryptoKey *myPrivateKey); +int_fast16_t ECCParams_FormatCurve25519PrivateKey(CryptoKey* myPrivateKey); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dma/UDMACC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dma/UDMACC26XX.h index c829783a..92db1f88 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dma/UDMACC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dma/UDMACC26XX.h @@ -155,24 +155,24 @@ extern "C" { /*! Base address for the DMA control table, must be 1024 bytes aligned */ #if !defined(UDMACC26XX_CONFIG_BASE) && (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2) - #define UDMACC26XX_CONFIG_BASE 0x20001800 +#define UDMACC26XX_CONFIG_BASE 0x20001800 #elif !defined(UDMACC26XX_CONFIG_BASE) - #define UDMACC26XX_CONFIG_BASE 0x20000400 +#define UDMACC26XX_CONFIG_BASE 0x20000400 #endif /*! Make sure DMA control table base address is 1024 bytes aligned */ #if(UDMACC26XX_CONFIG_BASE & 0x3FF) - #error "Base address for DMA control table 'UDMACC26XX_CONFIG_BASE' must be 1024 bytes aligned." +#error "Base address for DMA control table 'UDMACC26XX_CONFIG_BASE' must be 1024 bytes aligned." #endif /*! Compiler specific macros to allocate DMA control table entries */ #if defined(__IAR_SYSTEMS_ICC__) #define ALLOCATE_CONTROL_TABLE_ENTRY(ENTRY_NAME, CHANNEL_INDEX) \ -__no_init static volatile tDMAControlTable ENTRY_NAME @ UDMACC26XX_CONFIG_BASE + CHANNEL_INDEX * sizeof(tDMAControlTable) + __no_init static volatile tDMAControlTable ENTRY_NAME @ UDMACC26XX_CONFIG_BASE + CHANNEL_INDEX * sizeof(tDMAControlTable) #elif defined(__TI_COMPILER_VERSION__) #define ALLOCATE_CONTROL_TABLE_ENTRY(ENTRY_NAME, CHANNEL_INDEX) \ -PRAGMA(LOCATION( ENTRY_NAME , UDMACC26XX_CONFIG_BASE + CHANNEL_INDEX * sizeof(tDMAControlTable) );)\ -static volatile tDMAControlTable ENTRY_NAME + PRAGMA(LOCATION( ENTRY_NAME , UDMACC26XX_CONFIG_BASE + CHANNEL_INDEX * sizeof(tDMAControlTable) );)\ + static volatile tDMAControlTable ENTRY_NAME #define PRAGMA(x) _Pragma(#x) #elif defined(__GNUC__) #define ALLOCATE_CONTROL_TABLE_ENTRY(ENTRY_NAME, CHANNEL_INDEX) \ @@ -189,7 +189,8 @@ static volatile tDMAControlTable ENTRY_NAME /*! * @brief UDMACC26XX object */ -typedef struct UDMACC26XX_Object { +typedef struct UDMACC26XX_Object +{ bool isOpen; /*!< Flag for open/close status */ HwiP_Struct hwi; /*!< Embedded Hwi Object */ } UDMACC26XX_Object; @@ -197,7 +198,8 @@ typedef struct UDMACC26XX_Object { /*! * @brief UDMACC26XX hardware attributes */ -typedef struct UDMACC26XX_HWAttrs { +typedef struct UDMACC26XX_HWAttrs +{ uint32_t baseAddr; /*!< Base adddress for UDMACC26XX */ PowerCC26XX_Resource powerMngrId; /*!< UDMACC26XX Peripheral's power manager ID */ uint8_t intNum; /*!< UDMACC26XX error interrupt number */ @@ -228,15 +230,16 @@ typedef struct UDMACC26XX_HWAttrs { /*! * @brief UDMACC26XX Global configuration */ -typedef struct UDMACC26XX_Config { - void *object; /*!< Pointer to UDMACC26XX object */ - void const *hwAttrs; /*!< Pointer to hardware attribute */ +typedef struct UDMACC26XX_Config +{ + void* object; /*!< Pointer to UDMACC26XX object */ + void const* hwAttrs; /*!< Pointer to hardware attribute */ } UDMACC26XX_Config; /*! * @brief A handle that is returned from a UDMACC26XX_open() call. */ -typedef struct UDMACC26XX_Config *UDMACC26XX_Handle; +typedef struct UDMACC26XX_Config* UDMACC26XX_Handle; /* Extern'd hwiIntFxn */ extern void UDMACC26XX_hwiIntFxn(uintptr_t callbacks); @@ -255,10 +258,10 @@ extern void UDMACC26XX_hwiIntFxn(uintptr_t callbacks); */ __STATIC_INLINE void UDMACC26XX_init(UDMACC26XX_Handle handle) { - UDMACC26XX_Object *object; + UDMACC26XX_Object* object; /* Get the pointer to the object */ - object = (UDMACC26XX_Object *)(handle->object); + object = (UDMACC26XX_Object*)(handle->object); /* mark the module as available */ object->isOpen = false; @@ -296,10 +299,10 @@ extern UDMACC26XX_Handle UDMACC26XX_open(); */ __STATIC_INLINE void UDMACC26XX_channelEnable(UDMACC26XX_Handle handle, uint32_t channelBitMask) { - UDMACC26XX_HWAttrs const *hwAttrs; + UDMACC26XX_HWAttrs const* hwAttrs; /* Get the pointer to the hwAttrs */ - hwAttrs = (UDMACC26XX_HWAttrs *)(handle->hwAttrs); + hwAttrs = (UDMACC26XX_HWAttrs*)(handle->hwAttrs); /* Enable DMA channel */ HWREG(hwAttrs->baseAddr + UDMA_O_SETCHANNELEN) = channelBitMask; @@ -325,10 +328,10 @@ __STATIC_INLINE void UDMACC26XX_channelEnable(UDMACC26XX_Handle handle, uint32_t */ __STATIC_INLINE bool UDMACC26XX_channelDone(UDMACC26XX_Handle handle, uint32_t channelBitMask) { - UDMACC26XX_HWAttrs const *hwAttrs; + UDMACC26XX_HWAttrs const* hwAttrs; /* Get the pointer to the hwAttrs */ - hwAttrs = (UDMACC26XX_HWAttrs *)(handle->hwAttrs); + hwAttrs = (UDMACC26XX_HWAttrs*)(handle->hwAttrs); /* Check if REQDONE is set for a specific channel */ return (uDMAIntStatus(hwAttrs->baseAddr) & channelBitMask) ? true : false; @@ -353,10 +356,10 @@ __STATIC_INLINE bool UDMACC26XX_channelDone(UDMACC26XX_Handle handle, uint32_t c */ __STATIC_INLINE void UDMACC26XX_clearInterrupt(UDMACC26XX_Handle handle, uint32_t channelBitMask) { - UDMACC26XX_HWAttrs const *hwAttrs; + UDMACC26XX_HWAttrs const* hwAttrs; /* Get the pointer to the hwAttrs and object */ - hwAttrs = (UDMACC26XX_HWAttrs *)(handle->hwAttrs); + hwAttrs = (UDMACC26XX_HWAttrs*)(handle->hwAttrs); /* Clear UDMA done interrupt */ uDMAIntClear(hwAttrs->baseAddr, channelBitMask); @@ -381,7 +384,7 @@ __STATIC_INLINE void UDMACC26XX_clearInterrupt(UDMACC26XX_Handle handle, uint32_ */ __STATIC_INLINE void UDMACC26XX_channelDisable(UDMACC26XX_Handle handle, uint32_t channelBitMask) { - UDMACC26XX_HWAttrs const *hwAttrs = handle->hwAttrs; + UDMACC26XX_HWAttrs const* hwAttrs = handle->hwAttrs; HWREG(hwAttrs->baseAddr + UDMA_O_CLEARCHANNELEN) = channelBitMask; } @@ -407,9 +410,9 @@ __STATIC_INLINE void UDMACC26XX_channelDisable(UDMACC26XX_Handle handle, uint32_ * @sa UDMACC26XX_channelEnable */ __STATIC_INLINE void UDMACC26XX_disableAttribute(UDMACC26XX_Handle handle, - uint32_t channelNum, uint32_t attr) + uint32_t channelNum, uint32_t attr) { - UDMACC26XX_HWAttrs const *hwAttrs = (UDMACC26XX_HWAttrs *) handle->hwAttrs; + UDMACC26XX_HWAttrs const* hwAttrs = (UDMACC26XX_HWAttrs*) handle->hwAttrs; uDMAChannelAttributeDisable(hwAttrs->baseAddr, channelNum, attr); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/ClockP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/ClockP.h index 76a0bd81..0ef2d6a1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/ClockP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/ClockP.h @@ -80,7 +80,8 @@ extern "C" { * Opaque structure that should be large enough to hold any of the * RTOS specific ClockP objects. */ -typedef union ClockP_Struct { +typedef union ClockP_Struct +{ uint32_t dummy; /*!< Align object */ char data[ClockP_STRUCT_SIZE]; } ClockP_Struct; @@ -88,7 +89,8 @@ typedef union ClockP_Struct { /*! * @brief Frequency-in-hertz struct */ -typedef struct ClockP_FreqHz { +typedef struct ClockP_FreqHz +{ uint32_t hi; /*!< most significant 32-bits of frequency */ uint32_t lo; /*!< least significant 32-bits of frequency */ } ClockP_FreqHz; @@ -96,7 +98,8 @@ typedef struct ClockP_FreqHz { /*! * @brief Status codes for ClockP APIs */ -typedef enum ClockP_Status { +typedef enum ClockP_Status +{ ClockP_OK = 0, ClockP_FAILURE = -1 } ClockP_Status; @@ -108,7 +111,7 @@ typedef enum ClockP_Status { * and then is used in the other instance based functions (e.g. ::ClockP_start, * ::ClockP_stop, etc.). */ -typedef void *ClockP_Handle; +typedef void* ClockP_Handle; #define ClockP_handle(x) ((ClockP_Handle)(x)) @@ -137,7 +140,8 @@ typedef void (*ClockP_Fxn)(uintptr_t arg); * clock is initially started and set to expire with the 'timeout' * argument. */ -typedef struct ClockP_Params { +typedef struct ClockP_Params +{ bool startFlag; /*!< Start immediately after instance is created. */ uint32_t period; /*!< Period of clock object. */ uintptr_t arg; /*!< Argument passed into the clock function. */ @@ -157,10 +161,10 @@ typedef struct ClockP_Params { * * @return A ClockP_Handle on success or a NULL on an error */ -extern ClockP_Handle ClockP_construct(ClockP_Struct *clockP, +extern ClockP_Handle ClockP_construct(ClockP_Struct* clockP, ClockP_Fxn clockFxn, uint32_t timeout, - ClockP_Params *params); + ClockP_Params* params); /*! * @brief Function to destruct a clock object @@ -170,7 +174,7 @@ extern ClockP_Handle ClockP_construct(ClockP_Struct *clockP, * * @return */ -extern void ClockP_destruct(ClockP_Struct *clockP); +extern void ClockP_destruct(ClockP_Struct* clockP); /*! * @brief Function to create a clock object. @@ -186,7 +190,7 @@ extern void ClockP_destruct(ClockP_Struct *clockP); */ extern ClockP_Handle ClockP_create(ClockP_Fxn clockFxn, uint32_t timeout, - ClockP_Params *params); + ClockP_Params* params); /*! * @brief Function to delete a clock. @@ -200,7 +204,7 @@ extern void ClockP_delete(ClockP_Handle handle); * * @param freq Pointer to the FreqHz structure */ -extern void ClockP_getCpuFreq(ClockP_FreqHz *freq); +extern void ClockP_getCpuFreq(ClockP_FreqHz* freq); /*! * @brief Get the system tick period in microseconds. @@ -264,7 +268,7 @@ extern bool ClockP_isActive(ClockP_Handle handle); * * @param params Pointer to the instance configuration parameters. */ -extern void ClockP_Params_init(ClockP_Params *params); +extern void ClockP_Params_init(ClockP_Params* params); /*! * @brief Set the initial timeout diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/DebugP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/DebugP.h index 51faa02c..1ab4e664 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/DebugP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/DebugP.h @@ -79,7 +79,7 @@ extern "C" { #endif #if DebugP_ASSERT_ENABLED -extern void _DebugP_assert(int expression, const char *file, int line); +extern void _DebugP_assert(int expression, const char* file, int line); /*! * @brief Assert checking function * @@ -90,7 +90,7 @@ extern void _DebugP_assert(int expression, const char *file, int line); * @param expression Expression to evaluate */ #define DebugP_assert(expression) (_DebugP_assert(expression, \ - __FILE__, __LINE__)) + __FILE__, __LINE__)) #else #define DebugP_assert(expression) #endif @@ -104,7 +104,7 @@ extern void _DebugP_assert(int expression, const char *file, int line); * * @param format "printf" format string */ -extern void DebugP_log0(const char *format); +extern void DebugP_log0(const char* format); /*! * @brief Debug log function with 1 parameters @@ -115,7 +115,7 @@ extern void DebugP_log0(const char *format); * @param format "printf" format string * @param p1 first parameter to format string */ -extern void DebugP_log1(const char *format, uintptr_t p1); +extern void DebugP_log1(const char* format, uintptr_t p1); /*! * @brief Debug log function with 2 parameters @@ -127,7 +127,7 @@ extern void DebugP_log1(const char *format, uintptr_t p1); * @param p1 first parameter to format string * @param p2 second parameter to format string */ -extern void DebugP_log2(const char *format, uintptr_t p1, uintptr_t p2); +extern void DebugP_log2(const char* format, uintptr_t p1, uintptr_t p2); /*! * @brief Debug log function with 3 parameters @@ -140,7 +140,7 @@ extern void DebugP_log2(const char *format, uintptr_t p1, uintptr_t p2); * @param p2 second parameter to format string * @param p3 third parameter to format string */ -extern void DebugP_log3(const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3); +extern void DebugP_log3(const char* format, uintptr_t p1, uintptr_t p2, uintptr_t p3); /*! * @brief Debug log function with 4 parameters @@ -154,7 +154,7 @@ extern void DebugP_log3(const char *format, uintptr_t p1, uintptr_t p2, uintptr_ * @param p3 third parameter to format string * @param p4 fourth parameter to format string */ -extern void DebugP_log4(const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4); +extern void DebugP_log4(const char* format, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4); #else #define DebugP_log0(format) #define DebugP_log1(format, p1) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/HwiP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/HwiP.h index fa6f1260..c6764f6d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/HwiP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/HwiP.h @@ -73,7 +73,8 @@ extern "C" { * Opaque structure that should be large enough to hold any of the RTOS * specific HwiP objects. */ -typedef union HwiP_Struct { +typedef union HwiP_Struct +{ uint32_t dummy; /*!< Align object */ char data[HwiP_STRUCT_SIZE]; } HwiP_Struct; @@ -83,12 +84,13 @@ typedef union HwiP_Struct { * * A HwiP_Handle returned from the ::HwiP_create represents that instance. */ -typedef void *HwiP_Handle; +typedef void* HwiP_Handle; /*! * @brief Status codes for HwiP APIs */ -typedef enum HwiP_Status { +typedef enum HwiP_Status +{ HwiP_OK = 0, HwiP_FAILURE = -1 } HwiP_Status; @@ -110,7 +112,8 @@ typedef void (*HwiP_Fxn)(uintptr_t arg); * Parameter enableInt specifies if the interrupt should be enabled * upon creation of the HwiP object. The default is true. */ -typedef struct HwiP_Params { +typedef struct HwiP_Params +{ uintptr_t arg; /*!< Argument passed into the Hwi function. */ uint32_t priority; /*!< Device specific priority. */ bool enableInt; /*!< Enable interrupt on creation. */ @@ -146,8 +149,8 @@ extern int HwiP_swiPIntNum; * * @return A HwiP_Handle on success or a NULL on an error */ -extern HwiP_Handle HwiP_construct(HwiP_Struct *hwiP, int interruptNum, - HwiP_Fxn hwiFxn, HwiP_Params *params); +extern HwiP_Handle HwiP_construct(HwiP_Struct* hwiP, int interruptNum, + HwiP_Fxn hwiFxn, HwiP_Params* params); /*! * @brief Function to destruct a hardware interrupt object @@ -157,7 +160,7 @@ extern HwiP_Handle HwiP_construct(HwiP_Struct *hwiP, int interruptNum, * * @return */ -extern void HwiP_destruct(HwiP_Struct *hwiP); +extern void HwiP_destruct(HwiP_Struct* hwiP); /*! * @brief Function to clear a single interrupt @@ -180,7 +183,7 @@ extern void HwiP_clearInterrupt(int interruptNum); * @return A HwiP_Handle on success or a NULL on an error */ extern HwiP_Handle HwiP_create(int interruptNum, HwiP_Fxn hwiFxn, - HwiP_Params *params); + HwiP_Params* params); /*! * @brief Function to delete an interrupt on CortexM devices @@ -246,7 +249,7 @@ extern bool HwiP_inISR(void); * * @param params Pointer to the instance configuration parameters. */ -extern void HwiP_Params_init(HwiP_Params *params); +extern void HwiP_Params_init(HwiP_Params* params); /*! * @brief Function to plug an interrupt vector @@ -254,7 +257,7 @@ extern void HwiP_Params_init(HwiP_Params *params); * @param interruptNum ID of interrupt to plug * @param fxn ISR that services plugged interrupt */ -extern void HwiP_plug(int interruptNum, void *fxn); +extern void HwiP_plug(int interruptNum, void* fxn); /*! * @brief Function to generate an interrupt diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/MutexP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/MutexP.h index 037bb553..76100aa1 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/MutexP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/MutexP.h @@ -78,7 +78,8 @@ extern "C" { * Opaque structure that should be large enough to hold any of the * RTOS specific MutexP objects. */ -typedef union MutexP_Struct { +typedef union MutexP_Struct +{ uint32_t dummy; /*!< Align object */ char data[MutexP_STRUCT_SIZE]; } MutexP_Struct; @@ -86,7 +87,8 @@ typedef union MutexP_Struct { /*! * @brief Status codes for MutexP APIs */ -typedef enum MutexP_Status { +typedef enum MutexP_Status +{ /*! API completed successfully */ MutexP_OK = 0, /*! API failed */ @@ -100,7 +102,7 @@ typedef enum MutexP_Status { * and then is used in the other instance based functions (e.g. ::MutexP_lock, * ::MutexP_unlock, etc.). */ -typedef void *MutexP_Handle; +typedef void* MutexP_Handle; /*! * @brief Basic MutexP Parameters @@ -111,7 +113,8 @@ typedef void *MutexP_Handle; * sets the fields manually. The MutexP default parameters are noted in * ::MutexP_Params_init. */ -typedef struct MutexP_Params { +typedef struct MutexP_Params +{ void (*callback)(void); /*!< Callback while waiting for mutex unlock */ } MutexP_Params; @@ -127,8 +130,8 @@ typedef struct MutexP_Params { * * @return A MutexP_Handle on success or a NULL on an error */ -extern MutexP_Handle MutexP_construct(MutexP_Struct *handle, - MutexP_Params *params); +extern MutexP_Handle MutexP_construct(MutexP_Struct* handle, + MutexP_Params* params); /*! * @brief Function to destruct a mutex object @@ -138,7 +141,7 @@ extern MutexP_Handle MutexP_construct(MutexP_Struct *handle, * * @return */ -extern void MutexP_destruct(MutexP_Struct *mutexP); +extern void MutexP_destruct(MutexP_Struct* mutexP); /*! * @brief Function to create a mutex. @@ -149,7 +152,7 @@ extern void MutexP_destruct(MutexP_Struct *mutexP); * * @return A MutexP_Handle on success or a NULL on an error */ -extern MutexP_Handle MutexP_create(MutexP_Params *params); +extern MutexP_Handle MutexP_create(MutexP_Params* params); /*! * @brief Function to delete a mutex. @@ -166,7 +169,7 @@ extern void MutexP_delete(MutexP_Handle handle); * * @param params Pointer to the instance configuration parameters. */ -extern void MutexP_Params_init(MutexP_Params *params); +extern void MutexP_Params_init(MutexP_Params* params); /*! * @brief Function to lock a mutex. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SemaphoreP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SemaphoreP.h index 7753e2d7..b4b6200c 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SemaphoreP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SemaphoreP.h @@ -79,7 +79,8 @@ extern "C" { * Opaque structure that should be large enough to hold any of the * RTOS specific SemaphoreP objects. */ -typedef union SemaphoreP_Struct { +typedef union SemaphoreP_Struct +{ uint32_t dummy; /*!< Align object */ char data[SemaphoreP_STRUCT_SIZE]; } SemaphoreP_Struct; @@ -97,7 +98,8 @@ typedef union SemaphoreP_Struct { /*! * @brief Status codes for SemaphoreP APIs (for backwards compatibility) */ -typedef enum SemaphoreP_Status { +typedef enum SemaphoreP_Status +{ /*! API completed successfully */ SemaphoreP_OK = 0, /*! API failed because of a timeout */ @@ -111,12 +113,13 @@ typedef enum SemaphoreP_Status { * instance and is used in the other instance based functions (e.g. * ::SemaphoreP_post or ::SemaphoreP_pend, etc.). */ -typedef void *SemaphoreP_Handle; +typedef void* SemaphoreP_Handle; /*! * @brief Mode of the semaphore */ -typedef enum SemaphoreP_Mode { +typedef enum SemaphoreP_Mode +{ SemaphoreP_Mode_COUNTING = 0x0, SemaphoreP_Mode_BINARY = 0x1 } SemaphoreP_Mode; @@ -130,7 +133,8 @@ typedef enum SemaphoreP_Mode { * application sets the fields manually. The SemaphoreP default parameters are * noted in SemaphoreP_Params_init. */ -typedef struct SemaphoreP_Params { +typedef struct SemaphoreP_Params +{ SemaphoreP_Mode mode; /*!< Mode for the semaphore */ void (*callback)(void); /*!< Callback while pending for semaphore post */ } SemaphoreP_Params; @@ -158,13 +162,13 @@ extern SemaphoreP_Params SemaphoreP_defaultParams; * is defined. For FreeRTOS, configSUPPORT_STATIC_ALLOCATION also * has to be set to 1 in FreeRTOSConfig.h. */ -extern SemaphoreP_Handle SemaphoreP_construct(SemaphoreP_Struct *handle, - unsigned int count, SemaphoreP_Params *params); +extern SemaphoreP_Handle SemaphoreP_construct(SemaphoreP_Struct* handle, + unsigned int count, SemaphoreP_Params* params); -extern SemaphoreP_Handle SemaphoreP_constructBinary(SemaphoreP_Struct *handle, +extern SemaphoreP_Handle SemaphoreP_constructBinary(SemaphoreP_Struct* handle, unsigned int count); -extern void SemaphoreP_destruct(SemaphoreP_Struct *semP); +extern void SemaphoreP_destruct(SemaphoreP_Struct* semP); /*! * @brief Function to create a semaphore. @@ -179,7 +183,7 @@ extern void SemaphoreP_destruct(SemaphoreP_Struct *semP); * @return A SemaphoreP_Handle on success or a NULL on an error */ extern SemaphoreP_Handle SemaphoreP_create(unsigned int count, - SemaphoreP_Params *params); + SemaphoreP_Params* params); /*! * @brief Function to create a binary semaphore. @@ -224,7 +228,7 @@ extern void SemaphoreP_delete(SemaphoreP_Handle handle); * * @param params Pointer to the instance configuration parameters. */ -extern void SemaphoreP_Params_init(SemaphoreP_Params *params); +extern void SemaphoreP_Params_init(SemaphoreP_Params* params); /*! * @brief Function to pend (wait) on a semaphore. @@ -239,7 +243,7 @@ extern void SemaphoreP_Params_init(SemaphoreP_Params *params); * - SemaphoreP_TIMEOUT: Timed out. Semaphore was not obtained. */ extern SemaphoreP_Status SemaphoreP_pend(SemaphoreP_Handle handle, - uint32_t timeout); + uint32_t timeout); /*! * @brief Function to post (signal) a semaphore from task of ISR context. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SwiP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SwiP.h index 4f2b3f11..6ba94d20 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SwiP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SwiP.h @@ -61,7 +61,8 @@ extern "C" { * Opaque structure that should be large enough to hold any of the * RTOS specific SwiP objects. */ -typedef union SwiP_Struct { +typedef union SwiP_Struct +{ uint32_t dummy; /*!< Align object */ char data[SwiP_STRUCT_SIZE]; } SwiP_Struct; @@ -75,13 +76,14 @@ typedef union SwiP_Struct { * * A SwiP_Handle returned from the ::SwiP_create represents that instance. */ -typedef void *SwiP_Handle; +typedef void* SwiP_Handle; /*! * @brief Status codes for SwiP APIs * TODO: See if we need more error codes. */ -typedef enum SwiP_Status { +typedef enum SwiP_Status +{ SwiP_OK = 0, SwiP_FAILURE = -1 } SwiP_Status; @@ -109,7 +111,8 @@ typedef void (*SwiP_Fxn)(uintptr_t arg0, uintptr_t arg1); * SwiP_inc functions also modify the trigger value. SwiP_or * sets bits, and SwiP_andn clears bits. */ -typedef struct SwiP_Params { +typedef struct SwiP_Params +{ uintptr_t arg0; /*!< Argument passed into the SwiP function. */ uintptr_t arg1; /*!< Argument passed into the SwiP function. */ uint32_t priority; /*!< priority, 0 is min, 1, 2, ..., ~0 for max */ @@ -128,8 +131,8 @@ typedef struct SwiP_Params { * * @return A SwiP_Handle on success or a NULL on an error */ -extern SwiP_Handle SwiP_construct(SwiP_Struct *swiP, SwiP_Fxn swiFxn, - SwiP_Params *params); +extern SwiP_Handle SwiP_construct(SwiP_Struct* swiP, SwiP_Fxn swiFxn, + SwiP_Params* params); /*! * @brief Function to destruct a software interrupt object @@ -139,7 +142,7 @@ extern SwiP_Handle SwiP_construct(SwiP_Struct *swiP, SwiP_Fxn swiFxn, * * @return */ -extern void SwiP_destruct(SwiP_Struct *swiP); +extern void SwiP_destruct(SwiP_Struct* swiP); /*! * @brief Initialize params structure to default values. @@ -149,7 +152,7 @@ extern void SwiP_destruct(SwiP_Struct *swiP); * * @param params Pointer to the instance configuration parameters. */ -extern void SwiP_Params_init(SwiP_Params *params); +extern void SwiP_Params_init(SwiP_Params* params); /*! * @brief Function to create a software interrupt object. @@ -163,7 +166,7 @@ extern void SwiP_Params_init(SwiP_Params *params); * @return A SwiP_Handle on success or a NULL on an error */ extern SwiP_Handle SwiP_create(SwiP_Fxn swiFxn, - SwiP_Params *params); + SwiP_Params* params); /*! * @brief Function to delete a software interrupt object diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SystemP.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SystemP.h index b5aa4c1a..e1c5a9a4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SystemP.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/dpl/SystemP.h @@ -49,8 +49,8 @@ extern "C" { #endif -extern int SystemP_snprintf(char *buf, size_t n, const char *format,...); -extern int SystemP_vsnprintf(char *buf, size_t n, const char *format, va_list va); +extern int SystemP_snprintf(char* buf, size_t n, const char* format, ...); +extern int SystemP_vsnprintf(char* buf, size_t n, const char* format, va_list va); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdh/ECDHCC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdh/ECDHCC26X2.h index 39fcdd0c..46149bf8 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdh/ECDHCC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdh/ECDHCC26X2.h @@ -139,7 +139,8 @@ extern "C" { * The FSM controller will increment the state counter and iterate through * states until it is told to stop or restart. */ -typedef enum ECDHCC26X2_FsmState_ { +typedef enum ECDHCC26X2_FsmState_ +{ ECDHCC26X2_FSM_ERROR = 0, ECDHCC26X2_FSM_GEN_PUB_KEY_VALIDATE_PRIVATE_KEY, @@ -168,7 +169,8 @@ typedef enum ECDHCC26X2_FsmState_ { * ECC26XX hardware attributes should be included in the board file * and pointed to by the ECDH_config struct. */ -typedef struct ECDHCC26X2_HWAttrs_ { +typedef struct ECDHCC26X2_HWAttrs_ +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -189,7 +191,8 @@ typedef struct ECDHCC26X2_HWAttrs_ { * * The application must not access any member variables of this structure! */ -typedef struct ECDHCC26X2_Object_ { +typedef struct ECDHCC26X2_Object_ +{ bool isOpen; bool operationInProgress; bool operationCanceled; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdsa/ECDSACC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdsa/ECDSACC26X2.h index 64aa1ec8..b691e8d7 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdsa/ECDSACC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecdsa/ECDSACC26X2.h @@ -117,7 +117,8 @@ extern "C" { * The FSM controller will increment the state counter and iterate through * states until it is told to stop or restart. */ -typedef enum ECDSACC26X2_FsmState_ { +typedef enum ECDSACC26X2_FsmState_ +{ ECDSACC26X2_FSM_ERROR = 0, ECDSACC26X2_FSM_SIGN_VALIDATE_PMSN, @@ -176,7 +177,8 @@ typedef int_fast16_t (*ECDSACC26X2_stateMachineFxn) (ECDSA_Handle handle); * ECDSACC26X2 hardware attributes should be included in the board file * and pointed to by the ECDSA_config struct. */ -typedef struct ECDSACC26X2_HWAttrs_ { +typedef struct ECDSACC26X2_HWAttrs_ +{ /*! @brief PKA Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -197,7 +199,8 @@ typedef struct ECDSACC26X2_HWAttrs_ { * * The application must not access any member variables of this structure! */ -typedef struct ECDSACC26X2_Object_ { +typedef struct ECDSACC26X2_Object_ +{ bool isOpen; bool operationInProgress; bool operationCanceled; @@ -210,8 +213,8 @@ typedef struct ECDSACC26X2_Object_ { ECDSACC26X2_FsmState fsmState; uint32_t semaphoreTimeout; uint32_t resultAddress; - uint32_t *scratchNumber1; - uint32_t *scratchNumber2; + uint32_t* scratchNumber1; + uint32_t* scratchNumber2; } ECDSACC26X2_Object; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecjpake/ECJPAKECC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecjpake/ECJPAKECC26X2.h index 75f153fa..0c8b81f2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecjpake/ECJPAKECC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/ecjpake/ECJPAKECC26X2.h @@ -118,7 +118,8 @@ extern "C" { * The FSM controller will increment the state counter and iterate through * states until it is told to stop or restart. */ -typedef enum ECJPAKECC26X2_FsmState_ { +typedef enum ECJPAKECC26X2_FsmState_ +{ ECJPAKECC26X2_FSM_ERROR = 0, ECJPAKECC26X2_FSM_ROUND_ONE_VALIDATE_MYPRIVATEKEY1, @@ -193,7 +194,8 @@ typedef enum ECJPAKECC26X2_FsmState_ { * ECJPAKECC26X2 hardware attributes should be included in the board file * and pointed to by the ECJPAKE_config struct. */ -typedef struct ECJPAKECC26X2_HWAttrs_ { +typedef struct ECJPAKECC26X2_HWAttrs_ +{ /*! @brief PKA Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -214,7 +216,8 @@ typedef struct ECJPAKECC26X2_HWAttrs_ { * * The application must not access any member variables of this structure! */ -typedef struct ECJPAKECC26X2_Object_ { +typedef struct ECJPAKECC26X2_Object_ +{ bool isOpen; bool operationInProgress; bool operationCanceled; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/gpio/GPIOCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/gpio/GPIOCC26XX.h index b22ad1e1..fcbbfaa4 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/gpio/GPIOCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/gpio/GPIOCC26XX.h @@ -174,12 +174,13 @@ extern "C" { * }; * @endcode */ -typedef struct GPIOCC26XX_Config { +typedef struct GPIOCC26XX_Config +{ /*! Pointer to the board's GPIO_PinConfig array */ - GPIO_PinConfig *pinConfigs; + GPIO_PinConfig* pinConfigs; /*! Pointer to the board's GPIO_CallbackFxn array */ - GPIO_CallbackFxn *callbacks; + GPIO_CallbackFxn* callbacks; /*! Number of GPIO_PinConfigs defined */ uint32_t numberOfPinConfigs; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2c/I2CCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2c/I2CCC26XX.h index d5269b6c..89812008 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2c/I2CCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2c/I2CCC26XX.h @@ -377,7 +377,8 @@ extern const I2C_FxnTable I2CCC26XX_fxnTable; * handle = I2C_open(Board_I2C, &i2cParams); * @endcode */ -typedef struct I2CCC26XX_I2CPinCfg { +typedef struct I2CCC26XX_I2CPinCfg +{ uint8_t pinSDA; uint8_t pinSCL; } I2CCC26XX_I2CPinCfg; @@ -389,7 +390,8 @@ typedef struct I2CCC26XX_I2CPinCfg { * This enum defines the state of the I2C driver's state-machine. Do not * modify. */ -typedef enum I2CCC26XX_Mode { +typedef enum I2CCC26XX_Mode +{ I2CCC26XX_IDLE_MODE = 0, /* I2C is not performing a transaction */ I2CCC26XX_WRITE_MODE, /* I2C is currently performing write operations */ I2CCC26XX_READ_MODE, /* I2C is currently performing read operations */ @@ -437,7 +439,8 @@ typedef enum I2CCC26XX_Mode { * }; * @endcode */ -typedef struct I2CCC26XX_HWAttrsV1 { +typedef struct I2CCC26XX_HWAttrsV1 +{ /*! I2C peripheral's base address */ I2CBaseAddrType baseAddr; /*! I2C peripheral's Power driver ID */ @@ -475,7 +478,8 @@ typedef struct I2CCC26XX_HWAttrsV1 { * I2CCC26XX Object. The application must not access any member variables * of this structure! */ -typedef struct I2CCC26XX_Object { +typedef struct I2CCC26XX_Object +{ /* I2C control variables */ I2C_TransferMode transferMode; /*!< Blocking or Callback mode */ I2C_CallbackFxn transferCallbackFxn; /*!< Callback function pointer */ @@ -493,18 +497,18 @@ typedef struct I2CCC26XX_Object { PIN_Handle hPin; /* I2C current transaction */ - I2C_Transaction *currentTransaction; /*!< Ptr to current I2C transaction */ - uint8_t *writeBufIdx; /*!< Internal inc. writeBuf index */ + I2C_Transaction* currentTransaction; /*!< Ptr to current I2C transaction */ + uint8_t* writeBufIdx; /*!< Internal inc. writeBuf index */ unsigned int writeCountIdx; /*!< Internal dec. writeCounter */ - uint8_t *readBufIdx; /*!< Internal inc. readBuf index */ + uint8_t* readBufIdx; /*!< Internal inc. readBuf index */ unsigned int readCountIdx; /*!< Internal dec. readCounter */ /* I2C transaction pointers for I2C_MODE_CALLBACK */ - I2C_Transaction *headPtr; /*!< Head ptr for queued transactions */ - I2C_Transaction *tailPtr; /*!< Tail ptr for queued transactions */ + I2C_Transaction* headPtr; /*!< Head ptr for queued transactions */ + I2C_Transaction* tailPtr; /*!< Tail ptr for queued transactions */ /* I2C power notification */ - void *i2cPostFxn; /*!< I2C post-notification Function pointer */ + void* i2cPostFxn; /*!< I2C post-notification Function pointer */ Power_NotifyObj i2cPostObj; /*!< I2C post-notification object */ bool isOpen; /*!< flag to indicate module is open */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2s/I2SCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2s/I2SCC26XX.h index d2796150..7ad4245b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2s/I2SCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/i2s/I2SCC26XX.h @@ -74,7 +74,8 @@ extern "C" { * }; * @endcode */ -typedef struct I2SCC26XX_HWAttrs_ { +typedef struct I2SCC26XX_HWAttrs_ +{ PIN_Id pinSD1; /*!< Pin used for SD1 signal. */ PIN_Id pinSD0; /*!< Pin used for SD0 signal. */ PIN_Id pinSCK; /*!< Pin used for SCK signal. */ @@ -82,7 +83,7 @@ typedef struct I2SCC26XX_HWAttrs_ { PIN_Id pinWS; /*!< Pin used for WS signal. */ uint8_t intPriority; /*!< I2S Peripheral's interrupt priority. */ -}I2SCC26XX_HWAttrs; +} I2SCC26XX_HWAttrs; /*! * @cond NODOC @@ -91,11 +92,12 @@ typedef struct I2SCC26XX_HWAttrs_ { * This enum defines how the physical I2S interface (SD0/SD1) behaves. * Do not modify. */ -typedef struct I2SCC26XX_DataInterface_ { +typedef struct I2SCC26XX_DataInterface_ +{ uint8_t numberOfChannelsUsed; /*!< Number of channels used on SDx. */ I2S_ChannelConfig channelsUsed; /*!< List of the used channels. */ I2S_DataInterfaceUse interfaceConfig; /*!< IN / OUT / UNUSED */ -}I2SCC26XX_DataInterface; +} I2SCC26XX_DataInterface; /*! @endcond */ /*! @@ -105,13 +107,14 @@ typedef struct I2SCC26XX_DataInterface_ { * This enum defines one of the interfaces (READ or WRITE) of the I2S module. * Do not modify. */ -typedef struct I2SCC26XX_Interface_ { +typedef struct I2SCC26XX_Interface_ +{ uint16_t memoryStep; /*!< Size of the memory step to access the following sample */ uint16_t delay; /*!< Number of WS cycles to wait before starting the first transfer. This value is mostly used when performing constant latency transfers. */ I2S_Callback callback; /*!< Pointer to callback */ I2S_RegUpdate pointerSet; /*!< Pointer on the function used to update PTR-NEXT */ - I2S_Transaction *activeTransfer; /*!< Pointer on the ongoing transfer */ -}I2SCC26XX_Interface; + I2S_Transaction* activeTransfer; /*!< Pointer on the ongoing transfer */ +} I2SCC26XX_Interface; /*! @endcond */ /*! @@ -123,14 +126,15 @@ typedef struct I2SCC26XX_Interface_ { * @param I2SCC26XX_Interface *interface Pointer on the interface to update * */ -typedef void (*I2SCC26XX_PtrUpdate)(I2S_Handle handle, I2SCC26XX_Interface *interface); +typedef void (*I2SCC26XX_PtrUpdate)(I2S_Handle handle, I2SCC26XX_Interface* interface); /*! * @cond NODOC * I2S Object. The application must not access any member variables * of this structure! */ -typedef struct I2SCC26XX_Object_ { +typedef struct I2SCC26XX_Object_ +{ bool isOpen; /*!< To avoid multiple openings of the I2S. */ bool invertWS; /*!< WS inversion. @@ -171,8 +175,8 @@ typedef struct I2SCC26XX_Object_ { I2S_Callback errorCallback; /*!< Pointer to error callback */ /* I2S pre and post notification functions */ - void *i2sPreFxn; /*!< I2S pre-notification function pointer */ - void *i2sPostFxn; /*!< I2S post-notification function pointer */ + void* i2sPreFxn; /*!< I2S pre-notification function pointer */ + void* i2sPostFxn; /*!< I2S post-notification function pointer */ Power_NotifyObj i2sPreObj; /*!< I2S pre-notification object */ Power_NotifyObj i2sPostObj; /*!< I2S post-notification object */ volatile bool i2sPowerConstraint; /*!< I2S power constraint flag, guard to avoid power constraints getting out of sync */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSCC26XX.h index 8ec0506b..31f8b508 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSCC26XX.h @@ -295,7 +295,7 @@ extern const NVS_FxnTable NVSCC26XX_fxnTable; */ typedef struct { - void *regionBase; /*!< The regionBase field specifies the base + void* regionBase; /*!< The regionBase field specifies the base address of the on-chip flash memory to be managed. The regionBase must be aligned to the flash sector size. This memory @@ -314,7 +314,7 @@ typedef struct configuration registers. */ #if defined(NVSCC26XX_INSTRUMENTED) - uint8_t *scoreboard; /*!< Pointer to scoreboard */ + uint8_t* scoreboard; /*!< Pointer to scoreboard */ size_t scoreboardSize; /*!< Scoreboard size in bytes */ uint32_t flashPageSize; /*!< Size of a memory page in bytes */ #endif @@ -337,18 +337,18 @@ typedef struct extern void NVSCC26XX_close(NVS_Handle handle); extern int_fast16_t NVSCC26XX_control(NVS_Handle handle, uint_fast16_t cmd, - uintptr_t arg); + uintptr_t arg); extern int_fast16_t NVSCC26XX_erase(NVS_Handle handle, size_t offset, - size_t size); -extern void NVSCC26XX_getAttrs(NVS_Handle handle, NVS_Attrs *attrs); + size_t size); +extern void NVSCC26XX_getAttrs(NVS_Handle handle, NVS_Attrs* attrs); extern void NVSCC26XX_init(); extern int_fast16_t NVSCC26XX_lock(NVS_Handle handle, uint32_t timeout); -extern NVS_Handle NVSCC26XX_open(uint_least8_t index, NVS_Params *params); +extern NVS_Handle NVSCC26XX_open(uint_least8_t index, NVS_Params* params); extern int_fast16_t NVSCC26XX_read(NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize); + void* buffer, size_t bufferSize); extern void NVSCC26XX_unlock(NVS_Handle handle); extern int_fast16_t NVSCC26XX_write(NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize, uint_fast16_t flags); + void* buffer, size_t bufferSize, uint_fast16_t flags); /*! @endcond */ #if defined (__cplusplus) diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSRAM.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSRAM.h index fe1b183b..682de220 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSRAM.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSRAM.h @@ -130,7 +130,7 @@ extern const NVS_FxnTable NVSRAM_fxnTable; */ typedef struct { - void *regionBase; /*!< Base address of RAM region */ + void* regionBase; /*!< Base address of RAM region */ size_t regionSize; /*!< The size of the region in bytes */ size_t sectorSize; /*!< Sector size in bytes */ } NVSRAM_HWAttrs; @@ -153,18 +153,18 @@ typedef struct extern void NVSRAM_close(NVS_Handle handle); extern int_fast16_t NVSRAM_control(NVS_Handle handle, uint_fast16_t cmd, - uintptr_t arg); + uintptr_t arg); extern int_fast16_t NVSRAM_erase(NVS_Handle handle, size_t offset, - size_t size); -extern void NVSRAM_getAttrs(NVS_Handle handle, NVS_Attrs *attrs); + size_t size); +extern void NVSRAM_getAttrs(NVS_Handle handle, NVS_Attrs* attrs); extern void NVSRAM_init(); extern int_fast16_t NVSRAM_lock(NVS_Handle handle, uint32_t timeout); -extern NVS_Handle NVSRAM_open(uint_least8_t index, NVS_Params *params); +extern NVS_Handle NVSRAM_open(uint_least8_t index, NVS_Params* params); extern int_fast16_t NVSRAM_read(NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize); + void* buffer, size_t bufferSize); extern void NVSRAM_unlock(NVS_Handle handle); extern int_fast16_t NVSRAM_write(NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize, uint_fast16_t flags); + void* buffer, size_t bufferSize, uint_fast16_t flags); /*! @endcond */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSSPI25X.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSSPI25X.h index 219e1678..874c76e3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSSPI25X.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/nvs/NVSSPI25X.h @@ -297,9 +297,9 @@ typedef struct size_t regionBaseOffset; /*!< Offset from base of SPI flash */ size_t regionSize; /*!< The size of the region in bytes */ size_t sectorSize; /*!< Erase sector size */ - uint8_t *verifyBuf; /*!< Write Pre/Post verify buffer */ + uint8_t* verifyBuf; /*!< Write Pre/Post verify buffer */ size_t verifyBufSize; /*!< Write Pre/Post verify buffer size */ - SPI_Handle *spiHandle; /*!< ptr to SPI handle if provided by user. */ + SPI_Handle* spiHandle; /*!< ptr to SPI handle if provided by user. */ uint16_t spiIndex; /*!< SPI instance index from Board file */ uint32_t spiBitRate; /*!< SPI bit rate in Hz */ /*! @brief SPI Flash Chip Select GPIO index @@ -339,18 +339,18 @@ typedef struct extern void NVSSPI25X_close(NVS_Handle handle); extern int_fast16_t NVSSPI25X_control(NVS_Handle handle, uint_fast16_t cmd, - uintptr_t arg); + uintptr_t arg); extern int_fast16_t NVSSPI25X_erase(NVS_Handle handle, size_t offset, - size_t size); -extern void NVSSPI25X_getAttrs(NVS_Handle handle, NVS_Attrs *attrs); + size_t size); +extern void NVSSPI25X_getAttrs(NVS_Handle handle, NVS_Attrs* attrs); extern void NVSSPI25X_init(); extern int_fast16_t NVSSPI25X_lock(NVS_Handle handle, uint32_t timeout); -extern NVS_Handle NVSSPI25X_open(uint_least8_t index, NVS_Params *params); +extern NVS_Handle NVSSPI25X_open(uint_least8_t index, NVS_Params* params); extern int_fast16_t NVSSPI25X_read(NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize); + void* buffer, size_t bufferSize); extern void NVSSPI25X_unlock(NVS_Handle handle); extern int_fast16_t NVSSPI25X_write(NVS_Handle handle, size_t offset, - void *buffer, size_t bufferSize, uint_fast16_t flags); + void* buffer, size_t bufferSize, uint_fast16_t flags); /* * Weakly defined APIs that can be overridden by the user */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/pin/PINCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/pin/PINCC26XX.h index e014af2d..dc48f9cb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/pin/PINCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/pin/PINCC26XX.h @@ -64,10 +64,11 @@ extern "C" { // Internal function used to find the index of the rightmost set bit in // efficient way #if defined(__IAR_SYSTEMS_ICC__) || defined(DOXYGEN) - #include +#include #endif -__STATIC_INLINE uint32_t PIN_ctz(uint32_t x) { +__STATIC_INLINE uint32_t PIN_ctz(uint32_t x) +{ #if defined(codered) || defined(gcc) || defined(sourcerygxx) || defined(__GNUC__) return __builtin_ctz(x); #elif defined(__IAR_SYSTEMS_ICC__) || defined(DOXYGEN) @@ -77,7 +78,7 @@ __STATIC_INLINE uint32_t PIN_ctz(uint32_t x) { #elif defined(__TI_COMPILER_VERSION__) return __clz(__rbit(x)); #else - #error "Unsupported compiler used" +#error "Unsupported compiler used" #endif } @@ -86,9 +87,9 @@ __STATIC_INLINE uint32_t PIN_ctz(uint32_t x) { // Constant that can be used to remove run-time checks for improved efficiency // Activate through preprocessor define PIN_DISABLE_RUNTIME_CHECKS #ifdef PIN_DISABLE_RUNTIME_CHECKS - #define PIN_CHKEN 0 +#define PIN_CHKEN 0 #else - #define PIN_CHKEN 1 +#define PIN_CHKEN 1 #endif /** @anchor PINCC26XX_FLAGS @@ -199,7 +200,8 @@ __STATIC_INLINE uint32_t PIN_ctz(uint32_t x) { */ /// @brief Fast/efficient version of #PIN_getInputValue() -__STATIC_INLINE uint32_t PINCC26XX_getInputValue(PIN_Id pinId) { +__STATIC_INLINE uint32_t PINCC26XX_getInputValue(PIN_Id pinId) +{ return (HWREG(GPIO_BASE + GPIO_O_DIN31_0) >> pinId) & 1; } @@ -208,10 +210,11 @@ __STATIC_INLINE uint32_t PINCC26XX_getInputValue(PIN_Id pinId) { * @note Does not include any checks on handle for efficiency reasons, * use #PIN_setOutputEnable() for checked version */ -__STATIC_INLINE void PINCC26XX_setOutputEnable(PIN_Id pinId, bool outputEnable) { +__STATIC_INLINE void PINCC26XX_setOutputEnable(PIN_Id pinId, bool outputEnable) +{ uint32_t key = HwiP_disable(); - HWREG(GPIO_BASE + GPIO_O_DOE31_0) = - ((HWREG(GPIO_BASE + GPIO_O_DOE31_0) & ~(1 << pinId)) | (outputEnable << pinId)); + HWREG(GPIO_BASE + GPIO_O_DOE31_0) = + ((HWREG(GPIO_BASE + GPIO_O_DOE31_0) & ~(1 << pinId)) | (outputEnable << pinId)); HwiP_restore(key); } @@ -220,31 +223,36 @@ __STATIC_INLINE void PINCC26XX_setOutputEnable(PIN_Id pinId, bool outputEnable) * @note Does not include any checks on handle for efficiency reasons, * use #PIN_setOutputValue() for checked version */ -__STATIC_INLINE void PINCC26XX_setOutputValue(PIN_Id pinId, uint32_t val) { +__STATIC_INLINE void PINCC26XX_setOutputValue(PIN_Id pinId, uint32_t val) +{ HWREGB(GPIO_BASE + GPIO_O_DOUT3_0 + pinId) = (val) ? 1 : 0; } /// @brief Fast/efficient version of #PIN_getOutputValue() -__STATIC_INLINE uint32_t PINCC26XX_getOutputValue(PIN_Id pinId) { +__STATIC_INLINE uint32_t PINCC26XX_getOutputValue(PIN_Id pinId) +{ return (HWREG(GPIO_BASE + GPIO_O_DOUT31_0) >> pinId) & 1; } -__STATIC_INLINE void PINCC26XX_clrPendInterrupt(PIN_Id pinId) { +__STATIC_INLINE void PINCC26XX_clrPendInterrupt(PIN_Id pinId) +{ HWREG(GPIO_NONBUF_BASE + GPIO_O_EVFLAGS31_0) = (1 << pinId); } /// @brief Fast/efficient version of #PIN_getPortInputValue() -__STATIC_INLINE uint32_t PINCC26XX_getPortInputValue(PIN_Handle handle) { +__STATIC_INLINE uint32_t PINCC26XX_getPortInputValue(PIN_Handle handle) +{ // Only a single port on CC26xx return HWREG(GPIO_BASE + GPIO_O_DIN31_0); } /// @brief Fast/efficient version of #PIN_getPortOutputValue() -__STATIC_INLINE uint32_t PINCC26XX_getPortOutputValue(PIN_Handle handle) { +__STATIC_INLINE uint32_t PINCC26XX_getPortOutputValue(PIN_Handle handle) +{ // Only a single port on CC26xx return HWREG(GPIO_BASE + GPIO_O_DOUT31_0); } @@ -254,10 +262,11 @@ __STATIC_INLINE uint32_t PINCC26XX_getPortOutputValue(PIN_Handle handle) { * @note Does not include any checks on handle for efficiency reasons, * use #PIN_setPortOutputValue() for checked version */ -__STATIC_INLINE void PINCC26XX_setPortOutputValue(PIN_Handle handle, uint32_t outputValueMask) { +__STATIC_INLINE void PINCC26XX_setPortOutputValue(PIN_Handle handle, uint32_t outputValueMask) +{ // Only a single port on CC26xx HWREG(GPIO_BASE + GPIO_O_DOUTTGL31_0) = - (HWREG(GPIO_BASE + GPIO_O_DOUT31_0) ^ outputValueMask) & handle->portMask; + (HWREG(GPIO_BASE + GPIO_O_DOUT31_0) ^ outputValueMask) & handle->portMask; } @@ -265,11 +274,12 @@ __STATIC_INLINE void PINCC26XX_setPortOutputValue(PIN_Handle handle, uint32_t ou * @note Does not include any checks on handle for efficiency reasons, * use #PIN_setPortOutputEnable() for checked version */ -__STATIC_INLINE void PINCC26XX_setPortOutputEnable(PIN_Handle handle, uint32_t outputEnableMask) { +__STATIC_INLINE void PINCC26XX_setPortOutputEnable(PIN_Handle handle, uint32_t outputEnableMask) +{ // Only a single port on CC26xx uint32_t key = HwiP_disable(); - HWREG(GPIO_BASE + GPIO_O_DOE31_0) = - (HWREG(GPIO_BASE + GPIO_O_DOE31_0) & (~handle->portMask)) | (outputEnableMask & handle->portMask); + HWREG(GPIO_BASE + GPIO_O_DOE31_0) = + (HWREG(GPIO_BASE + GPIO_O_DOE31_0) & (~handle->portMask)) | (outputEnableMask & handle->portMask); HwiP_restore(key); } @@ -361,7 +371,8 @@ extern PIN_Status PINCC26XX_setMux(PIN_Handle handle, PIN_Id pinId, int32_t nMux * will be called in. * */ -typedef struct PINCC26XX_HWAttrs{ +typedef struct PINCC26XX_HWAttrs +{ /*! @brief SPI CC26XXDMA Peripheral's interrupt priority. The CC26xx uses three of the priority bits, diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26X2.h index 8804cad4..5ab068fe 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26X2.h @@ -111,7 +111,8 @@ extern "C" { /*! @brief Global configuration structure */ -typedef struct PowerCC26X2_Config { +typedef struct PowerCC26X2_Config +{ /*! * @brief The Power Policy's initialization function * @@ -192,7 +193,8 @@ typedef struct PowerCC26X2_Config { * Power manager state structure. The application must not access any members * of this structure! */ -typedef struct PowerCC26X2_ModuleState { +typedef struct PowerCC26X2_ModuleState +{ List_List notifyList; /*!< Event notification list */ uint32_t constraintMask; /*!< Aggregate constraints mask */ ClockP_Struct clockObj; /*!< Clock object for scheduling wakeups */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26XX.h index da601fc8..7ed560de 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/power/PowerCC26XX.h @@ -319,14 +319,16 @@ typedef uint8_t PowerCC26XX_Resource; /* Resource identifier */ /* \cond */ /*! @brief Power resource database record format */ -typedef struct PowerCC26XX_ResourceRecord { +typedef struct PowerCC26XX_ResourceRecord +{ uint8_t flags; /* resource type | first parent */ uint16_t driverlibID; /* corresponding driverlib ID for this resource */ } PowerCC26XX_ResourceRecord; /* \endcond */ /*! @brief Global configuration structure */ -typedef struct PowerCC26XX_Config { +typedef struct PowerCC26XX_Config +{ /*! * @brief The Power Policy's initialization function * @@ -395,22 +397,22 @@ typedef struct PowerCC26XX_Config { * this purpose. */ uint32_t maxStandbyDuration; - /*! - * @brief Margin in SCLK_LF periods subtracted from previous longest - * VDDR recharge period. - * - * As the device comes out of standby, it updated its previous initial - * VDDR recharge period to be closer to the longest recharge period - * experienced during the time spent in standby before waking up. - * - * vddrRechargeMargin is subtracted from the longest VDDR recharge - * period in SysCtrlAdjustRechargeAfterPowerDown to ensure there is - * some margin between the new initial and converged VDDR recharge - * period. The converged recharge period at a certain temperature - * is board and device dependent. - * - * The default value of 0 disables this feature. - */ + /*! + * @brief Margin in SCLK_LF periods subtracted from previous longest + * VDDR recharge period. + * + * As the device comes out of standby, it updated its previous initial + * VDDR recharge period to be closer to the longest recharge period + * experienced during the time spent in standby before waking up. + * + * vddrRechargeMargin is subtracted from the longest VDDR recharge + * period in SysCtrlAdjustRechargeAfterPowerDown to ensure there is + * some margin between the new initial and converged VDDR recharge + * period. The converged recharge period at a certain temperature + * is board and device dependent. + * + * The default value of 0 disables this feature. + */ uint16_t vddrRechargeMargin; /*! * @brief Boolean that enables limiting the duration spent in standby @@ -464,7 +466,8 @@ typedef struct PowerCC26XX_Config { * Power manager state structure. The application must not access any members * of this structure! */ -typedef struct PowerCC26XX_ModuleState { +typedef struct PowerCC26XX_ModuleState +{ List_List notifyList; /*!< Event notification list */ uint32_t constraintMask; /*!< Aggregate constraints mask */ ClockP_Struct clockObj; /*!< Clock object for scheduling wakeups */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/rf/RF.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/rf/RF.h index 52ceaba6..63ecc3dd 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/rf/RF.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/rf/RF.h @@ -913,7 +913,7 @@ extern "C" { * @endcode */ #define RF_TxPowerTable_TERMINATION_ENTRY \ - { .power = RF_TxPowerTable_INVALID_DBM, .value = { .rawValue = RF_TxPowerTable_INVALID_VALUE, .paType = RF_TxPowerTable_DefaultPA } } + { .power = RF_TxPowerTable_INVALID_DBM, .value = { .rawValue = RF_TxPowerTable_INVALID_VALUE, .paType = RF_TxPowerTable_DefaultPA } } /** * Creates a TX power table entry for the default PA. @@ -922,7 +922,7 @@ extern "C" { * for a specific front-end configuration. They can then be obtained from SmartRFStudio. */ #define RF_TxPowerTable_DEFAULT_PA_ENTRY(bias, gain, boost, coefficient) \ - { .rawValue = ((bias) << 0) | ((gain) << 6) | ((boost) << 8) | ((coefficient) << 9), .paType = RF_TxPowerTable_DefaultPA } + { .rawValue = ((bias) << 0) | ((gain) << 6) | ((boost) << 8) | ((coefficient) << 9), .paType = RF_TxPowerTable_DefaultPA } /** * Creates a TX power table entry for the High-power PA. @@ -931,7 +931,7 @@ extern "C" { * for a specific front-end configuration. They can then be obtained from SmartRFStudio. */ #define RF_TxPowerTable_HIGH_PA_ENTRY(bias, ibboost, boost, coefficient, ldotrim) \ - { .rawValue = ((bias) << 0) | ((ibboost) << 6) | ((boost) << 8) | ((coefficient) << 9) | ((ldotrim) << 16), .paType = RF_TxPowerTable_HighPA } + { .rawValue = ((bias) << 0) | ((ibboost) << 6) | ((boost) << 8) | ((coefficient) << 9) | ((ldotrim) << 16), .paType = RF_TxPowerTable_HighPA } /** @} */ @@ -1000,16 +1000,17 @@ extern "C" { * * \sa #RF_getTxPower(), #RF_setTxPower(), #RF_TxPowerTable_Entry, #RF_TxPowerTable_PAType. */ -typedef struct { - uint32_t rawValue:22; ///< Hardware configuration value. - ///< - ///< - \c [15:0] used for default PA, - ///< - \c [21:0] used for High-power PA - uint32_t __dummy:9; - uint32_t paType:1; ///< Selects the PA type to be used. - ///< - ///< - 0: #RF_TxPowerTable_DefaultPA - ///< - 1: #RF_TxPowerTable_HighPA +typedef struct +{ + uint32_t rawValue: 22; ///< Hardware configuration value. + ///< + ///< - \c [15:0] used for default PA, + ///< - \c [21:0] used for High-power PA + uint32_t __dummy: 9; + uint32_t paType: 1; ///< Selects the PA type to be used. + ///< + ///< - 0: #RF_TxPowerTable_DefaultPA + ///< - 1: #RF_TxPowerTable_HighPA } RF_TxPowerTable_Value; /** @@ -1033,7 +1034,7 @@ typedef struct { typedef struct { int8_t power; ///< Human readable power value representing - ///< the output in dBm. + ///< the output in dBm. RF_TxPowerTable_Value value; ///< PA hardware configuration for that power level. } __attribute__((packed)) RF_TxPowerTable_Entry; @@ -1045,7 +1046,8 @@ typedef struct * %RF_TxPowerTable_PAType selects one of the available power amplifiers * on the RF core. It is usually included in a #RF_TxPowerTable_Value. */ -typedef enum { +typedef enum +{ RF_TxPowerTable_DefaultPA = 0, ///< Default PA RF_TxPowerTable_HighPA = 1, ///< High-power PA } RF_TxPowerTable_PAType; @@ -1075,7 +1077,8 @@ typedef rfc_radioOp_t RF_Op; * After assigning %RF_Mode configuration to the RF driver via RF_open(), the * driver caches the containing information and re-uses it on every power-up. */ -typedef struct { +typedef struct +{ uint8_t rfMode; ///< Specifies which PHY modes should be activated. Must be set to RF_MODE_MULTIPLE for dual-mode operation. void (*cpePatchFxn)(void); ///< Pointer to CPE patch function void (*mcePatchFxn)(void); ///< Pointer to MCE patch function @@ -1092,7 +1095,8 @@ typedef struct { * * In single-client applications, %RF_PriorityNormal should be used. */ -typedef enum { +typedef enum +{ RF_PriorityHighest = 2, ///< Highest priority. Only use this for urgent commands. RF_PriorityHigh = 1, ///< High priority. Use this for time-critical commands in synchronous protocols. RF_PriorityNormal = 0, ///< Default priority. Use this in single-client applications. @@ -1106,7 +1110,8 @@ typedef enum { * first place, but also by some convenience functions like RF_cancelCmd(), * RF_flushCmd(), RF_getInfo() and others. */ -typedef enum { +typedef enum +{ RF_StatBusyError, ///< Command not executed because RF driver is busy. RF_StatRadioInactiveError, ///< Command not executed because RF core is powered down. RF_StatCmdDoneError, ///< Command finished with an error. @@ -1133,9 +1138,10 @@ typedef uint64_t RF_EventMask; * A specific setup command is usually exported from SmartRF Studio * and then passed to the RF driver in RF_open(). */ -typedef union { +typedef union +{ rfc_command_t commandId; ///< Generic command identifier. This is the first field - ///< in every radio operation command. + ///< in every radio operation command. rfc_CMD_RADIO_SETUP_t common; ///< Radio setup command for BLE and IEEE modes rfc_CMD_BLE5_RADIO_SETUP_t ble5; ///< Radio setup command for BLE5 mode rfc_CMD_PROP_RADIO_SETUP_t prop; ///< Radio setup command for PROPRIETARY mode on 2.4 GHz @@ -1177,11 +1183,12 @@ typedef union { * RF_open(...); * @endcode */ -typedef enum { +typedef enum +{ RF_ClientEventPowerUpFinished = (1 << 0), ///< The RF core has been powered up the radio setup has been finished. RF_ClientEventRadioFree = (1 << 1), ///< Radio becomes free after a command has been preempted by a high-priority command of another client. - ///< This event is only triggered on a client that has been preempted. - ///< Clients may use this event to retry running their low-priority RF operation. + ///< This event is only triggered on a client that has been preempted. + ///< Clients may use this event to retry running their low-priority RF operation. RF_ClientEventSwitchClientEntered = (1 << 2) ///< Signals the client that the RF driver is about to switch over from another client. } RF_ClientEvent; @@ -1223,14 +1230,15 @@ typedef enum { * * \sa #RF_GlobalCallback */ -typedef enum { +typedef enum +{ RF_GlobalEventRadioSetup = (1 << 0), ///< The RF core is being reconfigured through a setup command. - ///< The \a arg argument is a pointer to the setup command. - ///< HWI context. + ///< The \a arg argument is a pointer to the setup command. + ///< HWI context. RF_GlobalEventRadioPowerDown = (1 << 1), ///< The RF core is being powered down. - ///< The \a arg argument is empty. - ///< SWI context. + ///< The \a arg argument is empty. + ///< SWI context. } RF_GlobalEvent; @@ -1279,17 +1287,19 @@ typedef int16_t RF_CmdHandle; /** @cond */ #if defined (RF_SINGLEMODE) - typedef struct RF_ObjectSingleMode RF_Object; +typedef struct RF_ObjectSingleMode RF_Object; #else - typedef struct RF_ObjectMultiMode RF_Object; +typedef struct RF_ObjectMultiMode RF_Object; #endif /* Definition of the RF_Object structure for single-mode applications. * It is applicable with the single-mode RF driver through the #RF_Object common type. */ -struct RF_ObjectSingleMode{ +struct RF_ObjectSingleMode +{ /// Configuration - struct { + struct + { uint32_t nInactivityTimeout; ///< Inactivity timeout in us. RF_Mode* pRfMode; ///< Mode of operation. RF_RadioSetup* pRadioSetup; ///< Pointer to the setup command to be executed at power up. @@ -1301,8 +1311,10 @@ struct RF_ObjectSingleMode{ void* pErrCb; ///< Error callback. } clientConfig; /// State & variables - struct { - struct { + struct + { + struct + { rfc_CMD_FS_t cmdFs; ///< FS command to be executed when the radio is powered up. } mode_state; ///< (Mode-specific) state structure SemaphoreP_Struct semSync; ///< Semaphore used by RF_runCmd(), RF_pendCmd() and power down sequence. @@ -1316,9 +1328,11 @@ struct RF_ObjectSingleMode{ /** Definition of the RF_Object structure for multi mode applications. * It is applicable with the multi mode RF driver through the #RF_Object common type. */ -struct RF_ObjectMultiMode{ +struct RF_ObjectMultiMode +{ /// Configuration - struct { + struct + { uint32_t nInactivityTimeout; ///< Inactivity timeout in us. RF_Mode* pRfMode; ///< Mode of operation. RF_RadioSetup* pRadioSetup; ///< Pointer to the setup command to be executed at power up. @@ -1334,8 +1348,10 @@ struct RF_ObjectMultiMode{ uint16_t nPhySwitchingDurationMargin; ///< Phy switching duration margin in us. It is used to calculate when run-time conflicts shall be resolved. } clientConfig; /// State & variables - struct { - struct { + struct + { + struct + { rfc_CMD_FS_t cmdFs; ///< FS command to be executed when the radio is powered up. } mode_state; ///< (Mode-specific) state structure SemaphoreP_Struct semSync; ///< Semaphore used by RF_runCmd(), RF_pendCmd() and power down sequence. @@ -1370,7 +1386,8 @@ typedef int8_t RF_RatHandle; /** @brief Selects the entry of interest in RF_getInfo(). * */ -typedef enum { +typedef enum +{ RF_GET_CURR_CMD, ///< Retrieve a command handle of the current command. RF_GET_AVAIL_RAT_CH, ///< Create a bitmask showing available RAT channels. RF_GET_RADIO_STATE, ///< Show the current RF core power state. 0: Radio OFF, 1: Radio ON. @@ -1384,19 +1401,21 @@ typedef enum { * This union structure holds one out of multiple data types. * The contained value is selected by #RF_InfoType. */ -typedef union { +typedef union +{ RF_CmdHandle ch; ///< Command handle (#RF_GET_CURR_CMD). uint16_t availRatCh; ///< Available RAT channels (RF_GET_AVAIL_RAT_CH). bool bRadioState; ///< Current RF core power state (#RF_GET_RADIO_STATE). RF_Handle pClientList[2]; ///< Client pointer list, [0]: client 1, [1]: client 2. uint32_t phySwitchingTimeInUs[2]; ///< Phy switching time 0: client 1 -> 2, 1 : client 2 -> 1. - void *pScheduleMap; ///< Pointer to scheduling map (#RF_GET_SCHEDULE_MAP). + void* pScheduleMap; ///< Pointer to scheduling map (#RF_GET_SCHEDULE_MAP). } RF_InfoVal; /** @brief RF schedule map entry structure. * */ -typedef struct { +typedef struct +{ RF_CmdHandle ch; ///< Command handle RF_Handle pClient; ///< Pointer to client object uint32_t startTime; ///< Start time (in RAT tick) of the command or access request @@ -1407,7 +1426,8 @@ typedef struct { /** @brief RF schedule map structure. * */ -typedef struct { +typedef struct +{ RF_ScheduleMapElement accessMap[RF_NUM_SCHEDULE_ACCESS_ENTRIES]; ///< Access request schedule map RF_ScheduleMapElement commandMap[RF_NUM_SCHEDULE_COMMAND_ENTRIES]; ///< Command schedule map } RF_ScheduleMap; @@ -1494,38 +1514,40 @@ typedef void (*RF_GlobalCallback)(RF_Handle h, RF_GlobalEvent event, void* arg); * They are reconfigured on a client switch. * Some of the parameters can be changed during run-time using RF_control(). */ -typedef struct { +typedef struct +{ uint32_t nInactivityTimeout; ///< Inactivity timeout in microseconds. - ///< The default value is 0xFFFFFFFF (infinite). + ///< The default value is 0xFFFFFFFF (infinite). uint32_t nPowerUpDuration; ///< A custom power-up duration in microseconds. - ///< If 0, the RF driver will start with a conservative value and measure the actual time during the first power-up. - ///< The default value is 0. + ///< If 0, the RF driver will start with a conservative value and measure the actual time during the first power-up. + ///< The default value is 0. RF_Callback pPowerCb; ///< \deprecated Power up callback, will be removed future versions, see RF_Params::pClienteventCb instead. - ///< The default value is NULL. + ///< The default value is NULL. RF_Callback pErrCb; ///< \deprecated Callback function for driver error events. uint16_t nPowerUpDurationMargin; ///< An additional safety margin to be added to #RF_Params::nPowerUpDuration. - ///< This is necessary because of other hardware and software interrupts - ///< preempting the RF driver interrupt handlers and state machine. - ///< The default value is platform-dependent. + ///< This is necessary because of other hardware and software interrupts + ///< preempting the RF driver interrupt handlers and state machine. + ///< The default value is platform-dependent. uint16_t nPhySwitchingDurationMargin; ///< An additional safety margin to be used to calculate when conflicts shall be evaluated run-time. RF_ClientCallback pClientEventCb; ///< Callback function for client-related events. - ///< The default value is NULL. + ///< The default value is NULL. RF_ClientEventMask nClientEventMask; ///< Event mask used to subscribe certain client events. - ///< The purpose is to keep the number of callback executions small. + ///< The purpose is to keep the number of callback executions small. } RF_Params; /* RF command. */ typedef struct RF_Cmd_s RF_Cmd; /* RF command . */ -struct RF_Cmd_s { +struct RF_Cmd_s +{ List_Elem _elem; /* Pointer to next and previous elements. */ RF_Callback volatile pCb; /* Pointer to callback function */ RF_Op* pOp; /* Pointer to (chain of) RF operations(s) */ @@ -1546,7 +1568,8 @@ struct RF_Cmd_s { * This data structure contains platform-specific driver configuration. * It is usually defined globally in a board support file. */ -typedef struct { +typedef struct +{ uint8_t hwiPriority; ///< Priority for HWIs belong to the RF driver. uint8_t swiPriority; ///< Priority for SWIs belong to the RF driver. bool xoscHfAlwaysNeeded; ///< Indicate that the XOSC HF should be turned on by the power driver @@ -1616,15 +1639,17 @@ typedef RF_Conflict (*RF_ConflictHook)(RF_Cmd* pCmdBg, RF_Cmd* pCmdFg, List_List * This data structure contains function hooks which implements the scheduling * algorithm used to inter-align one or more independent protocol stacks. */ -typedef struct { - RF_SubmitHook submitHook; ///< Function hook implements the scheduling policy to be executed at the time of RF_scheduleCmd API call. - RF_ConflictHook conflictHook; ///< Function hook implements the runtime conflict resolution, if any identified at the start time of next command. +typedef struct +{ + RF_SubmitHook submitHook; ///< Function hook implements the scheduling policy to be executed at the time of RF_scheduleCmd API call. + RF_ConflictHook conflictHook; ///< Function hook implements the runtime conflict resolution, if any identified at the start time of next command. } RFCC26XX_SchedulerPolicy; /** @brief Controls the behavior of the RF_scheduleCmd() API. * */ -typedef enum { +typedef enum +{ RF_AllowDelayNone = 0, RF_AllowDelayAny = UINT32_MAX } RF_AllowDelay; @@ -1633,20 +1658,22 @@ typedef enum { * * RF schedule command parameters are used with the RF_scheduleCmd() call. */ -typedef struct { +typedef struct +{ uint32_t endTime; ///< End time in RAT Ticks for the radio command RF_Priority priority; ///< Intra client priority uint32_t allowDelay; ///< Control word to define the policy of the scheduler if the timing of a command cannot be met. - ///< Only applicable on CC13x2 and CC26x2 devices. - ///< RF_AllowDelayNone: Reject the command. - ///< RF_AllowDelayAny: Append the command to the end of the queue. + ///< Only applicable on CC13x2 and CC26x2 devices. + ///< RF_AllowDelayNone: Reject the command. + ///< RF_AllowDelayAny: Append the command to the end of the queue. } RF_ScheduleCmdParams; /** @brief RF request access parameter struct * * RF request access command parameters are used with the RF_requestAccess() call. */ -typedef struct { +typedef struct +{ uint32_t duration; ///< Radio access duration in RAT Ticks requested by the client uint32_t startTime; ///< Start time window in RAT Time for radio access RF_Priority priority; ///< Access priority @@ -1658,7 +1685,8 @@ typedef struct { * allocate the first available channel. Otherwise, it tries to allocate the requested channel, * and if it is not available, returns with #RF_ALLOC_ERROR. */ -typedef enum { +typedef enum +{ RF_RatChannelAny = -1, ///< Chose the first available channel. RF_RatChannel0 = 0, ///< Use RAT user channel 0. RF_RatChannel1 = 1, ///< Use RAT user channel 1. @@ -1670,15 +1698,16 @@ typedef enum { * The source of a capture event can be selected through the source field of the * #RF_RatConfigCapture configuration structure. */ -typedef enum { - RF_RatCaptureSourceRtcUpdate = 20, ///< Selects the RTC update signal source. - RF_RatCaptureSourceEventGeneric = 21, ///< Selects the Generic event of Event Fabric as source. - RF_RatCaptureSourceRfcGpi0 = 22, ///< Selects the RFC_GPI[0] as source. This can be used i.e. - ///< to capture events on a GPIO. This requires that the GPIO - ///< is connected to RFC_GPO[0] from the GPIO driver. - RF_RatCaptureSourceRfcGpi1 = 23 ///< Selects the RFC_GPO[1] as source. This can be used i.e. - ///< to capture events on a GPIO. This requires that the GPIO - ///< is connected to RFC_GPO[1] from the GPIO driver. +typedef enum +{ + RF_RatCaptureSourceRtcUpdate = 20, ///< Selects the RTC update signal source. + RF_RatCaptureSourceEventGeneric = 21, ///< Selects the Generic event of Event Fabric as source. + RF_RatCaptureSourceRfcGpi0 = 22, ///< Selects the RFC_GPI[0] as source. This can be used i.e. + ///< to capture events on a GPIO. This requires that the GPIO + ///< is connected to RFC_GPO[0] from the GPIO driver. + RF_RatCaptureSourceRfcGpi1 = 23 ///< Selects the RFC_GPO[1] as source. This can be used i.e. + ///< to capture events on a GPIO. This requires that the GPIO + ///< is connected to RFC_GPO[1] from the GPIO driver. } RF_RatCaptureSource; /** @brief Selects the mode of #RF_ratCapture(). @@ -1686,11 +1715,12 @@ typedef enum { * The trigger mode of a capture event can be selected through the mode field of * #RF_RatConfigCapture configuration structure. */ -typedef enum { +typedef enum +{ RF_RatCaptureModeRising = 0, ///< Rising edge of the selected source will trigger a capture event. RF_RatCaptureModeFalling = 1, ///< Falling edge of the selected source will trigger a capture event. RF_RatCaptureModeBoth = 2 ///< Both rising and falling edges of the selected source will generate - ///< capture events. + ///< capture events. } RF_RatCaptureMode; /** @brief Selects the repetition of #RF_ratCapture(). @@ -1699,7 +1729,8 @@ typedef enum { * freed or automatically rearmed after a capture event occurred. In the latter case, the * user needs to free the channel manually through the #RF_ratDisableChannel() API. */ -typedef enum { +typedef enum +{ RF_RatCaptureSingle = 0, ///< Free the channel after the first capture event. RF_RatCaptureRepeat = 1 ///< Rearm the channel after each capture events. } RF_RatCaptureRepetition; @@ -1718,7 +1749,8 @@ typedef enum { * GPIO source. * */ -typedef enum { +typedef enum +{ RF_RatOutputModePulse = 0, ///< Generates a one-clock period width pulse. RF_RatOutputModeSet = 1, ///< Sets the output high on a RAT event. RF_RatOutputModeClear = 2, ///< Sets the output low on a RAT event. @@ -1736,7 +1768,8 @@ typedef enum { * RAT_GPO[2:3] - Available and can be used through any of the RFC_GPO[0:3]. * RAT_GPO[4:7] - Available and can be used through the Event fabric. */ -typedef enum { +typedef enum +{ RF_RatOutputSelectRatGpo1 = 1, ///< Configure RAT_CHANNEL[x] to interface with RAT_GPO[1] RF_RatOutputSelectRatGpo2 = 2, ///< Configure RAT_CHANNEL[x] to interface with RAT_GPO[2] RF_RatOutputSelectRatGpo3 = 3, ///< Configure RAT_CHANNEL[x] to interface with RAT_GPO[3] @@ -1750,7 +1783,8 @@ typedef enum { * * %RF_RatCapture parameters are used with the #RF_ratCapture() call. */ -typedef struct { +typedef struct +{ RF_RatCallback callback; ///< Callback function to be invoked upon a capture event (optional). RF_RatHandle channel; ///< RF_RatHandle identifies the channel to be allocated. RF_RatCaptureSource source; ///< Configuration of the event source to cause a capture event. @@ -1762,18 +1796,20 @@ typedef struct { * * %RF_RatCompare parameters are used with the #RF_ratCompare() call. */ -typedef struct { +typedef struct +{ RF_RatCallback callback; ///< Callback function to be invoked upon a capture event (optional). RF_RatHandle channel; ///< RF_RatHandle identifies the channel to be allocated. uint32_t timeout; ///< Timeout value in RAT ticks to be programmed in the timer as the - ///< trigger of compare event. + ///< trigger of compare event. } RF_RatConfigCompare; /** @brief RAT related IO parameter structure. * * These parameters are used with the #RF_ratCompare() or #RF_ratCapture() calls. */ -typedef struct { +typedef struct +{ RF_RatOutputMode mode; ///< The mode the GPO should operate in. RF_RatOutputSelect select; ///< The signal which shall be connected to the GPO. } RF_RatConfigOutput; @@ -1810,7 +1846,7 @@ typedef struct { * A NULL pointer results in the default configuration being loaded. * @return A handle for further RF driver calls on success. Otherwise NULL. */ -extern RF_Handle RF_open(RF_Object *pObj, RF_Mode *pRfMode, RF_RadioSetup *pRadioSetup, RF_Params *params); +extern RF_Handle RF_open(RF_Object* pObj, RF_Mode* pRfMode, RF_RadioSetup* pRadioSetup, RF_Params* params); /** * @brief Close client connection to RF driver @@ -1890,7 +1926,7 @@ extern uint32_t RF_getCurrentTime(void); * @param bmEvent Bitmask of events that will trigger the callback or that can be pended on. * @return A handle to the RF command. Return value of RF_ALLOC_ERROR indicates error. */ -extern RF_CmdHandle RF_postCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent); +extern RF_CmdHandle RF_postCmd(RF_Handle h, RF_Op* pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent); /** * @brief Sorts and adds commands to the RF driver internal command queue. @@ -1924,7 +1960,7 @@ extern RF_Conflict RF_defaultConflictPolicy(RF_Cmd* pCmdBg, RF_Cmd* pCmdFg, List * @param pSchParams Pointer to the configuration structure. * @return none */ -extern void RF_ScheduleCmdParams_init(RF_ScheduleCmdParams *pSchParams); +extern void RF_ScheduleCmdParams_init(RF_ScheduleCmdParams* pSchParams); /** * @brief Schedule an RF operation (chain) to the command queue. @@ -1952,7 +1988,7 @@ extern void RF_ScheduleCmdParams_init(RF_ScheduleCmdParams *pSchParams); * @param bmEvent Bitmask of events that will trigger the callback. * @return A handle to the RF command. Return value of RF_ALLOC_ERROR indicates error. */ -extern RF_CmdHandle RF_scheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent); +extern RF_CmdHandle RF_scheduleCmd(RF_Handle h, RF_Op* pOp, RF_ScheduleCmdParams* pSchParams, RF_Callback pCb, RF_EventMask bmEvent); /** * @brief Synchronizes the calling task to an RF operation command \a ch and @@ -2042,7 +2078,7 @@ extern RF_EventMask RF_pendCmd(RF_Handle h, RF_CmdHandle ch, RF_EventMask bmEven * * @sa RF_postCmd(), RF_pendCmd(), RF_cancelCmd(), RF_flushCmd() */ -extern RF_EventMask RF_runCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent); +extern RF_EventMask RF_runCmd(RF_Handle h, RF_Op* pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent); /** * @brief Runs synchronously a (chain of) RF operation(s) for dual or single-mode. @@ -2063,7 +2099,7 @@ extern RF_EventMask RF_runCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Call * @param bmEvent Bitmask of events that will trigger the callback. * @return The relevant command completed event. */ -extern RF_EventMask RF_runScheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent); +extern RF_EventMask RF_runScheduleCmd(RF_Handle h, RF_Op* pOp, RF_ScheduleCmdParams* pSchParams, RF_Callback pCb, RF_EventMask bmEvent); /** * @brief Abort/stop/cancel single command in command queue. @@ -2119,7 +2155,7 @@ extern RF_Stat RF_flushCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode); * @param pCmdStruct Pointer to the immediate command structure * @return RF_Stat indicates if command was successfully completed */ -extern RF_Stat RF_runImmediateCmd(RF_Handle h, uint32_t *pCmdStruct); +extern RF_Stat RF_runImmediateCmd(RF_Handle h, uint32_t* pCmdStruct); /** * @brief Send any Direct command.
@@ -2162,7 +2198,7 @@ extern void RF_yield(RF_Handle h); * nInactivityTimeout = BIOS_WAIT_FOREVER * nPowerUpDuration = RF_DEFAULT_POWER_UP_TIME */ -extern void RF_Params_init(RF_Params *params); +extern void RF_Params_init(RF_Params* params); /** * @brief Get value for some RF driver parameters.
@@ -2174,7 +2210,7 @@ extern void RF_Params_init(RF_Params *params); * @param pValue Pointer to return parameter values specified by RF_InfoVal * @return RF_Stat indicates if command was successfully completed */ -extern RF_Stat RF_getInfo(RF_Handle h, RF_InfoType type, RF_InfoVal *pValue); +extern RF_Stat RF_getInfo(RF_Handle h, RF_InfoType type, RF_InfoVal* pValue); /** * @brief Get RSSI value. @@ -2340,7 +2376,7 @@ extern RF_Stat RF_ratDisableChannel(RF_Handle rfHandle, RF_RatHandle ratHandle); * @param args Pointer to control arguments * @return RF_Stat indicates if API call was successfully completed. */ -extern RF_Stat RF_control(RF_Handle h, int8_t ctrl, void *args); +extern RF_Stat RF_control(RF_Handle h, int8_t ctrl, void* args); /** * @brief Request radio access.
@@ -2360,7 +2396,7 @@ extern RF_Stat RF_control(RF_Handle h, int8_t ctrl, void *args); * @param pParams Pointer to RF_AccessRequest parameters * @return RF_Stat indicates if API call was successfully completed. */ -extern RF_Stat RF_requestAccess(RF_Handle h, RF_AccessParams *pParams); +extern RF_Stat RF_requestAccess(RF_Handle h, RF_AccessParams* pParams); /** * @brief Returns the currently configured transmit power configuration. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sd/SDSPI.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sd/SDSPI.h index cb135d65..77193254 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sd/SDSPI.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sd/SDSPI.h @@ -101,7 +101,8 @@ extern const SD_FxnTable SDSPI_fxnTable; * }; * @endcode */ -typedef struct SDSPI_HWAttrs_ { +typedef struct SDSPI_HWAttrs_ +{ uint_least8_t spiIndex; uint16_t spiCsGpioIndex; } SDSPI_HWAttrs; @@ -111,7 +112,8 @@ typedef struct SDSPI_HWAttrs_ { * * The application must not access any member variables of this structure! */ -typedef struct SDSPI_Object_ { +typedef struct SDSPI_Object_ +{ SemaphoreP_Handle lockSem; SPI_Handle spiHandle; SD_CardType cardType; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sha2/SHA2CC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sha2/SHA2CC26X2.h index 15adef04..e82603b9 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sha2/SHA2CC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/sha2/SHA2CC26X2.h @@ -72,7 +72,8 @@ extern "C" { * SHA2CC26X2 hardware attributes are used in the board file by the * #SHA2_Config struct. */ -typedef struct { +typedef struct +{ uint8_t intPriority; /*!< Hardware interrupt priority of the Hash accelerator. * * The CC26XX provides 8 interrupt priority levels encoded in three bits: @@ -100,7 +101,8 @@ typedef struct { * * The application must not access any member variables of this structure! */ -typedef struct { +typedef struct +{ bool isOpen; volatile bool operationInProgress; bool operationCanceled; @@ -134,7 +136,7 @@ typedef struct { * SHA2_Handle handle = SHA2_construct(&config, ...); * */ -SHA2_Handle SHA2CC26X2_construct(SHA2_Config *config, const SHA2_Params *params); +SHA2_Handle SHA2CC26X2_construct(SHA2_Config* config, const SHA2_Params* params); /*! \endcond */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26X2DMA.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26X2DMA.h index c0c1618d..56c3331f 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26X2DMA.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26X2DMA.h @@ -819,7 +819,8 @@ extern const SPI_FxnTable SPICC26X2DMA_fxnTable; * - SPICC26X2DMA_8bit: txBuf and rxBuf are arrays of uint8_t elements * - SPICC26X2DMA_16bit: txBuf and rxBuf are arrays of uint16_t elements */ -typedef enum SPICC26X2DMA_FrameSize { +typedef enum SPICC26X2DMA_FrameSize +{ SPICC26X2DMA_8bit = 0, SPICC26X2DMA_16bit = 1 } SPICC26X2DMA_FrameSize; @@ -831,7 +832,8 @@ typedef enum SPICC26X2DMA_FrameSize { * partial mode and the associated pin interrupt. This field is for internal * use only. */ -typedef enum SPICC26X2DMA_ReturnPartial { +typedef enum SPICC26X2DMA_ReturnPartial +{ SPICC26X2DMA_retPartDisabled = 0, SPICC26X2DMA_retPartEnabledIntNotSet = 1, SPICC26X2DMA_retPartEnabledIntSet = 2 @@ -891,7 +893,8 @@ typedef enum SPICC26X2DMA_ReturnPartial { * }; * @endcode */ -typedef struct SPICC26X2DMA_HWAttrs { +typedef struct SPICC26X2DMA_HWAttrs +{ /*! @brief SPI Peripheral's base address */ uint32_t baseAddr; /*! SPI CC26XXDMA Peripheral's interrupt vector */ @@ -944,7 +947,8 @@ typedef struct SPICC26X2DMA_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct SPICC26X2DMA_Object { +typedef struct SPICC26X2DMA_Object +{ HwiP_Struct hwi; PIN_Handle pinHandle; PIN_State pinState; @@ -953,9 +957,9 @@ typedef struct SPICC26X2DMA_Object { SemaphoreP_Struct transferComplete; SPI_CallbackFxn transferCallbackFxn; - SPI_Transaction *headPtr; - SPI_Transaction *tailPtr; - SPI_Transaction *completedTransfers; + SPI_Transaction* headPtr; + SPI_Transaction* tailPtr; + SPI_Transaction* completedTransfers; UDMACC26XX_Handle udmaHandle; size_t framesQueued; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26XXDMA.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26XXDMA.h index 2ca24416..54a60fa2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26XXDMA.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/spi/SPICC26XXDMA.h @@ -694,7 +694,8 @@ extern const SPI_FxnTable SPICC26XXDMA_fxnTable; * - SPICC26XXDMA_8bit: txBuf and rxBuf are arrays of uint8_t elements * - SPICC26XXDMA_16bit: txBuf and rxBuf are arrays of uint16_t elements */ -typedef enum SPICC26XXDMA_FrameSize { +typedef enum SPICC26XXDMA_FrameSize +{ SPICC26XXDMA_8bit = 0, SPICC26XXDMA_16bit = 1 } SPICC26XXDMA_FrameSize; @@ -753,7 +754,8 @@ typedef enum SPICC26XXDMA_FrameSize { * }; * @endcode */ -typedef struct SPICC26XXDMA_HWAttrsV1 { +typedef struct SPICC26XXDMA_HWAttrsV1 +{ /*! SPI Peripheral's base address */ uint32_t baseAddr; /*! SPI CC26XXDMA Peripheral's interrupt vector */ @@ -804,7 +806,8 @@ typedef struct SPICC26XXDMA_HWAttrsV1 { * * The application must not access any member variables of this structure! */ -typedef struct SPICC26XXDMA_Object { +typedef struct SPICC26XXDMA_Object +{ /* SPI control variables */ SPI_TransferMode transferMode; /*!< Blocking or Callback mode */ unsigned int transferTimeout; /*!< Timeout for the transfer when in blocking mode */ @@ -826,7 +829,7 @@ typedef struct SPICC26XXDMA_Object { SemaphoreP_Struct transferComplete; /*!< Notify finished SPICC26XXDMA transfer */ /* SPI current transaction */ - SPI_Transaction *currentTransaction; /*!< Ptr to the current transaction*/ + SPI_Transaction* currentTransaction; /*!< Ptr to the current transaction*/ size_t amtDataXferred; /*!< Number of frames transferred */ size_t currentXferAmt; /*!< Size of current DMA transfer */ SPICC26XXDMA_FrameSize frameSize; /*!< Data frame size variable */ @@ -848,8 +851,8 @@ typedef struct SPICC26XXDMA_Object { uint16_t scratchBuf; /* SPI pre- and post notification functions */ - void *spiPreFxn; /*!< SPI pre-notification function pointer */ - void *spiPostFxn; /*!< SPI post-notification function pointer */ + void* spiPreFxn; /*!< SPI pre-notification function pointer */ + void* spiPostFxn; /*!< SPI post-notification function pointer */ Power_NotifyObj spiPreObj; /*!< SPI pre-notification object */ Power_NotifyObj spiPostObj; /*!< SPI post-notification object */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/timer/GPTimerCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/timer/GPTimerCC26XX.h index 723a2f40..d496ef64 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/timer/GPTimerCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/timer/GPTimerCC26XX.h @@ -209,9 +209,9 @@ typedef enum GPTimerCC26XX_Mode typedef enum GPTimerCC26XX_Interrupt { GPT_INT_TIMEOUT = 1 << 0, - GPT_INT_CAPTURE_MATCH = 1 << 1, - GPT_INT_CAPTURE = 1 << 2, - GPT_INT_MATCH = 1 << 3, + GPT_INT_CAPTURE_MATCH = 1 << 1, + GPT_INT_CAPTURE = 1 << 2, + GPT_INT_MATCH = 1 << 3, } GPTimerCC26XX_Interrupt; /* Number of entries in GPTimerCC26XX_Interrupt */ @@ -304,7 +304,7 @@ typedef enum GPTimerCC26XX_Edge typedef struct GPTimerCC26XX_Config GPTimerCC26XX_Config; /* GPTimer handle is pointer to configuration structure */ -typedef GPTimerCC26XX_Config * GPTimerCC26XX_Handle; +typedef GPTimerCC26XX_Config* GPTimerCC26XX_Handle; /* Interrupt bit vector. See GPTimerCC26XX_Interrupt for available interrupts */ typedef uint16_t GPTimerCC26XX_IntMask; @@ -405,8 +405,8 @@ typedef struct GPTimerCC26XX_Object */ struct GPTimerCC26XX_Config { - GPTimerCC26XX_Object *object; - const GPTimerCC26XX_HWAttrs *hwAttrs; + GPTimerCC26XX_Object* object; + const GPTimerCC26XX_HWAttrs* hwAttrs; GPTimerCC26XX_Part timerPart; }; @@ -440,7 +440,7 @@ typedef struct GPTimerCC26XX_Params * - Periodic mode counting upwards * - Debug stall mode disabled */ -extern void GPTimerCC26XX_Params_init(GPTimerCC26XX_Params *params); +extern void GPTimerCC26XX_Params_init(GPTimerCC26XX_Params* params); /*! * @brief This function opens a given GPTimer peripheral. Will set dependency @@ -458,7 +458,7 @@ extern void GPTimerCC26XX_Params_init(GPTimerCC26XX_Params *params); * * @sa GPTimerCC26XX_close() */ -extern GPTimerCC26XX_Handle GPTimerCC26XX_open(unsigned int index, const GPTimerCC26XX_Params *params); +extern GPTimerCC26XX_Handle GPTimerCC26XX_open(unsigned int index, const GPTimerCC26XX_Params* params); /*! * @brief Function to close a GPTimer peripheral specified by the GPTimer handle. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/trng/TRNGCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/trng/TRNGCC26XX.h index beb2d80f..abb17c8e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/trng/TRNGCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/trng/TRNGCC26XX.h @@ -93,7 +93,8 @@ extern "C" { * TRNG26X0 hardware attributes should be included in the board file * and pointed to by the TRNG_config struct. */ -typedef struct TRNGCC26XX_HWAttrs { +typedef struct TRNGCC26XX_HWAttrs +{ /*! @brief Crypto Peripheral's interrupt priority. The CC26xx uses three of the priority bits, meaning ~0 has the same effect as (7 << 5). @@ -126,15 +127,16 @@ typedef struct TRNGCC26XX_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct TRNGCC26XX_Object { +typedef struct TRNGCC26XX_Object +{ bool isOpen; TRNG_ReturnBehavior returnBehavior; int_fast16_t returnStatus; size_t entropyGenerated; size_t entropyRequested; uint32_t semaphoreTimeout; - uint8_t *entropyBuffer; - CryptoKey *entropyKey; + uint8_t* entropyBuffer; + CryptoKey* entropyKey; uint32_t samplesPerCycle; TRNG_CallbackFxn callbackFxn; } TRNGCC26XX_Object; @@ -173,7 +175,7 @@ extern int_fast16_t TRNGCC26XX_setSamplesPerCycle(TRNG_Handle handle, uint32_t s * TRNG_Handle handle = TRNG_construct(&config, ...); * */ -extern TRNG_Handle TRNGCC26XX_construct(TRNG_Config *config, const TRNG_Params *params); +extern TRNG_Handle TRNGCC26XX_construct(TRNG_Config* config, const TRNG_Params* params); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X0.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X0.h index 31b64b3f..ea1c7e4d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X0.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X0.h @@ -435,7 +435,8 @@ extern "C" { * set to 4/8 full, and the TX interrupt FIFO threshold is set to 1/8 * full. */ -typedef enum UARTCC26X0_FifoThreshold { +typedef enum UARTCC26X0_FifoThreshold +{ UARTCC26X0_FIFO_THRESHOLD_DEFAULT = 0, /*!< Use default FIFO threshold */ UARTCC26X0_FIFO_THRESHOLD_1_8, /*!< FIFO threshold of 1/8 full */ UARTCC26X0_FIFO_THRESHOLD_2_8, /*!< FIFO threshold of 2/8 full */ @@ -513,7 +514,8 @@ extern const UART_FxnTable UARTCC26X0_fxnTable; * }; * @endcode */ -typedef struct UARTCC26X0_HWAttrs { +typedef struct UARTCC26X0_HWAttrs +{ /*! UART Peripheral's base address */ uint32_t baseAddr; /*! UART Peripheral's interrupt vector */ @@ -529,7 +531,7 @@ typedef struct UARTCC26X0_HWAttrs { /*! Hardware flow control setting */ uint32_t flowControl; /*! Pointer to an application ring buffer */ - unsigned char *ringBufPtr; + unsigned char* ringBufPtr; /*! Size of ringBufPtr */ size_t ringBufSize; /*! UART RX pin assignment */ @@ -553,37 +555,39 @@ typedef struct UARTCC26X0_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct UARTCC26X0_Object { +typedef struct UARTCC26X0_Object +{ /* UART state variable */ - struct { - bool opened:1; /* Has the obj been opened */ - UART_Mode readMode:1; /* Mode for all read calls */ - UART_Mode writeMode:1; /* Mode for all write calls */ - UART_DataMode readDataMode:1; /* Type of data being read */ - UART_DataMode writeDataMode:1; /* Type of data being written */ - UART_ReturnMode readReturnMode:1; /* Receive return mode */ - UART_Echo readEcho:1; /* Echo received data back */ + struct + { + bool opened: 1; /* Has the obj been opened */ + UART_Mode readMode: 1; /* Mode for all read calls */ + UART_Mode writeMode: 1; /* Mode for all write calls */ + UART_DataMode readDataMode: 1; /* Type of data being read */ + UART_DataMode writeDataMode: 1; /* Type of data being written */ + UART_ReturnMode readReturnMode: 1; /* Receive return mode */ + UART_Echo readEcho: 1; /* Echo received data back */ /* * Flag to determine if a timeout has occurred when the user called * UART_read(). This flag is set by the timeoutClk clock object. */ - bool bufTimeout:1; + bool bufTimeout: 1; /* * Flag to determine when an ISR needs to perform a callback; in both * UART_MODE_BLOCKING or UART_MODE_CALLBACK */ - bool callCallback:1; + bool callCallback: 1; /* * Flag to determine if the ISR is in control draining the ring buffer * when in UART_MODE_CALLBACK */ - bool drainByISR:1; + bool drainByISR: 1; /* Keep track of RX enabled state set by app with UART_control() */ - bool ctrlRxEnabled:1; + bool ctrlRxEnabled: 1; /* Flag to keep the state of the read Power constraints */ - bool rxEnabled:1; + bool rxEnabled: 1; /* Flag to keep the state of the write Power constraints */ - bool txEnabled:1; + bool txEnabled: 1; } state; HwiP_Struct hwi; /* Hwi object for interrupts */ @@ -598,7 +602,7 @@ typedef struct UARTCC26X0_Object { /* UART read variables */ RingBuf_Object ringBuffer; /* local circular buffer object */ - unsigned char *readBuf; /* Buffer data pointer */ + unsigned char* readBuf; /* Buffer data pointer */ size_t readSize; /* Desired number of bytes to read */ size_t readCount; /* Number of bytes left to read */ SemaphoreP_Struct readSem; /* UART read semaphore */ @@ -607,7 +611,7 @@ typedef struct UARTCC26X0_Object { bool readRetPartial; /* Return partial RX data if timeout occurs */ /* UART write variables */ - const unsigned char *writeBuf; /* Buffer data pointer */ + const unsigned char* writeBuf; /* Buffer data pointer */ size_t writeSize; /* Desired number of bytes to write*/ size_t writeCount; /* Number of bytes left to write */ SemaphoreP_Struct writeSem; /* UART write semaphore*/ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X2.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X2.h index e8397c67..b128e44b 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X2.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26X2.h @@ -436,7 +436,8 @@ extern "C" { * set to 4/8 full, and the TX interrupt FIFO threshold is set to 1/8 * full. */ -typedef enum UARTCC26X2_FifoThreshold { +typedef enum UARTCC26X2_FifoThreshold +{ UARTCC26X2_FIFO_THRESHOLD_DEFAULT = 0, /*!< Use default FIFO threshold */ UARTCC26X2_FIFO_THRESHOLD_1_8, /*!< FIFO threshold of 1/8 full */ UARTCC26X2_FIFO_THRESHOLD_2_8, /*!< FIFO threshold of 2/8 full */ @@ -532,7 +533,8 @@ extern const UART_FxnTable UARTCC26X2_fxnTable; * * The .ctsPin and .rtsPin must be assigned to enable flow control. */ -typedef struct UARTCC26X2_HWAttrs { +typedef struct UARTCC26X2_HWAttrs +{ /*! UART Peripheral's base address */ uint32_t baseAddr; /*! UART Peripheral's interrupt vector */ @@ -548,7 +550,7 @@ typedef struct UARTCC26X2_HWAttrs { /*! Hardware flow control setting */ uint32_t flowControl; /*! Pointer to an application ring buffer */ - unsigned char *ringBufPtr; + unsigned char* ringBufPtr; /*! Size of ringBufPtr */ size_t ringBufSize; /*! UART RX pin assignment */ @@ -572,37 +574,39 @@ typedef struct UARTCC26X2_HWAttrs { * * The application must not access any member variables of this structure! */ -typedef struct UARTCC26X2_Object { +typedef struct UARTCC26X2_Object +{ /* UART state variable */ - struct { - bool opened:1; /* Has the obj been opened */ - UART_Mode readMode:1; /* Mode for all read calls */ - UART_Mode writeMode:1; /* Mode for all write calls */ - UART_DataMode readDataMode:1; /* Type of data being read */ - UART_DataMode writeDataMode:1; /* Type of data being written */ - UART_ReturnMode readReturnMode:1; /* Receive return mode */ - UART_Echo readEcho:1; /* Echo received data back */ + struct + { + bool opened: 1; /* Has the obj been opened */ + UART_Mode readMode: 1; /* Mode for all read calls */ + UART_Mode writeMode: 1; /* Mode for all write calls */ + UART_DataMode readDataMode: 1; /* Type of data being read */ + UART_DataMode writeDataMode: 1; /* Type of data being written */ + UART_ReturnMode readReturnMode: 1; /* Receive return mode */ + UART_Echo readEcho: 1; /* Echo received data back */ /* * Flag to determine if a timeout has occurred when the user called * UART_read(). This flag is set by the timeoutClk clock object. */ - bool bufTimeout:1; + bool bufTimeout: 1; /* * Flag to determine when an ISR needs to perform a callback; in both * UART_MODE_BLOCKING or UART_MODE_CALLBACK */ - bool callCallback:1; + bool callCallback: 1; /* * Flag to determine if the ISR is in control draining the ring buffer * when in UART_MODE_CALLBACK */ - bool drainByISR:1; + bool drainByISR: 1; /* Keep track of RX enabled state set by app with UART_control() */ - bool ctrlRxEnabled:1; + bool ctrlRxEnabled: 1; /* Flag to keep the state of the read Power constraints */ - bool rxEnabled:1; + bool rxEnabled: 1; /* Flag to keep the state of the write Power constraints */ - bool txEnabled:1; + bool txEnabled: 1; } state; HwiP_Struct hwi; /* Hwi object for interrupts */ @@ -617,7 +621,7 @@ typedef struct UARTCC26X2_Object { /* UART read variables */ RingBuf_Object ringBuffer; /* local circular buffer object */ - unsigned char *readBuf; /* Buffer data pointer */ + unsigned char* readBuf; /* Buffer data pointer */ size_t readSize; /* Desired number of bytes to read */ size_t readCount; /* Number of bytes left to read */ SemaphoreP_Struct readSem; /* UART read semaphore */ @@ -626,7 +630,7 @@ typedef struct UARTCC26X2_Object { bool readRetPartial; /* Return partial RX data if timeout occurs */ /* UART write variables */ - const unsigned char *writeBuf; /* Buffer data pointer */ + const unsigned char* writeBuf; /* Buffer data pointer */ size_t writeSize; /* Desired number of bytes to write*/ size_t writeCount; /* Number of bytes left to write */ SemaphoreP_Struct writeSem; /* UART write semaphore*/ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26XX.h index cffdab91..501eb159 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/uart/UARTCC26XX.h @@ -451,7 +451,8 @@ extern "C" { * Defined FIFO thresholds for generation of both TX interrupt and RX interrupt. * The default value (UARTCC26XX_FIFO_THRESHOLD_DEFAULT) is defined for backward compatibility handling. */ -typedef enum UARTCC26XX_FifoThreshold { +typedef enum UARTCC26XX_FifoThreshold +{ UARTCC26XX_FIFO_THRESHOLD_DEFAULT = 0, /*!< Default value forces FIFO threshold of 1/8 for TX interrupt and 4/8 for RX @@ -526,7 +527,8 @@ extern const UART_FxnTable UARTCC26XX_fxnTable; * * The .ctsPin and .rtsPin must be assigned to enable flow control. */ -typedef struct UARTCC26XX_HWAttrsV2 { +typedef struct UARTCC26XX_HWAttrsV2 +{ uint32_t baseAddr; /*!< UART Peripheral's base address */ uint32_t powerMngrId; /*!< UART Peripheral's power manager ID */ int intNum; /*!< UART Peripheral's interrupt vector */ @@ -553,7 +555,7 @@ typedef struct UARTCC26XX_HWAttrsV2 { uint8_t rxPin; /*!< UART RX pin */ uint8_t ctsPin; /*!< UART CTS pin */ uint8_t rtsPin; /*!< UART RTS pin */ - unsigned char *ringBufPtr; /*!< Pointer to an application ring buffer */ + unsigned char* ringBufPtr; /*!< Pointer to an application ring buffer */ size_t ringBufSize; /*!< Size of ringBufPtr */ UARTCC26XX_FifoThreshold txIntFifoThr; /*!< UART TX interrupt FIFO threshold select */ UARTCC26XX_FifoThreshold rxIntFifoThr; /*!< UART RX interrupt FIFO threshold select */ @@ -566,7 +568,8 @@ typedef struct UARTCC26XX_HWAttrsV2 { * * The UART Status is used to flag the different Receive Errors. */ -typedef enum UART_Status { +typedef enum UART_Status +{ UART_TIMED_OUT = 0x10, /*!< UART timed out */ UART_PARITY_ERROR = UART_RXERROR_PARITY, /*!< UART Parity error */ UART_BRAKE_ERROR = UART_RXERROR_BREAK, /*!< UART Break error */ @@ -580,7 +583,8 @@ typedef enum UART_Status { * * The application must not access any member variables of this structure! */ -typedef struct UARTCC26XX_Object { +typedef struct UARTCC26XX_Object +{ /* UART control variables */ bool opened; /*!< Has the obj been opened */ UART_Mode readMode; /*!< Mode for all read calls */ @@ -606,14 +610,14 @@ typedef struct UARTCC26XX_Object { UART_Status status; /*!< Status variable */ /* UART write variables */ - const void *writeBuf; /*!< Buffer data pointer */ + const void* writeBuf; /*!< Buffer data pointer */ size_t writeCount; /*!< Number of Chars sent */ size_t writeSize; /*!< Chars remaining in buffer */ bool writeCR; /*!< Write a return character */ /* UART receive variables */ bool readRetPartial; /*!< Return partial RX data if timeout occurs */ - void *readBuf; /*!< Buffer data pointer */ + void* readBuf; /*!< Buffer data pointer */ size_t readCount; /*!< Number of Chars read */ size_t readSize; /*!< Chars remaining in buffer */ RingBuf_Object ringBuffer; /*!< local circular buffer object */ @@ -623,7 +627,7 @@ typedef struct UARTCC26XX_Object { PIN_Handle hPin; /*! UART post-notification function pointer */ - void *uartPostFxn; + void* uartPostFxn; /*! UART post-notification object */ Power_NotifyObj uartPostObj; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/List.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/List.h index db99729a..8d80a543 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/List.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/List.h @@ -123,14 +123,16 @@ extern "C" { #include #include -typedef struct List_Elem { - struct List_Elem *next; - struct List_Elem *prev; +typedef struct List_Elem +{ + struct List_Elem* next; + struct List_Elem* prev; } List_Elem; -typedef struct List_List { - List_Elem *head; - List_Elem *tail; +typedef struct List_List +{ + List_Elem* head; + List_Elem* tail; } List_List; /*! @@ -139,7 +141,7 @@ typedef struct List_List { * @param list Pointer to a List_List structure that will be used to * maintain a linked list */ -extern void List_clearList(List_List *list); +extern void List_clearList(List_List* list); /*! * @brief Function to test whether a linked list is empty @@ -148,7 +150,7 @@ extern void List_clearList(List_List *list); * * @return true if empty, false if not empty */ -static inline bool List_empty(List_List *list) +static inline bool List_empty(List_List* list) { return (list->head == NULL); } @@ -160,7 +162,7 @@ static inline bool List_empty(List_List *list) * * @return Pointer the first elem in the linked list or NULL if empty */ -extern List_Elem *List_get(List_List *list); +extern List_Elem* List_get(List_List* list); /*! * @brief Function to return the head of a linked list @@ -172,7 +174,7 @@ extern List_Elem *List_get(List_List *list); * * @return Pointer to the first elem in the linked list or NULL if empty */ -static inline List_Elem *List_head(List_List *list) +static inline List_Elem* List_head(List_List* list) { return (list->head); } @@ -187,8 +189,8 @@ static inline List_Elem *List_head(List_List *list) * @param curElem Elem to insert the newElem in front of. * This value cannot be NULL. */ -extern void List_insert(List_List *list, List_Elem *newElem, - List_Elem *curElem); +extern void List_insert(List_List* list, List_Elem* newElem, + List_Elem* curElem); /*! * @brief Function to return the next elem in a linked list @@ -200,7 +202,7 @@ extern void List_insert(List_List *list, List_Elem *newElem, * * @return Pointer to the next elem in linked list or NULL if at the end */ -static inline List_Elem *List_next(List_Elem *elem) +static inline List_Elem* List_next(List_Elem* elem) { return (elem->next); } @@ -215,7 +217,7 @@ static inline List_Elem *List_next(List_Elem *elem) * * @return Pointer to the prev elem in linked list or NULL if at the beginning */ -static inline List_Elem *List_prev(List_Elem *elem) +static inline List_Elem* List_prev(List_Elem* elem) { return (elem->prev); } @@ -227,7 +229,7 @@ static inline List_Elem *List_prev(List_Elem *elem) * * @param elem Element to place onto the end of the linked list */ -extern void List_put(List_List *list, List_Elem *elem); +extern void List_put(List_List* list, List_Elem* elem); /*! * @brief Function to atomically put an elem onto the head of a linked list @@ -236,7 +238,7 @@ extern void List_put(List_List *list, List_Elem *elem); * * @param elem Element to place onto the beginning of the linked list */ -extern void List_putHead(List_List *list, List_Elem *elem); +extern void List_putHead(List_List* list, List_Elem* elem); /*! * @brief Function to remove an elem from a linked list @@ -245,7 +247,7 @@ extern void List_putHead(List_List *list, List_Elem *elem); * * @param elem Element to be removed from a linked list */ -extern void List_remove(List_List *list, List_Elem *elem); +extern void List_remove(List_List* list, List_Elem* elem); /*! * @brief Function to return the tail of a linked list @@ -257,7 +259,7 @@ extern void List_remove(List_List *list, List_Elem *elem); * * @return Pointer to the last elem in the linked list or NULL if empty */ -static inline List_Elem *List_tail(List_List *list) +static inline List_Elem* List_tail(List_List* list) { return (list->tail); } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/Random.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/Random.h index b7136be7..384dd3f5 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/Random.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/Random.h @@ -160,7 +160,7 @@ extern uint32_t Random_getNumber(void); * @pre Random_seedAutomatic() * @pre Random_seedManual() */ -extern void Random_getBytes(void *buffer, size_t bufferSize); +extern void Random_getBytes(void* buffer, size_t bufferSize); #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/RingBuf.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/RingBuf.h index 29e8c824..8bce5431 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/RingBuf.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/utils/RingBuf.h @@ -41,8 +41,9 @@ extern "C" { #include #include -typedef struct RingBuf_Object { - unsigned char *buffer; +typedef struct RingBuf_Object +{ + unsigned char* buffer; size_t length; size_t count; size_t head; @@ -61,8 +62,8 @@ typedef struct RingBuf_Object { * * @param bufSize The size of bufPtr in number of unsigned chars. */ -void RingBuf_construct(RingBuf_Handle object, unsigned char *bufPtr, - size_t bufSize); +void RingBuf_construct(RingBuf_Handle object, unsigned char* bufPtr, + size_t bufSize); /*! * @brief Get an unsigned char from the end of the circular buffer and remove @@ -78,7 +79,7 @@ void RingBuf_construct(RingBuf_Handle object, unsigned char *bufPtr, * of the circular buffer. If it returns -1, the circular * buffer was already empty and data is invalid. */ -int RingBuf_get(RingBuf_Handle object, unsigned char *data); +int RingBuf_get(RingBuf_Handle object, unsigned char* data); /*! * @brief Get the number of unsigned chars currently stored on the circular @@ -126,7 +127,7 @@ int RingBuf_getMaxCount(RingBuf_Handle object); * number != 0, then data will contain the unsigned char at the * end of the circular buffer. */ -int RingBuf_peek(RingBuf_Handle object, unsigned char *data); +int RingBuf_peek(RingBuf_Handle object, unsigned char* data); /*! * @brief Put an unsigned char into the end of the circular buffer. diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/watchdog/WatchdogCC26XX.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/watchdog/WatchdogCC26XX.h index 77e580db..8d2f84b8 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/watchdog/WatchdogCC26XX.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/drivers/watchdog/WatchdogCC26XX.h @@ -218,7 +218,8 @@ extern const Watchdog_FxnTable WatchdogCC26XX_fxnTable; /*! * @brief Watchdog hardware attributes for CC26XX */ -typedef struct WatchdogCC26XX_HWAttrs { +typedef struct WatchdogCC26XX_HWAttrs +{ unsigned int baseAddr; /*!< Base adddress for Watchdog */ unsigned long reloadValue; /*!< Reload value in milliseconds for Watchdog */ } WatchdogCC26XX_HWAttrs; @@ -228,7 +229,8 @@ typedef struct WatchdogCC26XX_HWAttrs { * * Not to be accessed by the user. */ -typedef struct WatchdogCC26XX_Object { +typedef struct WatchdogCC26XX_Object +{ bool isOpen; /* Flag for open/close status */ Watchdog_Callback callbackFxn; /* Pointer to callback. Not supported on all targets. */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/errno.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/errno.h index 74b2284b..231b90a2 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/errno.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/errno.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif /* include toolchain's header file */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/mqueue.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/mqueue.h index 15915725..d85aab3e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/mqueue.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/mqueue.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include @@ -53,12 +53,13 @@ extern "C" { #endif /* Message queue descriptor */ -typedef void *mqd_t; +typedef void* mqd_t; /* * ======== mq_attr ======== */ -struct mq_attr { +struct mq_attr +{ long mq_flags; /* Message queue description flags: 0 or O_NONBLOCK. Initialized from oflag argument of mq_open(). */ long mq_maxmsg; /* Maximum number of messages on queue. */ @@ -83,19 +84,19 @@ typedef struct mq_attr mq_attr; typedef uint32_t mode_t; /* TODO: sys/stat.h? */ extern int mq_close(mqd_t mqdes); -extern int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat); -extern mqd_t mq_open(const char *name, int oflags, ...); -extern ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, - unsigned int *msg_prio); -extern int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, - unsigned int msg_prio); -extern int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, - struct mq_attr *omqstat); -extern ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, - unsigned int *msg_prio, const struct timespec *abstime); -extern int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, - unsigned int msg_prio, const struct timespec *abstime); -extern int mq_unlink(const char *name); +extern int mq_getattr(mqd_t mqdes, struct mq_attr* mqstat); +extern mqd_t mq_open(const char* name, int oflags, ...); +extern ssize_t mq_receive(mqd_t mqdes, char* msg_ptr, size_t msg_len, + unsigned int* msg_prio); +extern int mq_send(mqd_t mqdes, const char* msg_ptr, size_t msg_len, + unsigned int msg_prio); +extern int mq_setattr(mqd_t mqdes, const struct mq_attr* mqstat, + struct mq_attr* omqstat); +extern ssize_t mq_timedreceive(mqd_t mqdes, char* msg_ptr, size_t msg_len, + unsigned int* msg_prio, const struct timespec* abstime); +extern int mq_timedsend(mqd_t mqdes, const char* msg_ptr, size_t msg_len, + unsigned int msg_prio, const struct timespec* abstime); +extern int mq_unlink(const char* name); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/pthread.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/pthread.h index 1d8fd0f7..e1a47e86 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/pthread.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/pthread.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include @@ -102,32 +102,32 @@ extern "C" { * pthread_attr ************************************************************************* */ -extern int pthread_attr_destroy(pthread_attr_t *attr); +extern int pthread_attr_destroy(pthread_attr_t* attr); -extern int pthread_attr_getdetachstate(const pthread_attr_t *attr, - int *detachstate); -extern int pthread_attr_getguardsize(const pthread_attr_t *attr, - size_t *guardsize); +extern int pthread_attr_getdetachstate(const pthread_attr_t* attr, + int* detachstate); +extern int pthread_attr_getguardsize(const pthread_attr_t* attr, + size_t* guardsize); -extern int pthread_attr_getschedparam(const pthread_attr_t *attr, - struct sched_param *schedparam); +extern int pthread_attr_getschedparam(const pthread_attr_t* attr, + struct sched_param* schedparam); -extern int pthread_attr_getstack(const pthread_attr_t *attr, - void **stackaddr, size_t *stacksize); -extern int pthread_attr_getstacksize(const pthread_attr_t *attr, - size_t *stacksize); +extern int pthread_attr_getstack(const pthread_attr_t* attr, + void** stackaddr, size_t* stacksize); +extern int pthread_attr_getstacksize(const pthread_attr_t* attr, + size_t* stacksize); -extern int pthread_attr_init(pthread_attr_t *attr); +extern int pthread_attr_init(pthread_attr_t* attr); -extern int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachedstate); -extern int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); +extern int pthread_attr_setdetachstate(pthread_attr_t* attr, int detachedstate); +extern int pthread_attr_setguardsize(pthread_attr_t* attr, size_t guardsize); -extern int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *schedparam); +extern int pthread_attr_setschedparam(pthread_attr_t* attr, + const struct sched_param* schedparam); -extern int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, - size_t stacksize); -extern int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); +extern int pthread_attr_setstack(pthread_attr_t* attr, void* stackaddr, + size_t stacksize); +extern int pthread_attr_setstacksize(pthread_attr_t* attr, size_t stacksize); /* ************************************************************************* @@ -135,10 +135,10 @@ extern int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); ************************************************************************* */ extern int pthread_cancel(pthread_t pthread); -extern void _pthread_cleanup_pop(struct _pthread_cleanup_context *context, - int execute); -extern void _pthread_cleanup_push(struct _pthread_cleanup_context *context, - void (*fxn)(void *), void *arg); +extern void _pthread_cleanup_pop(struct _pthread_cleanup_context* context, + int execute); +extern void _pthread_cleanup_push(struct _pthread_cleanup_context* context, + void (*fxn)(void*), void* arg); #define pthread_cleanup_push(fxn, arg) \ do { \ @@ -146,141 +146,141 @@ extern void _pthread_cleanup_push(struct _pthread_cleanup_context *context, _pthread_cleanup_push(&_pthread_clup_ctx, (fxn), (arg)) #define pthread_cleanup_pop(execute) \ - _pthread_cleanup_pop(&_pthread_clup_ctx, (execute)); \ + _pthread_cleanup_pop(&_pthread_clup_ctx, (execute)); \ } while (0) -extern int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, - void *(*startroutine)(void *), void *arg); -extern int pthread_detach(pthread_t pthread); -extern int pthread_equal(pthread_t pt1, pthread_t pt2); -extern void pthread_exit(void *ptr); -extern int pthread_getschedparam(pthread_t thread, int *policy, - struct sched_param *param); -extern int pthread_join(pthread_t th, void **thread_return); -extern int pthread_once(pthread_once_t *once, void (*initFxn)(void)); -extern pthread_t pthread_self(void); -extern int pthread_setcancelstate(int state, int *oldstate); -extern int pthread_setschedparam(pthread_t pthread, int policy, - const struct sched_param *param); - -/* - ************************************************************************* - * pthread_barrierattr - ************************************************************************* - */ -extern int pthread_barrierattr_destroy(pthread_barrierattr_t *attr); -extern int pthread_barrierattr_init(pthread_barrierattr_t *attr); - -/* - ************************************************************************* - * pthread_barrier - ************************************************************************* - */ -extern int pthread_barrier_destroy(pthread_barrier_t *barrier); -extern int pthread_barrier_init(pthread_barrier_t *barrier, - const pthread_barrierattr_t *attr, unsigned count); -extern int pthread_barrier_wait(pthread_barrier_t *barrier); - -/* - ************************************************************************* - * pthread_condattr - ************************************************************************* - */ -extern int pthread_condattr_destroy(pthread_condattr_t *attr); -extern int pthread_condattr_getclock(const pthread_condattr_t *attr, - clockid_t *clock_id); -extern int pthread_condattr_init(pthread_condattr_t * attr); -extern int pthread_condattr_setclock(pthread_condattr_t *attr, - clockid_t clock_id); - -/* - ************************************************************************* - * pthread_cond - ************************************************************************* - */ -extern int pthread_cond_broadcast(pthread_cond_t *cond); -extern int pthread_cond_destroy(pthread_cond_t *cond); -extern int pthread_cond_init(pthread_cond_t *cond, - const pthread_condattr_t *attr); -extern int pthread_cond_signal(pthread_cond_t *cond); -extern int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); -extern int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); - -/* - ************************************************************************* - * pthread_key - ************************************************************************* - */ -extern int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)); -extern int pthread_key_delete(pthread_key_t key); -extern void *pthread_getspecific(pthread_key_t key); -extern int pthread_setspecific(pthread_key_t key, const void *value); - -/* - ************************************************************************* - * pthread_mutexattr - ************************************************************************* - */ -extern int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); -extern int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, - int *type); -extern int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, - int *prioceiling); -extern int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, - int *protocol); -extern int pthread_mutexattr_init(pthread_mutexattr_t *attr); -extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, - int prioceiling); -extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, - int protocol); -extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); - -/* - ************************************************************************* - * pthread_mutex - ************************************************************************* - */ -extern int pthread_mutex_destroy(pthread_mutex_t *mutex); -extern int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, - int *prioceiling); -extern int pthread_mutex_init(pthread_mutex_t *mutex, - const pthread_mutexattr_t *attr); -extern int pthread_mutex_lock(pthread_mutex_t *mutex); -extern int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, - int prioceiling, int *oldceiling); -extern int pthread_mutex_timedlock(pthread_mutex_t *mutex, - const struct timespec *abstime); -extern int pthread_mutex_trylock(pthread_mutex_t *mutex); - -extern int pthread_mutex_unlock(pthread_mutex_t *mutex); - -/* - ************************************************************************* - * pthread_rwlockattr - ************************************************************************* - */ -extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr); -extern int pthread_rwlockattr_init(pthread_rwlockattr_t * attr); - -/* - ************************************************************************* - * pthread_rwlock - ************************************************************************* - */ -extern int pthread_rwlock_destroy(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_init(pthread_rwlock_t *rwlock, - const pthread_rwlockattr_t *attr); - -extern int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, - const struct timespec *abstime); -extern int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, - const struct timespec *abstime); -extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_unlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); + extern int pthread_create(pthread_t* newthread, const pthread_attr_t* attr, + void* (*startroutine)(void*), void* arg); + extern int pthread_detach(pthread_t pthread); + extern int pthread_equal(pthread_t pt1, pthread_t pt2); + extern void pthread_exit(void* ptr); + extern int pthread_getschedparam(pthread_t thread, int* policy, + struct sched_param* param); + extern int pthread_join(pthread_t th, void** thread_return); + extern int pthread_once(pthread_once_t* once, void (*initFxn)(void)); + extern pthread_t pthread_self(void); + extern int pthread_setcancelstate(int state, int* oldstate); + extern int pthread_setschedparam(pthread_t pthread, int policy, + const struct sched_param* param); + + /* + ************************************************************************* + * pthread_barrierattr + ************************************************************************* + */ + extern int pthread_barrierattr_destroy(pthread_barrierattr_t* attr); + extern int pthread_barrierattr_init(pthread_barrierattr_t* attr); + + /* + ************************************************************************* + * pthread_barrier + ************************************************************************* + */ + extern int pthread_barrier_destroy(pthread_barrier_t* barrier); + extern int pthread_barrier_init(pthread_barrier_t* barrier, + const pthread_barrierattr_t* attr, unsigned count); + extern int pthread_barrier_wait(pthread_barrier_t* barrier); + + /* + ************************************************************************* + * pthread_condattr + ************************************************************************* + */ + extern int pthread_condattr_destroy(pthread_condattr_t* attr); + extern int pthread_condattr_getclock(const pthread_condattr_t* attr, + clockid_t* clock_id); + extern int pthread_condattr_init(pthread_condattr_t* attr); + extern int pthread_condattr_setclock(pthread_condattr_t* attr, + clockid_t clock_id); + + /* + ************************************************************************* + * pthread_cond + ************************************************************************* + */ + extern int pthread_cond_broadcast(pthread_cond_t* cond); + extern int pthread_cond_destroy(pthread_cond_t* cond); + extern int pthread_cond_init(pthread_cond_t* cond, + const pthread_condattr_t* attr); + extern int pthread_cond_signal(pthread_cond_t* cond); + extern int pthread_cond_timedwait(pthread_cond_t* cond, pthread_mutex_t* mutex, + const struct timespec* abstime); + extern int pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex); + + /* + ************************************************************************* + * pthread_key + ************************************************************************* + */ + extern int pthread_key_create(pthread_key_t* key, void (*destructor)(void*)); + extern int pthread_key_delete(pthread_key_t key); + extern void* pthread_getspecific(pthread_key_t key); + extern int pthread_setspecific(pthread_key_t key, const void* value); + + /* + ************************************************************************* + * pthread_mutexattr + ************************************************************************* + */ + extern int pthread_mutexattr_destroy(pthread_mutexattr_t* attr); + extern int pthread_mutexattr_gettype(const pthread_mutexattr_t* attr, + int* type); + extern int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t* attr, + int* prioceiling); + extern int pthread_mutexattr_getprotocol(const pthread_mutexattr_t* attr, + int* protocol); + extern int pthread_mutexattr_init(pthread_mutexattr_t* attr); + extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t* attr, + int prioceiling); + extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t* attr, + int protocol); + extern int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type); + + /* + ************************************************************************* + * pthread_mutex + ************************************************************************* + */ + extern int pthread_mutex_destroy(pthread_mutex_t* mutex); + extern int pthread_mutex_getprioceiling(const pthread_mutex_t* mutex, + int* prioceiling); + extern int pthread_mutex_init(pthread_mutex_t* mutex, + const pthread_mutexattr_t* attr); + extern int pthread_mutex_lock(pthread_mutex_t* mutex); + extern int pthread_mutex_setprioceiling(pthread_mutex_t* mutex, + int prioceiling, int* oldceiling); + extern int pthread_mutex_timedlock(pthread_mutex_t* mutex, + const struct timespec* abstime); + extern int pthread_mutex_trylock(pthread_mutex_t* mutex); + + extern int pthread_mutex_unlock(pthread_mutex_t* mutex); + + /* + ************************************************************************* + * pthread_rwlockattr + ************************************************************************* + */ + extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t* attr); + extern int pthread_rwlockattr_init(pthread_rwlockattr_t* attr); + + /* + ************************************************************************* + * pthread_rwlock + ************************************************************************* + */ + extern int pthread_rwlock_destroy(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_init(pthread_rwlock_t* rwlock, + const pthread_rwlockattr_t* attr); + + extern int pthread_rwlock_rdlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_timedrdlock(pthread_rwlock_t* rwlock, + const struct timespec* abstime); + extern int pthread_rwlock_timedwrlock(pthread_rwlock_t* rwlock, + const struct timespec* abstime); + extern int pthread_rwlock_tryrdlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_trywrlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_unlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_wrlock(pthread_rwlock_t* rwlock); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sched.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sched.h index 185bc2da..13e82626 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sched.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sched.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include @@ -68,8 +68,9 @@ extern "C" { * ======== sched_param ======== * This was taken from sys/sched.h */ -struct sched_param { - int sched_priority; /* Thread execution priority */ +struct sched_param +{ + int sched_priority; /* Thread execution priority */ }; /* diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/semaphore.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/semaphore.h index 334b759c..ea8b62d3 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/semaphore.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/semaphore.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include @@ -57,18 +57,19 @@ extern "C" { #endif -typedef union { +typedef union +{ struct sysbios_Semaphore sysbios; struct freertos_Semaphore freertos; } sem_t; -int sem_destroy(sem_t *sem); -int sem_getvalue(sem_t *sem, int *value); -int sem_init(sem_t *sem, int pshared, unsigned value); -int sem_post(sem_t *sem); -int sem_timedwait(sem_t *sem, const struct timespec *abstime); -int sem_trywait(sem_t *sem); -int sem_wait(sem_t *sem); +int sem_destroy(sem_t* sem); +int sem_getvalue(sem_t* sem, int* value); +int sem_init(sem_t* sem, int pshared, unsigned value); +int sem_post(sem_t* sem); +int sem_timedwait(sem_t* sem, const struct timespec* abstime); +int sem_trywait(sem_t* sem); +int sem_wait(sem_t* sem); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/signal.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/signal.h index 3656c674..2c7892eb 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/signal.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/signal.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include "sys/types.h" @@ -73,9 +73,10 @@ extern "C" { /* * ======== sigval ======== */ -union sigval { +union sigval +{ int sival_int; /* integer signal value */ - void *sival_ptr; /* pointer signal value */ + void* sival_ptr; /* pointer signal value */ }; /* Deprecated. This typedef is for compatibility with old SDKs. It is @@ -87,13 +88,14 @@ typedef union sigval sigval; /* * ======== sigevent ======== */ -struct sigevent { +struct sigevent +{ int sigev_notify; /* notification type */ int sigev_signo; /* signal number */ union sigval sigev_value; /* signal value */ void (*sigev_notify_function)(union sigval val); /* notify function */ - pthread_attr_t *sigev_notify_attributes; /* notify attributes */ + pthread_attr_t* sigev_notify_attributes; /* notify attributes */ }; /* Deprecated. This typedef is for compatibility with old SDKs. It is diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/_internal.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/_internal.h index 15ef0022..0e75ed83 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/_internal.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/_internal.h @@ -40,7 +40,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include /* C99 standard integer types */ @@ -54,7 +54,8 @@ extern "C" { * object in order to guarantee the opaque object is correctly sized * and aligned with respect to the kernel objects. */ -enum Opaque_Mode { +enum Opaque_Mode +{ Opaque_Mode_1, Opaque_Mode_2, Opaque_Mode_3, @@ -63,79 +64,91 @@ enum Opaque_Mode { struct Opaque_Struct__; -struct Opaque_QueueElem { - struct Opaque_QueueElem *volatile next; - struct Opaque_QueueElem *volatile prev; +struct Opaque_QueueElem +{ + struct Opaque_QueueElem* volatile next; + struct Opaque_QueueElem* volatile prev; }; -struct Opaque_QueueStruct { +struct Opaque_QueueStruct +{ struct Opaque_QueueElem __f0; - struct Opaque_Struct__ *__f1; + struct Opaque_Struct__* __f1; }; -struct sysbios_Semaphore { - struct Opaque_Struct__ *__f0; +struct sysbios_Semaphore +{ + struct Opaque_Struct__* __f0; unsigned int __f1; enum Opaque_Mode __f2; volatile uint_least16_t __f3; struct Opaque_QueueStruct __f4; - struct Opaque_Struct__ *__f5; + struct Opaque_Struct__* __f5; }; -struct freertos_Semaphore { - void *__f0; +struct freertos_Semaphore +{ + void* __f0; }; -struct sysbios_Barrier { +struct sysbios_Barrier +{ struct sysbios_Semaphore sem; int count; int pendCount; }; -struct freertos_Barrier { +struct freertos_Barrier +{ int count; int pendCount; - struct Opaque_Struct__ *waitList; - struct Opaque_Struct__ *last; + struct Opaque_Struct__* waitList; + struct Opaque_Struct__* last; }; -struct sysbios_Mutex { - struct Opaque_Struct__ *owner; +struct sysbios_Mutex +{ + struct Opaque_Struct__* owner; int lockCnt; int type; struct sysbios_Semaphore sem; - struct Opaque_Struct__ *mpo; + struct Opaque_Struct__* mpo; }; -struct freertos_Mutex { +struct freertos_Mutex +{ int protocol; - void *owner; + void* owner; int type; - void *sem; /* struct freertos_Semaphore */ + void* sem; /* struct freertos_Semaphore */ }; -struct sysbios_RWLock { +struct sysbios_RWLock +{ struct sysbios_Semaphore sem; struct sysbios_Semaphore readSem; int activeReaderCnt; int blockedReaderCnt; - void *owner; + void* owner; }; -struct freertos_RWLock { +struct freertos_RWLock +{ struct freertos_Semaphore sem; struct freertos_Semaphore readSem; int activeReaderCnt; int blockedReaderCnt; - void *owner; + void* owner; }; -struct sysbios_Cond { +struct sysbios_Cond +{ struct Opaque_QueueStruct waitList; uint32_t clockId; }; -struct freertos_Cond { +struct freertos_Cond +{ struct Opaque_QueueElem waitList; uint32_t clockId; }; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/types.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/types.h index 3f152d3f..03e3363e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/types.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/sys/types.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include @@ -82,9 +82,10 @@ extern "C" { /* * ======== pthread_attr_t ======== */ -typedef struct pthread_attr_t { +typedef struct pthread_attr_t +{ int priority; - void *stack; + void* stack; size_t stacksize; size_t guardsize; int detachstate; @@ -93,9 +94,10 @@ typedef struct pthread_attr_t { typedef uint32_t pthread_barrierattr_t; typedef uint32_t pthread_condattr_t; -typedef void *pthread_key_t; +typedef void* pthread_key_t; -typedef struct pthread_mutexattr_t { +typedef struct pthread_mutexattr_t +{ int type; int protocol; int prioceiling; @@ -103,36 +105,41 @@ typedef struct pthread_mutexattr_t { typedef uint32_t pthread_rwlockattr_t; -typedef void *pthread_t; +typedef void* pthread_t; -typedef union { +typedef union +{ struct sysbios_Barrier sysbios; struct freertos_Barrier freertos; } pthread_barrier_t; -typedef union { +typedef union +{ struct sysbios_Cond sysbios; struct freertos_Cond freertos; } pthread_cond_t; -typedef union { +typedef union +{ struct sysbios_Mutex sysbios; struct freertos_Mutex freertos; } pthread_mutex_t; typedef uint32_t pthread_once_t; -typedef union { +typedef union +{ struct sysbios_RWLock sysbios; struct freertos_RWLock freertos; } pthread_rwlock_t; -struct _pthread_cleanup_context { +struct _pthread_cleanup_context +{ pthread_t thread; - void (*fxn)(void *); - void *arg; + void (*fxn)(void*); + void* arg; int cancelType; - struct _pthread_cleanup_context *next; + struct _pthread_cleanup_context* next; }; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/time.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/time.h index 9b599820..acb38b1e 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/time.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/time.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif #include @@ -90,30 +90,30 @@ extern "C" { * For clockId = CLOCK_MONOTONIC, clock_gettime() returns a time based on * ti.sysbios.knl.Clock ticks. */ -extern int clock_gettime(clockid_t clockId, struct timespec *ts); +extern int clock_gettime(clockid_t clockId, struct timespec* ts); extern int clock_nanosleep(clockid_t clock_id, int flags, - const struct timespec *rqtp, struct timespec *rmtp); + const struct timespec* rqtp, struct timespec* rmtp); /* * Only clockId = CLOCK_REALTIME is supported for clock_settime(). Only * the value of ts->tv_sec is used is used in clock_settime(). * Returns EINVAL if clockId = CLOCK_MONOTONIC. */ -extern int clock_settime(clockid_t clockId, const struct timespec *ts); +extern int clock_settime(clockid_t clockId, const struct timespec* ts); /* * Create a timer based on the BIOS Clock module. To reduce code size, * the clockId parameter is ignored. */ -extern int timer_create(clockid_t clockId, struct sigevent *evp, - timer_t *timerid); +extern int timer_create(clockid_t clockId, struct sigevent* evp, + timer_t* timerid); extern int timer_delete(timer_t timerid); -extern int timer_gettime(timer_t timerid, struct itimerspec *its); +extern int timer_gettime(timer_t timerid, struct itimerspec* its); extern int timer_settime(timer_t timerid, int flags, - const struct itimerspec *value, struct itimerspec *ovalue); + const struct itimerspec* value, struct itimerspec* ovalue); -extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); +extern int nanosleep(const struct timespec* rqtp, struct timespec* rmtp); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/unistd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/unistd.h index 90053f1f..697ba9dc 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/unistd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/gcc/unistd.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __GNUC__ -#error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/gcc) only with a GNU compiler. You appear to be using a different compiler. #endif /* include compiler unistd.h */ diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/errno.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/errno.h index d40eadc2..97506620 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/errno.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/errno.h @@ -39,14 +39,14 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif /* include toolchain's header file */ #if defined(__430_CORE__) || defined(__430X_CORE__) -#include <../inc/dlib/c/errno.h> + #include <../inc/dlib/c/errno.h> #else -#include <../inc/c/errno.h> + #include <../inc/c/errno.h> #endif #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/mqueue.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/mqueue.h index ed794b9a..649c8649 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/mqueue.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/mqueue.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -53,12 +53,13 @@ extern "C" { #endif /* Message queue descriptor */ -typedef void *mqd_t; +typedef void* mqd_t; /* * ======== mq_attr ======== */ -struct mq_attr { +struct mq_attr +{ long mq_flags; /* Message queue description flags: 0 or O_NONBLOCK. Initialized from oflag argument of mq_open(). */ long mq_maxmsg; /* Maximum number of messages on queue. */ @@ -83,19 +84,19 @@ typedef struct mq_attr mq_attr; typedef uint32_t mode_t; /* TODO: sys/stat.h? */ extern int mq_close(mqd_t mqdes); -extern int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat); -extern mqd_t mq_open(const char *name, int oflags, ...); -extern ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, - unsigned int *msg_prio); -extern int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, - unsigned int msg_prio); -extern int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, - struct mq_attr *omqstat); -extern ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, - unsigned int *msg_prio, const struct timespec *abstime); -extern int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, - unsigned int msg_prio, const struct timespec *abstime); -extern int mq_unlink(const char *name); +extern int mq_getattr(mqd_t mqdes, struct mq_attr* mqstat); +extern mqd_t mq_open(const char* name, int oflags, ...); +extern ssize_t mq_receive(mqd_t mqdes, char* msg_ptr, size_t msg_len, + unsigned int* msg_prio); +extern int mq_send(mqd_t mqdes, const char* msg_ptr, size_t msg_len, + unsigned int msg_prio); +extern int mq_setattr(mqd_t mqdes, const struct mq_attr* mqstat, + struct mq_attr* omqstat); +extern ssize_t mq_timedreceive(mqd_t mqdes, char* msg_ptr, size_t msg_len, + unsigned int* msg_prio, const struct timespec* abstime); +extern int mq_timedsend(mqd_t mqdes, const char* msg_ptr, size_t msg_len, + unsigned int msg_prio, const struct timespec* abstime); +extern int mq_unlink(const char* name); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/pthread.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/pthread.h index d575a9d0..51146260 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/pthread.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/pthread.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -102,32 +102,32 @@ extern "C" { * pthread_attr ************************************************************************* */ -extern int pthread_attr_destroy(pthread_attr_t *attr); +extern int pthread_attr_destroy(pthread_attr_t* attr); -extern int pthread_attr_getdetachstate(const pthread_attr_t *attr, - int *detachstate); -extern int pthread_attr_getguardsize(const pthread_attr_t *attr, - size_t *guardsize); +extern int pthread_attr_getdetachstate(const pthread_attr_t* attr, + int* detachstate); +extern int pthread_attr_getguardsize(const pthread_attr_t* attr, + size_t* guardsize); -extern int pthread_attr_getschedparam(const pthread_attr_t *attr, - struct sched_param *schedparam); +extern int pthread_attr_getschedparam(const pthread_attr_t* attr, + struct sched_param* schedparam); -extern int pthread_attr_getstack(const pthread_attr_t *attr, - void **stackaddr, size_t *stacksize); -extern int pthread_attr_getstacksize(const pthread_attr_t *attr, - size_t *stacksize); +extern int pthread_attr_getstack(const pthread_attr_t* attr, + void** stackaddr, size_t* stacksize); +extern int pthread_attr_getstacksize(const pthread_attr_t* attr, + size_t* stacksize); -extern int pthread_attr_init(pthread_attr_t *attr); +extern int pthread_attr_init(pthread_attr_t* attr); -extern int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachedstate); -extern int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); +extern int pthread_attr_setdetachstate(pthread_attr_t* attr, int detachedstate); +extern int pthread_attr_setguardsize(pthread_attr_t* attr, size_t guardsize); -extern int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *schedparam); +extern int pthread_attr_setschedparam(pthread_attr_t* attr, + const struct sched_param* schedparam); -extern int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, - size_t stacksize); -extern int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); +extern int pthread_attr_setstack(pthread_attr_t* attr, void* stackaddr, + size_t stacksize); +extern int pthread_attr_setstacksize(pthread_attr_t* attr, size_t stacksize); /* ************************************************************************* @@ -135,10 +135,10 @@ extern int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); ************************************************************************* */ extern int pthread_cancel(pthread_t pthread); -extern void _pthread_cleanup_pop(struct _pthread_cleanup_context *context, - int execute); -extern void _pthread_cleanup_push(struct _pthread_cleanup_context *context, - void (*fxn)(void *), void *arg); +extern void _pthread_cleanup_pop(struct _pthread_cleanup_context* context, + int execute); +extern void _pthread_cleanup_push(struct _pthread_cleanup_context* context, + void (*fxn)(void*), void* arg); #define pthread_cleanup_push(fxn, arg) \ do { \ @@ -146,141 +146,141 @@ extern void _pthread_cleanup_push(struct _pthread_cleanup_context *context, _pthread_cleanup_push(&_pthread_clup_ctx, (fxn), (arg)) #define pthread_cleanup_pop(execute) \ - _pthread_cleanup_pop(&_pthread_clup_ctx, (execute)); \ + _pthread_cleanup_pop(&_pthread_clup_ctx, (execute)); \ } while (0) -extern int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, - void *(*startroutine)(void *), void *arg); -extern int pthread_detach(pthread_t pthread); -extern int pthread_equal(pthread_t pt1, pthread_t pt2); -extern void pthread_exit(void *ptr); -extern int pthread_getschedparam(pthread_t thread, int *policy, - struct sched_param *param); -extern int pthread_join(pthread_t th, void **thread_return); -extern int pthread_once(pthread_once_t *once, void (*initFxn)(void)); -extern pthread_t pthread_self(void); -extern int pthread_setcancelstate(int state, int *oldstate); -extern int pthread_setschedparam(pthread_t pthread, int policy, - const struct sched_param *param); - -/* - ************************************************************************* - * pthread_barrierattr - ************************************************************************* - */ -extern int pthread_barrierattr_destroy(pthread_barrierattr_t *attr); -extern int pthread_barrierattr_init(pthread_barrierattr_t *attr); - -/* - ************************************************************************* - * pthread_barrier - ************************************************************************* - */ -extern int pthread_barrier_destroy(pthread_barrier_t *barrier); -extern int pthread_barrier_init(pthread_barrier_t *barrier, - const pthread_barrierattr_t *attr, unsigned count); -extern int pthread_barrier_wait(pthread_barrier_t *barrier); - -/* - ************************************************************************* - * pthread_condattr - ************************************************************************* - */ -extern int pthread_condattr_destroy(pthread_condattr_t *attr); -extern int pthread_condattr_getclock(const pthread_condattr_t *attr, - clockid_t *clock_id); -extern int pthread_condattr_init(pthread_condattr_t * attr); -extern int pthread_condattr_setclock(pthread_condattr_t *attr, - clockid_t clock_id); - -/* - ************************************************************************* - * pthread_cond - ************************************************************************* - */ -extern int pthread_cond_broadcast(pthread_cond_t *cond); -extern int pthread_cond_destroy(pthread_cond_t *cond); -extern int pthread_cond_init(pthread_cond_t *cond, - const pthread_condattr_t *attr); -extern int pthread_cond_signal(pthread_cond_t *cond); -extern int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); -extern int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); - -/* - ************************************************************************* - * pthread_key - ************************************************************************* - */ -extern int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)); -extern int pthread_key_delete(pthread_key_t key); -extern void *pthread_getspecific(pthread_key_t key); -extern int pthread_setspecific(pthread_key_t key, const void *value); - -/* - ************************************************************************* - * pthread_mutexattr - ************************************************************************* - */ -extern int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); -extern int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, - int *type); -extern int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, - int *prioceiling); -extern int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, - int *protocol); -extern int pthread_mutexattr_init(pthread_mutexattr_t *attr); -extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, - int prioceiling); -extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, - int protocol); -extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); - -/* - ************************************************************************* - * pthread_mutex - ************************************************************************* - */ -extern int pthread_mutex_destroy(pthread_mutex_t *mutex); -extern int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, - int *prioceiling); -extern int pthread_mutex_init(pthread_mutex_t *mutex, - const pthread_mutexattr_t *attr); -extern int pthread_mutex_lock(pthread_mutex_t *mutex); -extern int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, - int prioceiling, int *oldceiling); -extern int pthread_mutex_timedlock(pthread_mutex_t *mutex, - const struct timespec *abstime); -extern int pthread_mutex_trylock(pthread_mutex_t *mutex); - -extern int pthread_mutex_unlock(pthread_mutex_t *mutex); - -/* - ************************************************************************* - * pthread_rwlockattr - ************************************************************************* - */ -extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr); -extern int pthread_rwlockattr_init(pthread_rwlockattr_t * attr); - -/* - ************************************************************************* - * pthread_rwlock - ************************************************************************* - */ -extern int pthread_rwlock_destroy(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_init(pthread_rwlock_t *rwlock, - const pthread_rwlockattr_t *attr); - -extern int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, - const struct timespec *abstime); -extern int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, - const struct timespec *abstime); -extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_unlock(pthread_rwlock_t *rwlock); -extern int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); + extern int pthread_create(pthread_t* newthread, const pthread_attr_t* attr, + void* (*startroutine)(void*), void* arg); + extern int pthread_detach(pthread_t pthread); + extern int pthread_equal(pthread_t pt1, pthread_t pt2); + extern void pthread_exit(void* ptr); + extern int pthread_getschedparam(pthread_t thread, int* policy, + struct sched_param* param); + extern int pthread_join(pthread_t th, void** thread_return); + extern int pthread_once(pthread_once_t* once, void (*initFxn)(void)); + extern pthread_t pthread_self(void); + extern int pthread_setcancelstate(int state, int* oldstate); + extern int pthread_setschedparam(pthread_t pthread, int policy, + const struct sched_param* param); + + /* + ************************************************************************* + * pthread_barrierattr + ************************************************************************* + */ + extern int pthread_barrierattr_destroy(pthread_barrierattr_t* attr); + extern int pthread_barrierattr_init(pthread_barrierattr_t* attr); + + /* + ************************************************************************* + * pthread_barrier + ************************************************************************* + */ + extern int pthread_barrier_destroy(pthread_barrier_t* barrier); + extern int pthread_barrier_init(pthread_barrier_t* barrier, + const pthread_barrierattr_t* attr, unsigned count); + extern int pthread_barrier_wait(pthread_barrier_t* barrier); + + /* + ************************************************************************* + * pthread_condattr + ************************************************************************* + */ + extern int pthread_condattr_destroy(pthread_condattr_t* attr); + extern int pthread_condattr_getclock(const pthread_condattr_t* attr, + clockid_t* clock_id); + extern int pthread_condattr_init(pthread_condattr_t* attr); + extern int pthread_condattr_setclock(pthread_condattr_t* attr, + clockid_t clock_id); + + /* + ************************************************************************* + * pthread_cond + ************************************************************************* + */ + extern int pthread_cond_broadcast(pthread_cond_t* cond); + extern int pthread_cond_destroy(pthread_cond_t* cond); + extern int pthread_cond_init(pthread_cond_t* cond, + const pthread_condattr_t* attr); + extern int pthread_cond_signal(pthread_cond_t* cond); + extern int pthread_cond_timedwait(pthread_cond_t* cond, pthread_mutex_t* mutex, + const struct timespec* abstime); + extern int pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex); + + /* + ************************************************************************* + * pthread_key + ************************************************************************* + */ + extern int pthread_key_create(pthread_key_t* key, void (*destructor)(void*)); + extern int pthread_key_delete(pthread_key_t key); + extern void* pthread_getspecific(pthread_key_t key); + extern int pthread_setspecific(pthread_key_t key, const void* value); + + /* + ************************************************************************* + * pthread_mutexattr + ************************************************************************* + */ + extern int pthread_mutexattr_destroy(pthread_mutexattr_t* attr); + extern int pthread_mutexattr_gettype(const pthread_mutexattr_t* attr, + int* type); + extern int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t* attr, + int* prioceiling); + extern int pthread_mutexattr_getprotocol(const pthread_mutexattr_t* attr, + int* protocol); + extern int pthread_mutexattr_init(pthread_mutexattr_t* attr); + extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t* attr, + int prioceiling); + extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t* attr, + int protocol); + extern int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type); + + /* + ************************************************************************* + * pthread_mutex + ************************************************************************* + */ + extern int pthread_mutex_destroy(pthread_mutex_t* mutex); + extern int pthread_mutex_getprioceiling(const pthread_mutex_t* mutex, + int* prioceiling); + extern int pthread_mutex_init(pthread_mutex_t* mutex, + const pthread_mutexattr_t* attr); + extern int pthread_mutex_lock(pthread_mutex_t* mutex); + extern int pthread_mutex_setprioceiling(pthread_mutex_t* mutex, + int prioceiling, int* oldceiling); + extern int pthread_mutex_timedlock(pthread_mutex_t* mutex, + const struct timespec* abstime); + extern int pthread_mutex_trylock(pthread_mutex_t* mutex); + + extern int pthread_mutex_unlock(pthread_mutex_t* mutex); + + /* + ************************************************************************* + * pthread_rwlockattr + ************************************************************************* + */ + extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t* attr); + extern int pthread_rwlockattr_init(pthread_rwlockattr_t* attr); + + /* + ************************************************************************* + * pthread_rwlock + ************************************************************************* + */ + extern int pthread_rwlock_destroy(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_init(pthread_rwlock_t* rwlock, + const pthread_rwlockattr_t* attr); + + extern int pthread_rwlock_rdlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_timedrdlock(pthread_rwlock_t* rwlock, + const struct timespec* abstime); + extern int pthread_rwlock_timedwrlock(pthread_rwlock_t* rwlock, + const struct timespec* abstime); + extern int pthread_rwlock_tryrdlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_trywrlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_unlock(pthread_rwlock_t* rwlock); + extern int pthread_rwlock_wrlock(pthread_rwlock_t* rwlock); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sched.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sched.h index 4d5e1809..7e70879a 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sched.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sched.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -68,8 +68,9 @@ extern "C" { * ======== sched_param ======== * This was taken from sys/sched.h */ -struct sched_param { - int sched_priority; /* Thread execution priority */ +struct sched_param +{ + int sched_priority; /* Thread execution priority */ }; /* diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/semaphore.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/semaphore.h index 5569806b..8ea735be 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/semaphore.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/semaphore.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -57,18 +57,19 @@ extern "C" { #endif -typedef union { +typedef union +{ struct sysbios_Semaphore sysbios; struct freertos_Semaphore freertos; } sem_t; -int sem_destroy(sem_t *sem); -int sem_getvalue(sem_t *sem, int *value); -int sem_init(sem_t *sem, int pshared, unsigned value); -int sem_post(sem_t *sem); -int sem_timedwait(sem_t *sem, const struct timespec *abstime); -int sem_trywait(sem_t *sem); -int sem_wait(sem_t *sem); +int sem_destroy(sem_t* sem); +int sem_getvalue(sem_t* sem, int* value); +int sem_init(sem_t* sem, int pshared, unsigned value); +int sem_post(sem_t* sem); +int sem_timedwait(sem_t* sem, const struct timespec* abstime); +int sem_trywait(sem_t* sem); +int sem_wait(sem_t* sem); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/signal.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/signal.h index 4183ca81..ffc954de 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/signal.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/signal.h @@ -39,16 +39,16 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include "sys/types.h" /* include toolchain's header file */ #if defined(__430_CORE__) || defined(__430X_CORE__) -#include <../inc/dlib/c/signal.h> + #include <../inc/dlib/c/signal.h> #else -#include <../inc/c/signal.h> + #include <../inc/c/signal.h> #endif #ifdef __cplusplus @@ -77,9 +77,10 @@ extern "C" { /* * ======== sigval ======== */ -union sigval { +union sigval +{ int sival_int; /* integer signal value */ - void *sival_ptr; /* pointer signal value */ + void* sival_ptr; /* pointer signal value */ }; /* Deprecated. This typedef is for compatibility with old SDKs. It is @@ -91,13 +92,14 @@ typedef union sigval sigval; /* * ======== sigevent ======== */ -struct sigevent { +struct sigevent +{ int sigev_notify; /* notification type */ int sigev_signo; /* signal number */ union sigval sigev_value; /* signal value */ void (*sigev_notify_function)(union sigval val); /* notify function */ - pthread_attr_t *sigev_notify_attributes; /* notify attributes */ + pthread_attr_t* sigev_notify_attributes; /* notify attributes */ }; /* Deprecated. This typedef is for compatibility with old SDKs. It is diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/_internal.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/_internal.h index b49f1313..004673ae 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/_internal.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/_internal.h @@ -40,7 +40,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include /* C99 standard integer types */ @@ -54,7 +54,8 @@ extern "C" { * object in order to guarantee the opaque object is correctly sized * and aligned with respect to the kernel objects. */ -enum Opaque_Mode { +enum Opaque_Mode +{ Opaque_Mode_1, Opaque_Mode_2, Opaque_Mode_3, @@ -63,79 +64,91 @@ enum Opaque_Mode { struct Opaque_Struct__; -struct Opaque_QueueElem { - struct Opaque_QueueElem *volatile next; - struct Opaque_QueueElem *volatile prev; +struct Opaque_QueueElem +{ + struct Opaque_QueueElem* volatile next; + struct Opaque_QueueElem* volatile prev; }; -struct Opaque_QueueStruct { +struct Opaque_QueueStruct +{ struct Opaque_QueueElem __f0; - struct Opaque_Struct__ *__f1; + struct Opaque_Struct__* __f1; }; -struct sysbios_Semaphore { - struct Opaque_Struct__ *__f0; +struct sysbios_Semaphore +{ + struct Opaque_Struct__* __f0; unsigned int __f1; enum Opaque_Mode __f2; volatile uint_least16_t __f3; struct Opaque_QueueStruct __f4; - struct Opaque_Struct__ *__f5; + struct Opaque_Struct__* __f5; }; -struct freertos_Semaphore { - void *__f0; +struct freertos_Semaphore +{ + void* __f0; }; -struct sysbios_Barrier { +struct sysbios_Barrier +{ struct sysbios_Semaphore sem; int count; int pendCount; }; -struct freertos_Barrier { +struct freertos_Barrier +{ int count; int pendCount; - struct Opaque_Struct__ *waitList; - struct Opaque_Struct__ *last; + struct Opaque_Struct__* waitList; + struct Opaque_Struct__* last; }; -struct sysbios_Mutex { - struct Opaque_Struct__ *owner; +struct sysbios_Mutex +{ + struct Opaque_Struct__* owner; int lockCnt; int type; struct sysbios_Semaphore sem; - struct Opaque_Struct__ *mpo; + struct Opaque_Struct__* mpo; }; -struct freertos_Mutex { +struct freertos_Mutex +{ int protocol; - void *owner; + void* owner; int type; - void *sem; /* struct freertos_Semaphore */ + void* sem; /* struct freertos_Semaphore */ }; -struct sysbios_RWLock { +struct sysbios_RWLock +{ struct sysbios_Semaphore sem; struct sysbios_Semaphore readSem; int activeReaderCnt; int blockedReaderCnt; - void *owner; + void* owner; }; -struct freertos_RWLock { +struct freertos_RWLock +{ struct freertos_Semaphore sem; struct freertos_Semaphore readSem; int activeReaderCnt; int blockedReaderCnt; - void *owner; + void* owner; }; -struct sysbios_Cond { +struct sysbios_Cond +{ struct Opaque_QueueStruct waitList; uint32_t clockId; }; -struct freertos_Cond { +struct freertos_Cond +{ struct Opaque_QueueElem waitList; uint32_t clockId; }; diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/time.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/time.h index 4c554cca..373154af 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/time.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/time.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -47,9 +47,9 @@ /* include compiler time.h */ #if defined(__430_CORE__) || defined(__430X_CORE__) -#include <../inc/dlib/c/time.h> + #include <../inc/dlib/c/time.h> #else -#include <../inc/c/time.h> + #include <../inc/c/time.h> #endif #include "types.h" @@ -58,9 +58,10 @@ extern "C" { #endif -struct timeval { - time_t tv_sec; - suseconds_t tv_usec; +struct timeval +{ + time_t tv_sec; + suseconds_t tv_usec; }; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/types.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/types.h index dee0b6ec..36ff4c82 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/types.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/sys/types.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -90,9 +90,10 @@ typedef unsigned short uid_t; /* * ======== pthread_attr_t ======== */ -typedef struct pthread_attr_t { +typedef struct pthread_attr_t +{ int priority; - void *stack; + void* stack; size_t stacksize; size_t guardsize; int detachstate; @@ -101,9 +102,10 @@ typedef struct pthread_attr_t { typedef uint32_t pthread_barrierattr_t; typedef uint32_t pthread_condattr_t; -typedef void *pthread_key_t; +typedef void* pthread_key_t; -typedef struct pthread_mutexattr_t { +typedef struct pthread_mutexattr_t +{ int type; int protocol; int prioceiling; @@ -111,36 +113,41 @@ typedef struct pthread_mutexattr_t { typedef uint32_t pthread_rwlockattr_t; -typedef void *pthread_t; +typedef void* pthread_t; -typedef union { +typedef union +{ struct sysbios_Barrier sysbios; struct freertos_Barrier freertos; } pthread_barrier_t; -typedef union { +typedef union +{ struct sysbios_Cond sysbios; struct freertos_Cond freertos; } pthread_cond_t; -typedef union { +typedef union +{ struct sysbios_Mutex sysbios; struct freertos_Mutex freertos; } pthread_mutex_t; typedef uint32_t pthread_once_t; -typedef union { +typedef union +{ struct sysbios_RWLock sysbios; struct freertos_RWLock freertos; } pthread_rwlock_t; -struct _pthread_cleanup_context { +struct _pthread_cleanup_context +{ pthread_t thread; - void (*fxn)(void *); - void *arg; + void (*fxn)(void*); + void* arg; int cancelType; - struct _pthread_cleanup_context *next; + struct _pthread_cleanup_context* next; }; #ifdef __cplusplus diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/time.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/time.h index 1fd12978..9b73564d 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/time.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/time.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include @@ -47,12 +47,12 @@ /* include compiler time.h */ #if defined(__430_CORE__) || defined(__430X_CORE__) -#include <../inc/dlib/c/time.h> + #include <../inc/dlib/c/time.h> #else -/* disable IAR inline definition of time() */ -#define _NO_DEFINITIONS_IN_HEADER_FILES 1 -#include <../inc/c/time.h> + /* disable IAR inline definition of time() */ + #define _NO_DEFINITIONS_IN_HEADER_FILES 1 + #include <../inc/c/time.h> #endif #include "signal.h" @@ -88,7 +88,8 @@ extern "C" { #define TIMER_ABSTIME 4 #endif -struct itimerspec { +struct itimerspec +{ struct timespec it_interval; /* Timer interval */ struct timespec it_value; /* Timer expiration */ }; @@ -102,30 +103,30 @@ struct itimerspec { * For clockId = CLOCK_MONOTONIC, clock_gettime() returns a time based on * ti.sysbios.knl.Clock ticks. */ -extern int clock_gettime(clockid_t clockId, struct timespec *ts); +extern int clock_gettime(clockid_t clockId, struct timespec* ts); extern int clock_nanosleep(clockid_t clock_id, int flags, - const struct timespec *rqtp, struct timespec *rmtp); + const struct timespec* rqtp, struct timespec* rmtp); /* * Only clockId = CLOCK_REALTIME is supported for clock_settime(). Only * the value of ts->tv_sec is used is used in clock_settime(). * Returns EINVAL if clockId = CLOCK_MONOTONIC. */ -extern int clock_settime(clockid_t clockId, const struct timespec *ts); +extern int clock_settime(clockid_t clockId, const struct timespec* ts); /* * Create a timer based on the BIOS Clock module. To reduce code size, * the clockId parameter is ignored. */ -extern int timer_create(clockid_t clockId, struct sigevent *evp, - timer_t *timerid); +extern int timer_create(clockid_t clockId, struct sigevent* evp, + timer_t* timerid); extern int timer_delete(timer_t timerid); -extern int timer_gettime(timer_t timerid, struct itimerspec *its); +extern int timer_gettime(timer_t timerid, struct itimerspec* its); extern int timer_settime(timer_t timerid, int flags, - const struct itimerspec *value, struct itimerspec *ovalue); + const struct itimerspec* value, struct itimerspec* ovalue); -extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); +extern int nanosleep(const struct timespec* rqtp, struct timespec* rmtp); #ifdef __cplusplus } diff --git a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/unistd.h b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/unistd.h index a1766c02..ebcfc931 100644 --- a/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/unistd.h +++ b/examples/knx-cc1310/coresdk_cc13xx_cc26xx/source/ti/posix/iar/unistd.h @@ -39,7 +39,7 @@ /* compiler vendor check */ #ifndef __IAR_SYSTEMS_ICC__ -#error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. + #error Incompatible compiler: use this include path (.../ti/posix/iar) only with an IAR compiler. You appear to be using a different compiler. #endif #include "sys/types.h" diff --git a/examples/knx-cc1310/knx_wrapper.cpp b/examples/knx-cc1310/knx_wrapper.cpp index 19b616ff..1bb9da32 100644 --- a/examples/knx-cc1310/knx_wrapper.cpp +++ b/examples/knx-cc1310/knx_wrapper.cpp @@ -3,14 +3,15 @@ #include "knx_wrapper.h" -KnxFacade *pKnx = nullptr; +KnxFacade* pKnx = nullptr; void buttonUp() { - static uint32_t lastpressed=0; + static uint32_t lastpressed = 0; + if (millis() - lastpressed > 200) { - KnxFacade &knx = *pKnx; + KnxFacade& knx = *pKnx; knx.toggleProgMode(); lastpressed = millis(); } @@ -19,7 +20,7 @@ void buttonUp() void setup() { pKnx = new KnxFacade; - KnxFacade &knx = *pKnx; + KnxFacade& knx = *pKnx; // see GPIO_PinConfig gpioPinConfigs[] knx.buttonPin(0); @@ -38,12 +39,13 @@ void setup() } else println("not configured"); + knx.start(); } void loop() { - KnxFacade &knx = *pKnx; + KnxFacade& knx = *pKnx; knx.loop(); } diff --git a/examples/knx-linux-coupler/fdsk.cpp b/examples/knx-linux-coupler/fdsk.cpp index c8ca285f..d7329951 100644 --- a/examples/knx-linux-coupler/fdsk.cpp +++ b/examples/knx-linux-coupler/fdsk.cpp @@ -16,18 +16,21 @@ int FdskCalculator::snprintFdsk(char* str, int strSize, uint8_t* serialNumber, u for (int i = 0; i < 36; i++) { - if (((i % 6) == 0) && (i!=0)) + if (((i % 6) == 0) && (i != 0)) { - *(str+written++) = '-'; - if (written >= strSize-1) + *(str + written++) = '-'; + + if (written >= strSize - 1) break; } - *(str+written++) = tmpStr[i]; - if (written >= strSize-1) + + *(str + written++) = tmpStr[i]; + + if (written >= strSize - 1) break; } - *(str+written++) = '\0'; + *(str + written++) = '\0'; delete[] tmpStr; @@ -39,7 +42,7 @@ char* FdskCalculator::generateFdskString(uint8_t* serialNumber, uint8_t* key) uint8_t buffer[6 + 16 + 1]; // 6 bytes serialnumber + 16 bytes key + 1 byte placeholder for crc-4 memcpy(&buffer[0], serialNumber, 6); memcpy(&buffer[6], key, 16); - buffer[22] = (crc4Array(buffer, sizeof(buffer)-1)<<4) &0xFF; + buffer[22] = (crc4Array(buffer, sizeof(buffer) - 1) << 4) & 0xFF; uint8_t* outEncoded = nullptr; toBase32(buffer, sizeof(buffer), outEncoded, false); @@ -50,145 +53,153 @@ char* FdskCalculator::generateFdskString(uint8_t* serialNumber, uint8_t* key) int FdskCalculator::ceil(float num) { int inum = (int)num; - if (num == (float)inum) { + + if (num == (float)inum) + { return inum; } + return inum + 1; } int FdskCalculator::toBase32(uint8_t* in, long length, uint8_t*& out, bool usePadding) { - char base32StandardAlphabet[] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"}; - char standardPaddingChar = '='; - - int result = 0; - int index = 0; - int size = 0; // size of temporary array - uint8_t* temp = nullptr; + char base32StandardAlphabet[] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"}; + char standardPaddingChar = '='; - if (length < 0 || length > 268435456LL) - { - return 0; - } + int result = 0; + int index = 0; + int size = 0; // size of temporary array + uint8_t* temp = nullptr; - size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. - temp = new uint8_t[size]; + if (length < 0 || length > 268435456LL) + { + return 0; + } - if (length > 0) - { - int buffer = in[0]; - int next = 1; - int bitsLeft = 8; + size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. + temp = new uint8_t[size]; - while (bitsLeft > 0 || next < length) + if (length > 0) { - if (bitsLeft < 5) - { - if (next < length) - { - buffer <<= 8; - buffer |= in[next] & 0xFF; - next++; - bitsLeft += 8; - } - else + int buffer = in[0]; + int next = 1; + int bitsLeft = 8; + + while (bitsLeft > 0 || next < length) { - int pad = 5 - bitsLeft; - buffer <<= pad; - bitsLeft += pad; + if (bitsLeft < 5) + { + if (next < length) + { + buffer <<= 8; + buffer |= in[next] & 0xFF; + next++; + bitsLeft += 8; + } + else + { + int pad = 5 - bitsLeft; + buffer <<= pad; + bitsLeft += pad; + } + } + + index = 0x1F & (buffer >> (bitsLeft - 5)); + + bitsLeft -= 5; + temp[result] = (uint8_t)base32StandardAlphabet[index]; + result++; } - } - index = 0x1F & (buffer >> (bitsLeft -5)); - - bitsLeft -= 5; - temp[result] = (uint8_t)base32StandardAlphabet[index]; - result++; } - } - if (usePadding) - { - int pads = (result % 8); - if (pads > 0) + if (usePadding) { - pads = (8 - pads); - for (int i = 0; i < pads; i++) - { - temp[result] = standardPaddingChar; - result++; - } + int pads = (result % 8); + + if (pads > 0) + { + pads = (8 - pads); + + for (int i = 0; i < pads; i++) + { + temp[result] = standardPaddingChar; + result++; + } + } } - } - out = new uint8_t[result]; + out = new uint8_t[result]; - memcpy(out, temp, result); - delete [] temp; + memcpy(out, temp, result); + delete [] temp; - return result; + return result; } int FdskCalculator::fromBase32(uint8_t* in, long length, uint8_t*& out) { - int result = 0; // Length of the array of decoded values. - int buffer = 0; - int bitsLeft = 0; - uint8_t* temp = NULL; + int result = 0; // Length of the array of decoded values. + int buffer = 0; + int bitsLeft = 0; + uint8_t* temp = NULL; - temp = new uint8_t[length]; // Allocating temporary array. + temp = new uint8_t[length]; // Allocating temporary array. - for (int i = 0; i < length; i++) - { - uint8_t ch = in[i]; + for (int i = 0; i < length; i++) + { + uint8_t ch = in[i]; - // ignoring some characters: ' ', '\t', '\r', '\n', '=' - if (ch == 0xA0 || ch == 0x09 || ch == 0x0A || ch == 0x0D || ch == 0x3D) - continue; + // ignoring some characters: ' ', '\t', '\r', '\n', '=' + if (ch == 0xA0 || ch == 0x09 || ch == 0x0A || ch == 0x0D || ch == 0x3D) + continue; - // recovering mistyped: '0' -> 'O', '1' -> 'L', '8' -> 'B' - if (ch == 0x30) - { - ch = 0x4F; - } - else if (ch == 0x31) - { - ch = 0x4C; - } - else if (ch == 0x38) - { - ch = 0x42; - } + // recovering mistyped: '0' -> 'O', '1' -> 'L', '8' -> 'B' + if (ch == 0x30) + { + ch = 0x4F; + } + else if (ch == 0x31) + { + ch = 0x4C; + } + else if (ch == 0x38) + { + ch = 0x42; + } - // look up one base32 symbols: from 'A' to 'Z' or from 'a' to 'z' or from '2' to '7' - if ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A)) - { - ch = ((ch & 0x1F) - 1); - } - else if (ch >= 0x32 && ch <= 0x37) - { - ch -= (0x32 - 26); - } - else { - delete [] temp; - return 0; - } + // look up one base32 symbols: from 'A' to 'Z' or from 'a' to 'z' or from '2' to '7' + if ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A)) + { + ch = ((ch & 0x1F) - 1); + } + else if (ch >= 0x32 && ch <= 0x37) + { + ch -= (0x32 - 26); + } + else + { + delete [] temp; + return 0; + } - buffer <<= 5; - buffer |= ch; - bitsLeft += 5; - if (bitsLeft >= 8) - { - temp[result] = (unsigned char)((unsigned int)(buffer >> (bitsLeft - 8)) & 0xFF); - result++; - bitsLeft -= 8; + buffer <<= 5; + buffer |= ch; + bitsLeft += 5; + + if (bitsLeft >= 8) + { + temp[result] = (unsigned char)((unsigned int)(buffer >> (bitsLeft - 8)) & 0xFF); + result++; + bitsLeft -= 8; + } } - } - out = new uint8_t[result]; - memcpy(out, temp, result); - delete [] temp; + out = new uint8_t[result]; + memcpy(out, temp, result); + delete [] temp; - return result; + return result; } diff --git a/examples/knx-linux-coupler/fdsk.h b/examples/knx-linux-coupler/fdsk.h index 560ba225..67374a58 100644 --- a/examples/knx-linux-coupler/fdsk.h +++ b/examples/knx-linux-coupler/fdsk.h @@ -4,34 +4,38 @@ class FdskCalculator { - public: - int snprintFdsk(char* str, int strSize, uint8_t* serialNumber, uint8_t* key); + public: + int snprintFdsk(char* str, int strSize, uint8_t* serialNumber, uint8_t* key); - private: - char* generateFdskString(uint8_t* serialNumber, uint8_t* key); + private: + char* generateFdskString(uint8_t* serialNumber, uint8_t* key); - int toBase32(uint8_t* in, long length, uint8_t*& out, bool usePadding); - int fromBase32(uint8_t* in, long length, uint8_t*& out); + int toBase32(uint8_t* in, long length, uint8_t*& out, bool usePadding); + int fromBase32(uint8_t* in, long length, uint8_t*& out); - uint8_t crc4Array(uint8_t* data, uint8_t len) { - uint8_t start = 0; - for (uint8_t i = 0; i > 4; - c = crc4_tab[c ^ high4Bits]; - c = crc4_tab[c ^ low4Bits]; + uint8_t crc4(uint8_t c, uint8_t x) + { + uint8_t low4Bits = x & 0x0F; + uint8_t high4Bits = x >> 4; + c = crc4_tab[c ^ high4Bits]; + c = crc4_tab[c ^ low4Bits]; - return c; - } + return c; + } - int ceil(float num); + int ceil(float num); - static const uint8_t crc4_tab[16]; + static const uint8_t crc4_tab[16]; }; diff --git a/examples/knx-linux-coupler/main.cpp b/examples/knx-linux-coupler/main.cpp index d583b424..33b644e5 100644 --- a/examples/knx-linux-coupler/main.cpp +++ b/examples/knx-linux-coupler/main.cpp @@ -19,10 +19,10 @@ using namespace Knx; volatile sig_atomic_t loopActive = 1; void signalHandler(int sig) { - (void)sig; + (void)sig; - // can be called asynchronously - loopActive = 0; + // can be called asynchronously + loopActive = 0; } bool sendHidReport(uint8_t* data, uint16_t length) @@ -35,11 +35,11 @@ bool isSendHidReportPossible() } #if MASK_VERSION == 0x091A -KnxFacade knx; // IP/TP1 coupler + KnxFacade knx; // IP/TP1 coupler #elif MASK_VERSION == 0x2920 -KnxFacade knx; // TP1/RF coupler + KnxFacade knx; // TP1/RF coupler #else -#error Mask version not supported yet! + #error Mask version not supported yet! #endif void appLoop() @@ -62,10 +62,11 @@ void setup() } else println("not configured"); + knx.start(); } -int main(int argc, char **argv) +int main(int argc, char** argv) { printf("main() start.\n"); @@ -91,12 +92,14 @@ int main(int argc, char **argv) knx.platform().cmdLineArgs(argc, argv); setup(); - + while (loopActive) { knx.loop(); - if(knx.configured()) + + if (knx.configured()) appLoop(); + delayMicroseconds(100); } diff --git a/examples/knx-linux/fdsk.cpp b/examples/knx-linux/fdsk.cpp index c8ca285f..d7329951 100644 --- a/examples/knx-linux/fdsk.cpp +++ b/examples/knx-linux/fdsk.cpp @@ -16,18 +16,21 @@ int FdskCalculator::snprintFdsk(char* str, int strSize, uint8_t* serialNumber, u for (int i = 0; i < 36; i++) { - if (((i % 6) == 0) && (i!=0)) + if (((i % 6) == 0) && (i != 0)) { - *(str+written++) = '-'; - if (written >= strSize-1) + *(str + written++) = '-'; + + if (written >= strSize - 1) break; } - *(str+written++) = tmpStr[i]; - if (written >= strSize-1) + + *(str + written++) = tmpStr[i]; + + if (written >= strSize - 1) break; } - *(str+written++) = '\0'; + *(str + written++) = '\0'; delete[] tmpStr; @@ -39,7 +42,7 @@ char* FdskCalculator::generateFdskString(uint8_t* serialNumber, uint8_t* key) uint8_t buffer[6 + 16 + 1]; // 6 bytes serialnumber + 16 bytes key + 1 byte placeholder for crc-4 memcpy(&buffer[0], serialNumber, 6); memcpy(&buffer[6], key, 16); - buffer[22] = (crc4Array(buffer, sizeof(buffer)-1)<<4) &0xFF; + buffer[22] = (crc4Array(buffer, sizeof(buffer) - 1) << 4) & 0xFF; uint8_t* outEncoded = nullptr; toBase32(buffer, sizeof(buffer), outEncoded, false); @@ -50,145 +53,153 @@ char* FdskCalculator::generateFdskString(uint8_t* serialNumber, uint8_t* key) int FdskCalculator::ceil(float num) { int inum = (int)num; - if (num == (float)inum) { + + if (num == (float)inum) + { return inum; } + return inum + 1; } int FdskCalculator::toBase32(uint8_t* in, long length, uint8_t*& out, bool usePadding) { - char base32StandardAlphabet[] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"}; - char standardPaddingChar = '='; - - int result = 0; - int index = 0; - int size = 0; // size of temporary array - uint8_t* temp = nullptr; + char base32StandardAlphabet[] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"}; + char standardPaddingChar = '='; - if (length < 0 || length > 268435456LL) - { - return 0; - } + int result = 0; + int index = 0; + int size = 0; // size of temporary array + uint8_t* temp = nullptr; - size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. - temp = new uint8_t[size]; + if (length < 0 || length > 268435456LL) + { + return 0; + } - if (length > 0) - { - int buffer = in[0]; - int next = 1; - int bitsLeft = 8; + size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. + temp = new uint8_t[size]; - while (bitsLeft > 0 || next < length) + if (length > 0) { - if (bitsLeft < 5) - { - if (next < length) - { - buffer <<= 8; - buffer |= in[next] & 0xFF; - next++; - bitsLeft += 8; - } - else + int buffer = in[0]; + int next = 1; + int bitsLeft = 8; + + while (bitsLeft > 0 || next < length) { - int pad = 5 - bitsLeft; - buffer <<= pad; - bitsLeft += pad; + if (bitsLeft < 5) + { + if (next < length) + { + buffer <<= 8; + buffer |= in[next] & 0xFF; + next++; + bitsLeft += 8; + } + else + { + int pad = 5 - bitsLeft; + buffer <<= pad; + bitsLeft += pad; + } + } + + index = 0x1F & (buffer >> (bitsLeft - 5)); + + bitsLeft -= 5; + temp[result] = (uint8_t)base32StandardAlphabet[index]; + result++; } - } - index = 0x1F & (buffer >> (bitsLeft -5)); - - bitsLeft -= 5; - temp[result] = (uint8_t)base32StandardAlphabet[index]; - result++; } - } - if (usePadding) - { - int pads = (result % 8); - if (pads > 0) + if (usePadding) { - pads = (8 - pads); - for (int i = 0; i < pads; i++) - { - temp[result] = standardPaddingChar; - result++; - } + int pads = (result % 8); + + if (pads > 0) + { + pads = (8 - pads); + + for (int i = 0; i < pads; i++) + { + temp[result] = standardPaddingChar; + result++; + } + } } - } - out = new uint8_t[result]; + out = new uint8_t[result]; - memcpy(out, temp, result); - delete [] temp; + memcpy(out, temp, result); + delete [] temp; - return result; + return result; } int FdskCalculator::fromBase32(uint8_t* in, long length, uint8_t*& out) { - int result = 0; // Length of the array of decoded values. - int buffer = 0; - int bitsLeft = 0; - uint8_t* temp = NULL; + int result = 0; // Length of the array of decoded values. + int buffer = 0; + int bitsLeft = 0; + uint8_t* temp = NULL; - temp = new uint8_t[length]; // Allocating temporary array. + temp = new uint8_t[length]; // Allocating temporary array. - for (int i = 0; i < length; i++) - { - uint8_t ch = in[i]; + for (int i = 0; i < length; i++) + { + uint8_t ch = in[i]; - // ignoring some characters: ' ', '\t', '\r', '\n', '=' - if (ch == 0xA0 || ch == 0x09 || ch == 0x0A || ch == 0x0D || ch == 0x3D) - continue; + // ignoring some characters: ' ', '\t', '\r', '\n', '=' + if (ch == 0xA0 || ch == 0x09 || ch == 0x0A || ch == 0x0D || ch == 0x3D) + continue; - // recovering mistyped: '0' -> 'O', '1' -> 'L', '8' -> 'B' - if (ch == 0x30) - { - ch = 0x4F; - } - else if (ch == 0x31) - { - ch = 0x4C; - } - else if (ch == 0x38) - { - ch = 0x42; - } + // recovering mistyped: '0' -> 'O', '1' -> 'L', '8' -> 'B' + if (ch == 0x30) + { + ch = 0x4F; + } + else if (ch == 0x31) + { + ch = 0x4C; + } + else if (ch == 0x38) + { + ch = 0x42; + } - // look up one base32 symbols: from 'A' to 'Z' or from 'a' to 'z' or from '2' to '7' - if ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A)) - { - ch = ((ch & 0x1F) - 1); - } - else if (ch >= 0x32 && ch <= 0x37) - { - ch -= (0x32 - 26); - } - else { - delete [] temp; - return 0; - } + // look up one base32 symbols: from 'A' to 'Z' or from 'a' to 'z' or from '2' to '7' + if ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A)) + { + ch = ((ch & 0x1F) - 1); + } + else if (ch >= 0x32 && ch <= 0x37) + { + ch -= (0x32 - 26); + } + else + { + delete [] temp; + return 0; + } - buffer <<= 5; - buffer |= ch; - bitsLeft += 5; - if (bitsLeft >= 8) - { - temp[result] = (unsigned char)((unsigned int)(buffer >> (bitsLeft - 8)) & 0xFF); - result++; - bitsLeft -= 8; + buffer <<= 5; + buffer |= ch; + bitsLeft += 5; + + if (bitsLeft >= 8) + { + temp[result] = (unsigned char)((unsigned int)(buffer >> (bitsLeft - 8)) & 0xFF); + result++; + bitsLeft -= 8; + } } - } - out = new uint8_t[result]; - memcpy(out, temp, result); - delete [] temp; + out = new uint8_t[result]; + memcpy(out, temp, result); + delete [] temp; - return result; + return result; } diff --git a/examples/knx-linux/fdsk.h b/examples/knx-linux/fdsk.h index 560ba225..67374a58 100644 --- a/examples/knx-linux/fdsk.h +++ b/examples/knx-linux/fdsk.h @@ -4,34 +4,38 @@ class FdskCalculator { - public: - int snprintFdsk(char* str, int strSize, uint8_t* serialNumber, uint8_t* key); + public: + int snprintFdsk(char* str, int strSize, uint8_t* serialNumber, uint8_t* key); - private: - char* generateFdskString(uint8_t* serialNumber, uint8_t* key); + private: + char* generateFdskString(uint8_t* serialNumber, uint8_t* key); - int toBase32(uint8_t* in, long length, uint8_t*& out, bool usePadding); - int fromBase32(uint8_t* in, long length, uint8_t*& out); + int toBase32(uint8_t* in, long length, uint8_t*& out, bool usePadding); + int fromBase32(uint8_t* in, long length, uint8_t*& out); - uint8_t crc4Array(uint8_t* data, uint8_t len) { - uint8_t start = 0; - for (uint8_t i = 0; i > 4; - c = crc4_tab[c ^ high4Bits]; - c = crc4_tab[c ^ low4Bits]; + uint8_t crc4(uint8_t c, uint8_t x) + { + uint8_t low4Bits = x & 0x0F; + uint8_t high4Bits = x >> 4; + c = crc4_tab[c ^ high4Bits]; + c = crc4_tab[c ^ low4Bits]; - return c; - } + return c; + } - int ceil(float num); + int ceil(float num); - static const uint8_t crc4_tab[16]; + static const uint8_t crc4_tab[16]; }; diff --git a/examples/knx-linux/main.cpp b/examples/knx-linux/main.cpp index b07ca200..a3492898 100644 --- a/examples/knx-linux/main.cpp +++ b/examples/knx-linux/main.cpp @@ -23,10 +23,10 @@ volatile sig_atomic_t loopActive = 1; void signalHandler(int sig) { - (void)sig; + (void)sig; - // can be called asynchronously - loopActive = 0; + // can be called asynchronously + loopActive = 0; } bool sendHidReport(uint8_t* data, uint16_t length) @@ -39,13 +39,13 @@ bool isSendHidReportPossible() } #if MASK_VERSION == 0x57B0 -KnxFacade knx; + KnxFacade knx; #elif MASK_VERSION == 0x27B0 -KnxFacade knx; + KnxFacade knx; #elif MASK_VERSION == 0x07B0 -KnxFacade knx; + KnxFacade knx; #else -#error Mask version not supported yet! + #error Mask version not supported yet! #endif long lastsend = 0; @@ -58,6 +58,7 @@ long lastsend = 0; void measureTemp() { long now = millis(); + if ((now - lastsend) < 10000) return; @@ -68,10 +69,11 @@ void measureTemp() currentValue -= 50; // currentValue *= (670433.28 + 273); // currentValue -= 273; - LOGGER.info("current value: %f",currentValue); + LOGGER.info("current value: %f", currentValue); GO_CURR.value(currentValue); float max = GO_MAX.value(); + if (currentValue > max) GO_MAX.value(currentValue); @@ -92,7 +94,7 @@ void appLoop() { if (!knx.configured()) return; - + measureTemp(); } @@ -122,10 +124,11 @@ void setup() } else LOGGER.info("not configured"); + knx.start(); } -int main(int argc, char **argv) +int main(int argc, char** argv) { LOGGER.info("main() start."); @@ -151,12 +154,14 @@ int main(int argc, char **argv) knx.platform().cmdLineArgs(argc, argv); setup(); - + while (loopActive) { knx.loop(); - if(knx.configured()) + + if (knx.configured()) appLoop(); + delayMicroseconds(100); } diff --git a/examples/knxPython/knxmodule.cpp b/examples/knxPython/knxmodule.cpp index 95bef2d1..52216172 100644 --- a/examples/knxPython/knxmodule.cpp +++ b/examples/knxPython/knxmodule.cpp @@ -191,6 +191,7 @@ PYBIND11_MODULE(knx, m) m.def("Parameters", []() { uint8_t* data = bau->parameters().data(); + if (data == nullptr) return py::bytes(); diff --git a/examples/knxPython/pybind11/include/pybind11/attr.h b/examples/knxPython/pybind11/include/pybind11/attr.h index 1044db94..041fcae2 100644 --- a/examples/knxPython/pybind11/include/pybind11/attr.h +++ b/examples/knxPython/pybind11/include/pybind11/attr.h @@ -21,9 +21,10 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) /// @{ /// Annotation for methods -struct is_method { +struct is_method +{ handle class_; - explicit is_method(const handle &c) : class_(c) {} + explicit is_method(const handle& c) : class_(c) {} }; /// Annotation for setters @@ -36,32 +37,37 @@ struct is_operator {}; struct is_final {}; /// Annotation for parent scope -struct scope { +struct scope +{ handle value; - explicit scope(const handle &s) : value(s) {} + explicit scope(const handle& s) : value(s) {} }; /// Annotation for documentation -struct doc { - const char *value; - explicit doc(const char *value) : value(value) {} +struct doc +{ + const char* value; + explicit doc(const char* value) : value(value) {} }; /// Annotation for function names -struct name { - const char *value; - explicit name(const char *value) : value(value) {} +struct name +{ + const char* value; + explicit name(const char* value) : value(value) {} }; /// Annotation indicating that a function is an overload associated with a given "sibling" -struct sibling { +struct sibling +{ handle value; - explicit sibling(const handle &value) : value(value.ptr()) {} + explicit sibling(const handle& value) : value(value.ptr()) {} }; /// Annotation indicating that a class derives from another given type template -struct base { +struct base +{ PYBIND11_DEPRECATED( "base() was deprecated in favor of specifying 'T' as a template argument to class_") @@ -82,7 +88,8 @@ struct dynamic_attr {}; struct buffer_protocol {}; /// Annotation which requests that a special metaclass is created for a type -struct metaclass { +struct metaclass +{ handle value; PYBIND11_DEPRECATED("py::metaclass() is no longer required. It's turned on by default now.") @@ -101,8 +108,9 @@ struct metaclass { /// work with later versions of pybind11. You may wish to consult the /// implementation of `make_new_python_type` in `detail/classes.h` to understand /// the context in which the callback will be run. -struct custom_type_setup { - using callback = std::function; +struct custom_type_setup +{ + using callback = std::function; explicit custom_type_setup(callback value) : value(std::move(value)) {} @@ -110,7 +118,8 @@ struct custom_type_setup { }; /// Annotation that marks a class as local to the module: -struct module_local { +struct module_local +{ const bool value; constexpr explicit module_local(bool v = true) : value(v) {} }; @@ -143,12 +152,14 @@ template struct call_guard; template <> -struct call_guard<> { +struct call_guard<> +{ using type = detail::void_type; }; template -struct call_guard { +struct call_guard +{ static_assert(std::is_default_constructible::value, "The guard type must be default constructible"); @@ -156,8 +167,10 @@ struct call_guard { }; template -struct call_guard { - struct type { +struct call_guard +{ + struct type + { T guard{}; // Compose multiple guard types with left-to-right default-constructor order typename call_guard::type next{}; }; @@ -172,48 +185,50 @@ enum op_type : int; struct undefined_t; template struct op_; -void keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret); +void keep_alive_impl(size_t Nurse, size_t Patient, function_call& call, handle ret); /// Internal data structure which holds metadata about a keyword argument -struct argument_record { - const char *name; ///< Argument name - const char *descr; ///< Human-readable version of the argument value +struct argument_record +{ + const char* name; ///< Argument name + const char* descr; ///< Human-readable version of the argument value handle value; ///< Associated Python object bool convert : 1; ///< True if the argument is allowed to convert when loading bool none : 1; ///< True if None is allowed when loading - argument_record(const char *name, const char *descr, handle value, bool convert, bool none) + argument_record(const char* name, const char* descr, handle value, bool convert, bool none) : name(name), descr(descr), value(value), convert(convert), none(none) {} }; /// Internal data structure which holds metadata about a bound function (signature, overloads, /// etc.) -struct function_record { +struct function_record +{ function_record() : is_constructor(false), is_new_style_constructor(false), is_stateless(false), is_operator(false), is_method(false), is_setter(false), has_args(false), has_kwargs(false), prepend(false) {} /// Function name - char *name = nullptr; /* why no C++ strings? They generate heavier code.. */ + char* name = nullptr; /* why no C++ strings? They generate heavier code.. */ // User-specified documentation string - char *doc = nullptr; + char* doc = nullptr; /// Human-readable version of the function signature - char *signature = nullptr; + char* signature = nullptr; /// List of registered keyword arguments std::vector args; /// Pointer to lambda function which converts arguments and performs the actual call - handle (*impl)(function_call &) = nullptr; + handle (*impl)(function_call&) = nullptr; /// Storage for the wrapped function pointer and captured data, if any - void *data[3] = {}; + void* data[3] = {}; /// Pointer to custom destructor for 'data' (if needed) - void (*free_data)(function_record *ptr) = nullptr; + void (*free_data)(function_record* ptr) = nullptr; /// Return value policy associated with this function return_value_policy policy = return_value_policy::automatic; @@ -256,7 +271,7 @@ struct function_record { std::uint16_t nargs_pos_only = 0; /// Python method object - PyMethodDef *def = nullptr; + PyMethodDef* def = nullptr; /// Python handle to the parent scope (a class or a module) handle scope; @@ -265,11 +280,12 @@ struct function_record { handle sibling; /// Pointer to next overload - function_record *next = nullptr; + function_record* next = nullptr; }; /// Special data structure which (temporarily) holds metadata about a bound class -struct type_record { +struct type_record +{ PYBIND11_NOINLINE type_record() : multiple_inheritance(false), dynamic_attr(false), buffer_protocol(false), default_holder(true), module_local(false), is_final(false) {} @@ -278,10 +294,10 @@ struct type_record { handle scope; /// Name of the class - const char *name = nullptr; + const char* name = nullptr; // Pointer to RTTI type_info data structure - const std::type_info *type = nullptr; + const std::type_info* type = nullptr; /// How large is the underlying C++ type? size_t type_size = 0; @@ -293,19 +309,19 @@ struct type_record { size_t holder_size = 0; /// The global operator new can be overridden with a class-specific variant - void *(*operator_new)(size_t) = nullptr; + void* (*operator_new)(size_t) = nullptr; /// Function pointer to class_<..>::init_instance - void (*init_instance)(instance *, const void *) = nullptr; + void (*init_instance)(instance*, const void*) = nullptr; /// Function pointer to class_<..>::dealloc - void (*dealloc)(detail::value_and_holder &) = nullptr; + void (*dealloc)(detail::value_and_holder&) = nullptr; /// List of base classes of the newly created type list bases; /// Optional docstring - const char *doc = nullptr; + const char* doc = nullptr; /// Custom metaclass (optional) handle metaclass; @@ -331,16 +347,20 @@ struct type_record { /// Is the class inheritable from python classes? bool is_final : 1; - PYBIND11_NOINLINE void add_base(const std::type_info &base, void *(*caster)(void *) ) { - auto *base_info = detail::get_type_info(base, false); - if (!base_info) { + PYBIND11_NOINLINE void add_base(const std::type_info& base, void* (*caster)(void*) ) + { + auto* base_info = detail::get_type_info(base, false); + + if (!base_info) + { std::string tname(base.name()); detail::clean_type_id(tname); pybind11_fail("generic_type: type \"" + std::string(name) + "\" referenced unknown base type \"" + tname + "\""); } - if (default_holder != base_info->default_holder) { + if (default_holder != base_info->default_holder) + { std::string tname(base.name()); detail::clean_type_id(tname); pybind11_fail("generic_type: type \"" + std::string(name) + "\" " @@ -349,7 +369,7 @@ struct type_record { + (base_info->default_holder ? "does not" : "does")); } - bases.append((PyObject *) base_info->type); + bases.append((PyObject*) base_info->type); #if PY_VERSION_HEX < 0x030B0000 dynamic_attr |= base_info->type->tp_dictoffset != 0; @@ -357,13 +377,15 @@ struct type_record { dynamic_attr |= (base_info->type->tp_flags & Py_TPFLAGS_MANAGED_DICT) != 0; #endif - if (caster) { + if (caster) + { base_info->implicit_casts.emplace_back(type, caster); } } }; -inline function_call::function_call(const function_record &f, handle p) : func(f), parent(p) { +inline function_call::function_call(const function_record& f, handle p) : func(f), parent(p) +{ args.reserve(f.nargs); args_convert.reserve(f.nargs); } @@ -381,52 +403,78 @@ template struct process_attribute; template -struct process_attribute_default { +struct process_attribute_default +{ /// Default implementation: do nothing - static void init(const T &, function_record *) {} - static void init(const T &, type_record *) {} - static void precall(function_call &) {} - static void postcall(function_call &, handle) {} + static void init(const T&, function_record*) {} + static void init(const T&, type_record*) {} + static void precall(function_call&) {} + static void postcall(function_call&, handle) {} }; /// Process an attribute specifying the function's name template <> -struct process_attribute : process_attribute_default { - static void init(const name &n, function_record *r) { r->name = const_cast(n.value); } +struct process_attribute : process_attribute_default +{ + static void init(const name& n, function_record* r) + { + r->name = const_cast(n.value); + } }; /// Process an attribute specifying the function's docstring template <> -struct process_attribute : process_attribute_default { - static void init(const doc &n, function_record *r) { r->doc = const_cast(n.value); } +struct process_attribute : process_attribute_default +{ + static void init(const doc& n, function_record* r) + { + r->doc = const_cast(n.value); + } }; /// Process an attribute specifying the function's docstring (provided as a C-style string) template <> -struct process_attribute : process_attribute_default { - static void init(const char *d, function_record *r) { r->doc = const_cast(d); } - static void init(const char *d, type_record *r) { r->doc = d; } +struct process_attribute : process_attribute_default +{ + static void init(const char* d, function_record* r) + { + r->doc = const_cast(d); + } + static void init(const char* d, type_record* r) + { + r->doc = d; + } }; template <> -struct process_attribute : process_attribute {}; +struct process_attribute : process_attribute {}; /// Process an attribute indicating the function's return value policy template <> -struct process_attribute : process_attribute_default { - static void init(const return_value_policy &p, function_record *r) { r->policy = p; } +struct process_attribute : process_attribute_default +{ + static void init(const return_value_policy& p, function_record* r) + { + r->policy = p; + } }; /// Process an attribute which indicates that this is an overloaded function associated with a /// given sibling template <> -struct process_attribute : process_attribute_default { - static void init(const sibling &s, function_record *r) { r->sibling = s.value; } +struct process_attribute : process_attribute_default +{ + static void init(const sibling& s, function_record* r) + { + r->sibling = s.value; + } }; /// Process an attribute which indicates that this function is a method template <> -struct process_attribute : process_attribute_default { - static void init(const is_method &s, function_record *r) { +struct process_attribute : process_attribute_default +{ + static void init(const is_method& s, function_record* r) + { r->is_method = true; r->scope = s.class_; } @@ -434,47 +482,67 @@ struct process_attribute : process_attribute_default { /// Process an attribute which indicates that this function is a setter template <> -struct process_attribute : process_attribute_default { - static void init(const is_setter &, function_record *r) { r->is_setter = true; } +struct process_attribute : process_attribute_default +{ + static void init(const is_setter&, function_record* r) + { + r->is_setter = true; + } }; /// Process an attribute which indicates the parent scope of a method template <> -struct process_attribute : process_attribute_default { - static void init(const scope &s, function_record *r) { r->scope = s.value; } +struct process_attribute : process_attribute_default +{ + static void init(const scope& s, function_record* r) + { + r->scope = s.value; + } }; /// Process an attribute which indicates that this function is an operator template <> -struct process_attribute : process_attribute_default { - static void init(const is_operator &, function_record *r) { r->is_operator = true; } +struct process_attribute : process_attribute_default +{ + static void init(const is_operator&, function_record* r) + { + r->is_operator = true; + } }; template <> struct process_attribute - : process_attribute_default { - static void init(const is_new_style_constructor &, function_record *r) { + : process_attribute_default +{ + static void init(const is_new_style_constructor&, function_record* r) + { r->is_new_style_constructor = true; } }; -inline void check_kw_only_arg(const arg &a, function_record *r) { - if (r->args.size() > r->nargs_pos && (!a.name || a.name[0] == '\0')) { +inline void check_kw_only_arg(const arg& a, function_record* r) +{ + if (r->args.size() > r->nargs_pos && (!a.name || a.name[0] == '\0')) + { pybind11_fail("arg(): cannot specify an unnamed argument after a kw_only() annotation or " "args() argument"); } } -inline void append_self_arg_if_needed(function_record *r) { - if (r->is_method && r->args.empty()) { +inline void append_self_arg_if_needed(function_record* r) +{ + if (r->is_method && r->args.empty()) + { r->args.emplace_back("self", nullptr, handle(), /*convert=*/true, /*none=*/false); } } /// Process a keyword argument attribute (*without* a default value) template <> -struct process_attribute : process_attribute_default { - static void init(const arg &a, function_record *r) { +struct process_attribute : process_attribute_default +{ + static void init(const arg& a, function_record* r) + { append_self_arg_if_needed(r); r->args.emplace_back(a.name, nullptr, handle(), !a.flag_noconvert, a.flag_none); @@ -484,30 +552,45 @@ struct process_attribute : process_attribute_default { /// Process a keyword argument attribute (*with* a default value) template <> -struct process_attribute : process_attribute_default { - static void init(const arg_v &a, function_record *r) { - if (r->is_method && r->args.empty()) { +struct process_attribute : process_attribute_default +{ + static void init(const arg_v& a, function_record* r) + { + if (r->is_method && r->args.empty()) + { r->args.emplace_back( "self", /*descr=*/nullptr, /*parent=*/handle(), /*convert=*/true, /*none=*/false); } - if (!a.value) { + if (!a.value) + { #if defined(PYBIND11_DETAILED_ERROR_MESSAGES) std::string descr("'"); - if (a.name) { + + if (a.name) + { descr += std::string(a.name) + ": "; } + descr += a.type + "'"; - if (r->is_method) { - if (r->name) { + + if (r->is_method) + { + if (r->name) + { descr += " in method '" + (std::string) str(r->scope) + "." + (std::string) r->name + "'"; - } else { + } + else + { descr += " in method of '" + (std::string) str(r->scope) + "'"; } - } else if (r->name) { + } + else if (r->name) + { descr += " in function '" + (std::string) r->name + "'"; } + pybind11_fail("arg(): could not convert default argument " + descr + " into a Python object (type not registered yet?)"); #else @@ -517,6 +600,7 @@ struct process_attribute : process_attribute_default { "more information."); #endif } + r->args.emplace_back(a.name, a.descr, a.value.inc_ref(), !a.flag_noconvert, a.flag_none); check_kw_only_arg(a, r); @@ -525,26 +609,36 @@ struct process_attribute : process_attribute_default { /// Process a keyword-only-arguments-follow pseudo argument template <> -struct process_attribute : process_attribute_default { - static void init(const kw_only &, function_record *r) { +struct process_attribute : process_attribute_default +{ + static void init(const kw_only&, function_record* r) + { append_self_arg_if_needed(r); - if (r->has_args && r->nargs_pos != static_cast(r->args.size())) { + + if (r->has_args && r->nargs_pos != static_cast(r->args.size())) + { pybind11_fail("Mismatched args() and kw_only(): they must occur at the same relative " "argument location (or omit kw_only() entirely)"); } + r->nargs_pos = static_cast(r->args.size()); } }; /// Process a positional-only-argument maker template <> -struct process_attribute : process_attribute_default { - static void init(const pos_only &, function_record *r) { +struct process_attribute : process_attribute_default +{ + static void init(const pos_only&, function_record* r) + { append_self_arg_if_needed(r); r->nargs_pos_only = static_cast(r->args.size()); - if (r->nargs_pos_only > r->nargs_pos) { + + if (r->nargs_pos_only > r->nargs_pos) + { pybind11_fail("pos_only(): cannot follow a py::args() argument"); } + // It also can't follow a kw_only, but a static_assert in pybind11.h checks that } }; @@ -553,60 +647,96 @@ struct process_attribute : process_attribute_default { /// that) template struct process_attribute::value>> - : process_attribute_default { - static void init(const handle &h, type_record *r) { r->bases.append(h); } + : process_attribute_default +{ + static void init(const handle& h, type_record* r) + { + r->bases.append(h); + } }; /// Process a parent class attribute (deprecated, does not support multiple inheritance) template -struct process_attribute> : process_attribute_default> { - static void init(const base &, type_record *r) { r->add_base(typeid(T), nullptr); } +struct process_attribute> : process_attribute_default> +{ + static void init(const base&, type_record* r) + { + r->add_base(typeid(T), nullptr); + } }; /// Process a multiple inheritance attribute template <> -struct process_attribute : process_attribute_default { - static void init(const multiple_inheritance &, type_record *r) { +struct process_attribute : process_attribute_default +{ + static void init(const multiple_inheritance&, type_record* r) + { r->multiple_inheritance = true; } }; template <> -struct process_attribute : process_attribute_default { - static void init(const dynamic_attr &, type_record *r) { r->dynamic_attr = true; } +struct process_attribute : process_attribute_default +{ + static void init(const dynamic_attr&, type_record* r) + { + r->dynamic_attr = true; + } }; template <> -struct process_attribute { - static void init(const custom_type_setup &value, type_record *r) { +struct process_attribute +{ + static void init(const custom_type_setup& value, type_record* r) + { r->custom_type_setup_callback = value.value; } }; template <> -struct process_attribute : process_attribute_default { - static void init(const is_final &, type_record *r) { r->is_final = true; } +struct process_attribute : process_attribute_default +{ + static void init(const is_final&, type_record* r) + { + r->is_final = true; + } }; template <> -struct process_attribute : process_attribute_default { - static void init(const buffer_protocol &, type_record *r) { r->buffer_protocol = true; } +struct process_attribute : process_attribute_default +{ + static void init(const buffer_protocol&, type_record* r) + { + r->buffer_protocol = true; + } }; template <> -struct process_attribute : process_attribute_default { - static void init(const metaclass &m, type_record *r) { r->metaclass = m.value; } +struct process_attribute : process_attribute_default +{ + static void init(const metaclass& m, type_record* r) + { + r->metaclass = m.value; + } }; template <> -struct process_attribute : process_attribute_default { - static void init(const module_local &l, type_record *r) { r->module_local = l.value; } +struct process_attribute : process_attribute_default +{ + static void init(const module_local& l, type_record* r) + { + r->module_local = l.value; + } }; /// Process a 'prepend' attribute, putting this at the beginning of the overload chain template <> -struct process_attribute : process_attribute_default { - static void init(const prepend &, function_record *r) { r->prepend = true; } +struct process_attribute : process_attribute_default +{ + static void init(const prepend&, function_record* r) + { + r->prepend = true; + } }; /// Process an 'arithmetic' attribute for enums (does nothing here) @@ -623,49 +753,59 @@ struct process_attribute> : process_attribute_default struct process_attribute> - : public process_attribute_default> { - template = 0> - static void precall(function_call &call) { + : public process_attribute_default> +{ + template < size_t N = Nurse, size_t P = Patient, enable_if_t < N != 0 && P != 0, int > = 0 > + static void precall(function_call& call) + { keep_alive_impl(Nurse, Patient, call, handle()); } - template = 0> - static void postcall(function_call &, handle) {} - template = 0> - static void precall(function_call &) {} - template = 0> - static void postcall(function_call &call, handle ret) { + template < size_t N = Nurse, size_t P = Patient, enable_if_t < N != 0 && P != 0, int > = 0 > + static void postcall(function_call&, handle) {} + template < size_t N = Nurse, size_t P = Patient, enable_if_t < N == 0 || P == 0, int > = 0 > + static void precall(function_call&) {} + template < size_t N = Nurse, size_t P = Patient, enable_if_t < N == 0 || P == 0, int > = 0 > + static void postcall(function_call& call, handle ret) + { keep_alive_impl(Nurse, Patient, call, ret); } }; /// Recursively iterate over variadic template arguments template -struct process_attributes { - static void init(const Args &...args, function_record *r) { +struct process_attributes +{ + static void init(const Args& ...args, function_record* r) + { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(r); PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(r); using expander = int[]; - (void) expander{ + (void) expander + { 0, ((void) process_attribute::type>::init(args, r), 0)...}; } - static void init(const Args &...args, type_record *r) { + static void init(const Args& ...args, type_record* r) + { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(r); PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(r); using expander = int[]; (void) expander{0, (process_attribute::type>::init(args, r), 0)...}; } - static void precall(function_call &call) { + static void precall(function_call& call) + { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call); using expander = int[]; (void) expander{0, (process_attribute::type>::precall(call), 0)...}; } - static void postcall(function_call &call, handle fn_ret) { + static void postcall(function_call& call, handle fn_ret) + { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call, fn_ret); PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(fn_ret); using expander = int[]; - (void) expander{ + (void) expander + { 0, (process_attribute::type>::postcall(call, fn_ret), 0)...}; } }; @@ -681,7 +821,8 @@ using extract_guard_t = typename exactly_one_t, Extr template ::value...), size_t self = constexpr_sum(std::is_same::value...)> -constexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) { +constexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) +{ PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(nargs, has_args, has_kwargs); return named == 0 || (self + named + size_t(has_args) + size_t(has_kwargs)) == nargs; } diff --git a/examples/knxPython/pybind11/include/pybind11/buffer_info.h b/examples/knxPython/pybind11/include/pybind11/buffer_info.h index 75aec0ba..5667d85c 100644 --- a/examples/knxPython/pybind11/include/pybind11/buffer_info.h +++ b/examples/knxPython/pybind11/include/pybind11/buffer_info.h @@ -16,24 +16,33 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) PYBIND11_NAMESPACE_BEGIN(detail) // Default, C-style strides -inline std::vector c_strides(const std::vector &shape, ssize_t itemsize) { +inline std::vector c_strides(const std::vector& shape, ssize_t itemsize) +{ auto ndim = shape.size(); std::vector strides(ndim, itemsize); - if (ndim > 0) { - for (size_t i = ndim - 1; i > 0; --i) { + + if (ndim > 0) + { + for (size_t i = ndim - 1; i > 0; --i) + { strides[i - 1] = strides[i] * shape[i]; } } + return strides; } // F-style strides; default when constructing an array_t with `ExtraFlags & f_style` -inline std::vector f_strides(const std::vector &shape, ssize_t itemsize) { +inline std::vector f_strides(const std::vector& shape, ssize_t itemsize) +{ auto ndim = shape.size(); std::vector strides(ndim, itemsize); - for (size_t i = 1; i < ndim; ++i) { + + for (size_t i = 1; i < ndim; ++i) + { strides[i] = strides[i - 1] * shape[i - 1]; } + return strides; } @@ -43,158 +52,183 @@ struct compare_buffer_info; PYBIND11_NAMESPACE_END(detail) /// Information record describing a Python buffer object -struct buffer_info { - void *ptr = nullptr; // Pointer to the underlying storage - ssize_t itemsize = 0; // Size of individual items in bytes - ssize_t size = 0; // Total number of entries - std::string format; // For homogeneous buffers, this should be set to - // format_descriptor::format() - ssize_t ndim = 0; // Number of dimensions - std::vector shape; // Shape of the tensor (1 entry per dimension) - std::vector strides; // Number of bytes between adjacent entries - // (for each per dimension) - bool readonly = false; // flag to indicate if the underlying storage may be written to - - buffer_info() = default; - - buffer_info(void *ptr, - ssize_t itemsize, - const std::string &format, - ssize_t ndim, - detail::any_container shape_in, - detail::any_container strides_in, - bool readonly = false) - : ptr(ptr), itemsize(itemsize), size(1), format(format), ndim(ndim), - shape(std::move(shape_in)), strides(std::move(strides_in)), readonly(readonly) { - if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size()) { - pybind11_fail("buffer_info: ndim doesn't match shape and/or strides length"); +struct buffer_info +{ + void* ptr = nullptr; // Pointer to the underlying storage + ssize_t itemsize = 0; // Size of individual items in bytes + ssize_t size = 0; // Total number of entries + std::string format; // For homogeneous buffers, this should be set to + // format_descriptor::format() + ssize_t ndim = 0; // Number of dimensions + std::vector shape; // Shape of the tensor (1 entry per dimension) + std::vector strides; // Number of bytes between adjacent entries + // (for each per dimension) + bool readonly = false; // flag to indicate if the underlying storage may be written to + + buffer_info() = default; + + buffer_info(void* ptr, + ssize_t itemsize, + const std::string& format, + ssize_t ndim, + detail::any_container shape_in, + detail::any_container strides_in, + bool readonly = false) + : ptr(ptr), itemsize(itemsize), size(1), format(format), ndim(ndim), + shape(std::move(shape_in)), strides(std::move(strides_in)), readonly(readonly) + { + if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size()) + { + pybind11_fail("buffer_info: ndim doesn't match shape and/or strides length"); + } + + for (size_t i = 0; i < (size_t) ndim; ++i) + { + size *= shape[i]; + } } - for (size_t i = 0; i < (size_t) ndim; ++i) { - size *= shape[i]; + + template buffer_info(T* ptr, + detail::any_container shape_in, + detail::any_container strides_in, + bool readonly = false) + : buffer_info(private_ctr_tag(), + ptr, + sizeof(T), + format_descriptor::format(), + static_cast(shape_in->size()), + std::move(shape_in), + std::move(strides_in), + readonly) {} + + buffer_info(void* ptr, + ssize_t itemsize, + const std::string& format, + ssize_t size, + bool readonly = false) + : buffer_info(ptr, itemsize, format, 1, + { + size + }, {itemsize}, readonly) {} + + template buffer_info(T* ptr, ssize_t size, bool readonly = false) + : buffer_info(ptr, sizeof(T), format_descriptor::format(), size, readonly) {} + + template buffer_info(const T* ptr, ssize_t size, bool readonly = true) + : buffer_info( + const_cast(ptr), sizeof(T), format_descriptor::format(), size, readonly) {} + + explicit buffer_info(Py_buffer* view, bool ownview = true) + : buffer_info( + view->buf, + view->itemsize, + view->format, + view->ndim, + { + view->shape, view->shape + view->ndim + }, + /* Though buffer::request() requests PyBUF_STRIDES, ctypes objects + * ignore this flag and return a view with NULL strides. + * When strides are NULL, build them manually. */ + view->strides + ? std::vector(view->strides, view->strides + view->ndim) + : detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize), + (view->readonly != 0)) + { + // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) + this->m_view = view; + // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) + this->ownview = ownview; } - } - template - buffer_info(T *ptr, - detail::any_container shape_in, - detail::any_container strides_in, - bool readonly = false) - : buffer_info(private_ctr_tag(), - ptr, - sizeof(T), - format_descriptor::format(), - static_cast(shape_in->size()), - std::move(shape_in), - std::move(strides_in), - readonly) {} - - buffer_info(void *ptr, - ssize_t itemsize, - const std::string &format, - ssize_t size, - bool readonly = false) - : buffer_info(ptr, itemsize, format, 1, {size}, {itemsize}, readonly) {} - - template - buffer_info(T *ptr, ssize_t size, bool readonly = false) - : buffer_info(ptr, sizeof(T), format_descriptor::format(), size, readonly) {} - - template - buffer_info(const T *ptr, ssize_t size, bool readonly = true) - : buffer_info( - const_cast(ptr), sizeof(T), format_descriptor::format(), size, readonly) {} - - explicit buffer_info(Py_buffer *view, bool ownview = true) - : buffer_info( - view->buf, - view->itemsize, - view->format, - view->ndim, - {view->shape, view->shape + view->ndim}, - /* Though buffer::request() requests PyBUF_STRIDES, ctypes objects - * ignore this flag and return a view with NULL strides. - * When strides are NULL, build them manually. */ - view->strides - ? std::vector(view->strides, view->strides + view->ndim) - : detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize), - (view->readonly != 0)) { - // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) - this->m_view = view; - // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) - this->ownview = ownview; - } + buffer_info(const buffer_info&) = delete; + buffer_info& operator=(const buffer_info&) = delete; - buffer_info(const buffer_info &) = delete; - buffer_info &operator=(const buffer_info &) = delete; - - buffer_info(buffer_info &&other) noexcept { (*this) = std::move(other); } - - buffer_info &operator=(buffer_info &&rhs) noexcept { - ptr = rhs.ptr; - itemsize = rhs.itemsize; - size = rhs.size; - format = std::move(rhs.format); - ndim = rhs.ndim; - shape = std::move(rhs.shape); - strides = std::move(rhs.strides); - std::swap(m_view, rhs.m_view); - std::swap(ownview, rhs.ownview); - readonly = rhs.readonly; - return *this; - } + buffer_info(buffer_info&& other) noexcept + { + (*this) = std::move(other); + } - ~buffer_info() { - if (m_view && ownview) { - PyBuffer_Release(m_view); - delete m_view; + buffer_info& operator=(buffer_info&& rhs) noexcept + { + ptr = rhs.ptr; + itemsize = rhs.itemsize; + size = rhs.size; + format = std::move(rhs.format); + ndim = rhs.ndim; + shape = std::move(rhs.shape); + strides = std::move(rhs.strides); + std::swap(m_view, rhs.m_view); + std::swap(ownview, rhs.ownview); + readonly = rhs.readonly; + return *this; } - } - Py_buffer *view() const { return m_view; } - Py_buffer *&view() { return m_view; } - - /* True if the buffer item type is equivalent to `T`. */ - // To define "equivalent" by example: - // `buffer_info::item_type_is_equivalent_to(b)` and - // `buffer_info::item_type_is_equivalent_to(b)` may both be true - // on some platforms, but `int` and `unsigned` will never be equivalent. - // For the ground truth, please inspect `detail::compare_buffer_info<>`. - template - bool item_type_is_equivalent_to() const { - return detail::compare_buffer_info::compare(*this); - } + ~buffer_info() + { + if (m_view && ownview) + { + PyBuffer_Release(m_view); + delete m_view; + } + } + + Py_buffer* view() const + { + return m_view; + } + Py_buffer*& view() + { + return m_view; + } + + /* True if the buffer item type is equivalent to `T`. */ + // To define "equivalent" by example: + // `buffer_info::item_type_is_equivalent_to(b)` and + // `buffer_info::item_type_is_equivalent_to(b)` may both be true + // on some platforms, but `int` and `unsigned` will never be equivalent. + // For the ground truth, please inspect `detail::compare_buffer_info<>`. + template + bool item_type_is_equivalent_to() const + { + return detail::compare_buffer_info::compare(*this); + } -private: - struct private_ctr_tag {}; - - buffer_info(private_ctr_tag, - void *ptr, - ssize_t itemsize, - const std::string &format, - ssize_t ndim, - detail::any_container &&shape_in, - detail::any_container &&strides_in, - bool readonly) - : buffer_info( - ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) {} - - Py_buffer *m_view = nullptr; - bool ownview = false; + private: + struct private_ctr_tag {}; + + buffer_info(private_ctr_tag, + void* ptr, + ssize_t itemsize, + const std::string& format, + ssize_t ndim, + detail::any_container&& shape_in, + detail::any_container&& strides_in, + bool readonly) + : buffer_info( + ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) {} + + Py_buffer* m_view = nullptr; + bool ownview = false; }; PYBIND11_NAMESPACE_BEGIN(detail) template -struct compare_buffer_info { - static bool compare(const buffer_info &b) { +struct compare_buffer_info +{ + static bool compare(const buffer_info& b) + { // NOLINTNEXTLINE(bugprone-sizeof-expression) Needed for `PyObject *` return b.format == format_descriptor::format() && b.itemsize == (ssize_t) sizeof(T); } }; template -struct compare_buffer_info::value>> { - static bool compare(const buffer_info &b) { +struct compare_buffer_info::value>> +{ + static bool compare(const buffer_info& b) + { return (size_t) b.itemsize == sizeof(T) && (b.format == format_descriptor::value || ((sizeof(T) == sizeof(long)) diff --git a/examples/knxPython/pybind11/include/pybind11/cast.h b/examples/knxPython/pybind11/include/pybind11/cast.h index 624b8eba..4c9327a2 100644 --- a/examples/knxPython/pybind11/include/pybind11/cast.h +++ b/examples/knxPython/pybind11/include/pybind11/cast.h @@ -41,62 +41,72 @@ using make_caster = type_caster>; // Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T template -typename make_caster::template cast_op_type cast_op(make_caster &caster) { +typename make_caster::template cast_op_type cast_op(make_caster& caster) +{ using result_t = typename make_caster::template cast_op_type; // See PR #4893 return caster.operator result_t(); } template -typename make_caster::template cast_op_type::type> -cast_op(make_caster &&caster) { - using result_t = typename make_caster::template cast_op_type< - typename std::add_rvalue_reference::type>; // See PR #4893 +typename make_caster::template cast_op_type::type> cast_op(make_caster&& caster) +{ + using result_t = typename make_caster::template cast_op_type < + typename std::add_rvalue_reference::type >; // See PR #4893 return std::move(caster).operator result_t(); } template -class type_caster> { -private: - using caster_t = make_caster; - caster_t subcaster; - using reference_t = type &; - using subcaster_cast_op_type = typename caster_t::template cast_op_type; - - static_assert( - std::is_same::type &, subcaster_cast_op_type>::value +class type_caster> +{ + private: + using caster_t = make_caster; + caster_t subcaster; + using reference_t = type &; + using subcaster_cast_op_type = typename caster_t::template cast_op_type; + + static_assert( + std::is_same::type&, subcaster_cast_op_type>::value || std::is_same::value, - "std::reference_wrapper caster requires T to have a caster with an " - "`operator T &()` or `operator const T &()`"); - -public: - bool load(handle src, bool convert) { return subcaster.load(src, convert); } - static constexpr auto name = caster_t::name; - static handle - cast(const std::reference_wrapper &src, return_value_policy policy, handle parent) { - // It is definitely wrong to take ownership of this pointer, so mask that rvp - if (policy == return_value_policy::take_ownership - || policy == return_value_policy::automatic) { - policy = return_value_policy::automatic_reference; - } - return caster_t::cast(&src.get(), policy, parent); - } - template - using cast_op_type = std::reference_wrapper; - explicit operator std::reference_wrapper() { return cast_op(subcaster); } + "std::reference_wrapper caster requires T to have a caster with an " + "`operator T &()` or `operator const T &()`"); + + public: + bool load(handle src, bool convert) + { + return subcaster.load(src, convert); + } + static constexpr auto name = caster_t::name; + static handle cast(const std::reference_wrapper& src, return_value_policy policy, handle parent) + { + // It is definitely wrong to take ownership of this pointer, so mask that rvp + if (policy == return_value_policy::take_ownership + || policy == return_value_policy::automatic) + { + policy = return_value_policy::automatic_reference; + } + + return caster_t::cast(&src.get(), policy, parent); + } + template + using cast_op_type = std::reference_wrapper; + explicit operator std::reference_wrapper() + { + return cast_op(subcaster); + } }; #define PYBIND11_TYPE_CASTER(type, py_name) \ -protected: \ + protected: \ type value; \ - \ -public: \ + \ + public: \ static constexpr auto name = py_name; \ template >::value, \ - int> \ + std::is_same>::value, \ + int> \ = 0> \ static ::pybind11::handle cast( \ - T_ *src, ::pybind11::return_value_policy policy, ::pybind11::handle parent) { \ + T_ *src, ::pybind11::return_value_policy policy, ::pybind11::handle parent) { \ if (!src) \ return ::pybind11::none().release(); \ if (policy == ::pybind11::return_value_policy::take_ownership) { \ @@ -113,625 +123,803 @@ public: using cast_op_type = ::pybind11::detail::movable_cast_op_type template -using is_std_char_type = any_of, /* std::string */ +using is_std_char_type = any_of < std::is_same, /* std::string */ #if defined(PYBIND11_HAS_U8STRING) - std::is_same, /* std::u8string */ + std::is_same, /* std::u8string */ #endif - std::is_same, /* std::u16string */ - std::is_same, /* std::u32string */ - std::is_same /* std::wstring */ - >; + std::is_same, /* std::u16string */ + std::is_same, /* std::u32string */ + std::is_same /* std::wstring */ + >; template -struct type_caster::value && !is_std_char_type::value>> { - using _py_type_0 = conditional_t; - using _py_type_1 = conditional_t::value, - _py_type_0, - typename std::make_unsigned<_py_type_0>::type>; - using py_type = conditional_t::value, double, _py_type_1>; - -public: - bool load(handle src, bool convert) { - py_type py_value; - - if (!src) { - return false; - } +struct type_caster < T, enable_if_t < std::is_arithmetic::value&& !is_std_char_type::value >> +{ + using _py_type_0 = conditional_t < sizeof(T) <= sizeof(long), long, long long >; + using _py_type_1 = conditional_t::value, + _py_type_0, + typename std::make_unsigned<_py_type_0>::type>; + using py_type = conditional_t::value, double, _py_type_1>; + + public: + bool load(handle src, bool convert) + { + py_type py_value; + + if (!src) + { + return false; + } #if !defined(PYPY_VERSION) - auto index_check = [](PyObject *o) { return PyIndex_Check(o); }; + auto index_check = [](PyObject * o) + { + return PyIndex_Check(o); + }; #else - // In PyPy 7.3.3, `PyIndex_Check` is implemented by calling `__index__`, - // while CPython only considers the existence of `nb_index`/`__index__`. - auto index_check = [](PyObject *o) { return hasattr(o, "__index__"); }; + // In PyPy 7.3.3, `PyIndex_Check` is implemented by calling `__index__`, + // while CPython only considers the existence of `nb_index`/`__index__`. + auto index_check = [](PyObject * o) + { + return hasattr(o, "__index__"); + }; #endif - if (std::is_floating_point::value) { - if (convert || PyFloat_Check(src.ptr())) { - py_value = (py_type) PyFloat_AsDouble(src.ptr()); - } else { + if (std::is_floating_point::value) + { + if (convert || PyFloat_Check(src.ptr())) + { + py_value = (py_type) PyFloat_AsDouble(src.ptr()); + } + else + { + return false; + } + } + else if (PyFloat_Check(src.ptr()) + || (!convert && !PYBIND11_LONG_CHECK(src.ptr()) && !index_check(src.ptr()))) + { return false; } - } else if (PyFloat_Check(src.ptr()) - || (!convert && !PYBIND11_LONG_CHECK(src.ptr()) && !index_check(src.ptr()))) { - return false; - } else { - handle src_or_index = src; - // PyPy: 7.3.7's 3.8 does not implement PyLong_*'s __index__ calls. + else + { + handle src_or_index = src; + // PyPy: 7.3.7's 3.8 does not implement PyLong_*'s __index__ calls. #if PY_VERSION_HEX < 0x03080000 || defined(PYPY_VERSION) - object index; - if (!PYBIND11_LONG_CHECK(src.ptr())) { // So: index_check(src.ptr()) - index = reinterpret_steal(PyNumber_Index(src.ptr())); - if (!index) { - PyErr_Clear(); - if (!convert) - return false; - } else { - src_or_index = index; + object index; + + if (!PYBIND11_LONG_CHECK(src.ptr())) // So: index_check(src.ptr()) + { + index = reinterpret_steal(PyNumber_Index(src.ptr())); + + if (!index) + { + PyErr_Clear(); + + if (!convert) + return false; + } + else + { + src_or_index = index; + } } - } + #endif - if (std::is_unsigned::value) { - py_value = as_unsigned(src_or_index.ptr()); - } else { // signed integer: - py_value = sizeof(T) <= sizeof(long) + + if (std::is_unsigned::value) + { + py_value = as_unsigned(src_or_index.ptr()); + } + else // signed integer: + { + py_value = sizeof(T) <= sizeof(long) ? (py_type) PyLong_AsLong(src_or_index.ptr()) : (py_type) PYBIND11_LONG_AS_LONGLONG(src_or_index.ptr()); + } } - } - // Python API reported an error - bool py_err = py_value == (py_type) -1 && PyErr_Occurred(); + // Python API reported an error + bool py_err = py_value == (py_type) - 1 && PyErr_Occurred(); - // Check to see if the conversion is valid (integers should match exactly) - // Signed/unsigned checks happen elsewhere - if (py_err - || (std::is_integral::value && sizeof(py_type) != sizeof(T) - && py_value != (py_type) (T) py_value)) { - PyErr_Clear(); - if (py_err && convert && (PyNumber_Check(src.ptr()) != 0)) { - auto tmp = reinterpret_steal(std::is_floating_point::value + // Check to see if the conversion is valid (integers should match exactly) + // Signed/unsigned checks happen elsewhere + if (py_err + || (std::is_integral::value && sizeof(py_type) != sizeof(T) + && py_value != (py_type) (T) py_value)) + { + PyErr_Clear(); + + if (py_err && convert && (PyNumber_Check(src.ptr()) != 0)) + { + auto tmp = reinterpret_steal(std::is_floating_point::value ? PyNumber_Float(src.ptr()) : PyNumber_Long(src.ptr())); - PyErr_Clear(); - return load(tmp, false); + PyErr_Clear(); + return load(tmp, false); + } + + return false; } - return false; - } - value = (T) py_value; - return true; - } + value = (T) py_value; + return true; + } - template - static typename std::enable_if::value, handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PyFloat_FromDouble((double) src); - } + template + static typename std::enable_if::value, handle>::type cast(U src, return_value_policy /* policy */, handle /* parent */) + { + return PyFloat_FromDouble((double) src); + } - template - static typename std::enable_if::value && std::is_signed::value - && (sizeof(U) <= sizeof(long)), - handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PYBIND11_LONG_FROM_SIGNED((long) src); - } + template + static typename std::enable_if < !std::is_floating_point::value && std::is_signed::value + && (sizeof(U) <= sizeof(long)), + handle >::type + cast(U src, return_value_policy /* policy */, handle /* parent */) + { + return PYBIND11_LONG_FROM_SIGNED((long) src); + } - template - static typename std::enable_if::value && std::is_unsigned::value - && (sizeof(U) <= sizeof(unsigned long)), - handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PYBIND11_LONG_FROM_UNSIGNED((unsigned long) src); - } + template + static typename std::enable_if < !std::is_floating_point::value && std::is_unsigned::value + && (sizeof(U) <= sizeof(unsigned long)), + handle >::type + cast(U src, return_value_policy /* policy */, handle /* parent */) + { + return PYBIND11_LONG_FROM_UNSIGNED((unsigned long) src); + } - template - static typename std::enable_if::value && std::is_signed::value - && (sizeof(U) > sizeof(long)), - handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PyLong_FromLongLong((long long) src); - } + template + static typename std::enable_if < !std::is_floating_point::value && std::is_signed::value + && (sizeof(U) > sizeof(long)), + handle >::type + cast(U src, return_value_policy /* policy */, handle /* parent */) + { + return PyLong_FromLongLong((long long) src); + } - template - static typename std::enable_if::value && std::is_unsigned::value - && (sizeof(U) > sizeof(unsigned long)), - handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PyLong_FromUnsignedLongLong((unsigned long long) src); - } + template + static typename std::enable_if < !std::is_floating_point::value && std::is_unsigned::value + && (sizeof(U) > sizeof(unsigned long)), + handle >::type + cast(U src, return_value_policy /* policy */, handle /* parent */) + { + return PyLong_FromUnsignedLongLong((unsigned long long) src); + } - PYBIND11_TYPE_CASTER(T, const_name::value>("int", "float")); + PYBIND11_TYPE_CASTER(T, const_name::value>("int", "float")); }; template -struct void_caster { -public: - bool load(handle src, bool) { - if (src && src.is_none()) { - return true; +struct void_caster +{ + public: + bool load(handle src, bool) + { + if (src && src.is_none()) + { + return true; + } + + return false; } - return false; - } - static handle cast(T, return_value_policy /* policy */, handle /* parent */) { - return none().release(); - } - PYBIND11_TYPE_CASTER(T, const_name("None")); + static handle cast(T, return_value_policy /* policy */, handle /* parent */) + { + return none().release(); + } + PYBIND11_TYPE_CASTER(T, const_name("None")); }; template <> class type_caster : public void_caster {}; template <> -class type_caster : public type_caster { -public: - using type_caster::cast; +class type_caster : public type_caster +{ + public: + using type_caster::cast; + + bool load(handle h, bool) + { + if (!h) + { + return false; + } - bool load(handle h, bool) { - if (!h) { - return false; - } - if (h.is_none()) { - value = nullptr; - return true; - } + if (h.is_none()) + { + value = nullptr; + return true; + } - /* Check if this is a capsule */ - if (isinstance(h)) { - value = reinterpret_borrow(h); - return true; - } + /* Check if this is a capsule */ + if (isinstance(h)) + { + value = reinterpret_borrow(h); + return true; + } - /* Check if this is a C++ type */ - const auto &bases = all_type_info((PyTypeObject *) type::handle_of(h).ptr()); - if (bases.size() == 1) { // Only allowing loading from a single-value type - value = values_and_holders(reinterpret_cast(h.ptr())).begin()->value_ptr(); - return true; + /* Check if this is a C++ type */ + const auto& bases = all_type_info((PyTypeObject*) type::handle_of(h).ptr()); + + if (bases.size() == 1) // Only allowing loading from a single-value type + { + value = values_and_holders(reinterpret_cast(h.ptr())).begin()->value_ptr(); + return true; + } + + /* Fail */ + return false; } - /* Fail */ - return false; - } + static handle cast(const void* ptr, return_value_policy /* policy */, handle /* parent */) + { + if (ptr) + { + return capsule(ptr).release(); + } - static handle cast(const void *ptr, return_value_policy /* policy */, handle /* parent */) { - if (ptr) { - return capsule(ptr).release(); + return none().release(); } - return none().release(); - } - template - using cast_op_type = void *&; - explicit operator void *&() { return value; } - static constexpr auto name = const_name("capsule"); + template + using cast_op_type = void* &; + explicit operator void*& () + { + return value; + } + static constexpr auto name = const_name("capsule"); -private: - void *value = nullptr; + private: + void* value = nullptr; }; template <> class type_caster : public void_caster {}; template <> -class type_caster { -public: - bool load(handle src, bool convert) { - if (!src) { - return false; - } - if (src.ptr() == Py_True) { - value = true; - return true; - } - if (src.ptr() == Py_False) { - value = false; - return true; - } - if (convert || is_numpy_bool(src)) { - // (allow non-implicit conversion for numpy booleans), use strncmp - // since NumPy 1.x had an additional trailing underscore. +class type_caster +{ + public: + bool load(handle src, bool convert) + { + if (!src) + { + return false; + } - Py_ssize_t res = -1; - if (src.is_none()) { - res = 0; // None is implicitly converted to False + if (src.ptr() == Py_True) + { + value = true; + return true; } -#if defined(PYPY_VERSION) - // On PyPy, check that "__bool__" attr exists - else if (hasattr(src, PYBIND11_BOOL_ATTR)) { - res = PyObject_IsTrue(src.ptr()); + + if (src.ptr() == Py_False) + { + value = false; + return true; } + + if (convert || is_numpy_bool(src)) + { + // (allow non-implicit conversion for numpy booleans), use strncmp + // since NumPy 1.x had an additional trailing underscore. + + Py_ssize_t res = -1; + + if (src.is_none()) + { + res = 0; // None is implicitly converted to False + } + +#if defined(PYPY_VERSION) + // On PyPy, check that "__bool__" attr exists + else if (hasattr(src, PYBIND11_BOOL_ATTR)) + { + res = PyObject_IsTrue(src.ptr()); + } + #else - // Alternate approach for CPython: this does the same as the above, but optimized - // using the CPython API so as to avoid an unneeded attribute lookup. - else if (auto *tp_as_number = src.ptr()->ob_type->tp_as_number) { - if (PYBIND11_NB_BOOL(tp_as_number)) { - res = (*PYBIND11_NB_BOOL(tp_as_number))(src.ptr()); + // Alternate approach for CPython: this does the same as the above, but optimized + // using the CPython API so as to avoid an unneeded attribute lookup. + else if (auto* tp_as_number = src.ptr()->ob_type->tp_as_number) + { + if (PYBIND11_NB_BOOL(tp_as_number)) + { + res = (*PYBIND11_NB_BOOL(tp_as_number))(src.ptr()); + } } - } + #endif - if (res == 0 || res == 1) { - value = (res != 0); - return true; + + if (res == 0 || res == 1) + { + value = (res != 0); + return true; + } + + PyErr_Clear(); } - PyErr_Clear(); + + return false; + } + static handle cast(bool src, return_value_policy /* policy */, handle /* parent */) + { + return handle(src ? Py_True : Py_False).inc_ref(); + } + PYBIND11_TYPE_CASTER(bool, const_name("bool")); + + private: + // Test if an object is a NumPy boolean (without fetching the type). + static inline bool is_numpy_bool(handle object) + { + const char* type_name = Py_TYPE(object.ptr())->tp_name; + // Name changed to `numpy.bool` in NumPy 2, `numpy.bool_` is needed for 1.x support + return std::strcmp("numpy.bool", type_name) == 0 + || std::strcmp("numpy.bool_", type_name) == 0; } - return false; - } - static handle cast(bool src, return_value_policy /* policy */, handle /* parent */) { - return handle(src ? Py_True : Py_False).inc_ref(); - } - PYBIND11_TYPE_CASTER(bool, const_name("bool")); - -private: - // Test if an object is a NumPy boolean (without fetching the type). - static inline bool is_numpy_bool(handle object) { - const char *type_name = Py_TYPE(object.ptr())->tp_name; - // Name changed to `numpy.bool` in NumPy 2, `numpy.bool_` is needed for 1.x support - return std::strcmp("numpy.bool", type_name) == 0 - || std::strcmp("numpy.bool_", type_name) == 0; - } }; // Helper class for UTF-{8,16,32} C++ stl strings: template -struct string_caster { - using CharT = typename StringType::value_type; - - // Simplify life by being able to assume standard char sizes (the standard only guarantees - // minimums, but Python requires exact sizes) - static_assert(!std::is_same::value || sizeof(CharT) == 1, - "Unsupported char size != 1"); +struct string_caster +{ + using CharT = typename StringType::value_type; + + // Simplify life by being able to assume standard char sizes (the standard only guarantees + // minimums, but Python requires exact sizes) + static_assert(!std::is_same::value || sizeof(CharT) == 1, + "Unsupported char size != 1"); #if defined(PYBIND11_HAS_U8STRING) - static_assert(!std::is_same::value || sizeof(CharT) == 1, - "Unsupported char8_t size != 1"); + static_assert(!std::is_same::value || sizeof(CharT) == 1, + "Unsupported char8_t size != 1"); #endif - static_assert(!std::is_same::value || sizeof(CharT) == 2, - "Unsupported char16_t size != 2"); - static_assert(!std::is_same::value || sizeof(CharT) == 4, - "Unsupported char32_t size != 4"); - // wchar_t can be either 16 bits (Windows) or 32 (everywhere else) - static_assert(!std::is_same::value || sizeof(CharT) == 2 || sizeof(CharT) == 4, - "Unsupported wchar_t size != 2/4"); - static constexpr size_t UTF_N = 8 * sizeof(CharT); - - bool load(handle src, bool) { - handle load_src = src; - if (!src) { - return false; - } - if (!PyUnicode_Check(load_src.ptr())) { - return load_raw(load_src); - } + static_assert(!std::is_same::value || sizeof(CharT) == 2, + "Unsupported char16_t size != 2"); + static_assert(!std::is_same::value || sizeof(CharT) == 4, + "Unsupported char32_t size != 4"); + // wchar_t can be either 16 bits (Windows) or 32 (everywhere else) + static_assert(!std::is_same::value || sizeof(CharT) == 2 || sizeof(CharT) == 4, + "Unsupported wchar_t size != 2/4"); + static constexpr size_t UTF_N = 8 * sizeof(CharT); + + bool load(handle src, bool) + { + handle load_src = src; + + if (!src) + { + return false; + } + + if (!PyUnicode_Check(load_src.ptr())) + { + return load_raw(load_src); + } + + // For UTF-8 we avoid the need for a temporary `bytes` object by using + // `PyUnicode_AsUTF8AndSize`. + if (UTF_N == 8) + { + Py_ssize_t size = -1; + const auto* buffer + = reinterpret_cast(PyUnicode_AsUTF8AndSize(load_src.ptr(), &size)); + + if (!buffer) + { + PyErr_Clear(); + return false; + } - // For UTF-8 we avoid the need for a temporary `bytes` object by using - // `PyUnicode_AsUTF8AndSize`. - if (UTF_N == 8) { - Py_ssize_t size = -1; - const auto *buffer - = reinterpret_cast(PyUnicode_AsUTF8AndSize(load_src.ptr(), &size)); - if (!buffer) { + value = StringType(buffer, static_cast(size)); + return true; + } + + auto utfNbytes + = reinterpret_steal(PyUnicode_AsEncodedString(load_src.ptr(), + UTF_N == 8 ? "utf-8" + : UTF_N == 16 ? "utf-16" + : "utf-32", + nullptr)); + + if (!utfNbytes) + { PyErr_Clear(); return false; } - value = StringType(buffer, static_cast(size)); - return true; - } - auto utfNbytes - = reinterpret_steal(PyUnicode_AsEncodedString(load_src.ptr(), - UTF_N == 8 ? "utf-8" - : UTF_N == 16 ? "utf-16" - : "utf-32", - nullptr)); - if (!utfNbytes) { - PyErr_Clear(); - return false; - } + const auto* buffer + = reinterpret_cast(PYBIND11_BYTES_AS_STRING(utfNbytes.ptr())); + size_t length = (size_t) PYBIND11_BYTES_SIZE(utfNbytes.ptr()) / sizeof(CharT); - const auto *buffer - = reinterpret_cast(PYBIND11_BYTES_AS_STRING(utfNbytes.ptr())); - size_t length = (size_t) PYBIND11_BYTES_SIZE(utfNbytes.ptr()) / sizeof(CharT); - // Skip BOM for UTF-16/32 - if (UTF_N > 8) { - buffer++; - length--; - } - value = StringType(buffer, length); + // Skip BOM for UTF-16/32 + if (UTF_N > 8) + { + buffer++; + length--; + } + + value = StringType(buffer, length); + + // If we're loading a string_view we need to keep the encoded Python object alive: + if (IsView) + { + loader_life_support::add_patient(utfNbytes); + } - // If we're loading a string_view we need to keep the encoded Python object alive: - if (IsView) { - loader_life_support::add_patient(utfNbytes); + return true; } - return true; - } + static handle cast(const StringType& src, return_value_policy /* policy */, handle /* parent */) + { + const char* buffer = reinterpret_cast(src.data()); + auto nbytes = ssize_t(src.size() * sizeof(CharT)); + handle s = decode_utfN(buffer, nbytes); + + if (!s) + { + throw error_already_set(); + } - static handle - cast(const StringType &src, return_value_policy /* policy */, handle /* parent */) { - const char *buffer = reinterpret_cast(src.data()); - auto nbytes = ssize_t(src.size() * sizeof(CharT)); - handle s = decode_utfN(buffer, nbytes); - if (!s) { - throw error_already_set(); + return s; } - return s; - } - PYBIND11_TYPE_CASTER(StringType, const_name(PYBIND11_STRING_NAME)); + PYBIND11_TYPE_CASTER(StringType, const_name(PYBIND11_STRING_NAME)); -private: - static handle decode_utfN(const char *buffer, ssize_t nbytes) { + private: + static handle decode_utfN(const char* buffer, ssize_t nbytes) + { #if !defined(PYPY_VERSION) - return UTF_N == 8 ? PyUnicode_DecodeUTF8(buffer, nbytes, nullptr) - : UTF_N == 16 ? PyUnicode_DecodeUTF16(buffer, nbytes, nullptr, nullptr) - : PyUnicode_DecodeUTF32(buffer, nbytes, nullptr, nullptr); + return UTF_N == 8 ? PyUnicode_DecodeUTF8(buffer, nbytes, nullptr) + : UTF_N == 16 ? PyUnicode_DecodeUTF16(buffer, nbytes, nullptr, nullptr) + : PyUnicode_DecodeUTF32(buffer, nbytes, nullptr, nullptr); #else - // PyPy segfaults when on PyUnicode_DecodeUTF16 (and possibly on PyUnicode_DecodeUTF32 as - // well), so bypass the whole thing by just passing the encoding as a string value, which - // works properly: - return PyUnicode_Decode(buffer, - nbytes, - UTF_N == 8 ? "utf-8" - : UTF_N == 16 ? "utf-16" - : "utf-32", - nullptr); + // PyPy segfaults when on PyUnicode_DecodeUTF16 (and possibly on PyUnicode_DecodeUTF32 as + // well), so bypass the whole thing by just passing the encoding as a string value, which + // works properly: + return PyUnicode_Decode(buffer, + nbytes, + UTF_N == 8 ? "utf-8" + : UTF_N == 16 ? "utf-16" + : "utf-32", + nullptr); #endif - } + } + + // When loading into a std::string or char*, accept a bytes/bytearray object as-is (i.e. + // without any encoding/decoding attempt). For other C++ char sizes this is a no-op. + // which supports loading a unicode from a str, doesn't take this path. + template + bool load_raw(enable_if_t::value, handle> src) + { + if (PYBIND11_BYTES_CHECK(src.ptr())) + { + // We were passed raw bytes; accept it into a std::string or char* + // without any encoding attempt. + const char* bytes = PYBIND11_BYTES_AS_STRING(src.ptr()); + + if (!bytes) + { + pybind11_fail("Unexpected PYBIND11_BYTES_AS_STRING() failure."); + } - // When loading into a std::string or char*, accept a bytes/bytearray object as-is (i.e. - // without any encoding/decoding attempt). For other C++ char sizes this is a no-op. - // which supports loading a unicode from a str, doesn't take this path. - template - bool load_raw(enable_if_t::value, handle> src) { - if (PYBIND11_BYTES_CHECK(src.ptr())) { - // We were passed raw bytes; accept it into a std::string or char* - // without any encoding attempt. - const char *bytes = PYBIND11_BYTES_AS_STRING(src.ptr()); - if (!bytes) { - pybind11_fail("Unexpected PYBIND11_BYTES_AS_STRING() failure."); + value = StringType(bytes, (size_t) PYBIND11_BYTES_SIZE(src.ptr())); + return true; } - value = StringType(bytes, (size_t) PYBIND11_BYTES_SIZE(src.ptr())); - return true; - } - if (PyByteArray_Check(src.ptr())) { - // We were passed a bytearray; accept it into a std::string or char* - // without any encoding attempt. - const char *bytearray = PyByteArray_AsString(src.ptr()); - if (!bytearray) { - pybind11_fail("Unexpected PyByteArray_AsString() failure."); + + if (PyByteArray_Check(src.ptr())) + { + // We were passed a bytearray; accept it into a std::string or char* + // without any encoding attempt. + const char* bytearray = PyByteArray_AsString(src.ptr()); + + if (!bytearray) + { + pybind11_fail("Unexpected PyByteArray_AsString() failure."); + } + + value = StringType(bytearray, (size_t) PyByteArray_Size(src.ptr())); + return true; } - value = StringType(bytearray, (size_t) PyByteArray_Size(src.ptr())); - return true; - } - return false; - } + return false; + } - template - bool load_raw(enable_if_t::value, handle>) { - return false; - } + template + bool load_raw(enable_if_t < !std::is_same::value, handle > ) + { + return false; + } }; template struct type_caster, - enable_if_t::value>> - : string_caster> {}; + enable_if_t::value>> + : string_caster> {}; #ifdef PYBIND11_HAS_STRING_VIEW template struct type_caster, - enable_if_t::value>> - : string_caster, true> {}; + enable_if_t::value>> + : string_caster, true> {}; #endif // Type caster for C-style strings. We basically use a std::string type caster, but also add the // ability to use None as a nullptr char* (which the string caster doesn't allow). template -struct type_caster::value>> { - using StringType = std::basic_string; - using StringCaster = make_caster; - StringCaster str_caster; - bool none = false; - CharT one_char = 0; - -public: - bool load(handle src, bool convert) { - if (!src) { - return false; - } - if (src.is_none()) { - // Defer accepting None to other overloads (if we aren't in convert mode): - if (!convert) { +struct type_caster::value>> +{ + using StringType = std::basic_string; + using StringCaster = make_caster; + StringCaster str_caster; + bool none = false; + CharT one_char = 0; + + public: + bool load(handle src, bool convert) + { + if (!src) + { return false; } - none = true; - return true; - } - return str_caster.load(src, convert); - } - static handle cast(const CharT *src, return_value_policy policy, handle parent) { - if (src == nullptr) { - return pybind11::none().release(); - } - return StringCaster::cast(StringType(src), policy, parent); - } + if (src.is_none()) + { + // Defer accepting None to other overloads (if we aren't in convert mode): + if (!convert) + { + return false; + } - static handle cast(CharT src, return_value_policy policy, handle parent) { - if (std::is_same::value) { - handle s = PyUnicode_DecodeLatin1((const char *) &src, 1, nullptr); - if (!s) { - throw error_already_set(); + none = true; + return true; } - return s; + + return str_caster.load(src, convert); } - return StringCaster::cast(StringType(1, src), policy, parent); - } - explicit operator CharT *() { - return none ? nullptr : const_cast(static_cast(str_caster).c_str()); - } - explicit operator CharT &() { - if (none) { - throw value_error("Cannot convert None to a character"); - } - - auto &value = static_cast(str_caster); - size_t str_len = value.size(); - if (str_len == 0) { - throw value_error("Cannot convert empty string to a character"); - } - - // If we're in UTF-8 mode, we have two possible failures: one for a unicode character that - // is too high, and one for multiple unicode characters (caught later), so we need to - // figure out how long the first encoded character is in bytes to distinguish between these - // two errors. We also allow want to allow unicode characters U+0080 through U+00FF, as - // those can fit into a single char value. - if (StringCaster::UTF_N == 8 && str_len > 1 && str_len <= 4) { - auto v0 = static_cast(value[0]); - // low bits only: 0-127 - // 0b110xxxxx - start of 2-byte sequence - // 0b1110xxxx - start of 3-byte sequence - // 0b11110xxx - start of 4-byte sequence - size_t char0_bytes = (v0 & 0x80) == 0 ? 1 - : (v0 & 0xE0) == 0xC0 ? 2 - : (v0 & 0xF0) == 0xE0 ? 3 - : 4; - - if (char0_bytes == str_len) { - // If we have a 128-255 value, we can decode it into a single char: - if (char0_bytes == 2 && (v0 & 0xFC) == 0xC0) { // 0x110000xx 0x10xxxxxx - one_char = static_cast(((v0 & 3) << 6) - + (static_cast(value[1]) & 0x3F)); - return one_char; - } - // Otherwise we have a single character, but it's > U+00FF - throw value_error("Character code point not in range(0x100)"); + static handle cast(const CharT* src, return_value_policy policy, handle parent) + { + if (src == nullptr) + { + return pybind11::none().release(); } + + return StringCaster::cast(StringType(src), policy, parent); } - // UTF-16 is much easier: we can only have a surrogate pair for values above U+FFFF, thus a - // surrogate pair with total length 2 instantly indicates a range error (but not a "your - // string was too long" error). - else if (StringCaster::UTF_N == 16 && str_len == 2) { - one_char = static_cast(value[0]); - if (one_char >= 0xD800 && one_char < 0xE000) { - throw value_error("Character code point not in range(0x10000)"); + static handle cast(CharT src, return_value_policy policy, handle parent) + { + if (std::is_same::value) + { + handle s = PyUnicode_DecodeLatin1((const char*) &src, 1, nullptr); + + if (!s) + { + throw error_already_set(); + } + + return s; } + + return StringCaster::cast(StringType(1, src), policy, parent); } - if (str_len != 1) { - throw value_error("Expected a character, but multi-character string found"); + explicit operator CharT* () + { + return none ? nullptr : const_cast(static_cast(str_caster).c_str()); } + explicit operator CharT& () + { + if (none) + { + throw value_error("Cannot convert None to a character"); + } - one_char = value[0]; - return one_char; - } + auto& value = static_cast(str_caster); + size_t str_len = value.size(); - static constexpr auto name = const_name(PYBIND11_STRING_NAME); - template - using cast_op_type = pybind11::detail::cast_op_type<_T>; + if (str_len == 0) + { + throw value_error("Cannot convert empty string to a character"); + } + + // If we're in UTF-8 mode, we have two possible failures: one for a unicode character that + // is too high, and one for multiple unicode characters (caught later), so we need to + // figure out how long the first encoded character is in bytes to distinguish between these + // two errors. We also allow want to allow unicode characters U+0080 through U+00FF, as + // those can fit into a single char value. + if (StringCaster::UTF_N == 8 && str_len > 1 && str_len <= 4) + { + auto v0 = static_cast(value[0]); + // low bits only: 0-127 + // 0b110xxxxx - start of 2-byte sequence + // 0b1110xxxx - start of 3-byte sequence + // 0b11110xxx - start of 4-byte sequence + size_t char0_bytes = (v0 & 0x80) == 0 ? 1 + : (v0 & 0xE0) == 0xC0 ? 2 + : (v0 & 0xF0) == 0xE0 ? 3 + : 4; + + if (char0_bytes == str_len) + { + // If we have a 128-255 value, we can decode it into a single char: + if (char0_bytes == 2 && (v0 & 0xFC) == 0xC0) // 0x110000xx 0x10xxxxxx + { + one_char = static_cast(((v0 & 3) << 6) + + (static_cast(value[1]) & 0x3F)); + return one_char; + } + + // Otherwise we have a single character, but it's > U+00FF + throw value_error("Character code point not in range(0x100)"); + } + } + + // UTF-16 is much easier: we can only have a surrogate pair for values above U+FFFF, thus a + // surrogate pair with total length 2 instantly indicates a range error (but not a "your + // string was too long" error). + else if (StringCaster::UTF_N == 16 && str_len == 2) + { + one_char = static_cast(value[0]); + + if (one_char >= 0xD800 && one_char < 0xE000) + { + throw value_error("Character code point not in range(0x10000)"); + } + } + + if (str_len != 1) + { + throw value_error("Expected a character, but multi-character string found"); + } + + one_char = value[0]; + return one_char; + } + + static constexpr auto name = const_name(PYBIND11_STRING_NAME); + template + using cast_op_type = pybind11::detail::cast_op_type<_T>; }; // Base implementation for std::tuple and std::pair template