uart1wire 2.0.0.0
|
Functions | |
void | uart1wire_cfg_setup (uart1wire_cfg_t *cfg) |
Config Object Initialization function. | |
UART1WIRE_RETVAL | uart1wire_init (uart1wire_t *ctx, uart1wire_cfg_t *cfg) |
Initialization function. | |
void | uart1wire_generic_write (uart1wire_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | uart1wire_generic_read (uart1wire_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | uart1wire_write_command (uart1wire_t *ctx, uint8_t cmd) |
Write command function. | |
uint8_t | uart1wire_read_byte (uart1wire_t *ctx) |
Read byte function. | |
void | uart1wire_reset (uart1wire_t *ctx) |
Reset function. | |
int8_t | uart1wire_read_data (uart1wire_t *ctx, uint8_t *data_out, uint8_t num_bytes) |
Read data function. | |
int8_t | uart1wire_read_temperature (uart1wire_t *ctx, float *temperature, uint8_t resolution) |
Read temperature function. | |
void uart1wire_cfg_setup | ( | uart1wire_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t uart1wire_generic_read | ( | uart1wire_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
uart1wire | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void uart1wire_generic_write | ( | uart1wire_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
uart1wire | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
UART1WIRE_RETVAL uart1wire_init | ( | uart1wire_t * | ctx, |
uart1wire_cfg_t * | cfg ) |
Initialization function.
uart1wire | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t uart1wire_read_byte | ( | uart1wire_t * | ctx | ) |
Read byte function.
ctx | Click object. |
@description This function reads one byte of data from the click module.
int8_t uart1wire_read_data | ( | uart1wire_t * | ctx, |
uint8_t * | data_out, | ||
uint8_t | num_bytes ) |
Read data function.
ctx | Click object. |
data_out | Data buffer for read data. |
num_bytes | The maximum length of data that can be read. |
0
- Success, -1
- Error.int8_t uart1wire_read_temperature | ( | uart1wire_t * | ctx, |
float * | temperature, | ||
uint8_t | resolution ) |
Read temperature function.
ctx | Click object. |
temperature | Temperature data. |
resolution | Temperature sensor resolution. |
0
- Success, -1
- Error.void uart1wire_reset | ( | uart1wire_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function sends a reset pulse signal.
void uart1wire_write_command | ( | uart1wire_t * | ctx, |
uint8_t | cmd ) |
Write command function.
ctx | Click object. |
cmd | Command value. |
@description This function sends an 8-bit command to the click module.