uts7segb2 2.1.0.0
uts7segb2.h File Reference

This file contains API for UT-S 7-SEG B 2 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  uts7segb2_t
 UT-S 7-SEG B 2 Click context object. More...
 
struct  uts7segb2_cfg_t
 UT-S 7-SEG B 2 Click configuration object. More...
 
struct  uts7segb2_character_cfg_t
 UT-S 7-SEG B 2 character configuration object. More...
 
struct  uts7segb2_number_cfg_t
 UT-S 7-SEG B 2 number configuration object. More...
 

Macros

#define UTS7SEGB2_SEG_DIS14_SEG0   0x00000001l
 UT-S 7-SEG B 2 segment bitmask data values.
 
#define UTS7SEGB2_SEG_DIS14_SEG1   0x00000002l
 
#define UTS7SEGB2_SEG_DIS14_SEG2   0x00000004l
 
#define UTS7SEGB2_SEG_DIS14_SEG3   0x00000008l
 
#define UTS7SEGB2_SEG_DIS14_SEG4   0x00000010l
 
#define UTS7SEGB2_SEG_DIS14_SEG5   0x00000020l
 
#define UTS7SEGB2_SEG_DIS14_SEG6   0x00000040l
 
#define UTS7SEGB2_SEG_DIS14_SEG7   0x00000080l
 
#define UTS7SEGB2_SEG_DIS25_SEG0   0x00000100l
 
#define UTS7SEGB2_SEG_DIS25_SEG1   0x00000200l
 
#define UTS7SEGB2_SEG_DIS25_SEG2   0x00000400l
 
#define UTS7SEGB2_SEG_DIS25_SEG3   0x00000800l
 
#define UTS7SEGB2_SEG_DIS25_SEG4   0x00001000l
 
#define UTS7SEGB2_SEG_DIS25_SEG5   0x00002000l
 
#define UTS7SEGB2_SEG_DIS25_SEG6   0x00004000l
 
#define UTS7SEGB2_SEG_DIS25_SEG7   0x00008000l
 
#define UTS7SEGB2_SEG_DIS36_SEG0   0x00010000l
 
#define UTS7SEGB2_SEG_DIS36_SEG1   0x00020000l
 
#define UTS7SEGB2_SEG_DIS36_SEG2   0x00040000l
 
#define UTS7SEGB2_SEG_DIS36_SEG3   0x00080000l
 
#define UTS7SEGB2_SEG_DIS36_SEG4   0x00100000l
 
#define UTS7SEGB2_SEG_DIS36_SEG5   0x00200000l
 
#define UTS7SEGB2_SEG_DIS36_SEG6   0x00400000l
 
#define UTS7SEGB2_SEG_DIS36_SEG7   0x00800000l
 
#define UTS7SEGB2_SEG_ALL   0x01FFFFFFl
 
#define UTS7SEGB2_SEG_BIT_MASK   0x01FFFFFFl
 
#define UTS7SEGB2_NIBBLE_LOW   0x000Fu
 UT-S 7-SEG B 2 data bitmask.
 
#define UTS7SEGB2_NIBBLE_HIGH   0x00F0u
 
#define UTS7SEGB2_BYTE_LOW   0x00FFu
 
#define UTS7SEGB2_WORD_BIT_POS_0   0x0001u
 
#define UTS7SEGB2_WORD_BIT_POS_14   0x4000u
 
#define UTS7SEGB2_WORD_BIT_POS_15   0x8000u
 
#define UTS7SEGB2_SEG_NUM_START   0
 UT-S 7-SEG B 2 segment position number data values.
 
#define UTS7SEGB2_SEG_NUM_END   23
 
#define UTS7SEGB2_SEG_NUM_POS   24
 
#define UTS7SEGB2_BRIGHTNESS_MIN   0x0000u
 UT-S 7-SEG B 2 brightness range data values.
 
#define UTS7SEGB2_BRIGHTNESS_DEFAULT   0x07FFu
 
#define UTS7SEGB2_BRIGHTNESS_MAX   0x0FFFu
 
#define UTS7SEGB2_BASE_NUM_SYS_BINARY   2
 UT-S 7-SEG B 2 description of the base values.
 
#define UTS7SEGB2_BINARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_TERNARY   3
 
#define UTS7SEGB2_TERNARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_QUATERNARY   4
 
#define UTS7SEGB2_QUATERNARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_QUINARY   5
 
#define UTS7SEGB2_QUINARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_SENARY   6
 
#define UTS7SEGB2_SENARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_SEPTENARY   7
 
#define UTS7SEGB2_SEPTENARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_OCTAL   8
 
#define UTS7SEGB2_OCTAL_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_NONARY   9
 
#define UTS7SEGB2_NONARY_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_DECIMAL   10
 
#define UTS7SEGB2_DECIMAL_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_UNDECIMAL   11
 
#define UTS7SEGB2_UNDECIMAL_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_DUODECIMAL   12
 
#define UTS7SEGB2_DUODECIMAL_NUM_MAX
 
#define UTS7SEGB2_BASE_NUM_SYS_HEXADECIMAL   16
 
#define UTS7SEGB2_HEXADECIMAL_NUM_MAX
 
#define UTS7SEGB2_TOP_SEG_NO_DOT   0x00
 UT-S 7-SEG B 2 dots bitmask data values.
 
#define UTS7SEGB2_TOP_SEG_DOT_RIGHT   0x01
 
#define UTS7SEGB2_TOP_SEG_DOT_MIDDLE   0x02
 
#define UTS7SEGB2_TOP_SEG_DOT_LEFT   0x04
 
#define UTS7SEGB2_BOTTOM_SEG_NO_DOT   0x00
 
#define UTS7SEGB2_BOTTOM_SEG_DOT_RIGHT   0x20
 
#define UTS7SEGB2_BOTTOM_SEG_DOT_LEFT   0x08
 
#define UTS7SEGB2_BOTTOM_SEG_DOT_MIDDLE   0x10
 
#define UTS7SEGB2_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define UTS7SEGB2_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define UTS7SEGB2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  uts7segb2_return_value_t { UTS7SEGB2_OK = 0 , UTS7SEGB2_ERROR = -1 }
 UT-S 7-SEG B 2 Click return value data. More...
 
enum  uts7segb2_seg_sel_t { UTS7SEGB2_SEG_TOP = 0 , UTS7SEGB2_SEG_BOTTOM }
 UT-S 7-SEG B 2 segment group selection value data. More...
 

Functions

void uts7segb2_cfg_setup (uts7segb2_cfg_t *cfg)
 UT-S 7-SEG B 2 configuration object setup function.
 
err_t uts7segb2_init (uts7segb2_t *ctx, uts7segb2_cfg_t *cfg)
 UT-S 7-SEG B 2 initialization function.
 
err_t uts7segb2_default_cfg (uts7segb2_t *ctx)
 UT-S 7-SEG B 2 default configuration function.
 
err_t uts7segb2_top_seg_write (uts7segb2_t *ctx, uint8_t *data_in, uint8_t len)
 UT-S 7-SEG B 2 top segment data writing function.
 
err_t uts7segb2_top_seg_read (uts7segb2_t *ctx, uint8_t *data_out, uint8_t len)
 UT-S 7-SEG B 2 top segment data reading function.
 
err_t uts7segb2_bottom_seg_write (uts7segb2_t *ctx, uint8_t *data_in, uint8_t len)
 UT-S 7-SEG B 2 bottom segment data writing function.
 
err_t uts7segb2_bottom_seg_read (uts7segb2_t *ctx, uint8_t *data_out, uint8_t len)
 UT-S 7-SEG B 2 bottom segment data reading function.
 
void uts7segb2_set_outputs_on (uts7segb2_t *ctx)
 UT-S 7-SEG B 2 set outputs ON function.
 
void uts7segb2_set_outputs_off (uts7segb2_t *ctx)
 UT-S 7-SEG B 2 set outputs OFF function.
 
err_t uts7segb2_set_seg_pos (uts7segb2_t *ctx, uts7segb2_seg_sel_t seg_sel, uint8_t seg_num, uint16_t brightness)
 UT-S 7-SEG B 2 set segment position function.
 
err_t uts7segb2_set_led_output (uts7segb2_t *ctx, uts7segb2_seg_sel_t seg_sel, uint32_t seg_bit_mask, uint16_t brightness)
 UT-S 7-SEG B 2 set LED output function.
 
err_t uts7segb2_display_character (uts7segb2_t *ctx, uts7segb2_character_cfg_t ascii_char)
 UT-S 7-SEG B 2 display character function.
 
err_t uts7segb2_display_number (uts7segb2_t *ctx, uts7segb2_number_cfg_t number)
 UT-S 7-SEG B 2 display number function.
 

Detailed Description

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

Enumeration Type Documentation

◆ uts7segb2_return_value_t

UT-S 7-SEG B 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
UTS7SEGB2_OK 
UTS7SEGB2_ERROR 

◆ uts7segb2_seg_sel_t

UT-S 7-SEG B 2 segment group selection value data.

Predefined enum values for driver segment group selection.

Enumerator
UTS7SEGB2_SEG_TOP 
UTS7SEGB2_SEG_BOTTOM