fan6 2.0.0.0
|
Functions | |
void | fan6_cfg_setup (fan6_cfg_t *cfg) |
Config Object Initialization function. | |
FAN6_RETVAL | fan6_init (fan6_t *ctx, fan6_cfg_t *cfg) |
Initialization function. | |
void | fan6_default_cfg (fan6_t *ctx) |
Click Default Configuration function. | |
void | fan6_generic_write (fan6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | fan6_generic_read (fan6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | fan6_write_reg (fan6_t *ctx, const uint8_t register_address, const uint16_t transfer_data) |
Generic write function. | |
uint16_t | fan6_read_reg (fan6_t *ctx, const uint8_t register_address) |
Generic read function. | |
uint8_t | fan6_receive_byte (fan6_t *ctx, const uint8_t register_address) |
Byte receive function. | |
void | fan6_read_eeprom (fan6_t *ctx, uint8_t *data_out) |
EEPROM read function. | |
void | fan6_set_pwm_mode (fan6_t *ctx, const uint8_t pwm_duty) |
PWM mode set function. | |
void | fan6_set_fan_speed_con_mode (fan6_t *ctx, const uint8_t minimum_drive, const uint8_t tach_count, const uint16_t tach_target) |
Fan Speed Control Mode Set function. | |
void | fan6_set_pwm_lut_mode (fan6_t *ctx, const uint8_t tach_count) |
Set PWM With LUT Mode function. | |
void | fan6_set_fsc_lut_mode (fan6_t *ctx, const uint8_t minimum_drive, const uint8_t tach_count) |
Set FSC With LUT Mode function. | |
uint32_t | fan6_read_tachometer (fan6_t *ctx) |
Tachometer Read function. | |
float | fan6_get_temperature (fan6_t *ctx, const uint8_t temp_address) |
Temperature Get function. | |
void | fan6_push_temperature (fan6_t *ctx, const uint8_t temp_address, const uint8_t temp_selection) |
Temperature Push function. | |
void | fan6_enable_device (fan6_t *ctx, const uint8_t state) |
Device Enable function. | |
uint8_t | fan6_indicate_critical_thermal_shutdown (fan6_t *ctx) |
Interrupt Pin Get function. | |
uint8_t | fan6_get_gpio_2 (fan6_t *ctx) |
GPIO 2 Get function. | |
void | fan6_set_gpio_1 (fan6_t *ctx, const uint8_t state) |
GPIO 1 Set function. | |
void fan6_cfg_setup | ( | fan6_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void fan6_default_cfg | ( | fan6_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Fan6 click.
void fan6_enable_device | ( | fan6_t * | ctx, |
const uint8_t | state ) |
Device Enable function.
ctx | Click object. |
state | State. |
@description This function can enable or disable device.
void fan6_generic_read | ( | fan6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void fan6_generic_write | ( | fan6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t fan6_get_gpio_2 | ( | fan6_t * | ctx | ) |
GPIO 2 Get function.
ctx | Click object. |
@description This function gets GPIO 2 state.
float fan6_get_temperature | ( | fan6_t * | ctx, |
const uint8_t | temp_address ) |
Temperature Get function.
ctx | Click object. |
temp_address | Address where temperature is stored. |
temp_sign | Determines sign of temperature. |
@description This function can read anyone positive or negative temperature value, from external or internal diode.
uint8_t fan6_indicate_critical_thermal_shutdown | ( | fan6_t * | ctx | ) |
Interrupt Pin Get function.
ctx | Click object. |
@description This function gets interrupt pin.
FAN6_RETVAL fan6_init | ( | fan6_t * | ctx, |
fan6_cfg_t * | cfg ) |
Initialization function.
fan6 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void fan6_push_temperature | ( | fan6_t * | ctx, |
const uint8_t | temp_address, | ||
const uint8_t | temp_selection ) |
Temperature Push function.
ctx | Click object. |
temp_address | Address where temperature which be pushed is stored. |
temp_selection | Address where tempereture be pushed. |
@description This function pushes desired temperature value in Temperature 1 or Temperature 2 Pushed register.
void fan6_read_eeprom | ( | fan6_t * | ctx, |
uint8_t * | data_out ) |
EEPROM read function.
ctx | Click object. |
data_out | Buffer where data be stored. |
@description This function reads 256 bytes from EEPROM.
uint16_t fan6_read_reg | ( | fan6_t * | ctx, |
const uint8_t | register_address ) |
Generic read function.
ctx | Click object. |
register_address | Register address. |
@description This function reads 16-bit or 8-bit data from register.
uint32_t fan6_read_tachometer | ( | fan6_t * | ctx | ) |
Tachometer Read function.
ctx | Click object. |
@description This function reads current tachometer value and calculates that value in rpm.
uint8_t fan6_receive_byte | ( | fan6_t * | ctx, |
const uint8_t | register_address ) |
Byte receive function.
ctx | Click object. |
register_address | Register address. |
@description This function sends register address and reads byte from that address, without writting address again, every time when function be called.
void fan6_set_fan_speed_con_mode | ( | fan6_t * | ctx, |
const uint8_t | minimum_drive, | ||
const uint8_t | tach_count, | ||
const uint16_t | tach_target ) |
Fan Speed Control Mode Set function.
ctx | Click object. |
minimumDrive | Minimum drive setting for the RPM. |
tach_count | Maximum TACH Reading register value. |
tach_target | The target tachometer value that is maintained by the RPM. |
@description This function sets Fan on Fan Speed Control (FSC) mode and determines minimum drive setting for the RPM, maximum TACH Reading register value and the target tachometer value that is maintained by the RPM.
void fan6_set_fsc_lut_mode | ( | fan6_t * | ctx, |
const uint8_t | minimum_drive, | ||
const uint8_t | tach_count ) |
Set FSC With LUT Mode function.
ctx | Click object. |
minimum_drive | Minimum drive setting for the RPM. |
tach_count | Maximum TACH Reading register value. |
@description This function sets Fan on FSC with LUT mode and determines maximum TACH Reading register value and minimum drive setting for the RPM.
void fan6_set_gpio_1 | ( | fan6_t * | ctx, |
const uint8_t | state ) |
GPIO 1 Set function.
ctx | Click object. |
@description This function sets GPIO 1 on desired state when he is configured as input pin.
void fan6_set_pwm_lut_mode | ( | fan6_t * | ctx, |
const uint8_t | tach_count ) |
Set PWM With LUT Mode function.
ctx | Click object. |
tach_count | Maximum TACH Reading register value. |
@description This function sets Fan on PWM with Look Up Table (LUT) mode and determines maximum TACH Reading register value.
void fan6_set_pwm_mode | ( | fan6_t * | ctx, |
const uint8_t | pwm_duty ) |
PWM mode set function.
ctx | Click object. |
pwm_duty | Value which determines Fan speed. |
@description This function sets Fan on PWM mode and determines Fan speed (PWM duty).
void fan6_write_reg | ( | fan6_t * | ctx, |
const uint8_t | register_address, | ||
const uint16_t | transfer_data ) |
Generic write function.
ctx | Click object. |
register_address | Register address. |
transfer_data | Data which be written. |
@description This function writes 16-bit or 8-bit data to register.