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

This file contains API for Opto Encoder 5 Click Driver. More...

#include "mikrosdk_version.h"
#include "drv_digital_out.h"
#include "drv_digital_in.h"

Go to the source code of this file.

Data Structures

struct  optoencoder5_t
 Opto Encoder 5 Click context object. More...
 
struct  optoencoder5_cfg_t
 Opto Encoder 5 Click configuration object. More...
 

Macros

#define OPTOENCODER5_OUT_STATE_SWITCH_OPEN   0
 Opto Encoder 5 description setting. More...
 
#define OPTOENCODER5_OUT_STATE_SWITCH_CLOSED   1
 
#define OPTOENCODER5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  optoencoder5_return_value_t { OPTOENCODER5_OK = 0 , OPTOENCODER5_ERROR = -1 }
 Opto Encoder 5 Click return value data. More...
 

Functions

void optoencoder5_cfg_setup (optoencoder5_cfg_t *cfg)
 Opto Encoder 5 configuration object setup function. More...
 
err_t optoencoder5_init (optoencoder5_t *ctx, optoencoder5_cfg_t *cfg)
 Opto Encoder 5 initialization function. More...
 
void optoencoder5_enable (optoencoder5_t *ctx)
 Opto Encoder 5 enable function. More...
 
void optoencoder5_disable (optoencoder5_t *ctx)
 Opto Encoder 5 disable function. More...
 
uint8_t optoencoder5_get_out_state (optoencoder5_t *ctx)
 Opto Encoder 5 get state function. More...
 

Detailed Description

This file contains API for Opto Encoder 5 Click Driver.

Enumeration Type Documentation

◆ optoencoder5_return_value_t

Opto Encoder 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
OPTOENCODER5_OK 
OPTOENCODER5_ERROR