diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-10-24 15:03:47 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-10-24 15:03:47 +1000 |
commit | e6f17baf6133fb83c5c72f7b173cf50c9c275224 (patch) | |
tree | d9bfb55a08c61ffa018d5c1bb6bdb32320d31d85 /include/gmisc | |
parent | 21afd2b8f19d522fab6b78670bf1afcf11388cd5 (diff) | |
download | uGFX-e6f17baf6133fb83c5c72f7b173cf50c9c275224.tar.gz uGFX-e6f17baf6133fb83c5c72f7b173cf50c9c275224.tar.bz2 uGFX-e6f17baf6133fb83c5c72f7b173cf50c9c275224.zip |
GMISC invsqrt() function.
Fix a 64bit processor bug.
Add support for processors where the floating point and integer endianness don't match.
Add support for processors with a non-standard floating point format.
Update gdisp_streaming demo with extra comments to reflect the above changes.
Diffstat (limited to 'include/gmisc')
-rw-r--r-- | include/gmisc/options.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/gmisc/options.h b/include/gmisc/options.h index 73b41800..9c309487 100644 --- a/include/gmisc/options.h +++ b/include/gmisc/options.h @@ -44,9 +44,34 @@ /**
* @}
*
- * @name GMISC Optional Sizing Parameters
+ * @name GMISC Optional Parameters
* @{
*/
+ /**
+ * @brief Modifies the @p invsqrt() function to assume a different integer to floating point endianness.
+ * @note Normally the floating point format and the integer format have
+ * the same endianness. Unfortunately there are some strange
+ * processors that don't eg. some very early ARM devices.
+ * For those where the endianness doesn't match you can fix it by
+ * defining GDISP_INVSQRT_MIXED_ENDIAN.
+ * @note This still assumes the processor is using an ieee floating point format.
+ *
+ * If you have a software floating point that uses a non-standard
+ * floating point format (or very strange hardware) then define
+ * GDISP_INVSQRT_REAL_SLOW and it will do it the hard way.
+ */
+ #ifndef GDISP_INVSQRT_MIXED_ENDIAN
+ #define GDISP_INVSQRT_MIXED_ENDIAN FALSE
+ #endif
+ /**
+ * @brief Modifies the @p invsqrt() function to do things the long slow way.
+ * @note This causes the @p invsqrt() function to work regardless of the
+ * processor floating point format.
+ * @note This makes the @p invsqrt() function very slow.
+ */
+ #ifndef GDISP_INVSQRT_REAL_SLOW
+ #define GDISP_INVSQRT_REAL_SLOW FALSE
+ #endif
/** @} */
#endif /* _GMISC_OPTIONS_H */
|