Classes | Macros | Typedefs | Enumerations | Functions
serial_manager.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _serial_manager_callback_message
 Callback message structure. More...
 
struct  _serial_manager_config
 serial manager config structure More...
 

Macros

#define SERIAL_MANAGER_HANDLE_DEFINE(name)   uint32_t name[((SERIAL_MANAGER_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
 Defines the serial manager handle. More...
 
#define SERIAL_MANAGER_HANDLE_SIZE   (SERIAL_MANAGER_HANDLE_SIZE_TEMP + 12U)
 SERIAL_PORT_UART_HANDLE_SIZE/SERIAL_PORT_USB_CDC_HANDLE_SIZE + serial manager dedicated size. More...
 
#define SERIAL_MANAGER_HANDLE_SIZE_TEMP   0U
 
#define SERIAL_MANAGER_NON_BLOCKING_MODE   (0U)
 Enable or disable serial manager non-blocking mode (1 - enable, 0 - disable) More...
 
#define SERIAL_MANAGER_READ_HANDLE_DEFINE(name)   uint32_t name[((SERIAL_MANAGER_READ_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
 Defines the serial manager read handle. More...
 
#define SERIAL_MANAGER_READ_HANDLE_SIZE   (4U)
 
#define SERIAL_MANAGER_TASK_PRIORITY   (2U)
 Macro to set serial manager task priority. More...
 
#define SERIAL_MANAGER_TASK_STACK_SIZE   (1000U)
 Macro to set serial manager task stack size. More...
 
#define SERIAL_MANAGER_USE_COMMON_TASK   (1U)
 Macro to determine whether use common task. More...
 
#define SERIAL_MANAGER_WRITE_HANDLE_DEFINE(name)   uint32_t name[((SERIAL_MANAGER_WRITE_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
 Defines the serial manager write handle. More...
 
#define SERIAL_MANAGER_WRITE_HANDLE_SIZE   (4U)
 Set serial manager write handle size. More...
 
#define SERIAL_PORT_TYPE_SWO   (0U)
 Enable or disable SWO port (1 - enable, 0 - disable) More...
 
#define SERIAL_PORT_TYPE_UART   (0U)
 Enable or disable uart port (1 - enable, 0 - disable) More...
 
#define SERIAL_PORT_TYPE_USBCDC   (0U)
 Enable or disable USB CDC port (1 - enable, 0 - disable) More...
 
#define SERIAL_PORT_TYPE_USBCDC_VIRTUAL   (0U)
 Enable or disable USB CDC virtual port (1 - enable, 0 - disable) More...
 

Typedefs

typedef void * serial_handle_t
 The handle of the serial manager module. More...
 
typedef struct _serial_manager_callback_message serial_manager_callback_message_t
 Callback message structure. More...
 
typedef void(* serial_manager_callback_t) (void *callbackParam, serial_manager_callback_message_t *message, serial_manager_status_t status)
 callback function More...
 
typedef struct _serial_manager_config serial_manager_config_t
 serial manager config structure More...
 
typedef enum _serial_manager_status serial_manager_status_t
 serial manager error code More...
 
typedef enum _serial_port_type serial_port_type_t
 serial port type More...
 
typedef void * serial_read_handle_t
 The read handle of the serial manager module. More...
 
typedef void * serial_write_handle_t
 The write handle of the serial manager module. More...
 

Enumerations

enum  _serial_manager_status {
  kStatus_SerialManager_Success = kStatus_Success, kStatus_SerialManager_Error = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 1), kStatus_SerialManager_Busy = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 2), kStatus_SerialManager_Notify = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 3),
  kStatus_SerialManager_Canceled, kStatus_SerialManager_HandleConflict = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 5), kStatus_SerialManager_RingBufferOverflow, kStatus_SerialManager_NotConnected = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 7)
}
 serial manager error code More...
 
enum  _serial_port_type { kSerialPort_Uart = 1U, kSerialPort_UsbCdc, kSerialPort_Swo, kSerialPort_UsbCdcVirtual }
 serial port type More...
 

Functions

serial_manager_status_t SerialManager_CloseReadHandle (serial_read_handle_t readHandle)
 Closes a reading for the serial manager module. More...
 
serial_manager_status_t SerialManager_CloseWriteHandle (serial_write_handle_t writeHandle)
 Closes a writing handle for the serial manager module. More...
 
serial_manager_status_t SerialManager_Deinit (serial_handle_t serialHandle)
 De-initializes the serial manager module instance. More...
 
serial_manager_status_t SerialManager_EnterLowpower (serial_handle_t serialHandle)
 Prepares to enter low power consumption. More...
 
serial_manager_status_t SerialManager_ExitLowpower (serial_handle_t serialHandle)
 Restores from low power consumption. More...
 
serial_manager_status_t SerialManager_Init (serial_handle_t serialHandle, serial_manager_config_t *config)
 Initializes a serial manager module with the serial manager handle and the user configuration structure. More...
 
serial_manager_status_t SerialManager_OpenReadHandle (serial_handle_t serialHandle, serial_read_handle_t readHandle)
 Opens a reading handle for the serial manager module. More...
 
serial_manager_status_t SerialManager_OpenWriteHandle (serial_handle_t serialHandle, serial_write_handle_t writeHandle)
 Opens a writing handle for the serial manager module. More...
 
serial_manager_status_t SerialManager_ReadBlocking (serial_read_handle_t readHandle, uint8_t *buffer, uint32_t length)
 Reads data with the blocking mode. More...
 
serial_manager_status_t SerialManager_WriteBlocking (serial_write_handle_t writeHandle, uint8_t *buffer, uint32_t length)
 Transmits data with the blocking mode. More...
 


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:00