| | |
| | | // NVIC_SetPendingIRQ(PendSV_IRQn); |
| | | // SCB->ICSR=SCB_ICSR_PENDSVSET_Msk; //1<<SCB_ICSR_PENDSVSET_Pos; |
| | | |
| | | if (Uart1RecvBuf1DataLen >0) |
| | | if (Uart1RxBuf1DataLen >0) |
| | | { |
| | | Uart1Stat.bPacketRecved=1; |
| | | // SCB->ICSR=SCB_ICSR_PENDSVSET_Msk; //1<<SCB_ICSR_PENDSVSET_Pos; |
| | |
| | | } |
| | | void Uart2RecvDone() |
| | | { |
| | | Uart2RecvBuf1DataLen=sizeof(Uart2RecvBuf1) - LL_DMA_GetDataLength(DMA1,LL_DMA_CHANNEL_5); |
| | | Uart2RxBuf1DataLen=sizeof(Uart2RxBuf1) - LL_DMA_GetDataLength(DMA1,LL_DMA_CHANNEL_5); |
| | | Uart2Stat.bPacketRecved=1; |
| | | Uart2Stat.IdelCount++; |
| | | if (Uart2RecvBuf1DataLen>0) |
| | | if (Uart2RxBuf1DataLen>0) |
| | | TriggerPendSV(); |
| | | // ParsePacket((pKBPacket)Uart2RecvBuf1,Uart2RecvBuf1DataLen); |
| | | } |
| | |
| | | int SendPacket(int nChn, void * pBuf,int len1) |
| | | { |
| | | if (nChn==1) { |
| | | PutStr1((char *)pBuf,len1); |
| | | Uart1SendDMA(pBuf, len1); |
| | | // PutStr1((char *)pBuf,len1); |
| | | // PushIn(&Uart1Stat.QTx,p1,len1); |
| | | // Uart1TriggerSendDMA(); |
| | | |