Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
uart1_read(bufptr, 8, uart1_callback);通过该函数好像只能读取一次数据,怎么注册串口中断持续读取数据?
在callback中重新调用uart1_read就可以了
怎么取出来读到的串口数据?还有就是为什么中断函数要放到callback 函数里面?
void uart_recevie(void*bufptr, uint8_t callback)//中断接收函数 {
uart_putc_noint(UART1,buf); uart1_read(&buf,1,uart_recevie); //重复调用才能进入中断
}