OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "libutil.h"
#include <logging/log.h>
#include <nct7363.h>
#include <string.h>
#include <math.h>
#include <sys/util.h>
Macros | |
#define | NCT7363_PIN_NUMBER 16 |
#define | NCT7363_PIN_FUNC_REG_SIZE 4 |
#define | NCT7363_REG_SIZE 8 |
#define | FREQUENCY_DIVEL_0_RANGE_MAX 62500 |
#define | FREQUENCY_DIVEL_0_RANGE_MIN 488.28125 |
#define | FREQUENCY_DIVEL_1_RANGE_MAX 244.14 |
#define | FREQUENCY_DIVEL_1_RANGE_MIN 1.907 |
#define | NCT7363_FAN_LSB_MASK BIT_MASK(5) |
#define | NCT7363_GPIO_LSB_MASK BIT_MASK(8) |
#define | MAX_THRESHOLD_VAL 0x1FFF |
#define | FAN_COUNT_DEFAULT_VAL 0x1FFF |
Functions | |
LOG_MODULE_REGISTER (dev_nct7363) | |
bool | nct7363_read_back_data (sensor_cfg *cfg, uint8_t reading_offset, uint8_t *val) |
bool | nct7363_set_threshold (sensor_cfg *cfg, uint16_t threshold) |
bool | nct7363_set_duty (sensor_cfg *cfg, uint8_t duty, uint8_t port) |
bool | nct7363_write (sensor_cfg *cfg, uint8_t offset, uint8_t val) |
bool | nct7363_setting_wdt (sensor_cfg *cfg, uint8_t wdt) |
bool | nct7363_set_frequency (sensor_cfg *cfg, float frequency) |
uint8_t | nct7363_init (sensor_cfg *cfg) |
#define FAN_COUNT_DEFAULT_VAL 0x1FFF |
#define FREQUENCY_DIVEL_0_RANGE_MAX 62500 |
#define FREQUENCY_DIVEL_0_RANGE_MIN 488.28125 |
#define FREQUENCY_DIVEL_1_RANGE_MAX 244.14 |
#define FREQUENCY_DIVEL_1_RANGE_MIN 1.907 |
#define MAX_THRESHOLD_VAL 0x1FFF |
#define NCT7363_FAN_LSB_MASK BIT_MASK(5) |
#define NCT7363_GPIO_LSB_MASK BIT_MASK(8) |
#define NCT7363_PIN_FUNC_REG_SIZE 4 |
#define NCT7363_PIN_NUMBER 16 |
#define NCT7363_REG_SIZE 8 |
LOG_MODULE_REGISTER | ( | dev_nct7363 | ) |
uint8_t nct7363_init | ( | sensor_cfg * | cfg | ) |
bool nct7363_read_back_data | ( | sensor_cfg * | cfg, |
uint8_t | reading_offset, | ||
uint8_t * | val | ||
) |
bool nct7363_set_duty | ( | sensor_cfg * | cfg, |
uint8_t | duty, | ||
uint8_t | port | ||
) |
bool nct7363_set_frequency | ( | sensor_cfg * | cfg, |
float | frequency | ||
) |
bool nct7363_set_threshold | ( | sensor_cfg * | cfg, |
uint16_t | threshold | ||
) |
bool nct7363_setting_wdt | ( | sensor_cfg * | cfg, |
uint8_t | wdt | ||
) |
bool nct7363_write | ( | sensor_cfg * | cfg, |
uint8_t | offset, | ||
uint8_t | val | ||
) |