genclk.h
Go to the documentation of this file.
1 
33 /*
34  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
35  */
36 #ifndef CLK_GENCLK_H_INCLUDED
37 #define CLK_GENCLK_H_INCLUDED
38 
39 #include "parts.h"
40 
41 #if SAM3S
42 # include "sam3s/genclk.h"
43 #elif SAM3U
44 # include "sam3u/genclk.h"
45 #elif SAM3N
46 # include "sam3n/genclk.h"
47 #elif SAM3XA
48 # include "sam3x/genclk.h"
49 #elif SAM4S
50 # include "sam4s/genclk.h"
51 #elif SAM4L
52 # include "sam4l/genclk.h"
53 #elif SAM4E
54 # include "sam4e/genclk.h"
55 #elif SAM4N
56 # include "sam4n/genclk.h"
57 #elif SAM4C
58 # include "sam4c/genclk.h"
59 #elif SAM4CM
60 # include "sam4cm/genclk.h"
61 #elif SAM4CP
62 # include "sam4cp/genclk.h"
63 #elif SAMG
64 # include "samg/genclk.h"
65 #elif SAMV71
66 # include "samv71/genclk.h"
67 #elif SAMV70
68 # include "samv70/genclk.h"
69 #elif SAME70
70 # include "same70/genclk.h"
71 #elif SAMS70
72 # include "sams70/genclk.h"
73 #elif (UC3A0 || UC3A1)
74 # include "uc3a0_a1/genclk.h"
75 #elif UC3A3
76 # include "uc3a3_a4/genclk.h"
77 #elif UC3B
78 # include "uc3b0_b1/genclk.h"
79 #elif UC3C
80 # include "uc3c/genclk.h"
81 #elif UC3D
82 # include "uc3d/genclk.h"
83 #elif UC3L
84 # include "uc3l/genclk.h"
85 #else
86 # error Unsupported chip type
87 #endif
88 
116 
118 
154 
156 
157 
167 
176 static inline void genclk_enable_config(unsigned int id, enum genclk_source src, unsigned int divider)
177 {
178  struct genclk_config gcfg;
179 
180  genclk_config_defaults(&gcfg, id);
182  genclk_config_set_source(&gcfg, src);
183  genclk_config_set_divider(&gcfg, divider);
184  genclk_enable(&gcfg, id);
185 }
186 
188 
189 #endif /* CLK_GENCLK_H_INCLUDED */
genclk_source
Generic clock source ID.
Definition: same70/genclk.h:66
static void genclk_enable_source(enum genclk_source e_src)
Enable the source clock src used by a generic clock.
static void genclk_config_set_source(struct genclk_config *p_cfg, enum genclk_source e_src)
Select a new source clock src in configuration cfg.
Atmel part identification macros.
static void genclk_enable(const struct genclk_config *p_cfg, uint32_t ul_id)
static void genclk_config_defaults(struct genclk_config *p_cfg, uint32_t ul_id)
static void genclk_enable_config(unsigned int id, enum genclk_source src, unsigned int divider)
Enable the configuration defined by src and divider for the generic clock identified by id...
Definition: genclk.h:176
Hardware representation of a set of generic clock parameters.
Definition: same70/genclk.h:96
Chip-specific generic clock management.
static void genclk_config_set_divider(struct genclk_config *p_cfg, uint32_t e_divider)


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04