Single precision floating point conversion converter decoder makes it readable
SP_FP.h@0:f99d1aa55201, 2015-01-20 (annotated)
- Committer:
- LORDTEK
- Date:
- Tue Jan 20 14:45:08 2015 +0000
- Revision:
- 0:f99d1aa55201
Single Precision Floating Point converter makes it readable
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
LORDTEK | 0:f99d1aa55201 | 1 | #ifndef SP_FP_H |
LORDTEK | 0:f99d1aa55201 | 2 | #define SP_FP_H |
LORDTEK | 0:f99d1aa55201 | 3 | #include "mbed.h" |
LORDTEK | 0:f99d1aa55201 | 4 | |
LORDTEK | 0:f99d1aa55201 | 5 | class SP_FP { |
LORDTEK | 0:f99d1aa55201 | 6 | public: |
LORDTEK | 0:f99d1aa55201 | 7 | SP_FP(); |
LORDTEK | 0:f99d1aa55201 | 8 | float decoder(uint32_t VALUE); |
LORDTEK | 0:f99d1aa55201 | 9 | |
LORDTEK | 0:f99d1aa55201 | 10 | private: |
LORDTEK | 0:f99d1aa55201 | 11 | float result; |
LORDTEK | 0:f99d1aa55201 | 12 | uint32_t value_Temp; // Needed because of bitwise operations |
LORDTEK | 0:f99d1aa55201 | 13 | }; |
LORDTEK | 0:f99d1aa55201 | 14 | |
LORDTEK | 0:f99d1aa55201 | 15 | #endif |