You might have seen my previous email about hal_pin_newf. That is all sorted out now, and I think I have the component ready to push.
It is a load-time configurable mux. You can choose the number of channels, and the datatype. Because it was not actually any more work, and it seems that many of the times you use a mux it needs wrapping in type convertors, the input and output data types are not necessarily the same. I haven't pushed it yet, because I am not quite sure how to do the conversions. At the moment it performs standard C-default conversions. This means that float 2147483647.0 converts to S32 2147483647, but float 2147483648.0 converts to -2147483648. I feel that some of these features might be unexpected to users, so I am thinking about adding a bit of code to fix out-of-range values to the limits (s32 -20 would be converted to u32 0, not u32 4294967276). Does this seem sensible? It does make many of the conversions one-way. Is it reasonable to push the component for folk to look over? It is using something I have not used before (unions) and probably warrants a bit of a looking at by an actual programmer. Neither of the versions I pastebinned it the other thread bear much resemblance to the current version, which is here: http://pastebin.com/36WStWST -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
