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

cpu/sam0_common: fix static checks in periph_cpu_common.h

This commit is contained in:
Benjamin Valentin 2023-01-18 01:54:34 +01:00
parent 9dcb3991d2
commit bfe2391148

View File

@ -719,12 +719,13 @@ static inline void sercom_clk_dis(void *sercom)
#ifdef CPU_COMMON_SAMD5X
static inline uint8_t _sercom_gclk_id_core(uint8_t sercom_id) {
if (sercom_id < 2)
if (sercom_id < 2) {
return sercom_id + 7;
if (sercom_id < 4)
} else if (sercom_id < 4) {
return sercom_id + 21;
else
} else {
return sercom_id + 30;
}
}
#endif