diff --git a/avrrfm.c b/avrrfm.c index 8506bd2..7045de2 100644 --- a/avrrfm.c +++ b/avrrfm.c @@ -22,6 +22,7 @@ #include #include +#include "types.h" #include "pins.h" #include "usart.h" #include "spi.h" @@ -47,7 +48,7 @@ #define NODE2 0x42 #ifndef RECEIVER - #define RECEIVER 0 + #define RECEIVER 1 #endif static volatile uint8_t watchdogInts = 0; diff --git a/tft.c b/tft.c index f234642..f66ac05 100644 --- a/tft.c +++ b/tft.c @@ -1,4 +1,4 @@ -/* +/* * File: tft.c * Author: torsten.roemer@luniks.net * @@ -40,7 +40,7 @@ /** * Sends the given command to the display. - * + * * @param cmd */ static void displayCmd(uint8_t cmd) { @@ -50,7 +50,7 @@ /** * Sends the given data to the display. - * + * * @param data */ static void displayData(uint8_t data) { @@ -60,7 +60,7 @@ /** * Sets horizontal and/or vertical flip. - * + * * @param hflip * @param vflip */ @@ -88,7 +88,7 @@ /** * Sets the given column start and end address. - * + * * @param xs start address * @param xe end address */ @@ -104,7 +104,7 @@ /** * Sets the given row start and end address. - * + * * @param ys start address * @param ye end address */ @@ -119,8 +119,8 @@ } void initDisplay(void) { - _delay_ms(10); - + _delay_ms(100); + // Hardware reset hwReset(); @@ -155,17 +155,17 @@ displayCmd(COLMOD); displayData(0b00111101); displayDes(); - + // Display on displaySel(); displayCmd(DISPON); displayDes(); - + // Sleep in & booster off // displaySel(); // displayCmd(SLPIN); // displayDes(); - + printString("Display init done\r\n"); } @@ -181,7 +181,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 } @@ -234,8 +234,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);