pwm1 working

This commit is contained in:
Pavol Rusnak 2011-04-23 01:21:34 +02:00
parent 888b659330
commit 97c797cb46
2 changed files with 2 additions and 2 deletions

View file

@ -128,7 +128,7 @@ void EnablePWM1(uint32_t period, uint32_t duty) {
LPC_SYSCON->SYSAHBCLKCTRL |= 1<<9; // Enables clock for 32-bit counter/timer 0.
LPC_IOCON->PIO1_6 &= ~0x07;
LPC_IOCON->PIO1_6 |= 0x01; // Selects function CT32B0_MAT0
LPC_IOCON->PIO1_6 |= 0x02; // Selects function CT32B0_MAT0
LPC_TMR32B0->MR3 = period;
LPC_TMR32B0->MR0 = duty;

View file

@ -1,4 +1,4 @@
void GetInReport (uint8_t src[], uint32_t length);
void SetOutReport (uint8_t dst[], uint32_t length);
void EnablePWM1(uint16_t period, uint16_t duty);
void EnablePWM1(uint32_t period, uint32_t duty);
void EnablePWM2(uint16_t period, uint16_t duty);