[riot-notifications] [RIOT-OS/RIOT] cpu/atmega*: Clean up timer configs (#14155)

Marian Buschsieweke notifications at github.com
Wed May 27 20:45:17 CEST 2020

### Contribution description

This PR moves the default configurations of `periph_timer` from `boards/common/atmega` to `cpu/<ATMEGA_CPU>`. This allows getting rid of many instances of `#if defined(CPU_ATEMGA<FOO>)`. 

With the current periph code 16 bit timers can only be used for `periph_timer`, and 8 bit timers only for `periph_pwm`. So there is nothing for the board to decide on anyway. Still, this PR allows overwriting the timer config from a boards `periph_conf.h` just by defining `TIMER_NUMOF` there.

### Testing procedure

`tests/periph_timer` should still compile and pass for ATmega boards.

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/atmega_common/periph_timer: Include periph_cpu
  * cpu/atmega32u4: Relocate default timer config
  * cpu/atmega{128rfa1,256rfr2}: Relocate default timer config
  * cpu/atmega328p: Relocate default timer config
  * cpu/atmega1284p: Relocate default timer config
  * cpu/atmega{1281,2560}: Relocate default timer config
  * cpu/atmega_common/periph_timer: Check for TIMER_NUMOF

-- File Changes --

    M boards/common/atmega/include/periph_conf_atmega_common.h (144)
    M cpu/atmega1281/include/periph_cpu.h (24)
    M cpu/atmega1284p/include/periph_cpu.h (22)
    M cpu/atmega128rfa1/include/periph_cpu.h (31)
    M cpu/atmega2560/include/periph_cpu.h (24)
    M cpu/atmega256rfr2/include/periph_cpu.h (31)
    M cpu/atmega328p/include/periph_cpu.h (16)
    M cpu/atmega32u4/include/periph_cpu.h (24)
    M cpu/atmega_common/periph/timer.c (5)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200527/f170449c/attachment.htm>

More information about the notifications mailing list