On Sun, Mar 16, 2014, at 07:59 PM, John Kasunich wrote:

> new          memcpy(data_addr, &pin->dummysig, sizeof(hal_data_u));

I'm not sure if memcpy is neccessary here, the only 
requirement is to copy the value from one place to
the other.  hal_data_u is a union that can contain any
HAL data type.

 122 typedef union {
 123     hal_bit_t b;
 124     hal_s32_t s;
 125     hal_s32_t u;
 126     hal_float_t f;
 127 } hal_data_u;

If you can be sure that hal_float_t is the largest member on
all platforms, then it could just be:

   *((hal_float_t)(data_addr)) = pin->dummysig.f;


-- 
  John Kasunich
  [email protected]

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to