/***********************************************************************
 * Copyright (c)  2017 - 2020, Unicmicro Co.,Ltd .
 * All rights reserved.
 * Filename    : pwm.h
 * Description : pwm header file
 * Author(s)   : wanyi
 * version     : V1.0
 * Modify date : 2021-02-26
 ***********************************************************************/
#ifndef __PWM_H__
#define __PWM_H__

#include "um800x.h"

#define HIGH   						1
#define LOW    						0

#define PWM_ENABLE				    1
#define PWM_DISABLE				    0

void pwm0_init(uint16_t cycle, uint16_t duty, uint8_t level,uint8_t enable);
void pwm0_irq_init(uint8_t irqstate,void (*pfunc)());
void pwm0_output_start(void);
void pwm0_output_stop(void); 
void pwm0_start(void);
void pwm0_stop(void); 

void pwm1_init(uint16_t cycle, uint16_t duty, uint8_t level,uint8_t enable);
void pwm1_irq_init(uint8_t irqstate,void (*pfunc)());
void pwm1_output_start(void);
void pwm1_output_stop(void); 
void pwm1_start(void);
void pwm1_stop(void); 

void pwm2_init(uint16_t cycle, uint16_t duty, uint8_t level,uint8_t enable);
void pwm2_irq_init(uint8_t irqstate,void (*pfunc)());
void pwm2_output_start(void);
void pwm2_output_stop(void); 
void pwm2_start(void);
void pwm2_stop(void); 

#endif