/*
 * cppmain.cc
 *
 *  Created on: Jul 4, 2023
 *      Author: heck
 */

#include "cppmain.h"
#include "main.h"
#include "usbd_cdc_if.h"
#include <iostream>

void cppmain(void) {
  while (1) {
    std::string msg {"hello heck"};
    CDC_Transmit_FS(reinterpret_cast<uint8_t*>(msg.data()), msg.size());
    HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin);
    HAL_Delay(250);
    std::cout << msg << "WHAUAT" << std::endl;
  }
}