optoencoder2  2.0.0.0
Data Structures | Macros | Functions
optoencoder2.h File Reference

This file contains API for Opto Encoder 2 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  optoencoder2_t
 Click ctx object definition. More...
 
struct  optoencoder2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define OPTOENCODER2_MAP_MIKROBUS(cfg, mikrobus)
 
#define OPTOENCODER2_RETVAL   uint8_t
 
#define OPTOENCODER2_OK   0x00
 
#define OPTOENCODER2_INIT_ERROR   0xFF
 

Functions

void optoencoder2_cfg_setup (optoencoder2_cfg_t *cfg)
 Config Object Initialization function. More...
 
OPTOENCODER2_RETVAL optoencoder2_init (optoencoder2_t *ctx, optoencoder2_cfg_t *cfg)
 Initialization function. More...
 
uint8_t optoencoder2_pwm_get (optoencoder2_t *ctx)
 Getting PWM pin state. More...
 
uint8_t optoencoder2_int_get (optoencoder2_t *ctx)
 Getting INT pin state. More...
 
int32_t optoencoder2_get_position (optoencoder2_t *ctx)
 Getting encoder position. More...
 
void optoencoder2_zero_counter (optoencoder2_t *ctx)
 Reset encoder counter. More...
 
uint8_t optoencoder2_isr (optoencoder2_t *ctx, uint8_t n_cycles)
 Incrementing/decrementing encoder counter. More...
 

Detailed Description

This file contains API for Opto Encoder 2 Click driver.