Merge pull request #289 from neilt6/master

LPC11UXX and LPCU13XX - Fix reset glitch in pwmout_write()
pull/299/head
Martin Kojtal 2014-05-08 08:45:19 +01:00
commit f62e0e4d9f
2 changed files with 0 additions and 4 deletions

View File

@ -113,9 +113,7 @@ void pwmout_write(pwmout_t* obj, float value) {
LPC_CTxxBx_Type *timer = Timers[tid.timer];
uint32_t t_off = timer->MR3 - (uint32_t)((float)(timer->MR3) * value);
timer->TCR = TCR_RESET;
timer->MR[tid.mr] = t_off;
timer->TCR = TCR_CNT_EN;
}
float pwmout_read(pwmout_t* obj) {

View File

@ -119,9 +119,7 @@ void pwmout_write(pwmout_t* obj, float value) {
LPC_CTxxBx_Type *timer = Timers[tid.timer];
uint32_t t_off = timer->MR3 - (uint32_t)((float)(timer->MR3) * value);
timer->TCR = TCR_RESET;
timer->MR[tid.mr] = t_off;
timer->TCR = TCR_CNT_EN;
}
float pwmout_read(pwmout_t* obj) {