static void btpad_queue_hci_read_bd_addr( struct btpad_queue_command *cmd) { if (!cmd) return; cmd->command = hci_read_bd_addr_ptr; btpad_increment_position(&insert_position); btpad_queue_process(); }
static void btpad_queue_btstack_set_power_mode( struct btpad_queue_command *cmd, uint8_t on) { if (!cmd) return; cmd->command = btstack_set_power_mode_ptr; cmd->btstack_set_power_mode.on = on; btpad_increment_position(&insert_position); btpad_queue_process(); }
void btpad_queue_hci_read_bd_addr(void) { struct btpad_queue_command* cmd = (struct btpad_queue_command*) &commands[insert_position]; if (!cmd) return; cmd->command = hci_read_bd_addr_ptr; INCPOS(insert); btpad_queue_process(); }
static void btpad_queue_hci_pin_code_request_reply( struct btpad_queue_command *cmd, bd_addr_t bd_addr, bd_addr_t pin) { if (!cmd) return; cmd->command = hci_pin_code_request_reply_ptr; memcpy(cmd->hci_pin_code_request_reply.bd_addr, bd_addr, sizeof(bd_addr_t)); memcpy(cmd->hci_pin_code_request_reply.pin, pin, sizeof(bd_addr_t)); btpad_increment_position(&insert_position); btpad_queue_process(); }
static void btpad_queue_hci_disconnect( struct btpad_queue_command *cmd, uint16_t handle, uint8_t reason) { if (!cmd) return; cmd->command = hci_disconnect_ptr; cmd->hci_disconnect.handle = handle; cmd->hci_disconnect.reason = reason; btpad_increment_position(&insert_position); btpad_queue_process(); }
void btpad_queue_btstack_set_power_mode(uint8_t on) { struct btpad_queue_command* cmd = (struct btpad_queue_command*) &commands[insert_position]; if (!cmd) return; cmd->command = btstack_set_power_mode_ptr; cmd->btstack_set_power_mode.on = on; INCPOS(insert); btpad_queue_process(); }
void btpad_queue_hci_pin_code_request_reply(bd_addr_t bd_addr, bd_addr_t pin) { struct btpad_queue_command* cmd = (struct btpad_queue_command*) &commands[insert_position]; if (!cmd) return; cmd->command = hci_pin_code_request_reply_ptr; memcpy(cmd->hci_pin_code_request_reply.bd_addr, bd_addr, sizeof(bd_addr_t)); memcpy(cmd->hci_pin_code_request_reply.pin, pin, sizeof(bd_addr_t)); INCPOS(insert); btpad_queue_process(); }
void btpad_queue_hci_disconnect(uint16_t handle, uint8_t reason) { struct btpad_queue_command* cmd = (struct btpad_queue_command*) &commands[insert_position]; if (!cmd) return; cmd->command = hci_disconnect_ptr; cmd->hci_disconnect.handle = handle; cmd->hci_disconnect.reason = reason; INCPOS(insert); btpad_queue_process(); }
static void btpad_queue_hci_inquiry( struct btpad_queue_command *cmd, uint32_t lap, uint8_t length, uint8_t num_responses) { if (!cmd) return; cmd->command = hci_inquiry_ptr; cmd->hci_inquiry.lap = lap; cmd->hci_inquiry.length = length; cmd->hci_inquiry.num_responses = num_responses; btpad_increment_position(&insert_position); btpad_queue_process(); }
void btpad_queue_hci_inquiry(uint32_t lap, uint8_t length, uint8_t num_responses) { struct btpad_queue_command* cmd = (struct btpad_queue_command*) &commands[insert_position]; if (!cmd) return; cmd->command = hci_inquiry_ptr; cmd->hci_inquiry.lap = lap; cmd->hci_inquiry.length = length; cmd->hci_inquiry.num_responses = num_responses; INCPOS(insert); btpad_queue_process(); }
static void btpad_queue_hci_remote_name_request( struct btpad_queue_command *cmd, bd_addr_t bd_addr, uint8_t page_scan_repetition_mode, uint8_t reserved, uint16_t clock_offset) { if (!cmd) return; cmd->command = hci_remote_name_request_ptr; memcpy(cmd->hci_remote_name_request.bd_addr, bd_addr, sizeof(bd_addr_t)); cmd->hci_remote_name_request.page_scan_repetition_mode = page_scan_repetition_mode; cmd->hci_remote_name_request.reserved = reserved; cmd->hci_remote_name_request.clock_offset = clock_offset; btpad_increment_position(&insert_position); btpad_queue_process(); }
void btpad_queue_hci_remote_name_request(bd_addr_t bd_addr, uint8_t page_scan_repetition_mode, uint8_t reserved, uint16_t clock_offset) { struct btpad_queue_command* cmd = (struct btpad_queue_command*) &commands[insert_position]; if (!cmd) return; cmd->command = hci_remote_name_request_ptr; memcpy(cmd->hci_remote_name_request.bd_addr, bd_addr, sizeof(bd_addr_t)); cmd->hci_remote_name_request.page_scan_repetition_mode = page_scan_repetition_mode; cmd->hci_remote_name_request.reserved = reserved; cmd->hci_remote_name_request.clock_offset = clock_offset; INCPOS(insert); btpad_queue_process(); }
static void btpad_queue_run(uint32_t count) { can_run = count; btpad_queue_process(); }