mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-27 13:35:44 +00:00
ble in bootloader
This commit is contained in:
parent
f495094540
commit
4de53a3e3f
@ -42,9 +42,7 @@ workflow_result_t workflow_host_control(const vendor_header *const vhdr,
|
|||||||
const image_header *const hdr,
|
const image_header *const hdr,
|
||||||
void (*redraw_wait_screen)(void)) {
|
void (*redraw_wait_screen)(void)) {
|
||||||
wire_iface_t usb_iface = {0};
|
wire_iface_t usb_iface = {0};
|
||||||
wire_iface_t ble_iface = {0};
|
|
||||||
protob_io_t protob_usb_iface = {0};
|
protob_io_t protob_usb_iface = {0};
|
||||||
protob_io_t protob_ble_iface = {0};
|
|
||||||
|
|
||||||
redraw_wait_screen();
|
redraw_wait_screen();
|
||||||
|
|
||||||
@ -53,10 +51,16 @@ workflow_result_t workflow_host_control(const vendor_header *const vhdr,
|
|||||||
usb_iface_init(&usb_iface,
|
usb_iface_init(&usb_iface,
|
||||||
(vhdr == NULL && hdr == NULL) ? sectrue : secfalse);
|
(vhdr == NULL && hdr == NULL) ? sectrue : secfalse);
|
||||||
|
|
||||||
ble_iface_init(&ble_iface);
|
|
||||||
|
|
||||||
protob_init(&protob_usb_iface, &usb_iface);
|
protob_init(&protob_usb_iface, &usb_iface);
|
||||||
|
|
||||||
|
#ifdef USE_BLE
|
||||||
|
wire_iface_t ble_iface = {0};
|
||||||
|
protob_io_t protob_ble_iface = {0};
|
||||||
|
ble_iface_init(&ble_iface);
|
||||||
protob_init(&protob_ble_iface, &ble_iface);
|
protob_init(&protob_ble_iface, &ble_iface);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
workflow_result_t result = WF_ERROR_FATAL;
|
workflow_result_t result = WF_ERROR_FATAL;
|
||||||
|
|
||||||
|
@ -145,6 +145,7 @@ extern "C" fn screen_wipe_fail() {
|
|||||||
ModelUI::screen_wipe_fail()
|
ModelUI::screen_wipe_fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "ble")]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
extern "C" fn screen_confirm_pairing(code: *const cty::c_char, initial_setup: bool) -> u32 {
|
extern "C" fn screen_confirm_pairing(code: *const cty::c_char, initial_setup: bool) -> u32 {
|
||||||
let code = unwrap!(unsafe { from_c_array(code, 6) });
|
let code = unwrap!(unsafe { from_c_array(code, 6) });
|
||||||
|
@ -21,9 +21,9 @@ use super::{
|
|||||||
self,
|
self,
|
||||||
bootloader::{
|
bootloader::{
|
||||||
button_bld, button_bld_menu, button_confirm, button_wipe_cancel, button_wipe_confirm,
|
button_bld, button_bld_menu, button_confirm, button_wipe_cancel, button_wipe_confirm,
|
||||||
BLD_BG, BLD_FG, BLD_TITLE_COLOR, BLD_WIPE_COLOR, CHECK24, CHECK40, DOWNLOAD32, FIRE32,
|
BLD_BG, BLD_FG, BLD_TITLE_COLOR, BLD_WARN_COLOR, BLD_WIPE_COLOR, CHECK24, CHECK40,
|
||||||
FIRE40, RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE, TEXT_BOLD, TEXT_NORMAL,
|
DOWNLOAD32, FIRE32, FIRE40, RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE, TEXT_BOLD,
|
||||||
TEXT_WIPE_BOLD, TEXT_WIPE_NORMAL, WARNING40, WELCOME_COLOR, X24,
|
TEXT_NORMAL, TEXT_WIPE_BOLD, TEXT_WIPE_NORMAL, WARNING40, WELCOME_COLOR, X24,
|
||||||
},
|
},
|
||||||
FG,
|
FG,
|
||||||
},
|
},
|
||||||
@ -41,7 +41,8 @@ use crate::ui::{
|
|||||||
|
|
||||||
use ufmt::uwrite;
|
use ufmt::uwrite;
|
||||||
|
|
||||||
use super::theme::bootloader::{button_confirm_initial, button_initial, BLD_WARN_COLOR};
|
#[cfg(feature = "ble")]
|
||||||
|
use super::theme::bootloader::{button_confirm_initial, button_initial};
|
||||||
|
|
||||||
use intro::Intro;
|
use intro::Intro;
|
||||||
use menu::Menu;
|
use menu::Menu;
|
||||||
|
Loading…
Reference in New Issue
Block a user