Home > other >  Hal library a serial port to send and receive
Hal library a serial port to send and receive

Time:11-29

I used to accept the callback function, receive data, accept is completed in the main program to deal with the data and send the instructions, but can't accept instructions from the machine, after opening a serial port to accept interrupt, why not send the data in the main program, data processing is normal,

CodePudding user response:

Receiving interrupt leaves in the initialization section, first, and then in receiving callback function, after handling the receiving data, once again open to receive interrupt, such ability can constantly receiving data, sending data can be normal to send in the main program
  • Related