mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 03:03:27 +00:00
all: format code according to Go 1.19 rules
Go 1.19 started reformatting code in a way that makes it more obvious how it will be rendered on pkg.go.dev. It gets it almost right, but not entirely. Therefore, I had to modify some of the comments so that they are formatted correctly.
This commit is contained in:
@@ -204,7 +204,8 @@ func (spi *SPI) hasHardwareCSPin() bool {
|
||||
// getClockDivisor finds the SPI prescalar that minimizes the error between
|
||||
// requested frequency and possible frequencies available with the LPSPI clock.
|
||||
// this routine is based on Teensyduino (libraries/SPI/SPI.cpp):
|
||||
// `void SPIClass::setClockDivider_noInline(uint32_t clk)`
|
||||
//
|
||||
// void SPIClass::setClockDivider_noInline(uint32_t clk)
|
||||
func (spi *SPI) getClockDivisor(freq uint32) uint32 {
|
||||
const clock = 132000000 // LPSPI root clock frequency (PLL2)
|
||||
d := uint32(clock)
|
||||
|
||||
Reference in New Issue
Block a user