ble7  2.0.0.0
Functions
Public function

Functions

void ble7_cfg_setup (ble7_cfg_t *cfg)
 Config Object Initialization function. More...
 
BLE7_RETVAL ble7_init (ble7_t *ctx, ble7_cfg_t *cfg)
 Initialization function. More...
 
void ble7_reset (ble7_t *ctx)
 Reset function. More...
 
void ble7_generic_write (ble7_t *ctx, char *data_buf, uint16_t len)
 Generic write function. More...
 
int32_t ble7_generic_read (ble7_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function. More...
 
void ble7_send_command (ble7_t *ctx, char *command)
 Transmit function. More...
 
void ble7_response_handler_set (ble7_t *ctx, void(*handler)(uint8_t *))
 Handler Setting function. More...
 
void ble7_uart_isr (ble7_t *ctx, uint8_t rx_dat)
 UART ISR function. More...
 
uint8_t ble7_response_ready (ble7_t *ctx)
 Response Ready function. More...
 
uint8_t ble7_get_gp0 (ble7_t *ctx)
 GP0 Pin Getting function. More...
 
uint8_t ble7_get_rts (ble7_t *ctx)
 RTS Pin Getting function. More...
 
void ble7_set_gp1 (ble7_t *ctx, uint8_t state)
 GP1 Pin Setting function. More...
 
void ble7_set_cts (ble7_t *ctx, uint8_t state)
 CTS Pin Setting function. More...
 
void ble7_receive_command (ble7_t *ctx, char *data_buf)
 

Detailed Description

Function Documentation

◆ ble7_cfg_setup()

void ble7_cfg_setup ( ble7_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ ble7_generic_read()

int32_t ble7_generic_read ( ble7_t ctx,
char *  data_buf,
uint16_t  max_len 
)

Generic read function.

Parameters
ctxClick object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

This function read maximum length of data.

◆ ble7_generic_write()

void ble7_generic_write ( ble7_t ctx,
char *  data_buf,
uint16_t  len 
)

Generic write function.

Parameters
ctxClick object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

This function write specific number of bytes

◆ ble7_get_gp0()

uint8_t ble7_get_gp0 ( ble7_t ctx)

GP0 Pin Getting function.

Parameters
ctxClick object.
Returns
0 or 1

This function checks state of the GP0 pin.

◆ ble7_get_rts()

uint8_t ble7_get_rts ( ble7_t ctx)

RTS Pin Getting function.

Parameters
ctxClick object.
Returns
0 or 1

This function checks state of the RTS pin.

◆ ble7_init()

BLE7_RETVAL ble7_init ( ble7_t ctx,
ble7_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

This function initializes all necessary pins and peripherals used for this click.

◆ ble7_receive_command()

void ble7_receive_command ( ble7_t ctx,
char *  data_buf 
)

◆ ble7_reset()

void ble7_reset ( ble7_t ctx)

Reset function.

This function allows user to reset BGX module.

◆ ble7_response_handler_set()

void ble7_response_handler_set ( ble7_t ctx,
void(*)(uint8_t *)  handler 
)

Handler Setting function.

Parameters
ctxClick object.
handlerPointer to the function which should be performed to get response

This function sets handler on the function which should be performed, for example function for the results logging.

◆ ble7_response_ready()

uint8_t ble7_response_ready ( ble7_t ctx)

Response Ready function.

Parameters
ctxClick object.
Returns
0 - response is not ready, 1 - response is ready

This function checks does response ready or not.

◆ ble7_send_command()

void ble7_send_command ( ble7_t ctx,
char *  command 
)

Transmit function.

Parameters
ctxClick object.
tx_dataData to be transmitted

This function allows user to transmit data to the BGX module.

Note
This function will send '' character automatically at the end of the tx_data transmitting.

◆ ble7_set_cts()

void ble7_set_cts ( ble7_t ctx,
uint8_t  state 
)

CTS Pin Setting function.

Parameters
ctxClick object.
state0 or 1

This function sets CTS pin to the desired state.

◆ ble7_set_gp1()

void ble7_set_gp1 ( ble7_t ctx,
uint8_t  state 
)

GP1 Pin Setting function.

Parameters
ctxClick object.
state0 or 1

This function sets GP1 pin to the desired state.

◆ ble7_uart_isr()

void ble7_uart_isr ( ble7_t ctx,
uint8_t  rx_dat 
)

UART ISR function.

Parameters
ctxClick object.

This function reads response bytes from the BGX module and sets flag after each received byte.