Jump to content

Time Library, Port?

Recommended Posts

Some parts should port fairly easily. The problem would be in using the various time sources. TimerSerial should work. TimerGPS less so as we don't have a NewSoftSerial library. You would have to write one of those yourself. The TimeNTP time source uses networking so it isn't going to port without a lot of effort. There really isn't a standard networking card for the launchpad. So there isn't any networking code to use.


Other than the time sources, some of the code is very AVR specific. It uses the avr-gcc macro PROGMEM which isn't valid for the msp430.

char monthStr1[] PROGMEM = "January";

The msp430 uses a more conventional approach to storing strings in flash it would be:

const char monthStr1[] = "January";



Link to post
Share on other sites

I am pretty sure you can just #define PROGMEM to oblivion, should bringing unchanged code over tickle your fancy. (It has to do with the AVR being Harvard and this IIRC is their way of tricking data to be "code" (so as to make it reside in flash or something), whereas even the concept doesn't exist on a von Neumann '430.)


Ed. well, yeah, then you still have to constify, so unchanged won't fly too far anyway... :).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...