mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
allow building unix port with no UI (TREZORUI_NOUI=1)
This commit is contained in:
parent
c36ccfefb5
commit
a36616d8e8
@ -62,6 +62,6 @@ ssize_t msg_send(uint8_t iface, const uint8_t *buf, size_t len)
|
||||
}
|
||||
|
||||
// from modtrezorui:
|
||||
uint32_t trezorui_poll_sdl_event(void);
|
||||
uint32_t trezorui_poll_event(void);
|
||||
|
||||
#define msg_poll_ui_event trezorui_poll_sdl_event
|
||||
#define msg_poll_ui_event trezorui_poll_event
|
||||
|
36
extmod/modtrezorui/display-unix-null.h
Normal file
36
extmod/modtrezorui/display-unix-null.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) Pavol Rusnak, SatoshiLabs
|
||||
*
|
||||
* Licensed under TREZOR License
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#define CMD(X) (void)(X);
|
||||
#define DATA(X) (void)(X);
|
||||
|
||||
uint32_t trezorui_poll_event(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void display_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void display_set_window(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
|
||||
{
|
||||
}
|
||||
|
||||
void display_refresh(void)
|
||||
{
|
||||
}
|
||||
|
||||
int display_orientation(int degrees)
|
||||
{
|
||||
return ORIENTATION;
|
||||
}
|
||||
|
||||
int display_backlight(int val)
|
||||
{
|
||||
return BACKLIGHT;
|
||||
}
|
@ -5,8 +5,8 @@
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#define DISPLAY_BORDER 16
|
||||
|
||||
@ -33,7 +33,7 @@ void DATA(uint8_t x) {
|
||||
}
|
||||
|
||||
// this should match values used in msg_poll_ui_event() in modtrezormsg/modtrezormsg-stmhal.h
|
||||
uint32_t trezorui_poll_sdl_event(void)
|
||||
uint32_t trezorui_poll_event(void)
|
||||
{
|
||||
SDL_Event event;
|
||||
int x, y;
|
@ -21,7 +21,11 @@ static int ORIENTATION = 0;
|
||||
#if defined STM32_HAL_H
|
||||
#include "display-stmhal.h"
|
||||
#else
|
||||
#include "display-unix.h"
|
||||
#ifndef TREZORUI_NOUI
|
||||
#include "display-unix-sdl.h"
|
||||
#else
|
||||
#include "display-unix-null.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// common display functions
|
||||
|
2
vendor/micropython
vendored
2
vendor/micropython
vendored
@ -1 +1 @@
|
||||
Subproject commit fa1aa1bd97ee3ebfa65ee6ed8123f6bc9e2033d0
|
||||
Subproject commit d34fe5c26e61b7f7ec3d8f0020a3c45af00c86b5
|
Loading…
Reference in New Issue
Block a user