📄 a090b4f1ea21001e16fea2237907c44c
字号:
#include "altera_avalon_pwm_regs.h"
#define ALTERA_AVALON_PWM_TYPE (volatile unsigned int*)
int altera_avalon_pwm_init(unsigned int address, unsigned int clock_divider, unsigned int duty_cycle);
int altera_avalon_pwm_enable(unsigned int address);
int altera_avalon_pwm_disable(unsigned int address);
int altera_avalon_pwm_change_duty_cycle(unsigned int address, unsigned int duty_cycle);
//Return Codes
#define ALTERA_AVALON_PWM_OK 0
#define ALTERA_AVALON_PWM_DUTY_CYCLE_GREATER_THAN_CLOCK_CYCLE_ERROR -1
#define ALTERA_AVALON_PWM_ENABLED_CONFIRMATION_ERROR -2
#define ALTERA_AVALON_PWM_DISABLED_CONFIRMATION_ERROR -3
//Constants
#define ALTERA_AVALON_PWM_ENABLED 1
#define ALTERA_AVALON_PWM_DISABLED 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -