BeRTOS
|
00001 00041 #include "pwm_avr.h" 00042 #include <hw/hw_cpufreq.h> 00043 00044 #warning TODO:This is an exmple of implementation of PWM low level channel for AVR, implemnt it! 00045 00049 void pwm_hw_setPolarity(PwmDev dev, bool pol) 00050 { 00051 00052 /* 00053 * Put here a code to PWM polarity of select 00054 * PWM channel 00055 */ 00056 00057 //Only for test remove when implement this function 00058 (void)dev; 00059 (void)pol; 00060 } 00061 00067 pwm_period_t pwm_hw_getPeriod(PwmDev dev) 00068 { 00069 /* 00070 * Put here a code to get period value of select 00071 * PWM channel 00072 */ 00073 00074 //Only for test remove when implement this function 00075 (void)dev; 00076 00077 return 0; 00078 } 00079 00085 void pwm_hw_setFrequency(PwmDev dev, uint32_t freq) 00086 { 00087 /* 00088 * Put here a code to set frequency of select 00089 * PWM channel 00090 */ 00091 00092 //Only for test remove when implement this function 00093 (void)dev; 00094 (void)freq; 00095 00096 } 00097 00103 void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty) 00104 { 00105 /* 00106 * Put here a code to set duty of select 00107 * PWM channel 00108 */ 00109 00110 //Only for test remove when implement this function 00111 (void)dev; 00112 (void)duty; 00113 00114 } 00115 00116 00120 void pwm_hw_enable(PwmDev dev) 00121 { 00122 /* 00123 * Put here a code to enable 00124 * a select PWM channel 00125 */ 00126 00127 //Only for test remove when implement this function 00128 (void)dev; 00129 } 00130 00134 void pwm_hw_disable(PwmDev dev) 00135 { 00136 /* 00137 * Put here a code to disable 00138 * a select PWM channel 00139 */ 00140 00141 //Only for test remove when implement this function 00142 (void)dev; 00143 } 00144 00145 00149 void pwm_hw_init(void) 00150 { 00151 /* 00152 * Put here a code to init 00153 * a PWM hawdware 00154 */ 00155 } 00156 00157 00158 00159