Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
serial_test.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 The ChromiumOS Authors.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_UART_SERIAL_TEST_H_
8#define ZEPHYR_INCLUDE_DRIVERS_UART_SERIAL_TEST_H_
9
10#include <errno.h>
11
12#include <zephyr/device.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif /* __cplusplus */
17
32int serial_vnd_queue_in_data(const struct device *dev, const unsigned char *data, uint32_t size);
33
42
61uint32_t serial_vnd_read_out_data(const struct device *dev, unsigned char *data, uint32_t size);
62
81uint32_t serial_vnd_peek_out_data(const struct device *dev, unsigned char *data, uint32_t size);
82
89typedef void (*serial_vnd_write_cb_t)(const struct device *dev, void *user_data);
90
99void serial_vnd_set_callback(const struct device *dev, serial_vnd_write_cb_t callback,
100 void *user_data);
101
102#ifdef __cplusplus
103}
104#endif /* __cplusplus */
105
106#endif /* ZEPHYR_INCLUDE_DRIVERS_UART_SERIAL_TEST_H_ */
System error numbers.
void(* serial_vnd_write_cb_t)(const struct device *dev, void *user_data)
Callback called after bytes written to the virtual serial port.
Definition serial_test.h:89
uint32_t serial_vnd_peek_out_data(const struct device *dev, unsigned char *data, uint32_t size)
Peek at data written to virtual serial port.
int serial_vnd_queue_in_data(const struct device *dev, const unsigned char *data, uint32_t size)
Queues data to be read by the virtual serial port.
uint32_t serial_vnd_out_data_size_get(const struct device *dev)
Returns size of unread written data.
void serial_vnd_set_callback(const struct device *dev, serial_vnd_write_cb_t callback, void *user_data)
Sets the write callback on a virtual serial port.
uint32_t serial_vnd_read_out_data(const struct device *dev, unsigned char *data, uint32_t size)
Read data written to virtual serial port.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:412