g13gui/g13d/lcd.h
June Tate-Gans 1918d6875c g13d: Reformat all the files to Google style
This is closer to what I'm looking for, and gives us a style guide to boot.
2021-04-25 20:30:56 -05:00

47 lines
910 B
C++

#ifndef LCD_H
#define LCD_H
#include <memory.h>
#include "g13.h"
namespace G13 {
class G13_Device;
class G13_LCD {
public:
G13_LCD(G13_Device &keypad);
G13_Device &_keypad;
unsigned char image_buf[G13_LCD_BUF_SIZE + 8];
unsigned cursor_row;
unsigned cursor_col;
int text_mode;
void image(unsigned char *data, int size);
void image_send() {
image(image_buf, G13_LCD_BUF_SIZE);
}
void image_test(int x, int y);
void image_clear() {
memset(image_buf, 0, G13_LCD_BUF_SIZE);
}
unsigned image_byte_offset(unsigned row, unsigned col) {
return col + (row / 8) * G13_LCD_BYTES_PER_ROW * 8;
}
void image_setpixel(unsigned row, unsigned col);
void image_clearpixel(unsigned row, unsigned col);
void write_char(char c, int row = -1, int col = -1);
void write_string(const char *str);
void write_pos(int row, int col);
};
} // namespace G13
#endif // LCD_H