bargraph4 2.0.0.0
bargraph4.h File Reference

This file contains API for BarGraph 4 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  bargraph4_t
 BarGraph 4 Click context object. More...
 
struct  bargraph4_cfg_t
 BarGraph 4 Click configuration object. More...
 

Macros

#define BARGRAPH4_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define BARGRAPH4_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define BARGRAPH4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  bargraph4_return_value_t { BARGRAPH4_OK = 0 , BARGRAPH4_ERROR = -1 }
 BarGraph 4 Click return value data. More...
 
enum  bargraph4_sel_ch_t { BARGRAPH4_CHANNEL_A = 0 , BARGRAPH4_CHANNEL_B , BARGRAPH4_CHANNEL_C , BARGRAPH4_CHANNEL_D }
 BarGraph 4 Click select channel. More...
 
enum  bargraph4_level_t {
  BARGRAPH4_LEVEL_0 = 0 , BARGRAPH4_LEVEL_1 , BARGRAPH4_LEVEL_2 , BARGRAPH4_LEVEL_3 ,
  BARGRAPH4_LEVEL_4
}
 BarGraph 4 Click bar level. More...
 

Functions

void bargraph4_cfg_setup (bargraph4_cfg_t *cfg)
 BarGraph 4 configuration object setup function.
 
err_t bargraph4_init (bargraph4_t *ctx, bargraph4_cfg_t *cfg)
 BarGraph 4 initialization function.
 
err_t bargraph4_set_output (bargraph4_t *ctx, uint16_t ch_mask)
 BarGraph 4 set output function.
 
err_t bargraph4_read_output (bargraph4_t *ctx, uint16_t *ch_mask)
 BarGraph 4 read output function.
 
void bargraph4_disable_output (bargraph4_t *ctx)
 BarGraph 4 disable output function.
 
void bargraph4_enable_output (bargraph4_t *ctx)
 BarGraph 4 enable output function.
 
err_t bargraph4_set_channel_level (bargraph4_t *ctx, bargraph4_sel_ch_t channel, bargraph4_level_t level)
 BarGraph 4 set channel level function.
 

Detailed Description

This file contains API for BarGraph 4 Click Driver.

Enumeration Type Documentation

◆ bargraph4_level_t

BarGraph 4 Click bar level.

Enum values for bar level.

Enumerator
BARGRAPH4_LEVEL_0 
BARGRAPH4_LEVEL_1 
BARGRAPH4_LEVEL_2 
BARGRAPH4_LEVEL_3 
BARGRAPH4_LEVEL_4 

◆ bargraph4_return_value_t

BarGraph 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
BARGRAPH4_OK 
BARGRAPH4_ERROR 

◆ bargraph4_sel_ch_t

BarGraph 4 Click select channel.

Enum values for channel selection.

Enumerator
BARGRAPH4_CHANNEL_A 
BARGRAPH4_CHANNEL_B 
BARGRAPH4_CHANNEL_C 
BARGRAPH4_CHANNEL_D