2022-04-19 16:48:43 +02:00
|
|
|
// Copyright 2022 Darwin Schuppan <darwin@nobrain.org>
|
|
|
|
// SPDX license identifier: MIT
|
|
|
|
|
2022-04-19 16:44:54 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/************************
|
|
|
|
BEGIN USER CONFIGURATION
|
|
|
|
************************/
|
|
|
|
//#define DEBUG_RECORDING
|
|
|
|
|
|
|
|
#define PIN_COMPONENT_SWITCH 2 /* Use a digital signal to switch on/off the microphone and SD card for less power draw. */
|
|
|
|
#define COMPONENT_SWITCH_ON HIGH
|
|
|
|
|
|
|
|
#define SAMPLE_MODE_U8
|
|
|
|
//#define SAMPLE_MODE_S16
|
|
|
|
|
|
|
|
//#define ADC_PRESCALE_16 /* Up to ~60kHz. */
|
|
|
|
//#define ADC_PRESCALE_32 /* Up to ~27kHz. */
|
|
|
|
#define ADC_PRESCALE_64 /* Up to ~18kHz. */
|
|
|
|
|
|
|
|
//#define U8_AMPLIFY_X2 /* (U8 sampling mode only) amplify audio by factor 2. */
|
|
|
|
|
|
|
|
#define ADC_CHANNEL AdcChannel0
|
|
|
|
#define TIMER_COMPARE 1000 /* 16MHz / 1000 = 16kHz. */
|
|
|
|
#define FLUSH_SAMPLES 64000 /* Flush WAV file every n samples. */
|
|
|
|
#define PIN_SS 10
|
2022-04-19 19:30:15 +02:00
|
|
|
|
|
|
|
#define REC_FILE_FMT "REC_%03u.WAV" /* Must be all caps; must use %u in some form exactly once. */
|
2022-04-19 16:44:54 +02:00
|
|
|
/**********************
|
|
|
|
END USER CONFIGURATION
|
|
|
|
**********************/
|