Lines Matching refs:id
19 void soc_pmc_peripheral_enable(uint32_t id) in soc_pmc_peripheral_enable() argument
21 __ASSERT(id < ID_PERIPH_COUNT, "Invalid peripheral id"); in soc_pmc_peripheral_enable()
23 if (id < 32) { in soc_pmc_peripheral_enable()
24 PMC->PMC_PCER0 = BIT(id); in soc_pmc_peripheral_enable()
26 } else if (id < 64) { in soc_pmc_peripheral_enable()
27 PMC->PMC_PCER1 = BIT(id & 0x1F); in soc_pmc_peripheral_enable()
36 void soc_pmc_peripheral_disable(uint32_t id) in soc_pmc_peripheral_disable() argument
38 __ASSERT(id < ID_PERIPH_COUNT, "Invalid peripheral id"); in soc_pmc_peripheral_disable()
40 if (id < 32) { in soc_pmc_peripheral_disable()
41 PMC->PMC_PCDR0 = BIT(id); in soc_pmc_peripheral_disable()
43 } else if (id < 64) { in soc_pmc_peripheral_disable()
44 PMC->PMC_PCDR1 = BIT(id & 0x1F); in soc_pmc_peripheral_disable()
53 uint32_t soc_pmc_peripheral_is_enabled(uint32_t id) in soc_pmc_peripheral_is_enabled() argument
55 __ASSERT(id < ID_PERIPH_COUNT, "Invalid peripheral id"); in soc_pmc_peripheral_is_enabled()
57 if (id < 32) { in soc_pmc_peripheral_is_enabled()
58 return (PMC->PMC_PCSR0 & BIT(id)) != 0; in soc_pmc_peripheral_is_enabled()
60 } else if (id < 64) { in soc_pmc_peripheral_is_enabled()
61 return (PMC->PMC_PCSR1 & BIT(id & 0x1F)) != 0; in soc_pmc_peripheral_is_enabled()