fan2
2.0.0.0
|
This file contains API for Fan 2 Click driver. More...
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | fan2_t |
Click context object definition. More... | |
struct | fan2_cfg_t |
Click configuration structure definition. More... | |
Enumerations | |
enum | fan2_err_t { FAN2_OK = 0x0, FAN2_ERR_INIT_DRV = 0xFA, FAN2_ERR_UNSUPPORTED_PIN, FAN2_ERR_REG_ADDR, FAN2_ERR_NDATA, FAN2_ERR_TEMP_RANGE, FAN2_ERR_PWM_DUTY_RANGE } |
Click error code definition. More... | |
enum | fan2_i2c_addr_t { FAN2_I2C_ADDR_000 = 0x50, FAN2_I2C_ADDR_001, FAN2_I2C_ADDR_010, FAN2_I2C_ADDR_011, FAN2_I2C_ADDR_100, FAN2_I2C_ADDR_101, FAN2_I2C_ADDR_110, FAN2_I2C_ADDR_111 } |
Click I2C address selection. More... | |
Functions | |
void | fan2_cfg_setup (fan2_cfg_t *cfg) |
Configuration Object Initialization function. More... | |
fan2_err_t | fan2_init (fan2_t *ctx, fan2_cfg_t *cfg) |
Click Initialization function. More... | |
void | fan2_default_cfg (fan2_t *ctx) |
Click Default Configuration function. More... | |
fan2_err_t | fan2_generic_write_byte (fan2_t *ctx, uint8_t reg_addr, uint8_t data_in) |
Generic Byte Write function. More... | |
fan2_err_t | fan2_generic_read_byte (fan2_t *ctx, uint8_t reg_addr, uint8_t *data_out) |
Generic Byte Read function. More... | |
fan2_err_t | fan2_generic_write_word (fan2_t *ctx, uint8_t reg_addr, uint16_t data_in) |
Generic Word Write function. More... | |
fan2_err_t | fan2_generic_read_word (fan2_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Generic Word Read function. More... | |
fan2_err_t | fan2_read_temp (fan2_t *ctx, uint8_t temp_addr, float *temp_cels) |
Temperature Read function. More... | |
fan2_err_t | fan2_write_temp (fan2_t *ctx, uint8_t temp_addr, float temp_cels) |
Temperature Write function. More... | |
fan2_err_t | fan2_read_tacho (fan2_t *ctx, uint8_t tacho_addr, uint16_t *tacho_rpm) |
Tachometer Read function. More... | |
void | fan2_write_tacho_threshold (fan2_t *ctx, uint32_t tacho_rpm) |
Tachometer Threshold Write function. More... | |
fan2_err_t | fan2_direct_speed_control (fan2_t *ctx, float speed_per) |
Direct Fan Speed Control function. More... | |
float | fan2_read_current_speed (fan2_t *ctx) |
Current Fan Speed Read function. More... | |
uint8_t | fan2_status (fan2_t *ctx, uint8_t flag_mask) |
Status Check function. More... | |
fan2_err_t | fan2_write_lut (fan2_t *ctx, uint8_t lut_addr, uint8_t *lut_data, uint8_t n_data) |
Lookup Table Write function. More... | |
void | fan2_sw_reset (fan2_t *ctx) |
Software Reset function. More... | |
uint8_t | fan2_get_alr_pin (fan2_t *ctx) |
Alert Pin Check function. More... | |
uint8_t | fan2_get_shd_pin (fan2_t *ctx) |
Shutdown Pin Check function. More... | |
uint8_t | fan2_get_ff_pin (fan2_t *ctx) |
Fan-Failure Pin Check function. More... | |
uint8_t | fan2_get_int_pin (fan2_t *ctx) |
Fault Pin Check function. More... | |
This file contains API for Fan 2 Click driver.