#ifndef _FAN_PWM_H__
#define _FAN_PWM_H__
#include "bsp/bsp.h"
#include "os/os_types.h"

#define PWM_FREQ_HZ    200
#define FAN_DUTY_COUNT (1000000/200)
#define FAN_MAX_DUTY_COUNT (FAN_DUTY_COUNT/2)

#ifdef CONFIG_BOARD_MCXXX
void fan_pwm_init(void);
void fan_stop(void);
void fan_set_duty(u8 duty); //duty 0-100
bool fan_pwm_is_running(void);
#else
static void fan_pwm_init(void) {}
static void fan_stop(void) {}
static void fan_set_duty(u8 duty) {}
bool fan_pwm_is_running(void){return false;}

#endif
#endif /* _FAN_PWM_H__ */

