Marian Buschsieweke
c2c2cc8592
drivers/periph_gpio: let gpio_read() return bool
...
Since https://github.com/RIOT-OS/RIOT/pull/20935 gpio_write()
uses a `bool` instead of an `int`. This does the same treatment for
`gpio_read()`.
This does indeed add an instruction to `gpio_read()` implementations.
However, users caring about an instruction more are better served with
`gpio_ll_read()` anyway. And `gpio_read() == 1` is often seen in
newcomer's code, which would now work as expected.
2024-10-23 13:24:09 +02:00
Benjamin Valentin
4627f66caa
drivers/periph/gpio: make gpio_write() take a bool
2024-10-22 16:39:48 +02:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files
2024-03-26 14:54:22 +01:00
Marian Buschsieweke
1351c61c6a
cpu/efm32: expose pull up on GPIO_DISCONNECT
...
Allow enabling the pull on on `GPIO_DISCONNECT` and query that
correctly.
2024-02-05 08:21:51 +01:00
Marian Buschsieweke
922276296e
drivers/periph/gpio_ll: pass gpio_conf_t by value
...
Now that `gpio_conf_t` is on all implemented platforms no larger than
a register, we can more efficiently pass it by value rather than via
pointer.
2024-01-21 09:19:08 +01:00
Marian Buschsieweke
2a00ec13e5
drivers/periph/gpio_ll: shrink gpio_conf_t
...
This commit optimizes the `gpio_conf_t` type in the following
regards:
- The "base" `gpio_conf_t` is stripped from members that only some
platforms support, e.g. drive strength, slew rate, and disabling of
the Schmitt Trigger are no longer universally available but
platform-specific extensions
- The `gpio_conf_t` is now crammed into a bit-field that is 8 bit or
16 bit wide. This allows for storing lots of them e.g. in
`driver_foo_params_t` or `uart_conf_t` etc.
- A `union` of the `struct` with bit-field members and a `bits` is used
to allow accessing all bits in a simple C statement and to ensure
alignment for efficient handling of the type
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2024-01-21 08:38:40 +01:00
Gunar Schorcht
3499b822ee
cpu/efm32: add DAC support for EFM32 Series1 (VDAC)
2023-08-30 16:47:52 +02:00
Gunar Schorcht
817bb48843
cpu/efm32: fix DAC reference voltage configuration
...
The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.
2023-08-15 13:58:39 +02:00
chrysn
664b209e7a
cpu/efm32: pwm_init errors are zeros
2023-03-17 13:02:20 +01:00
chrysn
b04af7920c
efm32/dac: Shift instead of masking
...
Closes: https://github.com/RIOT-OS/RIOT/issues/19317
2023-02-25 13:38:56 +01:00
Gunar Schorcht
6d233f1308
cpu/efm32: enable usbdev_synopsys_dwc2 driver as periph_usbdev
2022-12-07 16:34:34 +01:00
Juergen Fitschen
a6ff838a4b
Merge pull request #18933 from jue89/feature/cpu_efm32_series_2_adc
...
cpu/efm32: add periph_adc support for Gecko Series 2
2022-11-24 11:32:56 +01:00
Juergen Fitschen
18e9167c73
cpu/efm32/adc: add support for Gecko Series 2
...
Series 2 features IADCs instead of ADCs.
2022-11-22 14:44:56 +01:00
Jue
80b491d7dd
cpu/efm32/uart: add modecfg support for Gecko Series 2
2022-11-21 23:17:52 +01:00
Jue
54e915e40d
cpu/efm32/timer_series2: sync STATUS register
...
Make sure the STATUS register has been synced between the different clock domains.
Especially the LETIMER needs some time to update the STATUS register after it has been enabled. If the LETIMER is started and stopped with just a short delay, pm_layered gets confused because the timer seems to be inactive ...
2022-10-28 11:34:55 +02:00
Jue
e6d18af3ad
cpu/efm32/timer_series2: fix timer_start() interaction with pm_layered
...
The timer hasn't been enabled yet, if the STATUS isn't RUNNING, yet ...
2022-10-28 11:34:55 +02:00
Jue
2ce1df5cd6
cpu/efm32/wdt: add series 2 support
2022-10-24 23:16:39 +02:00
Jue
ccf327a32b
cpu/efm32/hwrng: add series 2 periph driver
2022-10-24 23:16:39 +02:00
Jue
53e444ebc7
cpu/efm32/i2c: add series 2 support
2022-10-24 23:16:39 +02:00
Jue
2c2790dde2
cpu/efm32/spi: add series 2 support
2022-10-24 23:16:39 +02:00
Jue
568448f68c
cpu/efm32/timer: add series 2 periph driver
2022-10-24 23:16:39 +02:00
Jue
42c9a3c9f1
cpu/efm32/uart: add series 2 periph driver
2022-10-24 23:16:38 +02:00
Jue
2b1a260c43
cpu/efm32/gpio: fix clock enable sequence for series 2
2022-10-24 23:16:38 +02:00
Juergen Fitschen
67b380034a
cpu/efm32/pm: add debug output
2022-10-19 18:17:43 +02:00
Juergen Fitschen
360b36af16
cpu/efm32/pm: allow blocking EM1
...
Aligns pm logic to #17883
2022-10-19 17:51:12 +02:00
Jue
68625e5aa9
cpu/efm32/gpio: block power modes if IRQs are enabled
2022-10-18 23:30:08 +02:00
Jue
bc51071d44
cpu/efm32: define EFM power modes for pm_layered
2022-10-18 17:34:27 +02:00
Jue
f3d1773483
cpu/efm32/gpio: fix deprecated GPIO_IntConfig() call
2022-10-15 15:43:17 +02:00
MrKevinWeiss
9b6036def3
cpu/efm32/periph: remove seriesn in kconfig
...
As this is not handled in the makefile.dep it does not need to be modeled in kconfig.
2022-08-17 14:37:23 +02:00
chrysn
d90e0f1e85
cpu/efm32: Support pull-up/-down resistors
2022-05-03 19:32:08 +02:00
chrysn
e9a577c384
cpu/efm32: Document what is and is not implemented
...
Collapsing strengths as they'll stay unused for the time being.
2022-05-03 19:32:08 +02:00
chrysn
ed9cfba747
cpu/efm32: Push-pull support for GPIO_LL
2022-05-03 19:32:08 +02:00
chrysn
3264a1d51d
cpu/efm32: Minimal support for gpio_ll
2022-05-03 19:32:08 +02:00
Francisco Molina
d86828c53b
cpu/efm32: periph_rtt_series0/1 are not modules
2022-03-17 14:37:33 +01:00
Jue
4bb6a764ea
cpu/efm32: select series-specific drivers in periph Makefile
...
This will allow to share implementations across a subset of EFM32 series.
2022-02-17 11:09:24 +01:00
Gunar Schorcht
7405df2607
cpu/efm32/periph/wdt: fix compilation with NDEBUG
2021-12-12 13:18:46 +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
Leandro Lanzieri
805a77b13a
cpu/efm32: model Kconfig
2021-11-18 09:03:06 +01:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
...
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Karl Fessel
4ff30a31e5
cpu/efm32: add RTT_FREQUENCY support to efm32
...
make efm32 rtt frequency configurable by setting RTT_FREQUENCY
2021-04-20 11:12:45 +02:00
925056c829
cpu/efm32/periph/timer: fix timer_t -> tim_t
2020-11-23 12:33:28 +01:00
benpicco
d9598a0f54
Merge pull request #15412 from bergzand/pr/flashpage/merge_raw
...
periph_flashpage: Make pagewise API optional
2020-11-12 22:32:21 +01:00
9a79124fba
efm32: Adapt to flashpage/flashpage_pagewise API
2020-11-11 23:16:39 +01:00
Benjamin Valentin
bad385ab7c
cpu/efm32: RTC Series 0: use RTC helper functions
...
By using the RTC helper functions instead of POSIX mktime()/gmtime()
we can not only extend the RTC range beyond Y2038.
For tests/periph_rtc:
before:
text data bss dec hex filename
28028 248 2472 30748 781c stk3700/tests_periph_rtc.elf
after:
text data bss dec hex filename
19400 144 2424 21968 55d0 stk3700/tests_periph_rtc.elf
fixes #13277
2020-11-09 17:57:57 +01:00
Bas Stottelaar
6d472b5d23
cpu/efm32: extend timer isr
2020-11-04 22:11:49 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
...
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02:12 +01:00
Bas Stottelaar
22243aec7a
cpu/*: realign ENABLE_DEBUG
2020-10-23 00:46:26 +02:00
Bas Stottelaar
ab6188cea3
cpu/*: add missing include of assert.h
2020-10-22 11:13:08 +02:00
Bas Stottelaar
3e2303d30c
cpu/efm32: add watchdog peripheral
2020-10-07 09:01:41 +02:00
Benjamin Valentin
b2a9a6b168
cpu/efm32: fix build with !LETIMER
...
Not all SoCs have an LETIMER.
Here the compilation will will fail because LETIMER related
symbols are not defined.
Fix the build of timer.c for those.
2020-10-05 14:51:05 +02:00