31 lines
683 B
C
31 lines
683 B
C
|
/*
|
||
|
* rng.h
|
||
|
*
|
||
|
* Created on: Aug 30, 2016
|
||
|
* Author: tkl
|
||
|
*/
|
||
|
|
||
|
#ifndef SOURCE_FIRMWARE_KERNEL_DRIVER_INCLUDE_RNG_H_
|
||
|
#define SOURCE_FIRMWARE_KERNEL_DRIVER_INCLUDE_RNG_H_
|
||
|
|
||
|
typedef int (*rng_fp_open_t)(const void*);
|
||
|
typedef int (*rng_fp_close_t)(const void*);
|
||
|
typedef unsigned int (*rng_fp_read_t)(const void*);
|
||
|
|
||
|
struct rng_fp {
|
||
|
const rng_fp_open_t open;
|
||
|
const rng_fp_close_t close;
|
||
|
const rng_fp_read_t read;
|
||
|
};
|
||
|
|
||
|
struct rng {
|
||
|
const void *arch_dep_device;
|
||
|
const struct rng_fp *fp;
|
||
|
};
|
||
|
|
||
|
int rng_open(const struct rng *device);
|
||
|
int rng_close(const struct rng *device);
|
||
|
unsigned int rng_read(const struct rng *device);
|
||
|
|
||
|
#endif /* SOURCE_FIRMWARE_KERNEL_DRIVER_INCLUDE_RNG_H_ */
|