remotes/origin_old/ugfx_release_2.6
Tectu 2012-05-31 13:45:57 +02:00
parent 976ab0ffd5
commit 95133a3544
2 changed files with 3 additions and 19 deletions

17
glcd.c
View File

@ -140,7 +140,7 @@ void lcdSetOrientation(uint8_t newOrientation) {
}
}
void lcdSetWindows(uint16_t x, uint16_t y, uint16_t width, uint16_t height) {
void lcdSetWindow(uint16_t x, uint16_t y, uint16_t width, uint16_t height) {
if(orientation == portrait) {
lcdWriteReg(0x0050, x); /* Horizontal GRAM Start Address */
lcdWriteReg(0x0051, x+width-1); /* Horizontal GRAM End Address (-1) */
@ -307,21 +307,6 @@ void lcdFillArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t co
lcdDrawRect(x0, y0, x1, y1, 1, color);
}
void lcdFillArea2(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color) {
uint32_t index, area;
area = ((x1-x0) * (y1-y0));
lcdSetWindows(x0, y0, x1, y1);
lcdSetCursor(x0, x1);
Clr_CS;
lcdWriteIndex(0x0022);
for(index = 0; index < area; index++)
lcdWriteData(color);
Set_CS;
}
void lcdDrawRect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t filled, uint16_t color) {
uint16_t i, TempX;
uint16_t j, TempY;

5
glcd.h
View File

@ -48,14 +48,13 @@ void lcdInit(void);
void lcdClear(uint16_t color);
void lcdTest(void);
void lcdSetOrientation(uint8_t newOrientation);
void lcdSetWindow(uint16_t xStart,uint16_t yStart,uint16_t xLong,uint16_t yLong);
void lcdFillArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
void lcdDrawPixel(uint16_t x,uint16_t y,uint16_t point);
void lcdDrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
void lcdDrawRect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t filled, uint16_t color);
void lcdDrawRectString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t* str, uint16_t fontColor, uint16_t bkColor);
void lcdDrawCircle(uint16_t x, uint16_t y, uint16_t radius, uint8_t filled, uint16_t color);
void lcdFillArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
void lcdFillArea2(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
void lcdSetWindows(uint16_t xStart,uint16_t yStart,uint16_t xLong,uint16_t yLong);
void lcdDrawString(uint16_t x, uint16_t y, uint8_t *str,uint16_t color, uint16_t bkColor);
void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, uint16_t bkColor);
uint16_t lcdGetHeight(void);