Go to the documentation of this file.
65 #include "custom_config.h"
71 #define GUS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
72 10 : CFG_MAX_CONNECTIONS)
75 #define GUS_MAX_DATA_LEN 247
76 #define GUS_FLOW_CTRL_LEN 1
77 #define GUS_SERVICE_UUID 0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
78 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x02, 0xED, 0xA6
Goodix UART Service init stucture.
@ GUS_EVT_TX_FLOW_OFF
Tx flow off control request.
@ GUS_EVT_TX_DATA_SENT
The data from the application has been sent, and the service is ready to accept new data from the app...
@ GUS_EVT_TX_PORT_OPENED
Tx port has been opened.
void(* gus_evt_handler_t)(gus_evt_t *p_evt)
Goodix UART Service event handler type.
gus_evt_handler_t evt_handler
Goodix UART Service event handler which must be provided by the application to send and receive the d...
@ GUS_EVT_FLOW_CTRL_ENABLE
GUS flow control been enabled.
@ GUS_EVT_RX_DATA_RECEIVED
The data from the peer has been received.
@ GUS_EVT_TX_PORT_CLOSED
Tx port has been closed.
gus_evt_type_t
Goodix UART Service event types.
uint16_t length
Length of received data.
@ GUS_EVT_INVALID
Invalid GUS event.
sdk_err_t gus_service_init(gus_init_t *p_gus_init)
Initialize a Goodix UART Service instance and add in the database.
@ GUS_EVT_TX_FLOW_ON
Tx flow on control request.
uint16_t sdk_err_t
SDK API result type.
sdk_err_t gus_rx_flow_ctrl_set(uint8_t conn_idx, uint8_t flow_ctrl)
Send GUS Rx flow control state to peer device.
gus_evt_type_t evt_type
The GUS event.
Goodix UART Service event.
uint8_t conn_idx
The index of the connection for the data transmission.
uint8_t * p_data
Pointer to the buffer within received data.
@ GUS_EVT_FLOW_CTRL_DISABLE
GUS flow control been disabled.
sdk_err_t gus_tx_data_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send data to peer device.