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 */
124 // TODO: Add class for Gate output
128 private:
129 void SetHidUpdateRates();
130 void InitAudio();
131 void InitControls();
132 void InitDisplay();
133 void InitMidi();
134 void InitCvOutputs();
135 void InitEncoder();
136 void InitGates();
137
138 uint32_t screen_update_last_, screen_update_period_;
139};
140
141} // namespace daisy
142
143#endif
Hardware Interface for control inputs Primarily designed for ADC input controls such as potentiom...
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:122
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:118
float AudioCallbackRate()
void ProcessAnalogControls()
void ChangeAudioCallback(AudioHandle::AudioCallback cb)
DaisyPatch()
Definition daisy_patch.h:39
dsy_gpio gate_output
Definition daisy_patch.h:125
void DisplayControls(bool invert=true)
GateIn gate_input[GATE_IN_LAST]
Definition daisy_patch.h:120
size_t AudioBlockSize()
MidiUartHandler midi
Definition daisy_patch.h:121
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
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:119
~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
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:57
Definition gpio.h:175