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

3000won";}
                     e                            l                           s                           e
             if(usart_tag[usart_last_cursor][3]=='3'||usart_tag[usart_last_cursor][4]=='3')
                             {pay+=1000;USART1Write((u8*)"C",sizeof("C"));return "      Cola
             1000won";}
                     e                            l                           s                           e
             if(usart_tag[usart_last_cursor][3]=='0'||usart_tag[usart_last_cursor][4]=='0')
                             {pay+=1500;USART1Write((u8*)"A",sizeof("A"));return "      Apple
             1500won";}
                     else
                             return "        000";
             }


             /*상품번호  나타내는  함수*/
             void num (unsigned int ln, unsigned int col, unsigned int  a)

             {
                     unsigned char N10000,N1000,N100,N10,N1;


                     N10000 = (a/10000)%10 + '0';
                     N1000 = (a/1000)%10 + '0';
                     N100 = (a/100)%10 + '0';
                     N10 = (a/10)%10 + '0';
                     N1 = (a/1)%10 + '0';
                     if(N10000!='0')
                     GLCD_displayChar(ln, col+20, N10000);
                     if(N1000!='0')
                 GLCD_displayChar(ln, col, N1000);
                     if(N100!='0')
                     GLCD_displayChar(ln, col-20, N100);
                     GLCD_displayChar(ln, col-40, N10);
                     GLCD_displayChar(ln, col-60, N1);
             }




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

             }



                                                         -  303  -
   305   306   307   308   309   310   311   312   313   314   315