RNG - fix warnings due to obj not used for some targets

pull/2765/head
Martin Kojtal 2016-09-21 13:00:43 +01:00
parent e8ca16dde7
commit a225bafdbb
3 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,7 @@
void rng_init(rng_t *obj)
{
(void)obj;
CLOCK_EnableClock(kCLOCK_Rnga0);
CLOCK_DisableClock(kCLOCK_Rnga0);
CLOCK_EnableClock(kCLOCK_Rnga0);
@ -37,6 +38,7 @@ void rng_init(rng_t *obj)
void rng_free(rng_t *obj)
{
(void)obj;
CLOCK_DisableClock(kCLOCK_Rnga0);
}
@ -58,6 +60,7 @@ static void rng_get_byte(unsigned char *byte)
int rng_get_bytes(rng_t *obj, uint8_t *output, size_t length, size_t *output_length)
{
(void)obj;
size_t i;
int ret;

View File

@ -30,6 +30,7 @@
void rng_init(rng_t *obj)
{
(void)obj;
CLOCK_EnableClock(kCLOCK_Rnga0);
CLOCK_DisableClock(kCLOCK_Rnga0);
CLOCK_EnableClock(kCLOCK_Rnga0);
@ -37,6 +38,7 @@ void rng_init(rng_t *obj)
void rng_free(rng_t *obj)
{
(void)obj;
CLOCK_DisableClock(kCLOCK_Rnga0);
}
@ -58,6 +60,7 @@ static void rng_get_byte(unsigned char *byte)
int rng_get_bytes(rng_t *obj, uint8_t *output, size_t length, size_t *output_length)
{
(void)obj;
size_t i;
int ret;

View File

@ -58,6 +58,7 @@ static void rng_get(unsigned char *pConversionData)
void rng_init(rng_t *obj)
{
(void)obj;
/* Unlock protected registers */
SYS_UnlockReg();
/* Enable IP clock */
@ -72,6 +73,7 @@ void rng_init(rng_t *obj)
void rng_free(rng_t *obj)
{
(void)obj;
PRNG_DISABLE_INT();
NVIC_DisableIRQ(CRPT_IRQn);
//CLK_DisableModuleClock(CRPT_MODULE);
@ -79,6 +81,8 @@ void rng_free(rng_t *obj)
int rng_get_bytes(rng_t *obj, uint8_t *output, size_t length, size_t *output_length)
{
(void)obj;
*output_length = 0;
if (length < 32) {
unsigned char tmpBuff[32];