General auxiliary functions header file.
More...
#include <stdint.h>
Go to the source code of this file.
General auxiliary functions header file.
- See also
- https://stnolting.github.io/neorv32/sw/files.html
◆ neorv32_aux_max
#define neorv32_aux_max |
( |
| a, |
|
|
| b ) |
Value:({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; })
◆ neorv32_aux_min
#define neorv32_aux_min |
( |
| a, |
|
|
| b ) |
Value:({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
◆ neorv32_aux_date2unixtime()
uint64_t neorv32_aux_date2unixtime |
( |
date_t * | date | ) |
|
◆ neorv32_aux_hexstr2uint64()
uint64_t neorv32_aux_hexstr2uint64 |
( |
char * | buffer, |
|
|
unsigned int | length ) |
Helper function to convert up to 16 hex chars string into uint64_t
- Parameters
-
[in,out] | buffer | Pointer to array of chars to convert into number. |
[in] | length | Length of the conversion string. |
- Returns
- Converted number (uint64_t).
◆ neorv32_aux_itoa()
void neorv32_aux_itoa |
( |
char * | buffer, |
|
|
uint32_t | num, |
|
|
uint32_t | base ) |
Simplified version of "itoa": convert number to string.
- Parameters
-
[in,out] | buffer | Pointer to array for the result string [33 chars]. |
[in] | num | Number to convert. |
[in] | base | Base of number representation (2..16). |
◆ neorv32_aux_unixtime2date()
void neorv32_aux_unixtime2date |
( |
uint64_t | unixtime, |
|
|
date_t * | date ) |
Convert Unix time stamp to date.
- Copyright
- Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved. SPDX-License-Identifier: GPL-2.0-or-later https://github.com/Oryx-Embedded/Common/blob/master/date_time.c
- Parameters
-
[in] | unixtime | Unix time since 00:00:00 UTC, January 1, 1970 in seconds. |
[in,out] | date | Pointer to date and time struct (date_t). |
◆ neorv32_aux_xorshift32()
uint32_t neorv32_aux_xorshift32 |
( |
void | | ) |
|
XORSHIFT pseudo random number generator.
- Returns
- Random number (uint32_t).