Skip to content

Commit

Permalink
Fixes Arduino M0
Browse files Browse the repository at this point in the history
Fixes Arduino M0

Comment: atmega version buggy
  • Loading branch information
pantata committed Jan 1, 2017
1 parent 23b0982 commit 8dbebc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TFT9341.cpp
Expand Up @@ -369,7 +369,7 @@ int TFT9341::getDisplayYSize() {
return disp_y_size;
}

void TFT9341::setXY(word x1, word y1, word x2, word y2) {
void TFT9341::setXY(int x1, int y1, int x2, int y2) {
uint8_t x[] = {x1>>8,x1,x2>>8,x2};
uint8_t y[] = {y1>>8,y1,y2>>8,y2};

Expand Down
5 changes: 3 additions & 2 deletions TFT9341.h
Expand Up @@ -208,7 +208,8 @@
#define COLOR_WHITESMOKE 0xF7BE
#define COLOR_YELLOW 0xFFE0
#define COLOR_YELLOWGREEN 0x9E66
#define COLOR_NODEF 0xFFFFFF

#define COLOR_NODEF NULL
//commands
#define VSCRDEF 0x33
#define VSCRSADD 0x37
Expand Down Expand Up @@ -498,7 +499,7 @@ class TFT9341 {
uint16_t _ymin = 0;
uint16_t _xmax, _ymax ;

void setXY(word x1, word y1, word x2, word y2);
void setXY(int x1, int y1, int x2, int y2);
void drawHLine(int x, int y, int l, uint16_t color = NULL);
void drawHLine_noCS(int x, int y, int l,uint16_t color = NULL);
void drawVLine(int x, int y, int l, uint16_t color = NULL);
Expand Down

0 comments on commit 8dbebc7

Please sign in to comment.