1 // 2 // Copyright (c) 2010-2025 Antmicro 3 // Copyright (c) 2022-2025 Silicon Labs 4 // 5 // This file is licensed under the MIT License. 6 // Full license text is available in 'licenses/MIT.txt'. 7 // 8 9 using System; 10 using System.IO; 11 using System.Collections.Generic; 12 using Antmicro.Renode.Core; 13 using Antmicro.Renode.Core.Structure.Registers; 14 using Antmicro.Renode.Logging; 15 using Antmicro.Renode.Exceptions; 16 using Antmicro.Renode.Peripherals.CPU; 17 using Antmicro.Renode.Peripherals.Bus; 18 19 namespace Antmicro.Renode.Peripherals.Miscellaneous.SiLabs 20 { 21 public enum HFXO_REQUESTER 22 { 23 NONE = 0, 24 PRS = 1, 25 FORCEEN = 2, 26 HWREQ = 3, 27 SYSRTC = 4, 28 } 29 30 public interface IHFXO_EFR32xG2 31 { 32 /// <summary> 33 /// Event which is invoked upon enabling the HFXO (Setting ENS in the status register). 34 /// </summary> 35 event Action HfxoEnabled; 36 37 /// <summary> 38 /// Method which is called by the CMU (or potentially other infrastructure peripherals) when the HFXO is selected 39 /// by the CMU as a clock source so that the HFXO updates its internal states. 40 /// </summary> OnClksel()41 void OnClksel(); 42 43 /// <summary> 44 /// Method which is called by the PRS when HFXO is meant to receive a signal from the PRS to wake up. 45 /// </summary> OnEm2Wakeup()46 void OnEm2Wakeup(); 47 48 /// <summary> 49 /// Method which is called when the HFXO is requested by an infrastructure peripheral. The argument is the requester. 50 /// </summary> OnRequest(HFXO_REQUESTER a)51 void OnRequest(HFXO_REQUESTER a); 52 } 53 }