mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
modtrezorio: remove mocks
This commit is contained in:
parent
bc6d9b47a3
commit
48ef409fdb
@ -222,8 +222,11 @@ SOURCE_UNIX = [
|
||||
'vendor/micropython/ports/unix/moduselect.c',
|
||||
'vendor/micropython/ports/unix/alloc.c',
|
||||
'embed/unix/common.c',
|
||||
'embed/unix/touch.c',
|
||||
'embed/unix/flash.c',
|
||||
'embed/unix/sdcard.c',
|
||||
'embed/unix/sbu.c',
|
||||
'embed/unix/touch.c',
|
||||
'embed/unix/usb.c',
|
||||
]
|
||||
|
||||
SOURCE_EMIT_NATIVE = ['vendor/micropython/py/emitnative.c']
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "norcow.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "../../trezorhal/flash.h"
|
||||
#include "flash.h"
|
||||
|
||||
#ifndef NORCOW_SECTORS
|
||||
#define NORCOW_SECTORS {FLASH_SECTOR_STORAGE_1, FLASH_SECTOR_STORAGE_2}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __NORCOW_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../../trezorhal/secbool.h"
|
||||
#include "secbool.h"
|
||||
|
||||
/*
|
||||
* Storage parameters:
|
||||
|
@ -9,7 +9,8 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "norcow.h"
|
||||
#include "../../trezorhal/flash.h"
|
||||
#include "flash.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "../../trezorhal/secbool.h"
|
||||
#include "secbool.h"
|
||||
#include "py/obj.h"
|
||||
|
||||
void storage_init(void);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#include "../../trezorhal/flash.h"
|
||||
#include "flash.h"
|
||||
|
||||
/// class FlashOTP:
|
||||
/// '''
|
||||
|
@ -8,15 +8,11 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined TREZOR_STM32
|
||||
#include "usb.h"
|
||||
#include "touch.h"
|
||||
#include "pendsv.h"
|
||||
#elif defined TREZOR_UNIX
|
||||
#include "unix-msg-mock.h"
|
||||
#else
|
||||
#error Unsupported TREZOR port. Only STM32 and UNIX ports are supported.
|
||||
#endif
|
||||
|
||||
void pendsv_kbd_intr(void);
|
||||
void mp_hal_set_vcp_iface(int iface_num);
|
||||
|
||||
#define TOUCH_IFACE (255)
|
||||
#define POLL_READ (0x0000)
|
||||
|
@ -5,13 +5,7 @@
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#if defined TREZOR_STM32
|
||||
#include "sbu.h"
|
||||
#elif defined TREZOR_UNIX
|
||||
#include "unix-sbu-mock.h"
|
||||
#else
|
||||
#error Unsupported TREZOR port. Only STM32 and UNIX ports are supported.
|
||||
#endif
|
||||
|
||||
/// class SBU:
|
||||
/// '''
|
||||
|
@ -5,13 +5,7 @@
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#if defined TREZOR_STM32
|
||||
#include "sdcard.h"
|
||||
#elif defined TREZOR_UNIX
|
||||
#include "unix-sdcard-mock.h"
|
||||
#else
|
||||
#error Unsupported TREZOR port. Only STM32 and UNIX ports are supported.
|
||||
#endif
|
||||
|
||||
/// class SDCard:
|
||||
/// '''
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __TREZORUNIX_COMMON_H__
|
||||
#define __TREZORUNIX_COMMON_H__
|
||||
|
||||
#include "../trezorhal/secbool.h"
|
||||
#include "secbool.h"
|
||||
|
||||
void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg, const char *file, int line, const char *func);
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "../trezorhal/flash.h"
|
||||
#include "flash.h"
|
||||
|
||||
#ifndef FLASH_FILE
|
||||
#define FLASH_FILE "/var/tmp/trezor.config"
|
||||
#define FLASH_FILE "/var/tmp/trezor.flash"
|
||||
#endif
|
||||
|
||||
#define SECTOR_COUNT 24
|
||||
|
1
embed/unix/flash.h
Symbolic link
1
embed/unix/flash.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/flash.h
|
@ -5,7 +5,7 @@
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#include "../../trezorhal/sbu.h"
|
||||
#include "sbu.h"
|
||||
|
||||
void sbu_init(void)
|
||||
{
|
1
embed/unix/sbu.h
Symbolic link
1
embed/unix/sbu.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/sbu.h
|
@ -5,7 +5,7 @@
|
||||
* see LICENSE file for details
|
||||
*/
|
||||
|
||||
#include "../../trezorhal/sdcard.h"
|
||||
#include "sdcard.h"
|
||||
|
||||
void sdcard_init(void) {
|
||||
}
|
1
embed/unix/sdcard.h
Symbolic link
1
embed/unix/sdcard.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/sdcard.h
|
1
embed/unix/secbool.h
Symbolic link
1
embed/unix/secbool.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/secbool.h
|
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
|
||||
#include "options.h"
|
||||
#include "embed/trezorhal/touch.h"
|
||||
#include "touch.h"
|
||||
|
||||
void __shutdown(void);
|
||||
|
||||
|
1
embed/unix/touch.h
Symbolic link
1
embed/unix/touch.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/touch.h
|
@ -13,8 +13,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../../trezorhal/usb.h"
|
||||
#include "../../trezorhal/touch.h"
|
||||
#include "usb.h"
|
||||
#include "touch.h"
|
||||
|
||||
void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg, const char *file, int line, const char *func);
|
||||
|
1
embed/unix/usb.h
Symbolic link
1
embed/unix/usb.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/usb.h
|
1
embed/unix/usb_hid-defs.h
Symbolic link
1
embed/unix/usb_hid-defs.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/usb_hid-defs.h
|
1
embed/unix/usb_vcp-defs.h
Symbolic link
1
embed/unix/usb_vcp-defs.h
Symbolic link
@ -0,0 +1 @@
|
||||
../trezorhal/usb_vcp-defs.h
|
Loading…
Reference in New Issue
Block a user