mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-19 23:38:46 +00:00
build(core): allow ble feature in emulator
[no changelog]
This commit is contained in:
parent
40756a0941
commit
0ecff7182b
@ -21,7 +21,7 @@ if BENCHMARK and PYOPT != '0':
|
|||||||
print("BENCHMARK=1 works only with PYOPT=0.")
|
print("BENCHMARK=1 works only with PYOPT=0.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
FEATURES_WANTED = ["input", "sd_card", "dma2d", "optiga"]
|
FEATURES_WANTED = ["input", "sd_card", "dma2d", "optiga", "ble"]
|
||||||
|
|
||||||
if not DISABLE_TROPIC:
|
if not DISABLE_TROPIC:
|
||||||
FEATURES_WANTED.append('tropic')
|
FEATURES_WANTED.append('tropic')
|
||||||
|
30
core/embed/io/ble/unix/ble.c
Normal file
30
core/embed/io/ble/unix/ble.c
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include <io/ble.h>
|
||||||
|
#include <trezor_rtl.h>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
bool ble_init(void) { return true; }
|
||||||
|
|
||||||
|
void ble_deinit(void) {}
|
||||||
|
|
||||||
|
void ble_start(void) {}
|
||||||
|
|
||||||
|
void ble_stop(void) {}
|
||||||
|
|
||||||
|
bool ble_issue_command(ble_command_t *command) { return true; }
|
||||||
|
|
||||||
|
bool ble_get_event(ble_event_t *event) { return false; }
|
||||||
|
|
||||||
|
void ble_get_state(ble_state_t *state) {
|
||||||
|
memset(state, 0, sizeof(ble_state_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ble_can_write(void) { return true; }
|
||||||
|
|
||||||
|
bool ble_write(const uint8_t *data, uint16_t len) { return len; }
|
||||||
|
|
||||||
|
bool ble_can_read(void) { return false; }
|
||||||
|
|
||||||
|
uint32_t ble_read(uint8_t *data, uint16_t max_len) { return 0; }
|
||||||
|
|
||||||
|
bool ble_get_mac(uint8_t *mac, size_t max_len) { return false; }
|
@ -87,6 +87,12 @@ def configure(
|
|||||||
features_available.append("touch")
|
features_available.append("touch")
|
||||||
defines += [("USE_TOUCH", "1")]
|
defines += [("USE_TOUCH", "1")]
|
||||||
|
|
||||||
|
if "ble" in features_wanted:
|
||||||
|
sources += ["embed/io/ble/unix/ble.c"]
|
||||||
|
paths += ["embed/io/ble/inc"]
|
||||||
|
features_available.append("ble")
|
||||||
|
defines += [("USE_BLE", "1")]
|
||||||
|
|
||||||
features_available.append("backlight")
|
features_available.append("backlight")
|
||||||
defines += [("USE_BACKLIGHT", "1")]
|
defines += [("USE_BACKLIGHT", "1")]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user