21e3f0f4c0d28aa3df33bb964d11eb0a027f53b3
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

1) #include "cyc_cnt.h"
2) #include "lcd.h"
3) 
Stefan Schuermans converted code to use const...

Stefan Schuermans authored 12 years ago

4) static volatile unsigned char *const lcd_ptr =
5)   (volatile unsigned char *)0x80000100;
6) 
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

7) /**
8)  * @brief set data to LCD
9)  * @param[in] data data to LCD
10)  */
11) void lcd_set_data(unsigned char data)
12) {
Stefan Schuermans converted code to use const...

Stefan Schuermans authored 12 years ago

13)   lcd_ptr[0] = data;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

14) }
15) 
16) /**
17)  * @brief set enable signal to LCD
18)  * @param[in] state state for enable signal (0 or 1)
19)  */
20) void lcd_set_e(unsigned char state)
21) {
Stefan Schuermans converted code to use const...

Stefan Schuermans authored 12 years ago

22)   lcd_ptr[1] = state;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

23) }
24) 
25) /**
26)  * @brief set register select signal to LCD
27)  * @param[in] state state for register select signal (0 or 1)
28)  */
29) void lcd_set_rs(unsigned char state)
30) {
Stefan Schuermans converted code to use const...

Stefan Schuermans authored 12 years ago

31)   lcd_ptr[2] = state;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

32) }
33) 
34) /**
35)  * @brief set read/write signal to LCD
36)  * @param[in] state state for read/write signal (0 or 1)
37)  */
38) void lcd_set_rw(unsigned char state)
39) {
40)   volatile unsigned char *p_lcd_rw = (volatile unsigned char *)0x80000103;
Stefan Schuermans converted code to use const...

Stefan Schuermans authored 12 years ago

41)   lcd_ptr[3] = state;