antopwm2 2.1.0.0
|
This file contains API for AN to PWM 2 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | antopwm2_t |
AN to PWM 2 Click context object. More... | |
struct | antopwm2_cfg_t |
AN to PWM 2 Click configuration object. More... | |
Macros | |
#define | ANTOPWM2_OTP_BIT 0x80 |
AN to PWM 2 digipot register setting. | |
#define | ANTOPWM2_STATUS_READY 0x00 |
#define | ANTOPWM2_STATUS_TEST_FUSE 0x40 |
#define | ANTOPWM2_STATUS_FATAL_ERROR 0x80 |
#define | ANTOPWM2_STATUS_OTP_SUCCESS 0xC0 |
#define | ANTOPWM2_STATUS_MASK 0xC0 |
#define | ANTOPWM2_DIGIPOT_WIPER_MAX 0x3F |
AN to PWM 2 digipot setting. | |
#define | ANTOPWM2_DIGIPOT_R6 49900u |
#define | ANTOPWM2_DIGIPOT_WIPER_RES 60 |
#define | ANTOPWM2_DIGIPOT_MAX_RES 50000u |
#define | ANTOPWM2_FREQ_MAX 1000000ul |
AN to PWM 2 setting. | |
#define | ANTOPWM2_FREQ_MIN 500000ul |
#define | ANTOPWM2_RSET_REF 50000u |
#define | ANTOPWM2_NDIV 1 |
#define | ANTOPWM2_DEVICE_ADDRESS 0x2C |
AN to PWM 2 device address setting. | |
#define | ANTOPWM2_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | antopwm2_return_value_t { ANTOPWM2_OK = 0 , ANTOPWM2_ERROR = -1 } |
AN to PWM 2 Click return value data. More... | |
Functions | |
void | antopwm2_cfg_setup (antopwm2_cfg_t *cfg) |
AN to PWM 2 configuration object setup function. | |
err_t | antopwm2_init (antopwm2_t *ctx, antopwm2_cfg_t *cfg) |
AN to PWM 2 initialization function. | |
err_t | antopwm2_set_digipot (antopwm2_t *ctx, uint8_t wiper) |
AN to PWM 2 set digipot function. | |
err_t | antopwm2_read_digipot (antopwm2_t *ctx, uint8_t *data_out) |
AN to PWM 2 read digipot function. | |
err_t | antopwm2_set_digipot_otp (antopwm2_t *ctx, uint8_t wiper) |
AN to PWM 2 set digipot otp function. | |
err_t | antopwm2_set_frequency (antopwm2_t *ctx, uint32_t freq) |
AN to PWM 2 set frequency function. | |
err_t | antopwm2_set_frequency_otp (antopwm2_t *ctx, uint32_t freq) |
AN to PWM 2 set frequency otp function. | |
uint8_t | antopwm2_get_int_pin (antopwm2_t *ctx) |
AN to PWM 2 get int pin function. | |
This file contains API for AN to PWM 2 Click Driver.