
#ifndef _DB101_IF_
#define _DB101_IF_

#include <ioavr.h>
#include <inavr.h>
#include <stdint.h>

#include "compiler.h"
#include "config.h"
#include "ushell_task.h"
#include "ascii.h"
#include "lib_mcu/uart/uart_lib.h"
#include "mc_interface.h"

/*Terminal commands*/
static U8 clearScreen[4] = {27, '[', '2', 'J'};
static U8 cursorLine[6] = {27, '[', '0', ';', '0', 'H'};
static U8 cursorHome[3] = {27, '[', 'H'};
static U8 cursorEnd[7] = {27, '[', '8', ';', '2', '1', 'H'};
static U8 showPic[6] = {27, '[', '5','0','m'};

static U8 Color_black[6] = {27, '[', '4','0','m'};
static U8 Color_red[6] = {27, '[', '4','1','m'};
static U8 Color_green[6] = {27, '[', '4','2','m'};
static U8 Color_yellow[6] = {27, '[', '4','3','m'};
static U8 Color_blue[6] = {27, '[', '4','4','m'};
static U8 Color_magenta[6] = {27, '[', '4','5','m'};
static U8 Color_cyan[6] = {27, '[', '4','6','m'};
static U8 Color_white[6] = {27, '[', '4','7','m'};

static U8 Color_r[6] = {27, '[', '1','1','5', 'm'}; //Red
static U8 Color_g[6] = {27, '[', '2','1','5', 'm'}; //Green
static U8 Color_b[6] = {27, '[', '3','1','5', 'm'}; //Blue
static U8 Color_rg[6] = {27, '[', '4','1','5', 'm'}; //Red and Green
static U8 Color_rb[6] = {27, '[', '5','1','5', 'm'}; //Red and Blue
static U8 Color_gb[6] = {27, '[', '6','1','5', 'm'}; //Green and Blue
static U8 Color_rgb[6] = {27, '[', '7','1','5', 'm'}; //All

void UpdateScreen(void);
void SendCommand(U8 * data_ptr, U8 length);
void BCD_Convert(U8 * data_ptr, U32 number, U8 size);

#endif
