mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
emulator: rename TREZOR_NOUI macro to TREZOR_EMULATOR_NOUI
This commit is contained in:
parent
30b96a0f07
commit
e821fd4358
2
Makefile
2
Makefile
@ -119,7 +119,7 @@ build_unix: res ## build unix port
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS)
|
||||
|
||||
build_unix_noui: res ## build unix port without UI support
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS) TREZOR_NOUI=1
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS) TREZOR_EMULATOR_NOUI=1
|
||||
|
||||
build_cross: ## build mpy-cross port
|
||||
$(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS)
|
||||
|
@ -98,8 +98,8 @@ SOURCE_MOD += [
|
||||
'embed/extmod/modtrezorui/modtrezorui.c',
|
||||
'embed/extmod/modtrezorui/trezor-qrenc/qr_encode.c',
|
||||
]
|
||||
if ARGUMENTS.get('TREZOR_NOUI', 0):
|
||||
CPPDEFINES_MOD += ['TREZOR_NOUI']
|
||||
if ARGUMENTS.get('TREZOR_EMULATOR_NOUI', 0):
|
||||
CPPDEFINES_MOD += ['TREZOR_EMULATOR_NOUI']
|
||||
else:
|
||||
LIBS_MOD += ['SDL2', 'SDL2_image']
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_image.h>
|
||||
|
||||
@ -68,7 +68,7 @@ void PIXELDATA(uint16_t c) {
|
||||
|
||||
void display_init(void)
|
||||
{
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
|
||||
printf("%s\n", SDL_GetError());
|
||||
ensure(secfalse, "SDL_Init error");
|
||||
@ -108,7 +108,7 @@ void display_init(void)
|
||||
|
||||
static void display_set_window(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1)
|
||||
{
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
if (!RENDERER) {
|
||||
display_init();
|
||||
}
|
||||
@ -120,7 +120,7 @@ static void display_set_window(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y
|
||||
|
||||
void display_refresh(void)
|
||||
{
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
if (!RENDERER) {
|
||||
display_init();
|
||||
}
|
||||
@ -155,7 +155,7 @@ static void display_set_backlight(int val)
|
||||
|
||||
void display_save(const char *prefix)
|
||||
{
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
if (!RENDERER) {
|
||||
display_init();
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
|
||||
@ -32,7 +32,7 @@ extern void display_save(const char *prefix);
|
||||
|
||||
uint32_t touch_read(void)
|
||||
{
|
||||
#ifndef TREZOR_NOUI
|
||||
#ifndef TREZOR_EMULATOR_NOUI
|
||||
SDL_Event event;
|
||||
int x, y;
|
||||
SDL_PumpEvents();
|
||||
|
Loading…
Reference in New Issue
Block a user