mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 03:03:27 +00:00
stm32-l5: corrected alt function and other review comments
This commit is contained in:
committed by
deadprogram
parent
289e1aa197
commit
fcdaa83368
@@ -16,7 +16,7 @@ type UART struct {
|
|||||||
Buffer *RingBuffer
|
Buffer *RingBuffer
|
||||||
Bus *stm32.USART_Type
|
Bus *stm32.USART_Type
|
||||||
Interrupt interrupt.Interrupt
|
Interrupt interrupt.Interrupt
|
||||||
AltFuncSelector stm32.AltFunc
|
AltFuncSelector uint8
|
||||||
|
|
||||||
// Registers specific to the chip
|
// Registers specific to the chip
|
||||||
rxReg *volatile.Register32
|
rxReg *volatile.Register32
|
||||||
|
|||||||
@@ -219,7 +219,6 @@ func enableAltFuncClock(bus unsafe.Pointer) {
|
|||||||
stm32.RCC.APB1ENR1.SetBits(stm32.RCC_APB1ENR1_TIM3EN)
|
stm32.RCC.APB1ENR1.SetBits(stm32.RCC_APB1ENR1_TIM3EN)
|
||||||
case unsafe.Pointer(stm32.TIM2): // TIM2 clock enable
|
case unsafe.Pointer(stm32.TIM2): // TIM2 clock enable
|
||||||
stm32.RCC.APB1ENR1.SetBits(stm32.RCC_APB1ENR1_TIM2EN)
|
stm32.RCC.APB1ENR1.SetBits(stm32.RCC_APB1ENR1_TIM2EN)
|
||||||
|
|
||||||
case unsafe.Pointer(stm32.UCPD1): // UCPD1 clock enable
|
case unsafe.Pointer(stm32.UCPD1): // UCPD1 clock enable
|
||||||
stm32.RCC.APB1ENR2.SetBits(stm32.RCC_APB1ENR2_UCPD1EN)
|
stm32.RCC.APB1ENR2.SetBits(stm32.RCC_APB1ENR2_UCPD1EN)
|
||||||
case unsafe.Pointer(stm32.FDCAN1): // FDCAN1 clock enable
|
case unsafe.Pointer(stm32.FDCAN1): // FDCAN1 clock enable
|
||||||
@@ -232,7 +231,6 @@ func enableAltFuncClock(bus unsafe.Pointer) {
|
|||||||
stm32.RCC.APB1ENR2.SetBits(stm32.RCC_APB1ENR2_I2C4EN)
|
stm32.RCC.APB1ENR2.SetBits(stm32.RCC_APB1ENR2_I2C4EN)
|
||||||
case unsafe.Pointer(stm32.LPUART1): // LPUART1 clock enable
|
case unsafe.Pointer(stm32.LPUART1): // LPUART1 clock enable
|
||||||
stm32.RCC.APB1ENR2.SetBits(stm32.RCC_APB1ENR2_LPUART1EN)
|
stm32.RCC.APB1ENR2.SetBits(stm32.RCC_APB1ENR2_LPUART1EN)
|
||||||
|
|
||||||
case unsafe.Pointer(stm32.TIM17): // TIM17 clock enable
|
case unsafe.Pointer(stm32.TIM17): // TIM17 clock enable
|
||||||
stm32.RCC.APB2ENR.SetBits(stm32.RCC_APB2ENR_TIM17EN)
|
stm32.RCC.APB2ENR.SetBits(stm32.RCC_APB2ENR_TIM17EN)
|
||||||
case unsafe.Pointer(stm32.TIM16): // TIM16 clock enable
|
case unsafe.Pointer(stm32.TIM16): // TIM16 clock enable
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"inherits": ["cortex-m"],
|
"inherits": ["cortex-m"],
|
||||||
"llvm-target": "armv7m-none-eabi",
|
"llvm-target": "armv7m-none-eabi",
|
||||||
"cflags": [
|
"cflags": [
|
||||||
"--target=armv7m-none-eabi",
|
"--target=armv7m-none-eabi",
|
||||||
"-mfloat-abi=soft",
|
"-mfloat-abi=soft",
|
||||||
"-Qunused-arguments"
|
"-Qunused-arguments"
|
||||||
|
|||||||
Reference in New Issue
Block a user