utl7segb 2.1.0.0
utl7segb.h File Reference

This file contains API for UT-L 7-SEG B 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  utl7segb_t
 UT-L 7-SEG B Click context object. More...
 
struct  utl7segb_cfg_t
 UT-L 7-SEG B Click configuration object. More...
 

Macros

#define UTL7SEGB_BASE_NUM_SYS_BINARY   2
 UT-L 7-SEG B description of the base values.
 
#define UTL7SEGB_BASE_NUM_SYS_TERNARY   3
 
#define UTL7SEGB_BASE_NUM_SYS_QUATERNARY   4
 
#define UTL7SEGB_BASE_NUM_SYS_QUINARY   5
 
#define UTL7SEGB_BASE_NUM_SYS_SENARY   6
 
#define UTL7SEGB_BASE_NUM_SYS_SEPTENARY   7
 
#define UTL7SEGB_BASE_NUM_SYS_OCTAL   8
 
#define UTL7SEGB_BASE_NUM_SYS_NONARY   9
 
#define UTL7SEGB_BASE_NUM_SYS_DECIMAL   10
 
#define UTL7SEGB_BASE_NUM_SYS_UNDECIMAL   11
 
#define UTL7SEGB_BASE_NUM_SYS_DUODECIMAL   12
 
#define UTL7SEGB_BASE_NUM_SYS_HEXADECIMAL   16
 
#define UTL7SEGB_NO_DOT   0
 UT-L 7-SEG B description setting.
 
#define UTL7SEGB_DOT_RIGHT   1
 
#define UTL7SEGB_DOT_LEFT   2
 
#define UTL7SEGB_DOT_LEFT_RIGHT   3
 
#define UTL7SEGB_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define UTL7SEGB_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define UTL7SEGB_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  utl7segb_return_value_t { UTL7SEGB_OK = 0 , UTL7SEGB_ERROR = -1 }
 UT-L 7-SEG B Click return value data. More...
 

Functions

void utl7segb_cfg_setup (utl7segb_cfg_t *cfg)
 UT-L 7-SEG B configuration object setup function.
 
err_t utl7segb_init (utl7segb_t *ctx, utl7segb_cfg_t *cfg)
 UT-L 7-SEG B initialization function.
 
err_t utl7segb_default_cfg (utl7segb_t *ctx)
 UT-L 7-SEG B default configuration function.
 
err_t utl7segb_generic_write (utl7segb_t *ctx, uint8_t *data_in, uint8_t len)
 UT-L 7-SEG B data writing function.
 
err_t utl7segb_generic_read (utl7segb_t *ctx, uint8_t *data_out, uint8_t len)
 UT-L 7-SEG B data reading function.
 
void utl7segb_enable (utl7segb_t *ctx)
 UT-L 7-SEG B enable function.
 
void utl7segb_disable (utl7segb_t *ctx)
 UT-L 7-SEG B disable function.
 
err_t utl7segb_display_number (utl7segb_t *ctx, uint8_t base, uint8_t num, uint8_t dot_pos)
 UT-L 7-SEG B display number function.
 
err_t utl7segb_get_number (utl7segb_t *ctx, uint8_t base, uint8_t *num, uint8_t *dot_pos)
 UT-L 7-SEG B get number function.
 

Detailed Description

This file contains API for UT-L 7-SEG B Click Driver.

Enumeration Type Documentation

◆ utl7segb_return_value_t

UT-L 7-SEG B Click return value data.

Predefined enum values for driver return values.

Enumerator
UTL7SEGB_OK 
UTL7SEGB_ERROR