Common interface functions.
More...
|
ewf_result | ewf_interface_init (ewf_interface *interface_ptr) |
| Initialize the interface This initializes the internal status of the control structure This doesn't start the hardware interface Call ewf_interface_start to start the interface before using it. More...
|
|
ewf_result | ewf_interface_clean (ewf_interface *interface_ptr) |
| Cleanup the interface This is called after the interface has been stopped It releases resources used by the internal status of interface control structure. More...
|
|
ewf_result | ewf_interface_start (ewf_interface *interface_ptr) |
| Starts the interface. More...
|
|
ewf_result | ewf_interface_stop (ewf_interface *interface_ptr) |
| Stops the interface. More...
|
|
ewf_result | ewf_interface_send (ewf_interface *interface_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length) |
| Sends data to the interface. More...
|
|
ewf_result | ewf_interface_receive_response (ewf_interface *interface_ptr, uint8_t **buffer_ptr_ptr, uint32_t *buffer_length_ptr, uint32_t wait_time) |
| Read a response message from the interface. More...
|
|
ewf_result | ewf_interface_receive_urc (ewf_interface *interface_ptr, uint8_t **buffer, uint32_t *buffer_length_ptr, uint32_t wait_time) |
| Receive a message from the URC queue. More...
|
|
ewf_result | ewf_interface_message_allocator_set (ewf_interface *interface_ptr, ewf_allocator *allocator_ptr) |
| Set the interface message allocator. More...
|
|
ewf_result | ewf_interface_data_allocator_set (ewf_interface *interface_ptr, ewf_allocator *allocator_ptr) |
| Set the interface data allocator. More...
|
|
ewf_result | ewf_interface_release (ewf_interface *interface_ptr, void *buffer_ptr) |
| Release a message buffer returned by the interface. More...
|
|
ewf_result | ewf_interface_release_data (ewf_interface *interface_ptr, void *buffer_ptr) |
| Release a data buffer returned by the interface. More...
|
|
Common interface functions.
◆ ewf_interface_clean()
Cleanup the interface This is called after the interface has been stopped It releases resources used by the internal status of interface control structure.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
- Returns
- ewf_result status code
◆ ewf_interface_data_allocator_set()
Set the interface data allocator.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
- Returns
- ewf_result status code
◆ ewf_interface_init()
Initialize the interface This initializes the internal status of the control structure This doesn't start the hardware interface Call ewf_interface_start to start the interface before using it.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
- Returns
- ewf_result status code
Common
◆ ewf_interface_message_allocator_set()
Set the interface message allocator.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
- Returns
- ewf_result status code
◆ ewf_interface_receive_response()
ewf_result ewf_interface_receive_response |
( |
ewf_interface * |
interface_ptr, |
|
|
uint8_t ** |
buffer_ptr_ptr, |
|
|
uint32_t * |
buffer_length_ptr, |
|
|
uint32_t |
wait_time |
|
) |
| |
Read a response message from the interface.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
[in,out] | buffer_ptr_ptr | address of a pointer that will receive the response pointer allocated by the interface |
[in,out] | buffer_length_ptr | address of a variable that will receive the length of the response |
[in] | wait_time | the number of time units to wait for a response |
- Returns
- ewf_result status code
◆ ewf_interface_receive_urc()
ewf_result ewf_interface_receive_urc |
( |
ewf_interface * |
interface_ptr, |
|
|
uint8_t ** |
buffer, |
|
|
uint32_t * |
buffer_length_ptr, |
|
|
uint32_t |
wait_time |
|
) |
| |
Receive a message from the URC queue.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
[in,out] | buffer | address of a pointer that will receive the response pointer allocated by the interface |
[in,out] | buffer_length_ptr | address of a variable that will receive the length of the response |
[in] | wait_time | the number of time units to wait for a response |
- Returns
- ewf_result status code
◆ ewf_interface_release()
Release a message buffer returned by the interface.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
[in] | buffer_ptr | a pointer to the message buffer to be released |
- Returns
- ewf_result status code
◆ ewf_interface_release_data()
Release a data buffer returned by the interface.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
[in] | buffer_ptr | a pointer to the data buffer to be released |
- Returns
- ewf_result status code
◆ ewf_interface_send()
ewf_result ewf_interface_send |
( |
ewf_interface * |
interface_ptr, |
|
|
const uint8_t * |
buffer_ptr, |
|
|
uint32_t |
buffer_length |
|
) |
| |
Sends data to the interface.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
[in] | buffer_ptr | a pointer to the buffer to be sent |
[in] | buffer_length | the length of the data to be sent |
- Returns
- ewf_result status code
◆ ewf_interface_start()
Starts the interface.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
- Returns
- ewf_result status code
◆ ewf_interface_stop()
Stops the interface.
- Parameters
-
[in] | interface_ptr | A pointer to the interface structure |
- Returns
- ewf_result status code