epm/User/board/inc/ip.h

17 lines
346 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __IP_H__
#define __IP_H__
#include "lib.h"
#define IP_PWM_SYS_FREQUENCY (32 * 1000) // 主频KHZ
typedef enum
{
IP_OUT_DAC = 1,
IP_OUT_PWM = 2,
} ip_out_mode_e;
void ip_set_init(ip_out_mode_e mode, uint8_t pwm_frequency);
void ip_set_out(uint16_t out);
uint16_t ip_pwm_duty_convert_ccr(float32 pwm_duty);
#endif // __IP_H__