Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
random_stub.c
00001 /* 00002 * Copyright (c) 2016, ARM Limited, All Rights Reserved 00003 */ 00004 #include "random_stub.h" 00005 00006 static uint32_t seed_value = 4; 00007 static bool seed_inc = false; 00008 00009 void arm_random_module_init(void) 00010 { 00011 00012 } 00013 00014 uint32_t arm_random_seed_get(void) 00015 { 00016 uint32_t result = seed_value; 00017 if (seed_inc) { 00018 ++seed_value; 00019 } 00020 return result; 00021 } 00022 00023 void random_stub_set_seed(uint32_t value, bool increment) 00024 { 00025 seed_value = value; 00026 seed_inc = increment; 00027 }
Generated on Sun Jul 17 2022 08:25:29 by 1.7.2