test/gatt_client: update mocking code

This commit is contained in:
Matthias Ringwald 2020-11-18 11:43:13 +01:00
parent cad352fab6
commit 38336af48c
2 changed files with 12 additions and 2 deletions

View File

@ -4,7 +4,7 @@ CC = g++
BTSTACK_ROOT = ../..
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I${BTSTACK_ROOT}/src
CFLAGS += -fprofile-arcs -ftest-coverage
LDFLAGS += -lCppUTest -lCppUTestExt

View File

@ -46,7 +46,17 @@ void mock_simulate_scan_response(void){
uint8_t packet[] = {0xE2, 0x13, 0xE2, 0x01, 0x34, 0xB1, 0xF7, 0xD1, 0x77, 0x9B, 0xCC, 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
registered_hci_event_handler(HCI_EVENT_PACKET, 0, (uint8_t *)&packet, sizeof(packet));
}
int gap_authenticated(hci_con_handle_t con_handle){
UNUSED(con_handle);
return false;
}
int gap_encryption_key_size(hci_con_handle_t con_handle){
UNUSED(con_handle);
return 0;
}
void sm_request_pairing(hci_con_handle_t con_handle){
UNUSED(con_handle);
}
void gap_start_scan(void){
}
void gap_stop_scan(void){