diff --git a/examples/platforms/cc1352/Makefile.am b/examples/platforms/cc1352/Makefile.am index f787eb594..435e83a78 100644 --- a/examples/platforms/cc1352/Makefile.am +++ b/examples/platforms/cc1352/Makefile.am @@ -47,11 +47,14 @@ libopenthread_cc1352_a_CPPFLAGS PLATFORM_SOURCES = \ alarm.c \ + cc1352_radio.h \ diag.c \ entropy.c \ flash.c \ logging.c \ misc.c \ + openthread-core-cc1352-config.h \ + platform-cc1352.h \ radio.c \ system.c \ uart.c \ @@ -69,13 +72,8 @@ libopenthread_cc1352_a_DEPENDENCIES $(top_srcdir)/third_party/ti/devices/cc13x2_cc26x2/driverlib/bin/gcc/driverlib.a \ $(NULL) -noinst_HEADERS = \ - platform-cc1352.h \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ - $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/examples/platforms/cc1352/cc1352_radio.h b/examples/platforms/cc1352/cc1352_radio.h index 1ffd8eee4..53f18a62f 100644 --- a/examples/platforms/cc1352/cc1352_radio.h +++ b/examples/platforms/cc1352/cc1352_radio.h @@ -33,33 +33,33 @@ enum { - IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType - IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK - IEEE802154_ACK_REQUEST = (1<<5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR - IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber - IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE - IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE - IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs - IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries - IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants - IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants + IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType + IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK + IEEE802154_ACK_REQUEST = (1 << 5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR + IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber + IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE + IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE + IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs + IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries + IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants + IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants IEEE802154_PHY_SHR_DURATION = 10, ///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY - IEEE802154_PHY_SYMBOLS_PER_OCTET = 2, + IEEE802154_PHY_SYMBOLS_PER_OCTET = 2, ///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY - IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD + - IEEE802154_A_TURNAROUND_TIME + - IEEE802154_PHY_SHR_DURATION + - ( 6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)), + IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD + // + IEEE802154_A_TURNAROUND_TIME + // + IEEE802154_PHY_SHR_DURATION + // + (6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)), // ///< (IEEE 802.15.4-2006 7.4.2) macAckWaitDuration PIB attribute - IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate + IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate }; enum { - CC1352_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock - CC1352_INVALID_RSSI = 127, - CC1352_UNKNOWN_EUI64 = 0xFF, + CC1352_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock + CC1352_INVALID_RSSI = 127, + CC1352_UNKNOWN_EUI64 = 0xFF, ///< If the EUI64 read from the ccfg is all ones then the customer did not set the address }; @@ -75,30 +75,29 @@ typedef struct output_config /** * * TX Power dBm lookup table from SmartRF Studio 7 2.10.0#94 */ -static const output_config_t rgOutputPower[] = -{ - { 5, 0x941E}, - { 4, 0x6c16}, - { 3, 0x5411}, - { 2, 0x440d}, - { 1, 0x385c}, - { 0, 0x3459}, - { -3, 0x2851}, - { -5, 0x224e}, - { -6, 0x204d}, - { -9, 0x0a8d}, - { -10, 0x168c}, - { -12, 0x108a}, - { -15, 0xc88c}, - { -18, 0x06c9}, - { -21, 0x06c7}, +static const output_config_t rgOutputPower[] = { + {5, 0x941E}, // + {4, 0x6c16}, // + {3, 0x5411}, // + {2, 0x440d}, // + {1, 0x385c}, // + {0, 0x3459}, // + {-3, 0x2851}, // + {-5, 0x224e}, // + {-6, 0x204d}, // + {-9, 0x0a8d}, // + {-10, 0x168c}, // + {-12, 0x108a}, // + {-15, 0xc88c}, // + {-18, 0x06c9}, // + {-21, 0x06c7}, // }; #define OUTPUT_CONFIG_COUNT (sizeof(rgOutputPower) / sizeof(rgOutputPower[0])) /* Max and Min Output Power in dBm */ -#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm) -#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm) +#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm) +#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm) #define OUTPUT_POWER_UNKNOWN 0xFFFF /** @@ -131,8 +130,8 @@ typedef struct __attribute__((aligned(4))) ext_src_match_data */ typedef struct __attribute__((aligned(4))) short_src_match_data { - uint32_t srcMatchEn[((CC1352_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; - uint32_t srcPendEn[((CC1352_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; + uint32_t srcMatchEn[((CC1352_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; + uint32_t srcPendEn[((CC1352_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; rfc_shortAddrEntry_t extAddrEnt[CC1352_SHORTADD_SRC_MATCH_NUM]; } short_src_match_data_t; diff --git a/examples/platforms/cc1352/openthread-core-cc1352-config.h b/examples/platforms/cc1352/openthread-core-cc1352-config.h index 13c87dece..9d62d3234 100644 --- a/examples/platforms/cc1352/openthread-core-cc1352-config.h +++ b/examples/platforms/cc1352/openthread-core-cc1352-config.h @@ -35,14 +35,14 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC1352" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC1352" /** * @def SETTINGS_CONFIG_BASE_ADDRESS * * The base address of the pages to be used for non-volatile-settings storage. */ -#define SETTINGS_CONFIG_BASE_ADDRESS (0x52000) +#define SETTINGS_CONFIG_BASE_ADDRESS (0x52000) /** * @def SETTINGS_CONFIG_PAGE_SIZE @@ -51,14 +51,13 @@ * * @note *MUST BE* 8K. */ -#define SETTINGS_CONFIG_PAGE_SIZE (0x2000) +#define SETTINGS_CONFIG_PAGE_SIZE (0x2000) /** * @def SETTINGS_CONFIG_PAGE_NUM * * The number of flash pages to use for non-volatile settings storage. */ -#define SETTINGS_CONFIG_PAGE_NUM (2) +#define SETTINGS_CONFIG_PAGE_NUM (2) #endif /* OPENTHREAD_CORE_CC1352_CONFIG_H_ */ - diff --git a/examples/platforms/cc2538/Makefile.am b/examples/platforms/cc2538/Makefile.am index d29bc6f09..8f95f2d2d 100644 --- a/examples/platforms/cc2538/Makefile.am +++ b/examples/platforms/cc2538/Makefile.am @@ -38,11 +38,15 @@ libopenthread_cc2538_a_CPPFLAGS = \ PLATFORM_SOURCES = \ alarm.c \ + cc2538-reg.h \ diag.c \ entropy.c \ flash.c \ misc.c \ + openthread-core-cc2538-config.h \ + platform-cc2538.h \ radio.c \ + rom-utility.h \ startup-gcc.c \ system.c \ logging.c \ @@ -53,15 +57,8 @@ libopenthread_cc2538_a_SOURCES = \ $(PLATFORM_SOURCES) \ $(NULL) -noinst_HEADERS = \ - cc2538-reg.h \ - platform-cc2538.h \ - rom-utility.h \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ - $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/examples/platforms/cc2538/openthread-core-cc2538-config.h b/examples/platforms/cc2538/openthread-core-cc2538-config.h index 5a468261b..f866288b8 100644 --- a/examples/platforms/cc2538/openthread-core-cc2538-config.h +++ b/examples/platforms/cc2538/openthread-core-cc2538-config.h @@ -40,7 +40,7 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC2538" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC2538" /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT @@ -48,7 +48,7 @@ * Define to 1 if you want to enable software ACK timeout logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT 1 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT @@ -56,7 +56,7 @@ * Define to 1 if you want to enable software retransmission logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF @@ -64,7 +64,7 @@ * Define to 1 if you want to enable software CSMA-CA backoff logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 1 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN @@ -72,7 +72,7 @@ * Define to 1 if you want to enable software energy scanning logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN 1 /** * @def SETTINGS_CONFIG_BASE_ADDRESS @@ -82,7 +82,7 @@ * in the linker file. * */ -#define SETTINGS_CONFIG_BASE_ADDRESS 0 +#define SETTINGS_CONFIG_BASE_ADDRESS 0 /** * @def SETTINGS_CONFIG_PAGE_NUM @@ -90,7 +90,7 @@ * The CC2538 linker script sets aside 2 pages. * */ -#define SETTINGS_CONFIG_PAGE_NUM 2 +#define SETTINGS_CONFIG_PAGE_NUM 2 /** * @def SETTINGS_CONFIG_PAGE_SIZE @@ -98,7 +98,7 @@ * The page size of settings, 2K bytes * */ -#define SETTINGS_CONFIG_PAGE_SIZE 2048 +#define SETTINGS_CONFIG_PAGE_SIZE 2048 /** * @def OPENTHREAD_CONFIG_CC2538_WITH_CC2592 @@ -115,7 +115,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2538_WITH_CC2592 -#define OPENTHREAD_CONFIG_CC2538_WITH_CC2592 0 +#define OPENTHREAD_CONFIG_CC2538_WITH_CC2592 0 #endif /** @@ -132,7 +132,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2592_PA_EN_PIN -#define OPENTHREAD_CONFIG_CC2592_PA_EN_PIN 3 +#define OPENTHREAD_CONFIG_CC2592_PA_EN_PIN 3 #endif /** @@ -149,7 +149,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN -#define OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN 2 +#define OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN 2 #endif /** @@ -166,7 +166,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2592_USE_HGM -#define OPENTHREAD_CONFIG_CC2592_USE_HGM 1 +#define OPENTHREAD_CONFIG_CC2592_USE_HGM 1 #endif /** @@ -181,7 +181,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY -#define OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY -88 +#define OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY -88 #endif /** @@ -197,7 +197,7 @@ * this calibrates the RSSI value accordingly. */ #ifndef OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET -#define OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET 73 +#define OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET 73 #endif /** @@ -210,7 +210,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2592_HGM_PORT -#define OPENTHREAD_CONFIG_CC2592_HGM_PORT GPIO_D_BASE +#define OPENTHREAD_CONFIG_CC2592_HGM_PORT GPIO_D_BASE #endif /** @@ -223,7 +223,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2592_HGM_PIN -#define OPENTHREAD_CONFIG_CC2592_HGM_PIN 2 +#define OPENTHREAD_CONFIG_CC2592_HGM_PIN 2 #endif /** @@ -235,7 +235,7 @@ * */ #ifndef OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE -#define OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE true +#define OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE true #endif -#endif // OPENTHREAD_CORE_CC2538_CONFIG_H_ +#endif // OPENTHREAD_CORE_CC2538_CONFIG_H_ diff --git a/examples/platforms/cc2650/Makefile.am b/examples/platforms/cc2650/Makefile.am index 4311968f4..bf90901c6 100644 --- a/examples/platforms/cc2650/Makefile.am +++ b/examples/platforms/cc2650/Makefile.am @@ -47,11 +47,14 @@ libopenthread_cc2650_a_CPPFLAGS = \ PLATFORM_SOURCES = \ alarm.c \ + cc2650_radio.h \ diag.c \ entropy.c \ flash.c \ misc.c \ logging.c \ + openthread-core-cc2650-config.h \ + platform-cc2650.h \ radio.c \ system.c \ uart.c \ @@ -70,13 +73,8 @@ libopenthread_cc2650_a_DEPENDENCIES = \ $(top_srcdir)/third_party/ti/devices/cc26x0/driverlib/bin/gcc/driverlib.a \ $(NULL) -noinst_HEADERS = \ - platform-cc2650.h \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ - $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/examples/platforms/cc2650/cc2650_radio.h b/examples/platforms/cc2650/cc2650_radio.h index fd8d69f29..8a8749ee9 100644 --- a/examples/platforms/cc2650/cc2650_radio.h +++ b/examples/platforms/cc2650/cc2650_radio.h @@ -33,33 +33,33 @@ enum { - IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType - IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK - IEEE802154_ACK_REQUEST = (1<<5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR - IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber - IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE - IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE - IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs - IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries - IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants - IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants + IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType + IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK + IEEE802154_ACK_REQUEST = (1 << 5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR + IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber + IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE + IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE + IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs + IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries + IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants + IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants IEEE802154_PHY_SHR_DURATION = 10, ///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY - IEEE802154_PHY_SYMBOLS_PER_OCTET = 2, + IEEE802154_PHY_SYMBOLS_PER_OCTET = 2, ///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY - IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD + - IEEE802154_A_TURNAROUND_TIME + - IEEE802154_PHY_SHR_DURATION + - ( 6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)), + IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD + // + IEEE802154_A_TURNAROUND_TIME + // + IEEE802154_PHY_SHR_DURATION + // + (6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)), ///< (IEEE 802.15.4-2006 7.4.2) macAckWaitDuration PIB attribute - IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate + IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate }; enum { - CC2650_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock - CC2650_INVALID_RSSI = 127, - CC2650_UNKNOWN_EUI64 = 0xFF, + CC2650_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock + CC2650_INVALID_RSSI = 127, + CC2650_UNKNOWN_EUI64 = 0xFF, ///< If the EUI64 read from the ccfg is all ones then the customer did not set the address }; @@ -72,28 +72,27 @@ typedef struct output_config uint16_t value; } output_config_t; -static const output_config_t rgOutputPower[] = -{ - { 5, 0x9330}, - { 4, 0x9324}, - { 3, 0x5a1c}, - { 2, 0x4e18}, - { 1, 0x4214}, - { 0, 0x3161}, - { -3, 0x2558}, - { -6, 0x1d52}, - { -9, 0x194e}, - { -12, 0x144b}, - { -15, 0x0ccb}, - { -18, 0x0cc9}, - { -21, 0x0cc7}, +static const output_config_t rgOutputPower[] = { + {5, 0x9330}, // + {4, 0x9324}, // + {3, 0x5a1c}, // + {2, 0x4e18}, // + {1, 0x4214}, // + {0, 0x3161}, // + {-3, 0x2558}, // + {-6, 0x1d52}, // + {-9, 0x194e}, // + {-12, 0x144b}, // + {-15, 0x0ccb}, // + {-18, 0x0cc9}, // + {-21, 0x0cc7}, // }; #define OUTPUT_CONFIG_COUNT (sizeof(rgOutputPower) / sizeof(rgOutputPower[0])) /* Max and Min Output Power in dBm */ -#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm) -#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm) +#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm) +#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm) #define OUTPUT_POWER_UNKNOWN 0xFFFF /** @@ -126,8 +125,8 @@ typedef struct __attribute__((aligned(4))) ext_src_match_data */ typedef struct __attribute__((aligned(4))) short_src_match_data { - uint32_t srcMatchEn[((CC2650_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; - uint32_t srcPendEn[((CC2650_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; + uint32_t srcMatchEn[((CC2650_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; + uint32_t srcPendEn[((CC2650_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; rfc_shortAddrEntry_t extAddrEnt[CC2650_SHORTADD_SRC_MATCH_NUM]; } short_src_match_data_t; diff --git a/examples/platforms/cc2650/openthread-core-cc2650-config.h b/examples/platforms/cc2650/openthread-core-cc2650-config.h index deb424a8a..7c365bacd 100644 --- a/examples/platforms/cc2650/openthread-core-cc2650-config.h +++ b/examples/platforms/cc2650/openthread-core-cc2650-config.h @@ -45,4 +45,3 @@ #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 32 #endif /* OPENTHREAD_CORE_CC2650_CONFIG_H_ */ - diff --git a/examples/platforms/cc2652/Makefile.am b/examples/platforms/cc2652/Makefile.am index a46ffa019..8d8b36ab1 100644 --- a/examples/platforms/cc2652/Makefile.am +++ b/examples/platforms/cc2652/Makefile.am @@ -47,11 +47,14 @@ libopenthread_cc2652_a_CPPFLAGS PLATFORM_SOURCES = \ alarm.c \ + cc2652_radio.h \ diag.c \ entropy.c \ flash.c \ logging.c \ misc.c \ + openthread-core-cc2652-config.h \ + platform-cc2652.h \ radio.c \ system.c \ uart.c \ @@ -69,13 +72,8 @@ libopenthread_cc2652_a_DEPENDENCIES $(top_srcdir)/third_party/ti/devices/cc13x2_cc26x2/driverlib/bin/gcc/driverlib.a \ $(NULL) -noinst_HEADERS = \ - platform-cc2652.h \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ - $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/examples/platforms/cc2652/cc2652_radio.h b/examples/platforms/cc2652/cc2652_radio.h index 07cfa4dfa..eac3c3560 100644 --- a/examples/platforms/cc2652/cc2652_radio.h +++ b/examples/platforms/cc2652/cc2652_radio.h @@ -33,33 +33,33 @@ enum { - IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType - IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK - IEEE802154_ACK_REQUEST = (1<<5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR - IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber - IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE - IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE - IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs - IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries - IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants - IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants + IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType + IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK + IEEE802154_ACK_REQUEST = (1 << 5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR + IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber + IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE + IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE + IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs + IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries + IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants + IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants IEEE802154_PHY_SHR_DURATION = 10, ///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY - IEEE802154_PHY_SYMBOLS_PER_OCTET = 2, + IEEE802154_PHY_SYMBOLS_PER_OCTET = 2, ///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY - IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD + - IEEE802154_A_TURNAROUND_TIME + - IEEE802154_PHY_SHR_DURATION + - ( 6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)), + IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD + // + IEEE802154_A_TURNAROUND_TIME + // + IEEE802154_PHY_SHR_DURATION + // + (6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)), // ///< (IEEE 802.15.4-2006 7.4.2) macAckWaitDuration PIB attribute - IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate + IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate }; enum { - CC2652_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock - CC2652_INVALID_RSSI = 127, - CC2652_UNKNOWN_EUI64 = 0xFF, + CC2652_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock + CC2652_INVALID_RSSI = 127, + CC2652_UNKNOWN_EUI64 = 0xFF, ///< If the EUI64 read from the ccfg is all ones then the customer did not set the address }; @@ -75,30 +75,29 @@ typedef struct output_config /** * TX Power dBm lookup table from SmartRF Studio 7 2.10.0#94 */ -static const output_config_t rgOutputPower[] = -{ - { 5, 0x941e}, - { 4, 0x6c16}, - { 3, 0x5411}, - { 2, 0x440d}, - { 1, 0x385c}, - { 0, 0x3459}, - { -3, 0x2851}, - { -5, 0x224e}, - { -6, 0x204d}, - { -9, 0x0a8d}, - { -10, 0x168c}, - { -12, 0x10a8}, - { -15, 0xc88c}, - { -18, 0x06c9}, - { -21, 0x06c7}, +static const output_config_t rgOutputPower[] = { + {5, 0x941e}, // + {4, 0x6c16}, // + {3, 0x5411}, // + {2, 0x440d}, // + {1, 0x385c}, // + {0, 0x3459}, // + {-3, 0x2851}, // + {-5, 0x224e}, // + {-6, 0x204d}, // + {-9, 0x0a8d}, // + {-10, 0x168c}, // + {-12, 0x10a8}, // + {-15, 0xc88c}, // + {-18, 0x06c9}, // + {-21, 0x06c7}, // }; #define OUTPUT_CONFIG_COUNT (sizeof(rgOutputPower) / sizeof(rgOutputPower[0])) /* Max and Min Output Power in dBm */ -#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm) -#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm) +#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm) +#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm) #define OUTPUT_POWER_UNKNOWN 0xFFFF /** @@ -131,8 +130,8 @@ typedef struct __attribute__((aligned(4))) ext_src_match_data */ typedef struct __attribute__((aligned(4))) short_src_match_data { - uint32_t srcMatchEn[((CC2652_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; - uint32_t srcPendEn[((CC2652_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; + uint32_t srcMatchEn[((CC2652_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; + uint32_t srcPendEn[((CC2652_SHORTADD_SRC_MATCH_NUM + 31) / 32)]; rfc_shortAddrEntry_t extAddrEnt[CC2652_SHORTADD_SRC_MATCH_NUM]; } short_src_match_data_t; diff --git a/examples/platforms/cc2652/openthread-core-cc2652-config.h b/examples/platforms/cc2652/openthread-core-cc2652-config.h index c75f70384..8a931d77c 100644 --- a/examples/platforms/cc2652/openthread-core-cc2652-config.h +++ b/examples/platforms/cc2652/openthread-core-cc2652-config.h @@ -35,14 +35,14 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC2652" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC2652" /** * @def SETTINGS_CONFIG_BASE_ADDRESS * * The base address of the pages to be used for non-volatile-settings storage. */ -#define SETTINGS_CONFIG_BASE_ADDRESS (0x52000) +#define SETTINGS_CONFIG_BASE_ADDRESS (0x52000) /** * @def SETTINGS_CONFIG_PAGE_SIZE @@ -51,14 +51,13 @@ * * @note *MUST BE* 8K. */ -#define SETTINGS_CONFIG_PAGE_SIZE (0x2000) +#define SETTINGS_CONFIG_PAGE_SIZE (0x2000) /** * @def SETTINGS_CONFIG_PAGE_NUM * * The number of flash pages to use for non-volatile settings storage. */ -#define SETTINGS_CONFIG_PAGE_NUM (2) +#define SETTINGS_CONFIG_PAGE_NUM (2) #endif /* OPENTHREAD_CORE_CC2650_CONFIG_H_ */ - diff --git a/examples/platforms/efr32/Makefile.am b/examples/platforms/efr32/Makefile.am index b28394aaa..3c3039614 100644 --- a/examples/platforms/efr32/Makefile.am +++ b/examples/platforms/efr32/Makefile.am @@ -97,7 +97,11 @@ PLATFORM_SOURCES = flash.c \ logging.c \ misc.c \ + openthread-core-efr32-config.h \ + platform-efr32.h \ + platform-band.h \ radio.c \ + rail_config.h \ startup-gcc.c \ system.c \ uart.c \ @@ -138,18 +142,12 @@ nodist_libopenthread_efr32_a_SOURCES @top_builddir@/third_party/silabs/gecko_sdk_suite/v2.5/util/third_party/mbedtls/sl_crypto/src/crypto_management.c \ $(NULL) -noinst_HEADERS = \ - platform-efr32.h \ - platform-band.h \ - $(NULL) - libopenthread_efr32_a_SOURCES = \ $(PLATFORM_SOURCES) \ $(NULL) PRETTY_FILES = \ $(PLATFORM_SOURCES) \ - $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/examples/platforms/efr32/openthread-core-efr32-config.h b/examples/platforms/efr32/openthread-core-efr32-config.h index c58ccbe1d..f790bb005 100644 --- a/examples/platforms/efr32/openthread-core-efr32-config.h +++ b/examples/platforms/efr32/openthread-core-efr32-config.h @@ -44,7 +44,7 @@ * The efr32 platform provides an otPlatLog() function. */ #ifndef OPENTHREAD_CONFIG_LOG_OUTPUT /* allow command line override */ -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED +#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED #endif /* @@ -54,9 +54,9 @@ * */ #ifdef RADIO_CONFIG_915MHZ_OQPSK_SUPPORT -#define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 1 +#define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 1 #else -#define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 0 +#define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 0 #endif /* @@ -66,9 +66,9 @@ * */ #ifdef RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT -#define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1 +#define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1 #else -#define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 0 +#define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 0 #endif /** @@ -77,7 +77,7 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "EFR32" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "EFR32" /* * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT @@ -85,7 +85,7 @@ * Define to 1 if you want to enable software retransmission logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF @@ -93,7 +93,7 @@ * Define to 1 if you want to enable software CSMA-CA backoff logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 1 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN @@ -101,7 +101,7 @@ * Define to 1 if you want to enable software energy scanning logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN 1 /** * @def SETTINGS_CONFIG_BASE_ADDRESS @@ -109,7 +109,7 @@ * The base address of settings. * */ -#define SETTINGS_CONFIG_BASE_ADDRESS 0 +#define SETTINGS_CONFIG_BASE_ADDRESS 0 /** * @def SETTINGS_CONFIG_PAGE_SIZE @@ -117,7 +117,7 @@ * The page size of settings. * */ -#define SETTINGS_CONFIG_PAGE_SIZE FLASH_PAGE_SIZE +#define SETTINGS_CONFIG_PAGE_SIZE FLASH_PAGE_SIZE /** * @def SETTINGS_CONFIG_PAGE_NUM @@ -125,7 +125,7 @@ * The page number of settings. * */ -#define SETTINGS_CONFIG_PAGE_NUM 4 +#define SETTINGS_CONFIG_PAGE_NUM 4 /** * @def RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM @@ -133,7 +133,7 @@ * The number of short source address table entries. * */ -#define RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM 6 +#define RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM 6 /** * @def RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM @@ -141,6 +141,6 @@ * The number of extended source address table entries. * */ -#define RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM 6 +#define RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM 6 -#endif // OPENTHREAD_CORE_EFR32_CONFIG_H_ +#endif // OPENTHREAD_CORE_EFR32_CONFIG_H_ diff --git a/examples/platforms/efr32/rail_config.h b/examples/platforms/efr32/rail_config.h index 0b99e5a30..5a62825a9 100644 --- a/examples/platforms/efr32/rail_config.h +++ b/examples/platforms/efr32/rail_config.h @@ -1,9 +1,9 @@ #ifndef __RAIL_CONFIG_H__ #define __RAIL_CONFIG_H__ -#include -#include "rail_types.h" #include "board_config.h" +#include "rail_types.h" +#include #define RADIO_CONFIG_XTAL_FREQUENCY 38400000UL diff --git a/examples/platforms/emsk/Makefile.am b/examples/platforms/emsk/Makefile.am index ab19afea1..6ffbb53d8 100644 --- a/examples/platforms/emsk/Makefile.am +++ b/examples/platforms/emsk/Makefile.am @@ -71,6 +71,8 @@ PLATFORM_SOURCES flash.c \ logging.c \ misc.c \ + openthread-core-emsk-config.h \ + platform-emsk.h \ radio.c \ system.c \ uart.c \ diff --git a/examples/platforms/emsk/openthread-core-emsk-config.h b/examples/platforms/emsk/openthread-core-emsk-config.h index 1a489dd54..5fa6a325d 100644 --- a/examples/platforms/emsk/openthread-core-emsk-config.h +++ b/examples/platforms/emsk/openthread-core-emsk-config.h @@ -40,7 +40,7 @@ * The emsk platform provides an otPlatLog() function. */ #ifndef OPENTHREAD_CONFIG_LOG_OUTPUT /* allow command line override */ -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED +#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED #endif /** @@ -49,7 +49,7 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "EMSK" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "EMSK" /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT @@ -57,7 +57,7 @@ * Define to 1 if you want to enable software ACK timeout logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT 0 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT 0 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT @@ -65,7 +65,7 @@ * Define to 1 if you want to enable software retransmission logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 0 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 0 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF @@ -73,7 +73,7 @@ * Define to 1 if you want to enable software CSMA-CA backoff logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 0 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 0 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN @@ -81,6 +81,6 @@ * Define to 1 if you want to enable software energy scanning logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN 0 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN 0 -#endif // OPENTHREAD_CORE_EMSK_CONFIG_H_ +#endif // OPENTHREAD_CORE_EMSK_CONFIG_H_ diff --git a/examples/platforms/gp712/Makefile.am b/examples/platforms/gp712/Makefile.am index 07108badd..af7707cf6 100644 --- a/examples/platforms/gp712/Makefile.am +++ b/examples/platforms/gp712/Makefile.am @@ -40,19 +40,22 @@ libopenthread_gp712_a_CPPFLAGS = \ PLATFORM_SOURCES = \ alarm.c \ + alarm_qorvo.h \ diag.c \ entropy.c \ flash.c \ logging.c \ misc.c \ + openthread-core-gp712-config.h \ + platform_qorvo.h \ radio.c \ + radio_qorvo.h \ + random_qorvo.h \ system.c \ uart-posix.c \ + uart_qorvo.h \ $(NULL) -# uart-socket.c \ -# - Dash = - libopenthread_gp712_a_LIBADD = \ $(shell find $(top_builddir)/examples/platforms/utils $(Dash)type f $(Dash)name "*.o") diff --git a/examples/platforms/gp712/alarm_qorvo.h b/examples/platforms/gp712/alarm_qorvo.h index 868bd6ff2..1073d1180 100644 --- a/examples/platforms/gp712/alarm_qorvo.h +++ b/examples/platforms/gp712/alarm_qorvo.h @@ -35,12 +35,12 @@ #ifndef ALARM_QORVO_H_ #define ALARM_QORVO_H_ -#include #include +#include #include #include -typedef void (*qorvoAlarmCallback_t)( void* ); +typedef void (*qorvoAlarmCallback_t)(void *); /** * This function initializes the alarm service used by OpenThread. @@ -78,7 +78,7 @@ uint32_t qorvoAlarmGetTimeMs(void); * @param[in] arg A context pointer which will be passed as an argument to the callback. * */ -void qorvoAlarmScheduleEventArg(uint32_t rel_time, qorvoAlarmCallback_t callback, void* arg); +void qorvoAlarmScheduleEventArg(uint32_t rel_time, qorvoAlarmCallback_t callback, void *arg); /** * This function unschedules the callback. @@ -87,6 +87,6 @@ void qorvoAlarmScheduleEventArg(uint32_t rel_time, qorvoAlarmCallback_t callback * @param[in] arg A context pointer which will be passed as an argument to the callback. * */ -bool qorvoAlarmUnScheduleEventArg(qorvoAlarmCallback_t callback, void* arg); +bool qorvoAlarmUnScheduleEventArg(qorvoAlarmCallback_t callback, void *arg); -#endif // ALARM_QORVO_H_ +#endif // ALARM_QORVO_H_ diff --git a/examples/platforms/gp712/openthread-core-gp712-config.h b/examples/platforms/gp712/openthread-core-gp712-config.h index 73c21fb40..5fd0a9acc 100644 --- a/examples/platforms/gp712/openthread-core-gp712-config.h +++ b/examples/platforms/gp712/openthread-core-gp712-config.h @@ -40,6 +40,6 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "GP712" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "GP712" -#endif // OPENTHREAD_CORE_GP712_CONFIG_H_ +#endif // OPENTHREAD_CORE_GP712_CONFIG_H_ diff --git a/examples/platforms/gp712/platform_qorvo.h b/examples/platforms/gp712/platform_qorvo.h index 7292719d3..b6c7eb32e 100644 --- a/examples/platforms/gp712/platform_qorvo.h +++ b/examples/platforms/gp712/platform_qorvo.h @@ -35,14 +35,14 @@ #ifndef PLATFORM_QORVO_H_ #define PLATFORM_QORVO_H_ -#include #include +#include -#include #include +#include -typedef void (*qorvoPlatPollFunction_t)(uint8_t); -typedef uint8_t (*qorvoPlatGotoSleepCheckCallback_t) (void); +typedef void (*qorvoPlatPollFunction_t)(uint8_t); +typedef uint8_t (*qorvoPlatGotoSleepCheckCallback_t)(void); /** * This function registers a callback to a file descriptor. @@ -77,4 +77,4 @@ void qorvoPlatInit(qorvoPlatGotoSleepCheckCallback_t gotoSleepCheckCallback); */ void qorvoPlatMainLoop(bool canGoToSleep); -#endif // PLATFORM_QORVO_H_ +#endif // PLATFORM_QORVO_H_ diff --git a/examples/platforms/gp712/radio_qorvo.h b/examples/platforms/gp712/radio_qorvo.h index 100af2074..91144ef89 100644 --- a/examples/platforms/gp712/radio_qorvo.h +++ b/examples/platforms/gp712/radio_qorvo.h @@ -200,4 +200,4 @@ void cbQorvoRadioTransmitDone(otRadioFrame *aPacket, bool aFramePending, otError */ void cbQorvoRadioReceiveDone(otRadioFrame *aPacket, otError aError); -#endif // RADIO_QORVO_H_ +#endif // RADIO_QORVO_H_ diff --git a/examples/platforms/gp712/random_qorvo.h b/examples/platforms/gp712/random_qorvo.h index 2bd1453d6..8dd7eef49 100644 --- a/examples/platforms/gp712/random_qorvo.h +++ b/examples/platforms/gp712/random_qorvo.h @@ -52,5 +52,4 @@ void qorvoRandomInit(void); */ void qorvoRandomGet(uint8_t *aOutput, uint8_t aOutputLength); - -#endif // RANDOM_QORVO_H_ +#endif // RANDOM_QORVO_H_ diff --git a/examples/platforms/gp712/uart_qorvo.h b/examples/platforms/gp712/uart_qorvo.h index 7d6c1e388..3e348bd20 100644 --- a/examples/platforms/gp712/uart_qorvo.h +++ b/examples/platforms/gp712/uart_qorvo.h @@ -74,7 +74,7 @@ void cbQorvoUartTxDone(void); * @param[in] aBufLength The number of bytes received from the uart. * */ -void qorvoUartSendInput(uint8_t* aBuf, uint16_t aBufLength); +void qorvoUartSendInput(uint8_t *aBuf, uint16_t aBufLength); /** * Function which transmits data via the uart. @@ -85,4 +85,4 @@ void qorvoUartSendInput(uint8_t* aBuf, uint16_t aBufLength); */ void qorvoUartSendOutput(const uint8_t *aBuf, uint16_t aBufLength); -#endif // UART_QORVO_H_ +#endif // UART_QORVO_H_ diff --git a/examples/platforms/kw41z/Makefile.am b/examples/platforms/kw41z/Makefile.am index 213511f0f..eb4b2546e 100644 --- a/examples/platforms/kw41z/Makefile.am +++ b/examples/platforms/kw41z/Makefile.am @@ -55,6 +55,8 @@ PLATFORM_SOURCES flash.c \ logging.c \ misc.c \ + openthread-core-kw41z-config.h \ + platform-kw41z.h \ radio.c \ system.c \ uart.c \ @@ -92,11 +94,6 @@ libopenthread_kw41z_a_SOURCES $(PLATFORM_SOURCES) \ $(NULL) -noinst_HEADERS = \ - platform-kw41z.h \ - @top_builddir@/third_party/nxp/MKW41Z4/clock_config.h \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ $(NULL) diff --git a/examples/platforms/kw41z/openthread-core-kw41z-config.h b/examples/platforms/kw41z/openthread-core-kw41z-config.h index 195603c5d..1e9fd5180 100644 --- a/examples/platforms/kw41z/openthread-core-kw41z-config.h +++ b/examples/platforms/kw41z/openthread-core-kw41z-config.h @@ -41,7 +41,7 @@ * The emsk platform provides an otPlatLog() function. */ #ifndef OPENTHREAD_CONFIG_LOG_OUTPUT /* allow command line override */ -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED +#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED #endif /** @@ -50,7 +50,7 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "KW41Z" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "KW41Z" /** * @def SETTINGS_CONFIG_BASE_ADDRESS @@ -58,7 +58,7 @@ * The base address of settings. * */ -#define SETTINGS_CONFIG_BASE_ADDRESS 0x40000 +#define SETTINGS_CONFIG_BASE_ADDRESS 0x40000 /** * @def SETTINGS_CONFIG_PAGE_SIZE @@ -66,7 +66,7 @@ * The page size of settings. * */ -#define SETTINGS_CONFIG_PAGE_SIZE 0x800 +#define SETTINGS_CONFIG_PAGE_SIZE 0x800 /** * @def SETTINGS_CONFIG_PAGE_NUM @@ -74,7 +74,7 @@ * The page number of settings. * */ -#define SETTINGS_CONFIG_PAGE_NUM 2 +#define SETTINGS_CONFIG_PAGE_NUM 2 /** * @def RADIO_CONFIG_SRC_MATCH_ENTRY_NUM @@ -82,7 +82,7 @@ * The number of source address table entries. * */ -#define RADIO_CONFIG_SRC_MATCH_ENTRY_NUM 128 +#define RADIO_CONFIG_SRC_MATCH_ENTRY_NUM 128 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT @@ -90,7 +90,7 @@ * Define to 1 if you want to enable software retransmission logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 /** * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF @@ -98,6 +98,6 @@ * Define to 1 if you want to enable software CSMA-CA backoff logic. * */ -#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 1 +#define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_CSMA_BACKOFF 1 -#endif // OPENTHREAD_CORE_KW41Z_CONFIG_H_ +#endif // OPENTHREAD_CORE_KW41Z_CONFIG_H_ diff --git a/examples/platforms/kw41z/platform-kw41z.h b/examples/platforms/kw41z/platform-kw41z.h index 79f74fa6f..b089b344f 100644 --- a/examples/platforms/kw41z/platform-kw41z.h +++ b/examples/platforms/kw41z/platform-kw41z.h @@ -35,8 +35,8 @@ #ifndef PLATFORM_KW41Z_H_ #define PLATFORM_KW41Z_H_ -#include #include +#include #include @@ -81,4 +81,4 @@ void kw41zRandomInit(void); * */ void kw41zUartProcess(void); -#endif // PLATFORM_KW41Z_H_ +#endif // PLATFORM_KW41Z_H_ diff --git a/examples/platforms/nrf52811/Makefile.am b/examples/platforms/nrf52811/Makefile.am index 603bba6f9..4a5a1f122 100644 --- a/examples/platforms/nrf52811/Makefile.am +++ b/examples/platforms/nrf52811/Makefile.am @@ -77,6 +77,7 @@ PLATFORM_COMMON_SOURCES flash.c \ logging.c \ misc.c \ + openthread-core-nrf52811-config.h \ platform-config.h \ platform-fem.h \ platform-nrf5.h \ diff --git a/examples/platforms/nrf52811/openthread-core-nrf52811-config.h b/examples/platforms/nrf52811/openthread-core-nrf52811-config.h index ae09cdc25..fbeb28f55 100644 --- a/examples/platforms/nrf52811/openthread-core-nrf52811-config.h +++ b/examples/platforms/nrf52811/openthread-core-nrf52811-config.h @@ -110,22 +110,22 @@ #define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 0 #endif - /** - * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT - * - * Define to 1 if you want to enable software ACK timeout logic. - * - */ +/** + * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT + * + * Define to 1 if you want to enable software ACK timeout logic. + * + */ #ifndef OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT #define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT 0 #endif - /** - * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT - * - * Define to 1 if you want to enable software retransmission logic. - * - */ +/** + * @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT + * + * Define to 1 if you want to enable software retransmission logic. + * + */ #ifndef OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT #define OPENTHREAD_CONFIG_ENABLE_SOFTWARE_RETRANSMIT 1 #endif @@ -229,8 +229,8 @@ * * Define as 1 to enable AES usage in interrupt context and AES-256, by introducing a software AES under platform layer. * - * @note This feature must be enabled to support AES-256 used by Commissioner and Joiner, and AES usage in interrupt context - * used by Header IE related features. + * @note This feature must be enabled to support AES-256 used by Commissioner and Joiner, and AES usage in interrupt + * context used by Header IE related features. * */ #if OPENTHREAD_ENABLE_COMMISSIONER || OPENTHREAD_ENABLE_JOINER || OPENTHREAD_CONFIG_HEADER_IE_SUPPORT @@ -244,8 +244,7 @@ * e.g. break after assert(false) or ExitNow() macro. */ #if defined(__CC_ARM) - _Pragma("diag_suppress=111") - _Pragma("diag_suppress=128") +_Pragma("diag_suppress=111") _Pragma("diag_suppress=128") #endif -#endif // OPENTHREAD_CORE_NRF52811_CONFIG_H_ +#endif // OPENTHREAD_CORE_NRF52811_CONFIG_H_ diff --git a/examples/platforms/nrf52840/Makefile.am b/examples/platforms/nrf52840/Makefile.am index 1eab5d5fe..c0690cebd 100644 --- a/examples/platforms/nrf52840/Makefile.am +++ b/examples/platforms/nrf52840/Makefile.am @@ -85,6 +85,7 @@ PLATFORM_COMMON_SOURCES flash.c \ logging.c \ misc.c \ + openthread-core-nrf52840-config.h \ platform-config.h \ platform-fem.h \ platform-nrf5.h \ @@ -102,6 +103,7 @@ SINGLEPHY_SOURCES SOFTDEVICE_SOURCES = \ flash_sd.c \ + platform-softdevice.h \ softdevice.c \ softdevice.h \ $(NULL) diff --git a/examples/platforms/nrf52840/openthread-core-nrf52840-config.h b/examples/platforms/nrf52840/openthread-core-nrf52840-config.h index 93080d704..cc54e9b65 100644 --- a/examples/platforms/nrf52840/openthread-core-nrf52840-config.h +++ b/examples/platforms/nrf52840/openthread-core-nrf52840-config.h @@ -261,8 +261,7 @@ * e.g. break after assert(false) or ExitNow() macro. */ #if defined(__CC_ARM) - _Pragma("diag_suppress=111") - _Pragma("diag_suppress=128") +_Pragma("diag_suppress=111") _Pragma("diag_suppress=128") #endif -#endif // OPENTHREAD_CORE_NRF52840_CONFIG_H_ +#endif // OPENTHREAD_CORE_NRF52840_CONFIG_H_ diff --git a/examples/platforms/posix/Makefile.am b/examples/platforms/posix/Makefile.am index 7f3eedb74..850f09448 100644 --- a/examples/platforms/posix/Makefile.am +++ b/examples/platforms/posix/Makefile.am @@ -41,13 +41,15 @@ PLATFORM_SOURCES = \ alarm.c \ diag.c \ entropy.c \ - misc.c \ - logging.c \ - radio.c \ - uart-posix.c \ flash.c \ + logging.c \ + misc.c \ + openthread-core-posix-config.h \ + platform-posix.h \ + radio.c \ spi-stubs.c \ system.c \ + uart-posix.c \ sim/alarm-sim.c \ sim/platform-sim.c \ sim/radio-sim.c \ @@ -57,13 +59,8 @@ libopenthread_posix_a_SOURCES = \ $(PLATFORM_SOURCES) \ $(NULL) -noinst_HEADERS = \ - platform-posix.h \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ - $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/examples/platforms/qpg6095/Makefile.am b/examples/platforms/qpg6095/Makefile.am index 2b8835e72..6deeae14c 100644 --- a/examples/platforms/qpg6095/Makefile.am +++ b/examples/platforms/qpg6095/Makefile.am @@ -43,13 +43,21 @@ CLEANFILES = libopenthread_qpg6095_a_SOURCES = \ alarm.c \ + alarm_qorvo.h \ entropy.c \ logging.c \ misc.c \ + misc_qorvo.h \ + openthread-core-qpg6095-config.h \ platform.c \ + platform_qorvo.h \ radio.c \ + radio_qorvo.h \ + random_qorvo.h \ settings.cpp \ + settings_qorvo.h \ uart.c \ + uart_qorvo.h \ $(NULL) libopenthread_qpg6095_a_LIBADD = \ diff --git a/examples/platforms/qpg6095/alarm_qorvo.h b/examples/platforms/qpg6095/alarm_qorvo.h index b06223b90..629277b95 100644 --- a/examples/platforms/qpg6095/alarm_qorvo.h +++ b/examples/platforms/qpg6095/alarm_qorvo.h @@ -35,12 +35,12 @@ #ifndef ALARM_QORVO_H_ #define ALARM_QORVO_H_ +#include #include #include #include -#include -typedef void (*qorvoAlarmCallback_t)( void* ); +typedef void (*qorvoAlarmCallback_t)(void *); /** * This function initializes the alarm service used by OpenThread. @@ -64,7 +64,7 @@ uint32_t qorvoAlarmGetTimeMs(void); * @param[in] arg A context pointer which will be passed as an argument to the callback. * */ -void qorvoAlarmScheduleEventArg(uint32_t rel_time, qorvoAlarmCallback_t callback, void* arg); +void qorvoAlarmScheduleEventArg(uint32_t rel_time, qorvoAlarmCallback_t callback, void *arg); /** * This function unschedules the callback. @@ -73,6 +73,6 @@ void qorvoAlarmScheduleEventArg(uint32_t rel_time, qorvoAlarmCallback_t callback * @param[in] arg A context pointer which will be passed as an argument to the callback. * */ -bool qorvoAlarmUnScheduleEventArg(qorvoAlarmCallback_t callback, void* arg); +bool qorvoAlarmUnScheduleEventArg(qorvoAlarmCallback_t callback, void *arg); -#endif // ALARM_QORVO_H_ +#endif // ALARM_QORVO_H_ diff --git a/examples/platforms/qpg6095/misc_qorvo.h b/examples/platforms/qpg6095/misc_qorvo.h index a5236c414..03ab333eb 100644 --- a/examples/platforms/qpg6095/misc_qorvo.h +++ b/examples/platforms/qpg6095/misc_qorvo.h @@ -35,9 +35,9 @@ #ifndef MISC_QORVO_H_ #define MISC_QORVO_H_ -#include #include +#include void qorvoPlatReset(void); -#endif // MISC_QORVO_H_ +#endif // MISC_QORVO_H_ diff --git a/examples/platforms/qpg6095/openthread-core-qpg6095-config.h b/examples/platforms/qpg6095/openthread-core-qpg6095-config.h index 134c56610..e6e644b50 100644 --- a/examples/platforms/qpg6095/openthread-core-qpg6095-config.h +++ b/examples/platforms/qpg6095/openthread-core-qpg6095-config.h @@ -35,11 +35,11 @@ #define OPENTHREAD_CORE_QPG6095_CONFIG_H_ /** - * @def OPENTHREAD_CONFIG_LEGACY_TRANSMIT_DONE - * - * Define to 1 if you want use legacy transmit done. - * - */ + * @def OPENTHREAD_CONFIG_LEGACY_TRANSMIT_DONE + * + * Define to 1 if you want use legacy transmit done. + * + */ #define OPENTHREAD_CONFIG_LEGACY_TRANSMIT_DONE 1 /** @@ -48,6 +48,6 @@ * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "QPG6095" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "QPG6095" -#endif // OPENTHREAD_CORE_QPG6095_CONFIG_H_ +#endif // OPENTHREAD_CORE_QPG6095_CONFIG_H_ diff --git a/examples/platforms/qpg6095/platform_qorvo.h b/examples/platforms/qpg6095/platform_qorvo.h index 34b35932a..1afb17321 100644 --- a/examples/platforms/qpg6095/platform_qorvo.h +++ b/examples/platforms/qpg6095/platform_qorvo.h @@ -35,10 +35,10 @@ #ifndef PLATFORM_QORVO_H_ #define PLATFORM_QORVO_H_ -#include #include +#include -typedef bool (*qorvoPlatGotoSleepCheckCallback_t) ( void ); +typedef bool (*qorvoPlatGotoSleepCheckCallback_t)(void); /** * This function initializes the platform. @@ -56,4 +56,4 @@ void qorvoPlatInit(qorvoPlatGotoSleepCheckCallback_t gotoSleepCheckCallback); */ void qorvoPlatMainLoop(bool canGoToSleep); -#endif // PLATFORM_QORVO_H_ +#endif // PLATFORM_QORVO_H_ diff --git a/examples/platforms/qpg6095/radio_qorvo.h b/examples/platforms/qpg6095/radio_qorvo.h index 4a4f456ce..84c56bb0d 100644 --- a/examples/platforms/qpg6095/radio_qorvo.h +++ b/examples/platforms/qpg6095/radio_qorvo.h @@ -35,8 +35,8 @@ #ifndef RADIO_QORVO_H_ #define RADIO_QORVO_H_ -#include #include +#include #include /** @@ -199,4 +199,4 @@ void cbQorvoRadioTransmitDone(otRadioFrame *aPacket, bool aFramePending, otError */ void cbQorvoRadioReceiveDone(otRadioFrame *aPacket, otError aError); -#endif // RADIO_QORVO_H_ +#endif // RADIO_QORVO_H_ diff --git a/examples/platforms/qpg6095/random_qorvo.h b/examples/platforms/qpg6095/random_qorvo.h index b739cd380..d48d56474 100644 --- a/examples/platforms/qpg6095/random_qorvo.h +++ b/examples/platforms/qpg6095/random_qorvo.h @@ -35,8 +35,8 @@ #ifndef RANDOM_QORVO_H_ #define RANDOM_QORVO_H_ -#include #include +#include /** * This function initializes the random number service used by OpenThread. @@ -53,5 +53,4 @@ void qorvoRandomInit(void); */ void qorvoRandomGet(uint8_t *aOutput, uint8_t aOutputLength); - -#endif // RANDOM_QORVO_H_ +#endif // RANDOM_QORVO_H_ diff --git a/examples/platforms/qpg6095/settings_qorvo.h b/examples/platforms/qpg6095/settings_qorvo.h index db9cc3a47..b52c1f504 100644 --- a/examples/platforms/qpg6095/settings_qorvo.h +++ b/examples/platforms/qpg6095/settings_qorvo.h @@ -35,8 +35,8 @@ #ifndef SETTINGS_QORVO_H_ #define SETTINGS_QORVO_H_ -#include #include +#include #ifdef __cplusplus extern "C" { @@ -56,4 +56,4 @@ void qorvoSettingsWipe(void); } #endif -#endif // SETTINGS_QORVO_H_ +#endif // SETTINGS_QORVO_H_ diff --git a/examples/platforms/qpg6095/uart_qorvo.h b/examples/platforms/qpg6095/uart_qorvo.h index 6129a9c8a..7803648b0 100644 --- a/examples/platforms/qpg6095/uart_qorvo.h +++ b/examples/platforms/qpg6095/uart_qorvo.h @@ -35,8 +35,8 @@ #ifndef _UART_QORVO_H_ #define _UART_QORVO_H_ -#include #include +#include #include /** @@ -70,7 +70,7 @@ void cbQorvoUartTxDone(void); * @param[in] aBufLength The number of bytes received from the uart. * */ -void qorvoUartSendInput(uint8_t* aBuf, uint16_t aBufLength); +void qorvoUartSendInput(uint8_t *aBuf, uint16_t aBufLength); /** * Function which transmits data via the uart. @@ -92,4 +92,4 @@ void qorvoUartSendOutput(const uint8_t *aBuf, uint16_t aBufLength); */ void qorvoUartLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...); -#endif // _UART_QORVO_H_ +#endif // _UART_QORVO_H_ diff --git a/examples/platforms/samr21/Makefile.am b/examples/platforms/samr21/Makefile.am index a6f785a00..92324d0fe 100644 --- a/examples/platforms/samr21/Makefile.am +++ b/examples/platforms/samr21/Makefile.am @@ -95,9 +95,12 @@ PLATFORM_SOURCES flash.c \ logging.c \ misc.c \ + openthread-core-samr21-config.h \ + platform-samr21.h \ radio.c \ system.c \ uart.c \ + user_row.h \ $(NULL) libopenthread_samr21_a_SOURCES = \ @@ -129,9 +132,6 @@ nodist_libopenthread_samr21_a_SOURCES @top_builddir@/third_party/microchip/asf/thirdparty/wireless/services/trx_access/trx_access.c \ $(NULL) -noinst_HEADERS = \ - $(NULL) - PRETTY_FILES = \ $(PLATFORM_SOURCES) \ $(NULL) diff --git a/examples/platforms/samr21/openthread-core-samr21-config.h b/examples/platforms/samr21/openthread-core-samr21-config.h index 625914930..ca88fc2e9 100644 --- a/examples/platforms/samr21/openthread-core-samr21-config.h +++ b/examples/platforms/samr21/openthread-core-samr21-config.h @@ -46,7 +46,7 @@ extern uint32_t __d_nv_mem_end; * The platform-specific string to insert into the OpenThread version string. * */ -#define OPENTHREAD_CONFIG_PLATFORM_INFO "SAMR21" +#define OPENTHREAD_CONFIG_PLATFORM_INFO "SAMR21" /** * @def SETTINGS_CONFIG_BASE_ADDRESS @@ -54,7 +54,7 @@ extern uint32_t __d_nv_mem_end; * The base address of settings. * */ -#define SETTINGS_CONFIG_BASE_ADDRESS ((uint32_t)&__d_nv_mem_start) +#define SETTINGS_CONFIG_BASE_ADDRESS ((uint32_t)&__d_nv_mem_start) /** * @def SETTINGS_CONFIG_PAGE_SIZE @@ -62,7 +62,7 @@ extern uint32_t __d_nv_mem_end; * The page size of settings. * */ -#define SETTINGS_CONFIG_PAGE_SIZE 0x100 +#define SETTINGS_CONFIG_PAGE_SIZE 0x100 /** * @def SETTINGS_CONFIG_PAGE_NUM @@ -71,13 +71,13 @@ extern uint32_t __d_nv_mem_end; * * This value should not exceeds: * (((uint32_t)&__d_nv_mem_end - (uint32_t)&__d_nv_mem_start) / SETTINGS_CONFIG_PAGE_SIZE) - * + * * __d_nv_mem_start and __d_nv_mem_end is defined in linker script. * The size of NVRAM region is 4k. Page size is 256 bytes. Maximum SETTINGS_CONFIG_PAGE_NUM * should be equal or less than 16. * */ -#define SETTINGS_CONFIG_PAGE_NUM 16 +#define SETTINGS_CONFIG_PAGE_NUM 16 /** * @def RADIO_CONFIG_SRC_MATCH_ENTRY_NUM @@ -85,7 +85,7 @@ extern uint32_t __d_nv_mem_end; * The number of source address table entries. * */ -#define RADIO_CONFIG_SRC_MATCH_ENTRY_NUM 128 +#define RADIO_CONFIG_SRC_MATCH_ENTRY_NUM 128 /** * @def OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER @@ -93,7 +93,6 @@ extern uint32_t __d_nv_mem_end; * The default IEEE 802.15.4 transmit power (dBm) * */ -#define OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 5 +#define OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 5 - -#endif // OPENTHREAD_CORE_SAMR21_CONFIG_H_ +#endif // OPENTHREAD_CORE_SAMR21_CONFIG_H_ diff --git a/examples/platforms/utils/Makefile.am b/examples/platforms/utils/Makefile.am index 40cd14027..62c2beaf1 100644 --- a/examples/platforms/utils/Makefile.am +++ b/examples/platforms/utils/Makefile.am @@ -38,17 +38,14 @@ libopenthread_platform_utils_a_CPPFLAGS = \ $(NULL) libopenthread_platform_utils_a_SOURCES = \ + code_utils.h \ debug_uart.c \ + flash.h \ logging_rtt.c \ + logging_rtt.h \ settings_ram.c \ settings_flash.c \ soft_source_match_table.c \ - $(NULL) - -noinst_HEADERS = \ - code_utils.h \ - flash.h \ - logging_rtt.h \ soft_source_match_table.h \ $(NULL)