Coverage Report

Created: 2022-11-24 06:23

/src/arduinojson/src/ArduinoJson/MsgPack/ieee754.hpp
Line
Count
Source (jump to first uncovered line)
1
// ArduinoJson - https://arduinojson.org
2
// Copyright © 2014-2022, Benoit BLANCHON
3
// MIT License
4
5
#pragma once
6
7
#include <ArduinoJson/Namespace.hpp>
8
9
namespace ARDUINOJSON_NAMESPACE {
10
11
0
inline void doubleToFloat(const uint8_t d[8], uint8_t f[4]) {
12
0
  f[0] = uint8_t((d[0] & 0xC0) | (d[0] << 3 & 0x3f) | (d[1] >> 5));
13
0
  f[1] = uint8_t((d[1] << 3) | (d[2] >> 5));
14
0
  f[2] = uint8_t((d[2] << 3) | (d[3] >> 5));
15
0
  f[3] = uint8_t((d[3] << 3) | (d[4] >> 5));
16
0
}
17
18
}  // namespace ARDUINOJSON_NAMESPACE