mirror of
git://soft.sys114.com/klipper
synced 2026-02-13 10:00:33 +09:00
atsamd: Use enumerations for buses and reserve pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -45,12 +45,6 @@ i2c_init(uint32_t bus, SercomI2cm *si)
|
||||
struct i2c_config
|
||||
i2c_setup(uint32_t bus, uint32_t rate, uint8_t addr)
|
||||
{
|
||||
#ifdef SERCOM7
|
||||
if (bus > 7)
|
||||
#else
|
||||
if (bus > 5)
|
||||
#endif
|
||||
shutdown("Unsupported i2c bus");
|
||||
Sercom *sercom = sercom_enable_pclock(bus);
|
||||
sercom_i2c_pins(bus);
|
||||
SercomI2cm *si = &sercom->I2CM;
|
||||
|
||||
Reference in New Issue
Block a user