Dylan Laduranty
a66eebb8ac
cpu/sam0/periph: remove bitfield usage in I2C driver
...
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-06-25 16:13:16 +02:00
d2433454b5
cpu/stm32: cpu/sam0_common: rename internal i2c _start function
2023-05-14 21:08:26 +02:00
Antonio Galea
ee76e21c33
sam0_common: use size_t len for I2C transfers, as declared ( fixes #19008 )
2022-12-04 16:57:00 +01:00
Gunar Schorcht
007e29ebb5
cpu/periph/i2c: update implementations to new I2C API
...
Make all `spi_acquire` implementations return `void` and add assertions to check for valid device identifier where missing.
2021-11-29 06:35:25 +01:00
MrKevinWeiss
cead7a5877
cpu/sam0/i2c: Handle read with I2C_NOSTOP flag
...
When using the I2C_NOSTOP flag the bus should remain in control.
The current check assumes it must go to idle when reading.
This adds a condition checks if the nostop flag is active
and expects the bus status to be the owner of the bus.
2021-07-01 14:50:54 +02:00
Benjamin Valentin
93d27bb9a0
cpu/sam0_common: I2C: add support for SAMD20
2021-01-12 15:48:39 +01:00
Bas Stottelaar
22243aec7a
cpu/*: realign ENABLE_DEBUG
2020-10-23 00:46:26 +02:00
Benjamin Valentin
7ed4979148
cpu/samd5x: define CPU_COMMON_SAMD5X symbol and use it
2020-08-24 16:13:18 +02:00
Benjamin Valentin
cc7f897cbc
cpu/saml1x: define CPU_COMMON_SAML1X symbol and use it
2020-08-24 16:13:18 +02:00
Benjamin Valentin
5d96151775
cpu/saml21: define CPU_COMMON_SAML21 symbol and use it
2020-08-24 16:13:18 +02:00
Benjamin Valentin
4df36cbfda
cpu/sam0_common: i2c: improve readability of baud rate calculation
...
Use variables to represent fSCL an fGCLK to make the baud rate calculation
more readable.
2020-07-25 15:14:55 +02:00
Benjamin Valentin
2fb0d9061f
cpu/sam0_common: i2c: fix High Speed
2020-07-25 15:14:55 +02:00
Benjamin Valentin
7269dc4e3a
cpu/sam0_common: i2c: allow arbitrary I2C frequencies
...
The Atmel I2C peripheral supports arbitrary I2C frequencies.
Since the `i2c_speed_t` enum just encodes the raw frequency values,
we can just use them in the peripheral definition.
We just have to remove the switch-case block that will generate an error
for values outside of `i2c_speed_t`.
2020-07-25 15:14:55 +02:00
Benjamin Valentin
8c502322f4
cpu/sam0_common: i2c: implement the periph_i2c_reconfigure feature
...
This adds sam0 implementations for
- i2c_init_pins()
- i2c_deinit_pins()
- i2c_pin_sda()
- i2c_pin_scl()
2020-05-05 16:12:19 +02:00
Benjamin Valentin
1496149bba
cpu/sam0: don't hard-code peripheral clocks
...
Instead of hard-coding the peripheral clocks to CLOCK_CORECLOCK
introduce helper functions to return the frequency of the individual
GCLKs and use those for baud-rate calculations.
This requires the GCLK to be part of the peripheral's config struct.
While this is already the case for most peripherals, this also adds
it for those where it wasn't used before.
As it defaults to 0 (CLOCK_CORECLOCK) no change is to be expected.
2020-02-04 21:06:21 +01:00
Benjamin Valentin
a51d167a43
cpu/sam0: use GCLK ID instead of bitmask
...
To simplify board definitions and for unification between samd2x and
newer models, don't use the GCLK bitmask in board definitions.
Instead use the GCLK index and generate the bitmask when needed.
2020-02-04 21:06:21 +01:00
Marian Buschsieweke
dd56b3bb71
cpu/sam0_common: Updated i2c_release()
2019-08-22 12:03:08 +02:00
Benjamin Valentin
f375b00ff3
cpu/samd5x: add support for samd5x/same5x MCUs
...
This adds supoprt for the Atmel SAMD51 & SAME54 SoC.
The SAME5x/SAMD5x is a line of Cortex-M4F MCUs that share peripherals
with the samd2x Cortex-M0+ and saml1x Cortex-M23 parts.
2019-06-06 16:47:11 +02:00
Dylan Laduranty
5dd51f2ec5
cpu/sam0_common: remove unneeded GCLK_SLOW setup in i2c driver
2019-01-22 09:29:42 +01:00
Dylan Laduranty
9450fa7dc3
cpu/sam0_common: add support for saml10/saml11
...
Add SAML10/SAML11 support through SAM0 because hardware IP are the same so reuse to avoid duplication
2019-01-21 17:06:58 +01:00
13654a950b
cpu/samr30: add support for samr30g18a
...
Co-authored-by: biboc <bapclenet@gmail.com>
2018-10-01 10:15:08 +02:00
smlng
90f66a1952
cpu/sam0_common/i2c: fix ambiguous reg assignment
...
The value assigned to the register was unclear due to usage
of bit-comparison and ternary operator, added parentheses to
make it explicit.
2018-07-25 12:01:40 +02:00
dylad
e6bd6bfe3b
sam0/i2c: update driver to new API
2018-07-25 12:01:34 +02:00
Hauke Petersen
ec27204408
cpu/sam0: fixed cppcheck issue in i2c driver
2017-11-09 13:53:15 +01:00
Hauke Petersen
b3962f8d2c
cpu/sam0: removed guards form periph drivers
2017-11-09 12:57:02 +01:00
smlng
692cf96297
doc: fix doxygen grouping of cpu periph drivers
2017-06-26 14:42:11 +02:00
Antonio Galea
dae3472d49
cpu/sam0_common: add saml21 i2c driver adaption
2017-06-23 11:19:56 +02:00
biboc
0e41861db0
Change my email address:
...
<baptiste.clenet@xsoen.com>
to
<bapclenet@gmail.com>
2017-06-19 10:38:16 +02:00
Kees Bakker
2cbd3c4819
cpu/sam21:i2c: function _start was declared inline, but definition not
2017-01-18 21:30:13 +01:00
Kees Bakker
d509221e77
cpu/samd21:i2c: increase timeout in _start to facilitate SHT2x hold
2017-01-18 21:30:13 +01:00
Kees Bakker
bf4741d0d7
cpu/sam21_common:i2c: refactor a function to wait for response
2017-01-18 21:30:13 +01:00
Kees Bakker
8ca8640060
cpu/sam21_common:i2c: uncrustify
2017-01-18 21:30:13 +01:00
Hauke Petersen
fcb1e68732
cpu/sam0: renamed sam21_common to sam0_common
2016-12-15 11:47:03 +01:00