Skip to content

Commit

Permalink
chore(core): remove SBU interface from python
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
TychoVrahe committed Sep 25, 2024
1 parent 0636368 commit 75b45c3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 88 deletions.
66 changes: 0 additions & 66 deletions core/embed/extmod/modtrezorio/modtrezorio-sbu.h

This file was deleted.

7 changes: 0 additions & 7 deletions core/embed/extmod/modtrezorio/modtrezorio.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ uint32_t last_touch_sample_time = 0;
#include "modtrezorio-webusb.h"
#include "modtrezorio-usb.h"
// clang-format on
#ifdef USE_SBU
#include "modtrezorio-sbu.h"
#endif
#ifdef USE_SD_CARD
#include "modtrezorio-fatfs.h"
#include "modtrezorio-sdcard.h"
Expand Down Expand Up @@ -84,10 +81,6 @@ uint32_t last_touch_sample_time = 0;
STATIC const mp_rom_map_elem_t mp_module_trezorio_globals_table[] = {
{MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_trezorio)},

#ifdef USE_SBU
{MP_ROM_QSTR(MP_QSTR_SBU), MP_ROM_PTR(&mod_trezorio_SBU_type)},
#endif

#ifdef USE_SD_CARD
{MP_ROM_QSTR(MP_QSTR_fatfs), MP_ROM_PTR(&mod_trezorio_fatfs_module)},
{MP_ROM_QSTR(MP_QSTR_sdcard), MP_ROM_PTR(&mod_trezorio_sdcard_module)},
Expand Down
4 changes: 4 additions & 0 deletions core/embed/trezorhal/sbu.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@

#include "secbool.h"

#if KERNEL_MODE

void sbu_init(void);
void sbu_set(secbool sbu1, secbool sbu2);

#endif

#endif
4 changes: 4 additions & 0 deletions core/embed/trezorhal/stm32f4/sbu.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "sbu.h"

#if KERNEL_MODE

void sbu_init(void) {
GPIO_InitTypeDef GPIO_InitStructure = {0};

Expand All @@ -41,3 +43,5 @@ void sbu_set(secbool sbu1, secbool sbu2) {
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3,
sbu2 == sectrue ? GPIO_PIN_SET : GPIO_PIN_RESET);
}

#endif
15 changes: 0 additions & 15 deletions core/mocks/generated/trezorio/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@ def poll(ifaces: Iterable[int], list_ref: list, timeout_ms: int) -> bool:
"""


# extmod/modtrezorio/modtrezorio-sbu.h
class SBU:
"""
"""

def __init__(self) -> None:
"""
"""

def set(self, sbu1: bool, sbu2: bool) -> None:
"""
Sets SBU wires to sbu1 and sbu2 values respectively
"""


# extmod/modtrezorio/modtrezorio-usb.h
class USB:
"""
Expand Down

0 comments on commit 75b45c3

Please sign in to comment.