/** * @copyright 2015 Indie Semiconductor. * * 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. * * @file pwm_device.h */ #ifndef PWM_DEVICE_H__ #define PWM_DEVICE_H__ #include #include #include #include #include typedef enum{ PWM_CH0_0 = 0U, PWM_CH0_1 = 1U, PWM_CH1_0 = 2U, PWM_CH1_1 = 3U, PWM_CH2_0 = 4U, PWM_CH2_1 = 5U, PWM_CH3_0 = 6U, PWM_CH3_1 = 7U, }PWM_CH_t; typedef enum{ PWM_BASE_0 = 0U, PWM_BASE_1, }PWM_ClockSource_t; typedef enum{ PWM_CLK_DIV_1 = 0U, PWM_CLK_DIV_2, PWM_CLK_DIV_4, PWM_CLK_DIV_8, PWM_CLK_DIV_16, PWM_CLK_DIV_32, PWM_CLK_DIV_64, PWM_CLK_DIV_128, PWM_CLK_DIV_256, PWM_CLK_DIV_512, PWM_CLK_DIV_1024, PWM_CLK_DIV_2048, PWM_CLK_DIV_4096, PWM_CLK_DIV_8192, PWM_CLK_DIV_16384, PWM_CLK_DIV_32768, }PWM_Prescaler_t; typedef enum{ PULSE_0 = 0U, PULSE_1, PULSE_2, PULSE_3, }PWM_Pulse_t; void PWM_Init(GpioGroup_t group,GpioPort_t port,PWM_CH_t channel,PWM_ClockSource_t source,PWM_Prescaler_t divider,uint16_t peroid); void PWM_SetMatchValue(PWM_ClockSource_t source,PWM_Pulse_t pulse,uint16_t matchRisingValue, uint16_t matchFaillValue); void PWM_Listofotherparameters_Init(void); #endif /* __PWM_DEVICE_H__ */