Browse Source

atsamd5x: fix BAUD value

pull/1389/head
sago35 4 years ago
committed by Ron Evans
parent
commit
8170f59440
  1. 3
      src/machine/machine_atsamd51.go

3
src/machine/machine_atsamd51.go

@ -1417,6 +1417,9 @@ func (spi SPI) Configure(config SPIConfig) error {
// Set synch speed for SPI
baudRate := SERCOM_FREQ_REF / (2 * config.Frequency)
if baudRate > 0 {
baudRate--
}
spi.Bus.BAUD.Set(uint8(baudRate))
// Enable SPI port.

Loading…
Cancel
Save