From 7f829fe1538671800674d90a5ef47eb6f7a81cd7 Mon Sep 17 00:00:00 2001 From: ardnew <3837367+ardnew@users.noreply.github.com> Date: Tue, 1 Sep 2020 04:31:41 -0500 Subject: machine/stm32f4: refactor common code and add new build tag stm32f4 (#1332) * machine/STM32F4: break out STM32F4 machine with new build tag --- src/device/stm32/stm32f4-altfunc-bitfields.go | 28 +++++++++++++++++++++++ src/device/stm32/stm32f407xx-altfunc-bitfields.go | 26 --------------------- 2 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 src/device/stm32/stm32f4-altfunc-bitfields.go delete mode 100644 src/device/stm32/stm32f407xx-altfunc-bitfields.go (limited to 'src/device') diff --git a/src/device/stm32/stm32f4-altfunc-bitfields.go b/src/device/stm32/stm32f4-altfunc-bitfields.go new file mode 100644 index 000000000..8dca2bf28 --- /dev/null +++ b/src/device/stm32/stm32f4-altfunc-bitfields.go @@ -0,0 +1,28 @@ +// Hand created file. DO NOT DELETE. +// STM32FXXX (except stm32f1xx) bitfield definitions that are not +// auto-generated by gen-device-svd.go +// +build stm32f4 + +// Alternate function settings on the stm32f4 series + +package stm32 + +const ( + // Alternative peripheral pin functions + // AF0_SYSTEM is defined im the common bitfields package + AF1_TIM1_2 AltFunc = 1 + AF2_TIM3_4_5 = 2 + AF3_TIM8_9_10_11 = 3 + AF4_I2C1_2_3 = 4 + AF5_SPI1_SPI2 = 5 + AF6_SPI3 = 6 + AF7_USART1_2_3 = 7 + AF8_USART4_5_6 = 8 + AF9_CAN1_CAN2_TIM12_13_14 = 9 + AF10_OTG_FS_OTG_HS = 10 + AF11_ETH = 11 + AF12_FSMC_SDIO_OTG_HS_1 = 12 + AF13_DCMI = 13 + AF14 = 14 + AF15_EVENTOUT = 15 +) diff --git a/src/device/stm32/stm32f407xx-altfunc-bitfields.go b/src/device/stm32/stm32f407xx-altfunc-bitfields.go deleted file mode 100644 index 809cb203e..000000000 --- a/src/device/stm32/stm32f407xx-altfunc-bitfields.go +++ /dev/null @@ -1,26 +0,0 @@ -// These are the supported alternate function numberings on the stm32f407 -// +build stm32,stm32f407 - -// Alternate function settings on the stm32f4xx series - -package stm32 - -const ( - // Alternative peripheral pin functions - // AF0_SYSTEM is defined im the common bitfields package - AF1_TIM1_2 AltFunc = 1 - AF2_TIM3_4_5 = 2 - AF3_TIM8_9_10_11 = 3 - AF4_I2C1_2_3 = 4 - AF5_SPI1_SPI2 = 5 - AF6_SPI3 = 6 - AF7_USART1_2_3 = 7 - AF8_USART4_5_6 = 8 - AF9_CAN1_CAN2_TIM12_13_14 = 9 - AF10_OTG_FS_OTG_HS = 10 - AF11_ETH = 11 - AF12_FSMC_SDIO_OTG_HS_1 = 12 - AF13_DCMI = 13 - AF14 = 14 - AF15_EVENTOUT = 15 -) -- cgit v1.2.3