This repository has been archived on 2018-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
BBB-Simple-ACS/client/oled_writer.hpp

29 lines
602 B
C++

#pragma once
#include <acs-driver/ssd1306.hpp>
namespace acs
{
class qr_encoder;
class oled_writer
{
static const unsigned char tick[72];
static const unsigned char cross[72];
qr_encoder* qr_encoder_;
ssd1306* oled_ = nullptr;
template <typename F>
void refresh(F func)
{
oled_->clear_display();
func();
oled_->display();
}
public:
explicit oled_writer();
void refresh();
void authorized();
void access_denied();
void write_qr_code();
};
}