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

Go to the source code of this file.

Data Structures

struct  PWM1_SFRS_t
 A structure to represent Special Function Registers for PWM1. More...
 
struct  PWM2_SFRS_t
 A structure to represent Special Function Registers for PWM2. More...
 

Macros

#define PWM1_SFRS   ((__IO PWM1_SFRS_t *) (ASIC_7B_BASE + 0x48))
 The starting address of PWM1 SFRS. More...
 
#define E_PWM1_PRESCALE_DIV1   0
 
#define E_PWM1_PRESCALE_DIV2   1
 
#define E_PWM1_PRESCALE_DIV4   2
 
#define E_PWM1_PRESCALE_DIV8   3
 
#define E_PWM1_PRESCALE_DIV32   4
 
#define E_PWM1_PRESCALE_DIV256   5
 
#define E_PWM1_PRESCALE_DIV8192   6
 
#define E_PWM1_PRESCALE_DIV262144   7
 
#define PWM2_SFRS   ((__IO PWM2_SFRS_t *) (ASIC_7B_BASE + 0x4C))
 The starting address of PWM2 SFRS. More...
 
#define E_PWM2_PRESCALE_DIV1   0
 
#define E_PWM2_PRESCALE_DIV2   1
 
#define E_PWM2_PRESCALE_DIV4   2
 
#define E_PWM2_PRESCALE_DIV8   3
 
#define E_PWM2_PRESCALE_DIV32   4
 
#define E_PWM2_PRESCALE_DIV256   5
 
#define E_PWM2_PRESCALE_DIV8192   6
 
#define E_PWM2_PRESCALE_DIV262144   7
 

Functions

static __INLINE void f_PWM1_SetPeriod (uint32_t period)
 Set period for PWM1. More...
 
static __INLINE void f_PWM1_SetWidth (uint32_t width)
 Set width for PWM1. More...
 
static __INLINE void f_PWM1_SetPreScaler (uint8_t div)
 Set clock pre-scaler for PWM1. More...
 
static __INLINE void f_PWM1_InvertOn (void)
 Enable on inverter for PWM1. More...
 
static __INLINE void f_PWM1_InvertOff (void)
 Disable on inverter for PWM1. More...
 
static __INLINE void f_PWM1_Enable (void)
 Enable PWM1. More...
 
static __INLINE void f_PWM1_Disable (void)
 Disable PWM1. More...
 
static __INLINE void f_PWM2_SetPeriod (uint32_t period)
 Set period for PWM2. More...
 
static __INLINE void f_PWM2_SetWidth (uint32_t width)
 Set width for PWM2. More...
 
static __INLINE void f_PWM2_SetPreScaler (uint8_t div)
 Set clock pre-scaler for PWM2. More...
 
static __INLINE void f_PWM2_InvertOn (void)
 Enable on inverter for PWM2. More...
 
static __INLINE void f_PWM2_InvertOff (void)
 Disable on inverter for PWM2. More...
 
static __INLINE void f_PWM2_Enable (void)
 Enable PWM2. More...
 
static __INLINE void f_PWM2_Disable (void)
 Disable PWM2. 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 E_PWM1_PRESCALE_DIV1   0
#define E_PWM1_PRESCALE_DIV2   1
#define E_PWM1_PRESCALE_DIV256   5
#define E_PWM1_PRESCALE_DIV262144   7
#define E_PWM1_PRESCALE_DIV32   4
#define E_PWM1_PRESCALE_DIV4   2
#define E_PWM1_PRESCALE_DIV8   3
#define E_PWM1_PRESCALE_DIV8192   6
#define E_PWM2_PRESCALE_DIV1   0
#define E_PWM2_PRESCALE_DIV2   1
#define E_PWM2_PRESCALE_DIV256   5
#define E_PWM2_PRESCALE_DIV262144   7
#define E_PWM2_PRESCALE_DIV32   4
#define E_PWM2_PRESCALE_DIV4   2
#define E_PWM2_PRESCALE_DIV8   3
#define E_PWM2_PRESCALE_DIV8192   6
#define PWM1_SFRS   ((__IO PWM1_SFRS_t *) (ASIC_7B_BASE + 0x48))

The starting address of PWM1 SFRS.

#define PWM2_SFRS   ((__IO PWM2_SFRS_t *) (ASIC_7B_BASE + 0x4C))

The starting address of PWM2 SFRS.

Function Documentation

static __INLINE void f_PWM1_Disable ( void  )
static

Disable PWM1.

static __INLINE void f_PWM1_Enable ( void  )
static

Enable PWM1.

static __INLINE void f_PWM1_InvertOff ( void  )
static

Disable on inverter for PWM1.

static __INLINE void f_PWM1_InvertOn ( void  )
static

Enable on inverter for PWM1.

static __INLINE void f_PWM1_SetPeriod ( uint32_t  period)
static

Set period for PWM1.

Parameters
periodThe PWM period in clock counts.
static __INLINE void f_PWM1_SetPreScaler ( uint8_t  div)
static

Set clock pre-scaler for PWM1.

Parameters
divThe PWM clock divider setting.
static __INLINE void f_PWM1_SetWidth ( uint32_t  width)
static

Set width for PWM1.

Parameters
widthThe PWM width in clock counts.
static __INLINE void f_PWM2_Disable ( void  )
static

Disable PWM2.

static __INLINE void f_PWM2_Enable ( void  )
static

Enable PWM2.

static __INLINE void f_PWM2_InvertOff ( void  )
static

Disable on inverter for PWM2.

static __INLINE void f_PWM2_InvertOn ( void  )
static

Enable on inverter for PWM2.

static __INLINE void f_PWM2_SetPeriod ( uint32_t  period)
static

Set period for PWM2.

Parameters
periodThe PWM period in clock counts.
static __INLINE void f_PWM2_SetPreScaler ( uint8_t  div)
static

Set clock pre-scaler for PWM2.

Parameters
divThe PWM clock divider setting.
static __INLINE void f_PWM2_SetWidth ( uint32_t  width)
static

Set width for PWM2.

Parameters
widthThe PWM width in clock counts.