alphanumg2 2.1.0.0
|
API for configuring and manipulating AlphaNum G 2 Click driver. More...
Topics | |
AlphaNum G 2 Registers Settings | |
Settings for registers of AlphaNum G 2 Click driver. | |
AlphaNum G 2 MikroBUS Map | |
MikroBUS pin mapping of AlphaNum G 2 Click driver. | |
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. | |
API for configuring and manipulating AlphaNum G 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void alphanumg2_cfg_setup | ( | alphanumg2_cfg_t * | cfg | ) |
AlphaNum G 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See alphanumg2_cfg_t object definition for detailed explanation. |
err_t alphanumg2_default_cfg | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 default configuration function.
This function executes a default configuration of AlphaNum G 2 click board.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
This function displays the desired characters and brightness on both 16-segments of the TLC5947, 24-Channel, 12-Bit PWM LED Driver With Internal Oscillator on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
[in] | left_char | : Left segment - ASCII character. |
[in] | left_brightness | : Left segment brightness [0-4095]. |
[in] | right_char | : Right segment - ASCII character. |
[in] | right_brightness | : Right segment brightness [0-4095]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t alphanumg2_generic_read | ( | alphanumg2_t * | ctx, |
uint8_t * | data_out, | ||
uint8_t | len ) |
AlphaNum G 2 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See alphanumg2_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 alphanumg2_generic_write | ( | alphanumg2_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t | len ) |
AlphaNum G 2 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See alphanumg2_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. err_t alphanumg2_init | ( | alphanumg2_t * | ctx, |
alphanumg2_cfg_t * | cfg ) |
AlphaNum G 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See alphanumg2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void alphanumg2_set_char_duration | ( | alphanumg2_t * | ctx, |
uint16_t | duration_ms ) |
AlphaNum G 2 set character duration function.
This function is used to set the character display duration [ms].
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
[in] | duration_ms | : Character display duration [ms]. |
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.
This function sets the LED driver output to control to the 24-channel, constant-current sink by using SPI serial interface of the TLC5947, 24-Channel, 12-Bit PWM LED Driver With Internal Oscillator on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
[in] | seg_bit_mask | : 16-Segment bit mask. |
[in] | seg_dot | : Dot symbol. See alphanumg2_dot_t definition for detailed explanation. |
[in] | brightness | : Brightness [0-4095]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 16-Segment:
U-T-S-R-P-N-M-K-H-G-F-E-D-C-B-A. void alphanumg2_set_outputs_off | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 set outputs OFF function.
This function sets all constant-current outputs forced to turn off of the TLC5947, 24-Channel, 12-Bit PWM LED Driver With Internal Oscillator on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
void alphanumg2_set_outputs_on | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 set outputs ON function.
This function sets all constant current outputs to be controlled by a PWM grayscale time controller of the TLC5947, 24-Channel, 12-Bit PWM LED Driver With Internal Oscillator on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
void alphanumg2_set_seg_left_off | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 set segment left OFF function.
This function is used to turn OFF the left segment of the LTP-3862G, 0.3 inch (7.62 mm) digit height dual digit 16-segment alphanumeric display on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
void alphanumg2_set_seg_left_on | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 set segment left ON function.
This function is used to turn ON the left segment of the LTP-3862G, 0.3 inch (7.62 mm) digit height dual digit 16-segment alphanumeric display on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
void alphanumg2_set_seg_right_off | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 set segment right OFF function.
This function is used to turn OFF the right segment of the LTP-3862G, 0.3 inch (7.62 mm) digit height dual digit 16-segment alphanumeric display on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |
void alphanumg2_set_seg_right_on | ( | alphanumg2_t * | ctx | ) |
AlphaNum G 2 set segment right ON function.
This function is used to turn ON the right segment of the LTP-3862G, 0.3 inch (7.62 mm) digit height dual digit 16-segment alphanumeric display on the AlphaNum G 2 Click board™.
[in] | ctx | : Click context object. See alphanumg2_t object definition for detailed explanation. |