[riot-devel] Modify the way of Including MSP430 standard headers?

Oleg Hahm oliver.hahm at inria.fr
Thu Dec 5 11:58:02 CET 2013


Hi Kévin!

> Since this platform is based on a family-2 MSP430 (F2617) --- a kind of MCU
> not yet used in any current port in RIOT ---, I stumbled upon
> inconsistencies with the already included header files.
I guess there are even more inconsistencies in board and cpu. Hauke was so
kind to create an overview about the current state of board and cpu headers
and the according implementations. He'll probably propose a new version of the
hardware interface that is more consistent and easier to understand.

> Instead of adding one more #ifdef case for including the correct headers, I
> think we can just include <msp430.h> in all the concerned files : this is a
> generic file that includes the correct specific headers when the right
> symbol is defined.
> 
> Practically, following my idea, we would add lines like this in boards
> definitions:
> 
>     #define __MSP430F1611__
>   - in telosb/include/board.h, wsn430*/include/board.h,
> 
>     #define __MSP430F1612__
>   - in msb430/include/board.h,
> 
>     #define __CC430F6137__
>   - in chronos/include/board.h,
> 
>     #define __MSP430F2617__
>   - in z1/include/board.h (file I am creating in my new port).
> 
> and in generic MSP430 files (in the "core" of RIOT), we would only add these
> "unconditional lines":
>     #include "board.h"
>     #include <msp430.h>
> 
> This would simplify the source files, by reducing the number of ifdefs, and
> allow an easier integration for any future platform based on (current or
> future) MSP430 devices.
> 
> What do you think?
+1

Cheers,
Oleg
-- 
printk(" (Read error)");        /* Bitch about the problem. */
        linux-2.6.6/drivers/cdrom/mcd.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20131205/5a54cf06/attachment.sig>


More information about the devel mailing list