c16x12 2.0.0.0
Functions
Public function

Functions

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

Detailed Description

Function Documentation

◆ c16x12_cfg_setup()

void c16x12_cfg_setup ( c16x12_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ c16x12_default_cfg()

void c16x12_default_cfg ( c16x12_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for 16x12 click.

◆ c16x12_generic_read()

void c16x12_generic_read ( c16x12_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ c16x12_generic_write()

void c16x12_generic_write ( c16x12_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ c16x12_init()

C16X12_RETVAL c16x12_init ( c16x12_t ctx,
c16x12_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ c16x12g_clear_display()

void c16x12g_clear_display ( c16x12_t ctx)

Functions for clear display.

Parameters
ctxClick object.

◆ c16x12g_config_abm()

void c16x12g_config_abm ( c16x12_t ctx,
uint16_t  n_abm,
c16x12_abm_t config 
)

Functions for ABM configuration.

Parameters
ctxClick object.
n_abmNumber of the ABM
configABM structure with new configuration

◆ c16x12g_device_configuration()

void c16x12g_device_configuration ( c16x12_t ctx)

Functions for device configuration.

Parameters
ctxClick object.
Note
Configuration of the device implies setting all LEDs to the OFF state and setting the SDB pin to the ON state

◆ c16x12g_device_reset()

void c16x12g_device_reset ( c16x12_t ctx)

Functions for device reset.

Parameters
ctxClick object.

◆ c16x12g_display_byte()

void c16x12g_display_byte ( c16x12_t ctx,
char  ch 
)

Functions for display one Byte.

Parameters
ctxClick object.
chThe character to be displayed

◆ c16x12g_display_image()

void c16x12g_display_image ( c16x12_t ctx,
uint16_t *  p_image 
)

Functions for display Image.

Parameters
ctxClick object.
p_imageImage buffer

◆ c16x12g_display_text()

void c16x12g_display_text ( c16x12_t ctx,
char *  p_text,
uint8_t  n_char,
uint8_t  speed 
)

Functions for display text with scroll.

Parameters
ctxClick object.
p_textText buffer
n_charNumber of the character in the text
speedSpeed per character in ms

◆ c16x12g_get_interrupt()

uint8_t c16x12g_get_interrupt ( c16x12_t ctx)

Functions for reads interrupt state.

Parameters
ctxClick object.
Return values
Interruptstate on the INT pin

◆ c16x12g_read_reg()

uint8_t c16x12g_read_reg ( c16x12_t ctx,
uint8_t  reg 
)

Functions for read byte from register.

Parameters
ctxClick object.
regRegister which will be read
Return values
onebyte data which is read from the register

◆ c16x12g_select_page()

void c16x12g_select_page ( c16x12_t ctx,
uint8_t  page 
)

Functions for select page.

Parameters
ctxClick object.
pageThe page to be set

◆ c16x12g_set_all_leds()

void c16x12g_set_all_leds ( c16x12_t ctx,
uint8_t  state 
)

Functions for sets all LEDs on the state.

Parameters
ctxClick object.
Note
Use this function when it is necessary to set all LEDs to the state OFF or ON state

◆ c16x12g_set_column_state()

void c16x12g_set_column_state ( c16x12_t ctx,
uint8_t  col,
uint16_t  state,
uint8_t  c_end 
)

Functions for sets column state.

Parameters
ctxClick object.
colColumn - from 1 to 12
state16 bit data - 1 bit is 1 led
c_endA variable that indicates whether after this function the setting of a new column is continued or the end is set to be set and everything that has been set so far should be displayed. (_C16X12G_STOP_SETTINGS or _C16X12G_CONTINUE_SETTINGS)

◆ c16x12g_set_global_current_control()

void c16x12g_set_global_current_control ( c16x12_t ctx,
uint8_t  gcc 
)

Functions for sets global current for all leds.

Parameters
ctxClick object.
gccGl oba current

◆ c16x12g_set_led()

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.

Parameters
ctxClick object.
x_posX poistion of the LEDs (1 is bottom - 12 is up)
y_posY poistion of the LEDs (1 is right - 12 is left)
stateLEDs state (ON or OFF)
c_endA variable that indicates whether after this function the setting of a new LEDs is continued or the end is set to be set and everything that has been set so far should be displayed. (_C16X12G_STOP_SETTINGS or _C16X12G_CONTINUE_SETTINGS)

◆ c16x12g_set_leds_mode()

void c16x12g_set_leds_mode ( c16x12_t ctx,
uint8_t  mode 
)

Functions for sets LEDs mode.

Parameters
ctxClick object.
modeLEDs mode

Options for sets Led mode: _C16X12G_LED_MODE_PWM _C16X12G_LED_MODE_ABM1 _C16X12G_LED_MODE_ABM2 _C16X12G_LED_MODE_ABM3

Note
If PWM led mode is set, it is necessary to call the PWM setting for all LEDs

◆ c16x12g_set_pmw()

void c16x12g_set_pmw ( c16x12_t ctx,
uint8_t  pwm_value 
)

Functions for sets PWM for all LEDs.

Parameters
ctxClick object.
pwm_valuePWM value

◆ c16x12g_set_stand_by()

void c16x12g_set_stand_by ( c16x12_t ctx,
uint8_t  state 
)

Functions for sets SDB pin state.

Parameters
ctxClick object.
stateSDB pin state

◆ c16x12g_start_abm()

void c16x12g_start_abm ( c16x12_t ctx)

Functions for start new ABM configuration.

Parameters
ctxClick object.
ctxClick object.

◆ c16x12g_write_page_byte()

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.

Parameters
ctxClick object.
reg_addrRegister in which the data will be written
reg_valueData which be written in the register
Note
reg_addr contains page(MSB) and registar address (LSB)

◆ c16x12g_write_page_data()

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.

Parameters
ctxClick object.
regStart register in which the data will be written
data_bufData which be written in the registers
n_dataNumber of the data which be written in the registers
Note
reg contains page(MSB) and registar address (LSB)

◆ c16x12g_write_reg()

void c16x12g_write_reg ( c16x12_t ctx,
uint8_t  reg,
uint8_t  c_data 
)

Functions for write one byte in register.

Parameters
ctxClick object.
regRegister in which the data will be written
c_dataData which be written in the register