Software APIs
sw
device
silicon_creator
lib
xmodem_testlib.h
1
// Copyright lowRISC contributors (OpenTitan project).
2
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3
// SPDX-License-Identifier: Apache-2.0
4
5
#ifndef OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_XMODEM_TESTLIB_H_
6
#define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_XMODEM_TESTLIB_H_
7
#include "sw/device/silicon_creator/lib/xmodem.h"
8
9
/**
10
* Read data from the input within the specified timeout.
11
*
12
* @param iohandle An opaque user pointer associated with the io device.
13
* @param data Buffer to read the data into.
14
* @param len The length of the buffer.
15
* @param timeout_ms The timeout.
16
* @return The number of bytes actually read.
17
*/
18
size_t
xmodem_read(
void
*iohandle, uint8_t *data,
size_t
len,
19
uint32_t timeout_ms);
20
21
/**
22
* Write data to the output.
23
*
24
* @param iohandle An opaque user pointer associated with the io device.
25
* @param data Buffer to write to the output.
26
* @param len The length of the buffer.
27
*/
28
void
xmodem_write(
void
*iohandle,
const
uint8_t *data,
size_t
len);
29
30
#endif
// OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_XMODEM_TESTLIB_H_
Return to
OpenTitan Documentation