Saturday, 8 December 2012

UART works

Yay, I've got one of the UARTs transmitting, just an incrementing number right now but that's the embedded UART equivalent of "Hello world".

Here's the code

Note the "Arduino" style. It will get more Arduino-like soon, for example delay() instead of delayMilliseconds(), serialPrint() in stead of serialFifoWrite() but at present I'm working with the native LARD functions.

That said I will normally work with the LARD native API because I think it has a lot more functionality, the Arduino functions are mostly wrappers for LARD code anyway, the idea being that Arduino programmers can feel at home using LARD on an LPC straight away.

Of course all the hard work is behind the scenes in the ISR and various other pieces of code, the above is what a user would normally write.

Now I have to clean all the code up and work on receiving.

No comments:

Post a Comment