diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-03-25 21:16:33 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-03-25 21:16:33 -0400 |
commit | 603d04992cbf6c02cfc16f06ffab7d014d817634 (patch) | |
tree | bb31f0fe50f322c44a6d637b55cc02583b5b08d2 /include/display.h | |
parent | 5c5c93db40c6412fb46a09383640db01b4c6db4e (diff) |
added licensing
Diffstat (limited to 'include/display.h')
-rw-r--r-- | include/display.h | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/include/display.h b/include/display.h index 55f6974..b8afe38 100644 --- a/include/display.h +++ b/include/display.h @@ -1,6 +1,21 @@ /* * @file display.h - * Display library for ILI9481 display. + * Display library for ILI9481 display + * + * Copyright (C) 2018 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef DISPLAY_H_ @@ -19,6 +34,11 @@ #define LCD_HEIGHT 320 /** + * Initializes the display. Must be called before other display use. + */ +void dsp_init(void); + +/** * Returns the color integer for the given RGB values. * Converts 8RGB to 5-6-5. * @param r red value, 0-255 @@ -52,9 +72,24 @@ void dsp_write_data(uint8_t data); */ uint8_t dsp_read_data(void); +/** + * Selects the area of pixels to draw to, from (x1, y1) inclusive to (x2, y2) + * exclusive. + * @param x1 starting x coordinate + * @param y1 starting y coordinate + * @param x2 ending x coordinate + * @param y2 ending y coordinate + */ void dsp_set_addr(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); -void dsp_set_addr_read(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); -void dsp_init(void); +/** + * Selects the area of pixels to read from, in the range (x1, y1) inclusive to + * (x2, y2) exclusive. + * @param x1 starting x coordinate + * @param y1 starting y coordinate + * @param x2 ending x coordinate + * @param y2 ending y coordinate + */ +void dsp_set_addr_read(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); #endif // DISPLAY_H_ |