Added entering a low-power mode after recording.

This commit is contained in:
Jonathan Chan 2018-03-20 14:55:58 -07:00
parent f4c44bf892
commit 784e963603
1 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#define CSINT 6 // centiseconds storable in int of microseconds #define CSINT 6 // centiseconds storable in int of microseconds
#define USINT 60000 // CSINT in microseconds #define USINT 60000 // CSINT in microseconds
#define DUTY 250
#define DELAY 1000 // input sample delay in microseconds #define DELAY 1000 // input sample delay in microseconds
#define MAXNOTES 64 // record at most 64 notes (arbitrary) #define MAXNOTES 64 // record at most 64 notes (arbitrary)
@ -49,7 +50,7 @@ unsigned int whole[8] = {
void play(unsigned int note) { void play(unsigned int note) {
CCR0 = note; CCR0 = note;
CCR1 = note == n ? 0 : 250; CCR1 = note == n ? 0 : DUTY;
} }
void playback() { void playback() {
@ -97,6 +98,7 @@ void main(void) {
__enable_interrupt(); __enable_interrupt();
record(); record();
__bis_SR_register(LPM0_bits);
} }
#if defined(__TI_COMPILER_VERSION__) #if defined(__TI_COMPILER_VERSION__)