Page 730 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 730

wr_reg(0x21, 0);


                CS_reset;
                wr_cmd(0x22);

                for(i=0;i<320;i++)
                    for(j=0;j<240;j++)
                 {
                        if(i>279)wr_dat(0x0000);
                        else  if(i>239)wr_dat(0x001f);
                        else  if(i>199)wr_dat(0x07e0);
                        else  if(i>159)wr_dat(0x07ff);
                        else  if(i>119)wr_dat(0xf800);
                    else  if(i>79)wr_dat(0xf81f);
                    else  if(i>39)wr_dat(0xffe0);
                    else  wr_dat(0xffff);
                 }
               CS_set;
            }


            4)USART.h


            #ifndef  __USART_H
            #define  __USART_H


            extern  char*  usart_givename  (int  i);
            extern  char*  usart_givegap  (int  i);
            extern  char*  usart_givetag  (int  i);
            extern int usart_givecur(void);
            void  USART1_IRQHandler(void);


            void  USART2_IRQHandler(void); //income  name,  gap


            void  testgap  (void);


            uint16_t  USART1_ReceiveData(void);


            void  USART1_SendData(short  data);


            void  USART1Write(u8*  data,u16  len);






                                                         -  723  -
   725   726   727   728   729   730   731   732   733   734   735