cxpi 2.0.0.0
cxpi.h File Reference

This file contains API for CXPI Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  cxpi_t
 CXPI Click context object. More...
 
struct  cxpi_cfg_t
 CXPI Click configuration object. More...
 

Macros

#define CXPI_PIN_STATE_DISABLE   0x00
 CXPI control commands.
 
#define CXPI_PIN_STATE_ENABLE   0x01
 
#define DRV_BUFFER_SIZE   200
 CXPI driver buffer size.
 
#define CXPI_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  cxpi_return_value_t { CXPI_OK = 0 , CXPI_ERROR = -1 }
 CXPI Click return value data. More...
 

Functions

void cxpi_cfg_setup (cxpi_cfg_t *cfg)
 CXPI configuration object setup function.
 
err_t cxpi_init (cxpi_t *ctx, cxpi_cfg_t *cfg)
 CXPI initialization function.
 
err_t cxpi_default_cfg (cxpi_t *ctx)
 CXPI default configuration function.
 
err_t cxpi_generic_write (cxpi_t *ctx, char *data_buf, uint16_t len)
 CXPI data writing function.
 
err_t cxpi_generic_read (cxpi_t *ctx, char *data_buf, uint16_t max_len)
 CXPI data reading function.
 
void cxpi_write_byte (cxpi_t *ctx, uint8_t input)
 Write Single Byte.
 
uint8_t cxpi_read_byte (cxpi_t *ctx)
 Read Single Byte.
 
uint8_t cxpi_byte_ready (cxpi_t *ctx)
 Check for new byte received.
 
void cxpi_send_command (cxpi_t *ctx, char *command)
 Send command.
 
void cxpi_set_nslp_pin_state (cxpi_t *ctx, uint8_t pin_state)
 Set NSLP pin state function.
 
void cxpi_set_pwm_pin_state (cxpi_t *ctx, uint8_t pin_state)
 Set PWM pin state function.
 
void cxpi_set_through_mode (cxpi_t *ctx)
 Set through mode function.
 

Detailed Description

This file contains API for CXPI Click Driver.

Enumeration Type Documentation

◆ cxpi_return_value_t

CXPI Click return value data.

Predefined enum values for driver return values.

Enumerator
CXPI_OK 
CXPI_ERROR