mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
stm32wlx: I2C implementation for gnse,lora-e5,nucleo-wl55jc boards
This commit is contained in:
committed by
Ron Evans
parent
c35ce761aa
commit
2b1a72d112
@@ -283,6 +283,16 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 {
|
||||
return uint32(div) << stm32.SPI_CR1_BR_Pos
|
||||
}
|
||||
|
||||
//---------- I2C related code
|
||||
|
||||
// Gets the value for TIMINGR register
|
||||
func (i2c *I2C) getFreqRange() uint32 {
|
||||
// This is a 'magic' value calculated by STM32CubeMX
|
||||
// for 48Mhz PCLK1.
|
||||
// TODO: Do calculations based on PCLK1
|
||||
return 0x20303E5D
|
||||
}
|
||||
|
||||
//---------- UART related code
|
||||
|
||||
// Configure the UART.
|
||||
|
||||
Reference in New Issue
Block a user