Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
uart_intel_lw.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
11#ifndef ZEPHYR_DRIVERS_SERIAL_UART_INTEL_LW_H_
12#define ZEPHYR_DRIVERS_SERIAL_UART_INTEL_LW_H_
13
14/* End of packet feature.
15 * Driver will trigger interrupt upon receiving end of package character.
16 * Please enable CONFIG_UART_INTEL_LW_EOP to use this feature.
17 * Use the api: uart_drv_cmd with CMD_ENABLE_EOP to enable the feature.
18 * This cmd will write the ip register and also set a flag to the driver.
19 * The flag will modify uart_irq_callback_user_data_set
20 * to set call back function for eop interrupt.
21 * Flag is cleared after uart_irq_callback_user_data_set is called.
22 */
23#define CMD_ENABLE_EOP 0x01
24#define CMD_DISABLE_EOP 0x02
25
26/* Transmit break feature.
27 * Use uart_drv_cmd with CMD_TRBK_EN to break ongoing transmit.
28 * After this cmd, uart is unable to transmit any data.
29 * Please use CMD_TRBK_DIS to resume normal operation.
30 * Please also call uart_intel_lw_err_check, to clear the error caused
31 * by transmit break.
32 */
33#define CMD_TRBK_EN 0x03
34#define CMD_TRBK_DIS 0x04
35
36/* This driver supports interrupt driven api.
37 * Polling for data under normal operation, might cause unexpected behaviour.
38 * If users wish to poll for data, please use the api:
39 * uart_drv_cmd with CMD_POLL_ASSERT_RTS before polling out/in.
40 * Then use CMD_POLL_DEASSERT_RTS to resume normal operation after polling.
41 */
42#define CMD_POLL_ASSERT_RTS 0x05
43#define CMD_POLL_DEASSERT_RTS 0x06
44
45#endif /* ZEPHYR_DRIVERS_SERIAL_UART_INTEL_LW_H_ */