c16x12 2.0.0.0
c16x12.h File Reference

This file contains API for 16x12 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  c16x12_t
 Click ctx object definition. More...
 
struct  c16x12_cfg_t
 Click configuration structure definition. More...
 
struct  c16x12_abm_t
 ABM structure definition. More...
 

Macros

#define C16X12_MAP_MIKROBUS(cfg, mikrobus)
 
#define C16X12_RETVAL   uint8_t
 
#define C16X12_OK   0x00
 
#define C16X12_INIT_ERROR   0xFF
 
#define C16X12G_PSR   0xFD
 
#define C16X12G_PSWL   0xFE
 
#define C16X12G_IMR   0xF0
 
#define C16X12G_ISR   0xF1
 
#define C16X12G_PSWL_DISABLE   0x00
 
#define C16X12G_PSWL_ENABLE   0xC5
 
#define C16X12G_IMR_IAC   0x08
 
#define C16X12G_IMR_IAB   0x04
 
#define C16X12G_IMR_IS   0x02
 
#define C16X12G_IMR_IO   0x01
 
#define C16X12G_ISR_ABM3   0x10
 
#define C16X12G_ISR_ABM2   0x08
 
#define C16X12G_ISR_ABM1   0x04
 
#define C16X12G_ISR_SB   0x02
 
#define C16X12G_ISR_OB   0x01
 
#define C16X12G_CR_SYNC_MASTER   0x40
 
#define C16X12G_CR_SYNC_SLAVE   0x80
 
#define C16X12G_CR_OSD   0x04
 
#define C16X12G_CR_BEN   0x02
 
#define C16X12G_CR_SSD   0x01
 
#define C16X12G_LEDONOFF   0x0000
 
#define C16X12G_LEDOPEN   0x0018
 
#define C16X12G_LEDSHORT   0x0030
 
#define C16X12G_LEDPWM   0x0100
 
#define C16X12G_LEDABM   0x0200
 
#define C16X12G_CR   0x0300
 
#define C16X12G_GCC   0x0301
 
#define C16X12G_ABM1   0x0302
 
#define C16X12G_ABM2   0x0306
 
#define C16X12G_ABM3   0x030A
 
#define C16X12G_TUR   0x030E
 
#define C16X12G_SWPUR   0x030F
 
#define C16X12G_CSPDR   0x0310
 
#define C16X12G_RESET   0x0311
 
#define C16X12G_CS   16
 
#define C16X12G_SW   12
 
#define C16X12G_GND_ADDR   0x00
 
#define C16X12G_SCL_ADDR   0x01
 
#define C16X12G_SDA_ADDR   0x02
 
#define C16X12G_VCC_ADDR   0x03
 
#define C16X12G_ABM_LOOP_TIMES_MAX   0x0FFF
 
#define C16X12G_ABM_LOOP_FOREVER   0x0000
 
#define C16X12G_LED_STATE_OFF   0x00
 
#define C16X12G_LED_STATE_ON   0x01
 
#define C16X12G_CONTINUE_SETTINGS   0x00
 
#define C16X12G_STOP_SETTINGS   0x01
 
#define C16X12G_LED_STATUS_NORMAL   0x00
 
#define C16X12G_LED_STATUS_OPEN   0x01
 
#define C16X12G_LED_STATUS_SHORT   0x02
 
#define C16X12G_LED_STATUS_UNKNOWN   0x03
 
#define C16X12G_RESISTOR_OFF   0x00
 
#define C16X12G_RESISTOR_500   0x01
 
#define C16X12G_RESISTOR_1K   0x02
 
#define C16X12G_RESISTOR_2K   0x03
 
#define C16X12G_RESISTOR_4K   0x04
 
#define C16X12G_RESISTOR_8K   0x05
 
#define C16X12G_RESISTOR_16K   0x06
 
#define C16X12G_RESISTOR_32K   0x07
 
#define C16X12G_LED_MODE_PWM   0x00
 
#define C16X12G_LED_MODE_ABM1   0x01
 
#define C16X12G_LED_MODE_ABM2   0x02
 
#define C16X12G_LED_MODE_ABM3   0x03
 
#define C16X12G_ABM_T1_210MS   0x00
 
#define C16X12G_ABM_T1_420MS   0x20
 
#define C16X12G_ABM_T1_840MS   0x40
 
#define C16X12G_ABM_T1_1680MS   0x60
 
#define C16X12G_ABM_T1_3360MS   0x80
 
#define C16X12G_ABM_T1_6720MS   0xA0
 
#define C16X12G_ABM_T1_13440MS   0xC0
 
#define C16X12G_ABM_T1_26880MS   0xE0
 
#define C16X12G_ABM_T2_0MS   0x00
 
#define C16X12G_ABM_T2_210MS   0x02
 
#define C16X12G_ABM_T2_420MS   0x04
 
#define C16X12G_ABM_T2_840MS   0x06
 
#define C16X12G_ABM_T2_1680MS   0x08
 
#define C16X12G_ABM_T2_3360MS   0x0A
 
#define C16X12G_ABM_T2_6720MS   0x0C
 
#define C16X12G_ABM_T2_13440MS   0x0E
 
#define C16X12G_ABM_T2_26880MS   0x10
 
#define C16X12G_ABM_T3_210MS   0x00
 
#define C16X12G_ABM_T3_420MS   0x20
 
#define C16X12G_ABM_T3_840MS   0x40
 
#define C16X12G_ABM_T3_1680MS   0x60
 
#define C16X12G_ABM_T3_3360MS   0x80
 
#define C16X12G_ABM_T3_6720MS   0xA0
 
#define C16X12G_ABM_T3_13440MS   0xC0
 
#define C16X12G_ABM_T3_26880MS   0xE0
 
#define C16X12G_ABM_T4_0MS   0x00
 
#define C16X12G_ABM_T4_210MS   0x02
 
#define C16X12G_ABM_T4_420MS   0x04
 
#define C16X12G_ABM_T4_840MS   0x06
 
#define C16X12G_ABM_T4_1680MS   0x08
 
#define C16X12G_ABM_T4_3360MS   0x0A
 
#define C16X12G_ABM_T4_6720MS   0x0C
 
#define C16X12G_ABM_T4_13440MS   0x0E
 
#define C16X12G_ABM_T4_26880MS   0x10
 
#define C16X12G_ABM_T4_53760MS   0x12
 
#define C16X12G_ABM_T4_107520MS   0x14
 
#define C16X12G_ABM_LOOP_BEGIN_T1   0x00
 
#define C16X12G_ABM_LOOP_BEGIN_T2   0x10
 
#define C16X12G_ABM_LOOP_BEGIN_T3   0x20
 
#define C16X12G_ABM_LOOP_BEGIN_T4   0x30
 
#define C16X12G_ABM_LOOP_END_T3   0x00
 
#define C16X12G_ABM_LOOP_END_T1   0x40
 
#define C16X12G_ABM_NUM_1   0x0302
 
#define C16X12G_ABM_NUM_2   0x0306
 
#define C16X12G_ABM_NUM_3   0x030A
 

Functions

void c16x12_cfg_setup (c16x12_cfg_t *cfg)
 Config Object Initialization function.
 
C16X12_RETVAL c16x12_init (c16x12_t *ctx, c16x12_cfg_t *cfg)
 Initialization function.
 
void c16x12_default_cfg (c16x12_t *ctx)
 Click Default Configuration function.
 
void c16x12_generic_write (c16x12_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void c16x12_generic_read (c16x12_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void c16x12g_write_reg (c16x12_t *ctx, uint8_t reg, uint8_t c_data)
 Functions for write one byte in register.
 
void c16x12g_select_page (c16x12_t *ctx, uint8_t page)
 Functions for select page.
 
void c16x12g_write_page_byte (c16x12_t *ctx, uint16_t reg_addr, uint8_t reg_value)
 Functions for write one byte in register with select page.
 
void c16x12g_write_page_data (c16x12_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t n_data)
 Functions for write n byte in registers with select page.
 
uint8_t c16x12g_read_reg (c16x12_t *ctx, uint8_t reg)
 Functions for read byte from register.
 
void c16x12g_set_stand_by (c16x12_t *ctx, uint8_t state)
 Functions for sets SDB pin state.
 
void c16x12g_device_reset (c16x12_t *ctx)
 Functions for device reset.
 
uint8_t c16x12g_get_interrupt (c16x12_t *ctx)
 Functions for reads interrupt state.
 
void c16x12g_device_configuration (c16x12_t *ctx)
 Functions for device configuration.
 
void c16x12g_set_all_leds (c16x12_t *ctx, uint8_t state)
 Functions for sets all LEDs on the state.
 
void c16x12g_set_global_current_control (c16x12_t *ctx, uint8_t gcc)
 Functions for sets global current for all leds.
 
void c16x12g_clear_display (c16x12_t *ctx)
 Functions for clear display.
 
void c16x12g_set_column_state (c16x12_t *ctx, uint8_t col, uint16_t state, uint8_t c_end)
 Functions for sets column state.
 
void c16x12g_set_leds_mode (c16x12_t *ctx, uint8_t mode)
 Functions for sets LEDs mode.
 
void c16x12g_set_pmw (c16x12_t *ctx, uint8_t pwm_value)
 Functions for sets PWM for all LEDs.
 
void c16x12g_set_led (c16x12_t *ctx, uint8_t x_pos, uint8_t y_pos, uint8_t state, uint8_t c_end)
 Functions for sets LEDs state.
 
void c16x12g_display_byte (c16x12_t *ctx, char ch)
 Functions for display one Byte.
 
void c16x12g_display_image (c16x12_t *ctx, uint16_t *p_image)
 Functions for display Image.
 
void c16x12g_display_text (c16x12_t *ctx, char *p_text, uint8_t n_char, uint8_t speed)
 Functions for display text with scroll.
 
void c16x12g_config_abm (c16x12_t *ctx, uint16_t n_abm, c16x12_abm_t *config)
 Functions for ABM configuration.
 
void c16x12g_start_abm (c16x12_t *ctx)
 Functions for start new ABM configuration.
 

Detailed Description

This file contains API for 16x12 Click driver.

Macro Definition Documentation

◆ C16X12G_ABM_LOOP_FOREVER

#define C16X12G_ABM_LOOP_FOREVER   0x0000

◆ C16X12G_ABM_LOOP_TIMES_MAX

#define C16X12G_ABM_LOOP_TIMES_MAX   0x0FFF

◆ C16X12G_CS

#define C16X12G_CS   16

◆ C16X12G_GND_ADDR

#define C16X12G_GND_ADDR   0x00

◆ C16X12G_SCL_ADDR

#define C16X12G_SCL_ADDR   0x01

◆ C16X12G_SDA_ADDR

#define C16X12G_SDA_ADDR   0x02

◆ C16X12G_SW

#define C16X12G_SW   12

◆ C16X12G_VCC_ADDR

#define C16X12G_VCC_ADDR   0x03