libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy_patch.h
Go to the documentation of this file.
1#pragma once
2#ifndef DSY_PATCH_BSP_H
3#define DSY_PATCH_BSP_H
4#include "daisy_seed.h"
5#include "dev/oled_ssd130x.h"
6
7namespace daisy
8{
17{
18 public:
29
37
42
44 void Init(bool boost = false);
45
50 void DelayMs(size_t del);
51
52
57
63
65 void StopAudio();
66
69
72
77 void SetAudioBlockSize(size_t size);
78
81
84
86 void StartAdc();
87
89 void StopAdc();
90
91
94
101
107
110
112 void DisplayControls(bool invert = true);
113
114 /* These are exposed for the user to access and manipulate directly
115 Helper functions above provide easier access to much of what they are capable of.
116 */
125 // TODO: Add class for Gate output
129 private:
130 void SetHidUpdateRates();
131 void InitAudio();
132 void InitControls();
133 void InitDisplay();
134 void InitMidi();
135 void InitCvOutputs();
136 void InitEncoder();
137 void InitGates();
138
139 uint32_t screen_update_last_, screen_update_period_;
140};
141
142} // namespace daisy
143
144#endif
Definition codec_ak4556.h:18
Hardware Interface for control inputs Primarily designed for ADC input controls such as potentiomet...
Definition ctrl.h:18
void(* AudioCallback)(InputBuffer in, OutputBuffer out, size_t size)
Definition audio.h:65
Class that handles initializing all of the hardware specific to the Daisy Patch Board....
Definition daisy_patch.h:17
OledDisplay< SSD130x4WireSpi128x64Driver > display
Definition daisy_patch.h:123
void ProcessAllControls()
Definition daisy_patch.h:96
void SetAudioSampleRate(SaiHandle::Config::SampleRate samplerate)
float AudioSampleRate()
float GetKnobValue(Ctrl k)
void SetAudioBlockSize(size_t size)
DaisySeed seed
Definition daisy_patch.h:117
Encoder encoder
Definition daisy_patch.h:119
float AudioCallbackRate()
void ProcessAnalogControls()
void ChangeAudioCallback(AudioHandle::AudioCallback cb)
DaisyPatch()
Definition daisy_patch.h:39
void DisplayControls(bool invert=true)
GPIO gate_output
Definition daisy_patch.h:126
GateIn gate_input[GATE_IN_LAST]
Definition daisy_patch.h:121
size_t AudioBlockSize()
MidiUartHandler midi
Definition daisy_patch.h:122
void StartAudio(AudioHandle::AudioCallback cb)
GateInput
Definition daisy_patch.h:32
@ GATE_IN_1
Definition daisy_patch.h:33
@ GATE_IN_LAST
Definition daisy_patch.h:35
@ GATE_IN_2
Definition daisy_patch.h:34
Ak4556 codec
Definition daisy_patch.h:118
void DelayMs(size_t del)
void ProcessDigitalControls()
void Init(bool boost=false)
Ctrl
Definition daisy_patch.h:22
@ CTRL_3
Definition daisy_patch.h:25
@ CTRL_2
Definition daisy_patch.h:24
@ CTRL_4
Definition daisy_patch.h:26
@ CTRL_LAST
Definition daisy_patch.h:27
@ CTRL_1
Definition daisy_patch.h:23
AnalogControl controls[CTRL_LAST]
Definition daisy_patch.h:120
~DaisyPatch()
Definition daisy_patch.h:41
This is the higher-level interface for the Daisy board. All basic peripheral configuration/initiali...
Definition daisy_seed.h:19
Generic Class for handling Quadrature Encoders Inspired/influenced by Mutable Instruments (pichenet...
Definition encoder.h:18
General Purpose I/O control.
Definition gpio.h:22
Generic Class for handling gate inputs through GPIO.
Definition gatein.h:15
Definition oled_display.h:15
Hardware defines and helpers for daisy field platform.
Definition index.h:2
SampleRate
Definition sai.h:58