1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

allow building unix port with no UI (TREZORUI_NOUI=1)

This commit is contained in:
Pavol Rusnak 2016-10-03 19:56:45 +02:00
parent c36ccfefb5
commit a36616d8e8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
5 changed files with 46 additions and 6 deletions

View File

@ -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

View 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;
}

View File

@ -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;

View File

@ -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

@ -1 +1 @@
Subproject commit fa1aa1bd97ee3ebfa65ee6ed8123f6bc9e2033d0
Subproject commit d34fe5c26e61b7f7ec3d8f0020a3c45af00c86b5