Mercurial > ~darius > hgwebdir.cgi > stm32test
annotate lcd.h @ 10:0b75cff7c570
Add _usleep16 - sleeps for cnt microseconds.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 06 Feb 2012 23:54:36 +1030 |
parents | be0a1ac64d97 |
children |
rev | line source |
---|---|
8
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
1 void lcd_init(void); |
9 | 2 void lcd_writereg(uint16_t index, uint16_t val); |
3 uint16_t lcd_readreg(uint16_t index); | |
4 uint16_t lcd_readdata(int first); | |
5 void lcd_writedata(uint16_t val); | |
6 void lcd_startgram(uint16_t x, uint16_t y); | |
8
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
7 void lcd_setpwm(uint16_t val); |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
8 void lcd_pixel(uint16_t x, uint16_t y, uint16_t colour); |
9 | 9 void lcd_circle(uint16_t x0, uint16_t y0, uint16_t radius, uint8_t fill, uint16_t colour); |
10 void lcd_ellipse(int xc, int yc, int rx, int ry, uint8_t fill, uint16_t colour); | |
8
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
11 void lcd_line(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t colour); |
9 | 12 void lcd_stripes(void); |
13 uint16_t lcd_parsecol(char c); | |
4
2c87e30c982d
Add LCD init, touch screen writing etc..
Daniel O'Connor <darius@dons.net.au>
parents:
3
diff
changeset
|
14 |
8
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
15 #define LCD_HEIGHT 240 |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
16 #define LCD_WIDTH 320 |
4
2c87e30c982d
Add LCD init, touch screen writing etc..
Daniel O'Connor <darius@dons.net.au>
parents:
3
diff
changeset
|
17 |
8
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
18 #define RGB24_565(R, G, B) (((((R) >> 3) & 0x1f) << 11) | ((((G) >> 2) & 0x3f) << 5) | (((B) >> 3) & 0x1f)) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
19 #define LCD_WHITE RGB24_565(255, 255, 255) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
20 #define LCD_BLACK RGB24_565(0, 0, 0) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
21 #define LCD_RED RGB24_565(255, 0, 0) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
22 #define LCD_GREEN RGB24_565(0, 255, 0) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
7
diff
changeset
|
23 #define LCD_BLUE RGB24_565(0, 0, 255) |