#ifndef _H_msp430hardware_h
#define _H_msp430hardware_h
+#if defined(__MSPGCC__)
+/* mspgcc */
+#include <msp430.h>
+#include <legacymsp430.h>
+#else /* __MSPGCC__ */
+/* old mspgcc3, forked mspgcc4 */
#include <io.h>
#include <signal.h>
+#endif /* __MSPGCC__ */
#include "msp430regtypes.h"
#ifndef NESC_BUILD_BINARY
/* @spontaneous() functions should not be included when NESC_BUILD_BINARY
- is #defined, to avoid duplicate functions definitions wheb binary
+ is #defined, to avoid duplicate functions definitions when binary
components are used. Such functions do need a prototype in all cases,
though. */
__nesc_atomic_t __nesc_atomic_start(void) @spontaneous() @safe()
}
#endif
-/* Floating-point network-type support */
+/* Floating-point network-type support.
+ These functions must convert to/from a 32-bit big-endian integer that follows
+ the layout of Java's java.lang.float.floatToRawIntBits method.
+ Conveniently, for the MSP430 family, this is a straight byte copy...
+*/
+
typedef float nx_float __attribute__((nx_base_be(afloat)));
inline float __nesc_ntoh_afloat(const void *COUNT(sizeof(float)) source) @safe() {