[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430 msp430hardware.h, 1.8, 1.9

David Gay idgay at users.sourceforge.net
Fri Sep 19 16:59:03 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2114/msp430

Modified Files:
	msp430hardware.h 
Log Message:
nx_float support

Index: msp430hardware.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/msp430hardware.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** msp430hardware.h	26 Jun 2008 04:39:08 -0000	1.8
--- msp430hardware.h	19 Sep 2008 23:59:00 -0000	1.9
***************
*** 240,243 ****
--- 240,257 ----
  #endif
  
+ /* Floating-point network-type support */
+ typedef float nx_float __attribute__((nx_base_be(afloat)));
+ 
+ inline float __nesc_ntoh_afloat(const void *COUNT(sizeof(float)) source) @safe() {
+   float f;
+   memcpy(&f, source, sizeof(float));
+   return f;
+ }
+ 
+ inline float __nesc_hton_afloat(void *COUNT(sizeof(float)) target, float value) @safe() {
+   memcpy(target, &value, sizeof(float));
+   return value;
+ }
+ 
  #endif//_H_msp430hardware_h
  



More information about the Tinyos-2-commits mailing list