bargraph3 2.0.0.0
bargraph3.h File Reference

This file contains API for BARGRAPH 3 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  bargraph3_t
 Click ctx object definition. More...
 
struct  bargraph3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define BARGRAPH3_MAP_MIKROBUS(cfg, mikrobus)
 
#define BARGRAPH3_RETVAL   uint8_t
 
#define BARGRAPH3_OK   0x00
 
#define BARGRAPH3_INIT_ERROR   0xFF
 
#define BARGRAPH3_LED_0   0
 
#define BARGRAPH3_LED_1   1
 
#define BARGRAPH3_LED_2   2
 
#define BARGRAPH3_LED_3   3
 
#define BARGRAPH3_LED_4   4
 
#define BARGRAPH3_LED_5   5
 
#define BARGRAPH3_INCREASE_LED   1
 
#define BARGRAPH3_CONTROL_ONE_LED   0
 
#define BARGRAPH3_DIRECTION_TOP_TO_BOTTOM   1
 
#define BARGRAPH3_DIRECTION_BOTTOM_TO_TOP   0
 
#define BARGRAPH3_DEVICE_ENABLE   0
 
#define BARGRAPH3_DEVICE_DISABLE   1
 

Functions

void bargraph3_cfg_setup (bargraph3_cfg_t *cfg)
 Config Object Initialization function.
 
BARGRAPH3_RETVAL bargraph3_init (bargraph3_t *ctx, bargraph3_cfg_t *cfg)
 Initialization function.
 
void bargraph3_default_cfg (bargraph3_t *ctx)
 Click Default Configuration function.
 
void bargraph3_generic_transfer (bargraph3_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void bargraph3_enable (bargraph3_t *ctx, uint8_t state)
 Functions for enable the chip.
 
void bargraph3_reset (bargraph3_t *ctx)
 Functions for reset the chip.
 
void bargraph3_set_pwm (bargraph3_t *ctx, uint8_t state)
 Functions for set PWM.
 
void bargraph3_display (bargraph3_t *ctx, uint8_t ctrl, uint8_t dir, uint8_t counter)
 Displays function.
 

Detailed Description

This file contains API for BARGRAPH 3 Click driver.