@@ -187,6 +187,17 @@ typedef enum {
187
187
MXC_V_GCR_CLKCTRL_SYSCLK_SEL_EXTCLK /**< Use the external system clock input. */
188
188
} mxc_sys_system_clock_t ;
189
189
190
+ typedef enum {
191
+ MXC_SYS_CLOCK_DIV_1 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV1 ,
192
+ MXC_SYS_CLOCK_DIV_2 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV2 ,
193
+ MXC_SYS_CLOCK_DIV_4 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV4 ,
194
+ MXC_SYS_CLOCK_DIV_8 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV8 ,
195
+ MXC_SYS_CLOCK_DIV_16 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV16 ,
196
+ MXC_SYS_CLOCK_DIV_32 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV32 ,
197
+ MXC_SYS_CLOCK_DIV_64 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV64 ,
198
+ MXC_SYS_CLOCK_DIV_128 = MXC_S_GCR_CLKCTRL_SYSCLK_DIV_DIV128
199
+ } mxc_sys_system_clock_div_t ;
200
+
190
201
#define MXC_SYS_USN_CHECKSUM_LEN 16 // Length of the USN + padding for checksum compute
191
202
#define MXC_SYS_USN_CSUM_FIELD_LEN 2 // Size of the checksum field in the USN
192
203
#define MXC_SYS_USN_LEN 13 // Size of the USN including the checksum
@@ -355,6 +366,18 @@ int MXC_SYS_ClockSourceDisable(mxc_sys_system_clock_t clock);
355
366
*/
356
367
int MXC_SYS_Clock_Select (mxc_sys_system_clock_t clock );
357
368
369
+ /**
370
+ * @brief Set the system clock divider.
371
+ * @param div Enumeration for desired clock divider.
372
+ */
373
+ void MXC_SYS_SetClockDiv (mxc_sys_system_clock_div_t div );
374
+
375
+ /**
376
+ * @brief Get the system clock divider.
377
+ * @returns System clock divider.
378
+ */
379
+ mxc_sys_system_clock_div_t MXC_SYS_GetClockDiv (void );
380
+
358
381
/**
359
382
* @brief Wait for a clock to enable with timeout
360
383
* @param ready The clock to wait for
0 commit comments