Skip to content

Commit 4a71b04

Browse files
author
Arto Kinnunen
authored
Adjust Thread functions defined for Thread 1.2 (ARMmbed#2139)
Adjust macros to build without flag: HAVE_THREAD_V2
1 parent 4d8dc0d commit 4a71b04

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

source/6LoWPAN/Thread/thread_bootstrap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ static void thread_bootstrap_pbbr_network_data_process(struct protocol_interface
129129
static void thread_bootstrap_pbbr_update_done(struct protocol_interface_info_entry *cur);
130130

131131
#else
132-
#define thread_bootstrap_pbbr_network_data_process(cur) (void(0))
133-
#define thread_bootstrap_pbbr_update_done(cur) (void(0))
132+
#define thread_bootstrap_pbbr_network_data_process(cur)
133+
#define thread_bootstrap_pbbr_update_done(cur)
134134

135135
#endif
136136

source/6LoWPAN/Thread/thread_bootstrap.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,16 @@ void thread_bootstrap_address_registration_timer_set(protocol_interface_info_ent
218218
void thread_bootstrap_address_registration_timer(protocol_interface_info_entry_t *interface, uint16_t seconds);
219219
#else
220220

221-
#define thread_bootstrap_address_registration_init(void) ((void)0)
222-
#define thread_bootstrap_address_registration_running(void) ((void)0)
223-
#define thread_bootstrap_address_registration_deinit(void) ((void)0)
221+
#define thread_bootstrap_address_registration_init()
222+
#define thread_bootstrap_address_registration_running() ((void)0)
223+
#define thread_bootstrap_address_registration_deinit()
224224
#define thread_bootstrap_is_domain_prefix(interface, addr) ((void)0)
225-
#define thread_bootstrap_dua_address_generate(cur, domain_prefix, domain_prefix_len) ((void)0)
226-
#define thread_bootstrap_address_registration(interface, addr, child_mac64, refresh_child_entry, duplicate_child_detected) ((void)0)
227-
#define thread_bootstrap_child_address_registration_response_process(interface) ((void)0)
225+
#define thread_bootstrap_dua_address_generate(cur, domain_prefix, domain_prefix_len)
226+
#define thread_bootstrap_address_registration(interface, addr, child_mac64, refresh_child_entry, duplicate_child_detected)
227+
#define thread_bootstrap_child_address_registration_response_process(interface)
228228

229-
#define thread_bootstrap_address_registration_timer_set(interface, dua_delay_seconds, mlr_refresh_seconds) ((void)0)
230-
#define thread_bootstrap_address_registration_timer(interface, seconds) ((void)0)
229+
#define thread_bootstrap_address_registration_timer_set(interface, dua_delay_seconds, mlr_refresh_seconds)
230+
#define thread_bootstrap_address_registration_timer(interface, seconds)
231231

232232
#endif
233233
#endif /* THREAD_BOOTSTRAP_H_ */

source/6LoWPAN/Thread/thread_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ int thread_common_primary_bbr_get(struct protocol_interface_info_entry *cur, uin
500500
#define thread_common_ccm_allocate(cur)
501501
#define thread_common_ccm_free(cur)
502502
#define thread_common_ccm_enabled(cur) (false)
503-
#define thread_common_primary_bbr_get(cur, addr_ptr, seq_ptr, mlr_timer_ptr, delay_timer_ptr)
503+
#define thread_common_primary_bbr_get(cur, addr_ptr, seq_ptr, mlr_timer_ptr, delay_timer_ptr) (0)
504504

505505
#endif
506506
#else // HAVE_THREAD

source/6LoWPAN/Thread/thread_discovery.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ bool thread_discovery_ccm_joining_enabled(int8_t interface_id)
518518
#else
519519
#define thread_discovery_ccm_response_len(cur) (0)
520520
#define thread_discovery_ccm_response_write(cur, ptr) (ptr)
521-
#define thread_discovery_ccm_response_read(nwk_info, discover_response_tlv, data_ptr, data_len) (void)
522-
#define thread_discovery_ccm_info_write(data, version, securityPolicy) (void)
521+
#define thread_discovery_ccm_response_read(nwk_info, discover_response_tlv, data_ptr, data_len)
522+
#define thread_discovery_ccm_info_write(data, version, securityPolicy)
523523
#define thread_discovery_ccm_joining_enabled(interface_id) (false)
524524

525525
#endif

source/6LoWPAN/Thread/thread_management_server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ int thread_management_server_tmf_get_request_handler(int8_t interface_id, int8_t
137137
#ifdef HAVE_THREAD_V2
138138
int thread_management_server_ccm_service_init(int8_t interface_id);
139139
#else
140-
#define thread_management_server_ccm_service_init(interface_id) (void(0))
140+
#define thread_management_server_ccm_service_init(interface_id)
141141
#endif
142142

143143
#ifdef __cplusplus

source/6LoWPAN/Thread/thread_router_bootstrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2239,7 +2239,7 @@ static bool thread_router_bootstrap_is_reed_upgrade_allowed(protocol_interface_i
22392239
return true;
22402240
}
22412241
#else
2242-
#define thread_router_bootstrap_pbbr_aloc_generate(cur) (void)
2242+
#define thread_router_bootstrap_pbbr_aloc_generate(cur)
22432243
#endif
22442244

22452245

0 commit comments

Comments
 (0)