c7seg2 2.1.0.0
|
API for configuring and manipulating 7-SEG 2 Click driver. More...
Topics | |
7-SEG 2 Registers List | |
List of registers of 7-SEG 2 Click driver. | |
7-SEG 2 Registers Settings | |
Settings for registers of 7-SEG 2 Click driver. | |
7-SEG 2 MikroBUS Map | |
MikroBUS pin mapping of 7-SEG 2 Click driver. | |
Functions | |
void | c7seg2_cfg_setup (c7seg2_cfg_t *cfg) |
7-SEG 2 configuration object setup function. | |
err_t | c7seg2_init (c7seg2_t *ctx, c7seg2_cfg_t *cfg) |
7-SEG 2 initialization function. | |
err_t | c7seg2_sw_reset (c7seg2_t *ctx) |
7-SEG 2 software reset function. | |
err_t | c7seg2_default_cfg (c7seg2_t *ctx) |
7-SEG 2 default configuration function. | |
err_t | c7seg2_generic_write (c7seg2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
7-SEG 2 I2C writing function. | |
err_t | c7seg2_generic_read (c7seg2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
7-SEG 2 I2C reading function. | |
uint8_t | c7seg2_get_int_pin (c7seg2_t *ctx) |
7-SEG 2 get interrupt pin state function. | |
err_t | c7seg2_write_reg (c7seg2_t *ctx, uint8_t reg, uint8_t data_in) |
7-SEG 2 I2C register writing function. | |
err_t | c7seg2_read_reg (c7seg2_t *ctx, uint8_t reg, uint8_t *data_out) |
7-SEG 2 I2C register reading function. | |
err_t | c7seg2_set_segments_current (c7seg2_t *ctx, float current_val) |
7-SEG 2 set segments current value function. | |
err_t | c7seg2_write_segment (c7seg2_t *ctx, uint8_t segment, uint8_t number, uint8_t dpt) |
7-SEG 2 single segment writing function. | |
err_t | c7seg2_disable_segments (c7seg2_t *ctx) |
7-SEG 2 disable segments function. | |
err_t | c7seg2_write_number (c7seg2_t *ctx, uint16_t number, uint8_t dpt) |
7-SEG 2 number writing function. | |
API for configuring and manipulating 7-SEG 2 Click driver.
7-SEG 2 Click segment number.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
Predefined enum values for segment number values.
API for configuring and manipulating 7-SEG 2 Click driver.
void c7seg2_cfg_setup | ( | c7seg2_cfg_t * | cfg | ) |
7-SEG 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c7seg2_cfg_t object definition for detailed explanation. |
err_t c7seg2_default_cfg | ( | c7seg2_t * | ctx | ) |
7-SEG 2 default configuration function.
This function executes a default configuration of 7-SEG 2 click board.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_disable_segments | ( | c7seg2_t * | ctx | ) |
7-SEG 2 disable segments function.
This function is used to disable channel output.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_generic_read | ( | c7seg2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
7-SEG 2 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_generic_write | ( | c7seg2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
7-SEG 2 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t c7seg2_get_int_pin | ( | c7seg2_t * | ctx | ) |
7-SEG 2 get interrupt pin state function.
This function reads an interrupt pin state.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
err_t c7seg2_init | ( | c7seg2_t * | ctx, |
c7seg2_cfg_t * | cfg ) |
7-SEG 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c7seg2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_read_reg | ( | c7seg2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
7-SEG 2 I2C register reading function.
This function reads a byte of data in the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Data to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_set_segments_current | ( | c7seg2_t * | ctx, |
float | current_val ) |
7-SEG 2 set segments current value function.
This function is used to set the current value of the segment's leds.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | current_val | : Current value in mA [up to 20mA]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_sw_reset | ( | c7seg2_t * | ctx | ) |
7-SEG 2 software reset function.
This function is used to perform a software reset.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_write_number | ( | c7seg2_t * | ctx, |
uint16_t | number, | ||
uint8_t | dpt ) |
7-SEG 2 number writing function.
This function is used to write a number [0..999] to a selected segment [0..2] with or w/o a decimal pointer.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | number | : Number to be displayed [0..999]. |
[in] | dpt | : Decimal point [1..3], [0] if none. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_write_reg | ( | c7seg2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
7-SEG 2 I2C register writing function.
This function writes a byte of data in the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c7seg2_write_segment | ( | c7seg2_t * | ctx, |
uint8_t | segment, | ||
uint8_t | number, | ||
uint8_t | dpt ) |
7-SEG 2 single segment writing function.
This function is used to write a number [0..9] to a selected segment [0..2] with or w/o a decimal pointer.
[in] | ctx | : Click context object. See c7seg2_t object definition for detailed explanation. |
[in] | segment | : Segment number [0..2]. |
[in] | number | : Number to be displayed [0..9]. |
[in] | dpt | : Decimal point [0..1]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.