MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
trng.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  * $Date: 2018-10-15 16:49:29 -0500 (Mon, 15 Oct 2018) $
38  * $Revision: 38520 $
39  *
40  *************************************************************************** */
41 
42 /* Define to prevent redundant inclusion */
43 #ifndef _TRNG_H_
44 #define _TRNG_H_
45 
46 /* **** Includes **** */
47 #include <stdint.h>
48 #include "mxc_config.h"
49 #include "mxc_sys.h"
50 #include "trng_regs.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
67  int TRNG_Init(const sys_cfg_t* sys_cfg);
68 
74  int TRNG_Shutdown(void);
75 
82 
89 
96 
103 void TRNG_Read(mxc_trng_regs_t *trng, uint8_t *data, int len);
104 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* _TRNG_H_ */
117 
TRNG_Read16BIT
uint16_t TRNG_Read16BIT(mxc_trng_regs_t *trng)
Reads 16-bit value stored in the data register.
TRNG_Read
void TRNG_Read(mxc_trng_regs_t *trng, uint8_t *data, int len)
Generates Random Number of variable length.
mxc_trng_regs_t
Definition: trng_regs.h:88
TRNG_Read32BIT
uint32_t TRNG_Read32BIT(mxc_trng_regs_t *trng)
Reads 32-bit value stored in the data register.
TRNG_Shutdown
int TRNG_Shutdown(void)
TRNG Shutdown.
TRNG_Init
int TRNG_Init(const sys_cfg_t *sys_cfg)
TRNG initialize.
TRNG_Read8BIT
uint8_t TRNG_Read8BIT(mxc_trng_regs_t *trng)
Reads 8-bit value stored in the data register.
TRNG_Generate_AES
void TRNG_Generate_AES(mxc_trng_regs_t *trng)
Generates 256-bits random number automatically.