gus.h File Reference

Goodix UART Service API. More...

#include "gr_includes.h"
#include "custom_config.h"

Go to the source code of this file.

Classes

struct  gus_evt_t
 Goodix UART Service event. More...
 
struct  gus_init_t
 Goodix UART Service init stucture. This contains all option and data needed for initialization of the service. More...
 

Macros

#define GUS_CONNECTION_MAX   10
 
#define GUS_MAX_DATA_LEN   247
 
#define GUS_FLOW_CTRL_LEN   1
 
#define GUS_SERVICE_UUID
 

Typedefs

typedef uint8_t gus_flow_ctrl_state_t
 Underlying type used for the GUS flow control state. More...
 
typedef void(* gus_evt_handler_t) (gus_evt_t *p_evt)
 Goodix UART Service event handler type. More...
 

Enumerations

enum  gus_evt_type_t {
  GUS_EVT_INVALID,
  GUS_EVT_RX_DATA_RECEIVED,
  GUS_EVT_TX_DATA_SENT,
  GUS_EVT_TX_PORT_OPENED,
  GUS_EVT_TX_PORT_CLOSED,
  GUS_EVT_FLOW_CTRL_ENABLE,
  GUS_EVT_FLOW_CTRL_DISABLE,
  GUS_EVT_TX_FLOW_OFF,
  GUS_EVT_TX_FLOW_ON
}
 Goodix UART Service event types. More...
 
enum  gus_flow_ctrl_state {
  GUS_FLOW_CTRL_STATE_OFF = 0,
  GUS_FLOW_CTRL_STATE_ON
}
 Flow control state for GUS service. More...
 

Functions

sdk_err_t gus_service_init (gus_init_t *p_gus_init)
 Initialize a Goodix UART Service instance and add in the database. More...
 
sdk_err_t gus_tx_data_send (uint8_t conn_idx, uint8_t *p_data, uint16_t length)
 Send data to peer device. More...
 
sdk_err_t gus_rx_flow_ctrl_set (uint8_t conn_idx, gus_flow_ctrl_state_t flow_ctrl)
 Send GUS Rx flow control state to peer device. More...
 
uint16_t gus_service_start_handle_get (void)
 Provide the interface for other modules to obtain the gus service start handle . More...
 

Detailed Description

Goodix UART Service API.

Attention
#####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gus.h.