|
| 1 | +#pragma once |
| 2 | +#include "drivers/clocks.hh" |
| 3 | +#include "drivers/i2c_conf.hh" |
| 4 | +#include "drivers/leds.hh" |
| 5 | + |
| 6 | +namespace Board |
| 7 | +{ |
| 8 | +using RedLED = Led<GPIO::A, PinNum::_6, LedActive::High>; |
| 9 | +using GreenLED = Led<GPIO::A, PinNum::_6, LedActive::High>; |
| 10 | + |
| 11 | +using RedLED2 = RedLED; |
| 12 | +using GreenLED2 = GreenLED; |
| 13 | + |
| 14 | +using OrangeLED = RedLED2; |
| 15 | +using BlueLED = GreenLED; |
| 16 | + |
| 17 | +constexpr PinConf BootSelectPin{GPIO::A, PinNum::_14}; // DFU boot button |
| 18 | +constexpr bool UseBootSelect = true; |
| 19 | + |
| 20 | +constexpr bool UseFreezePin = true; |
| 21 | +constexpr PinConf FreezePin{GPIO::A, PinNum::_13}; // DEBUG3 pin |
| 22 | + |
| 23 | +constexpr uint32_t ConsoleUART = UART4_BASE; |
| 24 | +constexpr PinConf UartRX{GPIO::D, PinNum::_6, PinAF::AF_8}; |
| 25 | +constexpr PinConf UartTX{GPIO::D, PinNum::_8, PinAF::AF_8}; |
| 26 | + |
| 27 | +namespace NORFlash |
| 28 | +{ |
| 29 | +constexpr bool HasNORFlash = true; |
| 30 | +constexpr PinConf d2{GPIO::Unused, PinNum::_0}; |
| 31 | +constexpr PinConf d3{GPIO::Unused, PinNum::_0}; |
| 32 | +} // namespace NORFlash |
| 33 | + |
| 34 | +namespace PMIC |
| 35 | +{ |
| 36 | +constexpr bool HasSTPMIC = true; |
| 37 | +constexpr I2C_Config I2C_config{ |
| 38 | + .periph = I2C_Periph::I2C4_, |
| 39 | + .sda_pin = {GPIO::B, PinNum::_9, PinAF::AF_6}, |
| 40 | + .scl_pin = {GPIO::E, PinNum::_15, PinAF::AF_6}, |
| 41 | +}; |
| 42 | +} // namespace PMIC |
| 43 | + |
| 44 | +constexpr uint32_t HSE_Clock_Hz = 24'000'000; |
| 45 | +constexpr uint32_t MPU_MHz = 1000; |
| 46 | +constexpr auto ClockType = SystemClocks::HSEClockSource::Resonator; |
| 47 | + |
| 48 | +} // namespace Board |
0 commit comments