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

pull/25/head
Pavol Rusnak 8 years ago
parent c36ccfefb5
commit a36616d8e8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

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

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

@ -1 +1 @@
Subproject commit fa1aa1bd97ee3ebfa65ee6ed8123f6bc9e2033d0
Subproject commit d34fe5c26e61b7f7ec3d8f0020a3c45af00c86b5
Loading…
Cancel
Save