diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e1bd371a..2e5c7659 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,6 +13,9 @@ build: # nodejs: "20" # rust: "1.70" # golang: "1.20" + apt_packages: + - graphviz + - openjdk-11-jre # Build documentation in the "docs/" directory with Sphinx sphinx: diff --git a/CMakeLists.txt b/CMakeLists.txt index 52bb6ff8..af5b0ec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,8 @@ +cmake_policy(SET CMP0048 NEW) +cmake_minimum_required(VERSION 3.16) +project(knx VERSION 1.5) + + add_subdirectory(examples/knx-linux) add_subdirectory(examples/knx-linux-coupler) -add_subdirectory(examples/knxPython) \ No newline at end of file +add_subdirectory(examples/knxPython) diff --git a/README.md b/README.md index 8f84371a..3d6b0f5e 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,10 @@ # knx -This is a fork of the thelsing/knx stack from Thomas Kunze for and by the OpenKNX Team. - -While we did not remove support for any plattform, the testing focus is on RP2040 (main), ESP32 (experimental) and SAMD21(deprecated). - This projects provides a knx-device stack for arduino (ESP8266, ESP32, SAMD21, RP2040, STM32), CC1310 and linux. (more are quite easy to add) It implements most of System-B specification and can be configured with ETS. The necessary knxprod-files can be generated with the [Kaenx-Creator](https://github.com/OpenKNX/Kaenx-Creator) tool. +Generated documentation can be found [here](https://knx.readthedocs.io/en/latest/). ## Usage See the examples for basic usage options - - -## Changelog - -### V2.1.0 - 2024-07-03 -- complete rework of the TPUart DataLinkLayer with support interrupt-based handling and optimized queue handling -- added DMA support for RP2040 platform -- fix some issues with continous integration causing github actions to fail -- added rp2040 plattform to knx-demo example -- added bool GroupObject::valueCompare method for only sending the value when it has changed - -### V2.0.0 - 2024-02-13 -- first OpenKNX version \ No newline at end of file diff --git a/doc/Doxyfile b/doc/Doxyfile index 6bdb864f..5e4fc410 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -2072,7 +2072,7 @@ PERLMOD_MAKEVAR_PREFIX = # C-preprocessor directives found in the sources and include files. # The default value is: YES. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = NO # If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names # in the source code. If set to NO, only conditional compilation will be diff --git a/doc/conf.py b/doc/conf.py index fc7f2e77..b49555f1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,7 +26,7 @@ read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' if read_the_docs_build: - subprocess.call('wget -O plantuml.jar https://github.com/plantuml/plantuml/releases/download/v1.2023.10/plantuml-1.2023.10.jar', shell=True) + subprocess.call('wget -O plantuml.jar https://github.com/plantuml/plantuml/releases/download/v1.2024.6/plantuml.jar', shell=True) subprocess.call('doxygen', shell=True) subprocess.call('mv ./doxyoutput/html/index.html ./doxyoutput/html/index_doxygen.html', shell=True) @@ -475,4 +475,4 @@ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +# intersphinx_mapping = {'https://docs.python.org/': None} 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/doc/requirements.txt b/doc/requirements.txt index 71289f8b..7799087f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,4 @@ exhale breathe -sphinx>=2.1.2 \ No newline at end of file +sphinx>=2.1.2 +sphinx-rtd-theme 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-demo/platformio-ci.ini b/examples/knx-demo/platformio-ci.ini index 0ea27786..b426eb0f 100644 --- a/examples/knx-demo/platformio-ci.ini +++ b/examples/knx-demo/platformio-ci.ini @@ -83,8 +83,8 @@ build_flags = ;--- RP2040 ----------------------------------------------- [env:rp2040] framework = arduino -platform = https://github.com/maxgerhardt/platform-raspberrypi.git#182d833 -platform_packages = framework-arduinopico @ https://github.com/earlephilhower/arduino-pico/releases/download/3.6.2/rp2040-3.6.2.zip +platform = https://github.com/maxgerhardt/platform-raspberrypi.git#60d6ae8 +platform_packages = framework-arduinopico @ https://github.com/earlephilhower/arduino-pico/releases/download/3.9.3/rp2040-3.9.3.zip board = rpipico board_build.core = earlephilhower diff --git a/examples/knx-demo/platformio.ini b/examples/knx-demo/platformio.ini index 0db86f5f..0de299bc 100644 --- a/examples/knx-demo/platformio.ini +++ b/examples/knx-demo/platformio.ini @@ -151,8 +151,8 @@ extra_scripts = ../scripts/stm32rdu.py ;--- RP2040 ----------------------------------------------- [env:rp2040] framework = arduino -platform = https://github.com/maxgerhardt/platform-raspberrypi.git#182d833 -platform_packages = framework-arduinopico @ https://github.com/earlephilhower/arduino-pico/releases/download/3.6.2/rp2040-3.6.2.zip +platform = https://github.com/maxgerhardt/platform-raspberrypi.git#60d6ae8 +platform_packages = framework-arduinopico @ https://github.com/earlephilhower/arduino-pico/releases/download/3.9.3/rp2040-3.9.3.zip board = rpipico board_build.core = earlephilhower ; We consider that the this projects is opened within its project directory diff --git a/examples/knx-linux-coupler/CMakeLists.txt b/examples/knx-linux-coupler/CMakeLists.txt index 7e36926f..0ebeb65e 100644 --- a/examples/knx-linux-coupler/CMakeLists.txt +++ b/examples/knx-linux-coupler/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.7) -project(knx-linux-coupler) +cmake_minimum_required(VERSION 3.16) +project(knx-linux-coupler VERSION 1.5) set(LIBRARIES_FROM_REFERENCES "") set(SOURCES @@ -125,6 +125,36 @@ set(SOURCES ../../src/knx/transport_layer.h ../../src/knx/usb_tunnel_interface.cpp ../../src/knx/usb_tunnel_interface.h + ../../src/knx/knx_ip_tunnel_connection.cpp + ../../src/knx/knx_ip_tunnel_connection.h + ../../src/knx/knx_ip_tunneling_request.cpp + ../../src/knx/knx_ip_tunneling_request.h + ../../src/knx/knx_ip_ch.cpp + ../../src/knx/knx_ip_ch.h + ../../src/knx/knx_ip_cri.cpp + ../../src/knx/knx_ip_cri.h + ../../src/knx/knx_ip_crd.cpp + ../../src/knx/knx_ip_crd.h + ../../src/knx/knx_ip_connect_request.cpp + ../../src/knx/knx_ip_connect_request.h + ../../src/knx/knx_ip_connect_response.cpp + ../../src/knx/knx_ip_connect_response.h + ../../src/knx/knx_ip_disconnect_request.cpp + ../../src/knx/knx_ip_disconnect_request.h + ../../src/knx/knx_ip_disconnect_response.cpp + ../../src/knx/knx_ip_disconnect_response.h + ../../src/knx/knx_ip_state_request.cpp + ../../src/knx/knx_ip_state_request.h + ../../src/knx/knx_ip_state_response.cpp + ../../src/knx/knx_ip_state_response.h + ../../src/knx/knx_ip_description_request.cpp + ../../src/knx/knx_ip_description_request.h + ../../src/knx/knx_ip_description_response.cpp + ../../src/knx/knx_ip_description_response.h + ../../src/knx/knx_ip_config_request.cpp + ../../src/knx/knx_ip_config_request.h + ../../src/knx/knx_ip_tunneling_ack.cpp + ../../src/knx/knx_ip_tunneling_ack.h ../../src/knx_facade.cpp ../../src/knx_facade.h ../../src/linux_platform.cpp @@ -141,7 +171,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas - add_executable(knx-linux-iptp ${SOURCES}) target_link_libraries(knx-linux-iptp "${LIBRARIES_FROM_REFERENCES}") set_property(TARGET knx-linux-iptp PROPERTY CXX_STANDARD 11) -target_compile_definitions(knx-linux-iptp PUBLIC -DMASK_VERSION=0x091A) +target_compile_definitions(knx-linux-iptp PUBLIC -DMASK_VERSION=0x091A -DKNX_TUNNELING) add_executable(knx-linux-tprf ${SOURCES}) target_link_libraries(knx-linux-tprf "${LIBRARIES_FROM_REFERENCES}") diff --git a/examples/knx-linux-coupler/fdsk.cpp b/examples/knx-linux-coupler/fdsk.cpp index bb62d574..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,147 +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 count = 0; - int bufSize = 8; - int index = 0; - int size = 0; // size of temporary array - uint8_t* temp = nullptr; - - if (length < 0 || length > 268435456LL) - { - return 0; - } - - size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. - temp = new uint8_t[size]; - - if (length > 0) - { - int buffer = in[0]; - int next = 1; - int bitsLeft = 8; - - while (bitsLeft > 0 || next < length) + char base32StandardAlphabet[] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"}; + char standardPaddingChar = '='; + + int result = 0; + int index = 0; + int size = 0; // size of temporary array + uint8_t* temp = nullptr; + + if (length < 0 || length > 268435456LL) { - if (bitsLeft < 5) - { - if (next < length) - { - buffer <<= 8; - buffer |= in[next] & 0xFF; - next++; - bitsLeft += 8; - } - else + return 0; + } + + size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. + temp = new uint8_t[size]; + + if (length > 0) + { + 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 f8d70823..f87c4ca4 100644 --- a/examples/knx-linux-coupler/main.cpp +++ b/examples/knx-linux-coupler/main.cpp @@ -17,10 +17,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) @@ -33,11 +33,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() @@ -60,10 +60,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"); @@ -89,12 +90,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/CMakeLists.txt b/examples/knx-linux/CMakeLists.txt index c0ef749e..837b2306 100644 --- a/examples/knx-linux/CMakeLists.txt +++ b/examples/knx-linux/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.7) -project(knx-linux) +cmake_minimum_required(VERSION 3.16) +project(knx-linux VERSION 1.5) set(LIBRARIES_FROM_REFERENCES "") set(SOURCES diff --git a/examples/knx-linux/fdsk.cpp b/examples/knx-linux/fdsk.cpp index bb62d574..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,147 +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 count = 0; - int bufSize = 8; - int index = 0; - int size = 0; // size of temporary array - uint8_t* temp = nullptr; - - if (length < 0 || length > 268435456LL) - { - return 0; - } - - size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. - temp = new uint8_t[size]; - - if (length > 0) - { - int buffer = in[0]; - int next = 1; - int bitsLeft = 8; - - while (bitsLeft > 0 || next < length) + char base32StandardAlphabet[] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"}; + char standardPaddingChar = '='; + + int result = 0; + int index = 0; + int size = 0; // size of temporary array + uint8_t* temp = nullptr; + + if (length < 0 || length > 268435456LL) { - if (bitsLeft < 5) - { - if (next < length) - { - buffer <<= 8; - buffer |= in[next] & 0xFF; - next++; - bitsLeft += 8; - } - else + return 0; + } + + size = 8 * ceil(length / 4.0); // Calculating size of temporary array. Not very precise. + temp = new uint8_t[size]; + + if (length > 0) + { + 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 e3d7ed5f..1a3186df 100644 --- a/examples/knx-linux/main.cpp +++ b/examples/knx-linux/main.cpp @@ -19,10 +19,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) @@ -35,13 +35,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; @@ -54,6 +54,7 @@ long lastsend = 0; void measureTemp() { long now = millis(); + if ((now - lastsend) < 10000) return; @@ -68,6 +69,7 @@ void measureTemp() GO_CURR.value(currentValue); double max = GO_MAX.value(); + if (currentValue > max) GO_MAX.value(currentValue); @@ -88,7 +90,7 @@ void appLoop() { if (!knx.configured()) return; - + measureTemp(); } @@ -117,10 +119,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"); @@ -146,12 +149,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-usb/platformio-ci.ini b/examples/knx-usb/platformio-ci.ini index 6688b723..d362556d 100644 --- a/examples/knx-usb/platformio-ci.ini +++ b/examples/knx-usb/platformio-ci.ini @@ -15,8 +15,8 @@ framework = arduino ; VID must be changed to some known KNX Manufacturer ; so that the KNX USB interface gets recognized by ETS ; not possible within ci -;extra_scripts = pre:custom_hwids.py -;board_build.usb_product="KNX RF - USB Interface" +;;extra_scripts = pre:custom_hwids.py +;;board_build.usb_product="KNX RF - USB Interface" lib_deps = SPI diff --git a/examples/knx-usb/platformio.ini b/examples/knx-usb/platformio.ini index b227cc3e..e3fb024c 100644 --- a/examples/knx-usb/platformio.ini +++ b/examples/knx-usb/platformio.ini @@ -28,7 +28,6 @@ board_build.usb_product="KNX RF - USB Interface" lib_deps = SPI Adafruit TinyUSB Library@0.7.1 - ;https://github.com/thelsing/FlashStorage.git knx build_flags = diff --git a/examples/knx-usb/src/main.cpp b/examples/knx-usb/src/main.cpp index f9c01b7c..2320b636 100644 --- a/examples/knx-usb/src/main.cpp +++ b/examples/knx-usb/src/main.cpp @@ -19,16 +19,16 @@ Adafruit_USBD_HID usb_hid; // received data on interrupt OUT endpoint void setReportCallback(uint8_t report_id, hid_report_type_t report_type, uint8_t const* data, uint16_t bufSize) { - // we don't use multiple report and report ID - (void) report_id; - (void) report_type; + // we don't use multiple report and report ID + (void) report_id; + (void) report_type; UsbTunnelInterface::receiveHidReport(data, bufSize); } bool sendHidReport(uint8_t* data, uint16_t length) { - // We do not use reportId of the TinyUSB sendReport()-API here but instead provide it in the first byte of the buffer + // We do not use reportId of the TinyUSB sendReport()-API here but instead provide it in the first byte of the buffer return usb_hid.sendReport(0, data, length); } @@ -68,7 +68,8 @@ void setup(void) usb_hid.begin(); // wait until device mounted - while( !USBDevice.mounted() ) delay(1); + while ( !USBDevice.mounted() ) + delay(1); println("KNX USB Interface enabled."); @@ -76,7 +77,7 @@ void setup(void) knx.readMemory(); if (knx.individualAddress() == 0) - knx.progMode(true); + knx.progMode(true); if (knx.configured()) @@ -101,10 +102,11 @@ void loop(void) knx.loop(); // only run the application code if the device was configured with ETS - if(!knx.configured()) + if (!knx.configured()) return; long now = millis(); + if ((now - lastsend) < 3000) return; @@ -116,11 +118,11 @@ void loop(void) output += ", " + String(temp); output += ", " + String(humi); Serial1.println(output); - + if (sendCounter++ == cyclSend) { sendCounter = 0; - + goTemperature.value(temp); goHumidity.value(humi); } diff --git a/examples/knxPython/CMakeLists.txt b/examples/knxPython/CMakeLists.txt index 8b67bbe5..9b3d1e5c 100644 --- a/examples/knxPython/CMakeLists.txt +++ b/examples/knxPython/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.7) -project(knx) +cmake_minimum_required(VERSION 3.16) +project(knx VERSION 1.5) add_subdirectory(pybind11) @@ -139,4 +139,4 @@ include_directories(../../src) #set_target_properties(knx PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${outdir}) set_target_properties(knx PROPERTIES OUTPUT_NAME knx) set_property(TARGET knx PROPERTY CXX_STANDARD 11) -target_compile_definitions(knx PUBLIC -DMASK_VERSION=0x57B0) \ No newline at end of file +target_compile_definitions(knx PUBLIC -DMASK_VERSION=0x57B0) diff --git a/examples/knxPython/knxmodule.cpp b/examples/knxPython/knxmodule.cpp index 461e9c97..e37e9ff9 100644 --- a/examples/knxPython/knxmodule.cpp +++ b/examples/knxPython/knxmodule.cpp @@ -2,7 +2,7 @@ #include #include #include - + namespace py = pybind11; #include @@ -38,14 +38,18 @@ static std::vector argv; struct StdStringCStrFunctor { - const char* operator() (const std::string& str) { return str.c_str(); } + const char* operator() (const std::string& str) + { + return str.c_str(); + } }; static void Prepare(std::vector args) { // copy args so we control the livetime of the char* argsVector = args; - for(int i = 0; i < args.size(); i++) + + for (int i = 0; i < args.size(); i++) printf("%s\n", args[i].c_str()); argv = std::vector(argsVector.size()); @@ -76,12 +80,12 @@ static void Start() { if (running) return; - + if (!bau) return; running = true; - + bau->enabled(true); workerThread = std::thread(loop); @@ -92,11 +96,11 @@ static void Stop() { if (!running) return; - + running = false; bau->writeMemory(); bau->enabled(false); - + workerThread.join(); } @@ -126,65 +130,69 @@ static bool Configured() } -PYBIND11_MODULE(knx, m) +PYBIND11_MODULE(knx, m) { m.doc() = "wrapper for knx device lib"; // optional module docstring m.def("Start", &Start, "Start knx handling thread."); m.def("Stop", &Stop, "Stop knx handling thread."); - m.def("Prepare", &Prepare, "Allocated needed objects."); - m.def("Destroy", &Destroy, "Free object allocated by Prepare."); + m.def("Prepare", &Prepare, "Allocated needed objects."); + m.def("Destroy", &Destroy, "Free object allocated by Prepare."); m.def("ProgramMode", (bool(*)())&ProgramMode, "get programing mode active."); m.def("ProgramMode", (bool(*)(bool))&ProgramMode, "Activate / deactivate programing mode."); - m.def("Configured", (bool(*)())&Configured, "get configured status."); + m.def("Configured", (bool(*)())&Configured, "get configured status."); m.def("ReadMemory", &ReadMemory, "read memory from flash file"); - m.def("FlashFilePath", []() - { - if(!platform) - return std::string(""); - - return platform->flashFilePath(); - }); - m.def("FlashFilePath", [](std::string path) - { - if(!platform) - return; - - platform->flashFilePath(path); - }); - m.def("GetGroupObject", [](uint16_t goNr) - { - if(!bau || goNr > bau->groupObjectTable().entryCount()) - return (GroupObject*)nullptr; - - return &bau->groupObjectTable().get(goNr); - }, py::return_value_policy::reference); - + m.def("FlashFilePath", []() + { + if (!platform) + return std::string(""); + + return platform->flashFilePath(); + }); + m.def("FlashFilePath", [](std::string path) + { + if (!platform) + return; + + platform->flashFilePath(path); + }); + m.def("GetGroupObject", [](uint16_t goNr) + { + if (!bau || goNr > bau->groupObjectTable().entryCount()) + return (GroupObject*)nullptr; + + return &bau->groupObjectTable().get(goNr); + }, py::return_value_policy::reference); + py::class_(m, "GroupObject", py::dynamic_attr()) - .def(py::init()) - .def("asap", &GroupObject::asap) - .def("size", &GroupObject::valueSize) - .def_property("value", - [](GroupObject& go) { return py::bytes((const char*)go.valueRef(), go.valueSize()); }, - [](GroupObject& go, py::bytes bytesValue) - { - const auto value = static_cast(bytesValue); - if (value.length() != go.valueSize()) - throw std::length_error("bytesValue"); - - auto valueRef = go.valueRef(); - memcpy(valueRef, value.c_str(), go.valueSize()); - go.objectWritten(); - }) - .def_property("callback", - [](GroupObject& go) - { - return go.callback(); - }, - [](GroupObject& go, GroupObjectUpdatedHandler handler) - { - go.callback(handler); - } - ) - .def("callBack", (void(GroupObject::*)(GroupObjectUpdatedHandler))&GroupObject::callback); + .def(py::init()) + .def("asap", &GroupObject::asap) + .def("size", &GroupObject::valueSize) + .def_property("value", + [](GroupObject & go) + { + return py::bytes((const char*)go.valueRef(), go.valueSize()); + }, + [](GroupObject & go, py::bytes bytesValue) + { + const auto value = static_cast(bytesValue); + + if (value.length() != go.valueSize()) + throw std::length_error("bytesValue"); + + auto valueRef = go.valueRef(); + memcpy(valueRef, value.c_str(), go.valueSize()); + go.objectWritten(); + }) + .def_property("callback", + [](GroupObject & go) + { + return go.callback(); + }, + [](GroupObject & go, GroupObjectUpdatedHandler handler) + { + go.callback(handler); + } + ) + .def("callBack", (void(GroupObject::*)(GroupObjectUpdatedHandler))&GroupObject::callback); } diff --git a/examples/knxPython/pybind11/.appveyor.yml b/examples/knxPython/pybind11/.appveyor.yml index 149a8a3d..391cf107 100644 --- a/examples/knxPython/pybind11/.appveyor.yml +++ b/examples/knxPython/pybind11/.appveyor.yml @@ -1,6 +1,6 @@ version: 1.0.{build} image: -- Visual Studio 2015 +- Visual Studio 2017 test: off skip_branch_with_pr: true build: @@ -9,17 +9,15 @@ platform: - x86 environment: matrix: - - PYTHON: 36 - CONFIG: Debug - - PYTHON: 27 + - PYTHON: 38 CONFIG: Debug install: - ps: | - $env:CMAKE_GENERATOR = "Visual Studio 14 2015" + $env:CMAKE_GENERATOR = "Visual Studio 15 2017" if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" } $env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH" python -W ignore -m pip install --upgrade pip wheel - python -W ignore -m pip install pytest numpy --no-warn-script-location + python -W ignore -m pip install pytest numpy --no-warn-script-location pytest-timeout - ps: | Start-FileDownload 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip' 7z x eigen-3.3.7.zip -y > $null diff --git a/examples/knxPython/pybind11/.clang-format b/examples/knxPython/pybind11/.clang-format new file mode 100644 index 00000000..b477a160 --- /dev/null +++ b/examples/knxPython/pybind11/.clang-format @@ -0,0 +1,38 @@ +--- +# See all possible options and defaults with: +# clang-format --style=llvm --dump-config +BasedOnStyle: LLVM +AccessModifierOffset: -4 +AllowShortLambdasOnASingleLine: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: All +BreakConstructorInitializers: BeforeColon +ColumnLimit: 99 +CommentPragmas: 'NOLINT:.*|^ IWYU pragma:' +IncludeBlocks: Regroup +IndentCaseLabels: true +IndentPPDirectives: AfterHash +IndentWidth: 4 +Language: Cpp +SpaceAfterCStyleCast: true +Standard: Cpp11 +StatementMacros: ['PyObject_HEAD'] +TabWidth: 4 +IncludeCategories: + - Regex: '' + Priority: 4 + - Regex: '.*' + Priority: 5 +... diff --git a/examples/knxPython/pybind11/.clang-tidy b/examples/knxPython/pybind11/.clang-tidy index e29d9298..96cb6f58 100644 --- a/examples/knxPython/pybind11/.clang-tidy +++ b/examples/knxPython/pybind11/.clang-tidy @@ -1,13 +1,79 @@ FormatStyle: file -Checks: ' -llvm-namespace-comment, -modernize-use-override, -readability-container-size-empty, -modernize-use-using, -modernize-use-equals-default, -modernize-use-auto, -modernize-use-emplace, -' +Checks: | + *bugprone*, + *performance*, + clang-analyzer-optin.cplusplus.VirtualCall, + clang-analyzer-optin.performance.Padding, + cppcoreguidelines-init-variables, + cppcoreguidelines-prefer-member-initializer, + cppcoreguidelines-pro-type-static-cast-downcast, + cppcoreguidelines-slicing, + google-explicit-constructor, + llvm-namespace-comment, + misc-definitions-in-headers, + misc-misplaced-const, + misc-non-copyable-objects, + misc-static-assert, + misc-throw-by-value-catch-by-reference, + misc-uniqueptr-reset-release, + misc-unused-parameters, + modernize-avoid-bind, + modernize-loop-convert, + modernize-make-shared, + modernize-redundant-void-arg, + modernize-replace-auto-ptr, + modernize-replace-disallow-copy-and-assign-macro, + modernize-replace-random-shuffle, + modernize-shrink-to-fit, + modernize-use-auto, + modernize-use-bool-literals, + modernize-use-default-member-init, + modernize-use-emplace, + modernize-use-equals-default, + modernize-use-equals-delete, + modernize-use-noexcept, + modernize-use-nullptr, + modernize-use-override, + modernize-use-using, + readability-avoid-const-params-in-decls, + readability-braces-around-statements, + readability-const-return-type, + readability-container-size-empty, + readability-delete-null-pointer, + readability-else-after-return, + readability-implicit-bool-conversion, + readability-inconsistent-declaration-parameter-name, + readability-make-member-function-const, + readability-misplaced-array-index, + readability-non-const-parameter, + readability-qualified-auto, + readability-redundant-function-ptr-dereference, + readability-redundant-smartptr-get, + readability-redundant-string-cstr, + readability-simplify-subscript-expr, + readability-static-accessed-through-instance, + readability-static-definition-in-anonymous-namespace, + readability-string-compare, + readability-suspicious-call-argument, + readability-uniqueptr-delete-release, + -bugprone-chained-comparison, + -bugprone-easily-swappable-parameters, + -bugprone-exception-escape, + -bugprone-reserved-identifier, + -bugprone-unused-raii, + -performance-enum-size, + +CheckOptions: +- key: modernize-use-equals-default.IgnoreMacros + value: false +- key: performance-for-range-copy.WarnOnAllAutoCopies + value: true +- key: performance-inefficient-string-concatenation.StrictMode + value: true +- key: performance-unnecessary-value-param.AllowedTypes + value: 'exception_ptr$;' +- key: readability-implicit-bool-conversion.AllowPointerConditions + value: true HeaderFilterRegex: 'pybind11/.*h' diff --git a/examples/knxPython/pybind11/.codespell-ignore-lines b/examples/knxPython/pybind11/.codespell-ignore-lines new file mode 100644 index 00000000..2a01d63e --- /dev/null +++ b/examples/knxPython/pybind11/.codespell-ignore-lines @@ -0,0 +1,24 @@ +template + template + auto &this_ = static_cast(*this); + if (load_impl(temp, false)) { + ssize_t nd = 0; + auto trivial = broadcast(buffers, nd, shape); + auto ndim = (size_t) nd; + int nd; + ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; } + using op = op_impl; +template + template + class_ &def(const detail::op_ &op, const Extra &...extra) { + class_ &def_cast(const detail::op_ &op, const Extra &...extra) { +@pytest.mark.parametrize("access", ["ro", "rw", "static_ro", "static_rw"]) +struct IntStruct { + explicit IntStruct(int v) : value(v){}; + ~IntStruct() { value = -value; } + IntStruct(const IntStruct &) = default; + IntStruct &operator=(const IntStruct &) = default; + py::class_(m, "IntStruct").def(py::init([](const int i) { return IntStruct(i); })); + py::implicitly_convertible(); + m.def("test", [](int expected, const IntStruct &in) { + [](int expected, const IntStruct &in) { diff --git a/examples/knxPython/pybind11/.gitattributes b/examples/knxPython/pybind11/.gitattributes new file mode 100644 index 00000000..d611e149 --- /dev/null +++ b/examples/knxPython/pybind11/.gitattributes @@ -0,0 +1 @@ +docs/*.svg binary diff --git a/examples/knxPython/pybind11/.github/CODEOWNERS b/examples/knxPython/pybind11/.github/CODEOWNERS new file mode 100644 index 00000000..4e2c6690 --- /dev/null +++ b/examples/knxPython/pybind11/.github/CODEOWNERS @@ -0,0 +1,9 @@ +*.cmake @henryiii +CMakeLists.txt @henryiii +*.yml @henryiii +*.yaml @henryiii +/tools/ @henryiii +/pybind11/ @henryiii +noxfile.py @henryiii +.clang-format @henryiii +.clang-tidy @henryiii diff --git a/examples/knxPython/pybind11/.github/CONTRIBUTING.md b/examples/knxPython/pybind11/.github/CONTRIBUTING.md index 4ced21ba..f5a08e2d 100644 --- a/examples/knxPython/pybind11/.github/CONTRIBUTING.md +++ b/examples/knxPython/pybind11/.github/CONTRIBUTING.md @@ -53,6 +53,33 @@ derivative works thereof, in binary and source code form. ## Development of pybind11 +### Quick setup + +To setup a quick development environment, use [`nox`](https://nox.thea.codes). +This will allow you to do some common tasks with minimal setup effort, but will +take more time to run and be less flexible than a full development environment. +If you use [`pipx run nox`](https://pipx.pypa.io), you don't even need to +install `nox`. Examples: + +```bash +# List all available sessions +nox -l + +# Run linters +nox -s lint + +# Run tests on Python 3.9 +nox -s tests-3.9 + +# Build and preview docs +nox -s docs -- serve + +# Build SDists and wheels +nox -s build +``` + +### Full setup + To setup an ideal development environment, run the following commands on a system with CMake 3.14+: @@ -66,11 +93,10 @@ cmake --build build -j4 Tips: -* You can use `virtualenv` (from PyPI) instead of `venv` (which is Python 3 - only). +* You can use `virtualenv` (faster, from PyPI) instead of `venv`. * You can select any name for your environment folder; if it contains "env" it will be ignored by git. -* If you don’t have CMake 3.14+, just add “cmake” to the pip install command. +* If you don't have CMake 3.14+, just add "cmake" to the pip install command. * You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+ * In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`. FindPython uses `-DPython_ROOT_DIR=/path/to` or @@ -78,7 +104,7 @@ Tips: ### Configuration options -In CMake, configuration options are given with “-D”. Options are stored in the +In CMake, configuration options are given with "-D". Options are stored in the build directory, in the `CMakeCache.txt` file, so they are remembered for each build directory. Two selections are special - the generator, given with `-G`, and the compiler, which is selected based on environment variables `CXX` and @@ -88,12 +114,12 @@ after the initial run. The valid options are: * `-DCMAKE_BUILD_TYPE`: Release, Debug, MinSizeRel, RelWithDebInfo -* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+’s FindPython instead of the +* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+'s FindPython instead of the classic, deprecated, custom FindPythonLibs * `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests) * `-DBUILD_TESTING=ON`: Enable the tests * `-DDOWNLOAD_CATCH=ON`: Download catch to build the C++ tests -* `-DOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests +* `-DDOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests * `-DPYBIND11_INSTALL=ON/OFF`: Enable the install target (on by default for the master project) * `-DUSE_PYTHON_INSTALL_DIR=ON`: Try to install into the python dir @@ -109,7 +135,7 @@ The valid options are: * Use `-G` and the name of a generator to use something different. `cmake --help` lists the generators available. - On Unix, setting `CMAKE_GENERATER=Ninja` in your environment will give - you automatic mulithreading on all your CMake projects! + you automatic multithreading on all your CMake projects! * Open the `CMakeLists.txt` with QtCreator to generate for that IDE. * You can use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate the `.json` file that some tools expect. @@ -126,13 +152,26 @@ cmake --build build --target check `--target` can be spelled `-t` in CMake 3.15+. You can also run individual tests with these targets: -* `pytest`: Python tests only +* `pytest`: Python tests only, using the +[pytest](https://docs.pytest.org/en/stable/) framework * `cpptest`: C++ tests only * `test_cmake_build`: Install / subdirectory tests If you want to build just a subset of tests, use -`-DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp"`. If this is -empty, all tests will be built. +`-DPYBIND11_TEST_OVERRIDE="test_callbacks;test_pickling"`. If this is +empty, all tests will be built. Tests are specified without an extension if they need both a .py and +.cpp file. + +You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or +by using the `PYTEST_ADDOPTS` environment variable +(see [`pytest` docs](https://docs.pytest.org/en/2.7.3/customize.html#adding-default-options)). As an example: + +```bash +env PYTEST_ADDOPTS="--capture=no --exitfirst" \ + cmake --build build --target pytest +# Or using abbreviated flags +env PYTEST_ADDOPTS="-s -x" cmake --build build --target pytest +``` ### Formatting @@ -164,18 +203,46 @@ name, pre-commit): pre-commit install ``` +### Clang-Format + +As of v2.6.2, pybind11 ships with a [`clang-format`][clang-format] +configuration file at the top level of the repo (the filename is +`.clang-format`). Currently, formatting is NOT applied automatically, but +manually using `clang-format` for newly developed files is highly encouraged. +To check if a file needs formatting: + +```bash +clang-format -style=file --dry-run some.cpp +``` + +The output will show things to be fixed, if any. To actually format the file: + +```bash +clang-format -style=file -i some.cpp +``` + +Note that the `-style-file` option searches the parent directories for the +`.clang-format` file, i.e. the commands above can be run in any subdirectory +of the pybind11 repo. + ### Clang-Tidy -To run Clang tidy, the following recipe should work. Files will be modified in -place, so you can use git to monitor the changes. +[`clang-tidy`][clang-tidy] performs deeper static code analyses and is +more complex to run, compared to `clang-format`, but support for `clang-tidy` +is built into the pybind11 CMake configuration. To run `clang-tidy`, the +following recipe should work. Run the `docker` command from the top-level +directory inside your pybind11 git clone. Files will be modified in place, +so you can use git to monitor the changes. ```bash -docker run --rm -v $PWD:/pybind11 -it silkeh/clang:10 -apt-get update && apt-get install python3-dev python3-pytest -cmake -S pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-fix" -cmake --build build +docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:15-bullseye +apt-get update && apt-get install -y git python3-dev python3-pytest +cmake -S /mounted_pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color" -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17 +cmake --build build -j 2 ``` +You can add `--fix` to the options list if you want. + ### Include what you use To run include what you use, install (`brew install include-what-you-use` on @@ -186,12 +253,12 @@ cmake -S . -B build-iwyu -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=$(which include-what-y cmake --build build ``` -The report is sent to stderr; you can pip it into a file if you wish. +The report is sent to stderr; you can pipe it into a file if you wish. ### Build recipes This builds with the Intel compiler (assuming it is in your path, along with a -recent CMake and Python 3): +recent CMake and Python): ```bash python3 -m venv venv @@ -313,6 +380,8 @@ if you really want to. [pre-commit]: https://pre-commit.com +[clang-format]: https://clang.llvm.org/docs/ClangFormat.html +[clang-tidy]: https://clang.llvm.org/extra/clang-tidy/ [pybind11.readthedocs.org]: http://pybind11.readthedocs.org/en/latest [issue tracker]: https://github.com/pybind/pybind11/issues [gitter]: https://gitter.im/pybind/Lobby diff --git a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/bug-report.md b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index ae36ea65..00000000 --- a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug Report -about: File an issue about a bug -title: "[BUG] " ---- - - -Make sure you've completed the following steps before submitting your issue -- thank you! - -1. Make sure you've read the [documentation][]. Your issue may be addressed there. -2. Search the [issue tracker][] to verify that this hasn't already been reported. +1 or comment there if it has. -3. Consider asking first in the [Gitter chat room][]. -4. Include a self-contained and minimal piece of code that reproduces the problem. If that's not possible, try to make the description as clear as possible. - a. If possible, make a PR with a new, failing test to give us a starting point to work on! - -[documentation]: https://pybind11.readthedocs.io -[issue tracker]: https://github.com/pybind/pybind11/issues -[Gitter chat room]: https://gitter.im/pybind/Lobby - -*After reading, remove this checklist and the template text in parentheses below.* - -## Issue description - -(Provide a short description, state the expected behavior and what actually happens.) - -## Reproducible example code - -(The code should be minimal, have no external dependencies, isolate the function(s) that cause breakage. Submit matched and complete C++ and Python snippets that can be easily compiled and run to diagnose the issue.) diff --git a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000..4f1e78f3 --- /dev/null +++ b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,61 @@ +name: Bug Report +description: File an issue about a bug +title: "[BUG]: " +labels: [triage] +body: + - type: markdown + attributes: + value: | + Please do your best to make the issue as easy to act on as possible, and only submit here if there is clearly a problem with pybind11 (ask first if unsure). **Note that a reproducer in a PR is much more likely to get immediate attention.** + + - type: checkboxes + id: steps + attributes: + label: Required prerequisites + description: Make sure you've completed the following steps before submitting your issue -- thank you! + options: + - label: Make sure you've read the [documentation](https://pybind11.readthedocs.io). Your issue may be addressed there. + required: true + - label: Search the [issue tracker](https://github.com/pybind/pybind11/issues) and [Discussions](https:/pybind/pybind11/discussions) to verify that this hasn't already been reported. +1 or comment there if it has. + required: true + - label: Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new). + required: false + + - type: input + id: version + attributes: + label: What version (or hash if on master) of pybind11 are you using? + validations: + required: true + + - type: textarea + id: description + attributes: + label: Problem description + placeholder: >- + Provide a short description, state the expected behavior and what + actually happens. Include relevant information like what version of + pybind11 you are using, what system you are on, and any useful commands + / output. + validations: + required: true + + - type: textarea + id: code + attributes: + label: Reproducible example code + placeholder: >- + The code should be minimal, have no external dependencies, isolate the + function(s) that cause breakage. Submit matched and complete C++ and + Python snippets that can be easily compiled and run to diagnose the + issue. — Note that a reproducer in a PR is much more likely to get + immediate attention: failing tests in the pybind11 CI are the best + starting point for working out fixes. + render: text + + - type: input + id: regression + attributes: + label: Is this a regression? Put the last known working version here if it is. + description: Put the last known working version here if this is a regression. + value: Not a regression diff --git a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/config.yml b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/config.yml index 20e74313..27f9a804 100644 --- a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/config.yml +++ b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: Ask a question + url: https://github.com/pybind/pybind11/discussions/new + about: Please ask and answer questions here, or propose new ideas. - name: Gitter room url: https://gitter.im/pybind/Lobby about: A room for discussing pybind11 with an active community diff --git a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/feature-request.md b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 5f6ec81e..00000000 --- a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Feature Request -about: File an issue about adding a feature -title: "[FEAT] " ---- - - -Make sure you've completed the following steps before submitting your issue -- thank you! - -1. Check if your feature has already been mentioned / rejected / planned in other issues. -2. If those resources didn't help, consider asking in the [Gitter chat room][] to see if this is interesting / useful to a larger audience and possible to implement reasonably, -4. If you have a useful feature that passes the previous items (or not suitable for chat), please fill in the details below. - -[Gitter chat room]: https://gitter.im/pybind/Lobby - -*After reading, remove this checklist.* diff --git a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/question.md b/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index b199b6ee..00000000 --- a/examples/knxPython/pybind11/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Question -about: File an issue about unexplained behavior -title: "[QUESTION] " ---- - -If you have a question, please check the following first: - -1. Check if your question has already been answered in the [FAQ][] section. -2. Make sure you've read the [documentation][]. Your issue may be addressed there. -3. If those resources didn't help and you only have a short question (not a bug report), consider asking in the [Gitter chat room][] -4. Search the [issue tracker][], including the closed issues, to see if your question has already been asked/answered. +1 or comment if it has been asked but has no answer. -5. If you have a more complex question which is not answered in the previous items (or not suitable for chat), please fill in the details below. -6. Include a self-contained and minimal piece of code that illustrates your question. If that's not possible, try to make the description as clear as possible. - -[FAQ]: http://pybind11.readthedocs.io/en/latest/faq.html -[documentation]: https://pybind11.readthedocs.io -[issue tracker]: https://github.com/pybind/pybind11/issues -[Gitter chat room]: https://gitter.im/pybind/Lobby - -*After reading, remove this checklist.* diff --git a/examples/knxPython/pybind11/.github/dependabot.yml b/examples/knxPython/pybind11/.github/dependabot.yml index c1eac3c4..22c34bd7 100644 --- a/examples/knxPython/pybind11/.github/dependabot.yml +++ b/examples/knxPython/pybind11/.github/dependabot.yml @@ -4,8 +4,12 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "weekly" + groups: + actions: + patterns: + - "*" ignore: - # Offical actions have moving tags like v1 - # that are used, so they don't need updates here - - dependency-name: "actions/*" + - dependency-name: actions/checkout + versions: + - "<5" diff --git a/examples/knxPython/pybind11/.github/labeler.yml b/examples/knxPython/pybind11/.github/labeler.yml index abb0d05a..e5a8de75 100644 --- a/examples/knxPython/pybind11/.github/labeler.yml +++ b/examples/knxPython/pybind11/.github/labeler.yml @@ -1,8 +1,13 @@ docs: -- any: - - 'docs/**/*.rst' - - '!docs/changelog.rst' - - '!docs/upgrade.rst' + all: + - changed-files: + - all-globs-to-all-files: + - '!docs/changelog.rst' + - '!docs/upgrade.rst' + - base-branch: "^(?!dependabot).*" + - base-branch: "^(?!pre-commit-ci).*" ci: -- '.github/workflows/*.yml' + - changed-files: + - any-glob-to-any-file: + - '.github/workflows/*.yml' diff --git a/examples/knxPython/pybind11/.github/labeler_merged.yml b/examples/knxPython/pybind11/.github/labeler_merged.yml index 2374ad42..cf6c1f29 100644 --- a/examples/knxPython/pybind11/.github/labeler_merged.yml +++ b/examples/knxPython/pybind11/.github/labeler_merged.yml @@ -1,3 +1,8 @@ +# Add 'needs changelog` label to any change to code files as long as the `CHANGELOG` hasn't changed +# Skip dependabot and pre-commit-ci PRs needs changelog: -- all: - - '!docs/changelog.rst' + - all: + - changed-files: + - all-globs-to-all-files: "!docs/changelog.rst" + - base-branch: "^(?!dependabot).*" + - base-branch: "^(?!pre-commit-ci).*" diff --git a/examples/knxPython/pybind11/.github/matchers/pylint.json b/examples/knxPython/pybind11/.github/matchers/pylint.json new file mode 100644 index 00000000..e3a6bd16 --- /dev/null +++ b/examples/knxPython/pybind11/.github/matchers/pylint.json @@ -0,0 +1,32 @@ +{ + "problemMatcher": [ + { + "severity": "warning", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$", + "file": 1, + "line": 2, + "column": 3, + "code": 4, + "message": 5 + } + ], + "owner": "pylint-warning" + }, + { + "severity": "error", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$", + "file": 1, + "line": 2, + "column": 3, + "code": 4, + "message": 5 + } + ], + "owner": "pylint-error" + } + ] +} diff --git a/examples/knxPython/pybind11/.github/pull_request_template.md b/examples/knxPython/pybind11/.github/pull_request_template.md index 5570f6f2..54b7f510 100644 --- a/examples/knxPython/pybind11/.github/pull_request_template.md +++ b/examples/knxPython/pybind11/.github/pull_request_template.md @@ -1,3 +1,7 @@ + ## Description @@ -5,7 +9,8 @@ ## Suggested changelog entry: - + ```rst diff --git a/examples/knxPython/pybind11/.github/workflows/ci.yml b/examples/knxPython/pybind11/.github/workflows/ci.yml index a5789df3..3f7e8a6c 100644 --- a/examples/knxPython/pybind11/.github/workflows/ci.yml +++ b/examples/knxPython/pybind11/.github/workflows/ci.yml @@ -9,6 +9,20 @@ on: - stable - v* +permissions: read-all + +concurrency: + group: test-${{ github.ref }} + cancel-in-progress: true + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + PIP_ONLY_BINARY: numpy + FORCE_COLOR: 3 + PYTEST_TIMEOUT: 300 + # For cmake: + VERBOSE: 1 + jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. @@ -16,65 +30,72 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, windows-latest, macos-latest] + runs-on: [ubuntu-20.04, windows-2022, macos-13] python: - - 2.7 - - 3.5 - - 3.8 - - 3.9 - - pypy2 - - pypy3 + - '3.8' + - '3.9' + - '3.12' + - '3.13' + - 'pypy-3.8' + - 'pypy-3.9' + - 'pypy-3.10' # Items in here will either be added to the build matrix (if not # present), or add new keys to an existing matrix element if all the # existing keys match. # - # We support three optional keys: args (both build), args1 (first - # build), and args2 (second build). + # We support an optional key: args, for cmake args include: # Just add a key - - runs-on: ubuntu-latest - python: 3.6 + - runs-on: ubuntu-20.04 + python: '3.8' args: > -DPYBIND11_FINDPYTHON=ON - - runs-on: windows-latest - python: 3.6 + -DCMAKE_CXX_FLAGS="-D_=1" + exercise_D_: 1 + - runs-on: ubuntu-20.04 + python: 'pypy-3.8' args: > -DPYBIND11_FINDPYTHON=ON - - runs-on: ubuntu-latest - python: 3.8 + - runs-on: windows-2019 + python: '3.8' args: > -DPYBIND11_FINDPYTHON=ON + # Inject a couple Windows 2019 runs + - runs-on: windows-2019 + python: '3.9' + # Extra ubuntu latest job + - runs-on: ubuntu-latest + python: '3.11' - # These items will be removed from the build matrix, keys must match. - exclude: - # Currently 32bit only, and we build 64bit - - runs-on: windows-latest - python: pypy2 - - runs-on: windows-latest - python: pypy3 name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + allow-prereleases: true - - name: Setup Boost (Windows / Linux latest) - shell: bash - run: echo "BOOST_ROOT=$BOOST_ROOT_1_72_0" >> $GITHUB_ENV + - name: Setup Boost (Linux) + # Can't use boost + define _ + if: runner.os == 'Linux' && matrix.exercise_D_ != 1 + run: sudo apt-get install libboost-dev + + - name: Setup Boost (macOS) + if: runner.os == 'macOS' + run: brew install boost - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.4 + uses: jwlawson/actions-setup-cmake@v2.0 - name: Cache wheels if: runner.os == 'macOS' - uses: actions/cache@v2 + uses: actions/cache@v4 with: # This path is specific to macOS - we really only need it for PyPy NumPy wheels # See https://github.com/actions/cache/blob/master/examples.md#python---pip @@ -84,17 +105,23 @@ jobs: key: ${{ runner.os }}-pip-${{ matrix.python }}-x64-${{ hashFiles('tests/requirements.txt') }} - name: Prepare env - run: python -m pip install -r tests/requirements.txt --prefer-binary + run: | + python -m pip install -r tests/requirements.txt - name: Setup annotations on Linux if: runner.os == 'Linux' run: python -m pip install pytest-github-actions-annotate-failures # First build - C++11 mode and inplace + # More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here + # (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime). - name: Configure C++11 ${{ matrix.args }} run: > cmake -S . -B . -DPYBIND11_WERROR=ON + -DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON + -DPYBIND11_NUMPY_1_ONLY=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -107,9 +134,7 @@ jobs: run: cmake --build . --target pytest -j 2 - name: C++11 tests - # TODO: Figure out how to load the DLL on Python 3.8+ - if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9))" - run: cmake --build . --target cpptest -j 2 + run: cmake --build . --target cpptest -j 2 - name: Interface test C++11 run: cmake --build . --target test_cmake_build @@ -118,15 +143,18 @@ jobs: run: git clean -fdx # Second build - C++17 mode and in a build directory - - name: Configure ${{ matrix.args2 }} + # More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here. + # (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime). + - name: Configure C++17 run: > cmake -S . -B build2 -DPYBIND11_WERROR=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DPYBIND11_NUMPY_1_ONLY=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 ${{ matrix.args }} - ${{ matrix.args2 }} - name: Build run: cmake --build build2 -j 2 @@ -135,33 +163,145 @@ jobs: run: cmake --build build2 --target pytest - name: C++ tests - # TODO: Figure out how to load the DLL on Python 3.8+ - if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9))" run: cmake --build build2 --target cpptest + # Third build - C++17 mode with unstable ABI + - name: Configure (unstable ABI) + run: > + cmake -S . -B build3 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + -DPYBIND11_INTERNALS_VERSION=10000000 + ${{ matrix.args }} + + - name: Build (unstable ABI) + run: cmake --build build3 -j 2 + + - name: Python tests (unstable ABI) + run: cmake --build build3 --target pytest + - name: Interface test run: cmake --build build2 --target test_cmake_build - # Eventually Microsoft might have an action for setting up - # MSVC, but for now, this action works: - - name: Prepare compiler environment for Windows 🐍 2.7 - if: matrix.python == 2.7 && runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@v1 + # This makes sure the setup_helpers module can build packages using + # setuptools + - name: Setuptools helpers test + run: | + pip install setuptools + pytest tests/extra_setuptools + if: "!(matrix.runs-on == 'windows-2022')" + + manylinux: + name: Manylinux on 🐍 3.13t • GIL + runs-on: ubuntu-latest + timeout-minutes: 40 + container: quay.io/pypa/musllinux_1_2_x86_64:latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Prepare venv + run: python3.13t -m venv .venv + + - name: Install Python deps + run: .venv/bin/pip install -r tests/requirements.txt + + - name: Configure C++11 + run: > + cmake -S. -Bbuild + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DPython_ROOT_DIR=.venv + + - name: Build C++11 + run: cmake --build build -j2 + + - name: Python tests C++11 + run: cmake --build build --target pytest -j2 + + deadsnakes: + strategy: + fail-fast: false + matrix: + include: + # TODO: Fails on 3.10, investigate + # JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4889 + # - python-version: "3.9" + # python-debug: true + # valgrind: true + - python-version: "3.11" + python-debug: false + + name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64" + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python-version }} (deadsnakes) + uses: deadsnakes/action@v3.2.0 with: - arch: x64 + python-version: ${{ matrix.python-version }} + debug: ${{ matrix.python-debug }} - # This makes two environment variables available in the following step(s) - - name: Set Windows 🐍 2.7 environment variables - if: matrix.python == 2.7 && runner.os == 'Windows' - shell: bash + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Valgrind cache + if: matrix.valgrind + uses: actions/cache@v4 + id: cache-valgrind + with: + path: valgrind + key: 3.16.1 # Valgrind version + + - name: Compile Valgrind + if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true' run: | - echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV - echo "MSSdk=1" >> $GITHUB_ENV + VALGRIND_VERSION=3.16.1 + curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj + mv valgrind-$VALGRIND_VERSION valgrind + cd valgrind + ./configure + make -j 2 > /dev/null + + - name: Install Valgrind + if: matrix.valgrind + working-directory: valgrind + run: | + sudo make install + sudo apt-get update + sudo apt-get install libc6-dbg # Needed by Valgrind - # This makes sure the setup_helpers module can build packages using - # setuptools - - name: Setuptools helpers test - run: pytest tests/extra_setuptools + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + - name: Configure + run: > + cmake -S . -B build + -DCMAKE_BUILD_TYPE=Debug + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + + - name: Build + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++ tests + run: cmake --build build --target cpptest + + - name: Run Valgrind on Python tests + if: matrix.valgrind + run: cmake --build build --target memcheck # Testing on clang using the excellent silkeh clang docker images @@ -175,22 +315,43 @@ jobs: - 3.7 - 3.9 - 7 + - 9 - dev std: - 11 + container_suffix: + - "" include: - clang: 5 std: 14 - - clang: 10 - std: 20 - clang: 10 std: 17 + - clang: 11 + std: 20 + - clang: 12 + std: 20 + - clang: 13 + std: 20 + - clang: 14 + std: 20 + - clang: 15 + std: 20 + container_suffix: "-bullseye" + - clang: 16 + std: 20 + container_suffix: "-bullseye" + - clang: 17 + std: 20 + container_suffix: "-bookworm" + - clang: 18 + std: 20 + container_suffix: "-bookworm" name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64" - container: "silkeh/clang:${{ matrix.clang }}" + container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Add wget and python3 run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev @@ -220,11 +381,11 @@ jobs: # Testing NVCC; forces sources to behave like .cu files cuda: runs-on: ubuntu-latest - name: "🐍 3.8 • CUDA 11 • Ubuntu 20.04" - container: nvidia/cuda:11.0-devel-ubuntu20.04 + name: "🐍 3.10 • CUDA 12.2 • Ubuntu 22.04" + container: nvidia/cuda:12.2.0-devel-ubuntu22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND - name: Install 🐍 3 @@ -240,32 +401,87 @@ jobs: run: cmake --build build --target pytest - # Testing CentOS 8 + PGI compilers - centos-nvhpc8: - runs-on: ubuntu-latest - name: "🐍 3 • CentOS8 / PGI 20.7 • x64" - container: centos:8 - +# TODO: Internal compiler error - report to NVidia +# # Testing CentOS 8 + PGI compilers +# centos-nvhpc8: +# runs-on: ubuntu-latest +# name: "🐍 3 • CentOS8 / PGI 20.11 • x64" +# container: centos:8 +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Add Python 3 and a few requirements +# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules +# +# - name: Install CMake with pip +# run: | +# python3 -m pip install --upgrade pip +# python3 -m pip install cmake --prefer-binary +# +# - name: Install NVidia HPC SDK +# run: > +# yum -y install +# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-20-11-20.11-1.x86_64.rpm +# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-2020-20.11-1.x86_64.rpm +# +# - name: Configure +# shell: bash +# run: | +# source /etc/profile.d/modules.sh +# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11 +# cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") +# +# - name: Build +# run: cmake --build build -j 2 --verbose +# +# - name: Python tests +# run: cmake --build build --target pytest +# +# - name: C++ tests +# run: cmake --build build --target cpptest +# +# - name: Interface test +# run: cmake --build build --target test_cmake_build + + + # Testing on Ubuntu + NVHPC (previous PGI) compilers, which seems to require more workarounds + ubuntu-nvhpc7: + runs-on: ubuntu-20.04 + name: "🐍 3 • NVHPC 23.5 • C++17 • x64" + + env: + # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND + DEBIAN_FRONTEND: 'noninteractive' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Add Python 3 and a few requirements - run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules + - name: Add NVHPC Repo + run: | + echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \ + sudo tee /etc/apt/sources.list.d/nvhpc.list - - name: Install CMake with pip + - name: Install 🐍 3 & NVHPC run: | + sudo apt-get update -y && \ + sudo apt-get install -y cmake environment-modules git python3-dev python3-pip python3-numpy && \ + sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \ + sudo rm -rf /var/lib/apt/lists/* python3 -m pip install --upgrade pip - python3 -m pip install cmake --prefer-binary - - - name: Install NVidia HPC SDK - run: yum -y install https://developer.download.nvidia.com/hpc-sdk/nvhpc-20-7-20.7-1.x86_64.rpm https://developer.download.nvidia.com/hpc-sdk/nvhpc-2020-20.7-1.x86_64.rpm + python3 -m pip install --upgrade pytest + # On some systems, you many need further workarounds: + # https://github.com/pybind/pybind11/pull/2475 - name: Configure shell: bash run: | source /etc/profile.d/modules.sh - module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.7 - cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/23.5 + cmake -S . -B build -DDOWNLOAD_CATCH=ON \ + -DCMAKE_CXX_STANDARD=17 \ + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ + -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ + -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" - name: Build run: cmake --build build -j 2 --verbose @@ -280,74 +496,29 @@ jobs: run: cmake --build build --target test_cmake_build - # Testing on CentOS 7 + PGI compilers, which seems to require more workarounds - centos-nvhpc7: - runs-on: ubuntu-latest - name: "🐍 3 • CentOS7 / PGI 20.9 • x64" - container: centos:7 - - steps: - - uses: actions/checkout@v2 - - - name: Add Python 3 and a few requirements - run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 - - - name: Install NVidia HPC SDK - run: yum -y install https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-20-9-20.9-1.x86_64.rpm https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-2020-20.9-1.x86_64.rpm - - # On CentOS 7, we have to filter a few tests (compiler internal error) - # and allow deeper templete recursion (not needed on CentOS 8 with a newer - # standard library). On some systems, you many need further workarounds: - # https://github.com/pybind/pybind11/pull/2475 - - name: Configure - shell: bash - run: | - source /etc/profile.d/modules.sh - module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.9 - cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ - -DCMAKE_CXX_STANDARD=11 \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ - -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ - -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp" - - # Building before installing Pip should produce a warning but not an error - - name: Build - run: cmake3 --build build -j 2 --verbose - - - name: Install CMake with pip - run: | - python3 -m pip install --upgrade pip - python3 -m pip install pytest - - - name: Python tests - run: cmake3 --build build --target pytest - - - name: C++ tests - run: cmake3 --build build --target cpptest - - - name: Interface test - run: cmake3 --build build --target test_cmake_build - # Testing on GCC using the GCC docker images (only recent images supported) gcc: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - gcc: - - 7 - - latest - std: - - 11 include: - - gcc: 10 - std: 20 + - { gcc: 7, std: 11 } + - { gcc: 7, std: 17 } + - { gcc: 8, std: 14 } + - { gcc: 8, std: 17 } + - { gcc: 9, std: 20 } + - { gcc: 10, std: 17 } + - { gcc: 10, std: 20 } + - { gcc: 11, std: 20 } + - { gcc: 12, std: 20 } + - { gcc: 13, std: 20 } name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64" container: "gcc:${{ matrix.gcc }}" steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Add Python 3 run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev @@ -355,10 +526,8 @@ jobs: - name: Update pip run: python3 -m pip install --upgrade pip - - name: Setup CMake 3.18 - uses: jwlawson/actions-setup-cmake@v1.4 - with: - cmake-version: 3.18 + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 - name: Configure shell: bash @@ -381,37 +550,162 @@ jobs: - name: Interface test run: cmake --build build --target test_cmake_build + - name: Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE + if: matrix.gcc == '12' + shell: bash + run: > + cmake -S . -B build_partial + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_CXX_STANDARD=${{ matrix.std }} + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" + + - name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE + if: matrix.gcc == '12' + run: cmake --build build_partial -j 2 + + - name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE + if: matrix.gcc == '12' + run: cmake --build build_partial --target pytest + + # Testing on ICC using the oneAPI apt repo + icc: + runs-on: ubuntu-20.04 + + name: "🐍 3 • ICC latest • x64" + + steps: + - uses: actions/checkout@v4 + + - name: Add apt repo + run: | + sudo apt-get update + sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + + - name: Add ICC & Python 3 + run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic cmake python3-dev python3-numpy python3-pytest python3-pip + + - name: Update pip + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + python3 -m pip install --upgrade pip + + - name: Install dependencies + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + python3 -m pip install -r tests/requirements.txt + + - name: Configure C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake -S . -B build-11 \ + -DPYBIND11_WERROR=ON \ + -DDOWNLOAD_CATCH=ON \ + -DDOWNLOAD_EIGEN=OFF \ + -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_CXX_COMPILER=$(which icpc) \ + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-11 -j 2 -v + + - name: Python tests C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + sudo service apport stop + cmake --build build-11 --target check + + - name: C++ tests C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-11 --target cpptest + + - name: Interface test C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-11 --target test_cmake_build + + - name: Configure C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake -S . -B build-17 \ + -DPYBIND11_WERROR=ON \ + -DDOWNLOAD_CATCH=ON \ + -DDOWNLOAD_EIGEN=OFF \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_CXX_COMPILER=$(which icpc) \ + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-17 -j 2 -v + + - name: Python tests C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + sudo service apport stop + cmake --build build-17 --target check + + - name: C++ tests C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-17 --target cpptest + + - name: Interface test C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-17 --target test_cmake_build + - # Testing on CentOS (manylinux uses a centos base, and this is an easy way - # to get GCC 4.8, which is the manylinux1 compiler). + # Testing on CentOS (manylinux uses a centos base). centos: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - centos: - - 7 # GCC 4.8 - - 8 + container: + - "almalinux:8" + - "almalinux:9" - name: "🐍 3 • CentOS ${{ matrix.centos }} • x64" - container: "centos:${{ matrix.centos }}" + name: "🐍 3 • ${{ matrix.container }} • x64" + container: "${{ matrix.container }}" steps: - - uses: actions/checkout@v2 + - name: Latest actions/checkout + uses: actions/checkout@v4 - - name: Add Python 3 - run: yum update -y && yum install -y python3-devel gcc-c++ make git + - name: Add Python 3.8 + if: matrix.container == 'almalinux:8' + run: dnf update -y && dnf install -y python38-devel gcc-c++ make git + + - name: Add Python 3 (default) + if: matrix.container != 'almalinux:8' + run: dnf update -y && dnf install -y python3-devel gcc-c++ make git - name: Update pip run: python3 -m pip install --upgrade pip - name: Install dependencies - run: python3 -m pip install cmake -r tests/requirements.txt --prefer-binary + run: | + python3 -m pip install cmake -r tests/requirements.txt + + - name: Ensure NumPy 2 is used (required Python >= 3.9) + if: matrix.container == 'almalinux:9' + run: | + python3 -m pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1' - name: Configure shell: bash run: > cmake -S . -B build + -DCMAKE_BUILD_TYPE=MinSizeRel -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -433,18 +727,18 @@ jobs: # This tests an "install" with the CMake tools install-classic: - name: "🐍 3.5 • Debian • x86 • Install" + name: "🐍 3.7 • Debian • x86 • Install" runs-on: ubuntu-latest - container: i386/debian:stretch + container: i386/debian:buster steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 # v1 is required to run inside docker - name: Install requirements run: | apt-get update apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip - pip3 install "pytest==3.1.*" + pip3 install "pytest==6.*" - name: Configure for install run: > @@ -469,33 +763,32 @@ jobs: -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") working-directory: /build-tests - - name: Run tests + - name: Python tests run: make pytest -j 2 working-directory: /build-tests # This verifies that the documentation is not horribly broken, and does a - # basic sanity check on the SDist. + # basic validation check on the SDist. doxygen: name: "Documentation build test" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" - name: Install Doxygen run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04 - - name: Install docs & setup requirements - run: python3 -m pip install -r docs/requirements.txt - - name: Build docs - run: python3 -m sphinx -W -b html docs docs/.build + run: pipx run nox -s docs - name: Make SDist - run: python3 setup.py sdist + run: pipx run nox -s build -- --sdist - run: git status --ignored @@ -507,7 +800,7 @@ jobs: - name: Compare Dists (headers only) working-directory: include run: | - python3 -m pip install --user -U ../dist/* + python3 -m pip install --user -U ../dist/*.tar.gz installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')") diff -rq $installed ./pybind11 @@ -516,40 +809,51 @@ jobs: fail-fast: false matrix: python: - - 3.5 - - 3.8 - - 3.9 - - pypy3 - # TODO: fix hang on pypy2 + - '3.7' + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' include: - - python: 3.9 - args: -DCMAKE_CXX_STANDARD=20 -DDOWNLOAD_EIGEN=OFF - - python: 3.8 + - python: '3.12' + args: -DCMAKE_CXX_STANDARD=20 + - python: '3.11' + args: -DCMAKE_CXX_STANDARD=20 + - python: '3.10' + args: -DCMAKE_CXX_STANDARD=20 + - python: '3.9' + args: -DCMAKE_CXX_STANDARD=20 + - python: '3.8' args: -DCMAKE_CXX_STANDARD=17 + - python: '3.7' + args: -DCMAKE_CXX_STANDARD=14 + name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}" - runs-on: windows-latest + runs-on: windows-2019 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: x86 - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.4 + uses: jwlawson/actions-setup-cmake@v2.0 - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1 + uses: ilammy/msvc-dev-cmd@v1.13.0 with: arch: x86 - name: Prepare env - run: python -m pip install -r tests/requirements.txt --prefer-binary + run: | + python -m pip install -r tests/requirements.txt # First build - C++11 mode and inplace - name: Configure ${{ matrix.args }} @@ -563,98 +867,375 @@ jobs: - name: Build C++11 run: cmake --build build -j 2 - - name: Run tests + - name: Python tests run: cmake --build build -t pytest - win32-msvc2015: - name: "🐍 ${{ matrix.python }} • MSVC 2015 • x64" - runs-on: windows-latest + win32-debug: strategy: fail-fast: false matrix: python: - - 2.7 - - 3.6 + - 3.8 + - 3.9 + + include: + - python: 3.9 + args: -DCMAKE_CXX_STANDARD=20 + - python: 3.8 + args: -DCMAKE_CXX_STANDARD=17 + + name: "🐍 ${{ matrix.python }} • MSVC 2019 (Debug) • x86 ${{ matrix.args }}" + runs-on: windows-2019 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Setup 🐍 ${{ matrix.python }} - uses: actions/setup-python@v2 + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + architecture: x86 - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.4 + uses: jwlawson/actions-setup-cmake@v2.0 - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1 + uses: ilammy/msvc-dev-cmd@v1.13.0 with: - toolset: 14.0 + arch: x86 - name: Prepare env - run: python -m pip install -r tests/requirements.txt --prefer-binary + run: | + python -m pip install -r tests/requirements.txt # First build - C++11 mode and inplace - - name: Configure + - name: Configure ${{ matrix.args }} run: > cmake -S . -B build - -G "Visual Studio 14 2015" -A x64 + -G "Visual Studio 16 2019" -A Win32 + -DCMAKE_BUILD_TYPE=Debug -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON + ${{ matrix.args }} + - name: Build C++11 + run: cmake --build build --config Debug -j 2 - - name: Build C++14 - run: cmake --build build -j 2 - - - name: Run all checks - run: cmake --build build -t check + - name: Python tests + run: cmake --build build --config Debug -t pytest - win32-msvc2017: - name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64" - runs-on: windows-2016 + windows-2022: strategy: fail-fast: false matrix: python: - - 3.7 - std: - - 14 + - 3.9 - include: - - python: 2.7 - std: 17 - args: > - -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR" + name: "🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64" + runs-on: windows-2022 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Setup 🐍 ${{ matrix.python }} - uses: actions/setup-python@v2 + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.4 - - name: Prepare env - run: python -m pip install -r tests/requirements.txt --prefer-binary + # Ensure use of NumPy 2 (via NumPy nightlies but can be changed soon) + run: | + python3 -m pip install -r tests/requirements.txt + python3 -m pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1' - # First build - C++11 mode and inplace - - name: Configure + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Configure C++20 run: > cmake -S . -B build - -G "Visual Studio 15 2017" -A x64 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - ${{ matrix.args }} + -DCMAKE_CXX_STANDARD=20 - - name: Build ${{ matrix.std }} + - name: Build C++20 run: cmake --build build -j 2 - - name: Run all checks - run: cmake --build build -t check + - name: Python tests + run: cmake --build build --target pytest + + - name: C++20 tests + run: cmake --build build --target cpptest -j 2 + + - name: Interface test C++20 + run: cmake --build build --target test_cmake_build + + - name: Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: > + cmake -S . -B build_partial + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=20 + "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" + + - name: Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial -j 2 + + - name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial --target pytest + + mingw: + name: "🐍 3 • windows-latest • ${{ matrix.sys }}" + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + strategy: + fail-fast: false + matrix: + include: + - { sys: mingw64, env: x86_64 } + - { sys: mingw32, env: i686 } + steps: + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + install: >- + git + mingw-w64-${{matrix.env}}-gcc + mingw-w64-${{matrix.env}}-python-pip + mingw-w64-${{matrix.env}}-python-numpy + mingw-w64-${{matrix.env}}-cmake + mingw-w64-${{matrix.env}}-make + mingw-w64-${{matrix.env}}-python-pytest + mingw-w64-${{matrix.env}}-boost + mingw-w64-${{matrix.env}}-catch + + - uses: msys2/setup-msys2@v2 + if: matrix.sys == 'mingw64' + with: + msystem: ${{matrix.sys}} + install: >- + git + mingw-w64-${{matrix.env}}-python-scipy + mingw-w64-${{matrix.env}}-eigen3 + + - uses: actions/checkout@v4 + + - name: Configure C++11 + # LTO leads to many undefined reference like + # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) + run: >- + cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + -S . -B build + + - name: Build C++11 + run: cmake --build build -j 2 + + - name: Python tests C++11 + run: cmake --build build --target pytest -j 2 + + - name: C++11 tests + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target cpptest -j 2 + + - name: Interface test C++11 + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + - name: Configure C++14 + run: >- + cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + -S . -B build2 + + - name: Build C++14 + run: cmake --build build2 -j 2 + + - name: Python tests C++14 + run: cmake --build build2 --target pytest -j 2 + + - name: C++14 tests + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target cpptest -j 2 + + - name: Interface test C++14 + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + - name: Configure C++17 + run: >- + cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + -S . -B build3 + + - name: Build C++17 + run: cmake --build build3 -j 2 + + - name: Python tests C++17 + run: cmake --build build3 --target pytest -j 2 + + - name: C++17 tests + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target cpptest -j 2 + + - name: Interface test C++17 + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build + + windows_clang: + + strategy: + matrix: + os: [windows-latest] + python: ['3.10'] + + runs-on: "${{ matrix.os }}" + + name: "🐍 ${{ matrix.python }} • ${{ matrix.os }} • clang-latest" + + steps: + - name: Show env + run: env + + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Clang + uses: egor-tensin/setup-clang@v1 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Install ninja-build tool + uses: seanmiddleditch/gha-setup-ninja@v5 + + - name: Run pip installs + run: | + python -m pip install --upgrade pip + python -m pip install -r tests/requirements.txt + + - name: Show Clang++ version + run: clang++ --version + + - name: Show CMake version + run: cmake --version + + # TODO: WERROR=ON + - name: Configure Clang + run: > + cmake -G Ninja -S . -B . + -DPYBIND11_WERROR=OFF + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_CXX_STANDARD=17 + + - name: Build + run: cmake --build . -j 2 + + - name: Python tests + run: cmake --build . --target pytest -j 2 + + - name: C++ tests + run: cmake --build . --target cpptest -j 2 + + - name: Interface test + run: cmake --build . --target test_cmake_build -j 2 + + - name: Clean directory + run: git clean -fdx + + macos_brew_install_llvm: + name: "macos-13 • brew install llvm" + runs-on: macos-13 + + env: + # https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew + LDFLAGS: '-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib' + + steps: + - name: Update PATH + run: echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH + + - name: Show env + run: env + + - name: Checkout + uses: actions/checkout@v4 + + - name: Show Clang++ version before brew install llvm + run: clang++ --version + + - name: brew install llvm + run: brew install llvm + + - name: Show Clang++ version after brew install llvm + run: clang++ --version + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Run pip installs + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -r tests/requirements.txt + python3 -m pip install numpy + python3 -m pip install scipy + + - name: Show CMake version + run: cmake --version + + - name: CMake Configure + run: > + cmake -S . -B . + -DPYBIND11_WERROR=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_CXX_STANDARD=17 + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build + run: cmake --build . -j 2 + + - name: Python tests + run: cmake --build . --target pytest -j 2 + + - name: C++ tests + run: cmake --build . --target cpptest -j 2 + + - name: Interface test + run: cmake --build . --target test_cmake_build -j 2 + + - name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: > + cmake -S . -B build_partial + -DPYBIND11_WERROR=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_CXX_STANDARD=17 + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" + + - name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial -j 2 + + - name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial --target pytest -j 2 + + - name: Clean directory + run: git clean -fdx diff --git a/examples/knxPython/pybind11/.github/workflows/configure.yml b/examples/knxPython/pybind11/.github/workflows/configure.yml index 23f60229..0e55a079 100644 --- a/examples/knxPython/pybind11/.github/workflows/configure.yml +++ b/examples/knxPython/pybind11/.github/workflows/configure.yml @@ -9,6 +9,14 @@ on: - stable - v* +permissions: + contents: read + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + # For cmake: + VERBOSE: 1 + jobs: # This tests various versions of CMake in various combinations, to make sure # the configure step passes. @@ -16,35 +24,35 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, macos-latest, windows-latest] + runs-on: [ubuntu-20.04, macos-13, windows-latest] arch: [x64] - cmake: [3.18] + cmake: ["3.26"] include: - - runs-on: ubuntu-latest + - runs-on: ubuntu-20.04 arch: x64 - cmake: 3.4 + cmake: "3.5" - - runs-on: macos-latest + - runs-on: ubuntu-20.04 arch: x64 - cmake: 3.7 + cmake: "3.29" - - runs-on: windows-2016 - arch: x86 - cmake: 3.8 + - runs-on: macos-13 + arch: x64 + cmake: "3.7" - - runs-on: windows-2016 - arch: x86 - cmake: 3.18 + - runs-on: windows-2019 + arch: x64 # x86 compilers seem to be missing on 2019 image + cmake: "3.18" name: 🐍 3.7 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python 3.7 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.7 architecture: ${{ matrix.arch }} @@ -55,7 +63,7 @@ jobs: # An action for adding a specific version of CMake: # https://github.com/jwlawson/actions-setup-cmake - name: Setup CMake ${{ matrix.cmake }} - uses: jwlawson/actions-setup-cmake@v1.3 + uses: jwlawson/actions-setup-cmake@v2.0 with: cmake-version: ${{ matrix.cmake }} diff --git a/examples/knxPython/pybind11/.github/workflows/emscripten.yaml b/examples/knxPython/pybind11/.github/workflows/emscripten.yaml new file mode 100644 index 00000000..14b2b9dc --- /dev/null +++ b/examples/knxPython/pybind11/.github/workflows/emscripten.yaml @@ -0,0 +1,30 @@ +name: WASM + +on: + workflow_dispatch: + pull_request: + branches: + - master + - stable + - v* + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-wasm-emscripten: + name: Pyodide wheel + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - uses: pypa/cibuildwheel@v2.20 + env: + PYODIDE_BUILD_EXPORTS: whole_archive + with: + package-dir: tests + only: cp312-pyodide_wasm32 diff --git a/examples/knxPython/pybind11/.github/workflows/format.yml b/examples/knxPython/pybind11/.github/workflows/format.yml index 708a8eef..e50dc0bb 100644 --- a/examples/knxPython/pybind11/.github/workflows/format.yml +++ b/examples/knxPython/pybind11/.github/workflows/format.yml @@ -12,30 +12,49 @@ on: - stable - "v*" +permissions: + contents: read + +env: + FORCE_COLOR: 3 + # For cmake: + VERBOSE: 1 + jobs: pre-commit: name: Format runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - name: Add matchers + run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" + - uses: pre-commit/action@v3.0.1 with: # Slow hooks are marked with manual - slow is okay here, run them too extra_args: --hook-stage manual --all-files clang-tidy: + # When making changes here, please also review the "Clang-Tidy" section + # in .github/CONTRIBUTING.md and update as needed. name: Clang-Tidy runs-on: ubuntu-latest - container: silkeh/clang:10 + container: silkeh/clang:18-bookworm steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install requirements - run: apt-get update && apt-get install -y python3-dev python3-pytest + run: apt-get update && apt-get install -y git python3-dev python3-pytest - name: Configure - run: cmake -S . -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--warnings-as-errors=*" + run: > + cmake -S . -B build + -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color;--warnings-as-errors=*" + -DDOWNLOAD_EIGEN=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_CXX_STANDARD=17 - name: Build - run: cmake --build build -j 2 + run: cmake --build build -j 2 -- --keep-going diff --git a/examples/knxPython/pybind11/.github/workflows/labeler.yml b/examples/knxPython/pybind11/.github/workflows/labeler.yml index a9ae729c..2152abbc 100644 --- a/examples/knxPython/pybind11/.github/workflows/labeler.yml +++ b/examples/knxPython/pybind11/.github/workflows/labeler.yml @@ -1,21 +1,25 @@ name: Labeler on: pull_request_target: + types: [closed] + +permissions: {} jobs: label: name: Labeler runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - - uses: actions/labeler@main - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - sync-labels: true - - - uses: actions/labeler@main - if: "github.event.action == 'closed' && github.event.pull_request.merged == true" + - uses: actions/labeler@v5 + if: > + github.event.pull_request.merged == true && + !startsWith(github.event.pull_request.title, 'chore(deps):') && + !startsWith(github.event.pull_request.title, 'ci(fix):') && + !startsWith(github.event.pull_request.title, 'docs(changelog):') with: repo-token: ${{ secrets.GITHUB_TOKEN }} configuration-path: .github/labeler_merged.yml - sync-labels: true diff --git a/examples/knxPython/pybind11/.github/workflows/pip.yml b/examples/knxPython/pybind11/.github/workflows/pip.yml index 4414a12e..37135373 100644 --- a/examples/knxPython/pybind11/.github/workflows/pip.yml +++ b/examples/knxPython/pybind11/.github/workflows/pip.yml @@ -12,24 +12,31 @@ on: types: - published +permissions: + contents: read + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + PIP_ONLY_BINARY: numpy + jobs: # This builds the sdists and wheels and makes sure the files are exactly as - # expected. Using Windows and Python 2.7, since that is often the most - # challenging matrix element. + # expected. test-packaging: - name: 🐍 2.7 • 📦 tests • windows-latest + name: 🐍 3.8 • 📦 tests • windows-latest runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Setup 🐍 2.7 - uses: actions/setup-python@v2 + - name: Setup 🐍 3.8 + uses: actions/setup-python@v5 with: - python-version: 2.7 + python-version: 3.8 - name: Prepare env - run: python -m pip install -r tests/requirements.txt --prefer-binary + run: | + python -m pip install -r tests/requirements.txt - name: Python Packaging tests run: pytest tests/extra_python_package/ @@ -42,15 +49,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup 🐍 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Prepare env - run: python -m pip install -r tests/requirements.txt build twine --prefer-binary + run: | + python -m pip install -r tests/requirements.txt build twine - name: Python Packaging tests run: pytest tests/extra_python_package/ @@ -64,13 +72,13 @@ jobs: run: twine check dist/* - name: Save standard package - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: standard path: dist/pybind11-* - name: Save global package - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: global path: dist/pybind11_global-* @@ -83,21 +91,30 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' needs: [packaging] + environment: + name: pypi + url: https://pypi.org/p/pybind11 + permissions: + id-token: write + attestations: write steps: - - uses: actions/setup-python@v2 - # Downloads all to directories matching the artifact names - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 + + - name: Generate artifact attestation for sdist and wheel + uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3 + with: + subject-path: "*/pybind11*" - name: Publish standard package - uses: pypa/gh-action-pypi-publish@v1.4.1 + uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.pypi_password }} - packages_dir: standard/ + packages-dir: standard/ + attestations: true - name: Publish global package - uses: pypa/gh-action-pypi-publish@v1.4.1 + uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.pypi_password_global }} - packages_dir: global/ + packages-dir: global/ + attestations: true diff --git a/examples/knxPython/pybind11/.github/workflows/upstream.yml b/examples/knxPython/pybind11/.github/workflows/upstream.yml new file mode 100644 index 00000000..38926003 --- /dev/null +++ b/examples/knxPython/pybind11/.github/workflows/upstream.yml @@ -0,0 +1,116 @@ +name: Upstream + +on: + workflow_dispatch: + pull_request: + +permissions: + contents: read + +concurrency: + group: upstream-${{ github.ref }} + cancel-in-progress: true + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + # For cmake: + VERBOSE: 1 + +jobs: + standard: + name: "🐍 3.13 latest • ubuntu-latest • x64" + runs-on: ubuntu-latest + # Only runs when the 'python dev' label is selected + if: "contains(github.event.pull_request.labels.*.name, 'python dev')" + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python 3.13 + uses: actions/setup-python@v5 + with: + python-version: "3.13" + allow-prereleases: true + + - name: Setup Boost + run: sudo apt-get install libboost-dev + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Run pip installs + run: | + python -m pip install --upgrade pip + python -m pip install -r tests/requirements.txt + + - name: Show platform info + run: | + python -m platform + cmake --version + pip list + + # First build - C++11 mode and inplace + - name: Configure C++11 + run: > + cmake -S . -B build11 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=11 + -DCMAKE_BUILD_TYPE=Debug + + - name: Build C++11 + run: cmake --build build11 -j 2 + + - name: Python tests C++11 + run: cmake --build build11 --target pytest -j 2 + + - name: C++11 tests + run: cmake --build build11 --target cpptest -j 2 + + - name: Interface test C++11 + run: cmake --build build11 --target test_cmake_build + + # Second build - C++17 mode and in a build directory + - name: Configure C++17 + run: > + cmake -S . -B build17 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + + - name: Build C++17 + run: cmake --build build17 -j 2 + + - name: Python tests C++17 + run: cmake --build build17 --target pytest + + - name: C++17 tests + run: cmake --build build17 --target cpptest + + # Third build - C++17 mode with unstable ABI + - name: Configure (unstable ABI) + run: > + cmake -S . -B build17max + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + -DPYBIND11_INTERNALS_VERSION=10000000 + + - name: Build (unstable ABI) + run: cmake --build build17max -j 2 + + - name: Python tests (unstable ABI) + run: cmake --build build17max --target pytest + + - name: Interface test (unstable ABI) + run: cmake --build build17max --target test_cmake_build + + # This makes sure the setup_helpers module can build packages using + # setuptools + - name: Setuptools helpers test + run: | + pip install setuptools + pytest tests/extra_setuptools diff --git a/examples/knxPython/pybind11/.gitignore b/examples/knxPython/pybind11/.gitignore index 3f36b89e..43d5094c 100644 --- a/examples/knxPython/pybind11/.gitignore +++ b/examples/knxPython/pybind11/.gitignore @@ -41,3 +41,6 @@ pybind11Targets.cmake /.vscode /pybind11/include/* /pybind11/share/* +/docs/_build/* +.ipynb_checkpoints/ +tests/main.cpp diff --git a/examples/knxPython/pybind11/.pre-commit-config.yaml b/examples/knxPython/pybind11/.pre-commit-config.yaml index cf519b47..a8190df4 100644 --- a/examples/knxPython/pybind11/.pre-commit-config.yaml +++ b/examples/knxPython/pybind11/.pre-commit-config.yaml @@ -12,89 +12,145 @@ # # See https://github.com/pre-commit/pre-commit + +ci: + autoupdate_commit_msg: "chore(deps): update pre-commit hooks" + autofix_commit_msg: "style: pre-commit fixes" + autoupdate_schedule: monthly + +# third-party content +exclude: ^tools/JoinPaths.cmake$ + repos: + +# Clang format the codebase automatically +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: "v18.1.8" + hooks: + - id: clang-format + types_or: [c++, c, cuda] + +# Ruff, the Python auto-correcting linter/formatter written in Rust +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.6.3 + hooks: + - id: ruff + args: ["--fix", "--show-fixes"] + - id: ruff-format + +# Check static types with mypy +- repo: https://github.com/pre-commit/mirrors-mypy + rev: "v1.11.2" + hooks: + - id: mypy + args: [] + exclude: ^(tests|docs)/ + additional_dependencies: + - markdown-it-py + - nox + - rich + - types-setuptools + +# CMake formatting +- repo: https://github.com/cheshirekow/cmake-format-precommit + rev: "v0.6.13" + hooks: + - id: cmake-format + additional_dependencies: [pyyaml] + types: [file] + files: (\.cmake|CMakeLists.txt)(.in)?$ + # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: "v4.6.0" hooks: - id: check-added-large-files - id: check-case-conflict + - id: check-docstring-first - id: check-merge-conflict - id: check-symlinks + - id: check-toml - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: mixed-line-ending - id: requirements-txt-fixer - id: trailing-whitespace - - id: fix-encoding-pragma -# Black, the code formatter, natively supports pre-commit -- repo: https://github.com/psf/black - rev: 20.8b1 +# Also code format the docs +- repo: https://github.com/adamchainz/blacken-docs + rev: "1.18.0" hooks: - - id: black - # By default, this ignores pyi files, though black supports them - types: [text] - files: \.pyi?$ + - id: blacken-docs + additional_dependencies: + - black==23.* # Changes tabs to spaces - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.9 + rev: "v1.5.5" hooks: - id: remove-tabs -# Flake8 also supports pre-commit natively (same author) -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.3 +# Avoid directional quotes +- repo: https://github.com/sirosen/texthooks + rev: "0.6.7" hooks: - - id: flake8 - additional_dependencies: [flake8-bugbear, pep8-naming] - exclude: ^(docs/.*|tools/.*)$ + - id: fix-ligatures + - id: fix-smartquotes -# CMake formatting -- repo: https://github.com/cheshirekow/cmake-format-precommit - rev: v0.6.13 +# Checking for common mistakes +- repo: https://github.com/pre-commit/pygrep-hooks + rev: "v1.10.0" hooks: - - id: cmake-format - additional_dependencies: [pyyaml] - types: [file] - files: (\.cmake|CMakeLists.txt)(.in)?$ - -# Check static types with mypy -- repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.790 - hooks: - - id: mypy - # The default Python type ignores .pyi files, so let's rerun if detected - types: [text] - files: ^pybind11.*\.pyi?$ - # Running per-file misbehaves a bit, so just run on all files, it's fast - pass_filenames: false + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal # Checks the manifest for missing files (native support) - repo: https://github.com/mgedmin/check-manifest - rev: "0.43" + rev: "0.49" hooks: - id: check-manifest # This is a slow hook, so only run this if --hook-stage manual is passed stages: [manual] additional_dependencies: [cmake, ninja] -# The original pybind11 checks for a few C++ style items +# Check for spelling +# Use tools/codespell_ignore_lines_from_errors.py +# to rebuild .codespell-ignore-lines +- repo: https://github.com/codespell-project/codespell + rev: "v2.3.0" + hooks: + - id: codespell + exclude: ".supp$" + args: ["-x.codespell-ignore-lines", "-Lccompiler,intstruct"] + +# Check for common shell mistakes +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: "v0.10.0.1" + hooks: + - id: shellcheck + +# Disallow some common capitalization mistakes - repo: local hooks: - id: disallow-caps name: Disallow improper capitalization language: pygrep - entry: PyBind|Numpy|Cmake - exclude: .pre-commit-config.yaml + entry: PyBind|\bNumpy\b|Cmake|CCache|PyTest + exclude: ^\.pre-commit-config.yaml$ -- repo: local +# PyLint has native support - not always usable, but works for us +- repo: https://github.com/PyCQA/pylint + rev: "v3.2.7" + hooks: + - id: pylint + files: ^pybind11 + +# Check schemas on some of our YAML files +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.29.2 hooks: - - id: check-style - name: Classic check-style - language: system - types: - - c++ - entry: ./tools/check-style.sh + - id: check-readthedocs + - id: check-github-workflows + - id: check-dependabot diff --git a/examples/knxPython/pybind11/.readthedocs.yml b/examples/knxPython/pybind11/.readthedocs.yml new file mode 100644 index 00000000..a2b802f7 --- /dev/null +++ b/examples/knxPython/pybind11/.readthedocs.yml @@ -0,0 +1,20 @@ +# https://blog.readthedocs.com/migrate-configuration-v2/ + +version: 2 + +build: + os: ubuntu-22.04 + apt_packages: + - librsvg2-bin + tools: + python: "3.11" + +sphinx: + configuration: docs/conf.py + +python: + install: + - requirements: docs/requirements.txt + +formats: + - pdf diff --git a/examples/knxPython/pybind11/CMakeLists.txt b/examples/knxPython/pybind11/CMakeLists.txt index 99cdd220..f53aa209 100644 --- a/examples/knxPython/pybind11/CMakeLists.txt +++ b/examples/knxPython/pybind11/CMakeLists.txt @@ -5,15 +5,30 @@ # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. -cmake_minimum_required(VERSION 3.4) +# Propagate this policy (FindPythonInterp removal) so it can be detected later +if(NOT CMAKE_VERSION VERSION_LESS "3.27") + cmake_policy(GET CMP0148 _pybind11_cmp0148) +endif() + +cmake_minimum_required(VERSION 3.5) -# The `cmake_minimum_required(VERSION 3.4...3.18)` syntax does not work with +# The `cmake_minimum_required(VERSION 3.5...3.29)` syntax does not work with # some versions of VS that have a patched CMake 3.11. This forces us to emulate # the behavior using the following workaround: -if(${CMAKE_VERSION} VERSION_LESS 3.18) +if(${CMAKE_VERSION} VERSION_LESS 3.29) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) else() - cmake_policy(VERSION 3.18) + cmake_policy(VERSION 3.29) +endif() + +if(_pybind11_cmp0148) + cmake_policy(SET CMP0148 ${_pybind11_cmp0148}) + unset(_pybind11_cmp0148) +endif() + +# Avoid infinite recursion if tests include this as a subdirectory +if(DEFINED PYBIND11_MASTER_PROJECT) + return() endif() # Extract project version from source @@ -73,32 +88,75 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() + + set(pybind11_system "") + + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + if(CMAKE_VERSION VERSION_LESS "3.18") + set(_pybind11_findpython_default OFF) + else() + set(_pybind11_findpython_default ON) + endif() else() set(PYBIND11_MASTER_PROJECT OFF) set(pybind11_system SYSTEM) + set(_pybind11_findpython_default OFF) endif() # Options option(PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT}) option(PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT}) option(PYBIND11_NOPYTHON "Disable search for Python" OFF) +option(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION + "To enforce that a handle_type_name<> specialization exists" OFF) +option(PYBIND11_SIMPLE_GIL_MANAGEMENT + "Use simpler GIL management logic that does not support disassociation" OFF) +option(PYBIND11_NUMPY_1_ONLY + "Disable NumPy 2 support to avoid changes to previous pybind11 versions." OFF) +set(PYBIND11_INTERNALS_VERSION + "" + CACHE STRING "Override the ABI version, may be used to enable the unstable ABI.") +option(PYBIND11_USE_CROSSCOMPILING "Respect CMAKE_CROSSCOMPILING" OFF) + +if(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION) + add_compile_definitions(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION) +endif() +if(PYBIND11_SIMPLE_GIL_MANAGEMENT) + add_compile_definitions(PYBIND11_SIMPLE_GIL_MANAGEMENT) +endif() +if(PYBIND11_NUMPY_1_ONLY) + add_compile_definitions(PYBIND11_NUMPY_1_ONLY) +endif() cmake_dependent_option( USE_PYTHON_INCLUDE_DIR "Install pybind11 headers in Python include directory instead of default installation prefix" OFF "PYBIND11_INSTALL" OFF) -cmake_dependent_option(PYBIND11_FINDPYTHON "Force new FindPython" OFF +cmake_dependent_option(PYBIND11_FINDPYTHON "Force new FindPython" ${_pybind11_findpython_default} "NOT CMAKE_VERSION VERSION_LESS 3.12" OFF) +# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests +# (makes transition easier while we support both modes). +if(PYBIND11_MASTER_PROJECT + AND PYBIND11_FINDPYTHON + AND DEFINED PYTHON_EXECUTABLE + AND NOT DEFINED Python_EXECUTABLE) + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") +endif() + # NB: when adding a header don't forget to also add it to setup.py set(PYBIND11_HEADERS include/pybind11/detail/class.h include/pybind11/detail/common.h + include/pybind11/detail/cpp_conduit.h include/pybind11/detail/descr.h include/pybind11/detail/init.h include/pybind11/detail/internals.h + include/pybind11/detail/type_caster_base.h include/pybind11/detail/typeid.h + include/pybind11/detail/value_and_holder.h + include/pybind11/detail/exception_translation.h include/pybind11/attr.h include/pybind11/buffer_info.h include/pybind11/cast.h @@ -107,8 +165,13 @@ set(PYBIND11_HEADERS include/pybind11/complex.h include/pybind11/options.h include/pybind11/eigen.h + include/pybind11/eigen/common.h + include/pybind11/eigen/matrix.h + include/pybind11/eigen/tensor.h include/pybind11/embed.h include/pybind11/eval.h + include/pybind11/gil.h + include/pybind11/gil_safe_call_once.h include/pybind11/iostream.h include/pybind11/functional.h include/pybind11/numpy.h @@ -116,7 +179,10 @@ set(PYBIND11_HEADERS include/pybind11/pybind11.h include/pybind11/pytypes.h include/pybind11/stl.h - include/pybind11/stl_bind.h) + include/pybind11/stl_bind.h + include/pybind11/stl/filesystem.h + include/pybind11/type_caster_pyobject_ptr.h + include/pybind11/typing.h) # Compare with grep and warn if mismatched if(PYBIND11_MASTER_PROJECT AND NOT CMAKE_VERSION VERSION_LESS 3.12) @@ -142,24 +208,50 @@ endif() string(REPLACE "include/" "${CMAKE_CURRENT_SOURCE_DIR}/include/" PYBIND11_HEADERS "${PYBIND11_HEADERS}") -# Cache variables so pybind11_add_module can be used in parent projects -set(PYBIND11_INCLUDE_DIR +# Cache variable so this can be used in parent projects +set(pybind11_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include" - CACHE INTERNAL "") + CACHE INTERNAL "Directory where pybind11 headers are located") + +# Backward compatible variable for add_subdirectory mode +if(NOT PYBIND11_MASTER_PROJECT) + set(PYBIND11_INCLUDE_DIR + "${pybind11_INCLUDE_DIR}" + CACHE INTERNAL "") +endif() # Note: when creating targets, you cannot use if statements at configure time - # you need generator expressions, because those will be placed in the target file. # You can also place ifs *in* the Config.in, but not here. # This section builds targets, but does *not* touch Python - -# Build the headers-only target (no Python included): -# (long name used here to keep this from clashing in subdirectory mode) -add_library(pybind11_headers INTERFACE) -add_library(pybind11::pybind11_headers ALIAS pybind11_headers) # to match exported target -add_library(pybind11::headers ALIAS pybind11_headers) # easier to use/remember +# Non-IMPORT targets cannot be defined twice +if(NOT TARGET pybind11_headers) + # Build the headers-only target (no Python included): + # (long name used here to keep this from clashing in subdirectory mode) + add_library(pybind11_headers INTERFACE) + add_library(pybind11::pybind11_headers ALIAS pybind11_headers) # to match exported target + add_library(pybind11::headers ALIAS pybind11_headers) # easier to use/remember + + target_include_directories( + pybind11_headers ${pybind11_system} INTERFACE $ + $) + + target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals + cxx_right_angle_brackets) + if(NOT "${PYBIND11_INTERNALS_VERSION}" STREQUAL "") + target_compile_definitions( + pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION}") + endif() +else() + # It is invalid to install a target twice, too. + set(PYBIND11_INSTALL OFF) +endif() include("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11Common.cmake") +# https://github.com/jtojnar/cmake-snips/#concatenating-paths-when-building-pkg-config-files +# TODO: cmake 3.20 adds the cmake_path() function, which obsoletes this snippet +include("${CMAKE_CURRENT_SOURCE_DIR}/tools/JoinPaths.cmake") # Relative directory setting if(USE_PYTHON_INCLUDE_DIR AND DEFINED Python_INCLUDE_DIRS) @@ -168,20 +260,18 @@ elseif(USE_PYTHON_INCLUDE_DIR AND DEFINED PYTHON_INCLUDE_DIR) file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${PYTHON_INCLUDE_DIRS}) endif() -# Fill in headers target -target_include_directories( - pybind11_headers ${pybind11_system} INTERFACE $ - $) - -target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals - cxx_right_angle_brackets) - if(PYBIND11_INSTALL) - install(DIRECTORY ${PYBIND11_INCLUDE_DIR}/pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) set(PYBIND11_CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME}" CACHE STRING "install path for pybind11Config.cmake") + if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}") + set(pybind11_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + else() + set(pybind11_INCLUDEDIR "\$\{PACKAGE_PREFIX_DIR\}/${CMAKE_INSTALL_INCLUDEDIR}") + endif() + configure_package_config_file( tools/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" INSTALL_DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) @@ -213,6 +303,7 @@ if(PYBIND11_INSTALL) tools/pybind11Common.cmake tools/pybind11Tools.cmake tools/pybind11NewTools.cmake + tools/pybind11GuessPythonExtSuffix.cmake DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) if(NOT PYBIND11_EXPORT_NAME) @@ -226,6 +317,30 @@ if(PYBIND11_INSTALL) NAMESPACE "pybind11::" DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) + # pkg-config support + if(NOT prefix_for_pc_file) + if(IS_ABSOLUTE "${CMAKE_INSTALL_DATAROOTDIR}") + set(prefix_for_pc_file "${CMAKE_INSTALL_PREFIX}") + else() + set(pc_datarootdir "${CMAKE_INSTALL_DATAROOTDIR}") + if(CMAKE_VERSION VERSION_LESS 3.20) + set(prefix_for_pc_file "\${pcfiledir}/..") + while(pc_datarootdir) + get_filename_component(pc_datarootdir "${pc_datarootdir}" DIRECTORY) + string(APPEND prefix_for_pc_file "/..") + endwhile() + else() + cmake_path(RELATIVE_PATH CMAKE_INSTALL_PREFIX BASE_DIRECTORY CMAKE_INSTALL_DATAROOTDIR + OUTPUT_VARIABLE prefix_for_pc_file) + endif() + endif() + endif() + join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/") + # Uninstall target if(PYBIND11_MASTER_PROJECT) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake_uninstall.cmake.in" @@ -259,8 +374,5 @@ endif() if(NOT PYBIND11_MASTER_PROJECT) set(pybind11_FOUND TRUE - CACHE INTERNAL "true if pybind11 and all required components found on the system") - set(pybind11_INCLUDE_DIR - "${PYBIND11_INCLUDE_DIR}" - CACHE INTERNAL "Directory where pybind11 headers are located") + CACHE INTERNAL "True if pybind11 and all required components found on the system") endif() diff --git a/examples/knxPython/pybind11/MANIFEST.in b/examples/knxPython/pybind11/MANIFEST.in index aed183e8..7ce83c55 100644 --- a/examples/knxPython/pybind11/MANIFEST.in +++ b/examples/knxPython/pybind11/MANIFEST.in @@ -1,6 +1,6 @@ +prune tests recursive-include pybind11/include/pybind11 *.h recursive-include pybind11 *.py recursive-include pybind11 py.typed -recursive-include pybind11 *.pyi include pybind11/share/cmake/pybind11/*.cmake -include LICENSE README.rst pyproject.toml setup.py setup.cfg +include LICENSE README.rst SECURITY.md pyproject.toml setup.py setup.cfg diff --git a/examples/knxPython/pybind11/README.rst b/examples/knxPython/pybind11/README.rst index 1474cb95..0d1e1d29 100644 --- a/examples/knxPython/pybind11/README.rst +++ b/examples/knxPython/pybind11/README.rst @@ -3,20 +3,16 @@ **pybind11 — Seamless operability between C++11 and Python** -|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |CI| |Build status| +|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions| |CI| |Build status| -.. warning:: +|Repology| |PyPI package| |Conda-forge| |Python Versions| - Combining older versions of pybind11 (< 2.6.0) with the brand-new Python - 3.9.0 will trigger undefined behavior that typically manifests as crashes - during interpreter shutdown (but could also destroy your data. **You have been - warned.**) +`Setuptools example `_ +• `Scikit-build example `_ +• `CMake example `_ + +.. start - We recommend that you wait for Python 3.9.1 slated for release in December, - which will include a `fix `_ - that resolves this problem. In the meantime, please update to the latest - version of pybind11 (2.6.0 or newer), which includes a temporary workaround - specifically when Python 3.9.0 is detected at runtime. **pybind11** is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing @@ -36,14 +32,14 @@ this heavy machinery has become an excessively large and unnecessary dependency. Think of this library as a tiny self-contained version of Boost.Python -with everything stripped away that isn’t relevant for binding +with everything stripped away that isn't relevant for binding generation. Without comments, the core header files only require ~4K -lines of code and depend on Python (2.7 or 3.5+, or PyPy) and the C++ +lines of code and depend on Python (3.7+, or PyPy) and the C++ standard library. This compact implementation was possible thanks to -some of the new C++11 language features (specifically: tuples, lambda -functions and variadic templates). Since its creation, this library has -grown beyond Boost.Python in many ways, leading to dramatically simpler -binding code in many common situations. +some C++11 language features (specifically: tuples, lambda functions and +variadic templates). Since its creation, this library has grown beyond +Boost.Python in many ways, leading to dramatically simpler binding code in many +common situations. Tutorial and reference documentation is provided at `pybind11.readthedocs.io `_. @@ -75,6 +71,7 @@ pybind11 can map the following core C++ features to Python: - Internal references with correct reference counting - C++ classes with virtual (and pure virtual) methods can be extended in Python +- Integrated NumPy support (NumPy 2 requires pybind11 2.12+) Goodies ------- @@ -82,8 +79,8 @@ Goodies In addition to the core functionality, pybind11 provides some extra goodies: -- Python 2.7, 3.5+, and PyPy/PyPy3 7.3 are supported with an - implementation-agnostic interface. +- Python 3.7+, and PyPy3 7.3 are supported with an implementation-agnostic + interface (pybind11 2.9 was the last version to support Python 2 and 3.5). - It is possible to bind C++11 lambda functions with captured variables. The lambda capture data is stored inside the resulting @@ -92,8 +89,8 @@ goodies: - pybind11 uses C++11 move constructors and move assignment operators whenever possible to efficiently transfer custom data types. -- It’s easy to expose the internal storage of custom data types through - Pythons’ buffer protocols. This is handy e.g. for fast conversion +- It's easy to expose the internal storage of custom data types through + Pythons' buffer protocols. This is handy e.g. for fast conversion between C++ matrix classes like Eigen and NumPy without expensive copy operations. @@ -101,7 +98,7 @@ goodies: transparently applied to all entries of one or more NumPy array arguments. -- Python’s slice-based access and assignment operations can be +- Python's slice-based access and assignment operations can be supported with just a few lines of code. - Everything is contained in just a few header files; there is no need @@ -110,7 +107,7 @@ goodies: - Binaries are generally smaller by a factor of at least 2 compared to equivalent bindings generated by Boost.Python. A recent pybind11 conversion of PyRosetta, an enormous Boost.Python binding project, - `reported `_ + `reported `_ a binary size reduction of **5.4x** and compile time reduction by **5.8x**. @@ -123,15 +120,14 @@ goodies: Supported compilers ------------------- -1. Clang/LLVM 3.3 or newer (for Apple Xcode’s clang, this is 5.0.0 or +1. Clang/LLVM 3.3 or newer (for Apple Xcode's clang, this is 5.0.0 or newer) 2. GCC 4.8 or newer -3. Microsoft Visual Studio 2015 Update 3 or newer -4. Intel C++ compiler 18 or newer - (`possible issue `_ on 20.2) -5. Cygwin/GCC (tested on 2.5.1) -6. NVCC (CUDA 11.0 tested) -7. NVIDIA PGI (20.7 and 20.9 tested) +3. Microsoft Visual Studio 2017 or newer +4. Intel classic C++ compiler 18 or newer (ICC 20.2 tested in CI) +5. Cygwin/GCC (previously tested on 2.5.1) +6. NVCC (CUDA 11.0 tested in CI) +7. NVIDIA PGI (20.9 tested in CI) About ----- @@ -139,9 +135,9 @@ About This project was created by `Wenzel Jakob `_. Significant features and/or improvements to the code were contributed by Jonas Adler, Lori A. Burns, -Sylvain Corlay, Eric Cousineau, Ralf Grosse-Kunstleve, Trent Houliston, Axel -Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov Johan Mabille, Tomasz Miąsko, -Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schäling, Pim +Sylvain Corlay, Eric Cousineau, Aaron Gokaslan, Ralf Grosse-Kunstleve, Trent Houliston, Axel +Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov, Johan Mabille, Tomasz Miąsko, +Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schäling, Pim Schellart, Henry Schreiner, Ivan Smirnov, Boris Staletic, and Patrick Stewart. We thank Google for a generous financial contribution to the continuous @@ -165,7 +161,7 @@ to the terms and conditions of this license. .. |Latest Documentation Status| image:: https://readthedocs.org/projects/pybind11/badge?version=latest :target: http://pybind11.readthedocs.org/en/latest -.. |Stable Documentation Status| image:: https://img.shields.io/badge/docs-stable-blue +.. |Stable Documentation Status| image:: https://img.shields.io/badge/docs-stable-blue.svg :target: http://pybind11.readthedocs.org/en/stable .. |Gitter chat| image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg :target: https://gitter.im/pybind/Lobby @@ -173,3 +169,13 @@ to the terms and conditions of this license. :target: https://github.com/pybind/pybind11/actions .. |Build status| image:: https://ci.appveyor.com/api/projects/status/riaj54pn4h08xy40?svg=true :target: https://ci.appveyor.com/project/wjakob/pybind11 +.. |PyPI package| image:: https://img.shields.io/pypi/v/pybind11.svg + :target: https://pypi.org/project/pybind11/ +.. |Conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pybind11.svg + :target: https://github.com/conda-forge/pybind11-feedstock +.. |Repology| image:: https://repology.org/badge/latest-versions/python:pybind11.svg + :target: https://repology.org/project/python:pybind11/versions +.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/pybind11.svg + :target: https://pypi.org/project/pybind11/ +.. |GitHub Discussions| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github + :target: https://github.com/pybind/pybind11/discussions diff --git a/examples/knxPython/pybind11/SECURITY.md b/examples/knxPython/pybind11/SECURITY.md new file mode 100644 index 00000000..3d74611f --- /dev/null +++ b/examples/knxPython/pybind11/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +Security updates are applied only to the latest release. + +## Reporting a Vulnerability + +If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. + +Please disclose it at [security advisory](https://github.com/pybind/pybind11/security/advisories/new). + +This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure. diff --git a/examples/knxPython/pybind11/docs/Doxyfile b/examples/knxPython/pybind11/docs/Doxyfile index c8562952..09138db3 100644 --- a/examples/knxPython/pybind11/docs/Doxyfile +++ b/examples/knxPython/pybind11/docs/Doxyfile @@ -18,6 +18,4 @@ ALIASES += "endrst=\endverbatim" QUIET = YES WARNINGS = YES WARN_IF_UNDOCUMENTED = NO -PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ - PY_MAJOR_VERSION=3 \ - PYBIND11_NOINLINE +PREDEFINED = PYBIND11_NOINLINE diff --git a/examples/knxPython/pybind11/docs/_static/css/custom.css b/examples/knxPython/pybind11/docs/_static/css/custom.css new file mode 100644 index 00000000..7a49a6ac --- /dev/null +++ b/examples/knxPython/pybind11/docs/_static/css/custom.css @@ -0,0 +1,3 @@ +.highlight .go { + color: #707070; +} diff --git a/examples/knxPython/pybind11/docs/advanced/cast/custom.rst b/examples/knxPython/pybind11/docs/advanced/cast/custom.rst index a779444c..8138cac6 100644 --- a/examples/knxPython/pybind11/docs/advanced/cast/custom.rst +++ b/examples/knxPython/pybind11/docs/advanced/cast/custom.rst @@ -26,7 +26,9 @@ The following Python snippet demonstrates the intended usage from the Python sid def __int__(self): return 123 + from example import print + print(A()) To register the necessary conversion routines, it is necessary to add an @@ -36,7 +38,7 @@ type is explicitly allowed. .. code-block:: cpp - namespace pybind11 { namespace detail { + namespace PYBIND11_NAMESPACE { namespace detail { template <> struct type_caster { public: /** @@ -44,7 +46,7 @@ type is explicitly allowed. * function signatures and declares a local variable * 'value' of type inty */ - PYBIND11_TYPE_CASTER(inty, _("inty")); + PYBIND11_TYPE_CASTER(inty, const_name("inty")); /** * Conversion part 1 (Python->C++): convert a PyObject into a inty @@ -76,7 +78,7 @@ type is explicitly allowed. return PyLong_FromLong(src.long_value); } }; - }} // namespace pybind11::detail + }} // namespace PYBIND11_NAMESPACE::detail .. note:: diff --git a/examples/knxPython/pybind11/docs/advanced/cast/eigen.rst b/examples/knxPython/pybind11/docs/advanced/cast/eigen.rst index e01472d5..894ce97f 100644 --- a/examples/knxPython/pybind11/docs/advanced/cast/eigen.rst +++ b/examples/knxPython/pybind11/docs/advanced/cast/eigen.rst @@ -52,7 +52,7 @@ can be mapped *and* if the numpy array is writeable (that is the passed variable will be transparently carried out directly on the ``numpy.ndarray``. -This means you can can write code such as the following and have it work as +This means you can write code such as the following and have it work as expected: .. code-block:: cpp @@ -112,7 +112,7 @@ example: .. code-block:: python a = MyClass() - m = a.get_matrix() # flags.writeable = True, flags.owndata = False + m = a.get_matrix() # flags.writeable = True, flags.owndata = False v = a.view_matrix() # flags.writeable = False, flags.owndata = False c = a.copy_matrix() # flags.writeable = True, flags.owndata = True # m[5,6] and v[5,6] refer to the same element, c[5,6] does not. @@ -203,7 +203,7 @@ adding the ``order='F'`` option when creating an array: .. code-block:: python - myarray = np.array(source, order='F') + myarray = np.array(source, order="F") Such an object will be passable to a bound function accepting an ``Eigen::Ref`` (or similar column-major Eigen type). @@ -259,7 +259,7 @@ copying to take place: "small"_a // <- This one can be copied if needed ); -With the above binding code, attempting to call the the ``some_method(m)`` +With the above binding code, attempting to call the ``some_method(m)`` method on a ``MyClass`` object, or attempting to call ``some_function(m, m2)`` will raise a ``RuntimeError`` rather than making a temporary copy of the array. It will, however, allow the ``m2`` argument to be copied into a temporary if diff --git a/examples/knxPython/pybind11/docs/advanced/cast/functional.rst b/examples/knxPython/pybind11/docs/advanced/cast/functional.rst new file mode 100644 index 00000000..d9b46057 --- /dev/null +++ b/examples/knxPython/pybind11/docs/advanced/cast/functional.rst @@ -0,0 +1,109 @@ +Functional +########## + +The following features must be enabled by including :file:`pybind11/functional.h`. + + +Callbacks and passing anonymous functions +========================================= + +The C++11 standard brought lambda functions and the generic polymorphic +function wrapper ``std::function<>`` to the C++ programming language, which +enable powerful new ways of working with functions. Lambda functions come in +two flavors: stateless lambda function resemble classic function pointers that +link to an anonymous piece of code, while stateful lambda functions +additionally depend on captured variables that are stored in an anonymous +*lambda closure object*. + +Here is a simple example of a C++ function that takes an arbitrary function +(stateful or stateless) with signature ``int -> int`` as an argument and runs +it with the value 10. + +.. code-block:: cpp + + int func_arg(const std::function &f) { + return f(10); + } + +The example below is more involved: it takes a function of signature ``int -> int`` +and returns another function of the same kind. The return value is a stateful +lambda function, which stores the value ``f`` in the capture object and adds 1 to +its return value upon execution. + +.. code-block:: cpp + + std::function func_ret(const std::function &f) { + return [f](int i) { + return f(i) + 1; + }; + } + +This example demonstrates using python named parameters in C++ callbacks which +requires using ``py::cpp_function`` as a wrapper. Usage is similar to defining +methods of classes: + +.. code-block:: cpp + + py::cpp_function func_cpp() { + return py::cpp_function([](int i) { return i+1; }, + py::arg("number")); + } + +After including the extra header file :file:`pybind11/functional.h`, it is almost +trivial to generate binding code for all of these functions. + +.. code-block:: cpp + + #include + + PYBIND11_MODULE(example, m) { + m.def("func_arg", &func_arg); + m.def("func_ret", &func_ret); + m.def("func_cpp", &func_cpp); + } + +The following interactive session shows how to call them from Python. + +.. code-block:: pycon + + $ python + >>> import example + >>> def square(i): + ... return i * i + ... + >>> example.func_arg(square) + 100L + >>> square_plus_1 = example.func_ret(square) + >>> square_plus_1(4) + 17L + >>> plus_1 = func_cpp() + >>> plus_1(number=43) + 44L + +.. warning:: + + Keep in mind that passing a function from C++ to Python (or vice versa) + will instantiate a piece of wrapper code that translates function + invocations between the two languages. Naturally, this translation + increases the computational cost of each function call somewhat. A + problematic situation can arise when a function is copied back and forth + between Python and C++ many times in a row, in which case the underlying + wrappers will accumulate correspondingly. The resulting long sequence of + C++ -> Python -> C++ -> ... roundtrips can significantly decrease + performance. + + There is one exception: pybind11 detects case where a stateless function + (i.e. a function pointer or a lambda function without captured variables) + is passed as an argument to another C++ function exposed in Python. In this + case, there is no overhead. Pybind11 will extract the underlying C++ + function pointer from the wrapped function to sidestep a potential C++ -> + Python -> C++ roundtrip. This is demonstrated in :file:`tests/test_callbacks.cpp`. + +.. note:: + + This functionality is very useful when generating bindings for callbacks in + C++ libraries (e.g. GUI libraries, asynchronous networking libraries, etc.). + + The file :file:`tests/test_callbacks.cpp` contains a complete example + that demonstrates how to work with callbacks and anonymous functions in + more detail. diff --git a/examples/knxPython/pybind11/docs/advanced/cast/overview.rst b/examples/knxPython/pybind11/docs/advanced/cast/overview.rst index b0e32a52..011bd4c7 100644 --- a/examples/knxPython/pybind11/docs/advanced/cast/overview.rst +++ b/examples/knxPython/pybind11/docs/advanced/cast/overview.rst @@ -75,91 +75,96 @@ The following basic data types are supported out of the box (some may require an additional extension header to be included). To pass other data structures as arguments and return values, refer to the section on binding :ref:`classes`. -+------------------------------------+---------------------------+-------------------------------+ -| Data type | Description | Header file | -+====================================+===========================+===============================+ -| ``int8_t``, ``uint8_t`` | 8-bit integers | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``int16_t``, ``uint16_t`` | 16-bit integers | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``int32_t``, ``uint32_t`` | 32-bit integers | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``int64_t``, ``uint64_t`` | 64-bit integers | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``ssize_t``, ``size_t`` | Platform-dependent size | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``float``, ``double`` | Floating point types | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``bool`` | Two-state Boolean type | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``char`` | Character literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``char16_t`` | UTF-16 character literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``char32_t`` | UTF-32 character literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``wchar_t`` | Wide character literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``const char *`` | UTF-8 string literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``const char16_t *`` | UTF-16 string literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``const char32_t *`` | UTF-32 string literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``const wchar_t *`` | Wide string literal | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::string`` | STL dynamic UTF-8 string | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::u16string`` | STL dynamic UTF-16 string | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::u32string`` | STL dynamic UTF-32 string | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::wstring`` | STL dynamic wide string | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::string_view``, | STL C++17 string views | :file:`pybind11/pybind11.h` | -| ``std::u16string_view``, etc. | | | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::pair`` | Pair of two custom types | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::tuple<...>`` | Arbitrary tuple of types | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::reference_wrapper<...>`` | Reference type wrapper | :file:`pybind11/pybind11.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::complex`` | Complex numbers | :file:`pybind11/complex.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::array`` | STL static array | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::vector`` | STL dynamic array | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::deque`` | STL double-ended queue | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::valarray`` | STL value array | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::list`` | STL linked list | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::map`` | STL ordered map | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::unordered_map`` | STL unordered map | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::set`` | STL ordered set | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::unordered_set`` | STL unordered set | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::optional`` | STL optional type (C++17) | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::experimental::optional`` | STL optional type (exp.) | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::variant<...>`` | Type-safe union (C++17) | :file:`pybind11/stl.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::function<...>`` | STL polymorphic function | :file:`pybind11/functional.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::chrono::duration<...>`` | STL time duration | :file:`pybind11/chrono.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``std::chrono::time_point<...>`` | STL date/time | :file:`pybind11/chrono.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``Eigen::Matrix<...>`` | Eigen: dense matrix | :file:`pybind11/eigen.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``Eigen::Map<...>`` | Eigen: mapped memory | :file:`pybind11/eigen.h` | -+------------------------------------+---------------------------+-------------------------------+ -| ``Eigen::SparseMatrix<...>`` | Eigen: sparse matrix | :file:`pybind11/eigen.h` | -+------------------------------------+---------------------------+-------------------------------+ ++------------------------------------+---------------------------+-----------------------------------+ +| Data type | Description | Header file | ++====================================+===========================+===================================+ +| ``int8_t``, ``uint8_t`` | 8-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``int16_t``, ``uint16_t`` | 16-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``int32_t``, ``uint32_t`` | 32-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``int64_t``, ``uint64_t`` | 64-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``ssize_t``, ``size_t`` | Platform-dependent size | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``float``, ``double`` | Floating point types | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``bool`` | Two-state Boolean type | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``char`` | Character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``char16_t`` | UTF-16 character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``char32_t`` | UTF-32 character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``wchar_t`` | Wide character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const char *`` | UTF-8 string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const char16_t *`` | UTF-16 string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const char32_t *`` | UTF-32 string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const wchar_t *`` | Wide string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::string`` | STL dynamic UTF-8 string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::u16string`` | STL dynamic UTF-16 string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::u32string`` | STL dynamic UTF-32 string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::wstring`` | STL dynamic wide string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::string_view``, | STL C++17 string views | :file:`pybind11/pybind11.h` | +| ``std::u16string_view``, etc. | | | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::pair`` | Pair of two custom types | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::tuple<...>`` | Arbitrary tuple of types | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::reference_wrapper<...>`` | Reference type wrapper | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::complex`` | Complex numbers | :file:`pybind11/complex.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::array`` | STL static array | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::vector`` | STL dynamic array | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::deque`` | STL double-ended queue | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::valarray`` | STL value array | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::list`` | STL linked list | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::map`` | STL ordered map | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::unordered_map`` | STL unordered map | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::set`` | STL ordered set | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::unordered_set`` | STL unordered set | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::optional`` | STL optional type (C++17) | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::experimental::optional`` | STL optional type (exp.) | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::variant<...>`` | Type-safe union (C++17) | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::filesystem::path`` | STL path (C++17) [#]_ | :file:`pybind11/stl/filesystem.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::function<...>`` | STL polymorphic function | :file:`pybind11/functional.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::chrono::duration<...>`` | STL time duration | :file:`pybind11/chrono.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::chrono::time_point<...>`` | STL date/time | :file:`pybind11/chrono.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``Eigen::Matrix<...>`` | Eigen: dense matrix | :file:`pybind11/eigen.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``Eigen::Map<...>`` | Eigen: mapped memory | :file:`pybind11/eigen.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``Eigen::SparseMatrix<...>`` | Eigen: sparse matrix | :file:`pybind11/eigen.h` | ++------------------------------------+---------------------------+-----------------------------------+ + +.. [#] ``std::filesystem::path`` is converted to ``pathlib.Path`` and + ``os.PathLike`` is converted to ``std::filesystem::path``. diff --git a/examples/knxPython/pybind11/docs/advanced/cast/stl.rst b/examples/knxPython/pybind11/docs/advanced/cast/stl.rst index 70fde0d2..42b85532 100644 --- a/examples/knxPython/pybind11/docs/advanced/cast/stl.rst +++ b/examples/knxPython/pybind11/docs/advanced/cast/stl.rst @@ -42,7 +42,7 @@ types: .. code-block:: cpp // `boost::optional` as an example -- can be any `std::optional`-like container - namespace pybind11 { namespace detail { + namespace PYBIND11_NAMESPACE { namespace detail { template struct type_caster> : optional_caster> {}; }} @@ -54,7 +54,7 @@ for custom variant types: .. code-block:: cpp // `boost::variant` as an example -- can be any `std::variant`-like container - namespace pybind11 { namespace detail { + namespace PYBIND11_NAMESPACE { namespace detail { template struct type_caster> : variant_caster> {}; @@ -66,18 +66,27 @@ for custom variant types: return boost::apply_visitor(args...); } }; - }} // namespace pybind11::detail + }} // namespace PYBIND11_NAMESPACE::detail The ``visit_helper`` specialization is not required if your ``name::variant`` provides a ``name::visit()`` function. For any other function name, the specialization must be included to tell pybind11 how to visit the variant. +.. warning:: + + When converting a ``variant`` type, pybind11 follows the same rules as when + determining which function overload to call (:ref:`overload_resolution`), and + so the same caveats hold. In particular, the order in which the ``variant``'s + alternatives are listed is important, since pybind11 will try conversions in + this order. This means that, for example, when converting ``variant``, + the ``bool`` variant will never be selected, as any Python ``bool`` is already + an ``int`` and is convertible to a C++ ``int``. Changing the order of alternatives + (and using ``variant``, in this example) provides a solution. + .. note:: pybind11 only supports the modern implementation of ``boost::variant`` which makes use of variadic templates. This requires Boost 1.56 or newer. - Additionally, on Windows, MSVC 2017 is required because ``boost::variant`` - falls back to the old non-variadic implementation on MSVC 2015. .. _opaque: @@ -153,7 +162,7 @@ the declaration .. code-block:: cpp - PYBIND11_MAKE_OPAQUE(std::vector); + PYBIND11_MAKE_OPAQUE(std::vector) before any binding code (e.g. invocations to ``class_::def()``, etc.). This macro must be specified at the top level (and outside of any namespaces), since @@ -198,8 +207,8 @@ The following example showcases usage of :file:`pybind11/stl_bind.h`: // Don't forget this #include - PYBIND11_MAKE_OPAQUE(std::vector); - PYBIND11_MAKE_OPAQUE(std::map); + PYBIND11_MAKE_OPAQUE(std::vector) + PYBIND11_MAKE_OPAQUE(std::map) // ... diff --git a/examples/knxPython/pybind11/docs/advanced/cast/strings.rst b/examples/knxPython/pybind11/docs/advanced/cast/strings.rst new file mode 100644 index 00000000..271716b4 --- /dev/null +++ b/examples/knxPython/pybind11/docs/advanced/cast/strings.rst @@ -0,0 +1,296 @@ +Strings, bytes and Unicode conversions +###################################### + +Passing Python strings to C++ +============================= + +When a Python ``str`` is passed from Python to a C++ function that accepts +``std::string`` or ``char *`` as arguments, pybind11 will encode the Python +string to UTF-8. All Python ``str`` can be encoded in UTF-8, so this operation +does not fail. + +The C++ language is encoding agnostic. It is the responsibility of the +programmer to track encodings. It's often easiest to simply `use UTF-8 +everywhere `_. + +.. code-block:: c++ + + m.def("utf8_test", + [](const std::string &s) { + cout << "utf-8 is icing on the cake.\n"; + cout << s; + } + ); + m.def("utf8_charptr", + [](const char *s) { + cout << "My favorite food is\n"; + cout << s; + } + ); + +.. code-block:: pycon + + >>> utf8_test("🎂") + utf-8 is icing on the cake. + 🎂 + + >>> utf8_charptr("🍕") + My favorite food is + 🍕 + +.. note:: + + Some terminal emulators do not support UTF-8 or emoji fonts and may not + display the example above correctly. + +The results are the same whether the C++ function accepts arguments by value or +reference, and whether or not ``const`` is used. + +Passing bytes to C++ +-------------------- + +A Python ``bytes`` object will be passed to C++ functions that accept +``std::string`` or ``char*`` *without* conversion. In order to make a function +*only* accept ``bytes`` (and not ``str``), declare it as taking a ``py::bytes`` +argument. + + +Returning C++ strings to Python +=============================== + +When a C++ function returns a ``std::string`` or ``char*`` to a Python caller, +**pybind11 will assume that the string is valid UTF-8** and will decode it to a +native Python ``str``, using the same API as Python uses to perform +``bytes.decode('utf-8')``. If this implicit conversion fails, pybind11 will +raise a ``UnicodeDecodeError``. + +.. code-block:: c++ + + m.def("std_string_return", + []() { + return std::string("This string needs to be UTF-8 encoded"); + } + ); + +.. code-block:: pycon + + >>> isinstance(example.std_string_return(), str) + True + + +Because UTF-8 is inclusive of pure ASCII, there is never any issue with +returning a pure ASCII string to Python. If there is any possibility that the +string is not pure ASCII, it is necessary to ensure the encoding is valid +UTF-8. + +.. warning:: + + Implicit conversion assumes that a returned ``char *`` is null-terminated. + If there is no null terminator a buffer overrun will occur. + +Explicit conversions +-------------------- + +If some C++ code constructs a ``std::string`` that is not a UTF-8 string, one +can perform a explicit conversion and return a ``py::str`` object. Explicit +conversion has the same overhead as implicit conversion. + +.. code-block:: c++ + + // This uses the Python C API to convert Latin-1 to Unicode + m.def("str_output", + []() { + std::string s = "Send your r\xe9sum\xe9 to Alice in HR"; // Latin-1 + py::handle py_s = PyUnicode_DecodeLatin1(s.data(), s.length(), nullptr); + if (!py_s) { + throw py::error_already_set(); + } + return py::reinterpret_steal(py_s); + } + ); + +.. code-block:: pycon + + >>> str_output() + 'Send your résumé to Alice in HR' + +The `Python C API +`_ provides +several built-in codecs. Note that these all return *new* references, so +use :cpp:func:`reinterpret_steal` when converting them to a :cpp:class:`str`. + + +One could also use a third party encoding library such as libiconv to transcode +to UTF-8. + +Return C++ strings without conversion +------------------------------------- + +If the data in a C++ ``std::string`` does not represent text and should be +returned to Python as ``bytes``, then one can return the data as a +``py::bytes`` object. + +.. code-block:: c++ + + m.def("return_bytes", + []() { + std::string s("\xba\xd0\xba\xd0"); // Not valid UTF-8 + return py::bytes(s); // Return the data without transcoding + } + ); + +.. code-block:: pycon + + >>> example.return_bytes() + b'\xba\xd0\xba\xd0' + + +Note the asymmetry: pybind11 will convert ``bytes`` to ``std::string`` without +encoding, but cannot convert ``std::string`` back to ``bytes`` implicitly. + +.. code-block:: c++ + + m.def("asymmetry", + [](std::string s) { // Accepts str or bytes from Python + return s; // Looks harmless, but implicitly converts to str + } + ); + +.. code-block:: pycon + + >>> isinstance(example.asymmetry(b"have some bytes"), str) + True + + >>> example.asymmetry(b"\xba\xd0\xba\xd0") # invalid utf-8 as bytes + UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 0: invalid start byte + + +Wide character strings +====================== + +When a Python ``str`` is passed to a C++ function expecting ``std::wstring``, +``wchar_t*``, ``std::u16string`` or ``std::u32string``, the ``str`` will be +encoded to UTF-16 or UTF-32 depending on how the C++ compiler implements each +type, in the platform's native endianness. When strings of these types are +returned, they are assumed to contain valid UTF-16 or UTF-32, and will be +decoded to Python ``str``. + +.. code-block:: c++ + + #define UNICODE + #include + + m.def("set_window_text", + [](HWND hwnd, std::wstring s) { + // Call SetWindowText with null-terminated UTF-16 string + ::SetWindowText(hwnd, s.c_str()); + } + ); + m.def("get_window_text", + [](HWND hwnd) { + const int buffer_size = ::GetWindowTextLength(hwnd) + 1; + auto buffer = std::make_unique< wchar_t[] >(buffer_size); + + ::GetWindowText(hwnd, buffer.data(), buffer_size); + + std::wstring text(buffer.get()); + + // wstring will be converted to Python str + return text; + } + ); + +Strings in multibyte encodings such as Shift-JIS must transcoded to a +UTF-8/16/32 before being returned to Python. + + +Character literals +================== + +C++ functions that accept character literals as input will receive the first +character of a Python ``str`` as their input. If the string is longer than one +Unicode character, trailing characters will be ignored. + +When a character literal is returned from C++ (such as a ``char`` or a +``wchar_t``), it will be converted to a ``str`` that represents the single +character. + +.. code-block:: c++ + + m.def("pass_char", [](char c) { return c; }); + m.def("pass_wchar", [](wchar_t w) { return w; }); + +.. code-block:: pycon + + >>> example.pass_char("A") + 'A' + +While C++ will cast integers to character types (``char c = 0x65;``), pybind11 +does not convert Python integers to characters implicitly. The Python function +``chr()`` can be used to convert integers to characters. + +.. code-block:: pycon + + >>> example.pass_char(0x65) + TypeError + + >>> example.pass_char(chr(0x65)) + 'A' + +If the desire is to work with an 8-bit integer, use ``int8_t`` or ``uint8_t`` +as the argument type. + +Grapheme clusters +----------------- + +A single grapheme may be represented by two or more Unicode characters. For +example 'é' is usually represented as U+00E9 but can also be expressed as the +combining character sequence U+0065 U+0301 (that is, the letter 'e' followed by +a combining acute accent). The combining character will be lost if the +two-character sequence is passed as an argument, even though it renders as a +single grapheme. + +.. code-block:: pycon + + >>> example.pass_wchar("é") + 'é' + + >>> combining_e_acute = "e" + "\u0301" + + >>> combining_e_acute + 'é' + + >>> combining_e_acute == "é" + False + + >>> example.pass_wchar(combining_e_acute) + 'e' + +Normalizing combining characters before passing the character literal to C++ +may resolve *some* of these issues: + +.. code-block:: pycon + + >>> example.pass_wchar(unicodedata.normalize("NFC", combining_e_acute)) + 'é' + +In some languages (Thai for example), there are `graphemes that cannot be +expressed as a single Unicode code point +`_, so there is +no way to capture them in a C++ character type. + + +C++17 string views +================== + +C++17 string views are automatically supported when compiling in C++17 mode. +They follow the same rules for encoding and decoding as the corresponding STL +string type (for example, a ``std::u16string_view`` argument will be passed +UTF-16-encoded data, and a returned ``std::string_view`` will be decoded as +UTF-8). + +References +========== + +* `The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) `_ +* `C++ - Using STL Strings at Win32 API Boundaries `_ diff --git a/examples/knxPython/pybind11/docs/advanced/classes.rst b/examples/knxPython/pybind11/docs/advanced/classes.rst index 49279020..01a490b7 100644 --- a/examples/knxPython/pybind11/docs/advanced/classes.rst +++ b/examples/knxPython/pybind11/docs/advanced/classes.rst @@ -9,7 +9,7 @@ that you are already familiar with the basics from :doc:`/classes`. Overriding virtual functions in Python ====================================== -Suppose that a C++ class or interface has a virtual function that we'd like to +Suppose that a C++ class or interface has a virtual function that we'd like to override from within Python (we'll focus on the class ``Animal``; ``Dog`` is given as a specific example of how one would do this with traditional C++ code). @@ -133,14 +133,14 @@ a virtual method call. >>> from example import * >>> d = Dog() >>> call_go(d) - u'woof! woof! woof! ' + 'woof! woof! woof! ' >>> class Cat(Animal): ... def go(self, n_times): - ... return "meow! " * n_times + ... return "meow! " * n_times ... >>> c = Cat() >>> call_go(c) - u'meow! meow! meow! ' + 'meow! meow! meow! ' If you are defining a custom constructor in a derived Python class, you *must* ensure that you explicitly call the bound C++ constructor using ``__init__``, @@ -159,8 +159,9 @@ Here is an example: class Dachshund(Dog): def __init__(self, name): - Dog.__init__(self) # Without this, a TypeError is raised. + Dog.__init__(self) # Without this, a TypeError is raised. self.name = name + def bark(self): return "yap!" @@ -259,7 +260,7 @@ override the ``name()`` method): .. note:: - Note the trailing commas in the ``PYBIND11_OVERIDE`` calls to ``name()`` + Note the trailing commas in the ``PYBIND11_OVERRIDE`` calls to ``name()`` and ``bark()``. These are needed to portably implement a trampoline for a function that does not take any arguments. For functions that take a nonzero number of arguments, the trailing comma must be omitted. @@ -804,7 +805,7 @@ to bind these two functions: } )); -The ``__setstate__`` part of the ``py::picke()`` definition follows the same +The ``__setstate__`` part of the ``py::pickle()`` definition follows the same rules as the single-argument version of ``py::init()``. The return type can be a value, pointer or holder type. See :ref:`custom_constructors` for details. @@ -812,26 +813,21 @@ An instance can now be pickled as follows: .. code-block:: python - try: - import cPickle as pickle # Use cPickle on Python 2.7 - except ImportError: - import pickle + import pickle p = Pickleable("test_value") p.setExtra(15) - data = pickle.dumps(p, 2) + data = pickle.dumps(p) .. note:: - Note that only the cPickle module is supported on Python 2.7. - - The second argument to ``dumps`` is also crucial: it selects the pickle - protocol version 2, since the older version 1 is not supported. Newer - versions are also fine—for instance, specify ``-1`` to always use the - latest available version. Beware: failure to follow these instructions - will cause important pybind11 memory allocation routines to be skipped - during unpickling, which will likely lead to memory corruption and/or - segmentation faults. + If given, the second argument to ``dumps`` must be 2 or larger - 0 and 1 are + not supported. Newer versions are also fine; for instance, specify ``-1`` to + always use the latest available version. Beware: failure to follow these + instructions will cause important pybind11 memory allocation routines to be + skipped during unpickling, which will likely lead to memory corruption + and/or segmentation faults. Python defaults to version 3 (Python 3-3.7) and + version 4 for Python 3.8+. .. seealso:: @@ -848,11 +844,9 @@ Python normally uses references in assignments. Sometimes a real copy is needed to prevent changing all copies. The ``copy`` module [#f5]_ provides these capabilities. -On Python 3, a class with pickle support is automatically also (deep)copy +A class with pickle support is automatically also (deep)copy compatible. However, performance can be improved by adding custom -``__copy__`` and ``__deepcopy__`` methods. With Python 2.7, these custom methods -are mandatory for (deep)copy compatibility, because pybind11 only supports -cPickle. +``__copy__`` and ``__deepcopy__`` methods. For simple classes (deep)copy can be enabled by using the copy constructor, which should look as follows: @@ -1124,13 +1118,6 @@ described trampoline: py::class_(m, "A") // <-- `Trampoline` here .def("foo", &Publicist::foo); // <-- `Publicist` here, not `Trampoline`! -.. note:: - - MSVC 2015 has a compiler bug (fixed in version 2017) which - requires a more explicit function binding in the form of - ``.def("foo", static_cast(&Publicist::foo));`` - where ``int (A::*)() const`` is the type of ``A::foo``. - Binding final classes ===================== @@ -1153,12 +1140,65 @@ error: >>> class PyFinalChild(IsFinal): ... pass + ... TypeError: type 'IsFinal' is not an acceptable base type .. note:: This attribute is currently ignored on PyPy .. versionadded:: 2.6 +Binding classes with template parameters +======================================== + +pybind11 can also wrap classes that have template parameters. Consider these classes: + +.. code-block:: cpp + + struct Cat {}; + struct Dog {}; + + template + struct Cage { + Cage(PetType& pet); + PetType& get(); + }; + +C++ templates may only be instantiated at compile time, so pybind11 can only +wrap instantiated templated classes. You cannot wrap a non-instantiated template: + +.. code-block:: cpp + + // BROKEN (this will not compile) + py::class_(m, "Cage"); + .def("get", &Cage::get); + +You must explicitly specify each template/type combination that you want to +wrap separately. + +.. code-block:: cpp + + // ok + py::class_>(m, "CatCage") + .def("get", &Cage::get); + + // ok + py::class_>(m, "DogCage") + .def("get", &Cage::get); + +If your class methods have template parameters you can wrap those as well, +but once again each instantiation must be explicitly specified: + +.. code-block:: cpp + + typename + struct MyClass { + template + T fn(V v); + }; + + py::class>(m, "MyClassT") + .def("fn", &MyClass::fn); + Custom automatic downcasters ============================ @@ -1188,7 +1228,7 @@ whether a downcast is safe, you can proceed by specializing the std::string bark() const { return sound; } }; - namespace pybind11 { + namespace PYBIND11_NAMESPACE { template<> struct polymorphic_type_hook { static const void *get(const Pet *src, const std::type_info*& type) { // note that src may be nullptr @@ -1199,7 +1239,7 @@ whether a downcast is safe, you can proceed by specializing the return src; } }; - } // namespace pybind11 + } // namespace PYBIND11_NAMESPACE When pybind11 wants to convert a C++ pointer of type ``Base*`` to a Python object, it calls ``polymorphic_type_hook::get()`` to @@ -1247,7 +1287,7 @@ Accessing the type object You can get the type object from a C++ class that has already been registered using: -.. code-block:: python +.. code-block:: cpp py::type T_py = py::type::of(); @@ -1259,3 +1299,37 @@ object, just like ``type(ob)`` in Python. Other types, like ``py::type::of()``, do not work, see :ref:`type-conversions`. .. versionadded:: 2.6 + +Custom type setup +================= + +For advanced use cases, such as enabling garbage collection support, you may +wish to directly manipulate the ``PyHeapTypeObject`` corresponding to a +``py::class_`` definition. + +You can do that using ``py::custom_type_setup``: + +.. code-block:: cpp + + struct OwnsPythonObjects { + py::object value = py::none(); + }; + py::class_ cls( + m, "OwnsPythonObjects", py::custom_type_setup([](PyHeapTypeObject *heap_type) { + auto *type = &heap_type->ht_type; + type->tp_flags |= Py_TPFLAGS_HAVE_GC; + type->tp_traverse = [](PyObject *self_base, visitproc visit, void *arg) { + auto &self = py::cast(py::handle(self_base)); + Py_VISIT(self.value.ptr()); + return 0; + }; + type->tp_clear = [](PyObject *self_base) { + auto &self = py::cast(py::handle(self_base)); + self.value = py::none(); + return 0; + }; + })); + cls.def(py::init<>()); + cls.def_readwrite("value", &OwnsPythonObjects::value); + +.. versionadded:: 2.8 diff --git a/examples/knxPython/pybind11/docs/advanced/embedding.rst b/examples/knxPython/pybind11/docs/advanced/embedding.rst index dfdaad2d..cbed8215 100644 --- a/examples/knxPython/pybind11/docs/advanced/embedding.rst +++ b/examples/knxPython/pybind11/docs/advanced/embedding.rst @@ -18,7 +18,7 @@ information, see :doc:`/compiling`. .. code-block:: cmake - cmake_minimum_required(VERSION 3.4) + cmake_minimum_required(VERSION 3.5...3.29) project(example) find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)` @@ -40,15 +40,15 @@ The essential structure of the ``main.cpp`` file looks like this: } The interpreter must be initialized before using any Python API, which includes -all the functions and classes in pybind11. The RAII guard class `scoped_interpreter` +all the functions and classes in pybind11. The RAII guard class ``scoped_interpreter`` takes care of the interpreter lifetime. After the guard is destroyed, the interpreter shuts down and clears its memory. No Python functions can be called after this. Executing Python code ===================== -There are a few different ways to run Python code. One option is to use `eval`, -`exec` or `eval_file`, as explained in :ref:`eval`. Here is a quick example in +There are a few different ways to run Python code. One option is to use ``eval``, +``exec`` or ``eval_file``, as explained in :ref:`eval`. Here is a quick example in the context of an executable with an embedded interpreter: .. code-block:: cpp @@ -108,7 +108,7 @@ The two approaches can also be combined: Importing modules ================= -Python modules can be imported using `module_::import()`: +Python modules can be imported using ``module_::import()``: .. code-block:: cpp @@ -122,6 +122,7 @@ embedding the interpreter. This makes it easy to import local Python files: """calc.py located in the working directory""" + def add(i, j): return i + j @@ -133,7 +134,7 @@ embedding the interpreter. This makes it easy to import local Python files: int n = result.cast(); assert(n == 3); -Modules can be reloaded using `module_::reload()` if the source is modified e.g. +Modules can be reloaded using ``module_::reload()`` if the source is modified e.g. by an external process. This can be useful in scenarios where the application imports a user defined data processing script which needs to be updated after changes by the user. Note that this function does not reload modules recursively. @@ -143,7 +144,7 @@ changes by the user. Note that this function does not reload modules recursively Adding embedded modules ======================= -Embedded binary modules can be added using the `PYBIND11_EMBEDDED_MODULE` macro. +Embedded binary modules can be added using the ``PYBIND11_EMBEDDED_MODULE`` macro. Note that the definition must be placed at global scope. They can be imported like any other module. @@ -169,7 +170,7 @@ like any other module. Unlike extension modules where only a single binary module can be created, on the embedded side an unlimited number of modules can be added using multiple -`PYBIND11_EMBEDDED_MODULE` definitions (as long as they have unique names). +``PYBIND11_EMBEDDED_MODULE`` definitions (as long as they have unique names). These modules are added to Python's list of builtins, so they can also be imported in pure Python files loaded by the interpreter. Everything interacts @@ -215,9 +216,9 @@ naturally: Interpreter lifetime ==================== -The Python interpreter shuts down when `scoped_interpreter` is destroyed. After +The Python interpreter shuts down when ``scoped_interpreter`` is destroyed. After this, creating a new instance will restart the interpreter. Alternatively, the -`initialize_interpreter` / `finalize_interpreter` pair of functions can be used +``initialize_interpreter`` / ``finalize_interpreter`` pair of functions can be used to directly set the state at any time. Modules created with pybind11 can be safely re-initialized after the interpreter @@ -229,8 +230,8 @@ global data. All the details can be found in the CPython documentation. .. warning:: - Creating two concurrent `scoped_interpreter` guards is a fatal error. So is - calling `initialize_interpreter` for a second time after the interpreter + Creating two concurrent ``scoped_interpreter`` guards is a fatal error. So is + calling ``initialize_interpreter`` for a second time after the interpreter has already been initialized. Do not use the raw CPython API functions ``Py_Initialize`` and @@ -241,7 +242,7 @@ global data. All the details can be found in the CPython documentation. Sub-interpreter support ======================= -Creating multiple copies of `scoped_interpreter` is not possible because it +Creating multiple copies of ``scoped_interpreter`` is not possible because it represents the main Python interpreter. Sub-interpreters are something different and they do permit the existence of multiple interpreters. This is an advanced feature of the CPython API and should be handled with care. pybind11 does not @@ -257,5 +258,5 @@ We'll just mention a couple of caveats the sub-interpreters support in pybind11: 2. Managing multiple threads, multiple interpreters and the GIL can be challenging and there are several caveats here, even within the pure CPython API (please refer to the Python docs for details). As for - pybind11, keep in mind that `gil_scoped_release` and `gil_scoped_acquire` + pybind11, keep in mind that ``gil_scoped_release`` and ``gil_scoped_acquire`` do not take sub-interpreters into account. diff --git a/examples/knxPython/pybind11/docs/advanced/exceptions.rst b/examples/knxPython/pybind11/docs/advanced/exceptions.rst index 5eae5562..e20f42b5 100644 --- a/examples/knxPython/pybind11/docs/advanced/exceptions.rst +++ b/examples/knxPython/pybind11/docs/advanced/exceptions.rst @@ -43,18 +43,28 @@ at its exception handler. | | of bounds access in ``__getitem__``, | | | ``__setitem__``, etc.) | +--------------------------------------+--------------------------------------+ -| :class:`pybind11::value_error` | ``ValueError`` (used to indicate | -| | wrong value passed in | -| | ``container.remove(...)``) | -+--------------------------------------+--------------------------------------+ | :class:`pybind11::key_error` | ``KeyError`` (used to indicate out | | | of bounds access in ``__getitem__``, | | | ``__setitem__`` in dict-like | | | objects, etc.) | +--------------------------------------+--------------------------------------+ +| :class:`pybind11::value_error` | ``ValueError`` (used to indicate | +| | wrong value passed in | +| | ``container.remove(...)``) | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::type_error` | ``TypeError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::buffer_error` | ``BufferError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::import_error` | ``ImportError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::attribute_error` | ``AttributeError`` | ++--------------------------------------+--------------------------------------+ +| Any other exception | ``RuntimeError`` | ++--------------------------------------+--------------------------------------+ Exception translation is not bidirectional. That is, *catching* the C++ -exceptions defined above above will not trap exceptions that originate from +exceptions defined above will not trap exceptions that originate from Python. For that, catch :class:`pybind11::error_already_set`. See :ref:`below ` for further details. @@ -67,9 +77,10 @@ Registering custom translators If the default exception conversion policy described above is insufficient, pybind11 also provides support for registering custom exception translators. -To register a simple exception conversion that translates a C++ exception into -a new Python exception using the C++ exception's ``what()`` method, a helper -function is available: +Similar to pybind11 classes, exception translators can be local to the module +they are defined in or global to the entire python session. To register a simple +exception conversion that translates a C++ exception into a new Python exception +using the C++ exception's ``what()`` method, a helper function is available: .. code-block:: cpp @@ -79,35 +90,44 @@ This call creates a Python exception class with the name ``PyExp`` in the given module and automatically converts any encountered exceptions of type ``CppExp`` into Python exceptions of type ``PyExp``. +A matching function is available for registering a local exception translator: + +.. code-block:: cpp + + py::register_local_exception(module, "PyExp"); + + It is possible to specify base class for the exception using the third -parameter, a `handle`: +parameter, a ``handle``: .. code-block:: cpp py::register_exception(module, "PyExp", PyExc_RuntimeError); + py::register_local_exception(module, "PyExp", PyExc_RuntimeError); -Then `PyExp` can be caught both as `PyExp` and `RuntimeError`. +Then ``PyExp`` can be caught both as ``PyExp`` and ``RuntimeError``. The class objects of the built-in Python exceptions are listed in the Python documentation on `Standard Exceptions `_. -The default base class is `PyExc_Exception`. +The default base class is ``PyExc_Exception``. -When more advanced exception translation is needed, the function -``py::register_exception_translator(translator)`` can be used to register +When more advanced exception translation is needed, the functions +``py::register_exception_translator(translator)`` and +``py::register_local_exception_translator(translator)`` can be used to register functions that can translate arbitrary exception types (and which may include -additional logic to do so). The function takes a stateless callable (e.g. a +additional logic to do so). The functions takes a stateless callable (e.g. a function pointer or a lambda function without captured variables) with the call signature ``void(std::exception_ptr)``. When a C++ exception is thrown, the registered exception translators are tried in reverse order of registration (i.e. the last registered translator gets the -first shot at handling the exception). +first shot at handling the exception). All local translators will be tried +before a global translator is tried. Inside the translator, ``std::rethrow_exception`` should be used within a try block to re-throw the exception. One or more catch clauses to catch the appropriate exceptions should then be used with each clause using -``PyErr_SetString`` to set a Python exception or ``ex(string)`` to set -the python exception to a custom exception type (see below). +``py::set_error()`` (see below). To declare a custom Python exception type, declare a ``py::exception`` variable and use this in the associated exception translator (note: it is often useful @@ -121,14 +141,16 @@ standard python RuntimeError: .. code-block:: cpp - static py::exception exc(m, "MyCustomError"); + PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store exc_storage; + exc_storage.call_once_and_store_result( + [&]() { return py::exception(m, "MyCustomError"); }); py::register_exception_translator([](std::exception_ptr p) { try { if (p) std::rethrow_exception(p); } catch (const MyCustomException &e) { - exc(e.what()); + py::set_error(exc_storage.get_stored(), e.what()); } catch (const OtherException &e) { - PyErr_SetString(PyExc_RuntimeError, e.what()); + py::set_error(PyExc_RuntimeError, e.what()); } }); @@ -147,8 +169,7 @@ section. .. note:: - Call either ``PyErr_SetString`` or a custom exception's call - operator (``exc(string)``) for every exception caught in a custom exception + Call ``py::set_error()`` for every exception caught in a custom exception translator. Failure to do so will cause Python to crash with ``SystemError: error return without exception set``. @@ -156,6 +177,60 @@ section. may be explicitly (re-)thrown to delegate it to the other, previously-declared existing exception translators. + Note that ``libc++`` and ``libstdc++`` `behave differently under macOS + `_ + with ``-fvisibility=hidden``. Therefore exceptions that are used across ABI + boundaries need to be explicitly exported, as exercised in + ``tests/test_exceptions.h``. See also: + "Problems with C++ exceptions" under `GCC Wiki `_. + + +Local vs Global Exception Translators +===================================== + +When a global exception translator is registered, it will be applied across all +modules in the reverse order of registration. This can create behavior where the +order of module import influences how exceptions are translated. + +If module1 has the following translator: + +.. code-block:: cpp + + py::register_exception_translator([](std::exception_ptr p) { + try { + if (p) std::rethrow_exception(p); + } catch (const std::invalid_argument &e) { + py::set_error(PyExc_ArgumentError, "module1 handled this"); + } + } + +and module2 has the following similar translator: + +.. code-block:: cpp + + py::register_exception_translator([](std::exception_ptr p) { + try { + if (p) std::rethrow_exception(p); + } catch (const std::invalid_argument &e) { + py::set_error(PyExc_ArgumentError, "module2 handled this"); + } + } + +then which translator handles the invalid_argument will be determined by the +order that module1 and module2 are imported. Since exception translators are +applied in the reverse order of registration, which ever module was imported +last will "win" and that translator will be applied. + +If there are multiple pybind11 modules that share exception types (either +standard built-in or custom) loaded into a single python instance and +consistent error handling behavior is needed, then local translators should be +used. + +Changing the previous example to use ``register_local_exception_translator`` +would mean that when invalid_argument is thrown in the module2 code, the +module2 translator will always handle it, while in module1, the module1 +translator will do the same. + .. _handling_python_exceptions_cpp: Handling exceptions from Python in C++ @@ -188,7 +263,7 @@ For example: } catch (py::error_already_set &e) { if (e.matches(PyExc_FileNotFoundError)) { py::print("missing.txt not found"); - } else if (e.match(PyExc_PermissionError)) { + } else if (e.matches(PyExc_PermissionError)) { py::print("missing.txt found but not accessible"); } else { throw; @@ -237,11 +312,11 @@ error protocol, which is outlined here. After calling the Python C API, if Python returns an error, ``throw py::error_already_set();``, which allows pybind11 to deal with the exception and pass it back to the Python interpreter. This includes calls to -the error setting functions such as ``PyErr_SetString``. +the error setting functions such as ``py::set_error()``. .. code-block:: cpp - PyErr_SetString(PyExc_TypeError, "C API type error demo"); + py::set_error(PyExc_TypeError, "C API type error demo"); throw py::error_already_set(); // But it would be easier to simply... @@ -253,6 +328,34 @@ Alternately, to ignore the error, call `PyErr_Clear Any Python error must be thrown or cleared, or Python/pybind11 will be left in an invalid state. +Chaining exceptions ('raise from') +================================== + +Python has a mechanism for indicating that exceptions were caused by other +exceptions: + +.. code-block:: py + + try: + print(1 / 0) + except Exception as exc: + raise RuntimeError("could not divide by zero") from exc + +To do a similar thing in pybind11, you can use the ``py::raise_from`` function. It +sets the current python error indicator, so to continue propagating the exception +you should ``throw py::error_already_set()``. + +.. code-block:: cpp + + try { + py::eval("print(1 / 0")); + } catch (py::error_already_set &e) { + py::raise_from(e, PyExc_RuntimeError, "could not divide by zero"); + throw py::error_already_set(); + } + +.. versionadded:: 2.8 + .. _unraisable_exceptions: Handling unraisable exceptions diff --git a/examples/knxPython/pybind11/docs/advanced/functions.rst b/examples/knxPython/pybind11/docs/advanced/functions.rst index ebdff9c9..372934b0 100644 --- a/examples/knxPython/pybind11/docs/advanced/functions.rst +++ b/examples/knxPython/pybind11/docs/advanced/functions.rst @@ -16,7 +16,7 @@ lifetime of objects managed by them. This can lead to issues when creating bindings for functions that return a non-trivial type. Just by looking at the type information, it is not clear whether Python should take charge of the returned value and eventually free its resources, or if this is handled on the -C++ side. For this reason, pybind11 provides a several *return value policy* +C++ side. For this reason, pybind11 provides several *return value policy* annotations that can be passed to the :func:`module_::def` and :func:`class_::def` functions. The default policy is :enum:`return_value_policy::automatic`. @@ -50,7 +50,7 @@ implied transfer of ownership, i.e.: .. code-block:: cpp - m.def("get_data", &get_data, return_value_policy::reference); + m.def("get_data", &get_data, py::return_value_policy::reference); On the other hand, this is not the right policy for many other situations, where ignoring ownership could lead to resource leaks. @@ -90,17 +90,18 @@ The following table provides an overview of available policies: | | return value is referenced by Python. This is the default policy for | | | property getters created via ``def_property``, ``def_readwrite``, etc. | +--------------------------------------------------+----------------------------------------------------------------------------+ -| :enum:`return_value_policy::automatic` | **Default policy.** This policy falls back to the policy | +| :enum:`return_value_policy::automatic` | This policy falls back to the policy | | | :enum:`return_value_policy::take_ownership` when the return value is a | | | pointer. Otherwise, it uses :enum:`return_value_policy::move` or | | | :enum:`return_value_policy::copy` for rvalue and lvalue references, | | | respectively. See above for a description of what all of these different | -| | policies do. | +| | policies do. This is the default policy for ``py::class_``-wrapped types. | +--------------------------------------------------+----------------------------------------------------------------------------+ | :enum:`return_value_policy::automatic_reference` | As above, but use policy :enum:`return_value_policy::reference` when the | | | return value is a pointer. This is the default conversion policy for | | | function arguments when calling Python functions manually from C++ code | -| | (i.e. via handle::operator()). You probably won't need to use this. | +| | (i.e. via ``handle::operator()``) and the casters in ``pybind11/stl.h``. | +| | You probably won't need to use this explicitly. | +--------------------------------------------------+----------------------------------------------------------------------------+ Return value policies can also be applied to properties: @@ -119,7 +120,7 @@ targeted arguments can be passed through the :class:`cpp_function` constructor: .. code-block:: cpp class_(m, "MyClass") - .def_property("data" + .def_property("data", py::cpp_function(&MyClass::getData, py::return_value_policy::copy), py::cpp_function(&MyClass::setData) ); @@ -182,6 +183,9 @@ relies on the ability to create a *weak reference* to the nurse object. When the nurse object is not a pybind11-registered type and does not support weak references, an exception will be thrown. +If you use an incorrect argument index, you will get a ``RuntimeError`` saying +``Could not activate keep_alive!``. You should review the indices you're using. + Consider the following example: here, the binding code for a list append operation ties the lifetime of the newly added element to the underlying container: @@ -228,7 +232,7 @@ is equivalent to the following pseudocode: }); The only requirement is that ``T`` is default-constructible, but otherwise any -scope guard will work. This is very useful in combination with `gil_scoped_release`. +scope guard will work. This is very useful in combination with ``gil_scoped_release``. See :ref:`gil`. Multiple guards can also be specified as ``py::call_guard``. The @@ -251,7 +255,7 @@ For instance, the following statement iterates over a Python ``dict``: .. code-block:: cpp - void print_dict(py::dict dict) { + void print_dict(const py::dict& dict) { /* Easily interact with Python types */ for (auto item : dict) std::cout << "key=" << std::string(py::str(item.first)) << ", " @@ -268,7 +272,7 @@ And used in Python as usual: .. code-block:: pycon - >>> print_dict({'foo': 123, 'bar': 'hello'}) + >>> print_dict({"foo": 123, "bar": "hello"}) key=foo, value=123 key=bar, value=hello @@ -289,7 +293,7 @@ Such functions can also be created using pybind11: .. code-block:: cpp - void generic(py::args args, py::kwargs kwargs) { + void generic(py::args args, const py::kwargs& kwargs) { /// .. do something with args if (kwargs) /// .. do something with kwargs @@ -302,8 +306,9 @@ The class ``py::args`` derives from ``py::tuple`` and ``py::kwargs`` derives from ``py::dict``. You may also use just one or the other, and may combine these with other -arguments as long as the ``py::args`` and ``py::kwargs`` arguments are the last -arguments accepted by the function. +arguments. Note, however, that ``py::kwargs`` must always be the last argument +of the function, and ``py::args`` implies that any further arguments are +keyword-only (see :ref:`keyword_only_arguments`). Please refer to the other examples for details on how to iterate over these, and on how to cast their entries into C++ objects. A demonstration is also @@ -362,10 +367,12 @@ like so: py::class_("MyClass") .def("myFunction", py::arg("arg") = static_cast(nullptr)); +.. _keyword_only_arguments: + Keyword-only arguments ====================== -Python 3 introduced keyword-only arguments by specifying an unnamed ``*`` +Python implements keyword-only arguments by specifying an unnamed ``*`` argument in a function definition: .. code-block:: python @@ -373,10 +380,11 @@ argument in a function definition: def f(a, *, b): # a can be positional or via keyword; b must be via keyword pass + f(a=1, b=2) # good f(b=2, a=1) # good - f(1, b=2) # good - f(1, 2) # TypeError: f() takes 1 positional argument but 2 were given + f(1, b=2) # good + f(1, 2) # TypeError: f() takes 1 positional argument but 2 were given Pybind11 provides a ``py::kw_only`` object that allows you to implement the same behaviour by specifying the object between positional and keyword-only @@ -387,11 +395,19 @@ argument annotations when registering the function: m.def("f", [](int a, int b) { /* ... */ }, py::arg("a"), py::kw_only(), py::arg("b")); -Note that you currently cannot combine this with a ``py::args`` argument. This -feature does *not* require Python 3 to work. - .. versionadded:: 2.6 +A ``py::args`` argument implies that any following arguments are keyword-only, +as if ``py::kw_only()`` had been specified in the same relative location of the +argument list as the ``py::args`` argument. The ``py::kw_only()`` may be +included to be explicit about this, but is not required. + +.. versionchanged:: 2.9 + This can now be combined with ``py::args``. Before, ``py::args`` could only + occur at the end of the argument list, or immediately before a ``py::kwargs`` + argument at the end. + + Positional-only arguments ========================= @@ -524,6 +540,8 @@ The default behaviour when the tag is unspecified is to allow ``None``. not allow ``None`` as argument. To pass optional argument of these copied types consider using ``std::optional`` +.. _overload_resolution: + Overload resolution order ========================= @@ -559,3 +577,38 @@ prefers earlier-defined overloads to later-defined ones. .. versionadded:: 2.6 The ``py::prepend()`` tag. + +Binding functions with template parameters +========================================== + +You can bind functions that have template parameters. Here's a function: + +.. code-block:: cpp + + template + void set(T t); + +C++ templates cannot be instantiated at runtime, so you cannot bind the +non-instantiated function: + +.. code-block:: cpp + + // BROKEN (this will not compile) + m.def("set", &set); + +You must bind each instantiated function template separately. You may bind +each instantiation with the same name, which will be treated the same as +an overloaded function: + +.. code-block:: cpp + + m.def("set", &set); + m.def("set", &set); + +Sometimes it's more clear to bind them with separate names, which is also +an option: + +.. code-block:: cpp + + m.def("setInt", &set); + m.def("setString", &set); diff --git a/examples/knxPython/pybind11/docs/advanced/misc.rst b/examples/knxPython/pybind11/docs/advanced/misc.rst index b3f3b226..ddd7f393 100644 --- a/examples/knxPython/pybind11/docs/advanced/misc.rst +++ b/examples/knxPython/pybind11/docs/advanced/misc.rst @@ -39,15 +39,42 @@ The ``PYBIND11_MAKE_OPAQUE`` macro does *not* require the above workarounds. Global Interpreter Lock (GIL) ============================= -When calling a C++ function from Python, the GIL is always held. +The Python C API dictates that the Global Interpreter Lock (GIL) must always +be held by the current thread to safely access Python objects. As a result, +when Python calls into C++ via pybind11 the GIL must be held, and pybind11 +will never implicitly release the GIL. + +.. code-block:: cpp + + void my_function() { + /* GIL is held when this function is called from Python */ + } + + PYBIND11_MODULE(example, m) { + m.def("my_function", &my_function); + } + +pybind11 will ensure that the GIL is held when it knows that it is calling +Python code. For example, if a Python callback is passed to C++ code via +``std::function``, when C++ code calls the function the built-in wrapper +will acquire the GIL before calling the Python callback. Similarly, the +``PYBIND11_OVERRIDE`` family of macros will acquire the GIL before calling +back into Python. + +When writing C++ code that is called from other C++ code, if that code accesses +Python state, it must explicitly acquire and release the GIL. + The classes :class:`gil_scoped_release` and :class:`gil_scoped_acquire` can be used to acquire and release the global interpreter lock in the body of a C++ function call. In this way, long-running C++ code can be parallelized using -multiple Python threads. Taking :ref:`overriding_virtuals` as an example, this +multiple Python threads, **but great care must be taken** when any +:class:`gil_scoped_release` appear: if there is any way that the C++ code +can access Python objects, :class:`gil_scoped_acquire` should be used to +reacquire the GIL. Taking :ref:`overriding_virtuals` as an example, this could be realized as follows (important changes highlighted): .. code-block:: cpp - :emphasize-lines: 8,9,31,32 + :emphasize-lines: 8,30,31 class PyAnimal : public Animal { public: @@ -56,9 +83,7 @@ could be realized as follows (important changes highlighted): /* Trampoline (need one for each virtual function) */ std::string go(int n_times) { - /* Acquire GIL before calling Python code */ - py::gil_scoped_acquire acquire; - + /* PYBIND11_OVERRIDE_PURE will acquire the GIL before accessing Python state */ PYBIND11_OVERRIDE_PURE( std::string, /* Return type */ Animal, /* Parent class */ @@ -78,13 +103,14 @@ could be realized as follows (important changes highlighted): .def(py::init<>()); m.def("call_go", [](Animal *animal) -> std::string { - /* Release GIL before calling into (potentially long-running) C++ code */ + // GIL is held when called from Python code. Release GIL before + // calling into (potentially long-running) C++ code py::gil_scoped_release release; return call_go(animal); }); } -The ``call_go`` wrapper can also be simplified using the `call_guard` policy +The ``call_go`` wrapper can also be simplified using the ``call_guard`` policy (see :ref:`call_policies`) which yields the same result: .. code-block:: cpp @@ -92,6 +118,34 @@ The ``call_go`` wrapper can also be simplified using the `call_guard` policy m.def("call_go", &call_go, py::call_guard()); +Common Sources Of Global Interpreter Lock Errors +================================================================== + +Failing to properly hold the Global Interpreter Lock (GIL) is one of the +more common sources of bugs within code that uses pybind11. If you are +running into GIL related errors, we highly recommend you consult the +following checklist. + +- Do you have any global variables that are pybind11 objects or invoke + pybind11 functions in either their constructor or destructor? You are generally + not allowed to invoke any Python function in a global static context. We recommend + using lazy initialization and then intentionally leaking at the end of the program. + +- Do you have any pybind11 objects that are members of other C++ structures? One + commonly overlooked requirement is that pybind11 objects have to increase their reference count + whenever their copy constructor is called. Thus, you need to be holding the GIL to invoke + the copy constructor of any C++ class that has a pybind11 member. This can sometimes be very + tricky to track for complicated programs Think carefully when you make a pybind11 object + a member in another struct. + +- C++ destructors that invoke Python functions can be particularly troublesome as + destructors can sometimes get invoked in weird and unexpected circumstances as a result + of exceptions. + +- You should try running your code in a debug build. That will enable additional assertions + within pybind11 that will throw exceptions on certain GIL handling errors + (reference counting operations). + Binding sequence data types, iterators, the slicing protocol, etc. ================================================================== @@ -298,6 +352,15 @@ The class ``options`` allows you to selectively suppress auto-generated signatur m.def("add", [](int a, int b) { return a + b; }, "A function which adds two numbers"); } +pybind11 also appends all members of an enum to the resulting enum docstring. +This default behavior can be disabled by using the ``disable_enum_members_docstring()`` +function of the ``options`` class. + +With ``disable_user_defined_docstrings()`` all user defined docstrings of +``module_::def()``, ``class_::def()`` and ``enum_()`` are disabled, but the +function signatures and enum members are included in the docstring, unless they +are disabled separately. + Note that changes to the settings affect only function bindings created during the lifetime of the ``options`` instance. When it goes out of scope at the end of the module's init function, the default settings are restored to prevent unwanted side effects. @@ -335,3 +398,32 @@ before they are used as a parameter or return type of a function: pyFoo.def(py::init()); pyBar.def(py::init()); } + +Setting inner type hints in docstrings +====================================== + +When you use pybind11 wrappers for ``list``, ``dict``, and other generic python +types, the docstring will just display the generic type. You can convey the +inner types in the docstring by using a special 'typed' version of the generic +type. + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) { + m.def("pass_list_of_str", [](py::typing::List arg) { + // arg can be used just like py::list + )); + } + +The resulting docstring will be ``pass_list_of_str(arg0: list[str]) -> None``. + +The following special types are available in ``pybind11/typing.h``: + +* ``py::Tuple`` +* ``py::Dict`` +* ``py::List`` +* ``py::Set`` +* ``py::Callable`` + +.. warning:: Just like in python, these are merely hints. They don't actually + enforce the types of their contents at runtime or compile time. diff --git a/examples/knxPython/pybind11/docs/advanced/pycpp/index.rst b/examples/knxPython/pybind11/docs/advanced/pycpp/index.rst new file mode 100644 index 00000000..6885bdcf --- /dev/null +++ b/examples/knxPython/pybind11/docs/advanced/pycpp/index.rst @@ -0,0 +1,13 @@ +Python C++ interface +#################### + +pybind11 exposes Python types and functions using thin C++ wrappers, which +makes it possible to conveniently call Python code from C++ without resorting +to Python's C API. + +.. toctree:: + :maxdepth: 2 + + object + numpy + utilities diff --git a/examples/knxPython/pybind11/docs/advanced/pycpp/numpy.rst b/examples/knxPython/pybind11/docs/advanced/pycpp/numpy.rst index 19ed10b3..d09a2cea 100644 --- a/examples/knxPython/pybind11/docs/advanced/pycpp/numpy.rst +++ b/examples/knxPython/pybind11/docs/advanced/pycpp/numpy.rst @@ -87,7 +87,7 @@ buffer objects (e.g. a NumPy matrix). /* Request a buffer descriptor from Python */ py::buffer_info info = b.request(); - /* Some sanity checks ... */ + /* Some basic validation checks ... */ if (info.format != py::format_descriptor::format()) throw std::runtime_error("Incompatible format: expected a double array!"); @@ -150,8 +150,10 @@ NumPy array containing double precision values. When it is invoked with a different type (e.g. an integer or a list of integers), the binding code will attempt to cast the input into a NumPy array -of the requested type. Note that this feature requires the -:file:`pybind11/numpy.h` header to be included. +of the requested type. This feature requires the :file:`pybind11/numpy.h` +header to be included. Note that :file:`pybind11/numpy.h` does not depend on +the NumPy headers, and thus can be used without declaring a build-time +dependency on NumPy; NumPy>=1.7.0 is a runtime dependency. Data in NumPy arrays is not guaranteed to packed in a dense manner; furthermore, entries can be separated by arbitrary column and row strides. @@ -169,6 +171,31 @@ template parameter, and it ensures that non-conforming arguments are converted into an array satisfying the specified requirements instead of trying the next function overload. +There are several methods on arrays; the methods listed below under references +work, as well as the following functions based on the NumPy API: + +- ``.dtype()`` returns the type of the contained values. + +- ``.strides()`` returns a pointer to the strides of the array (optionally pass + an integer axis to get a number). + +- ``.flags()`` returns the flag settings. ``.writable()`` and ``.owndata()`` + are directly available. + +- ``.offset_at()`` returns the offset (optionally pass indices). + +- ``.squeeze()`` returns a view with length-1 axes removed. + +- ``.view(dtype)`` returns a view of the array with a different dtype. + +- ``.reshape({i, j, ...})`` returns a view of the array with a different shape. + ``.resize({...})`` is also available. + +- ``.index_at(i, j, ...)`` gets the count from the beginning to a given index. + + +There are also several methods for getting references (described below). + Structured types ================ @@ -231,8 +258,8 @@ by the compiler. The result is returned as a NumPy array of type .. code-block:: pycon - >>> x = np.array([[1, 3],[5, 7]]) - >>> y = np.array([[2, 4],[6, 8]]) + >>> x = np.array([[1, 3], [5, 7]]) + >>> y = np.array([[2, 4], [6, 8]]) >>> z = 3 >>> result = vectorized_func(x, y, z) @@ -343,21 +370,19 @@ The returned proxy object supports some of the same methods as ``py::array`` so that it can be used as a drop-in replacement for some existing, index-checked uses of ``py::array``: -- ``r.ndim()`` returns the number of dimensions +- ``.ndim()`` returns the number of dimensions -- ``r.data(1, 2, ...)`` and ``r.mutable_data(1, 2, ...)``` returns a pointer to +- ``.data(1, 2, ...)`` and ``r.mutable_data(1, 2, ...)``` returns a pointer to the ``const T`` or ``T`` data, respectively, at the given indices. The latter is only available to proxies obtained via ``a.mutable_unchecked()``. -- ``itemsize()`` returns the size of an item in bytes, i.e. ``sizeof(T)``. - -- ``ndim()`` returns the number of dimensions. +- ``.itemsize()`` returns the size of an item in bytes, i.e. ``sizeof(T)``. -- ``shape(n)`` returns the size of dimension ``n`` +- ``.shape(n)`` returns the size of dimension ``n`` -- ``size()`` returns the total number of elements (i.e. the product of the shapes). +- ``.size()`` returns the total number of elements (i.e. the product of the shapes). -- ``nbytes()`` returns the number of bytes used by the referenced elements +- ``.nbytes()`` returns the number of bytes used by the referenced elements (i.e. ``itemsize()`` times ``size()``). .. seealso:: @@ -368,15 +393,13 @@ uses of ``py::array``: Ellipsis ======== -Python 3 provides a convenient ``...`` ellipsis notation that is often used to +Python provides a convenient ``...`` ellipsis notation that is often used to slice multidimensional arrays. For instance, the following snippet extracts the middle dimensions of a tensor with the first and last index set to zero. -In Python 2, the syntactic sugar ``...`` is not available, but the singleton -``Ellipsis`` (of type ``ellipsis``) can still be used directly. .. code-block:: python - a = # a NumPy array + a = ... # a NumPy array b = a[0, ..., 0] The function ``py::ellipsis()`` function can be used to perform the same @@ -387,8 +410,6 @@ operation on the C++ side: py::array a = /* A NumPy array */; py::array b = a[py::make_tuple(0, py::ellipsis(), 0)]; -.. versionchanged:: 2.6 - ``py::ellipsis()`` is now also avaliable in Python 2. Memory view =========== @@ -410,7 +431,7 @@ following: { 2, 4 }, // shape (rows, cols) { sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes ); - }) + }); This approach is meant for providing a ``memoryview`` for a C/C++ buffer not managed by Python. The user is responsible for managing the lifetime of the @@ -426,11 +447,7 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer: buffer, // buffer pointer sizeof(uint8_t) * 8 // buffer size ); - }) - -.. note:: - - ``memoryview::from_memory`` is not available in Python 2. + }); .. versionchanged:: 2.6 ``memoryview::from_memory`` added. diff --git a/examples/knxPython/pybind11/docs/advanced/pycpp/object.rst b/examples/knxPython/pybind11/docs/advanced/pycpp/object.rst index 6c7525ce..93e1a94d 100644 --- a/examples/knxPython/pybind11/docs/advanced/pycpp/object.rst +++ b/examples/knxPython/pybind11/docs/advanced/pycpp/object.rst @@ -20,6 +20,40 @@ Available types include :class:`handle`, :class:`object`, :class:`bool_`, Be sure to review the :ref:`pytypes_gotchas` before using this heavily in your C++ API. +.. _instantiating_compound_types: + +Instantiating compound Python types from C++ +============================================ + +Dictionaries can be initialized in the :class:`dict` constructor: + +.. code-block:: cpp + + using namespace pybind11::literals; // to bring in the `_a` literal + py::dict d("spam"_a=py::none(), "eggs"_a=42); + +A tuple of python objects can be instantiated using :func:`py::make_tuple`: + +.. code-block:: cpp + + py::tuple tup = py::make_tuple(42, py::none(), "spam"); + +Each element is converted to a supported Python type. + +A `simple namespace`_ can be instantiated using + +.. code-block:: cpp + + using namespace pybind11::literals; // to bring in the `_a` literal + py::object SimpleNamespace = py::module_::import("types").attr("SimpleNamespace"); + py::object ns = SimpleNamespace("spam"_a=py::none(), "eggs"_a=42); + +Attributes on a namespace can be modified with the :func:`py::delattr`, +:func:`py::getattr`, and :func:`py::setattr` functions. Simple namespaces can +be useful as lightweight stand-ins for class instances. + +.. _simple namespace: https://docs.python.org/3/library/types.html#types.SimpleNamespace + .. _casting_back_and_forth: Casting back and forth @@ -30,7 +64,7 @@ types to Python, which can be done using :func:`py::cast`: .. code-block:: cpp - MyClass *cls = ..; + MyClass *cls = ...; py::object obj = py::cast(cls); The reverse direction uses the following syntax: @@ -132,6 +166,7 @@ Keyword arguments are also supported. In Python, there is the usual call syntax: def f(number, say, to): ... # function code + f(1234, say="hello", to=some_instance) # keyword call in Python In C++, the same call can be made using: diff --git a/examples/knxPython/pybind11/docs/advanced/pycpp/utilities.rst b/examples/knxPython/pybind11/docs/advanced/pycpp/utilities.rst index c15051fb..af0f9cb2 100644 --- a/examples/knxPython/pybind11/docs/advanced/pycpp/utilities.rst +++ b/examples/knxPython/pybind11/docs/advanced/pycpp/utilities.rst @@ -28,7 +28,7 @@ Capturing standard output from ostream Often, a library will use the streams ``std::cout`` and ``std::cerr`` to print, but this does not play well with Python's standard ``sys.stdout`` and ``sys.stderr`` -redirection. Replacing a library's printing with `py::print ` may not +redirection. Replacing a library's printing with ``py::print `` may not be feasible. This can be fixed using a guard around the library function that redirects output to the corresponding Python streams: @@ -47,15 +47,26 @@ redirects output to the corresponding Python streams: call_noisy_func(); }); +.. warning:: + + The implementation in ``pybind11/iostream.h`` is NOT thread safe. Multiple + threads writing to a redirected ostream concurrently cause data races + and potentially buffer overflows. Therefore it is currently a requirement + that all (possibly) concurrent redirected ostream writes are protected by + a mutex. #HelpAppreciated: Work on iostream.h thread safety. For more + background see the discussions under + `PR #2982 `_ and + `PR #2995 `_. + This method respects flushes on the output streams and will flush if needed when the scoped guard is destroyed. This allows the output to be redirected in real time, such as to a Jupyter notebook. The two arguments, the C++ stream and the Python output, are optional, and default to standard output if not given. An -extra type, `py::scoped_estream_redirect `, is identical +extra type, ``py::scoped_estream_redirect ``, is identical except for defaulting to ``std::cerr`` and ``sys.stderr``; this can be useful with -`py::call_guard`, which allows multiple items, but uses the default constructor: +``py::call_guard``, which allows multiple items, but uses the default constructor: -.. code-block:: py +.. code-block:: cpp // Alternative: Call single function using call guard m.def("noisy_func", &call_noisy_function, @@ -63,7 +74,7 @@ except for defaulting to ``std::cerr`` and ``sys.stderr``; this can be useful wi py::scoped_estream_redirect>()); The redirection can also be done in Python with the addition of a context -manager, using the `py::add_ostream_redirect() ` function: +manager, using the ``py::add_ostream_redirect() `` function: .. code-block:: cpp @@ -92,7 +103,7 @@ arguments to disable one of the streams if needed. Evaluating Python expressions from strings and files ==================================================== -pybind11 provides the `eval`, `exec` and `eval_file` functions to evaluate +pybind11 provides the ``eval``, ``exec`` and ``eval_file`` functions to evaluate Python expressions and statements. The following example illustrates how they can be used. diff --git a/examples/knxPython/pybind11/docs/advanced/smart_ptrs.rst b/examples/knxPython/pybind11/docs/advanced/smart_ptrs.rst new file mode 100644 index 00000000..b9f100cf --- /dev/null +++ b/examples/knxPython/pybind11/docs/advanced/smart_ptrs.rst @@ -0,0 +1,174 @@ +Smart pointers +############## + +std::unique_ptr +=============== + +Given a class ``Example`` with Python bindings, it's possible to return +instances wrapped in C++11 unique pointers, like so + +.. code-block:: cpp + + std::unique_ptr create_example() { return std::unique_ptr(new Example()); } + +.. code-block:: cpp + + m.def("create_example", &create_example); + +In other words, there is nothing special that needs to be done. While returning +unique pointers in this way is allowed, it is *illegal* to use them as function +arguments. For instance, the following function signature cannot be processed +by pybind11. + +.. code-block:: cpp + + void do_something_with_example(std::unique_ptr ex) { ... } + +The above signature would imply that Python needs to give up ownership of an +object that is passed to this function, which is generally not possible (for +instance, the object might be referenced elsewhere). + +std::shared_ptr +=============== + +The binding generator for classes, :class:`class_`, can be passed a template +type that denotes a special *holder* type that is used to manage references to +the object. If no such holder type template argument is given, the default for +a type named ``Type`` is ``std::unique_ptr``, which means that the object +is deallocated when Python's reference count goes to zero. + +It is possible to switch to other types of reference counting wrappers or smart +pointers, which is useful in codebases that rely on them. For instance, the +following snippet causes ``std::shared_ptr`` to be used instead. + +.. code-block:: cpp + + py::class_ /* <- holder type */> obj(m, "Example"); + +Note that any particular class can only be associated with a single holder type. + +One potential stumbling block when using holder types is that they need to be +applied consistently. Can you guess what's broken about the following binding +code? + +.. code-block:: cpp + + class Child { }; + + class Parent { + public: + Parent() : child(std::make_shared()) { } + Child *get_child() { return child.get(); } /* Hint: ** DON'T DO THIS ** */ + private: + std::shared_ptr child; + }; + + PYBIND11_MODULE(example, m) { + py::class_>(m, "Child"); + + py::class_>(m, "Parent") + .def(py::init<>()) + .def("get_child", &Parent::get_child); + } + +The following Python code will cause undefined behavior (and likely a +segmentation fault). + +.. code-block:: python + + from example import Parent + + print(Parent().get_child()) + +The problem is that ``Parent::get_child()`` returns a pointer to an instance of +``Child``, but the fact that this instance is already managed by +``std::shared_ptr<...>`` is lost when passing raw pointers. In this case, +pybind11 will create a second independent ``std::shared_ptr<...>`` that also +claims ownership of the pointer. In the end, the object will be freed **twice** +since these shared pointers have no way of knowing about each other. + +There are two ways to resolve this issue: + +1. For types that are managed by a smart pointer class, never use raw pointers + in function arguments or return values. In other words: always consistently + wrap pointers into their designated holder types (such as + ``std::shared_ptr<...>``). In this case, the signature of ``get_child()`` + should be modified as follows: + +.. code-block:: cpp + + std::shared_ptr get_child() { return child; } + +2. Adjust the definition of ``Child`` by specifying + ``std::enable_shared_from_this`` (see cppreference_ for details) as a + base class. This adds a small bit of information to ``Child`` that allows + pybind11 to realize that there is already an existing + ``std::shared_ptr<...>`` and communicate with it. In this case, the + declaration of ``Child`` should look as follows: + +.. _cppreference: http://en.cppreference.com/w/cpp/memory/enable_shared_from_this + +.. code-block:: cpp + + class Child : public std::enable_shared_from_this { }; + +.. _smart_pointers: + +Custom smart pointers +===================== + +pybind11 supports ``std::unique_ptr`` and ``std::shared_ptr`` right out of the +box. For any other custom smart pointer, transparent conversions can be enabled +using a macro invocation similar to the following. It must be declared at the +top namespace level before any binding code: + +.. code-block:: cpp + + PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr) + +The first argument of :func:`PYBIND11_DECLARE_HOLDER_TYPE` should be a +placeholder name that is used as a template parameter of the second argument. +Thus, feel free to use any identifier, but use it consistently on both sides; +also, don't use the name of a type that already exists in your codebase. + +The macro also accepts a third optional boolean parameter that is set to false +by default. Specify + +.. code-block:: cpp + + PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr, true) + +if ``SmartPtr`` can always be initialized from a ``T*`` pointer without the +risk of inconsistencies (such as multiple independent ``SmartPtr`` instances +believing that they are the sole owner of the ``T*`` pointer). A common +situation where ``true`` should be passed is when the ``T`` instances use +*intrusive* reference counting. + +Please take a look at the :ref:`macro_notes` before using this feature. + +By default, pybind11 assumes that your custom smart pointer has a standard +interface, i.e. provides a ``.get()`` member function to access the underlying +raw pointer. If this is not the case, pybind11's ``holder_helper`` must be +specialized: + +.. code-block:: cpp + + // Always needed for custom holder types + PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr) + + // Only needed if the type's `.get()` goes by another name + namespace PYBIND11_NAMESPACE { namespace detail { + template + struct holder_helper> { // <-- specialization + static const T *get(const SmartPtr &p) { return p.getPointer(); } + }; + }} + +The above specialization informs pybind11 that the custom ``SmartPtr`` class +provides ``.get()`` functionality via ``.getPointer()``. + +.. seealso:: + + The file :file:`tests/test_smart_ptr.cpp` contains a complete example + that demonstrates how to work with custom reference-counting holder types + in more detail. diff --git a/examples/knxPython/pybind11/docs/basics.rst b/examples/knxPython/pybind11/docs/basics.rst index 0681d86a..cd97c100 100644 --- a/examples/knxPython/pybind11/docs/basics.rst +++ b/examples/knxPython/pybind11/docs/basics.rst @@ -32,14 +32,13 @@ The last line will both compile and run the tests. Windows ------- -On Windows, only **Visual Studio 2015** and newer are supported since pybind11 relies -on various C++11 language features that break older versions of Visual Studio. +On Windows, only **Visual Studio 2017** and newer are supported. .. Note:: To use the C++17 in Visual Studio 2017 (MSVC 14.1), pybind11 requires the flag ``/permissive-`` to be passed to the compiler `to enforce standard conformance`_. When - building with Visual Studio 2019, this is not strictly necessary, but still adviced. + building with Visual Studio 2019, this is not strictly necessary, but still advised. .. _`to enforce standard conformance`: https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=vs-2017 @@ -79,6 +78,13 @@ For brevity, all code examples assume that the following two lines are present: namespace py = pybind11; +.. note:: + + ``pybind11/pybind11.h`` includes ``Python.h``, as such it must be the first file + included in any source file or header for `the same reasons as Python.h`_. + +.. _`the same reasons as Python.h`: https://docs.python.org/3/extending/extending.html#a-simple-example + Some features may require additional headers, but those will be specified as needed. .. _simple_example: @@ -109,7 +115,7 @@ a file named :file:`example.cpp` with the following contents: PYBIND11_MODULE(example, m) { m.doc() = "pybind11 example plugin"; // optional module docstring - m.def("add", &add, "A function which adds two numbers"); + m.def("add", &add, "A function that adds two numbers"); } .. [#f1] In practice, implementation and binding code will generally be located @@ -136,7 +142,14 @@ On Linux, the above example can be compiled using the following command: .. code-block:: bash - $ c++ -O3 -Wall -shared -std=c++11 -fPIC `python3 -m pybind11 --includes` example.cpp -o example`python3-config --extension-suffix` + $ c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix) + +.. note:: + + If you used :ref:`include_as_a_submodule` to get the pybind11 source, then + use ``$(python3-config --includes) -Iextern/pybind11/include`` instead of + ``$(python3 -m pybind11 --includes)`` in the above compilation, as + explained in :ref:`building_manually`. For more details on the required compiler flags on Linux and macOS, see :ref:`building_manually`. For complete cross-platform compilation instructions, @@ -159,12 +172,12 @@ load and execute the example: .. code-block:: pycon $ python - Python 2.7.10 (default, Aug 22 2015, 20:33:39) - [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin + Python 3.9.10 (main, Jan 15 2022, 11:48:04) + [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import example >>> example.add(1, 2) - 3L + 3 >>> .. _keyword_args: diff --git a/examples/knxPython/pybind11/docs/benchmark.py b/examples/knxPython/pybind11/docs/benchmark.py index 33d78fb4..a273674f 100644 --- a/examples/knxPython/pybind11/docs/benchmark.py +++ b/examples/knxPython/pybind11/docs/benchmark.py @@ -1,8 +1,8 @@ -# -*- coding: utf-8 -*- -import random -import os -import time +from __future__ import annotations + import datetime as dt +import os +import random nfns = 4 # Functions per class nargs = 4 # Arguments per function @@ -13,20 +13,20 @@ def generate_dummy_code_pybind11(nclasses=10): bindings = "" for cl in range(nclasses): - decl += "class cl%03i;\n" % cl + decl += f"class cl{cl:03};\n" decl += "\n" for cl in range(nclasses): - decl += "class cl%03i {\n" % cl + decl += f"class {cl:03} {{\n" decl += "public:\n" - bindings += ' py::class_(m, "cl%03i")\n' % (cl, cl) + bindings += f' py::class_(m, "cl{cl:03}")\n' for fn in range(nfns): ret = random.randint(0, nclasses - 1) params = [random.randint(0, nclasses - 1) for i in range(nargs)] - decl += " cl%03i *fn_%03i(" % (ret, fn) - decl += ", ".join("cl%03i *" % p for p in params) + decl += f" cl{ret:03} *fn_{fn:03}(" + decl += ", ".join(f"cl{p:03} *" for p in params) decl += ");\n" - bindings += ' .def("fn_%03i", &cl%03i::fn_%03i)\n' % (fn, cl, fn) + bindings += f' .def("fn_{fn:03}", &cl{cl:03}::fn_{fn:03})\n' decl += "};\n\n" bindings += " ;\n" @@ -44,23 +44,20 @@ def generate_dummy_code_boost(nclasses=10): bindings = "" for cl in range(nclasses): - decl += "class cl%03i;\n" % cl + decl += f"class cl{cl:03};\n" decl += "\n" for cl in range(nclasses): decl += "class cl%03i {\n" % cl decl += "public:\n" - bindings += ' py::class_("cl%03i")\n' % (cl, cl) + bindings += f' py::class_("cl{cl:03}")\n' for fn in range(nfns): ret = random.randint(0, nclasses - 1) params = [random.randint(0, nclasses - 1) for i in range(nargs)] - decl += " cl%03i *fn_%03i(" % (ret, fn) - decl += ", ".join("cl%03i *" % p for p in params) + decl += f" cl{ret:03} *fn_{fn:03}(" + decl += ", ".join(f"cl{p:03} *" for p in params) decl += ");\n" - bindings += ( - ' .def("fn_%03i", &cl%03i::fn_%03i, py::return_value_policy())\n' - % (fn, cl, fn) - ) + bindings += f' .def("fn_{fn:03}", &cl{cl:03}::fn_{fn:03}, py::return_value_policy())\n' decl += "};\n\n" bindings += " ;\n" @@ -75,8 +72,8 @@ def generate_dummy_code_boost(nclasses=10): for codegen in [generate_dummy_code_pybind11, generate_dummy_code_boost]: print("{") - for i in range(0, 10): - nclasses = 2 ** i + for i in range(10): + nclasses = 2**i with open("test.cpp", "w") as f: f.write(codegen(nclasses)) n1 = dt.datetime.now() diff --git a/examples/knxPython/pybind11/docs/changelog.rst b/examples/knxPython/pybind11/docs/changelog.rst index da1b5194..a9108211 100644 --- a/examples/knxPython/pybind11/docs/changelog.rst +++ b/examples/knxPython/pybind11/docs/changelog.rst @@ -6,6 +6,1774 @@ Changelog Starting with version 1.8.0, pybind11 releases use a `semantic versioning `_ policy. +Changes will be added here periodically from the "Suggested changelog entry" +block in pull request descriptions. + + +IN DEVELOPMENT +-------------- + +Changes will be summarized here periodically. + +New Features: + +* Support for Python 3.7 was removed. (Official end-of-life: 2023-06-27). + `#5191 `_ + +* stl.h ``list|set|map_caster`` were made more user friendly: it is no longer + necessary to explicitly convert Python iterables to ``tuple()``, ``set()``, + or ``map()`` in many common situations. + `#4686 `_ + +* Support for CMake older than 3.15 removed. CMake 3.15-3.30 supported. + `#5304 `_ + +* The ``array_caster`` in pybind11/stl.h was enhanced to support value types that are not default-constructible. + `#5305 `_ + +* Added ``py::warnings`` namespace with ``py::warnings::warn`` and ``py::warnings::new_warning_type`` that provides the interface for Python warnings. + `#5291 `_ + +Version 2.13.6 (September 13, 2024) +----------------------------------- + +New Features: + +* A new ``self._pybind11_conduit_v1_()`` method is automatically added to all + ``py::class_``-wrapped types, to enable type-safe interoperability between + different independent Python/C++ bindings systems, including pybind11 + versions with different ``PYBIND11_INTERNALS_VERSION``'s. Supported on + pybind11 2.11.2, 2.12.1, and 2.13.6+. + `#5296 `_ + + +Bug fixes: + +* Using ``__cpp_nontype_template_args`` instead of ``__cpp_nontype_template_parameter_class``. + `#5330 `_ + +* Properly translate C++ exception to Python exception when creating Python buffer from wrapped object. + `#5324 `_ + + +Documentation: + +* Adds an answer (FAQ) for "What is a highly conclusive and simple way to find memory leaks?". + `#5340 `_ + + +Version 2.13.5 (August 22, 2024) +-------------------------------- + +Bug fixes: + +* Fix includes when using Windows long paths (``\\?\`` prefix). + `#5321 `_ + +* Support ``-Wpedantic`` in C++20 mode. + `#5322 `_ + +* Fix and test ```` support for ``py::tuple`` and ``py::list``. + `#5314 `_ + +Version 2.13.4 (August 14, 2024) +-------------------------------- + +Bug fixes: + +* Fix paths with spaces, including on Windows. + (Replaces regression from `#5302 `_) + `#4874 `_ + +Documentation: + +* Remove repetitive words. + `#5308 `_ + + +Version 2.13.3 (August 13, 2024) +-------------------------------- + +Bug fixes: + +* Quote paths from pybind11-config + `#5302 `_ + + +* Fix typo in Emscripten support when in config mode (CMake) + `#5301 `_ + + +Version 2.13.2 (August 13, 2024) +-------------------------------- + +New Features: + +* A ``pybind11::detail::type_caster_std_function_specializations`` feature was added, to support specializations for + ``std::function``'s with return types that require custom to-Python conversion behavior (to primary use case is to catch and + convert exceptions). + `#4597 `_ + + +Changes: + + +* Use ``PyMutex`` instead of ``std::mutex`` for internal locking in the free-threaded build. + `#5219 `_ + +* Add a special type annotation for C++ empty tuple. + `#5214 `_ + +* When compiling for WebAssembly, add the required exception flags (CMake 3.13+). + `#5298 `_ + +Bug fixes: + +* Make ``gil_safe_call_once_and_store`` thread-safe in free-threaded CPython. + `#5246 `_ + +* A missing ``#include `` in pybind11/typing.h was added to fix build errors (in case user code does not already depend + on that include). + `#5208 `_ + +* Fix regression introduced in #5201 for GCC<10.3 in C++20 mode. + `#5205 `_ + + +.. fix(cmake) + +* Remove extra = when assigning flto value in the case for Clang in CMake. + `#5207 `_ + + +Tests: + +* Adding WASM testing to our CI (Pyodide / Emscripten via scikit-build-core). + `#4745 `_ + +* clang-tidy (in GitHub Actions) was updated from clang 15 to clang 18. + `#5272 `_ + + +Version 2.13.1 (June 26, 2024) +------------------------------ + +New Features: + +* Add support for ``Typing.Callable[..., T]``. + `#5202 `_ + +Bug fixes: + +* Avoid aligned allocation in free-threaded build in order to support macOS + versions before 10.14. + `#5200 `_ + +Version 2.13.0 (June 25, 2024) +------------------------------ + +New Features: + +* Support free-threaded CPython (3.13t). Add ``py::mod_gil_not_used()`` tag to + indicate if a module supports running with the GIL disabled. + `#5148 `_ + +* Support for Python 3.6 was removed. (Official end-of-life: 2021-12-23). + `#5177 `_ + +* ``py::list`` gained a ``.clear()`` method. + `#5153 `_ + + +.. feat(types) + +* Support for ``Union``, ``Optional``, ``type[T]``, ``typing.TypeGuard``, + ``typing.TypeIs``, ``typing.Never``, ``typing.NoReturn`` and + ``typing.Literal`` was added to ``pybind11/typing.h``. + `#5166 `_ + `#5165 `_ + `#5194 `_ + `#5193 `_ + `#5192 `_ + + +.. feat(cmake) + +* In CMake, if ``PYBIND11_USE_CROSSCOMPILING`` is enabled, then + ``CMAKE_CROSSCOMPILING`` will be respected and will keep pybind11 from + accessing the interpreter during configuration. Several CMake variables will + be required in this case, but can be deduced from the environment variable + ``SETUPTOOLS_EXT_SUFFIX``. The default (currently ``OFF``) may be changed in + the future. + `#5083 `_ + + +Bug fixes: + +* A refcount bug (leading to heap-use-after-free) involving trampoline + functions with ``PyObject *`` return type was fixed. + `#5156 `_ + +* Return ``py::ssize_t`` from ``.ref_count()`` instead of ``int``. + `#5139 `_ + +* A subtle bug involving C++ types with unusual ``operator&`` overrides + was fixed. + `#5189 `_ + +* Support Python 3.13 with minor fix, add to CI. + `#5127 `_ + + +.. fix(cmake) + +* Fix mistake affecting old cmake and old boost. + `#5149 `_ + + +Documentation: + +* Build docs updated to feature scikit-build-core and meson-python, and updated + setuptools instructions. + `#5168 `_ + + +Tests: + +* Avoid immortal objects in tests. + `#5150 `_ + + +CI: + +* Compile against Python 3.13t in CI. + +* Use ``macos-13`` (Intel) for CI jobs for now (will drop Python 3.7 soon). + `#5109 `_ + +* Releases now have artifact attestations, visible at + https://github.com/pybind/pybind11/attestations. + `#5196 `_ + +Other: + +* Some cleanup in preparation for 3.13 support. + `#5137 `_ + +* Avoid a warning by ensuring an iterator end check is included in release mode. + `#5129 `_ + +* Bump max cmake to 3.29. + `#5075 `_ + +* Update docs and noxfile. + `#5071 `_ + +Version 2.12.1 (September 13, 2024) +----------------------------------- + +New Features: + +* A new ``self._pybind11_conduit_v1_()`` method is automatically added to all + ``py::class_``-wrapped types, to enable type-safe interoperability between + different independent Python/C++ bindings systems, including pybind11 + versions with different ``PYBIND11_INTERNALS_VERSION``'s. Supported on + pybind11 2.11.2, 2.12.1, and 2.13.6+. + `#5296 `_ + + +Version 2.12.0 (March 27, 2024) +------------------------------- + +New Features: + +* ``pybind11`` now supports compiling for + `NumPy 2 `_. Most + code shouldn't change (see :ref:`upgrade-guide-2.12` for details). However, + if you experience issues you can define ``PYBIND11_NUMPY_1_ONLY`` to disable + the new support for now, but this will be removed in the future. + `#5050 `_ + +* ``pybind11/gil_safe_call_once.h`` was added (it needs to be included + explicitly). The primary use case is GIL-safe initialization of C++ + ``static`` variables. + `#4877 `_ + +* Support move-only iterators in ``py::make_iterator``, + ``py::make_key_iterator``, ``py::make_value_iterator``. + `#4834 `_ + +* Two simple ``py::set_error()`` functions were added and the documentation was + updated accordingly. In particular, ``py::exception<>::operator()`` was + deprecated (use one of the new functions instead). The documentation for + ``py::exception<>`` was further updated to not suggest code that may result + in undefined behavior. + `#4772 `_ + +Bug fixes: + +* Removes potential for Undefined Behavior during process teardown. + `#4897 `_ + +* Improve compatibility with the nvcc compiler (especially CUDA 12.1/12.2). + `#4893 `_ + +* ``pybind11/numpy.h`` now imports NumPy's ``multiarray`` and ``_internal`` + submodules with paths depending on the installed version of NumPy (for + compatibility with NumPy 2). + `#4857 `_ + +* Builtins collections names in docstrings are now consistently rendered in + lowercase (list, set, dict, tuple), in accordance with PEP 585. + `#4833 `_ + +* Added ``py::typing::Iterator``, ``py::typing::Iterable``. + `#4832 `_ + +* Render ``py::function`` as ``Callable`` in docstring. + `#4829 `_ + +* Also bump ``PYBIND11_INTERNALS_VERSION`` for MSVC, which unlocks two new + features without creating additional incompatibilities. + `#4819 `_ + +* Guard against crashes/corruptions caused by modules built with different MSVC + versions. + `#4779 `_ + +* A long-standing bug in the handling of Python multiple inheritance was fixed. + See PR #4762 for the rather complex details. + `#4762 `_ + +* Fix ``bind_map`` with ``using`` declarations. + `#4952 `_ + +* Qualify ``py::detail::concat`` usage to avoid ADL selecting one from + somewhere else, such as modernjson's concat. + `#4955 `_ + +* Use new PyCode API on Python 3.12+. + `#4916 `_ + +* Minor cleanup from warnings reported by Clazy. + `#4988 `_ + +* Remove typing and duplicate ``class_`` for ``KeysView``/``ValuesView``/``ItemsView``. + `#4985 `_ + +* Use ``PyObject_VisitManagedDict()`` and ``PyObject_ClearManagedDict()`` on Python 3.13 and newer. + `#4973 `_ + +* Update ``make_static_property_type()`` to make it compatible with Python 3.13. + `#4971 `_ + +.. fix(types) + +* Render typed iterators for ``make_iterator``, ``make_key_iterator``, + ``make_value_iterator``. + `#4876 `_ + +* Add several missing type name specializations. + `#5073 `_ + +* Change docstring render for ``py::buffer``, ``py::sequence`` and + ``py::handle`` (to ``Buffer``, ``Sequence``, ``Any``). + `#4831 `_ + +* Fixed ``base_enum.__str__`` docstring. + `#4827 `_ + +* Enforce single line docstring signatures. + `#4735 `_ + +* Special 'typed' wrappers now available in ``typing.h`` to annotate tuple, dict, + list, set, and function. + `#4259 `_ + +* Create ``handle_type_name`` specialization to type-hint variable length tuples. + `#5051 `_ + +.. fix(build) + +* Setting ``PYBIND11_FINDPYTHON`` to OFF will force the old FindPythonLibs mechanism to be used. + `#5042 `_ + +* Skip empty ``PYBIND11_PYTHON_EXECUTABLE_LAST`` for the first cmake run. + `#4856 `_ + +* Fix FindPython mode exports & avoid ``pkg_resources`` if + ``importlib.metadata`` available. + `#4941 `_ + +* ``Python_ADDITIONAL_VERSIONS`` (classic search) now includes 3.12. + `#4909 `_ + +* ``pybind11.pc`` is now relocatable by default as long as install destinations + are not absolute paths. + `#4830 `_ + +* Correctly detect CMake FindPython removal when used as a subdirectory. + `#4806 `_ + +* Don't require the libs component on CMake 3.18+ when using + PYBIND11_FINDPYTHON (fixes manylinux builds). + `#4805 `_ + +* ``pybind11_strip`` is no longer automatically applied when + ``CMAKE_BUILD_TYPE`` is unset. + `#4780 `_ + +* Support ``DEBUG_POSFIX`` correctly for debug builds. + `#4761 `_ + +* Hardcode lto/thin lto for Emscripten cross-compiles. + `#4642 `_ + +* Upgrade maximum supported CMake version to 3.27 to fix CMP0148 warnings. + `#4786 `_ + +Documentation: + +* Small fix to grammar in ``functions.rst``. + `#4791 `_ + +* Remove upper bound in example pyproject.toml for setuptools. + `#4774 `_ + +CI: + +* CI: Update NVHPC to 23.5 and Ubuntu 20.04. + `#4764 `_ + +* Test on PyPy 3.10. + `#4714 `_ + +Other: + +* Use Ruff formatter instead of Black. + `#4912 `_ + +* An ``assert()`` was added to help Coverty avoid generating a false positive. + `#4817 `_ + +Version 2.11.2 (September 13, 2024) +----------------------------------- + +New Features: + +* A new ``self._pybind11_conduit_v1_()`` method is automatically added to all + ``py::class_``-wrapped types, to enable type-safe interoperability between + different independent Python/C++ bindings systems, including pybind11 + versions with different ``PYBIND11_INTERNALS_VERSION``'s. Supported on + pybind11 2.11.2, 2.12.1, and 2.13.6+. + `#5296 `_ + + +Version 2.11.1 (July 17, 2023) +------------------------------ + +Changes: + +* ``PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF`` is now provided as an option + for disabling the default-on ``PyGILState_Check()``'s in + ``pybind11::handle``'s ``inc_ref()`` & ``dec_ref()``. + `#4753 `_ + +* ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF`` was disabled for PyPy in general + (not just PyPy Windows). + `#4751 `_ + + +Version 2.11.0 (July 14, 2023) +------------------------------ + +New features: + +* The newly added ``pybind11::detail::is_move_constructible`` trait can be + specialized for cases in which ``std::is_move_constructible`` does not work + as needed. This is very similar to the long-established + ``pybind11::detail::is_copy_constructible``. + `#4631 `_ + +* Introduce ``recursive_container_traits``. + `#4623 `_ + +* ``pybind11/type_caster_pyobject_ptr.h`` was added to support automatic + wrapping of APIs that make use of ``PyObject *``. This header needs to + included explicitly (i.e. it is not included implicitly + with ``pybind/pybind11.h``). + `#4601 `_ + +* ``format_descriptor<>`` & ``npy_format_descriptor<>`` ``PyObject *`` + specializations were added. The latter enables ``py::array_t`` + to/from-python conversions. + `#4674 `_ + +* ``buffer_info`` gained an ``item_type_is_equivalent_to()`` member + function. + `#4674 `_ + +* The ``capsule`` API gained a user-friendly constructor + (``py::capsule(ptr, "name", dtor)``). + `#4720 `_ + +Changes: + +* ``PyGILState_Check()``'s in ``pybind11::handle``'s ``inc_ref()`` & + ``dec_ref()`` are now enabled by default again. + `#4246 `_ + +* ``py::initialize_interpreter()`` using ``PyConfig_InitPythonConfig()`` + instead of ``PyConfig_InitIsolatedConfig()``, to obtain complete + ``sys.path``. + `#4473 `_ + +* Cast errors now always include Python type information, even if + ``PYBIND11_DETAILED_ERROR_MESSAGES`` is not defined. This increases binary + sizes slightly (~1.5%) but the error messages are much more informative. + `#4463 `_ + +* The docstring generation for the ``std::array``-list caster was fixed. + Previously, signatures included the size of the list in a non-standard, + non-spec compliant way. The new format conforms to PEP 593. + **Tooling for processing the docstrings may need to be updated accordingly.** + `#4679 `_ + +* Setter return values (which are inaccessible for all practical purposes) are + no longer converted to Python (only to be discarded). + `#4621 `_ + +* Allow lambda specified to function definition to be ``noexcept(true)`` + in C++17. + `#4593 `_ + +* Get rid of recursive template instantiations for concatenating type + signatures on C++17 and higher. + `#4587 `_ + +* Compatibility with Python 3.12 (beta). Note that the minimum pybind11 + ABI version for Python 3.12 is version 5. (The default ABI version + for Python versions up to and including 3.11 is still version 4.). + `#4570 `_ + +* With ``PYBIND11_INTERNALS_VERSION 5`` (default for Python 3.12+), MSVC builds + use ``std::hash`` and ``std::equal_to`` + instead of string-based type comparisons. This resolves issues when binding + types defined in the unnamed namespace. + `#4319 `_ + +* Python exception ``__notes__`` (introduced with Python 3.11) are now added to + the ``error_already_set::what()`` output. + `#4678 `_ + +Build system improvements: + +* CMake 3.27 support was added, CMake 3.4 support was dropped. + FindPython will be used if ``FindPythonInterp`` is not present. + `#4719 `_ + +* Update clang-tidy to 15 in CI. + `#4387 `_ + +* Moved the linting framework over to Ruff. + `#4483 `_ + +* Skip ``lto`` checks and target generation when + ``CMAKE_INTERPROCEDURAL_OPTIMIZATION`` is defined. + `#4643 `_ + +* No longer inject ``-stdlib=libc++``, not needed for modern Pythons + (macOS 10.9+). + `#4639 `_ + +* PyPy 3.10 support was added, PyPy 3.7 support was dropped. + `#4728 `_ + +* Testing with Python 3.12 beta releases was added. + `#4713 `_ + + +Version 2.10.4 (Mar 16, 2023) +----------------------------- + +Changes: + +* ``python3 -m pybind11`` gained a ``--version`` option (prints the version and + exits). + `#4526 `_ + +Bug Fixes: + +* Fix a warning when pydebug is enabled on Python 3.11. + `#4461 `_ + +* Ensure ``gil_scoped_release`` RAII is non-copyable. + `#4490 `_ + +* Ensure the tests dir does not show up with new versions of setuptools. + `#4510 `_ + +* Better stacklevel for a warning in setuptools helpers. + `#4516 `_ + +Version 2.10.3 (Jan 3, 2023) +---------------------------- + +Changes: + +* Temporarily made our GIL status assertions (added in 2.10.2) disabled by + default (re-enable manually by defining + ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF``, will be enabled in 2.11). + `#4432 `_ + +* Improved error messages when ``inc_ref``/``dec_ref`` are called with an + invalid GIL state. + `#4427 `_ + `#4436 `_ + +Bug Fixes: + +* Some minor touchups found by static analyzers. + `#4440 `_ + + +Version 2.10.2 (Dec 20, 2022) +----------------------------- + +Changes: + +* ``scoped_interpreter`` constructor taking ``PyConfig``. + `#4330 `_ + +* ``pybind11/eigen/tensor.h`` adds converters to and from ``Eigen::Tensor`` and + ``Eigen::TensorMap``. + `#4201 `_ + +* ``PyGILState_Check()``'s were integrated to ``pybind11::handle`` + ``inc_ref()`` & ``dec_ref()``. The added GIL checks are guarded by + ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF``, which is the default only if + ``NDEBUG`` is not defined. (Made non-default in 2.10.3, will be active in 2.11) + `#4246 `_ + +* Add option for enable/disable enum members in docstring. + `#2768 `_ + +* Fixed typing of ``KeysView``, ``ValuesView`` and ``ItemsView`` in ``bind_map``. + `#4353 `_ + +Bug fixes: + +* Bug fix affecting only Python 3.6 under very specific, uncommon conditions: + move ``PyEval_InitThreads()`` call to the correct location. + `#4350 `_ + +* Fix segfault bug when passing foreign native functions to functional.h. + `#4254 `_ + +Build system improvements: + +* Support setting PYTHON_LIBRARIES manually for Windows ARM cross-compilation + (classic mode). + `#4406 `_ + +* Extend IPO/LTO detection for ICX (a.k.a IntelLLVM) compiler. + `#4402 `_ + +* Allow calling ``find_package(pybind11 CONFIG)`` multiple times from separate + directories in the same CMake project and properly link Python (new mode). + `#4401 `_ + +* ``multiprocessing_set_spawn`` in pytest fixture for added safety. + `#4377 `_ + +* Fixed a bug in two pybind11/tools cmake scripts causing "Unknown arguments specified" errors. + `#4327 `_ + + + +Version 2.10.1 (Oct 31, 2022) +----------------------------- + +This is the first version to fully support embedding the newly released Python 3.11. + +Changes: + +* Allow ``pybind11::capsule`` constructor to take null destructor pointers. + `#4221 `_ + +* ``embed.h`` was changed so that ``PYTHONPATH`` is used also with Python 3.11 + (established behavior). + `#4119 `_ + +* A ``PYBIND11_SIMPLE_GIL_MANAGEMENT`` option was added (cmake, C++ define), + along with many additional tests in ``test_gil_scoped.py``. The option may be + useful to try when debugging GIL-related issues, to determine if the more + complex default implementation is or is not to blame. See #4216 for + background. WARNING: Please be careful to not create ODR violations when + using the option: everything that is linked together with mutual symbol + visibility needs to be rebuilt. + `#4216 `_ + +* ``PYBIND11_EXPORT_EXCEPTION`` was made non-empty only under macOS. This makes + Linux builds safer, and enables the removal of warning suppression pragmas for + Windows. + `#4298 `_ + +Bug fixes: + +* Fixed a bug where ``UnicodeDecodeError`` was not propagated from various + ``py::str`` ctors when decoding surrogate utf characters. + `#4294 `_ + +* Revert perfect forwarding for ``make_iterator``. This broke at least one + valid use case. May revisit later. + `#4234 `_ + +* Fix support for safe casts to ``void*`` (regression in 2.10.0). + `#4275 `_ + +* Fix ``char8_t`` support (regression in 2.9). + `#4278 `_ + +* Unicode surrogate character in Python exception message leads to process + termination in ``error_already_set::what()``. + `#4297 `_ + +* Fix MSVC 2019 v.1924 & C++14 mode error for ``overload_cast``. + `#4188 `_ + +* Make augmented assignment operators non-const for the object-api. Behavior + was previously broken for augmented assignment operators. + `#4065 `_ + +* Add proper error checking to C++ bindings for Python list append and insert. + `#4208 `_ + +* Work-around for Nvidia's CUDA nvcc compiler in versions 11.4.0 - 11.8.0. + `#4220 `_ + +* A workaround for PyPy was added in the ``py::error_already_set`` + implementation, related to PR `#1895 `_ + released with v2.10.0. + `#4079 `_ + +* Fixed compiler errors when C++23 ``std::forward_like`` is available. + `#4136 `_ + +* Properly raise exceptions in contains methods (like when an object in unhashable). + `#4209 `_ + +* Further improve another error in exception handling. + `#4232 `_ + +* ``get_local_internals()`` was made compatible with + ``finalize_interpreter()``, fixing potential freezes during interpreter + finalization. + `#4192 `_ + +Performance and style: + +* Reserve space in set and STL map casters if possible. This will prevent + unnecessary rehashing / resizing by knowing the number of keys ahead of time + for Python to C++ casting. This improvement will greatly speed up the casting + of large unordered maps and sets. + `#4194 `_ + +* GIL RAII scopes are non-copyable to avoid potential bugs. + `#4183 `_ + +* Explicitly default all relevant ctors for pytypes in the ``PYBIND11_OBJECT`` + macros and enforce the clang-tidy checks ``modernize-use-equals-default`` in + macros as well. + `#4017 `_ + +* Optimize iterator advancement in C++ bindings. + `#4237 `_ + +* Use the modern ``PyObject_GenericGetDict`` and ``PyObject_GenericSetDict`` + for handling dynamic attribute dictionaries. + `#4106 `_ + +* Document that users should use ``PYBIND11_NAMESPACE`` instead of using ``pybind11`` when + opening namespaces. Using namespace declarations and namespace qualification + remain the same as ``pybind11``. This is done to ensure consistent symbol + visibility. + `#4098 `_ + +* Mark ``detail::forward_like`` as constexpr. + `#4147 `_ + +* Optimize unpacking_collector when processing ``arg_v`` arguments. + `#4219 `_ + +* Optimize casting C++ object to ``None``. + `#4269 `_ + + +Build system improvements: + +* CMake: revert overwrite behavior, now opt-in with ``PYBIND11_PYTHONLIBS_OVERRWRITE OFF``. + `#4195 `_ + +* Include a pkg-config file when installing pybind11, such as in the Python + package. + `#4077 `_ + +* Avoid stripping debug symbols when ``CMAKE_BUILD_TYPE`` is set to ``DEBUG`` + instead of ``Debug``. + `#4078 `_ + +* Followup to `#3948 `_, fixing vcpkg again. + `#4123 `_ + +Version 2.10.0 (Jul 15, 2022) +----------------------------- + +Removed support for Python 2.7, Python 3.5, and MSVC 2015. Support for MSVC +2017 is limited due to availability of CI runners; we highly recommend MSVC +2019 or 2022 be used. Initial support added for Python 3.11. + +New features: + +* ``py::anyset`` & ``py::frozenset`` were added, with copying (cast) to + ``std::set`` (similar to ``set``). + `#3901 `_ + +* Support bytearray casting to string. + `#3707 `_ + +* ``type_caster`` was added. ``std::monostate`` is a tag type + that allows ``std::variant`` to act as an optional, or allows default + construction of a ``std::variant`` holding a non-default constructible type. + `#3818 `_ + +* ``pybind11::capsule::set_name`` added to mutate the name of the capsule instance. + `#3866 `_ + +* NumPy: dtype constructor from type number added, accessors corresponding to + Python API ``dtype.num``, ``dtype.byteorder``, ``dtype.flags`` and + ``dtype.alignment`` added. + `#3868 `_ + + +Changes: + +* Python 3.6 is now the minimum supported version. + `#3688 `_ + `#3719 `_ + +* The minimum version for MSVC is now 2017. + `#3722 `_ + +* Fix issues with CPython 3.11 betas and add to supported test matrix. + `#3923 `_ + +* ``error_already_set`` is now safer and more performant, especially for + exceptions with long tracebacks, by delaying computation. + `#1895 `_ + +* Improve exception handling in python ``str`` bindings. + `#3826 `_ + +* The bindings for capsules now have more consistent exception handling. + `#3825 `_ + +* ``PYBIND11_OBJECT_CVT`` and ``PYBIND11_OBJECT_CVT_DEFAULT`` macro can now be + used to define classes in namespaces other than pybind11. + `#3797 `_ + +* Error printing code now uses ``PYBIND11_DETAILED_ERROR_MESSAGES`` instead of + requiring ``NDEBUG``, allowing use with release builds if desired. + `#3913 `_ + +* Implicit conversion of the literal ``0`` to ``pybind11::handle`` is now disabled. + `#4008 `_ + + +Bug fixes: + +* Fix exception handling when ``pybind11::weakref()`` fails. + `#3739 `_ + +* ``module_::def_submodule`` was missing proper error handling. This is fixed now. + `#3973 `_ + +* The behavior or ``error_already_set`` was made safer and the highly opaque + "Unknown internal error occurred" message was replaced with a more helpful + message. + `#3982 `_ + +* ``error_already_set::what()`` now handles non-normalized exceptions correctly. + `#3971 `_ + +* Support older C++ compilers where filesystem is not yet part of the standard + library and is instead included in ``std::experimental::filesystem``. + `#3840 `_ + +* Fix ``-Wfree-nonheap-object`` warnings produced by GCC by avoiding returning + pointers to static objects with ``return_value_policy::take_ownership``. + `#3946 `_ + +* Fix cast from pytype rvalue to another pytype. + `#3949 `_ + +* Ensure proper behavior when garbage collecting classes with dynamic attributes in Python >=3.9. + `#4051 `_ + +* A couple long-standing ``PYBIND11_NAMESPACE`` + ``__attribute__((visibility("hidden")))`` inconsistencies are now fixed + (affects only unusual environments). + `#4043 `_ + +* ``pybind11::detail::get_internals()`` is now resilient to in-flight Python + exceptions. + `#3981 `_ + +* Arrays with a dimension of size 0 are now properly converted to dynamic Eigen + matrices (more common in NumPy 1.23). + `#4038 `_ + +* Avoid catching unrelated errors when importing NumPy. + `#3974 `_ + +Performance and style: + +* Added an accessor overload of ``(object &&key)`` to reference steal the + object when using python types as keys. This prevents unnecessary reference + count overhead for attr, dictionary, tuple, and sequence look ups. Added + additional regression tests. Fixed a performance bug the caused accessor + assignments to potentially perform unnecessary copies. + `#3970 `_ + +* Perfect forward all args of ``make_iterator``. + `#3980 `_ + +* Avoid potential bug in pycapsule destructor by adding an ``error_guard`` to + one of the dtors. + `#3958 `_ + +* Optimize dictionary access in ``strip_padding`` for numpy. + `#3994 `_ + +* ``stl_bind.h`` bindings now take slice args as a const-ref. + `#3852 `_ + +* Made slice constructor more consistent, and improve performance of some + casters by allowing reference stealing. + `#3845 `_ + +* Change numpy dtype from_args method to use const ref. + `#3878 `_ + +* Follow rule of three to ensure ``PyErr_Restore`` is called only once. + `#3872 `_ + +* Added missing perfect forwarding for ``make_iterator`` functions. + `#3860 `_ + +* Optimize c++ to python function casting by using the rvalue caster. + `#3966 `_ + +* Optimize Eigen sparse matrix casting by removing unnecessary temporary. + `#4064 `_ + +* Avoid potential implicit copy/assignment constructors causing double free in + ``strdup_gaurd``. + `#3905 `_ + +* Enable clang-tidy checks ``misc-definitions-in-headers``, + ``modernize-loop-convert``, and ``modernize-use-nullptr``. + `#3881 `_ + `#3988 `_ + + +Build system improvements: + +* CMake: Fix file extension on Windows with cp36 and cp37 using FindPython. + `#3919 `_ + +* CMake: Support multiple Python targets (such as on vcpkg). + `#3948 `_ + +* CMake: Fix issue with NVCC on Windows. + `#3947 `_ + +* CMake: Drop the bitness check on cross compiles (like targeting WebAssembly + via Emscripten). + `#3959 `_ + +* Add MSVC builds in debug mode to CI. + `#3784 `_ + +* MSVC 2022 C++20 coverage was added to GitHub Actions, including Eigen. + `#3732 `_, + `#3741 `_ + + +Backend and tidying up: + +* New theme for the documentation. + `#3109 `_ + +* Remove idioms in code comments. Use more inclusive language. + `#3809 `_ + +* ``#include `` was removed from the ``pybind11/stl.h`` header. Your + project may break if it has a transitive dependency on this include. The fix + is to "Include What You Use". + `#3928 `_ + +* Avoid ``setup.py `` usage in internal tests. + `#3734 `_ + + +Version 2.9.2 (Mar 29, 2022) +---------------------------- + +Changes: + +* Enum now has an ``__index__`` method on Python <3.8 too. + `#3700 `_ + +* Local internals are now cleared after finalizing the interpreter. + `#3744 `_ + +Bug fixes: + +* Better support for Python 3.11 alphas. + `#3694 `_ + +* ``PYBIND11_TYPE_CASTER`` now uses fully qualified symbols, so it can be used + outside of ``pybind11::detail``. + `#3758 `_ + +* Some fixes for PyPy 3.9. + `#3768 `_ + +* Fixed a potential memleak in PyPy in ``get_type_override``. + `#3774 `_ + +* Fix usage of ``VISIBILITY_INLINES_HIDDEN``. + `#3721 `_ + + +Build system improvements: + +* Uses ``sysconfig`` module to determine installation locations on Python >= + 3.10, instead of ``distutils`` which has been deprecated. + `#3764 `_ + +* Support Catch 2.13.5+ (supporting GLIBC 2.34+). + `#3679 `_ + +* Fix test failures with numpy 1.22 by ignoring whitespace when comparing + ``str()`` of dtypes. + `#3682 `_ + + +Backend and tidying up: + +* clang-tidy: added ``readability-qualified-auto``, + ``readability-braces-around-statements``, + ``cppcoreguidelines-prefer-member-initializer``, + ``clang-analyzer-optin.performance.Padding``, + ``cppcoreguidelines-pro-type-static-cast-downcast``, and + ``readability-inconsistent-declaration-parameter-name``. + `#3702 `_, + `#3699 `_, + `#3716 `_, + `#3709 `_ + +* clang-format was added to the pre-commit actions, and the entire code base + automatically reformatted (after several iterations preparing for this leap). + `#3713 `_ + + +Version 2.9.1 (Feb 2, 2022) +--------------------------- + +Changes: + +* If possible, attach Python exception with ``py::raise_from`` to ``TypeError`` + when casting from C++ to Python. This will give additional info if Python + exceptions occur in the caster. Adds a test case of trying to convert a set + from C++ to Python when the hash function is not defined in Python. + `#3605 `_ + +* Add a mapping of C++11 nested exceptions to their Python exception + equivalent using ``py::raise_from``. This attaches the nested exceptions in + Python using the ``__cause__`` field. + `#3608 `_ + +* Propagate Python exception traceback using ``raise_from`` if a pybind11 + function runs out of overloads. + `#3671 `_ + +* ``py::multiple_inheritance`` is now only needed when C++ bases are hidden + from pybind11. + `#3650 `_ and + `#3659 `_ + + +Bug fixes: + +* Remove a boolean cast in ``numpy.h`` that causes MSVC C4800 warnings when + compiling against Python 3.10 or newer. + `#3669 `_ + +* Render ``py::bool_`` and ``py::float_`` as ``bool`` and ``float`` + respectively. + `#3622 `_ + +Build system improvements: + +* Fix CMake extension suffix computation on Python 3.10+. + `#3663 `_ + +* Allow ``CMAKE_ARGS`` to override CMake args in pybind11's own ``setup.py``. + `#3577 `_ + +* Remove a few deprecated c-headers. + `#3610 `_ + +* More uniform handling of test targets. + `#3590 `_ + +* Add clang-tidy readability check to catch potentially swapped function args. + `#3611 `_ + + +Version 2.9.0 (Dec 28, 2021) +---------------------------- + +This is the last version to support Python 2.7 and 3.5. + +New Features: + +* Allow ``py::args`` to be followed by other arguments; the remaining arguments + are implicitly keyword-only, as if a ``py::kw_only{}`` annotation had been + used. + `#3402 `_ + +Changes: + +* Make str/bytes/memoryview more interoperable with ``std::string_view``. + `#3521 `_ + +* Replace ``_`` with ``const_name`` in internals, avoid defining ``pybind::_`` + if ``_`` defined as macro (common gettext usage) + `#3423 `_ + + +Bug fixes: + +* Fix a rare warning about extra copy in an Eigen constructor. + `#3486 `_ + +* Fix caching of the C++ overrides. + `#3465 `_ + +* Add missing ``std::forward`` calls to some ``cpp_function`` overloads. + `#3443 `_ + +* Support PyPy 7.3.7 and the PyPy3.8 beta. Test python-3.11 on PRs with the + ``python dev`` label. + `#3419 `_ + +* Replace usage of deprecated ``Eigen::MappedSparseMatrix`` with + ``Eigen::Map>`` for Eigen 3.3+. + `#3499 `_ + +* Tweaks to support Microsoft Visual Studio 2022. + `#3497 `_ + +Build system improvements: + +* Nicer CMake printout and IDE organisation for pybind11's own tests. + `#3479 `_ + +* CMake: report version type as part of the version string to avoid a spurious + space in the package status message. + `#3472 `_ + +* Flags starting with ``-g`` in ``$CFLAGS`` and ``$CPPFLAGS`` are no longer + overridden by ``.Pybind11Extension``. + `#3436 `_ + +* Ensure ThreadPool is closed in ``setup_helpers``. + `#3548 `_ + +* Avoid LTS on ``mips64`` and ``ppc64le`` (reported broken). + `#3557 `_ + + +v2.8.1 (Oct 27, 2021) +--------------------- + +Changes and additions: + +* The simple namespace creation shortcut added in 2.8.0 was deprecated due to + usage of CPython internal API, and will be removed soon. Use + ``py::module_::import("types").attr("SimpleNamespace")``. + `#3374 `_ + +* Add C++ Exception type to throw and catch ``AttributeError``. Useful for + defining custom ``__setattr__`` and ``__getattr__`` methods. + `#3387 `_ + +Fixes: + +* Fixed the potential for dangling references when using properties with + ``std::optional`` types. + `#3376 `_ + +* Modernize usage of ``PyCodeObject`` on Python 3.9+ (moving toward support for + Python 3.11a1) + `#3368 `_ + +* A long-standing bug in ``eigen.h`` was fixed (originally PR #3343). The bug + was unmasked by newly added ``static_assert``'s in the Eigen 3.4.0 release. + `#3352 `_ + +* Support multiple raw inclusion of CMake helper files (Conan.io does this for + multi-config generators). + `#3420 `_ + +* Fix harmless warning on upcoming CMake 3.22. + `#3368 `_ + +* Fix 2.8.0 regression with MSVC 2017 + C++17 mode + Python 3. + `#3407 `_ + +* Fix 2.8.0 regression that caused undefined behavior (typically + segfaults) in ``make_key_iterator``/``make_value_iterator`` if dereferencing + the iterator returned a temporary value instead of a reference. + `#3348 `_ + + +v2.8.0 (Oct 4, 2021) +-------------------- + +New features: + +* Added ``py::raise_from`` to enable chaining exceptions. + `#3215 `_ + +* Allow exception translators to be optionally registered local to a module + instead of applying globally across all pybind11 modules. Use + ``register_local_exception_translator(ExceptionTranslator&& translator)`` + instead of ``register_exception_translator(ExceptionTranslator&& + translator)`` to keep your exception remapping code local to the module. + `#2650 `_ + +* Add ``make_simple_namespace`` function for instantiating Python + ``SimpleNamespace`` objects. **Deprecated in 2.8.1.** + `#2840 `_ + +* ``pybind11::scoped_interpreter`` and ``initialize_interpreter`` have new + arguments to allow ``sys.argv`` initialization. + `#2341 `_ + +* Allow Python builtins to be used as callbacks in CPython. + `#1413 `_ + +* Added ``view`` to view arrays with a different datatype. + `#987 `_ + +* Implemented ``reshape`` on arrays. + `#984 `_ + +* Enable defining custom ``__new__`` methods on classes by fixing bug + preventing overriding methods if they have non-pybind11 siblings. + `#3265 `_ + +* Add ``make_value_iterator()``, and fix ``make_key_iterator()`` to return + references instead of copies. + `#3293 `_ + +* Improve the classes generated by ``bind_map``: `#3310 `_ + + * Change ``.items`` from an iterator to a dictionary view. + * Add ``.keys`` and ``.values`` (both dictionary views). + * Allow ``__contains__`` to take any object. + +* ``pybind11::custom_type_setup`` was added, for customizing the + ``PyHeapTypeObject`` corresponding to a class, which may be useful for + enabling garbage collection support, among other things. + `#3287 `_ + + +Changes: + +* Set ``__file__`` constant when running ``eval_file`` in an embedded interpreter. + `#3233 `_ + +* Python objects and (C++17) ``std::optional`` now accepted in ``py::slice`` + constructor. + `#1101 `_ + +* The pybind11 proxy types ``str``, ``bytes``, ``bytearray``, ``tuple``, + ``list`` now consistently support passing ``ssize_t`` values for sizes and + indexes. Previously, only ``size_t`` was accepted in several interfaces. + `#3219 `_ + +* Avoid evaluating ``PYBIND11_TLS_REPLACE_VALUE`` arguments more than once. + `#3290 `_ + +Fixes: + +* Bug fix: enum value's ``__int__`` returning non-int when underlying type is + bool or of char type. + `#1334 `_ + +* Fixes bug in setting error state in Capsule's pointer methods. + `#3261 `_ + +* A long-standing memory leak in ``py::cpp_function::initialize`` was fixed. + `#3229 `_ + +* Fixes thread safety for some ``pybind11::type_caster`` which require lifetime + extension, such as for ``std::string_view``. + `#3237 `_ + +* Restore compatibility with gcc 4.8.4 as distributed by ubuntu-trusty, linuxmint-17. + `#3270 `_ + + +Build system improvements: + +* Fix regression in CMake Python package config: improper use of absolute path. + `#3144 `_ + +* Cached Python version information could become stale when CMake was re-run + with a different Python version. The build system now detects this and + updates this information. + `#3299 `_ + +* Specified UTF8-encoding in setup.py calls of open(). + `#3137 `_ + +* Fix a harmless warning from CMake 3.21 with the classic Python discovery. + `#3220 `_ + +* Eigen repo and version can now be specified as cmake options. + `#3324 `_ + + +Backend and tidying up: + +* Reduced thread-local storage required for keeping alive temporary data for + type conversion to one key per ABI version, rather than one key per extension + module. This makes the total thread-local storage required by pybind11 2 + keys per ABI version. + `#3275 `_ + +* Optimize NumPy array construction with additional moves. + `#3183 `_ + +* Conversion to ``std::string`` and ``std::string_view`` now avoids making an + extra copy of the data on Python >= 3.3. + `#3257 `_ + +* Remove const modifier from certain C++ methods on Python collections + (``list``, ``set``, ``dict``) such as (``clear()``, ``append()``, + ``insert()``, etc...) and annotated them with ``py-non-const``. + +* Enable readability ``clang-tidy-const-return`` and remove useless consts. + `#3254 `_ + `#3194 `_ + +* The clang-tidy ``google-explicit-constructor`` option was enabled. + `#3250 `_ + +* Mark a pytype move constructor as noexcept (perf). + `#3236 `_ + +* Enable clang-tidy check to guard against inheritance slicing. + `#3210 `_ + +* Legacy warning suppression pragma were removed from eigen.h. On Unix + platforms, please use -isystem for Eigen include directories, to suppress + compiler warnings originating from Eigen headers. Note that CMake does this + by default. No adjustments are needed for Windows. + `#3198 `_ + +* Format pybind11 with isort consistent ordering of imports + `#3195 `_ + +* The warnings-suppression "pragma clamp" at the top/bottom of pybind11 was + removed, clearing the path to refactoring and IWYU cleanup. + `#3186 `_ + +* Enable most bugprone checks in clang-tidy and fix the found potential bugs + and poor coding styles. + `#3166 `_ + +* Add ``clang-tidy-readability`` rules to make boolean casts explicit improving + code readability. Also enabled other misc and readability clang-tidy checks. + `#3148 `_ + +* Move object in ``.pop()`` for list. + `#3116 `_ + + + + +v2.7.1 (Aug 3, 2021) +--------------------- + +Minor missing functionality added: + +* Allow Python builtins to be used as callbacks in CPython. + `#1413 `_ + +Bug fixes: + +* Fix regression in CMake Python package config: improper use of absolute path. + `#3144 `_ + +* Fix Mingw64 and add to the CI testing matrix. + `#3132 `_ + +* Specified UTF8-encoding in setup.py calls of open(). + `#3137 `_ + +* Add clang-tidy-readability rules to make boolean casts explicit improving + code readability. Also enabled other misc and readability clang-tidy checks. + `#3148 `_ + +* Move object in ``.pop()`` for list. + `#3116 `_ + +Backend and tidying up: + +* Removed and fixed warning suppressions. + `#3127 `_ + `#3129 `_ + `#3135 `_ + `#3141 `_ + `#3142 `_ + `#3150 `_ + `#3152 `_ + `#3160 `_ + `#3161 `_ + + +v2.7.0 (Jul 16, 2021) +--------------------- + +New features: + +* Enable ``py::implicitly_convertible`` for + ``py::class_``-wrapped types. + `#3059 `_ + +* Allow function pointer extraction from overloaded functions. + `#2944 `_ + +* NumPy: added ``.char_()`` to type which gives the NumPy public ``char`` + result, which also distinguishes types by bit length (unlike ``.kind()``). + `#2864 `_ + +* Add ``pybind11::bytearray`` to manipulate ``bytearray`` similar to ``bytes``. + `#2799 `_ + +* ``pybind11/stl/filesystem.h`` registers a type caster that, on C++17/Python + 3.6+, converts ``std::filesystem::path`` to ``pathlib.Path`` and any + ``os.PathLike`` to ``std::filesystem::path``. + `#2730 `_ + +* A ``PYBIND11_VERSION_HEX`` define was added, similar to ``PY_VERSION_HEX``. + `#3120 `_ + + + +Changes: + +* ``py::str`` changed to exclusively hold ``PyUnicodeObject``. Previously + ``py::str`` could also hold ``bytes``, which is probably surprising, was + never documented, and can mask bugs (e.g. accidental use of ``py::str`` + instead of ``py::bytes``). + `#2409 `_ + +* Add a safety guard to ensure that the Python GIL is held when C++ calls back + into Python via ``object_api<>::operator()`` (e.g. ``py::function`` + ``__call__``). (This feature is available for Python 3.6+ only.) + `#2919 `_ + +* Catch a missing ``self`` argument in calls to ``__init__()``. + `#2914 `_ + +* Use ``std::string_view`` if available to avoid a copy when passing an object + to a ``std::ostream``. + `#3042 `_ + +* An important warning about thread safety was added to the ``iostream.h`` + documentation; attempts to make ``py::scoped_ostream_redirect`` thread safe + have been removed, as it was only partially effective. + `#2995 `_ + + +Fixes: + +* Performance: avoid unnecessary strlen calls. + `#3058 `_ + +* Fix auto-generated documentation string when using ``const T`` in + ``pyarray_t``. + `#3020 `_ + +* Unify error messages thrown by ``simple_collector``/``unpacking_collector``. + `#3013 `_ + +* ``pybind11::builtin_exception`` is now explicitly exported, which means the + types included/defined in different modules are identical, and exceptions + raised in different modules can be caught correctly. The documentation was + updated to explain that custom exceptions that are used across module + boundaries need to be explicitly exported as well. + `#2999 `_ + +* Fixed exception when printing UTF-8 to a ``scoped_ostream_redirect``. + `#2982 `_ + +* Pickle support enhancement: ``setstate`` implementation will attempt to + ``setattr`` ``__dict__`` only if the unpickled ``dict`` object is not empty, + to not force use of ``py::dynamic_attr()`` unnecessarily. + `#2972 `_ + +* Allow negative timedelta values to roundtrip. + `#2870 `_ + +* Fix unchecked errors could potentially swallow signals/other exceptions. + `#2863 `_ + +* Add null pointer check with ``std::localtime``. + `#2846 `_ + +* Fix the ``weakref`` constructor from ``py::object`` to create a new + ``weakref`` on conversion. + `#2832 `_ + +* Avoid relying on exceptions in C++17 when getting a ``shared_ptr`` holder + from a ``shared_from_this`` class. + `#2819 `_ + +* Allow the codec's exception to be raised instead of :code:`RuntimeError` when + casting from :code:`py::str` to :code:`std::string`. + `#2903 `_ + + +Build system improvements: + +* In ``setup_helpers.py``, test for platforms that have some multiprocessing + features but lack semaphores, which ``ParallelCompile`` requires. + `#3043 `_ + +* Fix ``pybind11_INCLUDE_DIR`` in case ``CMAKE_INSTALL_INCLUDEDIR`` is + absolute. + `#3005 `_ + +* Fix bug not respecting ``WITH_SOABI`` or ``WITHOUT_SOABI`` to CMake. + `#2938 `_ + +* Fix the default ``Pybind11Extension`` compilation flags with a Mingw64 python. + `#2921 `_ + +* Clang on Windows: do not pass ``/MP`` (ignored flag). + `#2824 `_ + +* ``pybind11.setup_helpers.intree_extensions`` can be used to generate + ``Pybind11Extension`` instances from cpp files placed in the Python package + source tree. + `#2831 `_ + +Backend and tidying up: + +* Enable clang-tidy performance, readability, and modernization checks + throughout the codebase to enforce best coding practices. + `#3046 `_, + `#3049 `_, + `#3051 `_, + `#3052 `_, + `#3080 `_, and + `#3094 `_ + + +* Checks for common misspellings were added to the pre-commit hooks. + `#3076 `_ + +* Changed ``Werror`` to stricter ``Werror-all`` for Intel compiler and fixed + minor issues. + `#2948 `_ + +* Fixed compilation with GCC < 5 when the user defines ``_GLIBCXX_USE_CXX11_ABI``. + `#2956 `_ + +* Added nox support for easier local testing and linting of contributions. + `#3101 `_ and + `#3121 `_ + +* Avoid RTD style issue with docutils 0.17+. + `#3119 `_ + +* Support pipx run, such as ``pipx run pybind11 --include`` for a quick compile. + `#3117 `_ + + + +v2.6.2 (Jan 26, 2021) +--------------------- + +Minor missing functionality added: + +* enum: add missing Enum.value property. + `#2739 `_ + +* Allow thread termination to be avoided during shutdown for CPython 3.7+ via + ``.disarm`` for ``gil_scoped_acquire``/``gil_scoped_release``. + `#2657 `_ + +Fixed or improved behavior in a few special cases: + +* Fix bug where the constructor of ``object`` subclasses would not throw on + being passed a Python object of the wrong type. + `#2701 `_ + +* The ``type_caster`` for integers does not convert Python objects with + ``__int__`` anymore with ``noconvert`` or during the first round of trying + overloads. + `#2698 `_ + +* When casting to a C++ integer, ``__index__`` is always called and not + considered as conversion, consistent with Python 3.8+. + `#2801 `_ + +Build improvements: + +* Setup helpers: ``extra_compile_args`` and ``extra_link_args`` automatically set by + Pybind11Extension are now prepended, which allows them to be overridden + by user-set ``extra_compile_args`` and ``extra_link_args``. + `#2808 `_ + +* Setup helpers: Don't trigger unused parameter warning. + `#2735 `_ + +* CMake: Support running with ``--warn-uninitialized`` active. + `#2806 `_ + +* CMake: Avoid error if included from two submodule directories. + `#2804 `_ + +* CMake: Fix ``STATIC`` / ``SHARED`` being ignored in FindPython mode. + `#2796 `_ + +* CMake: Respect the setting for ``CMAKE_CXX_VISIBILITY_PRESET`` if defined. + `#2793 `_ + +* CMake: Fix issue with FindPython2/FindPython3 not working with ``pybind11::embed``. + `#2662 `_ + +* CMake: mixing local and installed pybind11's would prioritize the installed + one over the local one (regression in 2.6.0). + `#2716 `_ + + +Bug fixes: + +* Fixed segfault in multithreaded environments when using + ``scoped_ostream_redirect``. + `#2675 `_ + +* Leave docstring unset when all docstring-related options are disabled, rather + than set an empty string. + `#2745 `_ + +* The module key in builtins that pybind11 uses to store its internals changed + from std::string to a python str type (more natural on Python 2, no change on + Python 3). + `#2814 `_ + +* Fixed assertion error related to unhandled (later overwritten) exception in + CPython 3.8 and 3.9 debug builds. + `#2685 `_ + +* Fix ``py::gil_scoped_acquire`` assert with CPython 3.9 debug build. + `#2683 `_ + +* Fix issue with a test failing on pytest 6.2. + `#2741 `_ + +Warning fixes: + +* Fix warning modifying constructor parameter 'flag' that shadows a field of + 'set_flag' ``[-Wshadow-field-in-constructor-modified]``. + `#2780 `_ + +* Suppressed some deprecation warnings about old-style + ``__init__``/``__setstate__`` in the tests. + `#2759 `_ + +Valgrind work: + +* Fix invalid access when calling a pybind11 ``__init__`` on a non-pybind11 + class instance. + `#2755 `_ + +* Fixed various minor memory leaks in pybind11's test suite. + `#2758 `_ + +* Resolved memory leak in cpp_function initialization when exceptions occurred. + `#2756 `_ + +* Added a Valgrind build, checking for leaks and memory-related UB, to CI. + `#2746 `_ + +Compiler support: + +* Intel compiler was not activating C++14 support due to a broken define. + `#2679 `_ + +* Support ICC and NVIDIA HPC SDK in C++17 mode. + `#2729 `_ + +* Support Intel OneAPI compiler (ICC 20.2) and add to CI. + `#2573 `_ + + + +v2.6.1 (Nov 11, 2020) +--------------------- + +* ``py::exec``, ``py::eval``, and ``py::eval_file`` now add the builtins module + as ``"__builtins__"`` to their ``globals`` argument, better matching ``exec`` + and ``eval`` in pure Python. + `#2616 `_ + +* ``setup_helpers`` will no longer set a minimum macOS version higher than the + current version. + `#2622 `_ + +* Allow deleting static properties. + `#2629 `_ + +* Seal a leak in ``def_buffer``, cleaning up the ``capture`` object after the + ``class_`` object goes out of scope. + `#2634 `_ + +* ``pybind11_INCLUDE_DIRS`` was incorrect, potentially causing a regression if + it was expected to include ``PYTHON_INCLUDE_DIRS`` (please use targets + instead). + `#2636 `_ + +* Added parameter names to the ``py::enum_`` constructor and methods, avoiding + ``arg0`` in the generated docstrings. + `#2637 `_ + +* Added ``needs_recompile`` optional function to the ``ParallelCompiler`` + helper, to allow a recompile to be skipped based on a user-defined function. + `#2643 `_ + + v2.6.0 (Oct 21, 2020) --------------------- @@ -109,7 +1877,7 @@ Packaging / building improvements: `#2338 `_ and `#2370 `_ - * Full integration with CMake’s C++ standard system and compile features + * Full integration with CMake's C++ standard system and compile features replaces ``PYBIND11_CPP_STANDARD``. * Generated config file is now portable to different Python/compiler/CMake @@ -341,7 +2109,7 @@ v2.4.0 (Sep 19, 2019) `#1888 `_. * ``py::details::overload_cast_impl`` is available in C++11 mode, can be used - like ``overload_cast`` with an additional set of parantheses. + like ``overload_cast`` with an additional set of parentheses. `#1581 `_. * Fixed ``get_include()`` on Conda. @@ -663,6 +2431,7 @@ v2.2.0 (August 31, 2017) from cpp_module import CppBase1, CppBase2 + class PyDerived(CppBase1, CppBase2): def __init__(self): CppBase1.__init__(self) # C++ bases must be initialized explicitly @@ -875,7 +2644,7 @@ v2.2.0 (August 31, 2017) * Intel C++ compiler compatibility fixes. `#937 `_. -* Fixed implicit conversion of `py::enum_` to integer types on Python 2.7. +* Fixed implicit conversion of ``py::enum_`` to integer types on Python 2.7. `#821 `_. * Added ``py::hash`` to fetch the hash value of Python objects, and diff --git a/examples/knxPython/pybind11/docs/classes.rst b/examples/knxPython/pybind11/docs/classes.rst index f3610ef3..4f2167da 100644 --- a/examples/knxPython/pybind11/docs/classes.rst +++ b/examples/knxPython/pybind11/docs/classes.rst @@ -44,20 +44,30 @@ interactive Python session demonstrating this example is shown below: % python >>> import example - >>> p = example.Pet('Molly') + >>> p = example.Pet("Molly") >>> print(p) >>> p.getName() - u'Molly' - >>> p.setName('Charly') + 'Molly' + >>> p.setName("Charly") >>> p.getName() - u'Charly' + 'Charly' .. seealso:: Static member functions can be bound in the same way using :func:`class_::def_static`. +.. note:: + + Binding C++ types in unnamed namespaces (also known as anonymous namespaces) + works reliably on many platforms, but not all. The `XFAIL_CONDITION` in + tests/test_unnamed_namespace_a.py encodes the currently known conditions. + For background see `#4319 `_. + If portability is a concern, it is therefore not recommended to bind C++ + types in unnamed namespaces. It will be safest to manually pick unique + namespace names. + Keyword and default arguments ============================= It is possible to specify keyword and default arguments using the syntax @@ -122,12 +132,12 @@ This makes it possible to write .. code-block:: pycon - >>> p = example.Pet('Molly') + >>> p = example.Pet("Molly") >>> p.name - u'Molly' - >>> p.name = 'Charly' + 'Molly' + >>> p.name = "Charly" >>> p.name - u'Charly' + 'Charly' Now suppose that ``Pet::name`` was a private internal variable that can only be accessed via setters and getters. @@ -174,10 +184,10 @@ Native Python classes can pick up new attributes dynamically: .. code-block:: pycon >>> class Pet: - ... name = 'Molly' + ... name = "Molly" ... >>> p = Pet() - >>> p.name = 'Charly' # overwrite existing + >>> p.name = "Charly" # overwrite existing >>> p.age = 2 # dynamically add a new attribute By default, classes exported from C++ do not support this and the only writable @@ -195,7 +205,7 @@ Trying to set any other attribute results in an error: .. code-block:: pycon >>> p = example.Pet() - >>> p.name = 'Charly' # OK, attribute defined in C++ + >>> p.name = "Charly" # OK, attribute defined in C++ >>> p.age = 2 # fail AttributeError: 'Pet' object has no attribute 'age' @@ -213,7 +223,7 @@ Now everything works as expected: .. code-block:: pycon >>> p = example.Pet() - >>> p.name = 'Charly' # OK, overwrite value in C++ + >>> p.name = "Charly" # OK, overwrite value in C++ >>> p.age = 2 # OK, dynamically add a new attribute >>> p.__dict__ # just like a native Python class {'age': 2} @@ -280,11 +290,11 @@ expose fields and methods of both types: .. code-block:: pycon - >>> p = example.Dog('Molly') + >>> p = example.Dog("Molly") >>> p.name - u'Molly' + 'Molly' >>> p.bark() - u'woof!' + 'woof!' The C++ classes defined above are regular non-polymorphic types with an inheritance relationship. This is reflected in Python: @@ -332,7 +342,7 @@ will automatically recognize this: >>> type(p) PolymorphicDog # automatically downcast >>> p.bark() - u'woof!' + 'woof!' Given a pointer to a polymorphic base, pybind11 performs automatic downcasting to the actual derived type. Note that this goes beyond the usual situation in @@ -434,8 +444,7 @@ you can use ``py::detail::overload_cast_impl`` with an additional set of parenth .def("set", overload_cast_()(&Pet::set), "Set the pet's age") .def("set", overload_cast_()(&Pet::set), "Set the pet's name"); -.. [#cpp14] A compiler which supports the ``-std=c++14`` flag - or Visual Studio 2015 Update 2 and newer. +.. [#cpp14] A compiler which supports the ``-std=c++14`` flag. .. note:: @@ -446,8 +455,7 @@ you can use ``py::detail::overload_cast_impl`` with an additional set of parenth Enumerations and internal types =============================== -Let's now suppose that the example class contains an internal enumeration type, -e.g.: +Let's now suppose that the example class contains internal types like enumerations, e.g.: .. code-block:: cpp @@ -457,10 +465,15 @@ e.g.: Cat }; + struct Attributes { + float age = 0; + }; + Pet(const std::string &name, Kind type) : name(name), type(type) { } std::string name; Kind type; + Attributes attr; }; The binding code for this example looks as follows: @@ -471,22 +484,28 @@ The binding code for this example looks as follows: pet.def(py::init()) .def_readwrite("name", &Pet::name) - .def_readwrite("type", &Pet::type); + .def_readwrite("type", &Pet::type) + .def_readwrite("attr", &Pet::attr); py::enum_(pet, "Kind") .value("Dog", Pet::Kind::Dog) .value("Cat", Pet::Kind::Cat) .export_values(); -To ensure that the ``Kind`` type is created within the scope of ``Pet``, the -``pet`` :class:`class_` instance must be supplied to the :class:`enum_`. + py::class_(pet, "Attributes") + .def(py::init<>()) + .def_readwrite("age", &Pet::Attributes::age); + + +To ensure that the nested types ``Kind`` and ``Attributes`` are created within the scope of ``Pet``, the +``pet`` :class:`class_` instance must be supplied to the :class:`enum_` and :class:`class_` constructor. The :func:`enum_::export_values` function exports the enum entries into the parent scope, which should be skipped for newer C++11-style strongly typed enums. .. code-block:: pycon - >>> p = Pet('Lucy', Pet.Cat) + >>> p = Pet("Lucy", Pet.Cat) >>> p.type Kind.Cat >>> int(p.type) @@ -508,7 +527,7 @@ The ``name`` property returns the name of the enum value as a unicode string. .. code-block:: pycon - >>> p = Pet( "Lucy", Pet.Cat ) + >>> p = Pet("Lucy", Pet.Cat) >>> pet_type = p.type >>> pet_type Pet.Cat @@ -530,3 +549,7 @@ The ``name`` property returns the name of the enum value as a unicode string. ... By default, these are omitted to conserve space. + +.. warning:: + + Contrary to Python customs, enum values from the wrappers should not be compared using ``is``, but with ``==`` (see `#1177 `_ for background). diff --git a/examples/knxPython/pybind11/docs/compiling.rst b/examples/knxPython/pybind11/docs/compiling.rst index 25b703e3..448ea11c 100644 --- a/examples/knxPython/pybind11/docs/compiling.rst +++ b/examples/knxPython/pybind11/docs/compiling.rst @@ -3,15 +3,123 @@ Build systems ############# +For an overview of Python packaging including compiled packaging with a pybind11 +example, along with a cookiecutter that includes several pybind11 options, see +the `Scientific Python Development Guide`_. + +.. _Scientific Python Development Guide: https://learn.scientific-python.org/development/guides/packaging-compiled/ + +.. scikit-build-core: + +Modules with CMake +================== + +A Python extension module can be created with just a few lines of code: + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.15...3.29) + project(example LANGUAGES CXX) + + set(PYBIND11_FINDPYTHON ON) + find_package(pybind11 CONFIG REQUIRED) + + pybind11_add_module(example example.cpp) + install(TARGETS example DESTINATION .) + +(You use the ``add_subdirectory`` instead, see the example in :ref:`cmake`.) In +this example, the code is located in a file named :file:`example.cpp`. Either +method will import the pybind11 project which provides the +``pybind11_add_module`` function. It will take care of all the details needed +to build a Python extension module on any platform. + +To build with pip, build, cibuildwheel, uv, or other Python tools, you can +add a ``pyproject.toml`` file like this: + +.. code-block:: toml + + [build-system] + requires = ["scikit-build-core", "pybind11"] + build-backend = "scikit_build_core.build" + + [project] + name = "example" + version = "0.1.0" + +You don't need setuptools files like ``MANIFEST.in``, ``setup.py``, or +``setup.cfg``, as this is not setuptools. See `scikit-build-core`_ for details. +For projects you plan to upload to PyPI, be sure to fill out the ``[project]`` +table with other important metadata as well (see `Writing pyproject.toml`_). + +A working sample project can be found in the [scikit_build_example]_ +repository. An older and harder-to-maintain method is in [cmake_example]_. More +details about our cmake support can be found below in :ref:`cmake`. + +.. _scikit-build-core: https://scikit-build-core.readthedocs.io + +.. [scikit_build_example] https://github.com/pybind/scikit_build_example + +.. [cmake_example] https://github.com/pybind/cmake_example + +.. _modules-meson-python: + +Modules with meson-python +========================= + +You can also build a package with `Meson`_ using `meson-python`_, if you prefer +that. Your ``meson.build`` file would look something like this: + +.. _meson-example: + +.. code-block:: meson + + project( + 'example', + 'cpp', + version: '0.1.0', + default_options: [ + 'cpp_std=c++11', + ], + ) + + py = import('python').find_installation(pure: false) + pybind11_dep = dependency('pybind11') + + py.extension_module('example', + 'example.cpp', + install: true, + dependencies : [pybind11_dep], + ) + + +And you would need a ``pyproject.toml`` file like this: + +.. code-block:: toml + + [build-system] + requires = ["meson-python", "pybind11"] + build-backend = "mesonpy" + +Meson-python *requires* your project to be in git (or mercurial) as it uses it +for the SDist creation. For projects you plan to upload to PyPI, be sure to fill out the +``[project]`` table as well (see `Writing pyproject.toml`_). + + +.. _Writing pyproject.toml: https://packaging.python.org/en/latest/guides/writing-pyproject-toml + +.. _meson: https://mesonbuild.com + +.. _meson-python: https://meson-python.readthedocs.io/en/latest + .. _build-setuptools: -Building with setuptools -======================== +Modules with setuptools +======================= -For projects on PyPI, building with setuptools is the way to go. Sylvain Corlay -has kindly provided an example project which shows how to set up everything, -including automatic generation of documentation using Sphinx. Please refer to -the [python_example]_ repository. +For projects on PyPI, a historically popular option is setuptools. Sylvain +Corlay has kindly provided an example project which shows how to set up +everything, including automatic generation of documentation using Sphinx. +Please refer to the [python_example]_ repository. .. [python_example] https://github.com/pybind/python_example @@ -21,11 +129,11 @@ To use pybind11 inside your ``setup.py``, you have to have some system to ensure that ``pybind11`` is installed when you build your package. There are four possible ways to do this, and pybind11 supports all four: You can ask all users to install pybind11 beforehand (bad), you can use -:ref:`setup_helpers-pep518` (good, but very new and requires Pip 10), -:ref:`setup_helpers-setup_requires` (discouraged by Python packagers now that -PEP 518 is available, but it still works everywhere), or you can -:ref:`setup_helpers-copy-manually` (always works but you have to manually sync -your copy to get updates). +:ref:`setup_helpers-pep518` (good), ``setup_requires=`` (discouraged), or you +can :ref:`setup_helpers-copy-manually` (works but you have to manually sync +your copy to get updates). Third party packagers like conda-forge generally +strongly prefer the ``pyproject.toml`` method, as it gives them control over +the ``pybind11`` version, and they may apply patches, etc. An example of a ``setup.py`` using pybind11's helpers: @@ -42,10 +150,7 @@ An example of a ``setup.py`` using pybind11's helpers: ), ] - setup( - ..., - ext_modules=ext_modules - ) + setup(..., ext_modules=ext_modules) If you want to do an automatic search for the highest supported C++ standard, that is supported via a ``build_ext`` command override; it will only affect @@ -64,11 +169,20 @@ that is supported via a ``build_ext`` command override; it will only affect ), ] - setup( - ..., - cmdclass={"build_ext": build_ext}, - ext_modules=ext_modules - ) + setup(..., cmdclass={"build_ext": build_ext}, ext_modules=ext_modules) + +If you have single-file extension modules that are directly stored in the +Python source tree (``foo.cpp`` in the same directory as where a ``foo.py`` +would be located), you can also generate ``Pybind11Extensions`` using +``setup_helpers.intree_extensions``: ``intree_extensions(["path/to/foo.cpp", +...])`` returns a list of ``Pybind11Extensions`` which can be passed to +``ext_modules``, possibly after further customizing their attributes +(``libraries``, ``include_dirs``, etc.). By doing so, a ``foo.*.so`` extension +module will be generated and made available upon installation. + +``intree_extension`` will automatically detect if you are using a ``src``-style +layout (as long as no namespace packages are involved), but you can also +explicitly pass ``package_dir`` to it (as in ``setuptools.setup``). Since pybind11 does not require NumPy when building, a light-weight replacement for NumPy's parallel compilation distutils tool is included. Use it like this: @@ -84,69 +198,73 @@ for NumPy's parallel compilation distutils tool is included. Use it like this: The argument is the name of an environment variable to control the number of threads, such as ``NPY_NUM_BUILD_JOBS`` (as used by NumPy), though you can set -something different if you want. You can also pass ``default=N`` to set the -default number of threads (0 will take the number of threads available) and -``max=N``, the maximum number of threads; if you have a large extension you may -want set this to a memory dependent number. +something different if you want; ``CMAKE_BUILD_PARALLEL_LEVEL`` is another choice +a user might expect. You can also pass ``default=N`` to set the default number +of threads (0 will take the number of threads available) and ``max=N``, the +maximum number of threads; if you have a large extension you may want set this +to a memory dependent number. + +If you are developing rapidly and have a lot of C++ files, you may want to +avoid rebuilding files that have not changed. For simple cases were you are +using ``pip install -e .`` and do not have local headers, you can skip the +rebuild if an object file is newer than its source (headers are not checked!) +with the following: -.. _setup_helpers-pep518: +.. code-block:: python -PEP 518 requirements (Pip 10+ required) ---------------------------------------- + from pybind11.setup_helpers import ParallelCompile, naive_recompile -If you use `PEP 518's `_ -``pyproject.toml`` file, you can ensure that ``pybind11`` is available during -the compilation of your project. When this file exists, Pip will make a new -virtual environment, download just the packages listed here in ``requires=``, -and build a wheel (binary Python package). It will then throw away the -environment, and install your wheel. + ParallelCompile("NPY_NUM_BUILD_JOBS", needs_recompile=naive_recompile).install() -Your ``pyproject.toml`` file will likely look something like this: -.. code-block:: toml +If you have a more complex build, you can implement a smarter function and pass +it to ``needs_recompile``, or you can use [Ccache]_ instead. ``CXX="cache g++" +pip install -e .`` would be the way to use it with GCC, for example. Unlike the +simple solution, this even works even when not compiling in editable mode, but +it does require Ccache to be installed. - [build-system] - requires = ["setuptools", "wheel", "pybind11==2.6.0"] - build-backend = "setuptools.build_meta" +Keep in mind that Pip will not even attempt to rebuild if it thinks it has +already built a copy of your code, which it deduces from the version number. +One way to avoid this is to use [setuptools_scm]_, which will generate a +version number that includes the number of commits since your last tag and a +hash for a dirty directory. Another way to force a rebuild is purge your cache +or use Pip's ``--no-cache-dir`` option. -.. note:: +You also need a ``MANIFEST.in`` file to include all relevant files so that you +can make an SDist. If you use `pypa-build`_, that will build an SDist then a +wheel from that SDist by default, so you can look inside those files (wheels +are just zip files with a ``.whl`` extension) to make sure you aren't missing +files. `check-manifest`_ (setuptools specific) or `check-sdist`_ (general) are +CLI tools that can compare the SDist contents with your source control. - The main drawback to this method is that a `PEP 517`_ compliant build tool, - such as Pip 10+, is required for this approach to work; older versions of - Pip completely ignore this file. If you distribute binaries (called wheels - in Python) using something like `cibuildwheel`_, remember that ``setup.py`` - and ``pyproject.toml`` are not even contained in the wheel, so this high - Pip requirement is only for source builds, and will not affect users of - your binary wheels. - -.. _PEP 517: https://www.python.org/dev/peps/pep-0517/ -.. _cibuildwheel: https://cibuildwheel.readthedocs.io +.. [Ccache] https://ccache.dev -.. _setup_helpers-setup_requires: +.. [setuptools_scm] https://github.com/pypa/setuptools_scm -Classic ``setup_requires`` --------------------------- +.. _setup_helpers-pep518: -If you want to support old versions of Pip with the classic -``setup_requires=["pybind11"]`` keyword argument to setup, which triggers a -two-phase ``setup.py`` run, then you will need to use something like this to -ensure the first pass works (which has not yet installed the ``setup_requires`` -packages, since it can't install something it does not know about): +Build requirements +------------------ -.. code-block:: python +With a ``pyproject.toml`` file, you can ensure that ``pybind11`` is available +during the compilation of your project. When this file exists, Pip will make a +new virtual environment, download just the packages listed here in +``requires=``, and build a wheel (binary Python package). It will then throw +away the environment, and install your wheel. - try: - from pybind11.setup_helpers import Pybind11Extension - except ImportError: - from setuptools import Extension as Pybind11Extension +Your ``pyproject.toml`` file will likely look something like this: +.. code-block:: toml -It doesn't matter that the Extension class is not the enhanced subclass for the -first pass run; and the second pass will have the ``setup_requires`` -requirements. + [build-system] + requires = ["setuptools", "pybind11"] + build-backend = "setuptools.build_meta" -This is obviously more of a hack than the PEP 518 method, but it supports -ancient versions of Pip. +.. _PEP 517: https://www.python.org/dev/peps/pep-0517/ +.. _cibuildwheel: https://cibuildwheel.pypa.io +.. _pypa-build: https://build.pypa.io/en/latest/ +.. _check-manifest: https://pypi.io/project/check-manifest +.. _check-sdist: https://pypi.io/project/check-sdist .. _setup_helpers-copy-manually: @@ -192,36 +310,30 @@ the C++ source file. Python is then able to find the module and load it. .. [cppimport] https://github.com/tbenthompson/cppimport + + .. _cmake: Building with CMake =================== For C++ codebases that have an existing CMake-based build system, a Python -extension module can be created with just a few lines of code: - -.. code-block:: cmake +extension module can be created with just a few lines of code, as seen above in +the module section. Pybind11 currently supports a lower minimum if you don't +use the modern FindPython, though be aware that CMake 3.27 removed the old +mechanism, so pybind11 will automatically switch if the old mechanism is not +available. Please opt into the new mechanism if at all possible. Our default +may change in future versions. This is the minimum required: - cmake_minimum_required(VERSION 3.4...3.18) - project(example LANGUAGES CXX) - - add_subdirectory(pybind11) - pybind11_add_module(example example.cpp) - -This assumes that the pybind11 repository is located in a subdirectory named -:file:`pybind11` and that the code is located in a file named :file:`example.cpp`. -The CMake command ``add_subdirectory`` will import the pybind11 project which -provides the ``pybind11_add_module`` function. It will take care of all the -details needed to build a Python extension module on any platform. -A working sample project, including a way to invoke CMake from :file:`setup.py` for -PyPI integration, can be found in the [cmake_example]_ repository. - -.. [cmake_example] https://github.com/pybind/cmake_example .. versionchanged:: 2.6 CMake 3.4+ is required. +.. versionchanged:: 2.11 + CMake 3.5+ is required. + + Further information can be found at :doc:`cmake/index`. pybind11_add_module @@ -276,7 +388,7 @@ that will be respected instead of the built-in flag search. The ``OPT_SIZE`` flag enables size-based optimization equivalent to the standard ``/Os`` or ``-Os`` compiler flags and the ``MinSizeRel`` build type, -which avoid optimizations that that can substantially increase the size of the +which avoid optimizations that can substantially increase the size of the resulting binary. This flag is particularly useful in projects that are split into performance-critical parts and associated bindings. In this case, we can compile the project in release mode (and hence, optimize performance globally), @@ -301,7 +413,7 @@ standard explicitly with set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ version selection") # or 11, 14, 17, 20 set(CMAKE_CXX_STANDARD_REQUIRED ON) # optional, ensure standard is supported - set(CMAKE_CXX_EXTENSIONS OFF) # optional, keep compiler extensionsn off + set(CMAKE_CXX_EXTENSIONS OFF) # optional, keep compiler extensions off The variables can also be set when calling CMake from the command line using the ``-D=`` flag. You can also manually set ``CXX_STANDARD`` @@ -314,7 +426,7 @@ with ``PYTHON_EXECUTABLE``. For example: .. code-block:: bash - cmake -DPYBIND11_PYTHON_VERSION=3.6 .. + cmake -DPYBIND11_PYTHON_VERSION=3.7 .. # Another method: cmake -DPYTHON_EXECUTABLE=/path/to/python .. @@ -371,16 +483,17 @@ can refer to the same [cmake_example]_ repository for a full sample project FindPython mode --------------- -CMake 3.12+ (3.15+ recommended) added a new module called FindPython that had a -highly improved search algorithm and modern targets and tools. If you use -FindPython, pybind11 will detect this and use the existing targets instead: +CMake 3.12+ (3.15+ recommended, 3.18.2+ ideal) added a new module called +FindPython that had a highly improved search algorithm and modern targets +and tools. If you use FindPython, pybind11 will detect this and use the +existing targets instead: .. code-block:: cmake - cmake_minumum_required(VERSION 3.15...3.18) + cmake_minimum_required(VERSION 3.15...3.22) project(example LANGUAGES CXX) - find_package(Python COMPONENTS Interpreter Development REQUIRED) + find_package(Python 3.7 COMPONENTS Interpreter Development REQUIRED) find_package(pybind11 CONFIG REQUIRED) # or add_subdirectory(pybind11) @@ -393,9 +506,8 @@ algorithms from the CMake invocation, with ``-DPYBIND11_FINDPYTHON=ON``. .. warning:: - If you use FindPython2 and FindPython3 to dual-target Python, use the - individual targets listed below, and avoid targets that directly include - Python parts. + If you use FindPython to multi-target Python versions, use the individual + targets listed below, and avoid targets that directly include Python parts. There are `many ways to hint or force a discovery of a specific Python installation `_), @@ -403,6 +515,14 @@ setting ``Python_ROOT_DIR`` may be the most common one (though with virtualenv/venv support, and Conda support, this tends to find the correct Python version more often than the old system did). +.. warning:: + + When the Python libraries (i.e. ``libpythonXX.a`` and ``libpythonXX.so`` + on Unix) are not available, as is the case on a manylinux image, the + ``Development`` component will not be resolved by ``FindPython``. When not + using the embedding functionality, CMake 3.18+ allows you to specify + ``Development.Module`` instead of ``Development`` to resolve this issue. + .. versionadded:: 2.6 Advanced: interface library targets @@ -414,11 +534,8 @@ available in all modes. The targets provided are: ``pybind11::headers`` Just the pybind11 headers and minimum compile requirements - ``pybind11::python2_no_register`` - Quiets the warning/error when mixing C++14 or higher and Python 2 - ``pybind11::pybind11`` - Python headers + ``pybind11::headers`` + ``pybind11::python2_no_register`` (Python 2 only) + Python headers + ``pybind11::headers`` ``pybind11::python_link_helper`` Just the "linking" part of pybind11:module @@ -427,7 +544,7 @@ available in all modes. The targets provided are: Everything for extension modules - ``pybind11::pybind11`` + ``Python::Module`` (FindPython CMake 3.15+) or ``pybind11::python_link_helper`` ``pybind11::embed`` - Everything for embedding the Python interpreter - ``pybind11::pybind11`` + ``Python::Embed`` (FindPython) or Python libs + Everything for embedding the Python interpreter - ``pybind11::pybind11`` + ``Python::Python`` (FindPython) or Python libs ``pybind11::lto`` / ``pybind11::thin_lto`` An alternative to `INTERPROCEDURAL_OPTIMIZATION` for adding link-time optimization. @@ -451,7 +568,7 @@ You can use these targets to build complex applications. For example, the .. code-block:: cmake - cmake_minimum_required(VERSION 3.4) + cmake_minimum_required(VERSION 3.5...3.29) project(example LANGUAGES CXX) find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11) @@ -461,7 +578,10 @@ You can use these targets to build complex applications. For example, the target_link_libraries(example PRIVATE pybind11::module pybind11::lto pybind11::windows_extras) pybind11_extension(example) - pybind11_strip(example) + if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo) + # Strip unnecessary sections of the binary on Linux/macOS + pybind11_strip(example) + endif() set_target_properties(example PROPERTIES CXX_VISIBILITY_PRESET "hidden" CUDA_VISIBILITY_PRESET "hidden") @@ -474,7 +594,7 @@ Instead of setting properties, you can set ``CMAKE_*`` variables to initialize t compiler flags are provided to ensure high quality code generation. In contrast to the ``pybind11_add_module()`` command, the CMake interface provides a *composable* set of targets to ensure that you retain flexibility. - It can be expecially important to provide or set these properties; the + It can be especially important to provide or set these properties; the :ref:`FAQ ` contains an explanation on why these are needed. .. versionadded:: 2.6 @@ -506,7 +626,7 @@ information about usage in C++, see :doc:`/advanced/embedding`. .. code-block:: cmake - cmake_minimum_required(VERSION 3.4...3.18) + cmake_minimum_required(VERSION 3.5...3.29) project(example LANGUAGES CXX) find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11) @@ -527,10 +647,7 @@ On Linux, you can compile an example such as the one given in .. code-block:: bash - $ c++ -O3 -Wall -shared -std=c++11 -fPIC `python3 -m pybind11 --includes` example.cpp -o example`python3-config --extension-suffix` - -The flags given here assume that you're using Python 3. For Python 2, just -change the executable appropriately (to ``python`` or ``python2``). + $ c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix) The ``python3 -m pybind11 --includes`` command fetches the include paths for both pybind11 and Python headers. This assumes that pybind11 has been installed @@ -538,19 +655,13 @@ using ``pip`` or ``conda``. If it hasn't, you can also manually specify ``-I /include`` together with the Python includes path ``python3-config --includes``. -Note that Python 2.7 modules don't use a special suffix, so you should simply -use ``example.so`` instead of ``example`python3-config --extension-suffix```. -Besides, the ``--extension-suffix`` option may or may not be available, depending -on the distribution; in the latter case, the module extension can be manually -set to ``.so``. - On macOS: the build command is almost the same but it also requires passing the ``-undefined dynamic_lookup`` flag so as to ignore missing symbols when building the module: .. code-block:: bash - $ c++ -O3 -Wall -shared -std=c++11 -undefined dynamic_lookup `python3 -m pybind11 --includes` example.cpp -o example`python3-config --extension-suffix` + $ c++ -O3 -Wall -shared -std=c++11 -undefined dynamic_lookup $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix) In general, it is advisable to include several additional build parameters that can considerably reduce the size of the created binary. Refer to section @@ -575,6 +686,13 @@ Building with Bazel You can build with the Bazel build system using the `pybind11_bazel `_ repository. +Building with Meson +=================== + +You can use Meson, which has support for ``pybind11`` as a dependency (internally +relying on our ``pkg-config`` support). See the :ref:`module example above `. + + Generating binding code automatically ===================================== @@ -598,3 +716,11 @@ cross-project dependency management. Additionally, it is able to autogenerate customizable pybind11-based wrappers by parsing C++ header files. .. [robotpy-build] https://robotpy-build.readthedocs.io + +[litgen]_ is an automatic python bindings generator with a focus on generating +documented and discoverable bindings: bindings will nicely reproduce the documentation +found in headers. It is based on srcML (srcml.org), a highly scalable, multi-language +parsing tool with a developer centric approach. The API that you want to expose to python +must be C++14 compatible (but your implementation can use more modern constructs). + +.. [litgen] https://pthom.github.io/litgen diff --git a/examples/knxPython/pybind11/docs/conf.py b/examples/knxPython/pybind11/docs/conf.py index 66db310e..e5cba038 100644 --- a/examples/knxPython/pybind11/docs/conf.py +++ b/examples/knxPython/pybind11/docs/conf.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # # pybind11 documentation build configuration file, created by # sphinx-quickstart on Sun Oct 11 19:23:48 2015. @@ -12,13 +11,13 @@ # # All configuration values have a default; values that are commented out # serve to show the default. +from __future__ import annotations -import sys import os -import shlex +import re import subprocess +import sys from pathlib import Path -import re DIR = Path(__file__).parent.resolve() @@ -37,6 +36,7 @@ # ones. extensions = [ "breathe", + "sphinx_copybutton", "sphinxcontrib.rsvgconverter", "sphinxcontrib.moderncmakedomain", ] @@ -82,7 +82,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -127,23 +127,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -on_rtd = os.environ.get("READTHEDOCS", None) == "True" - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - - html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - - html_context = {"css_files": ["_static/theme_overrides.css"]} -else: - html_context = { - "css_files": [ - "//media.readthedocs.org/css/sphinx_rtd_theme.css", - "//media.readthedocs.org/css/readthedocs-doc-embed.css", - "_static/theme_overrides.css", - ] - } +html_theme = "furo" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -174,6 +158,10 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +html_css_files = [ + "css/custom.css", +] + # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. @@ -239,6 +227,8 @@ # -- Options for LaTeX output --------------------------------------------- +latex_engine = "pdflatex" + latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', @@ -344,29 +334,31 @@ def generate_doxygen_xml(app): subprocess.call(["doxygen", "--version"]) retcode = subprocess.call(["doxygen"], cwd=app.confdir) if retcode < 0: - sys.stderr.write("doxygen error code: {}\n".format(-retcode)) + sys.stderr.write(f"doxygen error code: {-retcode}\n") except OSError as e: - sys.stderr.write("doxygen execution failed: {}\n".format(e)) + sys.stderr.write(f"doxygen execution failed: {e}\n") def prepare(app): with open(DIR.parent / "README.rst") as f: contents = f.read() - # Filter out section titles for index.rst for LaTeX if app.builder.name == "latex": + # Remove badges and stuff from start + contents = contents[contents.find(r".. start") :] + + # Filter out section titles for index.rst for LaTeX contents = re.sub(r"^(.*)\n[-~]{3,}$", r"**\1**", contents, flags=re.MULTILINE) with open(DIR / "readme.rst", "w") as f: f.write(contents) -def clean_up(app, exception): +def clean_up(app, exception): # noqa: ARG001 (DIR / "readme.rst").unlink() def setup(app): - # Add hook for building doxygen xml when needed app.connect("builder-inited", generate_doxygen_xml) diff --git a/examples/knxPython/pybind11/docs/faq.rst b/examples/knxPython/pybind11/docs/faq.rst index 8bf05a40..9b688b30 100644 --- a/examples/knxPython/pybind11/docs/faq.rst +++ b/examples/knxPython/pybind11/docs/faq.rst @@ -5,12 +5,10 @@ Frequently asked questions =========================================================== 1. Make sure that the name specified in PYBIND11_MODULE is identical to the -filename of the extension library (without suffixes such as .so) +filename of the extension library (without suffixes such as ``.so``). 2. If the above did not fix the issue, you are likely using an incompatible -version of Python (for instance, the extension library was compiled against -Python 2, while the interpreter is running on top of some version of Python -3, or vice versa). +version of Python that does not match what you compiled with. "Symbol not found: ``__Py_ZeroStruct`` / ``_PyInstanceMethod_Type``" ======================================================================== @@ -54,7 +52,7 @@ provided by the caller -- in fact, it does nothing at all. .. code-block:: python def increment(i): - i += 1 # nope.. + i += 1 # nope.. pybind11 is also affected by such language-level conventions, which means that binding ``increment`` or ``increment_ptr`` will also create Python functions @@ -147,7 +145,7 @@ using C++14 template metaprogramming. .. _`faq:hidden_visibility`: -"‘SomeClass’ declared with greater visibility than the type of its field ‘SomeClass::member’ [-Wattributes]" +"'SomeClass' declared with greater visibility than the type of its field 'SomeClass::member' [-Wattributes]" ============================================================================================================ This error typically indicates that you are compiling without the required @@ -169,8 +167,8 @@ can be changed, but even if it isn't it is not always enough to guarantee complete independence of the symbols involved when not using ``-fvisibility=hidden``. -Additionally, ``-fvisiblity=hidden`` can deliver considerably binary size -savings. (See the following section for more details). +Additionally, ``-fvisibility=hidden`` can deliver considerably binary size +savings. (See the following section for more details.) .. _`faq:symhidden`: @@ -180,7 +178,7 @@ How can I create smaller binaries? To do its job, pybind11 extensively relies on a programming technique known as *template metaprogramming*, which is a way of performing computation at compile -time using type information. Template metaprogamming usually instantiates code +time using type information. Template metaprogramming usually instantiates code involving significant numbers of deeply nested types that are either completely removed or reduced to just a few instructions during the compiler's optimization phase. However, due to the nested nature of these types, the resulting symbol @@ -222,20 +220,6 @@ In addition to decreasing binary size, ``-fvisibility=hidden`` also avoids potential serious issues when loading multiple modules and is required for proper pybind operation. See the previous FAQ entry for more details. -Working with ancient Visual Studio 2008 builds on Windows -========================================================= - -The official Windows distributions of Python are compiled using truly -ancient versions of Visual Studio that lack good C++11 support. Some users -implicitly assume that it would be impossible to load a plugin built with -Visual Studio 2015 into a Python distribution that was compiled using Visual -Studio 2008. However, no such issue exists: it's perfectly legitimate to -interface DLLs that are built with different compilers and/or C libraries. -Common gotchas to watch out for involve not ``free()``-ing memory region -that that were ``malloc()``-ed in another shared library, using data -structures with incompatible ABIs, and so on. pybind11 is very careful not -to make these types of mistakes. - How can I properly handle Ctrl-C in long-running functions? =========================================================== @@ -263,6 +247,50 @@ been received, you must either explicitly interrupt execution by throwing }); } +What is a highly conclusive and simple way to find memory leaks (e.g. in pybind11 bindings)? +============================================================================================ + +Use ``while True`` & ``top`` (Linux, macOS). + +For example, locally change tests/test_type_caster_pyobject_ptr.py like this: + +.. code-block:: diff + + def test_return_list_pyobject_ptr_reference(): + + while True: + vec_obj = m.return_list_pyobject_ptr_reference(ValueHolder) + assert [e.value for e in vec_obj] == [93, 186] + # Commenting out the next `assert` will leak the Python references. + # An easy way to see evidence of the leaks: + # Insert `while True:` as the first line of this function and monitor the + # process RES (Resident Memory Size) with the Unix top command. + - assert m.dec_ref_each_pyobject_ptr(vec_obj) == 2 + + # assert m.dec_ref_each_pyobject_ptr(vec_obj) == 2 + +Then run the test as you would normally do, which will go into the infinite loop. + +**In another shell, but on the same machine** run: + +.. code-block:: bash + + top + +This will show: + +.. code-block:: + + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND + 1266095 rwgk 20 0 5207496 611372 45696 R 100.0 0.3 0:08.01 test_type_caste + +Look for the number under ``RES`` there. You'll see it going up very quickly. + +**Don't forget to Ctrl-C the test command** before your machine becomes +unresponsive due to swapping. + +This method only takes a couple minutes of effort and is very conclusive. +What you want to see is that the ``RES`` number is stable after a couple +seconds. + CMake doesn't detect the right Python version ============================================= @@ -289,27 +317,7 @@ Conflicts can arise, however, when using pybind11 in a project that *also* uses the CMake Python detection in a system with several Python versions installed. This difference may cause inconsistencies and errors if *both* mechanisms are -used in the same project. Consider the following CMake code executed in a -system with Python 2.7 and 3.x installed: - -.. code-block:: cmake - - find_package(PythonInterp) - find_package(PythonLibs) - find_package(pybind11) - -It will detect Python 2.7 and pybind11 will pick it as well. - -In contrast this code: - -.. code-block:: cmake - - find_package(pybind11) - find_package(PythonInterp) - find_package(PythonLibs) - -will detect Python 3.x for pybind11 and may crash on -``find_package(PythonLibs)`` afterwards. +used in the same project. There are three possible solutions: @@ -320,7 +328,8 @@ There are three possible solutions: COMPONENTS Interpreter Development)`` on modern CMake (3.12+, 3.15+ better, 3.18.2+ best). Pybind11 in these cases uses the new CMake FindPython instead of the old, deprecated search tools, and these modules are much better at - finding the correct Python. + finding the correct Python. If FindPythonLibs/Interp are not available + (CMake 3.27+), then this will be ignored and FindPython will be used. 3. Set ``PYBIND11_NOPYTHON`` to ``TRUE``. Pybind11 will not search for Python. However, you will have to use the target-based system, and do more setup yourself, because it does not know about or include things that depend on diff --git a/examples/knxPython/pybind11/docs/installing.rst b/examples/knxPython/pybind11/docs/installing.rst index 25972859..30b9f185 100644 --- a/examples/knxPython/pybind11/docs/installing.rst +++ b/examples/knxPython/pybind11/docs/installing.rst @@ -8,6 +8,8 @@ There are several ways to get the pybind11 source, which lives at developers recommend one of the first three ways listed here, submodule, PyPI, or conda-forge, for obtaining pybind11. +.. _include_as_a_submodule: + Include as a submodule ====================== @@ -16,7 +18,7 @@ as a submodule. From your git repository, use: .. code-block:: bash - git submodule add ../../pybind/pybind11 extern/pybind11 -b stable + git submodule add -b stable ../../pybind/pybind11 extern/pybind11 git submodule update --init This assumes you are placing your dependencies in ``extern/``, and that you are diff --git a/examples/knxPython/pybind11/docs/limitations.rst b/examples/knxPython/pybind11/docs/limitations.rst index be7300cd..1b06ea87 100644 --- a/examples/knxPython/pybind11/docs/limitations.rst +++ b/examples/knxPython/pybind11/docs/limitations.rst @@ -50,23 +50,19 @@ clean, well written patch would likely be accepted to solve them. One consequence is that containers of ``char *`` are currently not supported. `#2245 `_ -- The ``cpptest`` does not run on Windows with Python 3.8 or newer, due to DLL - loader changes. User code that is correctly installed should not be affected. - `#2560 `_ - Python 3.9.0 warning ^^^^^^^^^^^^^^^^^^^^ -Combining older versions of pybind11 (< 2.6.0) with Python on 3.9.0 will -trigger undefined behavior that typically manifests as crashes during +Combining older versions of pybind11 (< 2.6.0) with Python on exactly 3.9.0 +will trigger undefined behavior that typically manifests as crashes during interpreter shutdown (but could also destroy your data. **You have been warned**). -This issue has been -`fixed in Python `_. As a -mitigation until 3.9.1 is released and commonly used, pybind11 (2.6.0 or newer) -includes a temporary workaround specifically when Python 3.9.0 is detected at -runtime, leaking about 50 bytes of memory when a callback function is garbage -collected. For reference; the pybind11 test suite has about 2,000 such -callbacks, but only 49 are garbage collected before the end-of-process. Wheels -built with Python 3.9.0 will correctly avoid the leak when run in Python 3.9.1. +This issue was `fixed in Python `_. +As a mitigation for this bug, pybind11 2.6.0 or newer includes a workaround +specifically when Python 3.9.0 is detected at runtime, leaking about 50 bytes +of memory when a callback function is garbage collected. For reference, the +pybind11 test suite has about 2,000 such callbacks, but only 49 are garbage +collected before the end-of-process. Wheels (even if built with Python 3.9.0) +will correctly avoid the leak when run in Python 3.9.1, and this does not +affect other 3.X versions. diff --git a/examples/knxPython/pybind11/docs/pybind11-logo.png b/examples/knxPython/pybind11/docs/pybind11-logo.png new file mode 100644 index 00000000..2d633a4d Binary files /dev/null and b/examples/knxPython/pybind11/docs/pybind11-logo.png differ diff --git a/examples/knxPython/pybind11/docs/pybind11_vs_boost_python1.png b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python1.png new file mode 100644 index 00000000..833231f2 Binary files /dev/null and b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python1.png differ diff --git a/examples/knxPython/pybind11/docs/pybind11_vs_boost_python1.svg b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python1.svg new file mode 100644 index 00000000..5bf950e6 --- /dev/null +++ b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python1.svg @@ -0,0 +1,427 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/knxPython/pybind11/docs/pybind11_vs_boost_python2.png b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python2.png new file mode 100644 index 00000000..9f17272c Binary files /dev/null and b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python2.png differ diff --git a/examples/knxPython/pybind11/docs/pybind11_vs_boost_python2.svg b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python2.svg new file mode 100644 index 00000000..5ed6530c --- /dev/null +++ b/examples/knxPython/pybind11/docs/pybind11_vs_boost_python2.svg @@ -0,0 +1,427 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/knxPython/pybind11/docs/reference.rst b/examples/knxPython/pybind11/docs/reference.rst index e3a61afb..e64a0351 100644 --- a/examples/knxPython/pybind11/docs/reference.rst +++ b/examples/knxPython/pybind11/docs/reference.rst @@ -52,6 +52,20 @@ Convenience classes for specific Python types .. doxygengroup:: pytypes :members: +Convenience functions converting to Python types +================================================ + +.. doxygenfunction:: make_tuple(Args&&...) + +.. doxygenfunction:: make_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_iterator(Type &, Extra&&...) + +.. doxygenfunction:: make_key_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_key_iterator(Type &, Extra&&...) + +.. doxygenfunction:: make_value_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_value_iterator(Type &, Extra&&...) + .. _extras: Passing extra arguments to ``def`` or ``class_`` @@ -110,7 +124,6 @@ Exceptions .. doxygenclass:: builtin_exception :members: - Literals ======== diff --git a/examples/knxPython/pybind11/docs/release.rst b/examples/knxPython/pybind11/docs/release.rst index f73c4ac9..47b5717c 100644 --- a/examples/knxPython/pybind11/docs/release.rst +++ b/examples/knxPython/pybind11/docs/release.rst @@ -15,63 +15,129 @@ For example: For beta, ``PYBIND11_VERSION_PATCH`` should be ``Z.b1``. RC's can be ``Z.rc1``. Always include the dot (even though PEP 440 allows it to be dropped). For a -final release, this must be a simple integer. +final release, this must be a simple integer. There is also +``PYBIND11_VERSION_HEX`` just below that needs to be updated. To release a new version of pybind11: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +If you don't have nox, you should either use ``pipx run nox`` instead, or use +``pipx install nox`` or ``brew install nox`` (Unix). + - Update the version number + - Update ``PYBIND11_VERSION_MAJOR`` etc. in ``include/pybind11/detail/common.h``. PATCH should be a simple integer. - - Update ``pybind11/_version.py`` (match above) - - Ensure that all the information in ``setup.py`` is up-to-date. - - Add release date in ``docs/changelog.rst``. - - ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it + + - Update ``PYBIND11_VERSION_HEX`` just below as well. + + - Update ``pybind11/_version.py`` (match above). + + - Run ``nox -s tests_packaging`` to ensure this was done correctly. + +- Ensure that all the information in ``setup.cfg`` is up-to-date, like + supported Python versions. + +- Add release date in ``docs/changelog.rst`` and integrate the output of + ``nox -s make_changelog``. + + - Note that the ``nox -s make_changelog`` command inspects + `needs changelog `_. + + - Manually clear the ``needs changelog`` labels using the GitHub web + interface (very easy: start by clicking the link above). + +- ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it fails due to a known flake issue, either ignore or restart CI.) -- Add a release branch if this is a new minor version - - ``git checkout -b vX.Y``, ``git push -u origin vX.Y`` + +- Add a release branch if this is a new MINOR version, or update the existing + release branch if it is a patch version + + - New branch: ``git checkout -b vX.Y``, ``git push -u origin vX.Y`` + + - Update branch: ``git checkout vX.Y``, ``git merge ``, ``git push`` + - Update tags (optional; if you skip this, the GitHub release makes a non-annotated tag for you) - - ``git tag -a vX.Y.Z -m 'vX.Y.Z release'``. - - ``git push --tags``. + + - ``git tag -a vX.Y.Z -m 'vX.Y.Z release'`` + + - ``grep ^__version__ pybind11/_version.py`` + + - Last-minute consistency check: same as tag? + + - ``git push --tags`` + - Update stable - - ``git checkout stable`` - - ``git merge master`` - - ``git push`` + + - ``git checkout stable`` + + - ``git merge -X theirs vX.Y.Z`` + + - ``git diff vX.Y.Z`` + + - Carefully review and reconcile any diffs. There should be none. + + - ``git push`` + - Make a GitHub release (this shows up in the UI, sends new release notifications to users watching releases, and also uploads PyPI packages). (Note: if you do not use an existing tag, this creates a new lightweight tag - for you, so you could skip the above step). - - GUI method: click "Create a new release" on the far right, fill in the tag - name (if you didn't tag above, it will be made here), fill in a release - name like "Version X.Y.Z", and optionally copy-and-paste the changelog into - the description (processed as markdown by Pandoc). Check "pre-release" if - this is a beta/RC. + for you, so you could skip the above step.) + + - GUI method: Under `releases `_ + click "Draft a new release" on the far right, fill in the tag name + (if you didn't tag above, it will be made here), fill in a release name + like "Version X.Y.Z", and copy-and-paste the markdown-formatted (!) changelog + into the description. You can use ``cat docs/changelog.rst | pandoc -f rst -t gfm``, + then manually remove line breaks and strip links to PRs and issues, + e.g. to a bare ``#1234``, without the surrounding ``<...>_`` hyperlink markup. + Check "pre-release" if this is a beta/RC. + - CLI method: with ``gh`` installed, run ``gh release create vX.Y.Z -t "Version X.Y.Z"`` If this is a pre-release, add ``-p``. - Get back to work + - Make sure you are on master, not somewhere else: ``git checkout master`` - - Update version macros in ``include/pybind11/common.h`` (set PATCH to + + - Update version macros in ``include/pybind11/detail/common.h`` (set PATCH to ``0.dev1`` and increment MINOR). - - Update ``_version.py`` to match - - Add a plot for in-development updates in ``docs/changelog.rst``. + + - Update ``pybind11/_version.py`` to match. + + - Run ``nox -s tests_packaging`` to ensure this was done correctly. + + - If the release was a new MINOR version, add a new ``IN DEVELOPMENT`` + section in ``docs/changelog.rst``. + - ``git add``, ``git commit``, ``git push`` If a version branch is updated, remember to set PATCH to ``1.dev1``. +If you'd like to bump homebrew, run: + +.. code-block:: console + + brew bump-formula-pr --url https://github.com/pybind/pybind11/archive/vX.Y.Z.tar.gz + +Conda-forge should automatically make a PR in a few hours, and automatically +merge it if there are no issues. + Manual packaging ^^^^^^^^^^^^^^^^ -If you need to manually upload releases, you can download the releases from the job artifacts and upload them with twine. You can also make the files locally (not recommended in general, as your local directory is more likely to be "dirty" and SDists love picking up random unrelated/hidden files); this is the procedure: +If you need to manually upload releases, you can download the releases from +the job artifacts and upload them with twine. You can also make the files +locally (not recommended in general, as your local directory is more likely +to be "dirty" and SDists love picking up random unrelated/hidden files); +this is the procedure: .. code-block:: bash - python3 -m pip install build - python3 -m build - PYBIND11_SDIST_GLOBAL=1 python3 -m build + nox -s build twine upload dist/* This makes SDists and wheels, and the final line uploads them. diff --git a/examples/knxPython/pybind11/docs/requirements.in b/examples/knxPython/pybind11/docs/requirements.in new file mode 100644 index 00000000..bec8f707 --- /dev/null +++ b/examples/knxPython/pybind11/docs/requirements.in @@ -0,0 +1,6 @@ +breathe +furo +sphinx +sphinx-copybutton +sphinxcontrib-moderncmakedomain +sphinxcontrib-svg2pdfconverter diff --git a/examples/knxPython/pybind11/docs/requirements.txt b/examples/knxPython/pybind11/docs/requirements.txt index 35366e3c..4e53f035 100644 --- a/examples/knxPython/pybind11/docs/requirements.txt +++ b/examples/knxPython/pybind11/docs/requirements.txt @@ -1,7 +1,275 @@ -breathe==4.20.0 -commonmark==0.9.1 -recommonmark==0.6.0 -sphinx==3.2.1 -sphinx_rtd_theme==0.5.0 -sphinxcontrib-moderncmakedomain==3.13 -sphinxcontrib-svg2pdfconverter==1.1.0 +# This file was autogenerated by uv via the following command: +# uv pip compile --generate-hashes docs/requirements.in -o docs/requirements.txt +alabaster==0.7.16 \ + --hash=sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65 \ + --hash=sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92 + # via sphinx +babel==2.14.0 \ + --hash=sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363 \ + --hash=sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287 + # via sphinx +beautifulsoup4==4.12.3 \ + --hash=sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051 \ + --hash=sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed + # via furo +breathe==4.35.0 \ + --hash=sha256:5165541c3c67b6c7adde8b3ecfe895c6f7844783c4076b6d8d287e4f33d62386 \ + --hash=sha256:52c581f42ca4310737f9e435e3851c3d1f15446205a85fbc272f1f97ed74f5be + # via -r requirements.in +certifi==2024.7.4 \ + --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \ + --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90 + # via requests +charset-normalizer==3.3.2 \ + --hash=sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027 \ + --hash=sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087 \ + --hash=sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786 \ + --hash=sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8 \ + --hash=sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09 \ + --hash=sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185 \ + --hash=sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574 \ + --hash=sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e \ + --hash=sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519 \ + --hash=sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898 \ + --hash=sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269 \ + --hash=sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3 \ + --hash=sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f \ + --hash=sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6 \ + --hash=sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8 \ + --hash=sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a \ + --hash=sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73 \ + --hash=sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc \ + --hash=sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714 \ + --hash=sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2 \ + --hash=sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc \ + --hash=sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce \ + --hash=sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d \ + --hash=sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e \ + --hash=sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6 \ + --hash=sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269 \ + --hash=sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96 \ + --hash=sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d \ + --hash=sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a \ + --hash=sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4 \ + --hash=sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77 \ + --hash=sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d \ + --hash=sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0 \ + --hash=sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed \ + --hash=sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068 \ + --hash=sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac \ + --hash=sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25 \ + --hash=sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8 \ + --hash=sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab \ + --hash=sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26 \ + --hash=sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2 \ + --hash=sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db \ + --hash=sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f \ + --hash=sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5 \ + --hash=sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99 \ + --hash=sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c \ + --hash=sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d \ + --hash=sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811 \ + --hash=sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa \ + --hash=sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a \ + --hash=sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03 \ + --hash=sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b \ + --hash=sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04 \ + --hash=sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c \ + --hash=sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001 \ + --hash=sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458 \ + --hash=sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389 \ + --hash=sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99 \ + --hash=sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985 \ + --hash=sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537 \ + --hash=sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238 \ + --hash=sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f \ + --hash=sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d \ + --hash=sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796 \ + --hash=sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a \ + --hash=sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143 \ + --hash=sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8 \ + --hash=sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c \ + --hash=sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5 \ + --hash=sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5 \ + --hash=sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711 \ + --hash=sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4 \ + --hash=sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6 \ + --hash=sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c \ + --hash=sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7 \ + --hash=sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4 \ + --hash=sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b \ + --hash=sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae \ + --hash=sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12 \ + --hash=sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c \ + --hash=sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae \ + --hash=sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8 \ + --hash=sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887 \ + --hash=sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b \ + --hash=sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4 \ + --hash=sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f \ + --hash=sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5 \ + --hash=sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33 \ + --hash=sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519 \ + --hash=sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561 + # via requests +docutils==0.20.1 \ + --hash=sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6 \ + --hash=sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b + # via + # breathe + # sphinx +furo==2024.1.29 \ + --hash=sha256:3548be2cef45a32f8cdc0272d415fcb3e5fa6a0eb4ddfe21df3ecf1fe45a13cf \ + --hash=sha256:4d6b2fe3f10a6e36eb9cc24c1e7beb38d7a23fc7b3c382867503b7fcac8a1e02 + # via -r requirements.in +idna==3.7 \ + --hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \ + --hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0 + # via requests +imagesize==1.4.1 \ + --hash=sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b \ + --hash=sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a + # via sphinx +jinja2==3.1.4 \ + --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ + --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d + # via sphinx +markupsafe==2.1.5 \ + --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ + --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ + --hash=sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f \ + --hash=sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3 \ + --hash=sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532 \ + --hash=sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f \ + --hash=sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617 \ + --hash=sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df \ + --hash=sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4 \ + --hash=sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906 \ + --hash=sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f \ + --hash=sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4 \ + --hash=sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8 \ + --hash=sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371 \ + --hash=sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2 \ + --hash=sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465 \ + --hash=sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52 \ + --hash=sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6 \ + --hash=sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169 \ + --hash=sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad \ + --hash=sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2 \ + --hash=sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0 \ + --hash=sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029 \ + --hash=sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f \ + --hash=sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a \ + --hash=sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced \ + --hash=sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5 \ + --hash=sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c \ + --hash=sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf \ + --hash=sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9 \ + --hash=sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb \ + --hash=sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad \ + --hash=sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3 \ + --hash=sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1 \ + --hash=sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46 \ + --hash=sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc \ + --hash=sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a \ + --hash=sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee \ + --hash=sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900 \ + --hash=sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5 \ + --hash=sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea \ + --hash=sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f \ + --hash=sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5 \ + --hash=sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e \ + --hash=sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a \ + --hash=sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f \ + --hash=sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50 \ + --hash=sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a \ + --hash=sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b \ + --hash=sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4 \ + --hash=sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff \ + --hash=sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2 \ + --hash=sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46 \ + --hash=sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b \ + --hash=sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf \ + --hash=sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5 \ + --hash=sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5 \ + --hash=sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab \ + --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ + --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 + # via jinja2 +packaging==24.0 \ + --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ + --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 + # via sphinx +pygments==2.17.2 \ + --hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \ + --hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367 + # via + # furo + # sphinx +requests==2.32.0 \ + --hash=sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5 \ + --hash=sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8 + # via sphinx +snowballstemmer==2.2.0 \ + --hash=sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1 \ + --hash=sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a + # via sphinx +soupsieve==2.5 \ + --hash=sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690 \ + --hash=sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7 + # via beautifulsoup4 +sphinx==7.2.6 \ + --hash=sha256:1e09160a40b956dc623c910118fa636da93bd3ca0b9876a7b3df90f07d691560 \ + --hash=sha256:9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5 + # via + # -r requirements.in + # breathe + # furo + # sphinx-basic-ng + # sphinx-copybutton + # sphinxcontrib-moderncmakedomain + # sphinxcontrib-svg2pdfconverter +sphinx-basic-ng==1.0.0b2 \ + --hash=sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9 \ + --hash=sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b + # via furo +sphinx-copybutton==0.5.2 \ + --hash=sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd \ + --hash=sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e + # via -r requirements.in +sphinxcontrib-applehelp==1.0.8 \ + --hash=sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619 \ + --hash=sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4 + # via sphinx +sphinxcontrib-devhelp==1.0.6 \ + --hash=sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f \ + --hash=sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 \ + --hash=sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015 \ + --hash=sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04 + # via sphinx +sphinxcontrib-jsmath==1.0.1 \ + --hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178 \ + --hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8 + # via sphinx +sphinxcontrib-moderncmakedomain==3.27.0 \ + --hash=sha256:51e259e91f58d17cc0fac9307fd40106aa59d5acaa741887903fc3660361d1a1 \ + --hash=sha256:70a73e0e7cff1b117074e968ccb7f72383ed0f572414df0e216cea06914de988 + # via -r requirements.in +sphinxcontrib-qthelp==1.0.7 \ + --hash=sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6 \ + --hash=sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 \ + --hash=sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7 \ + --hash=sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f + # via sphinx +sphinxcontrib-svg2pdfconverter==1.2.2 \ + --hash=sha256:04ec767b55780a6b18d89cc1a8ada6d900c6efde9d1683abdb98a49b144465ca \ + --hash=sha256:80a55ca61f70eae93efc65f3814f2f177c86ba55934a9f6c5022f1778b62146b + # via -r requirements.in +urllib3==2.2.2 \ + --hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \ + --hash=sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168 + # via requests diff --git a/examples/knxPython/pybind11/docs/upgrade.rst b/examples/knxPython/pybind11/docs/upgrade.rst index 87bcebee..17c26aaa 100644 --- a/examples/knxPython/pybind11/docs/upgrade.rst +++ b/examples/knxPython/pybind11/docs/upgrade.rst @@ -8,6 +8,88 @@ to a new version. But it goes into more detail. This includes things like deprecated APIs and their replacements, build system changes, general code modernization and other useful information. +.. _upgrade-guide-2.12: + +v2.12 +===== + +NumPy support has been upgraded to support the 2.x series too. The two relevant +changes are that: + +* ``dtype.flags()`` is now a ``uint64`` and ``dtype.alignment()`` an + ``ssize_t`` (and NumPy may return an larger than integer value for + ``itemsize()`` in NumPy 2.x). + +* The long deprecated NumPy function ``PyArray_GetArrayParamsFromObject`` + function is not available anymore. + +Due to NumPy changes, you may experience difficulties updating to NumPy 2. +Please see the [NumPy 2 migration guide](https://numpy.org/devdocs/numpy_2_0_migration_guide.html) for details. +For example, a more direct change could be that the default integer ``"int_"`` +(and ``"uint"``) is now ``ssize_t`` and not ``long`` (affects 64bit windows). + +If you want to only support NumPy 1.x for now and are having problems due to +the two internal changes listed above, you can define +``PYBIND11_NUMPY_1_ONLY`` to disable the new support for now. Make sure you +define this on all pybind11 compile units, since it could be a source of ODR +violations if used inconsistently. This option will be removed in the future, +so adapting your code is highly recommended. + + +.. _upgrade-guide-2.11: + +v2.11 +===== + +* The minimum version of CMake is now 3.5. A future version will likely move to + requiring something like CMake 3.15. Note that CMake 3.27 is removing the + long-deprecated support for ``FindPythonInterp`` if you set 3.27 as the + minimum or maximum supported version. To prepare for that future, CMake 3.15+ + using ``FindPython`` or setting ``PYBIND11_FINDPYTHON`` is highly recommended, + otherwise pybind11 will automatically switch to using ``FindPython`` if + ``FindPythonInterp`` is not available. + + +.. _upgrade-guide-2.9: + +v2.9 +==== + +* Any usage of the recently added ``py::make_simple_namespace`` should be + converted to using ``py::module_::import("types").attr("SimpleNamespace")`` + instead. + +* The use of ``_`` in custom type casters can now be replaced with the more + readable ``const_name`` instead. The old ``_`` shortcut has been retained + unless it is being used as a macro (like for gettext). + + +.. _upgrade-guide-2.7: + +v2.7 +==== + +*Before* v2.7, ``py::str`` can hold ``PyUnicodeObject`` or ``PyBytesObject``, +and ``py::isinstance()`` is ``true`` for both ``py::str`` and +``py::bytes``. Starting with v2.7, ``py::str`` exclusively holds +``PyUnicodeObject`` (`#2409 `_), +and ``py::isinstance()`` is ``true`` only for ``py::str``. To help in +the transition of user code, the ``PYBIND11_STR_LEGACY_PERMISSIVE`` macro +is provided as an escape hatch to go back to the legacy behavior. This macro +will be removed in future releases. Two types of required fixes are expected +to be common: + +* Accidental use of ``py::str`` instead of ``py::bytes``, masked by the legacy + behavior. These are probably very easy to fix, by changing from + ``py::str`` to ``py::bytes``. + +* Reliance on py::isinstance(obj) being ``true`` for + ``py::bytes``. This is likely to be easy to fix in most cases by adding + ``|| py::isinstance(obj)``, but a fix may be more involved, e.g. if + ``py::isinstance`` appears in a template. Such situations will require + careful review and custom fixes. + + .. _upgrade-guide-2.6: v2.6 @@ -192,7 +274,7 @@ way to get and set object state. See :ref:`pickling` for details. ... .def(py::pickle( [](const Foo &self) { // __getstate__ - return py::make_tuple(f.value1(), f.value2(), ...); // unchanged + return py::make_tuple(self.value1(), self.value2(), ...); // unchanged }, [](py::tuple t) { // __setstate__, note: no `self` argument return new Foo(t[0].cast(), ...); @@ -256,7 +338,7 @@ Within pybind11's CMake build system, ``pybind11_add_module`` has always been setting the ``-fvisibility=hidden`` flag in release mode. From now on, it's being applied unconditionally, even in debug mode and it can no longer be opted out of with the ``NO_EXTRAS`` option. The ``pybind11::module`` target now also -adds this flag to it's interface. The ``pybind11::embed`` target is unchanged. +adds this flag to its interface. The ``pybind11::embed`` target is unchanged. The most significant change here is for the ``pybind11::module`` target. If you were previously relying on default visibility, i.e. if your Python module was @@ -484,7 +566,7 @@ include a declaration of the form: PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) -Continuing to do so won’t cause an error or even a deprecation warning, +Continuing to do so won't cause an error or even a deprecation warning, but it's completely redundant. diff --git a/examples/knxPython/pybind11/include/pybind11/attr.h b/examples/knxPython/pybind11/include/pybind11/attr.h index 0c416709..1044db94 100644 --- a/examples/knxPython/pybind11/include/pybind11/attr.h +++ b/examples/knxPython/pybind11/include/pybind11/attr.h @@ -10,72 +10,116 @@ #pragma once +#include "detail/common.h" #include "cast.h" +#include + PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) /// \addtogroup annotations /// @{ /// Annotation for methods -struct is_method { handle class_; is_method(const handle &c) : class_(c) { } }; +struct is_method { + handle class_; + explicit is_method(const handle &c) : class_(c) {} +}; + +/// Annotation for setters +struct is_setter {}; /// Annotation for operators -struct is_operator { }; +struct is_operator {}; /// Annotation for classes that cannot be subclassed -struct is_final { }; +struct is_final {}; /// Annotation for parent scope -struct scope { handle value; scope(const handle &s) : value(s) { } }; +struct scope { + handle value; + explicit scope(const handle &s) : value(s) {} +}; /// Annotation for documentation -struct doc { const char *value; 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; 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 { handle value; sibling(const handle &value) : value(value.ptr()) { } }; +struct sibling { + handle value; + explicit sibling(const handle &value) : value(value.ptr()) {} +}; /// Annotation indicating that a class derives from another given type -template struct base { +template +struct base { - PYBIND11_DEPRECATED("base() was deprecated in favor of specifying 'T' as a template argument to class_") - base() { } // NOLINT(modernize-use-equals-default): breaks MSVC 2015 when adding an attribute + PYBIND11_DEPRECATED( + "base() was deprecated in favor of specifying 'T' as a template argument to class_") + base() = default; }; /// Keep patient alive while nurse lives -template struct keep_alive { }; +template +struct keep_alive {}; /// Annotation indicating that a class is involved in a multiple inheritance relationship -struct multiple_inheritance { }; +struct multiple_inheritance {}; /// Annotation which enables dynamic attributes, i.e. adds `__dict__` to a class -struct dynamic_attr { }; +struct dynamic_attr {}; /// Annotation which enables the buffer protocol for a type -struct buffer_protocol { }; +struct buffer_protocol {}; /// Annotation which requests that a special metaclass is created for a type struct metaclass { handle value; PYBIND11_DEPRECATED("py::metaclass() is no longer required. It's turned on by default now.") - metaclass() { } // NOLINT(modernize-use-equals-default): breaks MSVC 2015 when adding an attribute + metaclass() = default; /// Override pybind11's default metaclass - explicit metaclass(handle value) : value(value) { } + explicit metaclass(handle value) : value(value) {} +}; + +/// Specifies a custom callback with signature `void (PyHeapTypeObject*)` that +/// may be used to customize the Python type. +/// +/// The callback is invoked immediately before `PyType_Ready`. +/// +/// Note: This is an advanced interface, and uses of it may require changes to +/// 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; + + explicit custom_type_setup(callback value) : value(std::move(value)) {} + + callback value; }; /// Annotation that marks a class as local to the module: -struct module_local { const bool value; constexpr module_local(bool v = true) : value(v) { } }; +struct module_local { + const bool value; + constexpr explicit module_local(bool v = true) : value(v) {} +}; /// Annotation to mark enums as an arithmetic type -struct arithmetic { }; +struct arithmetic {}; /// Mark a function for addition at the beginning of the existing overload chain instead of the end -struct prepend { }; +struct prepend {}; /** \rst A call policy which places one or more guard variables (``Ts...``) around the function call. @@ -95,9 +139,13 @@ struct prepend { }; return foo(args...); // forwarded arguments }); \endrst */ -template struct call_guard; +template +struct call_guard; -template <> struct call_guard<> { using type = detail::void_type; }; +template <> +struct call_guard<> { + using type = detail::void_type; +}; template struct call_guard { @@ -122,8 +170,9 @@ PYBIND11_NAMESPACE_BEGIN(detail) enum op_id : int; enum op_type : int; struct undefined_t; -template struct op_; -inline void keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret); +template +struct op_; +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 { @@ -134,15 +183,16 @@ struct argument_record { bool none : 1; ///< True if None is allowed when loading argument_record(const char *name, const char *descr, handle value, bool convert, bool none) - : name(name), descr(descr), value(value), convert(convert), none(none) { } + : name(name), descr(descr), value(value), convert(convert), none(none) {} }; -/// Internal data structure which holds metadata about a bound function (signature, overloads, etc.) +/// Internal data structure which holds metadata about a bound function (signature, overloads, +/// etc.) struct function_record { function_record() : is_constructor(false), is_new_style_constructor(false), is_stateless(false), - is_operator(false), is_method(false), has_args(false), - has_kwargs(false), has_kw_only_args(false), prepend(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.. */ @@ -157,13 +207,13 @@ struct function_record { 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; @@ -183,23 +233,24 @@ struct function_record { /// True if this is a method bool is_method : 1; + /// True if this is a setter + bool is_setter : 1; + /// True if the function has a '*args' argument bool has_args : 1; /// True if the function has a '**kwargs' argument bool has_kwargs : 1; - /// True once a 'py::kw_only' is encountered (any following args are keyword-only) - bool has_kw_only_args : 1; - /// True if this function is to be inserted at the beginning of the overload resolution chain bool prepend : 1; /// Number of arguments (including py::args and/or py::kwargs, if present) std::uint16_t nargs; - /// Number of trailing arguments (counted in `nargs`) that are keyword-only - std::uint16_t nargs_kw_only = 0; + /// Number of leading positional arguments, which are terminated by a py::args or py::kwargs + /// argument or by a py::kw_only annotation. + std::uint16_t nargs_pos = 0; /// Number of leading arguments (counted in `nargs`) that are positional-only std::uint16_t nargs_pos_only = 0; @@ -221,7 +272,7 @@ struct function_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) { } + default_holder(true), module_local(false), is_final(false) {} /// Handle to the parent scope handle scope; @@ -259,6 +310,9 @@ struct type_record { /// Custom metaclass (optional) handle metaclass; + /// Custom type setup. + custom_type_setup::callback custom_type_setup_callback; + /// Multiple inheritance marker bool multiple_inheritance : 1; @@ -277,42 +331,45 @@ 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); + 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 + "\""); + pybind11_fail("generic_type: type \"" + std::string(name) + + "\" referenced unknown base type \"" + tname + "\""); } 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) + "\" " + - (default_holder ? "does not have" : "has") + - " a non-default holder type while its base \"" + tname + "\" " + - (base_info->default_holder ? "does not" : "does")); + pybind11_fail("generic_type: type \"" + std::string(name) + "\" " + + (default_holder ? "does not have" : "has") + + " a non-default holder type while its base \"" + tname + "\" " + + (base_info->default_holder ? "does not" : "does")); } bases.append((PyObject *) base_info->type); - if (base_info->type->tp_dictoffset != 0) - dynamic_attr = true; +#if PY_VERSION_HEX < 0x030B0000 + dynamic_attr |= base_info->type->tp_dictoffset != 0; +#else + 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); } /// Tag for a new-style `__init__` defined in `detail/init.h` -struct is_new_style_constructor { }; +struct is_new_style_constructor {}; /** * Partial template specializations to process custom attributes provided to @@ -320,129 +377,183 @@ struct is_new_style_constructor { }; * fields in the type_record and function_record data structures or executed at * runtime to deal with custom call policies (e.g. keep_alive). */ -template struct process_attribute; +template +struct process_attribute; -template struct process_attribute_default { +template +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 { +template <> +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 { +template <> +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 { +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 = const_cast(d); } + static void init(const char *d, type_record *r) { r->doc = d; } }; -template <> struct process_attribute : process_attribute { }; +template <> +struct process_attribute : process_attribute {}; /// Process an attribute indicating the function's return value policy -template <> struct process_attribute : process_attribute_default { +template <> +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 { +/// 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; } }; /// 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) { r->is_method = true; r->scope = s.class_; } +template <> +struct process_attribute : process_attribute_default { + static void init(const is_method &s, function_record *r) { + r->is_method = true; + r->scope = s.class_; + } +}; + +/// 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; } }; /// Process an attribute which indicates the parent scope of a method -template <> struct process_attribute : process_attribute_default { +template <> +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 { +template <> +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) { r->is_new_style_constructor = true; } +template <> +struct process_attribute + : process_attribute_default { + static void init(const is_new_style_constructor &, function_record *r) { + r->is_new_style_constructor = true; + } }; -inline void process_kw_only_arg(const arg &a, function_record *r) { - if (!a.name || strlen(a.name) == 0) - pybind11_fail("arg(): cannot specify an unnamed argument after an kw_only() annotation"); - ++r->nargs_kw_only; +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()) { + 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 { +template <> +struct process_attribute : process_attribute_default { static void init(const arg &a, function_record *r) { - if (r->is_method && r->args.empty()) - r->args.emplace_back("self", nullptr, handle(), true /*convert*/, false /*none not allowed*/); + append_self_arg_if_needed(r); r->args.emplace_back(a.name, nullptr, handle(), !a.flag_noconvert, a.flag_none); - if (r->has_kw_only_args) process_kw_only_arg(a, r); + check_kw_only_arg(a, r); } }; /// Process a keyword argument attribute (*with* a default value) -template <> struct process_attribute : process_attribute_default { +template <> +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", nullptr /*descr*/, handle() /*parent*/, true /*convert*/, false /*none not allowed*/); + if (r->is_method && r->args.empty()) { + r->args.emplace_back( + "self", /*descr=*/nullptr, /*parent=*/handle(), /*convert=*/true, /*none=*/false); + } if (!a.value) { -#if !defined(NDEBUG) +#if defined(PYBIND11_DETAILED_ERROR_MESSAGES) std::string descr("'"); - if (a.name) descr += std::string(a.name) + ": "; + if (a.name) { + descr += std::string(a.name) + ": "; + } descr += a.type + "'"; if (r->is_method) { - if (r->name) - descr += " in method '" + (std::string) str(r->scope) + "." + (std::string) r->name + "'"; - else + if (r->name) { + descr += " in method '" + (std::string) str(r->scope) + "." + + (std::string) r->name + "'"; + } else { descr += " in method of '" + (std::string) str(r->scope) + "'"; + } } 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?)"); + pybind11_fail("arg(): could not convert default argument " + descr + + " into a Python object (type not registered yet?)"); #else pybind11_fail("arg(): could not convert default argument " "into a Python object (type not registered yet?). " - "Compile in debug mode for more information."); + "#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for " + "more information."); #endif } r->args.emplace_back(a.name, a.descr, a.value.inc_ref(), !a.flag_noconvert, a.flag_none); - if (r->has_kw_only_args) process_kw_only_arg(a, r); + check_kw_only_arg(a, r); } }; /// Process a keyword-only-arguments-follow pseudo argument -template <> struct process_attribute : process_attribute_default { +template <> +struct process_attribute : process_attribute_default { static void init(const kw_only &, function_record *r) { - r->has_kw_only_args = true; + append_self_arg_if_needed(r); + 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 { +template <> +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) { + 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 } }; -/// Process a parent class attribute. Single inheritance only (class_ itself already guarantees that) +/// Process a parent class attribute. Single inheritance only (class_ itself already guarantees +/// that) template -struct process_attribute::value>> : process_attribute_default { +struct process_attribute::value>> + : process_attribute_default { static void init(const handle &h, type_record *r) { r->bases.append(h); } }; @@ -455,7 +566,9 @@ struct process_attribute> : process_attribute_default> { /// Process a multiple inheritance attribute template <> struct process_attribute : process_attribute_default { - static void init(const multiple_inheritance &, type_record *r) { r->multiple_inheritance = true; } + static void init(const multiple_inheritance &, type_record *r) { + r->multiple_inheritance = true; + } }; template <> @@ -463,6 +576,13 @@ 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) { + 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; } @@ -494,41 +614,59 @@ template <> struct process_attribute : process_attribute_default {}; template -struct process_attribute> : process_attribute_default> { }; +struct process_attribute> : process_attribute_default> {}; /** * Process a keep_alive call policy -- invokes keep_alive_impl during the * pre-call handler if both Nurse, Patient != 0 and use the post-call handler * otherwise */ -template struct process_attribute> : public process_attribute_default> { +template +struct process_attribute> + : public process_attribute_default> { template = 0> - static void precall(function_call &call) { keep_alive_impl(Nurse, Patient, call, handle()); } + static void precall(function_call &call) { + keep_alive_impl(Nurse, Patient, call, handle()); + } template = 0> - static void postcall(function_call &, handle) { } + static void postcall(function_call &, handle) {} template = 0> - static void precall(function_call &) { } + static void precall(function_call &) {} template = 0> - static void postcall(function_call &call, handle ret) { keep_alive_impl(Nurse, Patient, call, ret); } + 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) { - int unused[] = { 0, (process_attribute::type>::init(args, r), 0) ... }; - ignore_unused(unused); +template +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{ + 0, ((void) process_attribute::type>::init(args, r), 0)...}; } - static void init(const Args&... args, type_record *r) { - int unused[] = { 0, (process_attribute::type>::init(args, r), 0) ... }; - ignore_unused(unused); + 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) { - int unused[] = { 0, (process_attribute::type>::precall(call), 0) ... }; - ignore_unused(unused); + 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) { - int unused[] = { 0, (process_attribute::type>::postcall(call, fn_ret), 0) ... }; - ignore_unused(unused); + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call, fn_ret); + PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(fn_ret); + using expander = int[]; + (void) expander{ + 0, (process_attribute::type>::postcall(call, fn_ret), 0)...}; } }; @@ -542,9 +680,10 @@ using extract_guard_t = typename exactly_one_t, Extr /// Check the number of named arguments at compile time template ::value...), - size_t self = constexpr_sum(std::is_same::value...)> + size_t self = constexpr_sum(std::is_same::value...)> constexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) { - return named == 0 || (self + named + has_args + has_kwargs) == nargs; + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(nargs, has_args, has_kwargs); + return named == 0 || (self + named + size_t(has_args) + size_t(has_kwargs)) == nargs; } PYBIND11_NAMESPACE_END(detail) diff --git a/examples/knxPython/pybind11/include/pybind11/buffer_info.h b/examples/knxPython/pybind11/include/pybind11/buffer_info.h index d803004a..75aec0ba 100644 --- a/examples/knxPython/pybind11/include/pybind11/buffer_info.h +++ b/examples/knxPython/pybind11/include/pybind11/buffer_info.h @@ -19,9 +19,11 @@ PYBIND11_NAMESPACE_BEGIN(detail) 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; } @@ -29,11 +31,15 @@ inline std::vector c_strides(const std::vector &shape, ssize_t 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; } +template +struct compare_buffer_info; + PYBIND11_NAMESPACE_END(detail) /// Information record describing a Python buffer object @@ -41,61 +47,89 @@ 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() + 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) + 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()) + 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) + } + 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) { } + 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) { } + 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) { } + 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) { + : 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 &operator=(const buffer_info &) = delete; - buffer_info(buffer_info &&other) { - (*this) = std::move(other); - } + buffer_info(buffer_info &&other) noexcept { (*this) = std::move(other); } - buffer_info& operator=(buffer_info &&rhs) { + buffer_info &operator=(buffer_info &&rhs) noexcept { ptr = rhs.ptr; itemsize = rhs.itemsize; size = rhs.size; @@ -110,17 +144,39 @@ struct buffer_info { } ~buffer_info() { - if (m_view && ownview) { PyBuffer_Release(m_view); delete m_view; } + if (m_view && ownview) { + PyBuffer_Release(m_view); + delete m_view; + } } Py_buffer *view() const { return m_view; } Py_buffer *&view() { return m_view; } -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) { } + /* 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; @@ -128,17 +184,23 @@ struct buffer_info { PYBIND11_NAMESPACE_BEGIN(detail) -template struct compare_buffer_info { - static bool compare(const buffer_info& b) { +template +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) { - return (size_t) b.itemsize == sizeof(T) && (b.format == format_descriptor::value || - ((sizeof(T) == sizeof(long)) && b.format == (std::is_unsigned::value ? "L" : "l")) || - ((sizeof(T) == sizeof(size_t)) && b.format == (std::is_unsigned::value ? "N" : "n"))); +template +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)) + && b.format == (std::is_unsigned::value ? "L" : "l")) + || ((sizeof(T) == sizeof(size_t)) + && b.format == (std::is_unsigned::value ? "N" : "n"))); } }; diff --git a/examples/knxPython/pybind11/include/pybind11/cast.h b/examples/knxPython/pybind11/include/pybind11/cast.h index d6e440f7..0f3091f6 100644 --- a/examples/knxPython/pybind11/include/pybind11/cast.h +++ b/examples/knxPython/pybind11/include/pybind11/cast.h @@ -10,1029 +10,174 @@ #pragma once -#include "pytypes.h" -#include "detail/typeid.h" +#include "detail/common.h" #include "detail/descr.h" -#include "detail/internals.h" +#include "detail/type_caster_base.h" +#include "detail/typeid.h" +#include "pytypes.h" + #include -#include +#include +#include +#include +#include +#include +#include #include #include - -#if defined(PYBIND11_CPP17) -# if defined(__has_include) -# if __has_include() -# define PYBIND11_HAS_STRING_VIEW -# endif -# elif defined(_MSC_VER) -# define PYBIND11_HAS_STRING_VIEW -# endif -#endif -#ifdef PYBIND11_HAS_STRING_VIEW -#include -#endif - -#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L -# define PYBIND11_HAS_U8STRING -#endif +#include +#include PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) -PYBIND11_NAMESPACE_BEGIN(detail) - -/// A life support system for temporary objects created by `type_caster::load()`. -/// Adding a patient will keep it alive up until the enclosing function returns. -class loader_life_support { -public: - /// A new patient frame is created when a function is entered - loader_life_support() { - get_internals().loader_patient_stack.push_back(nullptr); - } - - /// ... and destroyed after it returns - ~loader_life_support() { - auto &stack = get_internals().loader_patient_stack; - if (stack.empty()) - pybind11_fail("loader_life_support: internal error"); - - auto ptr = stack.back(); - stack.pop_back(); - Py_CLEAR(ptr); - - // A heuristic to reduce the stack's capacity (e.g. after long recursive calls) - if (stack.capacity() > 16 && !stack.empty() && stack.capacity() / stack.size() > 2) - stack.shrink_to_fit(); - } - - /// This can only be used inside a pybind11-bound function, either by `argument_loader` - /// at argument preparation time or by `py::cast()` at execution time. - PYBIND11_NOINLINE static void add_patient(handle h) { - auto &stack = get_internals().loader_patient_stack; - if (stack.empty()) - throw cast_error("When called outside a bound function, py::cast() cannot " - "do Python -> C++ conversions which require the creation " - "of temporary values"); - - auto &list_ptr = stack.back(); - if (list_ptr == nullptr) { - list_ptr = PyList_New(1); - if (!list_ptr) - pybind11_fail("loader_life_support: error allocating list"); - PyList_SET_ITEM(list_ptr, 0, h.inc_ref().ptr()); - } else { - auto result = PyList_Append(list_ptr, h.ptr()); - if (result == -1) - pybind11_fail("loader_life_support: error adding patient"); - } - } -}; - -// Gets the cache entry for the given type, creating it if necessary. The return value is the pair -// returned by emplace, i.e. an iterator for the entry and a bool set to `true` if the entry was -// just created. -inline std::pair all_type_info_get_cache(PyTypeObject *type); - -// Populates a just-created cache entry. -PYBIND11_NOINLINE inline void all_type_info_populate(PyTypeObject *t, std::vector &bases) { - std::vector check; - for (handle parent : reinterpret_borrow(t->tp_bases)) - check.push_back((PyTypeObject *) parent.ptr()); - - auto const &type_dict = get_internals().registered_types_py; - for (size_t i = 0; i < check.size(); i++) { - auto type = check[i]; - // Ignore Python2 old-style class super type: - if (!PyType_Check((PyObject *) type)) continue; - - // Check `type` in the current set of registered python types: - auto it = type_dict.find(type); - if (it != type_dict.end()) { - // We found a cache entry for it, so it's either pybind-registered or has pre-computed - // pybind bases, but we have to make sure we haven't already seen the type(s) before: we - // want to follow Python/virtual C++ rules that there should only be one instance of a - // common base. - for (auto *tinfo : it->second) { - // NB: Could use a second set here, rather than doing a linear search, but since - // having a large number of immediate pybind11-registered types seems fairly - // unlikely, that probably isn't worthwhile. - bool found = false; - for (auto *known : bases) { - if (known == tinfo) { found = true; break; } - } - if (!found) bases.push_back(tinfo); - } - } - else if (type->tp_bases) { - // It's some python type, so keep follow its bases classes to look for one or more - // registered types - if (i + 1 == check.size()) { - // When we're at the end, we can pop off the current element to avoid growing - // `check` when adding just one base (which is typical--i.e. when there is no - // multiple inheritance) - check.pop_back(); - i--; - } - for (handle parent : reinterpret_borrow(type->tp_bases)) - check.push_back((PyTypeObject *) parent.ptr()); - } - } -} - -/** - * Extracts vector of type_info pointers of pybind-registered roots of the given Python type. Will - * be just 1 pybind type for the Python type of a pybind-registered class, or for any Python-side - * derived class that uses single inheritance. Will contain as many types as required for a Python - * class that uses multiple inheritance to inherit (directly or indirectly) from multiple - * pybind-registered classes. Will be empty if neither the type nor any base classes are - * pybind-registered. - * - * The value is cached for the lifetime of the Python type. - */ -inline const std::vector &all_type_info(PyTypeObject *type) { - auto ins = all_type_info_get_cache(type); - if (ins.second) - // New cache entry: populate it - all_type_info_populate(type, ins.first->second); - - return ins.first->second; -} - -/** - * Gets a single pybind11 type info for a python type. Returns nullptr if neither the type nor any - * ancestors are pybind11-registered. Throws an exception if there are multiple bases--use - * `all_type_info` instead if you want to support multiple bases. - */ -PYBIND11_NOINLINE inline detail::type_info* get_type_info(PyTypeObject *type) { - auto &bases = all_type_info(type); - if (bases.empty()) - return nullptr; - if (bases.size() > 1) - pybind11_fail("pybind11::detail::get_type_info: type has multiple pybind11-registered bases"); - return bases.front(); -} - -inline detail::type_info *get_local_type_info(const std::type_index &tp) { - auto &locals = registered_local_types_cpp(); - auto it = locals.find(tp); - if (it != locals.end()) - return it->second; - return nullptr; -} - -inline detail::type_info *get_global_type_info(const std::type_index &tp) { - auto &types = get_internals().registered_types_cpp; - auto it = types.find(tp); - if (it != types.end()) - return it->second; - return nullptr; -} - -/// Return the type info for a given C++ type; on lookup failure can either throw or return nullptr. -PYBIND11_NOINLINE inline detail::type_info *get_type_info(const std::type_index &tp, - bool throw_if_missing = false) { - if (auto ltype = get_local_type_info(tp)) - return ltype; - if (auto gtype = get_global_type_info(tp)) - return gtype; - - if (throw_if_missing) { - std::string tname = tp.name(); - detail::clean_type_id(tname); - pybind11_fail("pybind11::detail::get_type_info: unable to find type info for \"" + tname + "\""); - } - return nullptr; -} - -PYBIND11_NOINLINE inline handle get_type_handle(const std::type_info &tp, bool throw_if_missing) { - detail::type_info *type_info = get_type_info(tp, throw_if_missing); - return handle(type_info ? ((PyObject *) type_info->type) : nullptr); -} - -struct value_and_holder { - instance *inst = nullptr; - size_t index = 0u; - const detail::type_info *type = nullptr; - void **vh = nullptr; - - // Main constructor for a found value/holder: - value_and_holder(instance *i, const detail::type_info *type, size_t vpos, size_t index) : - inst{i}, index{index}, type{type}, - vh{inst->simple_layout ? inst->simple_value_holder : &inst->nonsimple.values_and_holders[vpos]} - {} - - // Default constructor (used to signal a value-and-holder not found by get_value_and_holder()) - value_and_holder() = default; - - // Used for past-the-end iterator - value_and_holder(size_t index) : index{index} {} - - template V *&value_ptr() const { - return reinterpret_cast(vh[0]); - } - // True if this `value_and_holder` has a non-null value pointer - explicit operator bool() const { return value_ptr(); } - - template H &holder() const { - return reinterpret_cast(vh[1]); - } - bool holder_constructed() const { - return inst->simple_layout - ? inst->simple_holder_constructed - : inst->nonsimple.status[index] & instance::status_holder_constructed; - } - void set_holder_constructed(bool v = true) { - if (inst->simple_layout) - inst->simple_holder_constructed = v; - else if (v) - inst->nonsimple.status[index] |= instance::status_holder_constructed; - else - inst->nonsimple.status[index] &= (uint8_t) ~instance::status_holder_constructed; - } - bool instance_registered() const { - return inst->simple_layout - ? inst->simple_instance_registered - : inst->nonsimple.status[index] & instance::status_instance_registered; - } - void set_instance_registered(bool v = true) { - if (inst->simple_layout) - inst->simple_instance_registered = v; - else if (v) - inst->nonsimple.status[index] |= instance::status_instance_registered; - else - inst->nonsimple.status[index] &= (uint8_t) ~instance::status_instance_registered; - } -}; - -// Container for accessing and iterating over an instance's values/holders -struct values_and_holders { -private: - instance *inst; - using type_vec = std::vector; - const type_vec &tinfo; - -public: - values_and_holders(instance *inst) : inst{inst}, tinfo(all_type_info(Py_TYPE(inst))) {} - - struct iterator { - private: - instance *inst = nullptr; - const type_vec *types = nullptr; - value_and_holder curr; - friend struct values_and_holders; - iterator(instance *inst, const type_vec *tinfo) - : inst{inst}, types{tinfo}, - curr(inst /* instance */, - types->empty() ? nullptr : (*types)[0] /* type info */, - 0, /* vpos: (non-simple types only): the first vptr comes first */ - 0 /* index */) - {} - // Past-the-end iterator: - iterator(size_t end) : curr(end) {} - public: - bool operator==(const iterator &other) const { return curr.index == other.curr.index; } - bool operator!=(const iterator &other) const { return curr.index != other.curr.index; } - iterator &operator++() { - if (!inst->simple_layout) - curr.vh += 1 + (*types)[curr.index]->holder_size_in_ptrs; - ++curr.index; - curr.type = curr.index < types->size() ? (*types)[curr.index] : nullptr; - return *this; - } - value_and_holder &operator*() { return curr; } - value_and_holder *operator->() { return &curr; } - }; - - iterator begin() { return iterator(inst, &tinfo); } - iterator end() { return iterator(tinfo.size()); } - - iterator find(const type_info *find_type) { - auto it = begin(), endit = end(); - while (it != endit && it->type != find_type) ++it; - return it; - } - - size_t size() { return tinfo.size(); } -}; - -/** - * Extracts C++ value and holder pointer references from an instance (which may contain multiple - * values/holders for python-side multiple inheritance) that match the given type. Throws an error - * if the given type (or ValueType, if omitted) is not a pybind11 base of the given instance. If - * `find_type` is omitted (or explicitly specified as nullptr) the first value/holder are returned, - * regardless of type (and the resulting .type will be nullptr). - * - * The returned object should be short-lived: in particular, it must not outlive the called-upon - * instance. - */ -PYBIND11_NOINLINE inline value_and_holder instance::get_value_and_holder(const type_info *find_type /*= nullptr default in common.h*/, bool throw_if_missing /*= true in common.h*/) { - // Optimize common case: - if (!find_type || Py_TYPE(this) == find_type->type) - return value_and_holder(this, find_type, 0, 0); - - detail::values_and_holders vhs(this); - auto it = vhs.find(find_type); - if (it != vhs.end()) - return *it; - - if (!throw_if_missing) - return value_and_holder(); - -#if defined(NDEBUG) - pybind11_fail("pybind11::detail::instance::get_value_and_holder: " - "type is not a pybind11 base of the given instance " - "(compile in debug mode for type details)"); -#else - pybind11_fail("pybind11::detail::instance::get_value_and_holder: `" + - get_fully_qualified_tp_name(find_type->type) + "' is not a pybind11 base of the given `" + - get_fully_qualified_tp_name(Py_TYPE(this)) + "' instance"); -#endif -} - -PYBIND11_NOINLINE inline void instance::allocate_layout() { - auto &tinfo = all_type_info(Py_TYPE(this)); - - const size_t n_types = tinfo.size(); - - if (n_types == 0) - pybind11_fail("instance allocation failed: new instance has no pybind11-registered base types"); - - simple_layout = - n_types == 1 && tinfo.front()->holder_size_in_ptrs <= instance_simple_holder_in_ptrs(); - - // Simple path: no python-side multiple inheritance, and a small-enough holder - if (simple_layout) { - simple_value_holder[0] = nullptr; - simple_holder_constructed = false; - simple_instance_registered = false; - } - else { // multiple base types or a too-large holder - // Allocate space to hold: [v1*][h1][v2*][h2]...[bb...] where [vN*] is a value pointer, - // [hN] is the (uninitialized) holder instance for value N, and [bb...] is a set of bool - // values that tracks whether each associated holder has been initialized. Each [block] is - // padded, if necessary, to an integer multiple of sizeof(void *). - size_t space = 0; - for (auto t : tinfo) { - space += 1; // value pointer - space += t->holder_size_in_ptrs; // holder instance - } - size_t flags_at = space; - space += size_in_ptrs(n_types); // status bytes (holder_constructed and instance_registered) - - // Allocate space for flags, values, and holders, and initialize it to 0 (flags and values, - // in particular, need to be 0). Use Python's memory allocation functions: in Python 3.6 - // they default to using pymalloc, which is designed to be efficient for small allocations - // like the one we're doing here; in earlier versions (and for larger allocations) they are - // just wrappers around malloc. -#if PY_VERSION_HEX >= 0x03050000 - nonsimple.values_and_holders = (void **) PyMem_Calloc(space, sizeof(void *)); - if (!nonsimple.values_and_holders) throw std::bad_alloc(); -#else - nonsimple.values_and_holders = (void **) PyMem_New(void *, space); - if (!nonsimple.values_and_holders) throw std::bad_alloc(); - std::memset(nonsimple.values_and_holders, 0, space * sizeof(void *)); -#endif - nonsimple.status = reinterpret_cast(&nonsimple.values_and_holders[flags_at]); - } - owned = true; -} - -PYBIND11_NOINLINE inline void instance::deallocate_layout() { - if (!simple_layout) - PyMem_Free(nonsimple.values_and_holders); -} - -PYBIND11_NOINLINE inline bool isinstance_generic(handle obj, const std::type_info &tp) { - handle type = detail::get_type_handle(tp, false); - if (!type) - return false; - return isinstance(obj, type); -} - -PYBIND11_NOINLINE inline std::string error_string() { - if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_RuntimeError, "Unknown internal error occurred"); - return "Unknown internal error occurred"; - } - - error_scope scope; // Preserve error state - - std::string errorString; - if (scope.type) { - errorString += handle(scope.type).attr("__name__").cast(); - errorString += ": "; - } - if (scope.value) - errorString += (std::string) str(scope.value); - - PyErr_NormalizeException(&scope.type, &scope.value, &scope.trace); - -#if PY_MAJOR_VERSION >= 3 - if (scope.trace != nullptr) - PyException_SetTraceback(scope.value, scope.trace); -#endif - -#if !defined(PYPY_VERSION) - if (scope.trace) { - auto *trace = (PyTracebackObject *) scope.trace; - - /* Get the deepest trace possible */ - while (trace->tb_next) - trace = trace->tb_next; - - PyFrameObject *frame = trace->tb_frame; - errorString += "\n\nAt:\n"; - while (frame) { - int lineno = PyFrame_GetLineNumber(frame); - errorString += - " " + handle(frame->f_code->co_filename).cast() + - "(" + std::to_string(lineno) + "): " + - handle(frame->f_code->co_name).cast() + "\n"; - frame = frame->f_back; - } - } -#endif - - return errorString; -} - -PYBIND11_NOINLINE inline handle get_object_handle(const void *ptr, const detail::type_info *type ) { - auto &instances = get_internals().registered_instances; - auto range = instances.equal_range(ptr); - for (auto it = range.first; it != range.second; ++it) { - for (const auto &vh : values_and_holders(it->second)) { - if (vh.type == type) - return handle((PyObject *) it->second); - } - } - return handle(); -} - -inline PyThreadState *get_thread_state_unchecked() { -#if defined(PYPY_VERSION) - return PyThreadState_GET(); -#elif PY_VERSION_HEX < 0x03000000 - return _PyThreadState_Current; -#elif PY_VERSION_HEX < 0x03050000 - return (PyThreadState*) _Py_atomic_load_relaxed(&_PyThreadState_Current); -#elif PY_VERSION_HEX < 0x03050200 - return (PyThreadState*) _PyThreadState_Current.value; -#else - return _PyThreadState_UncheckedGet(); -#endif -} - -// Forward declarations -inline void keep_alive_impl(handle nurse, handle patient); -inline PyObject *make_new_instance(PyTypeObject *type); - -class type_caster_generic { -public: - PYBIND11_NOINLINE type_caster_generic(const std::type_info &type_info) - : typeinfo(get_type_info(type_info)), cpptype(&type_info) { } - - type_caster_generic(const type_info *typeinfo) - : typeinfo(typeinfo), cpptype(typeinfo ? typeinfo->cpptype : nullptr) { } - - bool load(handle src, bool convert) { - return load_impl(src, convert); - } - - PYBIND11_NOINLINE static handle cast(const void *_src, return_value_policy policy, handle parent, - const detail::type_info *tinfo, - void *(*copy_constructor)(const void *), - void *(*move_constructor)(const void *), - const void *existing_holder = nullptr) { - if (!tinfo) // no type info: error will be set already - return handle(); - - void *src = const_cast(_src); - if (src == nullptr) - return none().release(); - - auto it_instances = get_internals().registered_instances.equal_range(src); - for (auto it_i = it_instances.first; it_i != it_instances.second; ++it_i) { - for (auto instance_type : detail::all_type_info(Py_TYPE(it_i->second))) { - if (instance_type && same_type(*instance_type->cpptype, *tinfo->cpptype)) - return handle((PyObject *) it_i->second).inc_ref(); - } - } - - auto inst = reinterpret_steal(make_new_instance(tinfo->type)); - auto wrapper = reinterpret_cast(inst.ptr()); - wrapper->owned = false; - void *&valueptr = values_and_holders(wrapper).begin()->value_ptr(); - - switch (policy) { - case return_value_policy::automatic: - case return_value_policy::take_ownership: - valueptr = src; - wrapper->owned = true; - break; - - case return_value_policy::automatic_reference: - case return_value_policy::reference: - valueptr = src; - wrapper->owned = false; - break; - - case return_value_policy::copy: - if (copy_constructor) - valueptr = copy_constructor(src); - else { -#if defined(NDEBUG) - throw cast_error("return_value_policy = copy, but type is " - "non-copyable! (compile in debug mode for details)"); -#else - std::string type_name(tinfo->cpptype->name()); - detail::clean_type_id(type_name); - throw cast_error("return_value_policy = copy, but type " + - type_name + " is non-copyable!"); -#endif - } - wrapper->owned = true; - break; - - case return_value_policy::move: - if (move_constructor) - valueptr = move_constructor(src); - else if (copy_constructor) - valueptr = copy_constructor(src); - else { -#if defined(NDEBUG) - throw cast_error("return_value_policy = move, but type is neither " - "movable nor copyable! " - "(compile in debug mode for details)"); -#else - std::string type_name(tinfo->cpptype->name()); - detail::clean_type_id(type_name); - throw cast_error("return_value_policy = move, but type " + - type_name + " is neither movable nor copyable!"); -#endif - } - wrapper->owned = true; - break; - - case return_value_policy::reference_internal: - valueptr = src; - wrapper->owned = false; - keep_alive_impl(inst, parent); - break; - - default: - throw cast_error("unhandled return_value_policy: should not happen!"); - } - tinfo->init_instance(wrapper, existing_holder); - - return inst.release(); - } - - // Base methods for generic caster; there are overridden in copyable_holder_caster - void load_value(value_and_holder &&v_h) { - auto *&vptr = v_h.value_ptr(); - // Lazy allocation for unallocated values: - if (vptr == nullptr) { - auto *type = v_h.type ? v_h.type : typeinfo; - if (type->operator_new) { - vptr = type->operator_new(type->type_size); - } else { - #if defined(__cpp_aligned_new) && (!defined(_MSC_VER) || _MSC_VER >= 1912) - if (type->type_align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) - vptr = ::operator new(type->type_size, - std::align_val_t(type->type_align)); - else - #endif - vptr = ::operator new(type->type_size); - } - } - value = vptr; - } - bool try_implicit_casts(handle src, bool convert) { - for (auto &cast : typeinfo->implicit_casts) { - type_caster_generic sub_caster(*cast.first); - if (sub_caster.load(src, convert)) { - value = cast.second(sub_caster.value); - return true; - } - } - return false; - } - bool try_direct_conversions(handle src) { - for (auto &converter : *typeinfo->direct_conversions) { - if (converter(src.ptr(), value)) - return true; - } - return false; - } - void check_holder_compat() {} - - PYBIND11_NOINLINE static void *local_load(PyObject *src, const type_info *ti) { - auto caster = type_caster_generic(ti); - if (caster.load(src, false)) - return caster.value; - return nullptr; - } - - /// Try to load with foreign typeinfo, if available. Used when there is no - /// native typeinfo, or when the native one wasn't able to produce a value. - PYBIND11_NOINLINE bool try_load_foreign_module_local(handle src) { - constexpr auto *local_key = PYBIND11_MODULE_LOCAL_ID; - const auto pytype = type::handle_of(src); - if (!hasattr(pytype, local_key)) - return false; - - type_info *foreign_typeinfo = reinterpret_borrow(getattr(pytype, local_key)); - // Only consider this foreign loader if actually foreign and is a loader of the correct cpp type - if (foreign_typeinfo->module_local_load == &local_load - || (cpptype && !same_type(*cpptype, *foreign_typeinfo->cpptype))) - return false; - - if (auto result = foreign_typeinfo->module_local_load(src.ptr(), foreign_typeinfo)) { - value = result; - return true; - } - return false; - } - - // Implementation of `load`; this takes the type of `this` so that it can dispatch the relevant - // bits of code between here and copyable_holder_caster where the two classes need different - // logic (without having to resort to virtual inheritance). - template - PYBIND11_NOINLINE bool load_impl(handle src, bool convert) { - if (!src) return false; - if (!typeinfo) return try_load_foreign_module_local(src); - if (src.is_none()) { - // Defer accepting None to other overloads (if we aren't in convert mode): - if (!convert) return false; - value = nullptr; - return true; - } - - auto &this_ = static_cast(*this); - this_.check_holder_compat(); - - PyTypeObject *srctype = Py_TYPE(src.ptr()); - - // Case 1: If src is an exact type match for the target type then we can reinterpret_cast - // the instance's value pointer to the target type: - if (srctype == typeinfo->type) { - this_.load_value(reinterpret_cast(src.ptr())->get_value_and_holder()); - return true; - } - // Case 2: We have a derived class - else if (PyType_IsSubtype(srctype, typeinfo->type)) { - auto &bases = all_type_info(srctype); - bool no_cpp_mi = typeinfo->simple_type; - - // Case 2a: the python type is a Python-inherited derived class that inherits from just - // one simple (no MI) pybind11 class, or is an exact match, so the C++ instance is of - // the right type and we can use reinterpret_cast. - // (This is essentially the same as case 2b, but because not using multiple inheritance - // is extremely common, we handle it specially to avoid the loop iterator and type - // pointer lookup overhead) - if (bases.size() == 1 && (no_cpp_mi || bases.front()->type == typeinfo->type)) { - this_.load_value(reinterpret_cast(src.ptr())->get_value_and_holder()); - return true; - } - // Case 2b: the python type inherits from multiple C++ bases. Check the bases to see if - // we can find an exact match (or, for a simple C++ type, an inherited match); if so, we - // can safely reinterpret_cast to the relevant pointer. - else if (bases.size() > 1) { - for (auto base : bases) { - if (no_cpp_mi ? PyType_IsSubtype(base->type, typeinfo->type) : base->type == typeinfo->type) { - this_.load_value(reinterpret_cast(src.ptr())->get_value_and_holder(base)); - return true; - } - } - } - - // Case 2c: C++ multiple inheritance is involved and we couldn't find an exact type match - // in the registered bases, above, so try implicit casting (needed for proper C++ casting - // when MI is involved). - if (this_.try_implicit_casts(src, convert)) - return true; - } - - // Perform an implicit conversion - if (convert) { - for (auto &converter : typeinfo->implicit_conversions) { - auto temp = reinterpret_steal(converter(src.ptr(), typeinfo->type)); - if (load_impl(temp, false)) { - loader_life_support::add_patient(temp); - return true; - } - } - if (this_.try_direct_conversions(src)) - return true; - } - - // Failed to match local typeinfo. Try again with global. - if (typeinfo->module_local) { - if (auto gtype = get_global_type_info(*typeinfo->cpptype)) { - typeinfo = gtype; - return load(src, false); - } - } - - // Global typeinfo has precedence over foreign module_local - return try_load_foreign_module_local(src); - } - - - // Called to do type lookup and wrap the pointer and type in a pair when a dynamic_cast - // isn't needed or can't be used. If the type is unknown, sets the error and returns a pair - // with .second = nullptr. (p.first = nullptr is not an error: it becomes None). - PYBIND11_NOINLINE static std::pair src_and_type( - const void *src, const std::type_info &cast_type, const std::type_info *rtti_type = nullptr) { - if (auto *tpi = get_type_info(cast_type)) - return {src, const_cast(tpi)}; - - // Not found, set error: - std::string tname = rtti_type ? rtti_type->name() : cast_type.name(); - detail::clean_type_id(tname); - std::string msg = "Unregistered type : " + tname; - PyErr_SetString(PyExc_TypeError, msg.c_str()); - return {nullptr, nullptr}; - } - - const type_info *typeinfo = nullptr; - const std::type_info *cpptype = nullptr; - void *value = nullptr; -}; - -/** - * Determine suitable casting operator for pointer-or-lvalue-casting type casters. The type caster - * needs to provide `operator T*()` and `operator T&()` operators. - * - * If the type supports moving the value away via an `operator T&&() &&` method, it should use - * `movable_cast_op_type` instead. - */ -template -using cast_op_type = - conditional_t>::value, - typename std::add_pointer>::type, - typename std::add_lvalue_reference>::type>; - -/** - * Determine suitable casting operator for a type caster with a movable value. Such a type caster - * needs to provide `operator T*()`, `operator T&()`, and `operator T&&() &&`. The latter will be - * called in appropriate contexts where the value can be moved rather than copied. - * - * These operator are automatically provided when using the PYBIND11_TYPE_CASTER macro. - */ -template -using movable_cast_op_type = - conditional_t::type>::value, - typename std::add_pointer>::type, - conditional_t::value, - typename std::add_rvalue_reference>::type, - typename std::add_lvalue_reference>::type>>; - -// std::is_copy_constructible isn't quite enough: it lets std::vector (and similar) through when -// T is non-copyable, but code containing such a copy constructor fails to actually compile. -template struct is_copy_constructible : std::is_copy_constructible {}; - -// Specialization for types that appear to be copy constructible but also look like stl containers -// (we specifically check for: has `value_type` and `reference` with `reference = value_type&`): if -// so, copy constructability depends on whether the value_type is copy constructible. -template struct is_copy_constructible, - std::is_same, - // Avoid infinite recursion - negation> - >::value>> : is_copy_constructible {}; - -// Likewise for std::pair -// (after C++17 it is mandatory that the copy constructor not exist when the two types aren't themselves -// copy constructible, but this can not be relied upon when T1 or T2 are themselves containers). -template struct is_copy_constructible> - : all_of, is_copy_constructible> {}; - -// The same problems arise with std::is_copy_assignable, so we use the same workaround. -template struct is_copy_assignable : std::is_copy_assignable {}; -template struct is_copy_assignable, - std::is_same - >::value>> : is_copy_assignable {}; -template struct is_copy_assignable> - : all_of, is_copy_assignable> {}; - -PYBIND11_NAMESPACE_END(detail) - -// polymorphic_type_hook::get(src, tinfo) determines whether the object pointed -// to by `src` actually is an instance of some class derived from `itype`. -// If so, it sets `tinfo` to point to the std::type_info representing that derived -// type, and returns a pointer to the start of the most-derived object of that type -// (in which `src` is a subobject; this will be the same address as `src` in most -// single inheritance cases). If not, or if `src` is nullptr, it simply returns `src` -// and leaves `tinfo` at its default value of nullptr. -// -// The default polymorphic_type_hook just returns src. A specialization for polymorphic -// types determines the runtime type of the passed object and adjusts the this-pointer -// appropriately via dynamic_cast. This is what enables a C++ Animal* to appear -// to Python as a Dog (if Dog inherits from Animal, Animal is polymorphic, Dog is -// registered with pybind11, and this Animal is in fact a Dog). -// -// You may specialize polymorphic_type_hook yourself for types that want to appear -// polymorphic to Python but do not use C++ RTTI. (This is a not uncommon pattern -// in performance-sensitive applications, used most notably in LLVM.) -// -// polymorphic_type_hook_base allows users to specialize polymorphic_type_hook with -// std::enable_if. User provided specializations will always have higher priority than -// the default implementation and specialization provided in polymorphic_type_hook_base. -template -struct polymorphic_type_hook_base -{ - static const void *get(const itype *src, const std::type_info*&) { return src; } -}; -template -struct polymorphic_type_hook_base::value>> -{ - static const void *get(const itype *src, const std::type_info*& type) { - type = src ? &typeid(*src) : nullptr; - return dynamic_cast(src); - } -}; -template -struct polymorphic_type_hook : public polymorphic_type_hook_base {}; +PYBIND11_WARNING_DISABLE_MSVC(4127) PYBIND11_NAMESPACE_BEGIN(detail) -/// Generic type caster for objects stored on the heap -template class type_caster_base : public type_caster_generic { - using itype = intrinsic_t; - -public: - static constexpr auto name = _(); - - type_caster_base() : type_caster_base(typeid(type)) { } - explicit type_caster_base(const std::type_info &info) : type_caster_generic(info) { } - - static handle cast(const itype &src, return_value_policy policy, handle parent) { - if (policy == return_value_policy::automatic || policy == return_value_policy::automatic_reference) - policy = return_value_policy::copy; - return cast(&src, policy, parent); - } - - static handle cast(itype &&src, return_value_policy, handle parent) { - return cast(&src, return_value_policy::move, parent); - } - - // Returns a (pointer, type_info) pair taking care of necessary type lookup for a - // polymorphic type (using RTTI by default, but can be overridden by specializing - // polymorphic_type_hook). If the instance isn't derived, returns the base version. - static std::pair src_and_type(const itype *src) { - auto &cast_type = typeid(itype); - const std::type_info *instance_type = nullptr; - const void *vsrc = polymorphic_type_hook::get(src, instance_type); - if (instance_type && !same_type(cast_type, *instance_type)) { - // This is a base pointer to a derived type. If the derived type is registered - // with pybind11, we want to make the full derived object available. - // In the typical case where itype is polymorphic, we get the correct - // derived pointer (which may be != base pointer) by a dynamic_cast to - // most derived type. If itype is not polymorphic, we won't get here - // except via a user-provided specialization of polymorphic_type_hook, - // and the user has promised that no this-pointer adjustment is - // required in that case, so it's OK to use static_cast. - if (const auto *tpi = get_type_info(*instance_type)) - return {vsrc, tpi}; - } - // Otherwise we have either a nullptr, an `itype` pointer, or an unknown derived pointer, so - // don't do a cast - return type_caster_generic::src_and_type(src, cast_type, instance_type); - } - - static handle cast(const itype *src, return_value_policy policy, handle parent) { - auto st = src_and_type(src); - return type_caster_generic::cast( - st.first, policy, parent, st.second, - make_copy_constructor(src), make_move_constructor(src)); - } - - static handle cast_holder(const itype *src, const void *holder) { - auto st = src_and_type(src); - return type_caster_generic::cast( - st.first, return_value_policy::take_ownership, {}, st.second, - nullptr, nullptr, holder); - } - - template using cast_op_type = detail::cast_op_type; - - operator itype*() { return (type *) value; } - operator itype&() { if (!value) throw reference_cast_error(); return *((itype *) value); } - -protected: - using Constructor = void *(*)(const void *); - - /* Only enabled when the types are {copy,move}-constructible *and* when the type - does not have a private operator new implementation. */ - template ::value>> - static auto make_copy_constructor(const T *x) -> decltype(new T(*x), Constructor{}) { - return [](const void *arg) -> void * { - return new T(*reinterpret_cast(arg)); - }; - } - - template ::value>> - static auto make_move_constructor(const T *x) -> decltype(new T(std::move(*const_cast(x))), Constructor{}) { - return [](const void *arg) -> void * { - return new T(std::move(*const_cast(reinterpret_cast(arg)))); - }; - } - - static Constructor make_copy_constructor(...) { return nullptr; } - static Constructor make_move_constructor(...) { return nullptr; } -}; - -template class type_caster : public type_caster_base { }; -template using make_caster = type_caster>; +template +class type_caster : public type_caster_base {}; +template +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) { - return caster.operator typename make_caster::template cast_op_type(); +template +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> +template +typename make_caster::template cast_op_type::type> cast_op(make_caster &&caster) { - return std::move(caster).operator - typename make_caster::template cast_op_type::type>(); + 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> { +template +class type_caster> { private: using caster_t = make_caster; caster_t subcaster; - using subcaster_cast_op_type = typename caster_t::template cast_op_type; - static_assert(std::is_same::type &, subcaster_cast_op_type>::value, - "std::reference_wrapper caster requires T to have a caster with an `T &` operator"); + 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) { + 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) + 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; - operator std::reference_wrapper() { return subcaster.operator subcaster_cast_op_type&(); } + 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: \ - type value; \ - public: \ - static constexpr auto name = py_name; \ - template >::value, int> = 0> \ - static handle cast(T_ *src, return_value_policy policy, handle parent) { \ - if (!src) return none().release(); \ - if (policy == return_value_policy::take_ownership) { \ - auto h = cast(std::move(*src), policy, parent); delete src; return h; \ - } else { \ - return cast(*src, policy, parent); \ - } \ - } \ - operator type*() { return &value; } \ - operator type&() { return value; } \ - operator type&&() && { return std::move(value); } \ - template using cast_op_type = pybind11::detail::movable_cast_op_type - - -template using is_std_char_type = any_of< - std::is_same, /* std::string */ +#define PYBIND11_TYPE_CASTER(type, py_name) \ +protected: \ + type value; \ + \ +public: \ + static constexpr auto name = py_name; \ + template >::value, \ + int> \ + = 0> \ + static ::pybind11::handle cast( \ + T_ *src, ::pybind11::return_value_policy policy, ::pybind11::handle parent) { \ + if (!src) \ + return ::pybind11::none().release(); \ + if (policy == ::pybind11::return_value_policy::take_ownership) { \ + auto h = cast(std::move(*src), policy, parent); \ + delete src; \ + return h; \ + } \ + return cast(*src, policy, parent); \ + } \ + operator type *() { return &value; } /* NOLINT(bugprone-macro-parentheses) */ \ + operator type &() { return value; } /* NOLINT(bugprone-macro-parentheses) */ \ + operator type &&() && { return std::move(value); } /* NOLINT(bugprone-macro-parentheses) */ \ + template \ + using cast_op_type = ::pybind11::detail::movable_cast_op_type + +template +using is_std_char_type = any_of, /* 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_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: +public: bool load(handle src, bool convert) { py_type py_value; - if (!src) + if (!src) { return false; + } + +#if !defined(PYPY_VERSION) + 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__"); }; +#endif if (std::is_floating_point::value) { - if (convert || PyFloat_Check(src.ptr())) + if (convert || PyFloat_Check(src.ptr())) { py_value = (py_type) PyFloat_AsDouble(src.ptr()); - else + } else { return false; - } else if (PyFloat_Check(src.ptr())) { + } + } else if (PyFloat_Check(src.ptr()) + || (!convert && !PYBIND11_LONG_CHECK(src.ptr()) && !index_check(src.ptr()))) { return false; - } else if (std::is_unsigned::value) { - py_value = as_unsigned(src.ptr()); - } else { // signed integer: - py_value = sizeof(T) <= sizeof(long) - ? (py_type) PyLong_AsLong(src.ptr()) - : (py_type) PYBIND11_LONG_AS_LONGLONG(src.ptr()); + } 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; + } + } +#endif + 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 @@ -1040,19 +185,14 @@ struct type_caster::value && !is_std_char_t // 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)) { - bool type_error = py_err && PyErr_ExceptionMatches( -#if PY_VERSION_HEX < 0x03000000 && !defined(PYPY_VERSION) - PyExc_SystemError -#else - PyExc_TypeError -#endif - ); + if (py_err + || (std::is_integral::value && sizeof(py_type) != sizeof(T) + && py_value != (py_type) (T) py_value)) { PyErr_Clear(); - if (type_error && convert && PyNumber_Check(src.ptr())) { + 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())); + ? PyNumber_Float(src.ptr()) + : PyNumber_Long(src.ptr())); PyErr_Clear(); return load(tmp, false); } @@ -1063,62 +203,75 @@ struct type_caster::value && !is_std_char_t return true; } - template + 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 + 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::value && std::is_unsigned::value && (sizeof(U) <= sizeof(unsigned long)), handle>::type + 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::value && std::is_signed::value && (sizeof(U) > sizeof(long)), handle>::type + 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::value && std::is_unsigned::value && (sizeof(U) > sizeof(unsigned long)), handle>::type + 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); } - PYBIND11_TYPE_CASTER(T, _::value>("int", "float")); + PYBIND11_TYPE_CASTER(T, const_name::value>("int", "float")); }; -template struct void_caster { +template +struct void_caster { public: bool load(handle src, bool) { - if (src && src.is_none()) + if (src && src.is_none()) { return true; + } return false; } static handle cast(T, return_value_policy /* policy */, handle /* parent */) { - return none().inc_ref(); + return none().release(); } - PYBIND11_TYPE_CASTER(T, _("None")); + PYBIND11_TYPE_CASTER(T, const_name("None")); }; -template <> class type_caster : public void_caster {}; +template <> +class type_caster : public void_caster {}; -template <> class type_caster : public type_caster { +template <> +class type_caster : public type_caster { public: using type_caster::cast; bool load(handle h, bool) { if (!h) { return false; - } else if (h.is_none()) { + } + if (h.is_none()) { value = nullptr; return true; } @@ -1130,7 +283,7 @@ template <> class type_caster : public type_caster { } /* Check if this is a C++ type */ - auto &bases = all_type_info((PyTypeObject *) type::handle_of(h).ptr()); + 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; @@ -1141,191 +294,257 @@ template <> class type_caster : public type_caster { } static handle cast(const void *ptr, return_value_policy /* policy */, handle /* parent */) { - if (ptr) + if (ptr) { return capsule(ptr).release(); - else - return none().inc_ref(); + } + return none().release(); } - template using cast_op_type = void*&; - operator void *&() { return value; } - static constexpr auto name = _("capsule"); + template + using cast_op_type = void *&; + explicit operator void *&() { return value; } + static constexpr auto name = const_name("capsule"); + private: void *value = nullptr; }; -template <> class type_caster : public void_caster { }; +template <> +class type_caster : public void_caster {}; -template <> class type_caster { +template <> +class type_caster { public: bool load(handle src, bool convert) { - if (!src) return false; - else if (src.ptr() == Py_True) { value = true; return true; } - else if (src.ptr() == Py_False) { value = false; return true; } - else if (convert || !strcmp("numpy.bool_", Py_TYPE(src.ptr())->tp_name)) { - // (allow non-implicit conversion for numpy booleans) + 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. Py_ssize_t res = -1; if (src.is_none()) { - res = 0; // None is implicitly converted to False + res = 0; // None is implicitly converted to False } - #if defined(PYPY_VERSION) - // On PyPy, check that "__bool__" (or "__nonzero__" on Python 2.7) attr exists +#if defined(PYPY_VERSION) + // On PyPy, check that "__bool__" attr exists else if (hasattr(src, PYBIND11_BOOL_ATTR)) { res = PyObject_IsTrue(src.ptr()); } - #else +#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) { + 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 +#endif if (res == 0 || res == 1) { - value = (bool) res; + value = (res != 0); return true; - } else { - 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, _("bool")); + 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 { +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"); + 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"); + 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"); + "Unsupported wchar_t size != 2/4"); static constexpr size_t UTF_N = 8 * sizeof(CharT); bool load(handle src, bool) { -#if PY_MAJOR_VERSION < 3 - object temp; -#endif handle load_src = src; if (!src) { return false; - } else if (!PyUnicode_Check(load_src.ptr())) { -#if PY_MAJOR_VERSION >= 3 - return load_bytes(load_src); -#else - if (std::is_same::value) { - return load_bytes(load_src); - } + } + if (!PyUnicode_Check(load_src.ptr())) { + return load_raw(load_src); + } - // The below is a guaranteed failure in Python 3 when PyUnicode_Check returns false - if (!PYBIND11_BYTES_CHECK(load_src.ptr())) + // 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; - - temp = reinterpret_steal(PyUnicode_FromObject(load_src.ptr())); - if (!temp) { PyErr_Clear(); return false; } - load_src = temp; -#endif + } + value = StringType(buffer, static_cast(size)); + return true; } - object 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; } + 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())); + const auto *buffer + = reinterpret_cast(PYBIND11_BYTES_AS_STRING(utfNbytes.ptr())); size_t length = (size_t) PYBIND11_BYTES_SIZE(utfNbytes.ptr()) / sizeof(CharT); - if (UTF_N > 8) { buffer++; length--; } // Skip BOM for UTF-16/32 + // 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) + if (IsView) { loader_life_support::add_patient(utfNbytes); + } return true; } - static handle cast(const StringType &src, return_value_policy /* policy */, handle /* parent */) { + 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(); + if (!s) { + throw error_already_set(); + } return s; } - PYBIND11_TYPE_CASTER(StringType, _(PYBIND11_STRING_NAME)); + PYBIND11_TYPE_CASTER(StringType, const_name(PYBIND11_STRING_NAME)); 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 object as-is (i.e. + // 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_bytes(enable_if_t::value, handle> src) { + bool load_raw(enable_if_t::value, handle> src) { if (PYBIND11_BYTES_CHECK(src.ptr())) { - // We were passed a Python 3 raw bytes; accept it into a std::string or char* + // 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) { - value = StringType(bytes, (size_t) PYBIND11_BYTES_SIZE(src.ptr())); - return true; + if (!bytes) { + pybind11_fail("Unexpected PYBIND11_BYTES_AS_STRING() failure."); + } + 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."); } + value = StringType(bytearray, (size_t) PyByteArray_Size(src.ptr())); + return true; } return false; } template - bool load_bytes(enable_if_t::value, handle>) { return false; } + bool load_raw(enable_if_t::value, handle>) { + return false; + } }; template -struct type_caster, enable_if_t::value>> +struct type_caster, + enable_if_t::value>> : string_caster> {}; #ifdef PYBIND11_HAS_STRING_VIEW template -struct type_caster, enable_if_t::value>> +struct type_caster, + 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>> { +template +struct type_caster::value>> { using StringType = std::basic_string; - using StringCaster = type_caster; + 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) { + return false; + } if (src.is_none()) { // Defer accepting None to other overloads (if we aren't in convert mode): - if (!convert) return false; + if (!convert) { + return false; + } none = true; return true; } @@ -1333,45 +552,58 @@ template struct type_caster::value) { handle s = PyUnicode_DecodeLatin1((const char *) &src, 1, nullptr); - if (!s) throw error_already_set(); + if (!s) { + throw error_already_set(); + } return s; } return StringCaster::cast(StringType(1, src), policy, parent); } - operator CharT*() { return none ? nullptr : const_cast(static_cast(str_caster).c_str()); } - operator CharT&() { - if (none) + 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) + 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. + // 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]); - size_t char0_bytes = !(v0 & 0x80) ? 1 : // low bits only: 0-127 - (v0 & 0xE0) == 0xC0 ? 2 : // 0b110xxxxx - start of 2-byte sequence - (v0 & 0xF0) == 0xE0 ? 3 : // 0b1110xxxx - start of 3-byte sequence - 4; // 0b11110xxx - start of 4-byte sequence + // 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)); + 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 @@ -1384,34 +616,40 @@ template struct type_caster(value[0]); - if (one_char >= 0xD800 && one_char < 0xE000) + if (one_char >= 0xD800 && one_char < 0xE000) { throw value_error("Character code point not in range(0x10000)"); + } } - if (str_len != 1) + 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 = _(PYBIND11_STRING_NAME); - template using cast_op_type = pybind11::detail::cast_op_type<_T>; + 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 class Tuple, typename... Ts> class tuple_caster { +template