1
2
3
4
5
6
7
8
9#ifndef ICST_H
10#define ICST_H
11
12struct icst_params {
13 unsigned long ref;
14 unsigned long vco_max;
15 unsigned long vco_min;
16 unsigned short vd_min;
17 unsigned short vd_max;
18 unsigned char rd_min;
19 unsigned char rd_max;
20 const unsigned char *s2div;
21 const unsigned char *idx2s;
22};
23
24struct icst_vco {
25 unsigned short v;
26 unsigned char r;
27 unsigned char s;
28};
29
30unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco);
31struct icst_vco icst_hz_to_vco(const struct icst_params *p, unsigned long freq);
32
33
34
35
36
37#define ICST307_VCO_MIN 6000000
38#define ICST307_VCO_MAX 200000000
39
40extern const unsigned char icst307_s2div[];
41extern const unsigned char icst307_idx2s[];
42
43
44
45
46
47#define ICST525_VCO_MIN 10000000
48#define ICST525_VCO_MAX_3V 200000000
49#define ICST525_VCO_MAX_5V 320000000
50
51extern const unsigned char icst525_s2div[];
52extern const unsigned char icst525_idx2s[];
53
54#endif
55