mikrosdk interface
More...
#include <stdint.h>
Go to the source code of this file.
|
enum | fan_alarm_state { FAN_ALARM_TRIGGERED = 0
, FAN_ALARM_CLEARED = 1
} |
|
enum | fan_status {
FAN_ST_OK = 0
, FAN_ST_ALARM_DVFAIL = 1
, FAN_ST_ALARM_FNSPIN = 2
, FAN_ST_ALARM_FNSTL = 3
,
FAN_ST_FAIL = 4
} |
|
enum | fan_reg_address {
FAN_REG_CONFIGURATION = 0x20
, FAN_REG_STATUS = 0x24
, FAN_REG_STALL_STATUS = 0x25
, FAN_REG_SPIN_STATUS = 0x26
,
FAN_REG_DRIVE_FAIL_STATUS = 0x27
, FAN_REG_INTERRUPT_ENABLE = 0x29
, FAN_REG_PWM_POLARITY = 0x2A
, FAN_REG_PWM_OUTPUT_CONFIG = 0x2B
,
FAN_REG_PWM_BASE_FREQ = 0x2D
, FAN_REG_SETTING = 0x30
, FAN_REG_DIVIDE = 0x31
, FAN_REG_CONFIG1 = 0x32
,
FAN_REG_CONFIG2 = 0x33
, FAN_REG_GAIN = 0x35
, FAN_REG_SPINUP = 0x36
, FAN_REG_MAX_STEP = 0x37
,
FAN_REG_MIN_DRIVE = 0x38
, FAN_REG_VALID_TACH = 0x39
, FAN_REG_FAIL_LOW = 0x3A
, FAN_REG_FAIL_HIGH = 0x3B
,
FAN_REG_TACH_TARGET_LOW = 0x3C
, FAN_REG_TACH_TARGET_HIGH = 0x3D
, FAN_REG_TACH_READING_HIGH = 0x3E
, FAN_REG_TACH_READING_LOW = 0x3F
,
FAN_REG_SOFTWARE_LOCK = 0xEF
, FAN_REG_PRODUCT_ID = 0xFD
, FAN_REG_MANUFACTUERE_ID = 0xFE
, FAN_REG_REVISION = 0xFF
} |
|
enum | fan_pwm_frequency { FAN_PWM_FREQ_26000HZ = 0x00
, FAN_PWM_FREQ_19531HZ = 0x01
, FAN_PWM_FREQ_4882HZ = 0x02
, FAN_PWM_FREQ_2441HZ = 0x03
} |
|
enum | fan_range { FAN_RANGE_RPM_MIN_500 = 0x00
, FAN_RANGE_RPM_MIN_1000 = 0x01
, FAN_RANGE_RPM_MIN_2000 = 0x02
, FAN_RANGE_RPM_MIN_4000 = 0x03
} |
|
enum | fan_edges { FAN_EDGES_1_POLE = 0x00
, FAN_EDGES_2_POLE = 0x01
, FAN_EDGES_3_POLE = 0x02
, FAN_EDGES_4_POLE = 0x03
} |
|
enum | fan_update_time {
FAN_UPDATE_TIME_100MS = 0x00
, FAN_UPDATE_TIME_200MS = 0x01
, FAN_UPDATE_TIME_300MS = 0x02
, FAN_UPDATE_TIME_400MS = 0x03
,
FAN_UPDATE_TIME_500MS = 0x04
, FAN_UPDATE_TIME_800MS = 0x05
, FAN_UPDATE_TIME_1200MS = 0x06
, FAN_UPDATE_TIME_1600MS = 0x07
} |
|
enum | fan_derivative_option { FAN_DERIVATIVE_NONE = 0x00
, FAN_DERIVATIVE_BASIC = 0x01
, FAN_DERIVATIVE_STEP = 0x02
, FAN_DERIVATIVE_BOTH = 0x03
} |
|
enum | fan_error_window { FAN_ERR_WINDOW_0RPM = 0x00
, FAN_ERR_WINDOW_50RPM = 0x01
, FAN_ERR_WINDOW_100RPM = 0x02
, FAN_ERR_WINDOW_200RPM = 0x03
} |
|
enum | fan_gain { FAN_GAIN_1X = 0x00
, FAN_GAIN_2X = 0x01
, FAN_GAIN_4X = 0x02
, FAN_GAIN_8X = 0x03
} |
|
enum | fan_drive_fail_count { FAN_DRIVE_FAIL_COUNT_DISABLED = 0x00
, FAN_DRIVE_FAIL_COUNT_16 = 0x01
, FAN_DRIVE_FAIL_COUNT_32 = 0x02
, FAN_DRIVE_FAIL_COUNT_64 = 0x03
} |
|
enum | fan_spin_up_level {
FAN_SPINUP_LEVEL_30PERCENT = 0x00
, FAN_SPINUP_LEVEL_35PERCENT = 0x01
, FAN_SPINUP_LEVEL_40PERCENT = 0x02
, FAN_SPINUP_LEVEL_45PERCENT = 0x03
,
FAN_SPINUP_LEVEL_50PERCENT = 0x04
, FAN_SPINUP_LEVEL_55PERCENT = 0x05
, FAN_SPINUP_LEVEL_60PERCENT = 0x06
, FAN_SPINUP_LEVEL_65PERCENT = 0x07
} |
|
enum | fan_spin_up_time { FAN_SPINUP_TIME_250MS = 0x00
, FAN_SPINUP_TIME_500MS = 0x01
, FAN_SPINUP_TIME_1S = 0x02
, FAN_SPINUP_TIME_2S = 0x03
} |
|
◆ FAN_DERIVATIVE
◆ FAN_DEV_ADDR
#define FAN_DEV_ADDR 0x2F |
◆ FAN_DFC_MASK
#define FAN_DFC_MASK 0xC0 |
◆ FAN_DFC_SHFT
◆ FAN_DPT_MASK
#define FAN_DPT_MASK 0x18 |
◆ FAN_DPT_SHFT
◆ FAN_DRIVE_FAIL_COUNT
◆ FAN_DRIVE_FAIL_LIMIT_PERCENT
#define FAN_DRIVE_FAIL_LIMIT_PERCENT 10 |
◆ FAN_EDG_MASK
#define FAN_EDG_MASK 0x18 |
◆ FAN_EDG_SHFT
◆ FAN_EDGES
◆ FAN_EMC2301_PRODUCTID
#define FAN_EMC2301_PRODUCTID 0x37 |
◆ FAN_ENAG_BIT
#define FAN_ENAG_BIT 0x80 |
◆ FAN_ENRC_BIT
#define FAN_ENRC_BIT 0x40 |
◆ FAN_ERG_MASK
#define FAN_ERG_MASK 0x06 |
◆ FAN_ERG_SHFT
◆ FAN_ERR_WINDOW
◆ FAN_FREQUENCY
#define FAN_FREQUENCY 32768 |
◆ FAN_GAIN_D
◆ FAN_GAIN_I
◆ FAN_GAIN_P
◆ FAN_GDE_MASK
#define FAN_GDE_MASK 0x30 |
◆ FAN_GDE_SHFT
◆ FAN_GHEN_BIT
#define FAN_GHEN_BIT 0x20 |
◆ FAN_GIN_MASK
#define FAN_GIN_MASK 0x0C |
◆ FAN_GIN_SHFT
◆ FAN_GPR_MASK
#define FAN_GPR_MASK 0x03 |
◆ FAN_GPR_SHFT
◆ FAN_KICK
#define FAN_KICK 1 /* kick */ |
◆ FAN_MAX_SPEED
#define FAN_MAX_SPEED 5000 |
◆ FAN_MIN_SPIN_UP_VALUE_RPM
#define FAN_MIN_SPIN_UP_VALUE_RPM 500 |
◆ FAN_MODE
◆ FAN_MODE_CLOSED_LOOP
#define FAN_MODE_CLOSED_LOOP 1 /* closed loop, rpm setting */ |
◆ FAN_MODE_OPEN_LOOP
#define FAN_MODE_OPEN_LOOP 0 /* open loop, direct setting of pwm value */ |
◆ FAN_NKCK_BIT
#define FAN_NKCK_BIT 0x20 |
◆ FAN_PWM_FREQ
◆ FAN_RAMP_ENABLE
#define FAN_RAMP_ENABLE 0 /* ramping enable */ |
◆ FAN_RAMP_STEPSIZE
#define FAN_RAMP_STEPSIZE 16 /* ramping stepsize */ |
◆ FAN_RANGE
◆ FAN_RNG_MASK
#define FAN_RNG_MASK 0x60 |
◆ FAN_RNG_SHFT
◆ FAN_SPINUP_LEVEL
◆ FAN_SPINUP_TIME
◆ FAN_SPLV_MASK
#define FAN_SPLV_MASK 0x1C |
◆ FAN_SPLV_SHFT
◆ FAN_SPT_MASK
#define FAN_SPT_MASK 0x03 |
◆ FAN_SPT_SHFT
◆ FAN_STATUS_DVFAIL
#define FAN_STATUS_DVFAIL 0x04 |
◆ FAN_STATUS_FNSPIN
#define FAN_STATUS_FNSPIN 0x02 |
◆ FAN_STATUS_FNSTL
#define FAN_STATUS_FNSTL 0x01 |
◆ FAN_UDT_MASK
#define FAN_UDT_MASK 0x07 |
◆ FAN_UDT_SHFT
◆ FAN_UPDATE_TIME
◆ FAN_USE_INTERRUPT
#define FAN_USE_INTERRUPT 0 |
◆ fan_alarm_state
Enumerator |
---|
FAN_ALARM_TRIGGERED | |
FAN_ALARM_CLEARED | |
◆ fan_derivative_option
Enumerator |
---|
FAN_DERIVATIVE_NONE | |
FAN_DERIVATIVE_BASIC | |
FAN_DERIVATIVE_STEP | |
FAN_DERIVATIVE_BOTH | |
◆ fan_drive_fail_count
Enumerator |
---|
FAN_DRIVE_FAIL_COUNT_DISABLED | |
FAN_DRIVE_FAIL_COUNT_16 | |
FAN_DRIVE_FAIL_COUNT_32 | |
FAN_DRIVE_FAIL_COUNT_64 | |
◆ fan_edges
Enumerator |
---|
FAN_EDGES_1_POLE | |
FAN_EDGES_2_POLE | |
FAN_EDGES_3_POLE | |
FAN_EDGES_4_POLE | |
◆ fan_error_window
Enumerator |
---|
FAN_ERR_WINDOW_0RPM | |
FAN_ERR_WINDOW_50RPM | |
FAN_ERR_WINDOW_100RPM | |
FAN_ERR_WINDOW_200RPM | |
◆ fan_gain
Enumerator |
---|
FAN_GAIN_1X | |
FAN_GAIN_2X | |
FAN_GAIN_4X | |
FAN_GAIN_8X | |
◆ fan_pwm_frequency
Enumerator |
---|
FAN_PWM_FREQ_26000HZ | |
FAN_PWM_FREQ_19531HZ | |
FAN_PWM_FREQ_4882HZ | |
FAN_PWM_FREQ_2441HZ | |
◆ fan_range
Enumerator |
---|
FAN_RANGE_RPM_MIN_500 | |
FAN_RANGE_RPM_MIN_1000 | |
FAN_RANGE_RPM_MIN_2000 | |
FAN_RANGE_RPM_MIN_4000 | |
◆ fan_reg_address
Enumerator |
---|
FAN_REG_CONFIGURATION | |
FAN_REG_STATUS | |
FAN_REG_STALL_STATUS | |
FAN_REG_SPIN_STATUS | |
FAN_REG_DRIVE_FAIL_STATUS | |
FAN_REG_INTERRUPT_ENABLE | |
FAN_REG_PWM_POLARITY | |
FAN_REG_PWM_OUTPUT_CONFIG | |
FAN_REG_PWM_BASE_FREQ | |
FAN_REG_SETTING | |
FAN_REG_DIVIDE | |
FAN_REG_CONFIG1 | |
FAN_REG_CONFIG2 | |
FAN_REG_GAIN | |
FAN_REG_SPINUP | |
FAN_REG_MAX_STEP | |
FAN_REG_MIN_DRIVE | |
FAN_REG_VALID_TACH | |
FAN_REG_FAIL_LOW | |
FAN_REG_FAIL_HIGH | |
FAN_REG_TACH_TARGET_LOW | |
FAN_REG_TACH_TARGET_HIGH | |
FAN_REG_TACH_READING_HIGH | |
FAN_REG_TACH_READING_LOW | |
FAN_REG_SOFTWARE_LOCK | |
FAN_REG_PRODUCT_ID | |
FAN_REG_MANUFACTUERE_ID | |
FAN_REG_REVISION | |
◆ fan_spin_up_level
Enumerator |
---|
FAN_SPINUP_LEVEL_30PERCENT | |
FAN_SPINUP_LEVEL_35PERCENT | |
FAN_SPINUP_LEVEL_40PERCENT | |
FAN_SPINUP_LEVEL_45PERCENT | |
FAN_SPINUP_LEVEL_50PERCENT | |
FAN_SPINUP_LEVEL_55PERCENT | |
FAN_SPINUP_LEVEL_60PERCENT | |
FAN_SPINUP_LEVEL_65PERCENT | |
◆ fan_spin_up_time
Enumerator |
---|
FAN_SPINUP_TIME_250MS | |
FAN_SPINUP_TIME_500MS | |
FAN_SPINUP_TIME_1S | |
FAN_SPINUP_TIME_2S | |
◆ fan_status
Enumerator |
---|
FAN_ST_OK | |
FAN_ST_ALARM_DVFAIL | |
FAN_ST_ALARM_FNSPIN | |
FAN_ST_ALARM_FNSTL | |
FAN_ST_FAIL | |
◆ fan_update_time
Enumerator |
---|
FAN_UPDATE_TIME_100MS | |
FAN_UPDATE_TIME_200MS | |
FAN_UPDATE_TIME_300MS | |
FAN_UPDATE_TIME_400MS | |
FAN_UPDATE_TIME_500MS | |
FAN_UPDATE_TIME_800MS | |
FAN_UPDATE_TIME_1200MS | |
FAN_UPDATE_TIME_1600MS | |
◆ MIKROSDK_FAN_alarm_triggered()
uint8_t MIKROSDK_FAN_alarm_triggered |
( |
void |
| ) |
|
◆ MIKROSDK_FAN_Driver()
uint8_t MIKROSDK_FAN_Driver |
( |
uint8_t * |
speed_pwm_percent, |
|
|
uint16_t * |
speed_tach_rpm |
|
) |
| |
◆ MIKROSDK_FAN_Initialise()
uint8_t MIKROSDK_FAN_Initialise |
( |
void |
| ) |
|
◆ MIKROSDK_FAN_pin_mapping()
void MIKROSDK_FAN_pin_mapping |
( |
uint8_t |
alarm | ) |
|