mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 12:53:59 +02:00
pwm1 working
This commit is contained in:
parent
888b659330
commit
97c797cb46
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue