Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
randLIB_stub.c
00001 /* 00002 * Copyright (c) 2017, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #include <stdint.h> 00019 #include <stdlib.h> 00020 #include <stdbool.h> 00021 #include <limits.h> 00022 #include "randLIB.h" 00023 #include "platform/arm_hal_random.h" 00024 00025 #if ((RAND_MAX+1) & RAND_MAX) != 0 00026 #error "RAND_MAX isn't 2^n-1 :(" 00027 #endif 00028 00029 int counter = 1; 00030 00031 void randLIB_seed_random(void) 00032 { 00033 } 00034 00035 uint8_t randLIB_get_8bit(void) 00036 { 00037 return 0; 00038 } 00039 00040 uint16_t randLIB_get_16bit(void) 00041 { 00042 return 0; 00043 } 00044 00045 uint32_t randLIB_get_32bit(void) 00046 { 00047 return 0; 00048 } 00049 00050 void *randLIB_get_n_bytes_random(void *data_ptr, uint8_t count) 00051 { 00052 if (data_ptr && count > 0) { 00053 *((int *)data_ptr) = counter++ % 255; 00054 } 00055 return data_ptr; 00056 } 00057 00058 uint16_t randLIB_get_random_in_range(uint16_t min, uint16_t max) 00059 { 00060 return 0; 00061 } 00062 00063 uint32_t randLIB_randomise_base(uint32_t base, uint16_t min_factor, uint16_t max_factor) 00064 { 00065 return 0; 00066 }
Generated on Tue Aug 9 2022 00:37:18 by
1.7.2