leddriver14 2.0.0.0
LED Driver 14 Click Driver

API for configuring and manipulating LED Driver 14 Click driver. More...

Topics

 LED Driver 14 Registers Settings
 Settings for registers of LED Driver 14 Click driver.
 
 LED Driver 14 MikroBUS Map
 MikroBUS pin mapping of LED Driver 14 Click driver.
 

Functions

void leddriver14_cfg_setup (leddriver14_cfg_t *cfg)
 LED Driver 14 configuration object setup function.
 
err_t leddriver14_init (leddriver14_t *ctx, leddriver14_cfg_t *cfg)
 LED Driver 14 initialization function.
 
err_t leddriver14_default_cfg (leddriver14_t *ctx)
 LED Driver 14 default configuration function.
 
err_t leddriver14_set_rset (leddriver14_t *ctx, uint8_t rset, uint16_t res_ohm)
 LED Driver 14 set rset function.
 
void leddriver14_rset_write_protect (leddriver14_t *ctx, uint8_t state)
 LED Driver 14 rset write protect function.
 
uint8_t leddriver14_get_int_pin (leddriver14_t *ctx)
 LED Driver 14 get int pin function.
 
err_t leddriver14_set_duty_cycle (leddriver14_t *ctx, float duty_cycle)
 LED Driver 14 sets PWM duty cycle.
 
err_t leddriver14_pwm_stop (leddriver14_t *ctx)
 LED Driver 14 stop PWM module.
 
err_t leddriver14_pwm_start (leddriver14_t *ctx)
 LED Driver 14 start PWM module.
 

Detailed Description

API for configuring and manipulating LED Driver 14 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ leddriver14_cfg_setup()

void leddriver14_cfg_setup ( leddriver14_cfg_t * cfg)

LED Driver 14 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See leddriver14_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ leddriver14_default_cfg()

err_t leddriver14_default_cfg ( leddriver14_t * ctx)

LED Driver 14 default configuration function.

This function executes a default configuration of LED Driver 14 click board.

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ leddriver14_get_int_pin()

uint8_t leddriver14_get_int_pin ( leddriver14_t * ctx)

LED Driver 14 get int pin function.

This function returns the int pin logic state.

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
Returns
  • 0 - Abnormality such as LED Open or the OUTx pin short circuit occured,
  • 1 - Normal operation.
Note
None.

◆ leddriver14_init()

err_t leddriver14_init ( leddriver14_t * ctx,
leddriver14_cfg_t * cfg )

LED Driver 14 initialization function.

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

Parameters
[out]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See leddriver14_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ leddriver14_pwm_start()

err_t leddriver14_pwm_start ( leddriver14_t * ctx)

LED Driver 14 start PWM module.

This function starts the PWM module output.

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ leddriver14_pwm_stop()

err_t leddriver14_pwm_stop ( leddriver14_t * ctx)

LED Driver 14 stop PWM module.

This function stops the PWM module output.

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ leddriver14_rset_write_protect()

void leddriver14_rset_write_protect ( leddriver14_t * ctx,
uint8_t state )

LED Driver 14 rset write protect function.

This function sets the write protect pin logic state.

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
[in]state:
  • 0 - Enable write protect,
  • 1 - Disable write protect.
Returns
None.
Note
None.

◆ leddriver14_set_duty_cycle()

err_t leddriver14_set_duty_cycle ( leddriver14_t * ctx,
float duty_cycle )

LED Driver 14 sets PWM duty cycle.

This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
[in]duty_cycle: PWM duty cycle.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ leddriver14_set_rset()

err_t leddriver14_set_rset ( leddriver14_t * ctx,
uint8_t rset,
uint16_t res_ohm )

LED Driver 14 set rset function.

This function sets the resistance of the selected rset channel.

Parameters
[in]ctx: Click context object. See leddriver14_t object definition for detailed explanation.
[in]rset: Rset channel [0-3].
[in]res_ohm: Resistance in Ohm [0-24000].
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.