Embedded Wireless Framework
Modules | Data Structures | Macros | Typedefs
EWF Interface API

Interfaces are an abstraction and implementations of asynchronous serial communication between adapters and hardware. More...

Modules

 Common Interface API
 Common interface functions.
 
 The Interface timeout API
 Functions for setting up and controlling the interface timeout.
 
 The Interface tokenizer API
 Functions for setting up and controlling the interface tokenizer.
 
 Hardware Interface API
 Hardware interface functions implemented per platform.
 
 Interface URC processing
 The host interface URC processing.
 
 Host interface polling calls
 The host interface polling calls.
 
 Interface callback API
 Asynchronous callback interface.
 
 Interface helper functions
 Helper interface functions.
 
 LPC UART host interface
 LPC UART host interface.
 
 PIC UART port interface
 PIC UART port interface.
 
 SAM UART port interface
 SAM UART port interface.
 
 RA UART interface
 RA UART interface.
 
 RX UART interface
 RX UART interface.
 
 STM32 UART host interface
 STM32 UART host interface.
 
 WIN32 COM port host interface
 WIN32 COM port host interface.
 

Data Structures

struct  _ewf_interface
 The interface structure definition. More...
 

Macros

#define EWF_INTERFACE_STRUCT_MAGIC   (0x017eface) /* ~~ i(n)te(r)face */
 
#define EWF_INTERFACE_STRUCT_SIZE   (sizeof(struct _ewf_interface))
 
#define EWF_INTERFACE_VERSION   (EWF_DEVELOPER_MICROSOFT | 0x0001)
 
#define EWF_INTERFACE_VALIDATE_POINTER(interface_ptr)
 
#define EWF_INTERFACE_VALIDATE_POINTER_TYPE(interface_ptr, interface_type)
 

Typedefs

typedef ewf_message ewf_interface_message
 Legacy type for messages.
 
typedef ewf_tokenizer_pattern ewf_interface_tokenizer_pattern
 Legacy type for tokenizer patters.
 
typedef ewf_result(* ewf_interface_response_callback) (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t length)
 a function pointer type for response callbacks
 
typedef ewf_result(* ewf_interface_urc_callback) (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t length)
 a function pointer type for URC callbacks
 

Detailed Description

Interfaces are an abstraction and implementations of asynchronous serial communication between adapters and hardware.

Interface is short for Host Interface. This is a software driver that implements the software connection between a ** Network Adapter Driver ** (known simply as an ** adapter driver ** in the framework) and the ** Physical Network Adapter **. The Interface can serve as a raw interface for transferring data or provide advanced capabilities to parse a serial AT interface and buffer. Queuing is achieved by using Platform Queues. An interface has one or two associated queues: one for incoming Command Response Messages (or simply messages) and another for data. An interface has a status variable indicating if it is in command mode or not. When in command mode, incoming bytes are interpreted as responses to commands, until OK or an error response is received, then the interface switched to non command mode. In non command mode, the interface will interpret every received message as an Unrequested Return Code or URC.

Macro Definition Documentation

◆ EWF_INTERFACE_VALIDATE_POINTER

#define EWF_INTERFACE_VALIDATE_POINTER (   interface_ptr)
Value:
do { \
if ((interface_ptr == NULL) || \
(interface_ptr->implementation_ptr == NULL)) \
{ \
EWF_LOG_ERROR("The interface pointer is invalid."); \
} \
} while(0)
@ EWF_RESULT_INVALID_FUNCTION_ARGUMENT
Definition: ewf.h:69