diff --git a/src/lib/spinel/CMakeLists.txt b/src/lib/spinel/CMakeLists.txt index 8d552cf08cd..47de4d44175 100644 --- a/src/lib/spinel/CMakeLists.txt +++ b/src/lib/spinel/CMakeLists.txt @@ -65,8 +65,8 @@ set(COMMON_SOURCES set(OT_SPINEL_VENDOR_HOOK_SOURCE "" CACHE STRING "set vendor hook source file for Spinel") set(OT_SPINEL_VENDOR_HOOK_HEADER "" CACHE STRING "set vendor hook header file for Spinel") if(OT_SPINEL_VENDOR_HOOK_SOURCE) - target_compile_definitions(openthread-spinel-rcp PUBLIC "OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK=1") - target_compile_definitions(openthread-spinel-ncp PUBLIC "OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK=1") + target_compile_definitions(openthread-spinel-rcp PUBLIC "OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE=1") + target_compile_definitions(openthread-spinel-ncp PUBLIC "OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE=1") target_compile_definitions(openthread-spinel-rcp PUBLIC "OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_HEADER=\"${OT_SPINEL_VENDOR_HOOK_HEADER}\"") target_compile_definitions(openthread-spinel-ncp PUBLIC "OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_HEADER=\"${OT_SPINEL_VENDOR_HOOK_HEADER}\"") list(APPEND COMMON_SOURCES ${OT_SPINEL_VENDOR_HOOK_SOURCE_DIR}${OT_SPINEL_VENDOR_HOOK_SOURCE}) diff --git a/src/lib/spinel/example_vendor_hook.cpp b/src/lib/spinel/example_vendor_hook.cpp index 3c0a73a159a..c43961b7986 100644 --- a/src/lib/spinel/example_vendor_hook.cpp +++ b/src/lib/spinel/example_vendor_hook.cpp @@ -30,7 +30,7 @@ * This file shows how to implement the Radio Spinel vendor hook. */ -#if OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#if OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE #include OPENTRHEAD_SPINEL_CONFIG_VENDOR_HOOK_HEADER #include "common/log.hpp" @@ -64,4 +64,4 @@ otError RadioSpinel::VendorHandleValueIs(spinel_prop_key_t aPropKey) extern ot::Spinel::RadioSpinel &GetRadioSpinel(void); -#endif // OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#endif // OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE diff --git a/src/lib/spinel/example_vendor_hook.hpp b/src/lib/spinel/example_vendor_hook.hpp index f9dedb6269f..df35e8bc3a3 100644 --- a/src/lib/spinel/example_vendor_hook.hpp +++ b/src/lib/spinel/example_vendor_hook.hpp @@ -33,7 +33,7 @@ #ifndef SPINEL_EXTENSION_H #define SPINEL_EXTENSION_H -#if OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#if OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE #include #include "lib/spinel/radio_spinel.hpp" @@ -55,5 +55,5 @@ class VendorRadioSpinel : public ot::Spinel::RadioSpinel } // namespace Spinel } // namespace ot -#endif // OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#endif // OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE #endif // SPINEL_EXTENSION_H diff --git a/src/lib/spinel/openthread-spinel-config.h b/src/lib/spinel/openthread-spinel-config.h index ef6d5abd249..75dd496ceae 100644 --- a/src/lib/spinel/openthread-spinel-config.h +++ b/src/lib/spinel/openthread-spinel-config.h @@ -90,13 +90,13 @@ #endif /** - * @def OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK + * @def OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE * * Enables compilation of vendor specific code for Spinel * */ -#ifndef OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK -#define OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK 0 +#ifndef OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE +#define OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE 0 #endif /** diff --git a/src/lib/spinel/radio_spinel.cpp b/src/lib/spinel/radio_spinel.cpp index 7da561ae2cc..495a9bb1ce3 100644 --- a/src/lib/spinel/radio_spinel.cpp +++ b/src/lib/spinel/radio_spinel.cpp @@ -747,7 +747,7 @@ void RadioSpinel::HandleValueIs(spinel_prop_key_t aKey, const uint8_t *aBuffer, break; } } -#if OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#if OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE else if (aKey >= SPINEL_PROP_VENDOR__BEGIN && aKey < SPINEL_PROP_VENDOR__END) { error = VendorHandleValueIs(aKey); diff --git a/src/lib/spinel/radio_spinel.hpp b/src/lib/spinel/radio_spinel.hpp index dcac23e9e9f..594ce9126c2 100644 --- a/src/lib/spinel/radio_spinel.hpp +++ b/src/lib/spinel/radio_spinel.hpp @@ -1065,7 +1065,7 @@ class RadioSpinel */ void RestoreProperties(void); #endif -#if OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#if OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE /** * Defines a vendor "set property handler" hook to process vendor spinel properties. * diff --git a/src/posix/platform/radio.hpp b/src/posix/platform/radio.hpp index 00c958c2ff1..49cdfdf3d67 100644 --- a/src/posix/platform/radio.hpp +++ b/src/posix/platform/radio.hpp @@ -35,7 +35,7 @@ #include "posix/platform/radio_url.hpp" #include "posix/platform/spi_interface.hpp" #include "posix/platform/vendor_interface.hpp" -#if OPENTHREAD_SPINEL_CONFIG_ENABLE_VENDOR_HOOK +#if OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE #ifdef OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_HEADER #include OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_HEADER #endif @@ -110,7 +110,7 @@ class Radio #endif RadioUrl mRadioUrl; -#if OPENTHREAD_ENABLE_SPINEL_VENDOR_HOOK +#if OPENTHREAD_SPINEL_CONFIG_VENDOR_HOOK_ENABLE Spinel::VendorRadioSpinel mRadioSpinel; #else Spinel::RadioSpinel mRadioSpinel;