|
solidswitch9 2.2.0
|
API for configuring and manipulating SolidSwitch 9 Click driver. More...
Topics | |
| SolidSwitch 9 Registers List | |
| List of registers of SolidSwitch 9 Click driver. | |
| SolidSwitch 9 Registers Settings | |
| Settings for registers of SolidSwitch 9 Click driver. | |
| SolidSwitch 9 MikroBUS Map | |
| MikroBUS pin mapping of SolidSwitch 9 Click driver. | |
Functions | |
| void | solidswitch9_cfg_setup (solidswitch9_cfg_t *cfg) |
| SolidSwitch 9 configuration object setup function. | |
| err_t | solidswitch9_init (solidswitch9_t *ctx, solidswitch9_cfg_t *cfg) |
| SolidSwitch 9 initialization function. | |
| err_t | solidswitch9_default_cfg (solidswitch9_t *ctx) |
| SolidSwitch 9 default configuration function. | |
| err_t | solidswitch9_write_reg (solidswitch9_t *ctx, uint8_t reg, uint16_t data_in) |
| SolidSwitch 9 write register function. | |
| err_t | solidswitch9_read_reg (solidswitch9_t *ctx, uint8_t reg, uint16_t *data_out) |
| SolidSwitch 9 read register function. | |
| err_t | solidswitch9_read_reg_clear (solidswitch9_t *ctx, uint8_t reg, uint16_t *data_out) |
| SolidSwitch 9 read and clear register function. | |
| err_t | solidswitch9_read_rom (solidswitch9_t *ctx, uint8_t addr, uint8_t *data_out) |
| SolidSwitch 9 read ROM function. | |
| err_t | solidswitch9_set_duty_cycle (solidswitch9_t *ctx, float duty_cycle) |
| SolidSwitch 9 sets PWM duty cycle. | |
| err_t | solidswitch9_pwm_stop (solidswitch9_t *ctx) |
| SolidSwitch 9 stop PWM module. | |
| err_t | solidswitch9_pwm_start (solidswitch9_t *ctx) |
| SolidSwitch 9 start PWM module. | |
| void | solidswitch9_set_di0_pin (solidswitch9_t *ctx, uint8_t state) |
| SolidSwitch 9 set DI0 pin function. | |
| void | solidswitch9_set_di1_pin (solidswitch9_t *ctx, uint8_t state) |
| SolidSwitch 9 set DI1 pin function. | |
| err_t | solidswitch9_sw_reset (solidswitch9_t *ctx) |
| SolidSwitch 9 software reset function. | |
| err_t | solidswitch9_clear_all_status (solidswitch9_t *ctx) |
| SolidSwitch 9 clear all status function. | |
| err_t | solidswitch9_check_info (solidswitch9_t *ctx) |
| SolidSwitch 9 check information function. | |
| err_t | solidswitch9_unlock_write (solidswitch9_t *ctx) |
| SolidSwitch 9 unlock write function. | |
| err_t | solidswitch9_set_out_duty (solidswitch9_t *ctx, uint8_t out_mask, uint16_t duty) |
| SolidSwitch 9 set output duty function. | |
| err_t | solidswitch9_enable_out (solidswitch9_t *ctx, uint8_t out_mask) |
| SolidSwitch 9 enable outputs function. | |
API for configuring and manipulating SolidSwitch 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void solidswitch9_cfg_setup | ( | solidswitch9_cfg_t * | cfg | ) |
SolidSwitch 9 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See solidswitch9_cfg_t object definition for detailed explanation. |
| err_t solidswitch9_check_info | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 check information function.
This function checks the basic device information (company code, family, product code).
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t solidswitch9_clear_all_status | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 clear all status function.
This function clears all status registers on the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t solidswitch9_default_cfg | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 default configuration function.
This function executes a default configuration of SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t solidswitch9_enable_out | ( | solidswitch9_t * | ctx, |
| uint8_t | out_mask ) |
SolidSwitch 9 enable outputs function.
This function enables the selected outputs.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | out_mask | : Output mask to enable channels. |
0 - Success, -1 - Error. | err_t solidswitch9_init | ( | solidswitch9_t * | ctx, |
| solidswitch9_cfg_t * | cfg ) |
SolidSwitch 9 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See solidswitch9_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t solidswitch9_pwm_start | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 start PWM module.
This function starts the PWM module output.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t solidswitch9_pwm_stop | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 stop PWM module.
This function stops the PWM module output.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t solidswitch9_read_reg | ( | solidswitch9_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t * | data_out ) |
SolidSwitch 9 read register function.
This function reads a 16-bit data value from the specified register of the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Pointer to memory where read data will be stored. |
0 - Success, -1 - Error. | err_t solidswitch9_read_reg_clear | ( | solidswitch9_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t * | data_out ) |
SolidSwitch 9 read and clear register function.
This function reads and clears a 16-bit register from the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Pointer to memory where read data will be stored. |
0 - Success, -1 - Error. | err_t solidswitch9_read_rom | ( | solidswitch9_t * | ctx, |
| uint8_t | addr, | ||
| uint8_t * | data_out ) |
SolidSwitch 9 read ROM function.
This function reads an 8-bit value from the ROM address of the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | addr | : ROM address. |
| [out] | data_out | : Pointer to memory where read data will be stored. |
0 - Success, -1 - Error. | void solidswitch9_set_di0_pin | ( | solidswitch9_t * | ctx, |
| uint8_t | state ) |
SolidSwitch 9 set DI0 pin function.
This function sets the logic state of the DI0 pin.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void solidswitch9_set_di1_pin | ( | solidswitch9_t * | ctx, |
| uint8_t | state ) |
SolidSwitch 9 set DI1 pin function.
This function sets the logic state of the DI1 pin.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| err_t solidswitch9_set_duty_cycle | ( | solidswitch9_t * | ctx, |
| float | duty_cycle ) |
SolidSwitch 9 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | duty_cycle | : PWM duty cycle. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t solidswitch9_set_out_duty | ( | solidswitch9_t * | ctx, |
| uint8_t | out_mask, | ||
| uint16_t | duty ) |
SolidSwitch 9 set output duty function.
This function sets the output duty cycle for the selected output channels.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | out_mask | : Output mask to select channels. |
| [in] | duty | : Output duty cycle (0-1023). |
0 - Success, -1 - Error. | err_t solidswitch9_sw_reset | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 software reset function.
This function performs a software reset of the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t solidswitch9_unlock_write | ( | solidswitch9_t * | ctx | ) |
SolidSwitch 9 unlock write function.
This function unlocks protected register writing on the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t solidswitch9_write_reg | ( | solidswitch9_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t | data_in ) |
SolidSwitch 9 write register function.
This function writes a 16-bit data value to the specified register of the SolidSwitch 9 Click board.
| [in] | ctx | : Click context object. See solidswitch9_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error.