|
void send(unsigned int add_buf,unsigned int count)
{
//while(!((*AT91C_US1_CSR)&(1<<4)));//ENDTX=1·¢Ëí ENDTX=0μè′y
*AT91C_US1_TPR=add_buf;
*AT91C_US1_TCR=count;
*AT91C_US1_PTCR = AT91C_PDC_TXTEN;
while(!((*AT91C_US1_CSR)&(1<<4)));//ENDTX=1·¢Ëí ENDTX=0μè′y
}
void send_sz(unsigned char *dat,unsigned char count)
{
unsigned char i;
for(i=0;i
{
Uart1PutChar(dat[i]);
}
}
//1|ÄüÖ¸áî½aÎö
chech_order();
if(ORD.gn==1)
{
send_qu_liebiao();
delay_ms(10);
}
else if (ORD.gn==2)
{
send_dat(ORD.qq ,ORD.kk );
delay_ms(10);
} |
|