Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
comm_interface.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <zpal_uart.h>
+ Include dependency graph for comm_interface.h:

Go to the source code of this file.

Data Structures

struct  _transport_t
 Transport. More...
 
struct  comm_interface_command_t
 
struct  comm_interface_frame_t
 
struct  comm_interface_beam_start_frame_t
 Beam start frame type. More...
 
struct  comm_interface_beam_stop_frame_t
 Beam stop frame type. More...
 

Macros

#define RECEIVE_BUFFER_SIZE   32
 Receive buffer size.
 
#define TRANSMIT_BUFFER_SIZE   180
 Transmit buffer size.
 

Typedefs

typedef void * transport_handle_t
 Transport handle type.
 
typedef struct _transport_t transport_t
 Transport.
 
typedef void(* transmit_done_cb_t) (transport_handle_t transport)
 Transmit done callback type.
 

Enumerations

enum  comm_interface_parse_result_t {
  PARSE_IDLE ,
  PARSE_FRAME_RECEIVED ,
  PARSE_FRAME_SENT ,
  PARSE_FRAME_ERROR ,
  PARSE_RX_TIMEOUT ,
  PARSE_TX_TIMEOUT
}
 Parsing result enum. More...
 

Functions

void comm_interface_transmit_command (uint8_t cmd, const uint8_t *payload, uint8_t len, transmit_done_cb_t cb)
 Transmit a command to the host.
 
void comm_interface_transmit_frame (uint16_t timestamp, uint8_t ch_and_speed, uint8_t region, int8_t rssi, const uint8_t *payload, uint8_t length, transmit_done_cb_t cb)
 Transmit a frame to the host.
 
void comm_interface_transmit_beam_start (uint16_t timestamp, uint8_t ch_and_speed, uint8_t region, int8_t rssi, const uint8_t *payload, uint8_t length, transmit_done_cb_t cb)
 Transmit a beam start frame to the host.
 
void comm_interface_transmit_beam_stop (uint16_t timestamp, int8_t rssi, uint16_t counter, transmit_done_cb_t cb)
 Transmit a beam stop frame to the host.
 
void comm_interface_wait_transmit_done (void)
 
void comm_interface_init (zpal_uart_id_t uart, void(*uart_rx_event_handler)())
 Initialize the communication interface.
 
comm_interface_parse_result_t comm_interface_parse_data (void)
 Parse the incomming data.
 
comm_interface_command_tcomm_interface_get_command (void)
 Get the received command.
 

Detailed Description