Kamcho Library 02.00.03  lib.kamcho.02.00.03.287
Data Structures | Macros | Functions
clock_sfrs.h File Reference

Go to the source code of this file.

Data Structures

struct  CLOCK_SFRS_t
 A structure to represent Special Function Registers for Clock. More...
 

Macros

#define CLOCK_SFRS   ((__IO CLOCK_SFRS_t *)(ASIC_7B_BASE + 0))
 The starting address of Clock SFRS. More...
 
#define E_CLOCK_SOURCE_RC10KHZ   0x00
 
#define E_CLOCK_SOURCE_RC12MHZ   0x01
 
#define E_CLOCK_SOURCE_XTCLOCK   0x02
 
#define E_CLOCK_SOURCE_RCAUX   0x03
 

Functions

static __INLINE void f_CLOCK_SelectSource (uint8_t src)
 Select clock source. More...
 
static __INLINE uint8_t f_CLOCK_GetClockSource (void)
 Get clock source. More...
 
static __INLINE void f_CLOCK_EnableXTClock (void)
 Enable crystal clock source. More...
 
static __INLINE void f_CLOCK_DisableXTClock (void)
 Disable crystal clock source. More...
 
static __INLINE uint8_t f_CLOCK_IsXTClockEnabled (void)
 Check if crystal clock source enabled. More...
 
static __INLINE void f_CLOCK_EnableRCClock (void)
 Enable RC clock source. More...
 
static __INLINE void f_CLOCK_DisableRCClock (void)
 Disable RC clock source. More...
 
static __INLINE uint8_t f_CLOCK_IsRCClockEnabled (void)
 Check if RC clock source enabled. More...
 
static __INLINE void f_CLOCK_RCTrim (uint8_t val)
 Trim RC clock. More...
 
static __INLINE void f_CLOCK_RC10KTrim (uint8_t val)
 Trim 10K RC clock. More...
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Macro Definition Documentation

#define CLOCK_SFRS   ((__IO CLOCK_SFRS_t *)(ASIC_7B_BASE + 0))

The starting address of Clock SFRS.

#define E_CLOCK_SOURCE_RC10KHZ   0x00
#define E_CLOCK_SOURCE_RC12MHZ   0x01
#define E_CLOCK_SOURCE_RCAUX   0x03
#define E_CLOCK_SOURCE_XTCLOCK   0x02

Function Documentation

static __INLINE void f_CLOCK_DisableRCClock ( void  )
static

Disable RC clock source.

static __INLINE void f_CLOCK_DisableXTClock ( void  )
static

Disable crystal clock source.

static __INLINE void f_CLOCK_EnableRCClock ( void  )
static

Enable RC clock source.

static __INLINE void f_CLOCK_EnableXTClock ( void  )
static

Enable crystal clock source.

static __INLINE uint8_t f_CLOCK_GetClockSource ( void  )
static

Get clock source.

return The enumeration of clock source.

static __INLINE uint8_t f_CLOCK_IsRCClockEnabled ( void  )
static

Check if RC clock source enabled.

return The status of RC clock source.

static __INLINE uint8_t f_CLOCK_IsXTClockEnabled ( void  )
static

Check if crystal clock source enabled.

return The status of crystal clock source.

static __INLINE void f_CLOCK_RC10KTrim ( uint8_t  val)
static

Trim 10K RC clock.

Parameters
valThe trim setting for 10K RC clock.
static __INLINE void f_CLOCK_RCTrim ( uint8_t  val)
static

Trim RC clock.

Parameters
valThe trim setting for RC clock.
static __INLINE void f_CLOCK_SelectSource ( uint8_t  src)
static

Select clock source.

param src The enumeration of clock source.