Mercurial > ~darius > hgwebdir.cgi > stm32test
view lcd.h @ 8:58d76cf522ff
Split out code into separate files.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 04 Feb 2012 13:29:31 +1030 |
parents | 9404b9869c27 |
children | be0a1ac64d97 |
line wrap: on
line source
void lcd_init(void); void lcd_wr_reg(uint16_t index, uint16_t val); uint16_t lcd_rd_reg(uint16_t index); uint16_t lcd_rd_data(int first); void lcd_wr_data(uint16_t val); void lcd_wr_startdata(uint16_t x, uint16_t y); void lcd_setpwm(uint16_t val); void lcd_pixel(uint16_t x, uint16_t y, uint16_t colour); void lcd_circle(uint16_t x0, uint16_t y0, uint16_t radius, uint16_t colour); void lcd_line(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t colour); #define LCD_HEIGHT 240 #define LCD_WIDTH 320 #define RGB24_565(R, G, B) (((((R) >> 3) & 0x1f) << 11) | ((((G) >> 2) & 0x3f) << 5) | (((B) >> 3) & 0x1f)) #define LCD_WHITE RGB24_565(255, 255, 255) #define LCD_BLACK RGB24_565(0, 0, 0) #define LCD_RED RGB24_565(255, 0, 0) #define LCD_GREEN RGB24_565(0, 255, 0) #define LCD_BLUE RGB24_565(0, 0, 255)