mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 18:39:52 +00:00
fix missing prototypes
This commit is contained in:
parent
fd4ab16d0d
commit
9c6691a7ba
@ -229,7 +229,7 @@ static const char * att_error_application = "Application Error";
|
||||
static const char * att_error_common_error = "Common Profile and Service Error Codes";
|
||||
static const char * att_error_timeout = "Timeout";
|
||||
|
||||
const char * att_error_string_for_code(uint8_t code){
|
||||
static const char * att_error_string_for_code(uint8_t code){
|
||||
if (code >= 0xe0) return att_error_common_error;
|
||||
if (code >= 0xa0) return att_error_reserved;
|
||||
if (code >= 0x80) return att_error_application;
|
||||
@ -238,19 +238,6 @@ const char * att_error_string_for_code(uint8_t code){
|
||||
return att_errors[code];
|
||||
}
|
||||
|
||||
void dump_characteristic(le_characteristic_t * characteristic){
|
||||
printf(" * characteristic: [0x%04x-0x%04x-0x%04x], properties 0x%02x, uuid ",
|
||||
characteristic->start_handle, characteristic->value_handle, characteristic->end_handle, characteristic->properties);
|
||||
printUUID(characteristic->uuid128, characteristic->uuid16);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void dump_service(le_service_t * service){
|
||||
printf(" * service: [0x%04x-0x%04x], uuid ", service->start_group_handle, service->end_group_handle);
|
||||
printUUID(service->uuid128, service->uuid16);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
const char * ad_event_types[] = {
|
||||
"Connectable undirected advertising",
|
||||
"Connectable directed advertising",
|
||||
@ -326,7 +313,7 @@ static void gap_run(void){
|
||||
if (!hci_can_send_command_packet_now()) return;
|
||||
}
|
||||
|
||||
void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
uint16_t aHandle;
|
||||
sm_event_t * sm_event;
|
||||
|
||||
@ -415,12 +402,12 @@ void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet,
|
||||
gap_run();
|
||||
}
|
||||
|
||||
void use_public_pts_address(void){
|
||||
static void use_public_pts_address(void){
|
||||
memcpy(current_pts_address, public_pts_address, 6);
|
||||
current_pts_address_type = public_pts_address_type;
|
||||
}
|
||||
|
||||
void handle_gatt_client_event(le_event_t * event){
|
||||
static void handle_gatt_client_event(le_event_t * event){
|
||||
le_characteristic_value_event_t * value;
|
||||
le_characteristic_event_t * characteristic_event;
|
||||
uint8_t address_type;
|
||||
@ -680,10 +667,10 @@ void handle_gatt_client_event(le_event_t * event){
|
||||
{
|
||||
printf("Searching Characteristic Declaration\n");
|
||||
central_state = CENTRAL_GPA_W4_RESPONSE2;
|
||||
le_service_t service;
|
||||
service.start_group_handle = ui_start_handle;
|
||||
service.end_group_handle = ui_end_handle;
|
||||
gatt_client_discover_characteristics_for_service(gc_id, handle, &service);
|
||||
le_service_t aService;
|
||||
aService.start_group_handle = ui_start_handle;
|
||||
aService.end_group_handle = ui_end_handle;
|
||||
gatt_client_discover_characteristics_for_service(gc_id, handle, &aService);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -748,7 +735,7 @@ const char * lines[100];
|
||||
const char * empty_string = "";
|
||||
const int width = 70;
|
||||
|
||||
void reset_screen(void){
|
||||
static void reset_screen(void){
|
||||
// free memory
|
||||
int i = 0;
|
||||
for (i=0;i<num_rows;i++) {
|
||||
@ -763,7 +750,7 @@ void reset_screen(void){
|
||||
num_lines = 0;
|
||||
}
|
||||
|
||||
void print_line(const char * format, ...){
|
||||
static void print_line(const char * format, ...){
|
||||
va_list argptr;
|
||||
va_start(argptr, format);
|
||||
char * line = malloc(80);
|
||||
@ -773,7 +760,7 @@ void print_line(const char * format, ...){
|
||||
num_lines++;
|
||||
}
|
||||
|
||||
void printf_row(const char * format, ...){
|
||||
static void printf_row(const char * format, ...){
|
||||
va_list argptr;
|
||||
va_start(argptr, format);
|
||||
char * row = malloc(80);
|
||||
@ -783,7 +770,7 @@ void printf_row(const char * format, ...){
|
||||
num_rows++;
|
||||
}
|
||||
|
||||
void print_screen(void){
|
||||
static void print_screen(void){
|
||||
|
||||
// clear screen
|
||||
printf("\e[1;1H\e[2J");
|
||||
@ -812,7 +799,7 @@ void print_screen(void){
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void show_usage(void){
|
||||
static void show_usage(void){
|
||||
uint8_t iut_address_type;
|
||||
bd_addr_t iut_address;
|
||||
hci_le_advertisement_address(&iut_address_type, iut_address);
|
||||
@ -879,7 +866,7 @@ void show_usage(void){
|
||||
print_screen();
|
||||
}
|
||||
|
||||
void update_auth_req(void){
|
||||
static void update_auth_req(void){
|
||||
uint8_t auth_req = 0;
|
||||
if (sm_mitm_protection){
|
||||
auth_req |= SM_AUTHREQ_MITM_PROTECTION;
|
||||
@ -902,7 +889,7 @@ static void att_signed_write_handle_cmac_result(uint8_t hash[8]){
|
||||
l2cap_send_prepared_connectionless(handle, L2CAP_CID_ATTRIBUTE_PROTOCOL, 3 + value_length + 12);
|
||||
}
|
||||
|
||||
int hexForChar(char c){
|
||||
static int hexForChar(char c){
|
||||
if (c >= '0' && c <= '9'){
|
||||
return c - '0';
|
||||
}
|
||||
@ -1511,7 +1498,7 @@ static void ui_process_command(char buffer){
|
||||
}
|
||||
}
|
||||
|
||||
int stdin_process(struct data_source *ds){
|
||||
static int stdin_process(struct data_source *ds){
|
||||
char buffer;
|
||||
read(ds->fd, &buffer, 1);
|
||||
|
||||
@ -1572,11 +1559,6 @@ static uint16_t att_read_callback(uint16_t con_handle, uint16_t attribute_handle
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void setup(void){
|
||||
|
||||
}
|
||||
|
||||
int btstack_main(int argc, const char * argv[]);
|
||||
int btstack_main(int argc, const char * argv[]){
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user