NordicSemiconductor / zcbor

Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.
Apache License 2.0
118 stars 37 forks source link

src: Abstract float16 conversion and move it to zcbor_common.c #333

Closed oyvindronningstad closed 1 year ago

oyvindronningstad commented 1 year ago

Create new functions zcbor_float16_to_32() and zcbor_float32_to_16() in zcbor_common.c and use these in the decoding/encoding functions.

Adapt float16 test to use the new functions directly for the lengthiest test.