Statistics: Posted by AgentSmithers — Thu Feb 01, 2018 8:19 am
Statistics: Posted by Her Mary — Wed Jan 31, 2018 2:03 pm
Statistics: Posted by AgentSmithers — Tue Jan 30, 2018 2:13 pm
Code:
LOCAL void uart0_rx_intr_handler(void *para)
{
char RcvChar[4];
RcvMsgBuff *pRxBuff = (RcvMsgBuff *)para;
if (UART_RXFIFO_FULL_INT_ST != (READ_PERI_REG(UART_INT_ST(UART0)) & UART_RXFIFO_FULL_INT_ST)) {
return;
}
WRITE_PERI_REG(UART_INT_CLR(UART0), UART_RXFIFO_FULL_INT_CLR);
while (READ_PERI_REG(UART_STATUS(UART0)) & (UART_RXFIFO_CNT << UART_RXFIFO_CNT_S))
{
ETS_UART_INTR_DISABLE();
RcvChar[0] = READ_PERI_REG(UART_FIFO(UART0)) & 0xFF;
/* you can add your handle code below.*/
gpio_output_set(0, (1 << 2), 0, 0);
uart0_tx_buffer(RcvChar, 1);
// Clear pending FIFO interrupts
WRITE_PERI_REG(UART_INT_CLR(UART0), UART_RXFIFO_TOUT_INT_CLR | UART_RXFIFO_FULL_INT_ST);
ETS_UART_INTR_ENABLE();
}
}
Statistics: Posted by AgentSmithers — Tue Jan 30, 2018 1:53 pm
Code:
// install uart1 putc callback
os_install_putc1((void *)uart1_write_char);//print output at UART1
Statistics: Posted by AgentSmithers — Fri Jan 26, 2018 12:25 am
Code:
// install uart1 putc callback
os_install_putc1((void *)uart1_write_char);//print output at UART1
Statistics: Posted by Her Mary — Thu Jan 25, 2018 5:36 pm
Statistics: Posted by AgentSmithers — Wed Jan 24, 2018 3:26 pm