Embedded Wireless Framework
Modules | Data Structures | Macros | Typedefs | Functions
WIN32 COM port host interface

WIN32 COM port host interface. More...

Modules

 WIN32 COM configuration
 

Data Structures

struct  _ewf_interface_win32_com
 the WIN32 COM host interface implementation data structure type More...
 

Macros

#define EWF_INTERFACE_WIN32_COM_INITIALIZE_HEADER(interface_ptr)
 
#define EWF_INTERFACE_WIN32_COM_STATIC_DECLARE(interface_ptr, interface_name_symb, com_port_cstr_param, BaudRate_param, ByteSize_param, Parity_param, StopBits_param)
 Declare a WIN32 COM host interface. More...
 

Typedefs

typedef struct _ewf_interface_win32_com ewf_interface_win32_com
 the WIN32 COM host interface implementation data structure type More...
 

Functions

ewf_result ewf_interface_win32_com_hardware_start (ewf_interface *interface_ptr)
 Start the WIN32 COM hardware interface.
 
ewf_result ewf_interface_win32_com_hardware_stop (ewf_interface *interface_ptr)
 Stop the WIN32 COM hardware interface.
 
ewf_result ewf_interface_win32_com_hardware_send (ewf_interface *interface_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
 Send a buffer using the WIN32 COM hardware interface.
 
ewf_result ewf_interface_win32_com_hardware_receive (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
 Receive a buffer using the WIN32 COM hardware interface.
 

Detailed Description

WIN32 COM port host interface.

Macro Definition Documentation

◆ EWF_INTERFACE_WIN32_COM_STATIC_DECLARE

#define EWF_INTERFACE_WIN32_COM_STATIC_DECLARE (   interface_ptr,
  interface_name_symb,
  com_port_cstr_param,
  BaudRate_param,
  ByteSize_param,
  Parity_param,
  StopBits_param 
)
Value:
do { \
static ewf_interface_win32_com ewf_interface_win32_com__implementation__##interface_name_symb = {0}; \
static ewf_interface ewf_interface_win32_com__interface__##interface_name_symb = {0}; \
ewf_interface_win32_com__implementation__##interface_name_symb.hComm = NULL; \
ewf_interface_win32_com__implementation__##interface_name_symb.com_port_cstr = com_port_cstr_param; \
ewf_interface_win32_com__implementation__##interface_name_symb.BaudRate = BaudRate_param; \
ewf_interface_win32_com__implementation__##interface_name_symb.ByteSize = ByteSize_param; \
ewf_interface_win32_com__implementation__##interface_name_symb.Parity = Parity_param; \
ewf_interface_win32_com__implementation__##interface_name_symb.StopBits = StopBits_param; \
EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
ewf_interface_win32_com__interface__##interface_name_symb.response_queue_ptr, \
ewf_interface_win32_com__response_queue__##interface_name_symb, \
EWF_INTERFACE_WIN32_COM_CONFIG_RESPONSE_QUEUE_SIZE); \
EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
ewf_interface_win32_com__interface__##interface_name_symb.urc_queue_ptr, \
ewf_interface_win32_com__urc_queue__##interface_name_symb, \
EWF_INTERFACE_WIN32_COM_CONFIG_URC_QUEUE_SIZE); \
ewf_interface_win32_com__interface__##interface_name_symb.hardware_start = ewf_interface_win32_com_hardware_start; \
ewf_interface_win32_com__interface__##interface_name_symb.hardware_stop = ewf_interface_win32_com_hardware_stop; \
ewf_interface_win32_com__interface__##interface_name_symb.hardware_send = ewf_interface_win32_com_hardware_send; \
ewf_interface_win32_com__interface__##interface_name_symb.hardware_receive = ewf_interface_win32_com_hardware_receive; \
ewf_interface_win32_com__interface__##interface_name_symb.implementation_ptr = &(ewf_interface_win32_com__implementation__##interface_name_symb); \
interface_ptr = &(ewf_interface_win32_com__interface__##interface_name_symb); \
EWF_INTERFACE_WIN32_COM_INITIALIZE_HEADER(interface_ptr); \
} while(0)
ewf_result ewf_interface_win32_com_hardware_receive(ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
Receive a buffer using the WIN32 COM hardware interface.
Definition: ewf_interface_win32_com.c:194
ewf_result ewf_interface_win32_com_hardware_send(ewf_interface *interface_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
Send a buffer using the WIN32 COM hardware interface.
Definition: ewf_interface_win32_com.c:126
ewf_result ewf_interface_win32_com_hardware_start(ewf_interface *interface_ptr)
Start the WIN32 COM hardware interface.
Definition: ewf_interface_win32_com.c:21
ewf_result ewf_interface_win32_com_hardware_stop(ewf_interface *interface_ptr)
Stop the WIN32 COM hardware interface.
Definition: ewf_interface_win32_com.c:102
the WIN32 COM host interface implementation data structure type
Definition: ewf_interface_win32_com.h:52
The interface structure definition.
Definition: ewf_interface.h:66
The interface message structure definition.
Definition: ewf_message.h:27

Declare a WIN32 COM host interface.

Parameters
[in,out]interface_ptra pointer to an interface that will be initialized to point to the one statically declared by the macro
[in]interface_name_symba unique symbol name that will be used as a name suffix for the statically declared data
[in]com_port_cstr_paramThe constant string with the file name of the COM port, for example "\\\\.\\COM1"
[in]BaudRate_paramThe baud rate of the COM port, for example 115200
[in]ByteSize_paramThe number of data bits, typically 8
[in]Parity_paramThe number of parity bits, it can be: NOPARITY, ODDPARITY, SPACEPARITY, EVENPARITY or MARKPARITY
[in]StopBits_paramThe number of stop bits, it can be either: ONESTOPBIT, ONE5STOPBITS or TWOSTOPBITS

Typedef Documentation

◆ ewf_interface_win32_com

the WIN32 COM host interface implementation data structure type

*** group_interface_win32_com_config