1 /* 2 * Copyright (c) 2017 Oticon A/S 3 * Copyright (c) 2023 Nordic Semiconductor ASA 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 #ifndef _NRF_HW_MODEL_CLOCK_H 8 #define _NRF_HW_MODEL_CLOCK_H 9 10 #include "bs_types.h" 11 12 #ifdef __cplusplus 13 extern "C"{ 14 #endif 15 16 void nhw_clock_TASKS_LFCLKSTART(uint i); 17 void nhw_clock_TASKS_LFCLKSTOP(uint i); 18 void nhw_clock_TASKS_HFCLKSTART(uint i); 19 void nhw_clock_TASKS_HFCLKSTOP(uint i); 20 void nhw_clock_TASKS_CAL(uint i); 21 void nhw_clock_TASKS_CTSTART(uint inst); 22 void nhw_clock_TASKS_CTSTOP(uint inst); 23 void nhw_CLOCK_regw_sideeffects_INTENSET(uint i); 24 void nhw_CLOCK_regw_sideeffects_INTENCLR(uint i); 25 void nhw_CLOCK_regw_sideeffects_TASKS_LFCLKSTART(uint i); 26 void nhw_CLOCK_regw_sideeffects_TASKS_LFCLKSTOP(uint i); 27 void nhw_CLOCK_regw_sideeffects_TASKS_HFCLKSTART(uint i); 28 void nhw_CLOCK_regw_sideeffects_TASKS_HFCLKSTOP(uint i); 29 void nhw_CLOCK_regw_sideeffects_TASKS_HFCLKAUDIOSTART(uint i); 30 void nhw_CLOCK_regw_sideeffects_TASKS_HFCLKAUDIOSTOP(uint i); 31 void nhw_CLOCK_regw_sideeffects_TASKS_HFCLK192MSTART(uint i); 32 void nhw_CLOCK_regw_sideeffects_TASKS_HFCLK192MSTOP(uint i); 33 void nhw_CLOCK_regw_sideeffects_TASKS_CAL(uint i); 34 void nhw_CLOCK_regw_sideeffects_TASKS_CTSTART(uint i); 35 void nhw_CLOCK_regw_sideeffects_TASKS_CTSTOP(uint i); 36 /* Side-effecting function when any event register is written: */ 37 void nhw_pwrclk_regw_sideeffects_EVENTS_all(uint i); 38 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_HFCLKSTART(uint i); 39 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_HFCLKSTOP(uint i); 40 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_LFCLKSTART(uint i); 41 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_LFCLKSTOP(uint i); 42 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_CAL(uint i); 43 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_HFCLKAUDIOSTART(uint i); 44 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_HFCLKAUDIOSTOP(uint i); 45 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_HFCLK192MSTART(uint i); 46 void nhw_CLOCK_regw_sideeffects_SUBSCRIBE_HFCLK192MSTOP(uint i); 47 48 #if (NHW_HAS_PPI) 49 void nhw_clock0_TASKS_LFCLKSTART(void); 50 void nhw_clock0_TASKS_LFCLKSTOP(void); 51 void nhw_clock0_TASKS_HFCLKSTART(void); 52 void nhw_clock0_TASKS_HFCLKSTOP(void); 53 void nhw_clock0_TASKS_CAL(void); 54 void nhw_clock0_TASKS_CTSTART(void); 55 void nhw_clock0_TASKS_CTSTOP(void); 56 #endif /* (NHW_HAS_PPI) */ 57 58 union NRF_CLKPWR_Type { 59 NRF_CLOCK_Type CLK; 60 NRF_POWER_Type PWR; 61 #if (NHW_CLKPWR_HAS_RESET) 62 NRF_RESET_Type RST; 63 #endif /* (NHW_CLKPWR_HAS_RESET) */ 64 }; 65 66 extern union NRF_CLKPWR_Type NRF_CLKPWR_regs[]; 67 68 #ifdef __cplusplus 69 } 70 #endif 71 72 #endif 73