Joke Collection Website - Public benefit messages - Zet6 sends short messages

Zet6 sends short messages

USART_IT_RXNE? This is a receive interrupt.

USART_IT_TXE? This is the interrupt that happened.

Static electricity Charles? DTs[5 12]; //Send buffer space

Static electricity Variable? uint 16_t? DTCursorTop = 0;

Static electricity Variable? uint 16_t? DTCursorEnd = 0;

Invalid? UART5_IRQHandler(void)

{?

//Receive register is not empty.

if(USART_GetITStatus(UART5,? USART_IT_RXNE)? ! =? Reset)

{

Charles? Data? =? UART 5->; DR; //Sorry, I don't like function calls. If interruption can save running time, then save running time.

}

//Send register is empty.

if(USART_GetITStatus(UART5,? USART_IT_TXE? )? ! =? Reset)

{

if(DTCursorTop? ==? DTCursorEnd){

open _ USARTx-& gt; CR 1? & amp=? 0xff7f// After the transmission is completed, clear the interrupt transmission flag bit.

}

Otherwise {

UART 5->; DR=? DTs[(DTCursorTop ++) & amp; 0x 1ff]; //=? 0x03

//USART_SendData(UART5,? 0x 03);

//The two statements have the same function, and the latter one will generate redundant instructions, occupying more stack space.

}

}?

}

int? sendchar(int? ch){

while((((DTCursorTop-DTCursorEnd))& amp; 0x 1ff)? == 1)){

//? UART 5->; CR 1? |=? 0x80//λ ж? ; // ? νáβ

}

DTs[(DTCursorEnd ++) & amp; 0x 1ff]? =? ch;

UART 5->; CR 1? |=? USART _ Cr 1 _ tx eie; //Set the trigger transmission interrupt.

Return? 0;

}/*? Are you online? Serial.c? */You used the wrong parameter. It's handwritten, not copied and pasted online.