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

2)  USART.c
            #include  "stm32f10x.h"
            #include  "USART.h"
            #include  "GLCD.h"
            #include  "interrupt.h"
            char  usart_name[10][10];
            char  usart_gap[10][10];
            char  usart_tag[10][10];
            int  usart_cursor=0;
            int  check=0;
            unsigned int i=0;


            int  isname=0;
            int  record_name=0;
            int  record_gap=0;
            int  record_tag=0;


            void  Delay(vu32  nCount)
            {
                    for(;  nCount  !=  0;  nCount--);
            }


            void  USART1_SendByte(u16  Data)
            {
                while (!(USART1->SR  &  USART_FLAG_TXE));
                  USART1->DR  =  (Data  &  (uint16_t)0x01FF);

            }
            void  USART1Write(u8*  data,u16  len)
            {
                    u16  i;
            //      DIR485_H  ;
                    for  (i=0;  i<len-1;  i++){
                            USART1_SendByte(data[i]);
                    }
            //      Delay10us(1000);
            //      DIR485_L;
            }


            void  USART2_SendByte(u16  Data)
            {




                                                         -  710  -
   712   713   714   715   716   717   718   719   720   721   722