Skip to content

Commit

Permalink
Adjust Thread functions defined for Thread 1.2 (ARMmbed#2139)
Browse files Browse the repository at this point in the history
Adjust macros to build without flag: HAVE_THREAD_V2
  • Loading branch information
Arto Kinnunen committed Aug 7, 2019
1 parent 4d8dc0d commit 4a71b04
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions source/6LoWPAN/Thread/thread_bootstrap.c
Expand Up @@ -129,8 +129,8 @@ static void thread_bootstrap_pbbr_network_data_process(struct protocol_interface
static void thread_bootstrap_pbbr_update_done(struct protocol_interface_info_entry *cur);

#else
#define thread_bootstrap_pbbr_network_data_process(cur) (void(0))
#define thread_bootstrap_pbbr_update_done(cur) (void(0))
#define thread_bootstrap_pbbr_network_data_process(cur)
#define thread_bootstrap_pbbr_update_done(cur)

#endif

Expand Down
16 changes: 8 additions & 8 deletions source/6LoWPAN/Thread/thread_bootstrap.h
Expand Up @@ -218,16 +218,16 @@ void thread_bootstrap_address_registration_timer_set(protocol_interface_info_ent
void thread_bootstrap_address_registration_timer(protocol_interface_info_entry_t *interface, uint16_t seconds);
#else

#define thread_bootstrap_address_registration_init(void) ((void)0)
#define thread_bootstrap_address_registration_running(void) ((void)0)
#define thread_bootstrap_address_registration_deinit(void) ((void)0)
#define thread_bootstrap_address_registration_init()
#define thread_bootstrap_address_registration_running() ((void)0)
#define thread_bootstrap_address_registration_deinit()
#define thread_bootstrap_is_domain_prefix(interface, addr) ((void)0)
#define thread_bootstrap_dua_address_generate(cur, domain_prefix, domain_prefix_len) ((void)0)
#define thread_bootstrap_address_registration(interface, addr, child_mac64, refresh_child_entry, duplicate_child_detected) ((void)0)
#define thread_bootstrap_child_address_registration_response_process(interface) ((void)0)
#define thread_bootstrap_dua_address_generate(cur, domain_prefix, domain_prefix_len)
#define thread_bootstrap_address_registration(interface, addr, child_mac64, refresh_child_entry, duplicate_child_detected)
#define thread_bootstrap_child_address_registration_response_process(interface)

#define thread_bootstrap_address_registration_timer_set(interface, dua_delay_seconds, mlr_refresh_seconds) ((void)0)
#define thread_bootstrap_address_registration_timer(interface, seconds) ((void)0)
#define thread_bootstrap_address_registration_timer_set(interface, dua_delay_seconds, mlr_refresh_seconds)
#define thread_bootstrap_address_registration_timer(interface, seconds)

#endif
#endif /* THREAD_BOOTSTRAP_H_ */
2 changes: 1 addition & 1 deletion source/6LoWPAN/Thread/thread_common.h
Expand Up @@ -500,7 +500,7 @@ int thread_common_primary_bbr_get(struct protocol_interface_info_entry *cur, uin
#define thread_common_ccm_allocate(cur)
#define thread_common_ccm_free(cur)
#define thread_common_ccm_enabled(cur) (false)
#define thread_common_primary_bbr_get(cur, addr_ptr, seq_ptr, mlr_timer_ptr, delay_timer_ptr)
#define thread_common_primary_bbr_get(cur, addr_ptr, seq_ptr, mlr_timer_ptr, delay_timer_ptr) (0)

#endif
#else // HAVE_THREAD
Expand Down
4 changes: 2 additions & 2 deletions source/6LoWPAN/Thread/thread_discovery.c
Expand Up @@ -518,8 +518,8 @@ bool thread_discovery_ccm_joining_enabled(int8_t interface_id)
#else
#define thread_discovery_ccm_response_len(cur) (0)
#define thread_discovery_ccm_response_write(cur, ptr) (ptr)
#define thread_discovery_ccm_response_read(nwk_info, discover_response_tlv, data_ptr, data_len) (void)
#define thread_discovery_ccm_info_write(data, version, securityPolicy) (void)
#define thread_discovery_ccm_response_read(nwk_info, discover_response_tlv, data_ptr, data_len)
#define thread_discovery_ccm_info_write(data, version, securityPolicy)
#define thread_discovery_ccm_joining_enabled(interface_id) (false)

#endif
Expand Down
2 changes: 1 addition & 1 deletion source/6LoWPAN/Thread/thread_management_server.h
Expand Up @@ -137,7 +137,7 @@ int thread_management_server_tmf_get_request_handler(int8_t interface_id, int8_t
#ifdef HAVE_THREAD_V2
int thread_management_server_ccm_service_init(int8_t interface_id);
#else
#define thread_management_server_ccm_service_init(interface_id) (void(0))
#define thread_management_server_ccm_service_init(interface_id)
#endif

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion source/6LoWPAN/Thread/thread_router_bootstrap.c
Expand Up @@ -2239,7 +2239,7 @@ static bool thread_router_bootstrap_is_reed_upgrade_allowed(protocol_interface_i
return true;
}
#else
#define thread_router_bootstrap_pbbr_aloc_generate(cur) (void)
#define thread_router_bootstrap_pbbr_aloc_generate(cur)
#endif


Expand Down

0 comments on commit 4a71b04

Please sign in to comment.