the do / gr-peach-opencv-project

Fork of gr-peach-opencv-project by the do

Committer:
thedo
Date:
Tue Jul 04 06:23:13 2017 +0000
Revision:
170:54ff26da7eb6
Parent:
167:1657b442184c
project opencv 3.1 on GR PEACH board, no use SD card.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thedo 167:1657b442184c 1
thedo 167:1657b442184c 2 /** \addtogroup hal */
thedo 167:1657b442184c 3 /** @{*/
thedo 167:1657b442184c 4 /* mbed Microcontroller Library
thedo 167:1657b442184c 5 * Copyright (c) 2016 ARM Limited
thedo 167:1657b442184c 6 *
thedo 167:1657b442184c 7 * Licensed under the Apache License, Version 2.0 (the "License");
thedo 167:1657b442184c 8 * you may not use this file except in compliance with the License.
thedo 167:1657b442184c 9 * You may obtain a copy of the License at
thedo 167:1657b442184c 10 *
thedo 167:1657b442184c 11 * http://www.apache.org/licenses/LICENSE-2.0
thedo 167:1657b442184c 12 *
thedo 167:1657b442184c 13 * Unless required by applicable law or agreed to in writing, software
thedo 167:1657b442184c 14 * distributed under the License is distributed on an "AS IS" BASIS,
thedo 167:1657b442184c 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
thedo 167:1657b442184c 16 * See the License for the specific language governing permissions and
thedo 167:1657b442184c 17 * limitations under the License.
thedo 167:1657b442184c 18 */
thedo 167:1657b442184c 19 #ifndef MBED_TRNG_API_H
thedo 167:1657b442184c 20 #define MBED_TRNG_API_H
thedo 167:1657b442184c 21
thedo 167:1657b442184c 22 #include <stddef.h>
thedo 167:1657b442184c 23 #include "device.h"
thedo 167:1657b442184c 24
thedo 167:1657b442184c 25 #if DEVICE_TRNG
thedo 167:1657b442184c 26
thedo 167:1657b442184c 27 /** TRNG HAL structure. trng_s is declared in the target's HAL
thedo 167:1657b442184c 28 */
thedo 167:1657b442184c 29 typedef struct trng_s trng_t;
thedo 167:1657b442184c 30
thedo 167:1657b442184c 31 #ifdef __cplusplus
thedo 167:1657b442184c 32 extern "C" {
thedo 167:1657b442184c 33 #endif
thedo 167:1657b442184c 34
thedo 167:1657b442184c 35 /**
thedo 167:1657b442184c 36 * \defgroup hal_trng TRNG hal functions
thedo 167:1657b442184c 37 * @{
thedo 167:1657b442184c 38 */
thedo 167:1657b442184c 39
thedo 167:1657b442184c 40 /** Initialize the TRNG peripheral
thedo 167:1657b442184c 41 *
thedo 167:1657b442184c 42 * @param obj The TRNG object
thedo 167:1657b442184c 43 */
thedo 167:1657b442184c 44 void trng_init(trng_t *obj);
thedo 167:1657b442184c 45
thedo 167:1657b442184c 46 /** Deinitialize the TRNG peripheral
thedo 167:1657b442184c 47 *
thedo 167:1657b442184c 48 * @param obj The TRNG object
thedo 167:1657b442184c 49 */
thedo 167:1657b442184c 50 void trng_free(trng_t *obj);
thedo 167:1657b442184c 51
thedo 167:1657b442184c 52 /** Get random data from TRNG peripheral
thedo 167:1657b442184c 53 *
thedo 167:1657b442184c 54 * @param obj The TRNG object
thedo 167:1657b442184c 55 * @param output The pointer to an output array
thedo 167:1657b442184c 56 * @param length The size of output data, to avoid buffer overwrite
thedo 167:1657b442184c 57 * @param output_length The length of generated data
thedo 167:1657b442184c 58 * @return 0 success, -1 fail
thedo 167:1657b442184c 59 */
thedo 167:1657b442184c 60 int trng_get_bytes(trng_t *obj, uint8_t *output, size_t length, size_t *output_length);
thedo 167:1657b442184c 61
thedo 167:1657b442184c 62 /**@}*/
thedo 167:1657b442184c 63
thedo 167:1657b442184c 64 #ifdef __cplusplus
thedo 167:1657b442184c 65 }
thedo 167:1657b442184c 66 #endif
thedo 167:1657b442184c 67
thedo 167:1657b442184c 68 #endif
thedo 167:1657b442184c 69
thedo 167:1657b442184c 70 #endif
thedo 167:1657b442184c 71
thedo 167:1657b442184c 72 /** @}*/
thedo 167:1657b442184c 73