178 inline void Delay(uint32_t milliseconds)
196 template <
typename... VA>
197 static void Print(
const char* format, VA... va)
204 template <
typename... VA>
311 float callback_rate_;
Interface for initializing and using the USB Peripherals on the daisy.
Definition usb.h:19
Handler for analog to digital conversion.
Definition adc.h:91
Hardware Interface for control inputs Primarily designed for ADC input controls such as potentiomet...
Definition ctrl.h:18
Audio Engine Handle.
Definition audio.h:23
void(* AudioCallback)(InputBuffer in, OutputBuffer out, size_t size)
Definition audio.h:65
void(* InterleavingAudioCallback)(InterleavingInputBuffer in, InterleavingOutputBuffer out, size_t size)
Definition audio.h:83
DAC handle for Built-in DAC Peripheral.
Definition dac.h:22
void(* DacCallback)(uint16_t **out, size_t size)
Definition dac.h:96
General Purpose I/O control.
Definition gpio.h:22
Generic Class for handling gate inputs through GPIO.
Definition gatein.h:15
Interface for simple USB logging.
Definition logger.h:72
static void StartLog(bool wait_for_pc=false)
static void Print(const char *format,...)
static void PrintLine(const char *format,...)
Definition codec_pcm3060.h:20
static float GetFloat(float min=0.f, float max=1.f)
static uint32_t GetValue()
static void Delay(uint32_t delay_ms)
Board support file for DaisyPatchSM hardware.
Definition daisy_patch_sm.h:53
void StartAudio(AudioHandle::InterleavingAudioCallback cb)
void Delay(uint32_t milliseconds)
Definition daisy_patch_sm.h:178
static constexpr Pin C5
Definition daisy_patch_sm.h:289
static constexpr Pin C8
Definition daisy_patch_sm.h:292
Pcm3060 codec
Definition daisy_patch_sm.h:250
static constexpr Pin C1
Definition daisy_patch_sm.h:285
static constexpr Pin D8
Definition daisy_patch_sm.h:303
static constexpr Pin C3
Definition daisy_patch_sm.h:287
void SetAudioSampleRate(SaiHandle::Config::SampleRate sample_rate)
static constexpr Pin B1
Definition daisy_patch_sm.h:274
UsbHandle usb
Definition daisy_patch_sm.h:249
float AudioCallbackRate()
AudioHandle audio
Definition daisy_patch_sm.h:247
static constexpr Pin D10
Definition daisy_patch_sm.h:305
static constexpr Pin B5
Definition daisy_patch_sm.h:278
static constexpr Pin A10
Definition daisy_patch_sm.h:272
static void Print(const char *format, VA... va)
Definition daisy_patch_sm.h:197
static constexpr Pin B4
Definition daisy_patch_sm.h:277
static constexpr Pin A3
Definition daisy_patch_sm.h:265
void SetAudioBlockSize(size_t size)
static constexpr Pin D3
Definition daisy_patch_sm.h:298
static constexpr Pin B6
Definition daisy_patch_sm.h:279
PinBank
Definition daisy_patch_sm.h:57
GateIn gate_in_1
Definition daisy_patch_sm.h:256
void ProcessDigitalControls()
void ChangeAudioCallback(AudioHandle::AudioCallback cb)
static constexpr Pin B10
Definition daisy_patch_sm.h:283
static constexpr Pin C2
Definition daisy_patch_sm.h:286
GPIO gate_out_2
Definition daisy_patch_sm.h:257
void ChangeAudioCallback(AudioHandle::InterleavingAudioCallback cb)
AnalogControl controls[ADC_LAST]
Definition daisy_patch_sm.h:255
static constexpr Pin A1
Definition daisy_patch_sm.h:263
void SetAudioSampleRate(float sr)
void ProcessAnalogControls()
GPIO user_led
Definition daisy_patch_sm.h:254
static constexpr Pin B9
Definition daisy_patch_sm.h:282
static constexpr Pin C10
Definition daisy_patch_sm.h:294
void StartDac(DacHandle::DacCallback callback=nullptr)
static constexpr Pin C7
Definition daisy_patch_sm.h:291
SdramHandle sdram
Definition daisy_patch_sm.h:245
static constexpr Pin A4
Definition daisy_patch_sm.h:266
DacHandle dac
Definition daisy_patch_sm.h:251
float GetRandomFloat(float min=0.f, float max=1.f)
Definition daisy_patch_sm.h:187
bool ValidateQSPI(bool quick=true)
Tests the QSPI for validity This will wipe contents of QSPI when testing.
static void StartLog(bool wait_for_pc=false)
Definition daisy_patch_sm.h:212
void WriteCvOut(const int channel, float voltage)
static constexpr Pin D6
Definition daisy_patch_sm.h:301
AdcHandle adc
Definition daisy_patch_sm.h:248
float GetAdcValue(int idx)
static constexpr Pin B8
Definition daisy_patch_sm.h:281
Pin GetPin(const PinBank bank, const int idx)
static constexpr Pin D1
Definition daisy_patch_sm.h:296
static constexpr Pin C4
Definition daisy_patch_sm.h:288
static constexpr Pin D2
Definition daisy_patch_sm.h:297
DaisyPatchSM()
Definition daisy_patch_sm.h:64
GPIO gate_out_1
Definition daisy_patch_sm.h:257
static constexpr Pin B7
Definition daisy_patch_sm.h:280
static constexpr Pin A2
Definition daisy_patch_sm.h:264
static constexpr Pin C6
Definition daisy_patch_sm.h:290
void StartAudio(AudioHandle::AudioCallback cb)
static constexpr Pin D9
Definition daisy_patch_sm.h:304
static constexpr Pin B3
Definition daisy_patch_sm.h:276
static constexpr Pin D7
Definition daisy_patch_sm.h:302
static constexpr Pin A7
Definition daisy_patch_sm.h:269
~DaisyPatchSM()
Definition daisy_patch_sm.h:65
static constexpr Pin A5
Definition daisy_patch_sm.h:267
uint32_t GetRandomValue()
Definition daisy_patch_sm.h:184
static constexpr Pin A9
Definition daisy_patch_sm.h:271
GateIn gate_in_2
Definition daisy_patch_sm.h:256
bool ValidateSDRAM()
Tests entirety of SDRAM for validity This will wipe contents of SDRAM when testing.
void ProcessAllControls()
Definition daisy_patch_sm.h:129
static constexpr Pin D4
Definition daisy_patch_sm.h:299
static constexpr Pin A6
Definition daisy_patch_sm.h:268
static constexpr Pin D5
Definition daisy_patch_sm.h:300
System system
Definition daisy_patch_sm.h:244
static constexpr Pin C9
Definition daisy_patch_sm.h:293
QSPIHandle qspi
Definition daisy_patch_sm.h:246
static constexpr Pin B2
Definition daisy_patch_sm.h:275
static void PrintLine(const char *format, VA... va)
Definition daisy_patch_sm.h:205
static constexpr Pin A8
Definition daisy_patch_sm.h:270
@ CV_OUT_BOTH
Definition daisy_patch_sm.h:38
@ CV_OUT_1
Definition daisy_patch_sm.h:39
@ CV_OUT_2
Definition daisy_patch_sm.h:40
@ CV_1
Definition daisy_patch_sm.h:20
@ CV_7
Definition daisy_patch_sm.h:26
@ CV_6
Definition daisy_patch_sm.h:25
@ ADC_9
Definition daisy_patch_sm.h:28
@ CV_3
Definition daisy_patch_sm.h:22
@ ADC_12
Definition daisy_patch_sm.h:31
@ CV_4
Definition daisy_patch_sm.h:23
@ CV_5
Definition daisy_patch_sm.h:24
@ ADC_10
Definition daisy_patch_sm.h:29
@ ADC_LAST
Definition daisy_patch_sm.h:32
@ ADC_11
Definition daisy_patch_sm.h:30
@ CV_8
Definition daisy_patch_sm.h:27
@ CV_2
Definition daisy_patch_sm.h:21
Hardware defines and helpers for daisy field platform.
Definition index.h:2
@ PORTX
Definition daisy_core.h:188
@ PORTA
Definition daisy_core.h:177
@ PORTB
Definition daisy_core.h:178
@ PORTC
Definition daisy_core.h:179
@ PORTD
Definition daisy_core.h:180
@ PORTG
Definition daisy_core.h:183
representation of hardware port/pin combination
Definition daisy_core.h:193
SampleRate
Definition sai.h:58