X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fmsp430hardware.h;h=e5406c5b1e93e691345e7a135c97d759d8658705;hb=48666eab550362c629ba4dcb7d107b9d44b9ba6c;hp=829f2bd8cc8ff2d332f5930266427b702c7d8dea;hpb=ecbecc3c16e41fe3cf696c85b828c4bba22d5b52;p=tinyos-2.x.git diff --git a/tos/chips/msp430/msp430hardware.h b/tos/chips/msp430/msp430hardware.h index 829f2bd8..e5406c5b 100644 --- a/tos/chips/msp430/msp430hardware.h +++ b/tos/chips/msp430/msp430hardware.h @@ -220,7 +220,7 @@ void __nesc_atomic_end(__nesc_atomic_t reenable_interrupts); #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() @@ -239,7 +239,12 @@ void __nesc_atomic_end(__nesc_atomic_t reenable_interrupts) @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() {