mesh: add mesh_trasport to mesh_message_test

This commit is contained in:
Matthias Ringwald 2018-11-28 21:49:37 +01:00
parent febca2ab74
commit ccfd39aaf9
3 changed files with 11 additions and 2 deletions

View File

@ -52,7 +52,7 @@ mesh: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} pb_adv.o
provisioner: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} pb_adv.o mesh_crypto.o provisioning_provisioner.o provisioner.o
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
mesh_message_test: mesh_message_test.c mesh_network.o btstack_memory.o btstack_util.o btstack_crypto.o btstack_linked_list.o hci_dump.o uECC.o mock.o rijndael.o hci_cmd.o
mesh_message_test: mesh_message_test.c mesh_network.o mesh_transport.o btstack_memory.o btstack_util.o btstack_crypto.o btstack_linked_list.o hci_dump.o uECC.o mock.o rijndael.o hci_cmd.o
g++ $^ ${CFLAGS} ${LDFLAGS} -o $@
sniffer: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} sniffer.c

View File

@ -5,6 +5,7 @@
#include "ble/mesh/adv_bearer.h"
#include "ble/mesh/mesh_network.h"
#include "mesh_transport.h"
#include "btstack_util.h"
#include "provisioning.h"
#include "btstack_memory.h"
@ -74,6 +75,7 @@ static void load_provisioning_data_test_message(void){
static mesh_network_pdu_t * received_network_pdu;
#if 0
static void mesh_lower_transport_received_mesage(mesh_network_callback_type_t callback_type, mesh_network_pdu_t * network_pdu){
printf("mesh_lower_transport_received_mesage, type %u\n", callback_type);
switch (callback_type){
@ -86,6 +88,7 @@ static void mesh_lower_transport_received_mesage(mesh_network_callback_type_t ca
break;
}
}
#endif
TEST_GROUP(MessageTest){
void setup(void){

View File

@ -160,4 +160,10 @@ void btstack_run_loop_set_timer(btstack_timer_source_t * ts, uint32_t timeout){
}
void btstack_run_loop_set_timer_handler(btstack_timer_source_t * ts, void (*fn)(btstack_timer_source_t * ts)){
}
static void * timer_context;
void btstack_run_loop_set_timer_context(btstack_timer_source_t * ts, void * context){
timer_context = context;
}
void * btstack_run_loop_get_timer_context(btstack_timer_source_t * ts){
return timer_context;
}