TI BLE5-Stack API Documentation  1.01.01.00
TRNGCC26XX.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file TRNGCC26XX.h
4 
5  @brief This file contains header information for a True Random
6  Number Generator driver.
7 
8  Group: WCS, LPC, BTS
9  $Target Device: DEVICES $
10 
11  ******************************************************************************
12  $License: BSD3 2016 $
13  ******************************************************************************
14  $Release Name: PACKAGE NAME $
15  $Release Date: PACKAGE RELEASE DATE $
16  *****************************************************************************/
17 
175 #ifndef ti_drivers_TRNGCC26XX__include
176 #define ti_drivers_TRNGCC26XX__include
177 
178 #ifdef __cplusplus
179 extern "C"
180 {
181 #endif
182 
183 #include <stdint.h>
184 
195 /* Add ECCROMCC26XX_STATUS_* macros here */
196 #define TRNGCC26XX_STATUS_SUCCESS 0
197 #define TRNGCC26XX_STATUS_ILLEGAL_PARAM -1
198 
199 
206 #define TRNGCC26XX_MIN_SAMPLES_MIN 64
207 
212 #define TRNGCC26XX_MIN_SAMPLES_MAX 16384
213 
220 #define TRNGCC26XX_MAX_SAMPLES_MIN 256
221 
227 #define TRNGCC26XX_MAX_SAMPLES_MAX 16777216
228 
233 #define TRNGCC26XX_CLOCKS_PER_SAMPLES_MAX 15
234 
239 #define TRNGCC26XX_ILLEGAL_PARAM_RETURN_VALUE 0
240 
248 typedef struct TRNGCC26XX_Params
249 {
252  uint32_t clocksPerSample;
254 
260 typedef struct TRNGCC26XX_HWAttrs {
264 
270 typedef struct TRNGCC26XX_Object {
271  uint8_t state;
273 
275 typedef struct TRNGCC26XX_Config {
277  void *object;
278 
280  void const *hwAttrs;
282 
287 
293 void TRNGCC26XX_init(void);
294 
306 TRNGCC26XX_Handle TRNGCC26XX_open(uint8_t index);
307 
315 void TRNGCC26XX_close(TRNGCC26XX_Handle handle);
316 
328 
348 uint32_t TRNGCC26XX_getNumber(TRNGCC26XX_Handle handle,
349  TRNGCC26XX_Params *params, int8_t *status);
350 
364 
367 #ifdef __cplusplus
368 }
369 #endif
370 
371 #endif /* ti_drivers_TRNGCC26XX__include */
int powerMngrId
Definition: TRNGCC26XX.h:262
int8_t TRNGCC26XX_isParamValid(TRNGCC26XX_Params *params)
Check that the parameters used are valid configurations.
uint32_t clocksPerSample
clocks per sample
Definition: TRNGCC26XX.h:252
void TRNGCC26XX_close(TRNGCC26XX_Handle handle)
Close the TRNG driver.
TRNGCC26XX Hardware Attributes.
Definition: TRNGCC26XX.h:260
void * object
Definition: TRNGCC26XX.h:277
struct TRNGCC26XX_Params TRNGCC26XX_Params
TRNGCC26XX Parameters.
void TRNGCC26XX_init(void)
TRNG Driver initialization.
uint32_t maxSamplesPerCycle
max samples per cycle
Definition: TRNGCC26XX.h:251
struct TRNGCC26XX_Config * TRNGCC26XX_Handle
A handle that is returned from a TRNGCC26XX_open() call.
Definition: TRNGCC26XX.h:286
TRNGCC26XX Object.
Definition: TRNGCC26XX.h:270
uint8_t state
state
Definition: TRNGCC26XX.h:271
uint32_t TRNGCC26XX_getNumber(TRNGCC26XX_Handle handle, TRNGCC26XX_Params *params, int8_t *status)
This routine returns a 32 bit TRNG number.
void const * hwAttrs
Definition: TRNGCC26XX.h:280
TRNGCC26XX Parameters.
Definition: TRNGCC26XX.h:248
struct TRNGCC26XX_Config TRNGCC26XX_Config
TRNGCC26XX Global Configuration.
struct TRNGCC26XX_HWAttrs TRNGCC26XX_HWAttrs
TRNGCC26XX Hardware Attributes.
uint32_t minSamplesPerCycle
min samples per cycle
Definition: TRNGCC26XX.h:250
TRNGCC26XX Global Configuration.
Definition: TRNGCC26XX.h:275
TRNGCC26XX_Handle TRNGCC26XX_open(uint8_t index)
Open the TRNGCC26XX peripheral specified by the index value. This peripheral will be configured as sp...
struct TRNGCC26XX_Object TRNGCC26XX_Object
TRNGCC26XX Object.
int8_t TRNGCC26XX_Params_init(TRNGCC26XX_Params *params)
Initialize TRNG configuration parameters to their defaults.
Copyright 2018, Texas Instruments Incorporated