opto7 2.1.0.0
Data Structures | Macros | Enumerations | Functions
opto7.h File Reference

This file contains API for Opto 7 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  opto7_t
 Opto 7 Click context object. More...
 
struct  opto7_cfg_t
 Opto 7 Click configuration object. More...
 

Macros

#define OPTO7_PIN_STATE_HIGH   0x01
 Opto 7 control commands. More...
 
#define OPTO7_PIN_STATE_LOW   0x00
 
#define OPTO7_TX_DRV_BUFFER_SIZE   100
 Opto 7 driver buffer size. More...
 
#define OPTO7_RX_DRV_BUFFER_SIZE   300
 
#define OPTO7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  opto7_return_value_t { OPTO7_OK = 0 , OPTO7_ERROR = -1 }
 Opto 7 Click return value data. More...
 

Functions

void opto7_cfg_setup (opto7_cfg_t *cfg)
 Opto 7 configuration object setup function. More...
 
err_t opto7_init (opto7_t *ctx, opto7_cfg_t *cfg)
 Opto 7 initialization function. More...
 
err_t opto7_default_cfg (opto7_t *ctx)
 Opto 7 default configuration function. More...
 
err_t opto7_generic_write (opto7_t *ctx, uint8_t *data_in, uint16_t len)
 Opto 7 data writing function. More...
 
err_t opto7_generic_read (opto7_t *ctx, uint8_t *data_out, uint16_t len)
 Opto 7 data reading function. More...
 
void opto7_set_gp1_pin (opto7_t *ctx, uint8_t pin_state)
 Opto 7 set GP1 pin function. More...
 
uint8_t opto7_get_gp2_pin (opto7_t *ctx)
 Opto 7 get GP2 pin function. More...
 

Detailed Description

This file contains API for Opto 7 Click Driver.

Enumeration Type Documentation

◆ opto7_return_value_t

Opto 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
OPTO7_OK 
OPTO7_ERROR