We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear All,
Is possible to have informations on this code?
int sendchar (int ch) { /* Write character to Serial Port */
while (!(UxLSR & 0x20)); Why??
return (UxTHR = ch); Why?? }
Thanks
A quick peek in the user manual (that's the name of the "good stuff" for the LPC23xx chips) will quickly find the definition for U0LSR, U1LSR, U2LSR and U3LSR.
The first match if you search will also tell you the symbolic name for the bit 0x20. A little extra search and you will get a full paragraph what the bit represents, and then it will be obvious why the example code waits.
The only way to really learn is by spending time to learn. We can't learn for you.