mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-03 03:11:17 +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)
|
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS)
|
||||||
|
|
||||||
build_unix_noui: res ## build unix port without UI support
|
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
|
build_cross: ## build mpy-cross port
|
||||||
$(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS)
|
$(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS)
|
||||||
|
@ -98,8 +98,8 @@ SOURCE_MOD += [
|
|||||||
'embed/extmod/modtrezorui/modtrezorui.c',
|
'embed/extmod/modtrezorui/modtrezorui.c',
|
||||||
'embed/extmod/modtrezorui/trezor-qrenc/qr_encode.c',
|
'embed/extmod/modtrezorui/trezor-qrenc/qr_encode.c',
|
||||||
]
|
]
|
||||||
if ARGUMENTS.get('TREZOR_NOUI', 0):
|
if ARGUMENTS.get('TREZOR_EMULATOR_NOUI', 0):
|
||||||
CPPDEFINES_MOD += ['TREZOR_NOUI']
|
CPPDEFINES_MOD += ['TREZOR_EMULATOR_NOUI']
|
||||||
else:
|
else:
|
||||||
LIBS_MOD += ['SDL2', 'SDL2_image']
|
LIBS_MOD += ['SDL2', 'SDL2_image']
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifndef TREZOR_NOUI
|
#ifndef TREZOR_EMULATOR_NOUI
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ void PIXELDATA(uint16_t c) {
|
|||||||
|
|
||||||
void display_init(void)
|
void display_init(void)
|
||||||
{
|
{
|
||||||
#ifndef TREZOR_NOUI
|
#ifndef TREZOR_EMULATOR_NOUI
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
|
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
|
||||||
printf("%s\n", SDL_GetError());
|
printf("%s\n", SDL_GetError());
|
||||||
ensure(secfalse, "SDL_Init error");
|
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)
|
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) {
|
if (!RENDERER) {
|
||||||
display_init();
|
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)
|
void display_refresh(void)
|
||||||
{
|
{
|
||||||
#ifndef TREZOR_NOUI
|
#ifndef TREZOR_EMULATOR_NOUI
|
||||||
if (!RENDERER) {
|
if (!RENDERER) {
|
||||||
display_init();
|
display_init();
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ static void display_set_backlight(int val)
|
|||||||
|
|
||||||
void display_save(const char *prefix)
|
void display_save(const char *prefix)
|
||||||
{
|
{
|
||||||
#ifndef TREZOR_NOUI
|
#ifndef TREZOR_EMULATOR_NOUI
|
||||||
if (!RENDERER) {
|
if (!RENDERER) {
|
||||||
display_init();
|
display_init();
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#ifndef TREZOR_NOUI
|
#ifndef TREZOR_EMULATOR_NOUI
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ extern void display_save(const char *prefix);
|
|||||||
|
|
||||||
uint32_t touch_read(void)
|
uint32_t touch_read(void)
|
||||||
{
|
{
|
||||||
#ifndef TREZOR_NOUI
|
#ifndef TREZOR_EMULATOR_NOUI
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
int x, y;
|
int x, y;
|
||||||
SDL_PumpEvents();
|
SDL_PumpEvents();
|
||||||
|
Loading…
Reference in New Issue
Block a user