rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
log_field.cpp File Reference

Functions

static void memcpy_swapend (void *dest, const void *src, size_t num, void *offset)
 
static void copyFloat (char *buffer, float value)
 

Function Documentation

◆ copyFloat()

static void copyFloat ( char buffer,
float  value 
)
static

Definition at line 16 of file log_field.cpp.

16 {
17 memcpy_swapend(buffer, reinterpret_cast<char*>(&value), sizeof(float), nullptr);
18}
static void memcpy_swapend(void *dest, const void *src, size_t num, void *offset)
Definition log_field.cpp:7
static BigBufferHandle buffer

Referenced by LogField::writeHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memcpy_swapend()

static void memcpy_swapend ( void *  dest,
const void *  src,
size_t  num,
void *  offset 
)
static

Definition at line 7 of file log_field.cpp.

7 {
8 const char* src2 = reinterpret_cast<const char*>(src);
9 char* dest2 = reinterpret_cast<char*>(dest);
10 for (size_t i = 0; i < num; i++) {
11 // Endian swap - copy the end to the beginning
12 dest2[i] = src2[num - 1 - i + (uint64_t)offset];
13 }
14}
uint16_t offset
Definition tunerstudio.h:0

Referenced by copyFloat(), and LogField::writeData().

Here is the caller graph for this function:

Go to the source code of this file.