ARMEBS4  revision-26.06.2015
clock_gen_cs2200.h
Go to the documentation of this file.
1 /************************************************************************//**
2  * \file heivs/clock_gen_cs2200.h
3  *
4  * \brief Clock gen driver
5  * \author marc dot pignat at hevs dot ch
6  * \addtogroup oldies
7  * @{
8  ***************************************************************************/
9 #ifndef HEIVS_CLK_GEN_CS2200_H
10 #define HEIVS_CLK_GEN_CS2200_H
11 
12 #ifdef __cplusplus
13  extern "C" {
14 #endif
15 
16 #include <stdint.h>
17 #include "heivs/error.h"
18 
19 struct _clk_gen_info_t
20 {
21  uint32_t f_in;
22  uint32_t f_out;
23  int32_t ppm;
24 };
25 struct clock_gen_t
26 {
27  const struct heivs_bus_t *bus;
28  uint32_t i2c_address;
29  struct _clk_gen_info_t info;
30 };
31 
32 status_e clock_gen_init(struct clock_gen_t *dev, uint32_t outfreq, uint32_t infreq);
33 status_e clock_gen_adjust_ppm(struct clock_gen_t *dev, int32_t ppm);
34 
35 #ifdef __cplusplus
36  }
37 #endif
38 
39 /**
40  * @}
41  */
42 #endif /* HEIVS_CLK_GEN_CS2200_H */
Bus handler.
Definition: bus.h:92
Errors definitions.
status_e
Known errors.
Definition: error.h:21