diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-19 20:19:15 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-19 20:39:19 -0700 |
commit | 07d261c08214837b5d5cac4d2be43e51a0c47868 (patch) | |
tree | 144e86a0af4ea8008f2527a150394ac65a972ed9 /src/lpc/lpc.h | |
parent | 3fe11b277dd7268eb445d120c8f9537f95148891 (diff) |
altos/lpc: Fix beeper driver
Set prescale limit, not current prescale value (pr instead of pc).
Flip output 1 on PWM match (set emc toggle for channel 1).
Don't hold counter in reset (turn off CRST bit).
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc/lpc.h')
-rw-r--r-- | src/lpc/lpc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lpc/lpc.h b/src/lpc/lpc.h index 2493a1ff..1b48fcc9 100644 --- a/src/lpc/lpc.h +++ b/src/lpc/lpc.h @@ -1212,4 +1212,14 @@ extern struct lpc_ct32b lpc_ct32b0, lpc_ct32b1; #define LPC_CT32B_PWMC_PWMEN2 2 #define LPC_CT32B_PWMC_PWMEN3 3 +#define LPC_CT32B_EMR_EMC0 4 +#define LPC_CT32B_EMR_EMC1 6 +#define LPC_CT32B_EMR_EMC2 8 +#define LPC_CT32B_EMR_EMC3 10 + +#define LPC_CT32B_EMR_EMC_NOTHING 0 +#define LPC_CT32B_EMR_EMC_CLEAR 1 +#define LPC_CT32B_EMR_EMC_SET 2 +#define LPC_CT32B_EMR_EMC_TOGGLE 3 + #endif /* _LPC_H_ */ |