Skip to content

Commit

Permalink
cpu/sam0_common: fix static checks in periph_cpu_common.h
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Jan 18, 2023
1 parent 9dcb399 commit bfe2391
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpu/sam0_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bfe2391

Please # to comment.