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

#define tagclockCF0B7C24
            #define tagexid         8E672197


            #endif


            USART.c



             #include  "stm32f10x.h"
             #include  "USART.h"
             #include  "GLCD.h"
             #include  "interrupt.h"

             #include  <string.h>


             #define  CORRECT_RFID_VALUE  "BCC164AB"


             static u8  rfidValue[8];             //  8  Bits  RFID  Values

             // static  u16  sendCount  =  0;         //  Send Counting!


             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)

             {




                                                         -  585  -
   587   588   589   590   591   592   593   594   595   596   597