mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-14 18:28:00 -06:00
spi_temperature: Provide a default value for spi_speed
All of the Maxim chips support a 4Mhz spi transfer rate, so use that as a default spi speed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
5b124d59f2
commit
63dffd9307
3 changed files with 3 additions and 7 deletions
|
@ -32,7 +32,7 @@ class SensorBase:
|
|||
pin = pin_params['pin']
|
||||
# SPI bus configuration
|
||||
spi_oid = mcu.create_oid()
|
||||
spi_speed = config.getint('spi_speed', minval=0)
|
||||
spi_speed = config.getint('spi_speed', 4000000, minval=1)
|
||||
mcu.add_config_cmd(
|
||||
"config_spi oid=%u bus=0 pin=%s mode=1 rate=%u shutdown_msg=" % (
|
||||
spi_oid, pin, spi_speed))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue