[riot-notifications] [RIOT-OS/RIOT] cpu/sam0: sercom cleanup (#11581)

benpicco notifications at github.com
Sat May 25 19:20:44 CEST 2019

As requested by @dylad I've split the SERCOM cleanup form #11305 into a separate PR.

This is to rely not on the name of the MCU family but rather what is defined in the ASF header files to simplify porting the code to new MCU families that share the same peripherals.

It also removes some minor code duplication.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * sam0_common: periph/spi: use sercom_clk_en/dis()
  * sam0_common: replace sercom_id() calculation with switch statement
  * sam0_common: spi: use sercom_set_gen() instead of re-implementing it

-- File Changes --

    M cpu/sam0_common/include/periph_cpu_common.h (42)
    M cpu/sam0_common/periph/spi.c (23)

-- 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/20190525/94a1adbf/attachment.html>

More information about the notifications mailing list