1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

288 Commits

Author SHA1 Message Date
Marian Buschsieweke
04ab5a74f3
cpu/atmega_common: implement periph/gpio_ll{,_irq}
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2022-05-02 14:44:55 +02:00
Niels Gandraß
41e8a57960
cpu/atmega_common: Remember CTC mode with timer_periodic 2021-12-13 12:08:38 +01:00
b7e9d4fad2 cpu/atmega_common: also enlarge idle stack for ztimer64 2021-12-08 13:49:25 +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
845681448d
cpu/atmega_common: move PCINT documentation from boards 2021-11-22 12:25:57 +01:00
Leandro Lanzieri
b8e2e3ce66
cpu/atmega_common: model Kconfig 2021-11-22 12:25:29 +01:00
Marian Buschsieweke
d91c9cdc5a
cpu/atmega_common: make cppcheck happy 2021-11-16 16:20:26 +01:00
Marian Buschsieweke
35a1b60068
cpu/{atxmega,atmega_common}: fix invalid use of PSTR()
core_panic() doesn't expect the message to be in program memory, but
in data memory. Bad things will happen on AVR when the address is
interpreted as being in data address space, but the allocation is
done in program address space.
2021-09-30 17:15:39 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02: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
Benjamin Valentin
87f7e5a963 cpu/atmega_common: move clock init to common code
This code should not be in the realm of the board config, but in
common arch code.
2021-08-27 17:06:50 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
benpicco
619a444741
Merge pull request #16347 from benpicco/drivers/rtt_rtc-rtc_get_time_ms
drivers/rtt_rtc: implement rtc_get_time_ms()
2021-05-05 19:13:21 +02:00
Benjamin Valentin
7c1b5630d2 cpu/atmega_common: RTC: implement rtc_get_time_ms() 2021-05-04 23:17:05 +02:00
Benjamin Valentin
5ea85ca433 cpu/atmega_common: RTC: get rid of isr_flag 2021-05-04 23:14:35 +02:00
Benjamin Valentin
2d706b3295 cpu/atmega_common: RTC: fix off-by-one normalisation 2021-05-04 17:56:13 +02:00
Benjamin Valentin
d47a880915 cpu: add periph_rtt_overflow feature
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.

This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Marian Buschsieweke
5cc62437da
cpu/avr8_common: move ldscripts from atmega_common
The ldscripts are already used for both ATmega and ATxmega, so it
makes sense to have them in the common folder.
2021-03-30 10:50:09 +02:00
Gerson Fernando Budke
70c597620f cpu/avr8_common: Differentiate avr8 cpu cores
Current there is no way to split code between ATmega and ATxmega in
drivers.  This differentiate AVR8 cores into MEGAs and XMEGAs.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Francisco
fc82e3916e
Merge pull request #15931 from haukepetersen/add_dbgpin3
sys: add `dbgpin` module for debugging and profiling (take 2)
2021-03-09 10:26:37 +01:00
Marian Buschsieweke
ab89234040
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-08 14:16:46 +01:00
Marian Buschsieweke
b9cb75fedf
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-04 18:05:06 +01:00
Hauke Petersen
91f9d7db62 cpu/atmega_common/kconfig: add dbgpin feature 2021-02-26 11:34:52 +01:00
Hauke Petersen
71e9a9e216 cpu/atmega_common: add dbgpin initialization 2021-02-26 11:34:52 +01:00
Joakim Nohlgård
6adeec09e9 atmega_common: add arch specific XFA ldscript to properly place .roxfa 2021-02-16 14:55:26 +01:00
Gerson Fernando Budke
1426e15679 cpu/avr8_common: Normalize method prefix name
Refactor atmega_ prefix to avr8_ prefix and update copyrights.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:29:42 -03:00
Gerson Fernando Budke
4cbd311196 cpu: Refact atmega_common into avr8_common
Split atmega_common code into avr8_common folder.  This moves common
avr8 code to be used for all avr8 variants: tiny, mega and xmega.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:29:22 -03:00
Gerson Fernando Budke
a0028a9ff8 cpu/atmega_common: Split cpu.c into atmega_cpu/cpu.c
Split cpu.c file into cpu.c and atmega_cpu.c files.  This extract mega
specific code from common code.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:17:05 -03:00
Gerson Fernando Budke
4d68dd5aea cpu/atmega_common: Extract clock definitions
Refactor clock definitions from cpu.h to clock.h.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:17:05 -03:00
Marian Buschsieweke
4714e38911
cpu/atmega_common: drop unused module
The module cpu_atmega_common_cxx seems to be non-existing and not used. It is
unclear whether this slipped in by accident or if this was actually useful at
some point in time. In any case, the module is not present (anymore) and cannot
be used, so let's clean up the Makefile.
2021-01-06 20:46:56 +01:00
Marian Buschsieweke
902aa29b62
sys/malloc_thread_safe: split out of cpu/atmega_common
Split out Gunar Schorcht's clever approach to provide thread safe malloc for
AVR into a system module and make AVR depend on this. This allows other
platforms to also use this.
2020-12-17 15:39:05 +01:00
Marian Buschsieweke
dd48ced151
cpu/*/atomic_utils_arch.h: Add volatile qualifier 2020-11-24 14:00:52 +01:00
792e031a95
Merge pull request #14331 from maribu/atomic_utils
sys/atomic_utils: Functions for atomic access
2020-11-12 21:44:53 +01:00
Marian Buschsieweke
a892c1aa23
cpu/atmega_common: Add atomic_utils_arch.h 2020-11-10 10:55:14 +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
fb61443bbd cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Leandro Lanzieri
fe6d66d92a
kconfig: add ERROR symbol for conflicting modules 2020-10-09 18:04:17 +02:00
Marian Buschsieweke
4abbda5b3e
cpu/atmega_common: Add architecture_arch.h 2020-09-29 12:33:59 +02:00
Leandro Lanzieri
67aec8392c
cpu/atmega_common: use stdio_uart only when no other is defined 2020-08-19 10:00:26 +02:00
Marian Buschsieweke
fa12d9ad52
cpu/atmega_common: Don't access sched_active_*
Replaced accesses to sched_active_* with API calls in C files
2020-08-17 11:26:19 +02:00
Francisco
7e6fee8260
Merge pull request #14615 from maribu/atmega-idle-stack-size
cpu/atmega_common: Increase idle stack size with xtimer
2020-07-30 14:43:20 +02:00
Marian Buschsieweke
040bad0425
cpu/atmega_common: increase stack size with xtimer
If a timer triggers while the idle thread is running, previously a stack
overflow was triggered. This commit increases the idle threads stack size if
xtimer is used.
2020-07-27 16:52:36 +02:00
Marian Buschsieweke
7b49310147
cpu/atmega_common: Enable cpp feature 2020-07-24 15:22:34 +02:00
Benjamin Valentin
96273b4df0 cpu/atmega_common: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
Leandro Lanzieri
873badcd76
cpu/atmega_common: Add ATmega128 family Kconfig symbol 2020-06-22 15:19:35 +02:00
Leandro Lanzieri
19bdb11548
cpu/atmega_common: Add Kconfig symbols 2020-06-17 10:52:23 +02:00
benpicco
49aef1b678
Merge pull request #13902 from benpicco/periph_timer_periodic
periph/timer: add timer_set_periodic()
2020-05-28 18:03:32 +02:00
Benjamin Valentin
c000a77658 cpu/atmega_common: implement timer_set_periodic() 2020-05-28 17:37:42 +02:00