rotaryo 2.0.0.0
rotaryo.h File Reference

This file contains API for ROTARY O Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  rotaryo_t
 ROTARY O Click context object. More...
 
struct  rotaryo_cfg_t
 ROTARY O Click configuration object. More...
 

Macros

#define ROTARYO_ONE_LED   0x0001
 ROTARY O Number of LED's.
 
#define ROTARYO_TWO_LED   0x0101
 
#define ROTARYO_FOUR_LED   0x1111
 
#define ROTARYO_EIGHT_LED   0x5555
 
#define ROTARYO_RESET_LED   0x0000
 
#define ROTARYO_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  rotaryo_return_value_t { ROTARYO_OK = 0 , ROTARYO_ERROR = -1 }
 ROTARY O Click return value data. More...
 

Functions

void rotaryo_cfg_setup (rotaryo_cfg_t *cfg)
 ROTARY O configuration object setup function.
 
err_t rotaryo_init (rotaryo_t *ctx, rotaryo_cfg_t *cfg)
 ROTARY O initialization function.
 
void rotaryo_generic_transfer (rotaryo_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 ROTARY O data transfer function.
 
void rotaryo_turn_on_led_by_data (rotaryo_t *ctx, uint16_t write_data)
 ROTARY O generic data write function.
 
void rotaryo_turn_on_led_by_position (rotaryo_t *ctx, uint8_t led_position)
 ROTARY O turn on led by position function.
 
uint8_t rotaryo_button_push (rotaryo_t *ctx)
 Button push state.
 
uint16_t rotaryo_get_led_data (uint8_t current_led_state)
 Get led data state.
 
void rotaryo_reset_led (rotaryo_t *ctx)
 Reset led.
 
uint8_t rotaryo_get_ecb_state (rotaryo_t *ctx)
 State ecb pin.
 
uint8_t rotaryo_get_eca_state (rotaryo_t *ctx)
 State eca pin.
 

Detailed Description

This file contains API for ROTARY O Click Driver.

Enumeration Type Documentation

◆ rotaryo_return_value_t

ROTARY O Click return value data.

Predefined enum values for driver return values.

Enumerator
ROTARYO_OK 
ROTARYO_ERROR