Page 616 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 616
#define RS_set GPIOD -> BSRR = 0x00002000
#define RS_reset GPIOD -> BRR = 0x00002000
#define WR_set GPIOD -> BSRR = 0x00004000
#define WR_reset GPIOD -> BRR = 0x00004000
#define RD_set GPIOD -> BSRR = 0x00008000
#define RD_reset GPIOD -> BRR = 0x00008000
#define line0 0
#define line1 24
#define line2 48
#define line3 72
#define line4 96
#define line5 120
#define line6 144
#define line7 168
#define line8 192
#define line9 216
#define WIDTH 320
#define HEIGHT 240
#define DELAY_2N 18
static void delay (int cnt)
{
cnt <<= DELAY_2N;
while (cnt--);
}
__inline void wr_cmd (unsigned char c)
{
RS_reset;
RD_set;
GPIOE->ODR = c;
WR_reset;
WR_set;
}
__inline void wr_dat (unsigned short c)
{
RS_set;
RD_set;
GPIOE->ODR = c;
WR_reset;
- 609 -