mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-27 15:51:02 +00:00
refactor(core): define model-specific include files in site-scons
[no changelog]
This commit is contained in:
parent
26bde15429
commit
bdc054235c
@ -1,22 +1,3 @@
|
||||
#ifndef MODELS_MODEL_H_
|
||||
#define MODELS_MODEL_H_
|
||||
#pragma once
|
||||
|
||||
#if defined TREZOR_MODEL_T2T1
|
||||
#include "T2T1/versions.h"
|
||||
#elif defined TREZOR_MODEL_T2B1
|
||||
#include "T2B1/versions.h"
|
||||
#elif defined TREZOR_MODEL_T3T1
|
||||
#include "T3T1/versions.h"
|
||||
#elif defined TREZOR_MODEL_T3B1
|
||||
#include "T3B1/versions.h"
|
||||
#elif defined TREZOR_MODEL_T3W1
|
||||
#include "T3W1/versions.h"
|
||||
#elif defined TREZOR_MODEL_D001
|
||||
#include "D001/versions.h"
|
||||
#elif defined TREZOR_MODEL_D002
|
||||
#include "D002/versions.h"
|
||||
#else
|
||||
#error Unknown Trezor model
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include VERSIONS_HEADER
|
||||
|
@ -1,25 +1,5 @@
|
||||
#ifndef MODELS_MODEL_H_
|
||||
#define MODELS_MODEL_H_
|
||||
#pragma once
|
||||
|
||||
#include <util/flash_layout.h>
|
||||
#include "otp_layout.h"
|
||||
|
||||
#if defined TREZOR_MODEL_T2T1
|
||||
#include "T2T1/model_T2T1.h"
|
||||
#elif defined TREZOR_MODEL_T2B1
|
||||
#include "T2B1/model_T2B1.h"
|
||||
#elif defined TREZOR_MODEL_T3T1
|
||||
#include "T3T1/model_T3T1.h"
|
||||
#elif defined TREZOR_MODEL_T3B1
|
||||
#include "T3B1/model_T3B1.h"
|
||||
#elif defined TREZOR_MODEL_T3W1
|
||||
#include "T3W1/model_T3W1.h"
|
||||
#elif defined TREZOR_MODEL_D001
|
||||
#include "D001/model_D001.h"
|
||||
#elif defined TREZOR_MODEL_D002
|
||||
#include "D002/model_D002.h"
|
||||
#else
|
||||
#error Unknown Trezor model
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include MODEL_HEADER
|
||||
|
@ -13,6 +13,9 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
|
||||
defines += (("MODEL_HEADER", '"D001/model_D001.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"D001/versions.h"'),)
|
||||
return configure(env, features_wanted, defines, sources, paths)
|
||||
|
||||
|
||||
|
@ -13,6 +13,8 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
defines += (("MODEL_HEADER", '"D002/model_D002.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"D002/versions.h"'),)
|
||||
return configure(env, features_wanted, defines, sources, paths)
|
||||
|
||||
|
||||
|
@ -13,6 +13,9 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
defines += (("MODEL_HEADER", '"T2B1/model_T2B1.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"T2B1/versions.h"'),)
|
||||
|
||||
# Set default revision if None
|
||||
revision = revision or 10
|
||||
|
||||
|
@ -14,6 +14,9 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
defines += (("MODEL_HEADER", '"T2T1/model_T2T1.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"T2T1/versions.h"'),)
|
||||
|
||||
if revision == "emulator":
|
||||
return emul(env, features_wanted, defines, sources, paths)
|
||||
else:
|
||||
|
@ -13,6 +13,9 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
defines += (("MODEL_HEADER", '"T3B1/model_T3B1.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"T3B1/versions.h"'),)
|
||||
|
||||
# Set default revision if None
|
||||
revision = revision or "B"
|
||||
|
||||
|
@ -13,6 +13,9 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
defines += (("MODEL_HEADER", '"T3T1/model_T3T1.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"T3T1/versions.h"'),)
|
||||
|
||||
# Set default revision if None
|
||||
revision = revision or "E"
|
||||
|
||||
|
@ -13,6 +13,9 @@ def configure_board(
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
):
|
||||
defines += (("MODEL_HEADER", '"T3W1/model_T3W1.h"'),)
|
||||
defines += (("VERSIONS_HEADER", '"T3W1/versions.h"'),)
|
||||
|
||||
# Set default revision if None
|
||||
revision = revision or "A"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user