31 lines
822 B
C++
31 lines
822 B
C++
![]() |
#include "pwmclass.h"
|
||
|
#include "fifo.h"
|
||
|
#include "player.h"
|
||
|
#include "GsmDecoder.h"
|
||
|
// #include "adcdma.h"
|
||
|
#include "oneway.h"
|
||
|
#include "gpio.h"
|
||
|
////////////////////////////////////////////////////////
|
||
|
/* Demo, které jen počítá od 0 do 1000000. Výstup je PWM
|
||
|
* na pinu PA2 24kHz, enable PB1. Odvozeno z teploměru na
|
||
|
* https://github.com/Kizarm/TTSCP_Client/tree/main/kecal/stm
|
||
|
*
|
||
|
*/
|
||
|
////////////////////////////////////////////////////////
|
||
|
static GpioClass led (GPIOB, 8);
|
||
|
static PwmClass pwm;
|
||
|
static FIFO<uint32_t, FIFOLEN> fifo;
|
||
|
static TextPlayer player (fifo, led);
|
||
|
static GsmDecoder decoder(fifo);
|
||
|
|
||
|
int main () {
|
||
|
led << true;
|
||
|
unsigned counter = 0u;
|
||
|
pwm.attach (decoder);
|
||
|
for (;;) {
|
||
|
player.say(counter++);
|
||
|
pwm.delay ();
|
||
|
}
|
||
|
return 0;
|
||
|
}
|