diff --git a/tft.c b/tft.c index 7293e2e..8a470d7 100644 --- a/tft.c +++ b/tft.c @@ -1,4 +1,4 @@ -/* +/* * File: tft.c * Author: torsten.roemer@luniks.net * @@ -34,7 +34,7 @@ /** * Sends the given command to the display. - * + * * @param cmd */ static void displayCmd(uint8_t cmd) { @@ -44,7 +44,7 @@ /** * Sends the given data to the display. - * + * * @param data */ static void displayData(uint8_t data) { @@ -54,7 +54,7 @@ /** * Sets horizontal and/or vertical flip. - * + * * @param hflip * @param vflip */ @@ -82,7 +82,7 @@ /** * Sets the given column start and end address. - * + * * @param xs start address * @param xe end address */ @@ -98,7 +98,7 @@ /** * Sets the given row start and end address. - * + * * @param ys start address * @param ye end address */ @@ -113,8 +113,8 @@ } void initDisplay(void) { - _delay_ms(10); - + _delay_ms(100); + // Hardware reset hwReset(); @@ -149,17 +149,17 @@ displayCmd(COLMOD); displayData(0b00111101); displayDes(); - + // Display on displaySel(); displayCmd(DISPON); displayDes(); - + // Sleep in & booster off // displaySel(); // displayCmd(SLPIN); // displayDes(); - + printString("done initializing display\r\n"); } @@ -175,7 +175,7 @@ // TODO } -void drawRectangle(x_t x, y_t y, width_t width, height_t height, +void drawRectangle(x_t x, y_t y, width_t width, height_t height, uint16_t color) { // TODO } @@ -228,8 +228,8 @@ writeEnd(); } -void setArea(x_t x, y_t y, - width_t width, height_t height, +void setArea(x_t x, y_t y, + width_t width, height_t height, bool hflip, bool vflip) { madctl(hflip, vflip);