lpc: Fixes for timer configuration
authorKeith Packard <keithp@keithp.com>
Mon, 4 Apr 2022 06:31:44 +0000 (23:31 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 4 Apr 2022 21:41:15 +0000 (14:41 -0700)
Missed one magic value to make the beeper configurable

src/lpc/ao_beep_lpc.c

index 9d5fdb152772087acfa32aeeb2a83bc7061431a3..67c691577928b97a29c2aa25895ff2ba4534363b 100644 (file)
@@ -55,7 +55,7 @@ ao_beep(uint8_t beep)
                AO_TIMER.mr[1] = beep;
 
                /* Flip output 1 on PWM match */
-               AO_TIMER.emr = (LPC_CT32B_EMR_EMC_TOGGLE << LPC_CT32B_EMR_EMC1);
+               AO_TIMER.emr = (LPC_CT32B_EMR_EMC_TOGGLE << AO_TIMER_EMC);
 
                /* Reset on match 0 */
                AO_TIMER.mcr = (1 << LPC_CT32B_MCR_MR0R);