Functions | Variables
xsbytearray.c File Reference
#include "xsbytearray.h"
Include dependency graph for xsbytearray.c:

Go to the source code of this file.

Functions

static int compareUint8 (uint8_t const *a, uint8_t const *b)
 The function to use for comparing two items. More...
 
static void copyUint8 (uint8_t *to, uint8_t const *from)
 The function to use for copying the data of from to to. More...
 
static void swapUint8 (uint8_t *a, uint8_t *b)
 The function to use for swapping the data of two array items. More...
 

Variables

const XsArrayDescriptor g_xsByteArrayDescriptor
 Descriptor for XsByteArray. More...
 

Function Documentation

◆ compareUint8()

static int compareUint8 ( uint8_t const *  a,
uint8_t const *  b 
)
static

The function to use for comparing two items.

Parameters
aLeft hand side of comparison.
bRight hand side of comparison.
Returns
The function will return 0 when the items are equal. When greater/less comparison is possible, the function should return < 0 if a < b and > 0 if a > b.
Note
Specialization for uint8_t

Definition at line 93 of file xsbytearray.c.

◆ copyUint8()

static void copyUint8 ( uint8_t *  to,
uint8_t const *  from 
)
static

The function to use for copying the data of from to to.

Parameters
toPointer to item to copy to.
fromPointer to item to copy from.
Note
Specialization for uint8_t

Definition at line 85 of file xsbytearray.c.

◆ swapUint8()

static void swapUint8 ( uint8_t *  a,
uint8_t *  b 
)
static

The function to use for swapping the data of two array items.

Parameters
aPointer to first item to swap.
bPointer to second item to swap.
Note
Specialization for uint8_t

Definition at line 75 of file xsbytearray.c.

Variable Documentation

◆ g_xsByteArrayDescriptor

const XsArrayDescriptor g_xsByteArrayDescriptor
Initial value:
=
{
sizeof(uint8_t),
XSEXPCASTITEMSWAP swapUint8,
0,
XSEXPCASTITEMCOPY copyUint8,
0,
XSEXPCASTITEMCOPY copyUint8,
XSEXPCASTITEMCOMP compareUint8,
XSEXPCASTRAWCOPY XsArray_rawCopy
}

Descriptor for XsByteArray.

Definition at line 103 of file xsbytearray.c.

XsArray::XsArray_rawCopy
void XsArray_rawCopy(void *to, void const *from, XsSize count, XsSize iSize)
Copies items optimized in a direct way.
Definition: xsarray.c:707
copyUint8
static void copyUint8(uint8_t *to, uint8_t const *from)
The function to use for copying the data of from to to.
Definition: xsbytearray.c:85
compareUint8
static int compareUint8(uint8_t const *a, uint8_t const *b)
The function to use for comparing two items.
Definition: xsbytearray.c:93
swapUint8
static void swapUint8(uint8_t *a, uint8_t *b)
The function to use for swapping the data of two array items.
Definition: xsbytearray.c:75


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:21