Benjamin Valentin
24e918ca19
cpu/sam0_common: adc: default to 0 for ADC_NEG_INPUT
2022-05-30 20:41:18 +02:00
Benjamin Valentin
d6d5d935a6
cpu/sam0_common: adc: derive GPIO pin from AIN number
...
ADC pins are fixed on sam0
2022-05-30 20:41:18 +02:00
Benjamin Valentin
8075b69275
cpu/sam0_common: adc: handle differential mode
...
- store result in int16_t to ensure proper sign extension
- double differential result to account for bit lost for sign
2022-05-30 20:41:18 +02:00
Benjamin Valentin
35588d46bd
cpu/sam0_common: adc: Automatically configure extref pin
2022-05-02 16:23:49 +02:00
9feb1ffa68
cpu/sam0_common: allow for setting the ADC device for each line
2022-03-17 11:44:40 +01:00
Benjamin Valentin
56654478d4
sam0/adc: work around ADC errata on SAM D5x/E5x
...
The ADC SYNCBUSY.SWTRIG gets stuck to '1' after wake-up from Standby Sleep mode.
Ignore the ADC `SYNCBUSY.SWTRIG` status bit, this functionality is not used by
the driver anyway.
2021-02-22 12:39:32 +01:00
Bas Stottelaar
22243aec7a
cpu/*: realign ENABLE_DEBUG
2020-10-23 00:46:26 +02:00
Benjamin Valentin
52a95642d5
sam0/adc: make driver MCU family agnostic
...
Replace checks for `CPU_SAMD21` with checks for actual defines.
2020-08-24 16:13:18 +02:00
János Brodbeck
083b3c167f
sam0/adc: add support for samd5x/same5x
...
Add samd5x/same5x support through introducing ADC_DEV as alias for ADC0/ADC1/ADC. ADC (respectively ADC0) is the default if no device is set.
2020-08-19 18:00:29 +02:00
Marian Buschsieweke
47cb59e6e5
cpu/sam0_common/periph: adc_sample() now returns int32_t
2020-01-10 14:13:15 +01:00
83215befd9
sam0: change ADC periph to return -1 on wrong resolution
...
The common ADC API dictates that a sample call must return -1 on an
incorrect resolution. The sam0 ADC implementation instead threw an
assertion failure.
2019-11-27 21:09:02 +01:00
7d2e10335d
sam0: remove duplicate _done()
call
2019-11-27 21:08:28 +01:00
Kees Bakker
04c84ed158
cpu/sam0: refactor ADC_0 into plain ADC
...
This change is for all boards with a sam0 cpu. This cpu just has one ADC.
It is unnecessary to have defines with ADC_0_ prefix as if multiple ADCs
are possible.
Some defines were not used, such as ADC_0_EN, ADC_0_CHANNELS,
ADC_MAX_CHANNELS, ADC_0_CLK_SOURCE, ADC_0_CHANNELS
Change all ADC_0_ prefixes to ADC_
2019-10-03 20:45:44 +02:00
Martine Lenders
39e90502af
sam0_common: check ADC_NUMOF on adc_init()
2019-02-04 09:28:13 +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
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
Dan Evans
4cc0e585d1
sam0/adc: assert resolution check fix
2017-06-08 11:04:11 -06:00
8501a03cbc
cleanup: apply enable_debug_false.cocci to codebase (coccinelle)
...
Skipped sys/cbor/cbor.c, examples/microcoap_server/microcoap_sock.c,
as they use different semantics.
2017-05-15 18:45:43 +02:00
dylad
44dd56c3e8
sam0/adc: merged samd21 & saml21 adc driver
...
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-05-12 21:02:17 +02:00