rotaryb 2.0.0.0
Data Structures | Macros | Enumerations | Functions
rotaryb.h File Reference

This file contains API for ROTARY B 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  rotaryb_t
 ROTARY B Click context object. More...
 
struct  rotaryb_cfg_t
 ROTARY B Click configuration object. More...
 

Macros

#define ROTARYB_ONE_LED   0x0001
 ROTARY B Number of LED's. More...
 
#define ROTARYB_TWO_LED   0x0101
 
#define ROTARYB_FOUR_LED   0x1111
 
#define ROTARYB_EIGHT_LED   0x5555
 
#define ROTARYB_RESET_LED   0x0000
 
#define ROTARYB_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  rotaryb_return_value_t { ROTARYB_OK = 0 , ROTARYB_ERROR = -1 }
 ROTARY B Click return value data. More...
 

Functions

void rotaryb_cfg_setup (rotaryb_cfg_t *cfg)
 ROTARY B configuration object setup function. More...
 
err_t rotaryb_init (rotaryb_t *ctx, rotaryb_cfg_t *cfg)
 ROTARY B initialization function. More...
 
void rotaryb_generic_transfer (rotaryb_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 ROTARY B data transfer function. More...
 
void rotaryb_turn_on_led_by_data (rotaryb_t *ctx, uint16_t write_data)
 ROTARY B generic data write function. More...
 
void rotaryb_turn_on_led_by_position (rotaryb_t *ctx, uint8_t led_position)
 ROTARY B turn on led by position function. More...
 
uint8_t rotaryb_button_push (rotaryb_t *ctx)
 Button push state. More...
 
uint16_t rotaryb_get_led_data (uint8_t current_led_state)
 Get led data state. More...
 
void rotaryb_reset_led (rotaryb_t *ctx)
 Reset led. More...
 
uint8_t rotaryb_get_ecb_state (rotaryb_t *ctx)
 State ecb pin. More...
 
uint8_t rotaryb_get_eca_state (rotaryb_t *ctx)
 State eca pin. More...
 

Detailed Description

This file contains API for ROTARY B Click Driver.

Enumeration Type Documentation

◆ rotaryb_return_value_t

ROTARY B Click return value data.

Predefined enum values for driver return values.

Enumerator
ROTARYB_OK 
ROTARYB_ERROR