Skip to content

Commit

Permalink
feat(core): add BLE to t3w1 board
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
TychoVrahe committed Jan 6, 2025
1 parent 6dd6f52 commit 87610cc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
16 changes: 16 additions & 0 deletions core/embed/models/T3W1/boards/trezor_t3w1_revA.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,20 @@
#define SBU_2_PORT GPIOC
#define SBU_2_CLK_ENA __HAL_RCC_GPIOC_CLK_ENABLE

#define NRF_IN_GPIO0_PIN GPIO_PIN_7
#define NRF_IN_GPIO0_PORT GPIOE
#define NRF_IN_GPIO0_CLK_ENA __HAL_RCC_GPIOE_CLK_ENABLE
#define NRF_IN_FW_RUNNING_PIN GPIO_PIN_13
#define NRF_IN_FW_RUNNING_PORT GPIOE
#define NRF_IN_FW_RUNNING_CLK_ENA __HAL_RCC_GPIOE_CLK_ENABLE
#define NRF_OUT_RESET_PIN GPIO_PIN_0
#define NRF_OUT_RESET_PORT GPIOG
#define NRF_OUT_RESET_CLK_ENA __HAL_RCC_GPIOG_CLK_ENABLE
#define NRF_OUT_STAY_IN_BLD_PIN GPIO_PIN_15
#define NRF_OUT_STAY_IN_BLD_PORT GPIOE
#define NRF_OUT_STAY_IN_BLD_CLK_ENA __HAL_RCC_GPIOE_CLK_ENABLE
#define NRF_OUT_FW_RUNNING_PIN GPIO_PIN_11
#define NRF_OUT_FW_RUNNING_PORT GPIOE
#define NRF_OUT_FW_RUNNING_CLK_ENA __HAL_RCC_GPIOE_CLK_ENABLE

#endif // TREZOR_T3W1_REVA_H_
22 changes: 9 additions & 13 deletions core/site_scons/models/T3W1/trezor_t3w1_revA.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,17 @@ def configure(
features_available.append("haptic")
defines += ["USE_HAPTIC=1"]

# if "ble" in features_wanted:
# sources += ["embed/trezorhal/stm32f4/ble/ble_hal.c"]
# sources += ["embed/trezorhal/stm32f4/ble/dfu.c"]
# sources += ["embed/trezorhal/stm32f4/ble/fwu.c"]
# sources += ["embed/trezorhal/stm32f4/ble/ble.c"]
# sources += ["embed/trezorhal/stm32f4/ble/messages.c"]
# sources += [
# "vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c"
# ]
# features_available.append("ble")
# defines += [("USE_BLE", "1")]

if "ble" in features_wanted:
sources += ["embed/io/ble/stm32/ble.c"]
paths += ["embed/io/ble/inc"]
features_available.append("ble")
defines += [("USE_BLE", "1")]
sources += ["embed/io/nrf/stm32u5/nrf.c"]
sources += ["embed/io/nrf/crc8.c"]
paths += ["embed/io/nrf/inc"]
sources += [
"vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c"
"vendor/stm32u5xx_hal_driver/Src/stm32u5xx_hal_uart.c",
"vendor/stm32u5xx_hal_driver/Src/stm32u5xx_hal_uart_ex.c",
]

if "optiga" in features_wanted:
Expand Down

0 comments on commit 87610cc

Please sign in to comment.