ESOS32
ESOSOn32-bitProcessors
esos_utils.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2019 J. W. Bruce ("AUTHOR(S)")"
3  * All rights reserved.
4  * (J. W. Bruce, jwbruce_AT_tntech.edu, Tennessee Tech University)
5  *
6  * Permission to use, copy, modify, and distribute this software and its
7  * documentation for any purpose, without fee, and without written agreement is
8  * hereby granted, provided that the above copyright notice, the following
9  * two paragraphs and the authors appear in all copies of this software.
10  *
11  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
12  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
13  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
14  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15  *
16  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
19  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
20  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
21  *
22  * Please maintain this header in its entirety when copying/modifying
23  * these files.
24  *
25  *
26  */
27 
28 
41 #ifndef ESOS_UTILS_H
42 #define ESOS_UTILS_H
43 
44 /* I N C L U D E S **********************************************************/
45 #include "esos.h"
46 
47 /* S T R U C T U R E S ******************************************************/
48 
49 
50 /* D E F I N E S ************************************************************/
51 
52 /* M A C R O S ************************************************************/
53 
54 
55 /* E X T E R N S ************************************************************/
56 extern uint32_t __esos_u32FNVHash;
57 
58 /* P U B L I C P R O T O T Y P E S *****************************************/
59 // ESOS-provided pseudo-random number generator
60 uint32_t esos_GetRandomUint32();
61 // ESOS-provided hash functions
62 uint16_t esos_hash_u32_to_u16(uint32_t u32_hash);
63 uint32_t esos_string_hash_u32(char *psz_str);
64 uint32_t esos_buffer_hash_u32(void *buf, uint16_t len);
65 // ESOS-provided CRC functions go here
66 
67 /* P R I V A T E P R O T O T Y P E S ***********************************/
68 void __esos_set_PRNG_U32Seed(uint32_t u32_seed);
69 uint32_t __esos_get_PRNG_RandomUint32(void);
70 
73 #endif // ESOS_UTILS_H
__esos_set_PRNG_U32Seed
void __esos_set_PRNG_U32Seed(uint32_t u32_seed)
Definition: esos_utils.c:70
esos_GetRandomUint32
uint32_t esos_GetRandomUint32()
Definition: esos_utils.c:100
__esos_get_PRNG_RandomUint32
uint32_t __esos_get_PRNG_RandomUint32(void)
Definition: esos_utils.c:80
esos.h
esos_buffer_hash_u32
uint32_t esos_buffer_hash_u32(void *buf, uint16_t len)
Definition: esos_utils.c:140
esos_string_hash_u32
uint32_t esos_string_hash_u32(char *psz_str)
Definition: esos_utils.c:176