Rework pwr_driver (#7212)

PWR driver rework
This commit is contained in:
3djc
2020-01-03 12:18:52 +01:00
committed by Bertrand Songis
parent abc70f1a5a
commit de07f0dde4
8 changed files with 56 additions and 145 deletions
+9 -1
View File
@@ -160,6 +160,14 @@ elseif(PCB STREQUAL X7)
set(BLUETOOTH YES)
add_definitions(-DBLUETOOTH_PROBE)
set(ROTARY_ENCODER YES)
if(DEFINED PCBREV_HARDCODED)
# This *can* be used to prevent messing with PA14 (SWCLK), so stlink can be used
# without interruptions.
if(NOT ${PCBREV_HARDCODED} MATCHES "^[0-1]$")
message(FATAL_ERROR "PCBREV_HARDCODED must be 0 or 1, not '${PCBREV_HARDCODED}'")
endif()
add_definitions(-DPCBREV_HARDCODED=${PCBREV_HARDCODED})
endif()
endif()
elseif(PCB STREQUAL X9LITE)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
@@ -379,7 +387,7 @@ set(FIRMWARE_TARGET_SRC
${LCD_DRIVER}
board.cpp
i2c_driver.cpp
pwr_driver.cpp
../common/arm/stm32/pwr_driver.cpp
../common/arm/loadboot.cpp
)