#include "gpio.h" #include "usartclass.h" #include "print.h" ////////////////////////////////////// /* Usart demo + abstraktní třídy C++ * */ ////////////////////////////////////// static GpioClass led (GPIOD, 4u); static UsartClass serial (9600u); static Print cout (DEC); int main () { int n = 0; cout += serial; for (;;) { cout << "Hello world " << n << EOL; const bool b = (n & 4) == 0; led << b; n += 1; } return 0; }