/*
 * app.h
 *
 *  Created on: Aug 29, 2019
 *      Author: abody
 */

#pragma once

#include <inttypes.h>

#ifdef __cplusplus
#include <f4ll/console_handler.h>

class app : public f4ll::initialized_singleton<app>
{
    friend class f4ll::initialized_singleton<app>;

private:
    app();

public:
    __attribute__((noreturn)) void main();

private:
    f4ll::console_handler &m_con;
    static constexpr size_t const TXBUF_LEN = 128;
    static constexpr size_t const RXBUF_LEN = 32;
    uint8_t m_tx_buf_mem[TXBUF_LEN];
    uint8_t m_rx_buf_mem[RXBUF_LEN];
};

extern "C" {
#endif

void app_main(void const *param) __attribute__((noreturn));

#ifdef __cplusplus
} //	extern "C" {
#endif //	__cplusplus
