TI BLE-Stack for Bluetooth API Documentation  3.03.08.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 
174 #ifndef ti_drivers_TRNGCC26XX__include
175 #define ti_drivers_TRNGCC26XX__include
176 
177 #ifdef __cplusplus
178 extern "C"
179 {
180 #endif
181 
182 #include <stdint.h>
183 
194 /* Add ECCROMCC26XX_STATUS_* macros here */
195 #define TRNGCC26XX_STATUS_SUCCESS 0
196 #define TRNGCC26XX_STATUS_ILLEGAL_PARAM -1
197 
198 
205 #define TRNGCC26XX_MIN_SAMPLES_MIN 64
206 #define TRNGCC26XX_MIN_SAMPLES_MAX 16384
213 #define TRNGCC26XX_MAX_SAMPLES_MIN 256
214 #define TRNGCC26XX_MAX_SAMPLES_MAX 16777216
220 #define TRNGCC26XX_CLOCKS_PER_SAMPLES_MAX 15
221 
228 #define TRNGCC26XX_ILLEGAL_PARAM_RETURN_VALUE 0
229 
236 typedef struct TRNGCC26XX_Params
237 {
240  uint32_t clocksPerSample;
242 
248 typedef struct TRNGCC26XX_HWAttrs {
252 
258 typedef struct TRNGCC26XX_Object {
260  uint8_t state;
262 
264 typedef struct TRNGCC26XX_Config {
266  void *object;
267 
269  void const *hwAttrs;
271 
276 
284 void TRNGCC26XX_init(void);
285 
297 TRNGCC26XX_Handle TRNGCC26XX_open(uint8_t index);
298 
308 void TRNGCC26XX_close(TRNGCC26XX_Handle handle);
309 
321 
341 uint32_t TRNGCC26XX_getNumber(TRNGCC26XX_Handle handle,
342  TRNGCC26XX_Params *params, int8_t *status);
343 
358 
361 #ifdef __cplusplus
362 }
363 #endif
364 
365 #endif /* ti_drivers_TRNGCC26XX__include */
int powerMngrId
Definition: TRNGCC26XX.h:250
uint32_t clocksPerSample
Definition: TRNGCC26XX.h:240
TRNGCC26XX Hardware Attributes.
Definition: TRNGCC26XX.h:248
void * object
Definition: TRNGCC26XX.h:266
uint32_t maxSamplesPerCycle
Definition: TRNGCC26XX.h:239
struct TRNGCC26XX_Object TRNGCC26XX_Object
TRNGCC26XX Object.
void TRNGCC26XX_init(void)
TRNG Driver initialization.
TRNGCC26XX_Handle TRNGCC26XX_open(uint8_t index)
Open the TRNGCC26XX peripheral specified by the index value. This peripheral will be configured as sp...
TRNGCC26XX Object.
Definition: TRNGCC26XX.h:258
uint8_t state
Definition: TRNGCC26XX.h:260
int8_t TRNGCC26XX_Params_init(TRNGCC26XX_Params *params)
Initialize TRNG configuration parameters to their defaults.
void TRNGCC26XX_close(TRNGCC26XX_Handle handle)
Close the TRNG driver.
void const * hwAttrs
Definition: TRNGCC26XX.h:269
struct TRNGCC26XX_Params TRNGCC26XX_Params
TRNGCC26XX Parameters.
TRNGCC26XX Parameters.
Definition: TRNGCC26XX.h:236
uint32_t minSamplesPerCycle
Definition: TRNGCC26XX.h:238
struct TRNGCC26XX_Config * TRNGCC26XX_Handle
A handle that is returned from a TRNGCC26XX_open() call.
Definition: TRNGCC26XX.h:275
TRNGCC26XX Global Configuration.
Definition: TRNGCC26XX.h:264
int8_t TRNGCC26XX_isParamValid(TRNGCC26XX_Params *params)
Check that the parameters used are valid configurations.
uint32_t TRNGCC26XX_getNumber(TRNGCC26XX_Handle handle, TRNGCC26XX_Params *params, int8_t *status)
This routine returns a 32 bit TRNG number.
struct TRNGCC26XX_Config TRNGCC26XX_Config
TRNGCC26XX Global Configuration.
struct TRNGCC26XX_HWAttrs TRNGCC26XX_HWAttrs
TRNGCC26XX Hardware Attributes.
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale