Loading files
023a573a4This file is pinned to the selected release. Download the original to open it in your design tool.
/*****************************************************************************
main_daisy.cpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "../%module.name%.h"
#include "erb/module_init.h"
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : main
==============================================================================
*/
int main ()
{
%module.name% module;
// The Daisy Seed stack, sitting on SRAM is 512K only.
// When more memory is needed, move the big buffers like
// delay lines or samples to the SDRAM, which is 64M.
// Since we have some heap allocations, we keep a bit of margin
// and complain when we reach 384K of stack space.
static_assert (sizeof (module) < 384 * 1024 /* 384K */, "");
// The SDRAM is compararively slow compared to the SRAM,
// So try to keep all memory that is accessed often in SRAM.
// Check 'erb::make_sdram_object' to put your buffers in
// SDRAM.
erb::module_init (module);
module.ui.board.run ([&](){
using BoardType = decltype (module.ui.board);
module.ui.board.impl_preprocess ();
% board_preprocess%
% controls_preprocess%
module.process ();
% controls_postprocess%
% board_postprocess%
module.ui.board.impl_postprocess ();
});
}