serial_port_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef __SERIAL_PORT_INTERNAL_H__
10 #define __SERIAL_PORT_INTERNAL_H__
11 
12 /*******************************************************************************
13  * Definitions
14  ******************************************************************************/
15 
16 /*******************************************************************************
17  * API
18  ******************************************************************************/
19 
20 #if defined(__cplusplus)
21 extern "C" {
22 #endif /* _cplusplus */
23 
24 #if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
25 serial_manager_status_t Serial_UartInit(serial_handle_t serialHandle, void *serialConfig);
26 serial_manager_status_t Serial_UartDeinit(serial_handle_t serialHandle);
27 serial_manager_status_t Serial_UartWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
28 #if !(defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
29 serial_manager_status_t Serial_UartRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
30 #endif
31 
32 #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
33 serial_manager_status_t Serial_UartCancelWrite(serial_handle_t serialHandle);
34 serial_manager_status_t Serial_UartInstallTxCallback(serial_handle_t serialHandle,
36  void *callbackParam);
37 serial_manager_status_t Serial_UartInstallRxCallback(serial_handle_t serialHandle,
39  void *callbackParam);
40 void Serial_UartIsrFunction(serial_handle_t serialHandle);
41 #endif
42 serial_manager_status_t Serial_UartEnterLowpower(serial_handle_t serialHandle);
43 serial_manager_status_t Serial_UartExitLowpower(serial_handle_t serialHandle);
44 #endif
45 
46 #if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
47 serial_manager_status_t Serial_UsbCdcInit(serial_handle_t serialHandle, void *config);
48 serial_manager_status_t Serial_UsbCdcDeinit(serial_handle_t serialHandle);
49 serial_manager_status_t Serial_UsbCdcWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
50 serial_manager_status_t Serial_UsbCdcRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
51 serial_manager_status_t Serial_UsbCdcCancelWrite(serial_handle_t serialHandle);
52 serial_manager_status_t Serial_UsbCdcInstallTxCallback(serial_handle_t serialHandle,
54  void *callbackParam);
55 serial_manager_status_t Serial_UsbCdcInstallRxCallback(serial_handle_t serialHandle,
57  void *callbackParam);
58 void Serial_UsbCdcIsrFunction(serial_handle_t serialHandle);
59 #endif
60 
61 #if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
62 serial_manager_status_t Serial_SwoInit(serial_handle_t serialHandle, void *config);
63 serial_manager_status_t Serial_SwoDeinit(serial_handle_t serialHandle);
64 serial_manager_status_t Serial_SwoWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
65 #if !(defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
66 serial_manager_status_t Serial_SwoRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
67 #endif
68 #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
69 serial_manager_status_t Serial_SwoCancelWrite(serial_handle_t serialHandle);
70 serial_manager_status_t Serial_SwoInstallTxCallback(serial_handle_t serialHandle,
72  void *callbackParam);
73 serial_manager_status_t Serial_SwoInstallRxCallback(serial_handle_t serialHandle,
75  void *callbackParam);
76 void Serial_SwoIsrFunction(serial_handle_t serialHandle);
77 #endif
78 #endif
79 
80 #if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
81 serial_manager_status_t Serial_UsbCdcVirtualInit(serial_handle_t serialHandle, void *config);
82 serial_manager_status_t Serial_UsbCdcVirtualDeinit(serial_handle_t serialHandle);
83 serial_manager_status_t Serial_UsbCdcVirtualWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
84 serial_manager_status_t Serial_UsbCdcVirtualRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
85 serial_manager_status_t Serial_UsbCdcVirtualCancelWrite(serial_handle_t serialHandle);
86 serial_manager_status_t Serial_UsbCdcVirtualInstallTxCallback(serial_handle_t serialHandle,
88  void *callbackParam);
89 serial_manager_status_t Serial_UsbCdcVirtualInstallRxCallback(serial_handle_t serialHandle,
91  void *callbackParam);
92 void Serial_UsbCdcVirtualIsrFunction(serial_handle_t serialHandle);
93 #endif
94 
95 #if defined(__cplusplus)
96 }
97 #endif
98 
99 #endif /* __SERIAL_PORT_INTERNAL_H__ */
serial_manager_status_t
enum _serial_manager_status serial_manager_status_t
serial manager error code
serial_handle_t
void * serial_handle_t
The handle of the serial manager module.
Definition: serial_manager.h:206
serial_manager_callback_t
void(* serial_manager_callback_t)(void *callbackParam, serial_manager_callback_message_t *message, serial_manager_status_t status)
callback function
Definition: serial_manager.h:259
config
static sai_transceiver_t config
Definition: imxrt1050/imxrt1050-evkb/source/pv_audio_rec.c:75


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50