aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Code_Composer/twine_graphicslib/graphics_adapter.h
blob: 134312def08d00f99b6e245355859f0ab67ed2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * graphics_adapter.h
 *
 *  Created on: Sep 24, 2017
 *      Author: Roy
 */

#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include "grlib/grlib.h"
#include "drivers/frame.h"
#include "drivers/kentec320x240x16_ssd2119.h"

//*****************************************************************************
//
// Graphics context used to show text on the color STN display.
//
//*****************************************************************************
static tContext g_sContext;
#define TEXT_FONT               g_psFontCmss12
#define TEXT_HEIGHT             (GrFontHeightGet(TEXT_FONT))
#define BUFFER_METER_HEIGHT     TEXT_HEIGHT
#define BUFFER_METER_WIDTH      150

void init_graphics(uint32_t ui32SysClock);
void draw_image(uint8_t* data);
void draw_string(char* data, size_t length);
void writeLine(char* text);
void writeFloat(float num);
void writeString(char* text);
void clear();