···23232424#include "system.h"
2525#include <stdbool.h>
2626+#include <stddef.h>
26272728enum stm_clock
2829{
···5556void stm_target_clock_enable(enum stm_clock clock, bool enable);
56575758/*
5959+ * Callback to return a specific clock's frequency. For most
6060+ * peripherals the frequency must be known at initialization
6161+ * and not change afterwards; see peripheral drivers for the
6262+ * details, as their exact requirements may vary.
6363+ */
6464+size_t stm_target_clock_get_frequency(enum stm_clock clock);
6565+6666+/*
5867 * Called from system_init(). Sets up internal book-keeping
5968 * and then calls stm_target_clock_init().
6069 */
···6574 */
6675void stm_clock_enable(enum stm_clock clock);
6776void stm_clock_disable(enum stm_clock clock);
7777+7878+/*
7979+ * Get a clock's frequency in Hz.
8080+ */
8181+static inline size_t stm_clock_get_frequency(enum stm_clock clock)
8282+{
8383+ return stm_target_clock_get_frequency(clock);
8484+}
68856986#endif /* __CLOCK_STM32H7_H__ */