TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
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 
180 #ifndef ti_drivers_TRNGCC26XX__include
181 #define ti_drivers_TRNGCC26XX__include
182 
183 #ifdef __cplusplus
184 extern "C"
185 {
186 #endif
187 
188 #include <stdint.h>
189 
195 /* Add ECCROMCC26XX_STATUS_* macros here */
196 #define TRNGCC26XX_STATUS_SUCCESS 0
197 #define TRNGCC26XX_STATUS_ILLEGAL_PARAM -1
207 #define TRNGCC26XX_MIN_SAMPLES_MIN 64
208 #define TRNGCC26XX_MIN_SAMPLES_MAX 16384
215 #define TRNGCC26XX_MAX_SAMPLES_MIN 256
216 #define TRNGCC26XX_MAX_SAMPLES_MAX 16777216
222 #define TRNGCC26XX_CLOCKS_PER_SAMPLES_MAX 15
223 
230 #define TRNGCC26XX_ILLEGAL_PARAM_RETURN_VALUE 0
231 
238 typedef struct TRNGCC26XX_Params
239 {
242  uint32_t clocksPerSample;
244 
250 typedef struct TRNGCC26XX_HWAttrs {
254 
260 typedef struct TRNGCC26XX_Object {
262  uint8_t state;
264 
266 typedef struct TRNGCC26XX_Config {
268  void *object;
269 
271  void const *hwAttrs;
273 
278 
286 void TRNGCC26XX_init(void);
287 
299 TRNGCC26XX_Handle TRNGCC26XX_open(uint8_t index);
300 
310 void TRNGCC26XX_close(TRNGCC26XX_Handle handle);
311 
323 
343 uint32_t TRNGCC26XX_getNumber(TRNGCC26XX_Handle handle,
344  TRNGCC26XX_Params *params, int8_t *status);
345 
360 
361 #ifdef __cplusplus
362 }
363 #endif
364 
365 #endif /* ti_drivers_TRNGCC26XX__include */
366 
int powerMngrId
Definition: TRNGCC26XX.h:252
uint32_t clocksPerSample
Definition: TRNGCC26XX.h:242
TRNGCC26XX Hardware Attributes.
Definition: TRNGCC26XX.h:250
struct TRNGCC26XX_Params TRNGCC26XX_Params
TRNGCC26XX Parameters.
void * object
Definition: TRNGCC26XX.h:268
int8_t TRNGCC26XX_Params_init(TRNGCC26XX_Params *params)
Initialize TRNG configuration parameters to their defaults.
void TRNGCC26XX_init(void)
TRNG Driver initialization.
int8_t TRNGCC26XX_isParamValid(TRNGCC26XX_Params *params)
Check that the parameters used are valid configurations.
uint32_t maxSamplesPerCycle
Definition: TRNGCC26XX.h:241
TRNGCC26XX Object.
Definition: TRNGCC26XX.h:260
uint8_t state
Definition: TRNGCC26XX.h:262
void const * hwAttrs
Definition: TRNGCC26XX.h:271
struct TRNGCC26XX_HWAttrs TRNGCC26XX_HWAttrs
TRNGCC26XX Hardware Attributes.
TRNGCC26XX_Handle TRNGCC26XX_open(uint8_t index)
Open the TRNGCC26XX peripheral specified by the index value. This peripheral will be configured as sp...
TRNGCC26XX Parameters.
Definition: TRNGCC26XX.h:238
uint32_t minSamplesPerCycle
Definition: TRNGCC26XX.h:240
uint32_t TRNGCC26XX_getNumber(TRNGCC26XX_Handle handle, TRNGCC26XX_Params *params, int8_t *status)
This routine returns a 32 bit TRNG number.
TRNGCC26XX Global Configuration.
Definition: TRNGCC26XX.h:266
struct TRNGCC26XX_Object TRNGCC26XX_Object
TRNGCC26XX Object.
void TRNGCC26XX_close(TRNGCC26XX_Handle handle)
Close the TRNG driver.
struct TRNGCC26XX_Config * TRNGCC26XX_Handle
A handle that is returned from a TRNGCC26XX_open() call.
Definition: TRNGCC26XX.h:277
struct TRNGCC26XX_Config TRNGCC26XX_Config
TRNGCC26XX Global Configuration.
Copyright 2017, Texas Instruments Incorporated