aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsamd/i2c.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-03-31 23:37:17 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-04-04 18:29:31 -0400
commitbc9fd03dabc38ae55fae3151e94cffe7157b95bd (patch)
treebee1984f5afd76e6c4d9e013d8984076dd90e422 /src/atsamd/i2c.c
parent7e8ecfe177945e10a1e4adaac64c1d803e9405ff (diff)
downloadkutter-bc9fd03dabc38ae55fae3151e94cffe7157b95bd.tar.gz
kutter-bc9fd03dabc38ae55fae3151e94cffe7157b95bd.tar.xz
kutter-bc9fd03dabc38ae55fae3151e94cffe7157b95bd.zip
atsamd: Use enumerations for buses and reserve pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/atsamd/i2c.c')
-rw-r--r--src/atsamd/i2c.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/atsamd/i2c.c b/src/atsamd/i2c.c
index e5e0a379..a5c128cc 100644
--- a/src/atsamd/i2c.c
+++ b/src/atsamd/i2c.c
@@ -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;