rotaryy 2.0.0.0
rotaryy.h File Reference

This file contains API for ROTARY Y 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  rotaryy_t
 ROTARY Y Click context object. More...
 
struct  rotaryy_cfg_t
 ROTARY Y Click configuration object. More...
 

Macros

#define ROTARYY_ONE_LED   0x0001
 ROTARY Y Number of LED's.
 
#define ROTARYY_TWO_LED   0x0101
 
#define ROTARYY_FOUR_LED   0x1111
 
#define ROTARYY_EIGHT_LED   0x5555
 
#define ROTARYY_RESET_LED   0x0000
 
#define ROTARYY_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  rotaryy_return_value_t { ROTARYY_OK = 0 , ROTARYY_ERROR = -1 }
 ROTARY Y Click return value data. More...
 

Functions

void rotaryy_cfg_setup (rotaryy_cfg_t *cfg)
 ROTARY Y configuration object setup function.
 
err_t rotaryy_init (rotaryy_t *ctx, rotaryy_cfg_t *cfg)
 ROTARY Y initialization function.
 
void rotaryy_generic_transfer (rotaryy_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 ROTARY Y data transfer function.
 
void rotaryy_turn_on_led_by_data (rotaryy_t *ctx, uint16_t write_data)
 ROTARY Y generic data write function.
 
void rotaryy_turn_on_led_by_position (rotaryy_t *ctx, uint8_t led_position)
 ROTARY Y turn on led by position function.
 
uint8_t rotaryy_button_push (rotaryy_t *ctx)
 Button push state.
 
uint16_t rotaryy_get_led_data (uint8_t current_led_state)
 Get led data state.
 
void rotaryy_reset_led (rotaryy_t *ctx)
 Reset led.
 
uint8_t rotaryy_get_ecb_state (rotaryy_t *ctx)
 State ecb pin.
 
uint8_t rotaryy_get_eca_state (rotaryy_t *ctx)
 State eca pin.
 

Detailed Description

This file contains API for ROTARY Y Click Driver.

Enumeration Type Documentation

◆ rotaryy_return_value_t

ROTARY Y Click return value data.

Predefined enum values for driver return values.

Enumerator
ROTARYY_OK 
ROTARYY_ERROR