1 /* 2 * Copyright (C) 2017-2024 Alibaba Group Holding Limited 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 /****************************************************************************** 20 * @file drv/tng.h 21 * @brief Header File for RNG Driver 22 * @version V1.0 23 * @date 22. Apr 2020 24 * @model tng 25 ******************************************************************************/ 26 #ifndef _DRV_TNG_H_ 27 #define _DRV_TNG_H_ 28 29 #include "drv/common.h" 30 #include <stdint.h> 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /** 37 \brief Get data from the TNG engine 38 \param[out] Data Pointer to buffer with data get from TNG 39 \param[in] Num Number of data items,uinit in uint32 40 \return Error code \ref csi_error_t 41 */ 42 csi_error_t csi_rng_get_multi_word(uint32_t *data, uint32_t num); 43 44 /** 45 \brief Get data from the TNG engine 46 \return Error code \ref csi_error_t 47 */ 48 csi_error_t csi_rng_get_single_word(uint32_t* data); 49 50 #ifdef __cplusplus 51 } 52 #endif 53 54 #endif /* _DRV_TNG_H_ */ 55