TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Modules | Files | Data Structures | Macros | Typedefs | Functions
TRNG Driver

True Random Number Generator driver. More...

Modules

 TRNG_SAMPLES
 
 TRNG_STATUS
 

Files

file  TRNGCC26XX.h
 TRNG driver implementation for a CC26XX device.
 

Data Structures

struct  TRNGCC26XX_Config
 TRNGCC26XX Global Configuration. More...
 
struct  TRNGCC26XX_HWAttrs
 TRNGCC26XX Hardware Attributes. More...
 
struct  TRNGCC26XX_Object
 TRNGCC26XX Object. More...
 
struct  TRNGCC26XX_Params
 TRNGCC26XX Parameters. More...
 

Macros

#define TRNGCC26XX_ILLEGAL_PARAM_RETURN_VALUE   0
 

Typedefs

typedef struct TRNGCC26XX_Config TRNGCC26XX_Config
 TRNGCC26XX Global Configuration.
 
typedef struct TRNGCC26XX_ConfigTRNGCC26XX_Handle
 A handle that is returned from a TRNGCC26XX_open() call.
 
typedef struct TRNGCC26XX_HWAttrs TRNGCC26XX_HWAttrs
 TRNGCC26XX Hardware Attributes. More...
 
typedef struct TRNGCC26XX_Object TRNGCC26XX_Object
 TRNGCC26XX Object. More...
 
typedef struct TRNGCC26XX_Params TRNGCC26XX_Params
 TRNGCC26XX Parameters. More...
 

Functions

void TRNGCC26XX_close (TRNGCC26XX_Handle handle)
 Close the TRNG driver. More...
 
uint32_t TRNGCC26XX_getNumber (TRNGCC26XX_Handle handle, TRNGCC26XX_Params *params, int8_t *status)
 This routine returns a 32 bit TRNG number. More...
 
void TRNGCC26XX_init (void)
 TRNG Driver initialization. More...
 
int8_t TRNGCC26XX_isParamValid (TRNGCC26XX_Params *params)
 Check that the parameters used are valid configurations. More...
 
TRNGCC26XX_Handle TRNGCC26XX_open (uint8_t index)
 Open the TRNGCC26XX peripheral specified by the index value. This peripheral will be configured as specified by pParams. Alternatively, if pParams is NULL, default values will be used. More...
 
int8_t TRNGCC26XX_Params_init (TRNGCC26XX_Params *params)
 Initialize TRNG configuration parameters to their defaults. More...
 

Detailed Description

True Random Number Generator driver.

To use the ECC driver in your application you need to:

Macro Definition Documentation

§ TRNGCC26XX_ILLEGAL_PARAM_RETURN_VALUE

#define TRNGCC26XX_ILLEGAL_PARAM_RETURN_VALUE   0

Number returned from TRNGCC26XX_getNumber when invalid parameters are used.

Typedef Documentation

§ TRNGCC26XX_HWAttrs

TRNGCC26XX Hardware Attributes.

Hardware Attribute structure for TRNG peripherals.

§ TRNGCC26XX_Object

TRNGCC26XX Object.

The application must not access any member variables of this structure!

§ TRNGCC26XX_Params

TRNGCC26XX Parameters.

This holds the TRNG configuration parameters to be used.

See also
TRNG_open()

Function Documentation

§ TRNGCC26XX_close()

void TRNGCC26XX_close ( TRNGCC26XX_Handle  handle)

Close the TRNG driver.

Precondition
Calling context: Hwi, Swi or Task.
Parameters
handlea TRNGCC26XX_Handle returned from TRNGCC26XX_open().
Returns
none

§ TRNGCC26XX_getNumber()

uint32_t TRNGCC26XX_getNumber ( TRNGCC26XX_Handle  handle,
TRNGCC26XX_Params params,
int8_t *  status 
)

This routine returns a 32 bit TRNG number.

Precondition
params must be initialized with valid configurations. Calling context: Hwi, Swi or Task.
Parameters
handlea TRNGCC26XX_Handle returned from TRNGCC26XX_open().
params- caller's configuration parameters. input parameter.
status- a user provided pointer to a status flag in case of failure. This parameter may be left NULL. output parameter. TRNGCC26XX_STATUS_SUCCESS if successful. TRNGCC26XX_STATUS_ILLEGAL_PARAM if params is null or configuration is illegal.
Returns
A 32 bit TRNG number.

§ TRNGCC26XX_init()

void TRNGCC26XX_init ( void  )

TRNG Driver initialization.

Precondition
Calling context: Hwi, Swi or Task.
Returns
void

§ TRNGCC26XX_isParamValid()

int8_t TRNGCC26XX_isParamValid ( TRNGCC26XX_Params params)

Check that the parameters used are valid configurations.

Precondition
params must be initialized with valid configurations. Calling context: Hwi, Swi or Task.
Parameters
params- caller's configuration parameters. input parameter.
Returns
TRNGCC26XX_STATUS_SUCCESS if params is a valid configuration. TRNGCC26XX_STATUS_ILLEGAL_PARAM if params is an invalid configuration.

§ TRNGCC26XX_open()

TRNGCC26XX_Handle TRNGCC26XX_open ( uint8_t  index)

Open the TRNGCC26XX peripheral specified by the index value. This peripheral will be configured as specified by pParams. Alternatively, if pParams is NULL, default values will be used.

Precondition
Calling context: Hwi, Swi or Task.
Parameters
indexLogical peripheral Number indexed in the HWAttrs table.
Returns
a TRNGCC26XX_Handle

§ TRNGCC26XX_Params_init()

int8_t TRNGCC26XX_Params_init ( TRNGCC26XX_Params params)

Initialize TRNG configuration parameters to their defaults.

Precondition
Calling context: Hwi, Swi or Task.
Parameters
params- TRNG configuration parameters. input parameter.
Returns
TRNGCC26XX_STATUS_SUCCESS if successful. TRNGCC26XX_STATUS_ILLEGAL_PARAM if params is NULL.
Copyright 2017, Texas Instruments Incorporated