alphanumg2 2.1.0.0
alphanumg2.h File Reference

This file contains API for AlphaNum G 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  alphanumg2_t
 AlphaNum G 2 Click context object. More...
 
struct  alphanumg2_cfg_t
 AlphaNum G 2 Click configuration object. More...
 

Macros

#define ALPHANUMG2_NIBBLE_LOW   0x000Fu
 AlphaNum G 2 data bit mask.
 
#define ALPHANUMG2_BYTE_LOW   0x00FFu
 
#define ALPHANUMG2_WORD_BIT_POS_0   0x0001u
 
#define ALPHANUMG2_WORD_BIT_POS_14   0x4000u
 
#define ALPHANUMG2_WORD_BIT_POS_15   0x8000u
 
#define ALPHANUMG2_BRIGHTNESS_MIN   0x0000u
 AlphaNum G 2 brightness range data values.
 
#define ALPHANUMG2_BRIGHTNESS_MAX   0x0FFFu
 
#define ALPHANUMG2_DEFAULT_DUR_1000_MS   1000
 AlphaNum G 2 default character duration.
 
#define ALPHANUMG2_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define ALPHANUMG2_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define ALPHANUMG2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  alphanumg2_return_value_t { ALPHANUMG2_OK = 0 , ALPHANUMG2_ERROR = -1 }
 AlphaNum G 2 Click return value data. More...
 
enum  alphanumg2_dot_t { ALPHANUMG2_NO_DOT = 0 , ALPHANUMG2_SET_DOT }
 AlphaNum G 2 Click dot symbol value data. More...
 

Functions

void alphanumg2_cfg_setup (alphanumg2_cfg_t *cfg)
 AlphaNum G 2 configuration object setup function.
 
err_t alphanumg2_init (alphanumg2_t *ctx, alphanumg2_cfg_t *cfg)
 AlphaNum G 2 initialization function.
 
err_t alphanumg2_default_cfg (alphanumg2_t *ctx)
 AlphaNum G 2 default configuration function.
 
err_t alphanumg2_generic_write (alphanumg2_t *ctx, uint8_t *data_in, uint8_t len)
 AlphaNum G 2 data writing function.
 
err_t alphanumg2_generic_read (alphanumg2_t *ctx, uint8_t *data_out, uint8_t len)
 AlphaNum G 2 data reading function.
 
void alphanumg2_set_char_duration (alphanumg2_t *ctx, uint16_t duration_ms)
 AlphaNum G 2 set character duration function.
 
void alphanumg2_set_outputs_off (alphanumg2_t *ctx)
 AlphaNum G 2 set outputs OFF function.
 
void alphanumg2_set_outputs_on (alphanumg2_t *ctx)
 AlphaNum G 2 set outputs ON function.
 
void alphanumg2_set_seg_left_off (alphanumg2_t *ctx)
 AlphaNum G 2 set segment left OFF function.
 
void alphanumg2_set_seg_left_on (alphanumg2_t *ctx)
 AlphaNum G 2 set segment left ON function.
 
void alphanumg2_set_seg_right_off (alphanumg2_t *ctx)
 AlphaNum G 2 set segment right OFF function.
 
void alphanumg2_set_seg_right_on (alphanumg2_t *ctx)
 AlphaNum G 2 set segment right ON function.
 
err_t alphanumg2_set_led_output (alphanumg2_t *ctx, uint16_t seg_bit_mask, alphanumg2_dot_t seg_dot, uint16_t brightness)
 AlphaNum G 2 set LED output function.
 
err_t alphanumg2_display_character (alphanumg2_t *ctx, uint8_t left_char, uint16_t left_brightness, uint8_t right_char, uint16_t right_brightness)
 AlphaNum G 2 display character function.
 

Detailed Description

This file contains API for AlphaNum G 2 Click Driver.

Enumeration Type Documentation

◆ alphanumg2_dot_t

AlphaNum G 2 Click dot symbol value data.

Predefined enum values for dot symbol values.

Enumerator
ALPHANUMG2_NO_DOT 
ALPHANUMG2_SET_DOT 

◆ alphanumg2_return_value_t

AlphaNum G 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
ALPHANUMG2_OK 
ALPHANUMG2_ERROR