NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
utils.h File Reference

Interface to platform-dependent run-time operations. More...

Go to the source code of this file.

Functions

unsigned int _copy (uint8_t *to, unsigned int to_len, const uint8_t *from, unsigned int from_len)
 Copy the the buffer 'from' to the buffer 'to'.
 
void _set (void *to, uint8_t val, unsigned int len)
 Set the value 'val' into the buffer 'to', 'len' times.
 

Detailed Description

Interface to platform-dependent run-time operations.

Function Documentation

◆ _copy()

unsigned int _copy ( uint8_t *  to,
unsigned int  to_len,
const uint8_t *  from,
unsigned int  from_len 
)

Copy the the buffer 'from' to the buffer 'to'.

Returns
returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: from_len > to_len.
Parameters
toOUT – destination buffer
to_lenIN – length of destination buffer
fromIN – origin buffer
from_lenIN – length of origin buffer

◆ _set()

void _set ( void *  to,
uint8_t  val,
unsigned int  len 
)

Set the value 'val' into the buffer 'to', 'len' times.

Parameters
toOUT – destination buffer
valIN – value to be set in 'to'
lenIN – number of times the value will be copied