mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
unix: fix NOUI build
This commit is contained in:
parent
4a7540f5b9
commit
a753bb05e2
@ -14,7 +14,7 @@ script:
|
|||||||
|
|
||||||
- make build_trezorhal
|
- make build_trezorhal
|
||||||
|
|
||||||
- make build_unix MICROPY_PY_TREZORUI_NOUI=1
|
- make build_unix TREZOR_NOUI=1
|
||||||
|
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
|
@ -8,11 +8,6 @@
|
|||||||
#define CMD(X) (void)(X);
|
#define CMD(X) (void)(X);
|
||||||
#define DATA(X) (void)(X);
|
#define DATA(X) (void)(X);
|
||||||
|
|
||||||
uint32_t trezorui_poll_event(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void display_init(void)
|
void display_init(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ static int OFFSET[2] = {0, 0};
|
|||||||
#if defined STM32_HAL_H
|
#if defined STM32_HAL_H
|
||||||
#include "display-stmhal.h"
|
#include "display-stmhal.h"
|
||||||
#else
|
#else
|
||||||
#ifndef TREZORUI_NOUI
|
#ifndef TREZOR_NOUI
|
||||||
#include "display-unix-sdl.h"
|
#include "display-unix-sdl.h"
|
||||||
#else
|
#else
|
||||||
#include "display-unix-null.h"
|
#include "display-unix-null.h"
|
||||||
|
@ -7,10 +7,11 @@ MICROPY_PY_TREZORDEBUG = 1
|
|||||||
MICROPY_PY_TREZORMSG = 1
|
MICROPY_PY_TREZORMSG = 1
|
||||||
|
|
||||||
MICROPY_PY_TREZORUI = 1
|
MICROPY_PY_TREZORUI = 1
|
||||||
MICROPY_PY_TREZORUI_NOUI = 0
|
|
||||||
|
|
||||||
MICROPY_PY_TREZORUTILS = 1
|
MICROPY_PY_TREZORUTILS = 1
|
||||||
|
|
||||||
|
TREZOR_NOUI = 0
|
||||||
|
|
||||||
EXTMOD_DIR = ../../micropython/extmod
|
EXTMOD_DIR = ../../micropython/extmod
|
||||||
|
|
||||||
CFLAGS_EXTRA='-DMP_CONFIGFILE="../../../micropython/unix/mpconfigport.h"'
|
CFLAGS_EXTRA='-DMP_CONFIGFILE="../../../micropython/unix/mpconfigport.h"'
|
||||||
@ -85,10 +86,10 @@ ifeq ($(MICROPY_PY_TREZORUI),1)
|
|||||||
$(EXTMOD_DIR)/modtrezorui/font_robotomono_regular_20.c \
|
$(EXTMOD_DIR)/modtrezorui/font_robotomono_regular_20.c \
|
||||||
$(EXTMOD_DIR)/modtrezorui/modtrezorui.c \
|
$(EXTMOD_DIR)/modtrezorui/modtrezorui.c \
|
||||||
$(EXTMOD_DIR)/modtrezorui/trezor-qrenc/qr_encode.c
|
$(EXTMOD_DIR)/modtrezorui/trezor-qrenc/qr_encode.c
|
||||||
ifeq ($(MICROPY_PY_TREZORUI_NOUI),1)
|
ifeq ($(TREZOR_NOUI),1)
|
||||||
CFLAGS_MOD += -DTREZORUI_NOUI=1
|
CFLAGS_MOD += -DTREZOR_NOUI=1
|
||||||
else
|
else
|
||||||
LDFLAGS_MOD += -lSDL2 -lSDL2_image
|
LDFLAGS_MOD += -lSDL2
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -5,12 +5,16 @@
|
|||||||
* see LICENSE file for details
|
* see LICENSE file for details
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#ifndef TREZOR_NOUI
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
|
||||||
uint32_t touch_read(void)
|
uint32_t touch_read(void)
|
||||||
{
|
{
|
||||||
|
#ifndef TREZOR_NOUI
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
int x, y;
|
int x, y;
|
||||||
SDL_PumpEvents();
|
SDL_PumpEvents();
|
||||||
@ -48,5 +52,6 @@ uint32_t touch_read(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user