Skip to content

File main.cpp

FileList > Desktop-DevKit-UI-Template > src > main.cpp

Go to the source code of this file

  • #include "desktop_devkit.h"
  • #include "userinterface.h"

Namespaces

Type Name
namespace desktop_devkit

Classes

Type Name
struct CvChangeFilter

Public Attributes

Type Name
CvChangeFilter cv_change_filt
Hardware hw
FIFO< FixedCapStr< 32 >, 16 > msg_fifo
int prev_toggle_pos = 0
Ui ui

Public Functions

Type Name
void AudioCallback (AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size)
void LowPriorityCallback (void * data)
int main (void)

Public Attributes Documentation

variable cv_change_filt

CvChangeFilter cv_change_filt[2];

Simple filters for CV inputs to only output values when they have changed


variable hw

Hardware hw;

Global Hardware object


variable msg_fifo

FIFO<FixedCapStr<32>, 16> msg_fifo;

FIFO of strings that we can use to move messages from the Audio callback to be printed in the main while() loop.


variable prev_toggle_pos

int prev_toggle_pos;

state of 3-way toggle for output when changed


variable ui

Ui ui;

Global UI object


Public Functions Documentation

function AudioCallback

void AudioCallback (
    AudioHandle::InputBuffer in,
    AudioHandle::OutputBuffer out,
    size_t size
) 

function LowPriorityCallback

void LowPriorityCallback (
    void * data
) 

This callback happens every 4ms (250Hz) and can be interrupted by everything except for the SysTick interrupt. The frequency of this callback is set in the Hardware::StartLowPriorityCallback parameters.

Handling the UI events here means that anything we do in the main while() loop that may take an indeterminate time (file system I/O, QSPI Saving, etc.) won't cause the UI to stall during those processes


function main

int main (
    void
) 


The documentation for this class was generated from the following file external-docs/libDaisy/examples/devkits/Desktop-DevKit-UI-Template/src/main.cpp