diff --git a/pwm.c b/pwm.c index bcc2e1b..23d7e3c 100644 --- a/pwm.c +++ b/pwm.c @@ -2,6 +2,7 @@ #include #include "const.h" +#include "synth.h" #include "pwm.h" @@ -13,7 +14,7 @@ void pwm_isr(void) { pwm_clear_irq(slice); // TODO: - float sample = 0.0f; + float sample = get_sample(); uint16_t level = (uint16_t)((sample + 1.0f) * 0.5f * 3400.0f); pwm_set_chan_level(slice, chan, level); diff --git a/synth.cc b/synth.cc new file mode 100644 index 0000000..a1e0e3a --- /dev/null +++ b/synth.cc @@ -0,0 +1,6 @@ +#include "synth.h" + +float get_sample(void) { + return 0; +} + diff --git a/synth.h b/synth.h new file mode 100644 index 0000000..1de8ca5 --- /dev/null +++ b/synth.h @@ -0,0 +1,4 @@ +#pragma once + +float get_sample(void); +