~ruther/stm32h747i-disco-usb-image-viewer

ref: c8fe27c955b05f63fefa02f9c19dbbfb47de11ee stm32h747i-disco-usb-image-viewer/include/clocks.h -rw-r--r-- 1012 bytes
c8fe27c9 — Rutherther feat: implement usb devicd cdc descriptors, init, setup 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdint.h>

#ifndef CLOCKS_H
#define CLOCKS_H

typedef enum {
  CLOCK_PLL1 = 0,
  CLOCK_PLL2 = 1,
  CLOCK_PLL3 = 2,
} clock_pll_t;

typedef enum {
  CLOCK_SOURCE_HSI = 0,
  CLOCK_SOURCE_HSE = 1,
  CLOCK_SOURCE_CSI = 2,
  CLOCK_SOURCE_PLL_1_P_CK = 3,
} sysclock_source_t;

typedef enum {
  PLL_SOURCE_HSI = 0,
  PLL_SOURCE_CSI = 1,
  PLL_SOURCE_HSE = 2,
  PLL_SOURCE_NONE = 3,
} pll_source_t;


void clocks_pll_configure(clock_pll_t pll, uint8_t divm, pll_source_t source,
                          uint16_t divn, uint8_t divp, uint8_t divq,
                          uint8_t divr);
void clocks_pll_enable(clock_pll_t pll);
void clocks_pll_disable(clock_pll_t pll);
void clocks_pll_wait_ready(clock_pll_t pll, uint16_t timeout_us);

void clocks_system_clock_source(sysclock_source_t source, uint8_t d1cpre,
                                uint8_t d1ppre, uint8_t hpre,
                                uint16_t timeout_us);
uint8_t clocks_system_clock_wait_ready(uint16_t timeout_us);

#endif // CLOCKS_H
Do not follow this link