42 #define FAN_MODE_OPEN_LOOP 0
43 #define FAN_MODE_CLOSED_LOOP 1
45 #define FAN_MODE FAN_MODE_CLOSED_LOOP
48 #define FAN_USE_INTERRUPT 0
51 #define FAN_MAX_SPEED 5000
54 #define FAN_DRIVE_FAIL_LIMIT_PERCENT 10
57 #define FAN_MIN_SPIN_UP_VALUE_RPM 500
60 #define FAN_DEV_ADDR 0x2F
63 #define FAN_EMC2301_PRODUCTID 0x37
66 #define FAN_FREQUENCY 32768
121 #define FAN_STATUS_FNSTL 0x01
122 #define FAN_STATUS_FNSPIN 0x02
123 #define FAN_STATUS_DVFAIL 0x04
224 #define FAN_PWM_FREQ FAN_PWM_FREQ_26000HZ
225 #define FAN_RANGE FAN_RANGE_RPM_MIN_500
226 #define FAN_EDGES FAN_EDGES_2_POLE
227 #define FAN_SPINUP_LEVEL FAN_SPINUP_LEVEL_60PERCENT
228 #define FAN_SPINUP_TIME FAN_SPINUP_TIME_1S
230 #define FAN_UPDATE_TIME FAN_UPDATE_TIME_400MS
231 #define FAN_ERR_WINDOW FAN_ERR_WINDOW_0RPM
232 #define FAN_DERIVATIVE FAN_DERIVATIVE_BASIC
233 #define FAN_GAIN_P FAN_GAIN_4X
234 #define FAN_GAIN_I FAN_GAIN_4X
235 #define FAN_GAIN_D FAN_GAIN_4X
236 #define FAN_DRIVE_FAIL_COUNT FAN_DRIVE_FAIL_COUNT_16
237 #define FAN_RAMP_ENABLE 0
238 #define FAN_RAMP_STEPSIZE 16
242 #define FAN_ENAG_BIT 0x80
243 #define FAN_RNG_MASK 0x60
244 #define FAN_RNG_SHFT 5
245 #define FAN_EDG_MASK 0x18
246 #define FAN_EDG_SHFT 3
247 #define FAN_UDT_MASK 0x07
248 #define FAN_UDT_SHFT 0
250 #define FAN_ENRC_BIT 0x40
251 #define FAN_GHEN_BIT 0x20
252 #define FAN_DPT_MASK 0x18
253 #define FAN_DPT_SHFT 3
254 #define FAN_ERG_MASK 0x06
255 #define FAN_ERG_SHFT 1
257 #define FAN_DFC_MASK 0xC0
258 #define FAN_DFC_SHFT 6
259 #define FAN_NKCK_BIT 0x20
260 #define FAN_SPLV_MASK 0x1C
261 #define FAN_SPLV_SHFT 2
262 #define FAN_SPT_MASK 0x03
263 #define FAN_SPT_SHFT 0
265 #define FAN_GDE_MASK 0x30
266 #define FAN_GDE_SHFT 4
267 #define FAN_GIN_MASK 0x0C
268 #define FAN_GIN_SHFT 2
269 #define FAN_GPR_MASK 0x03
270 #define FAN_GPR_SHFT 0
fan_edges
Definition: fan_click.h:145
@ FAN_EDGES_4_POLE
Definition: fan_click.h:149
@ FAN_EDGES_3_POLE
Definition: fan_click.h:148
@ FAN_EDGES_2_POLE
Definition: fan_click.h:147
@ FAN_EDGES_1_POLE
Definition: fan_click.h:146
void MIKROSDK_FAN_pin_mapping(uint8_t alarm)
Definition: fan.c:575
fan_range
Definition: fan_click.h:136
@ FAN_RANGE_RPM_MIN_1000
Definition: fan_click.h:138
@ FAN_RANGE_RPM_MIN_2000
Definition: fan_click.h:139
@ FAN_RANGE_RPM_MIN_4000
Definition: fan_click.h:140
@ FAN_RANGE_RPM_MIN_500
Definition: fan_click.h:137
uint8_t MIKROSDK_FAN_alarm_triggered(void)
Definition: fan.c:567
uint8_t MIKROSDK_FAN_Initialise(void)
Definition: fan.c:581
fan_pwm_frequency
Definition: fan_click.h:127
@ FAN_PWM_FREQ_26000HZ
Definition: fan_click.h:128
@ FAN_PWM_FREQ_4882HZ
Definition: fan_click.h:130
@ FAN_PWM_FREQ_2441HZ
Definition: fan_click.h:131
@ FAN_PWM_FREQ_19531HZ
Definition: fan_click.h:129
fan_status
Definition: fan_click.h:77
@ FAN_ST_ALARM_FNSPIN
Definition: fan_click.h:80
@ FAN_ST_FAIL
Definition: fan_click.h:82
@ FAN_ST_OK
Definition: fan_click.h:78
@ FAN_ST_ALARM_FNSTL
Definition: fan_click.h:81
@ FAN_ST_ALARM_DVFAIL
Definition: fan_click.h:79
uint8_t MIKROSDK_FAN_Driver(uint8_t *speed_pwm_percent, uint16_t *speed_tach_rpm)
Definition: fan.c:635
fan_spin_up_time
Definition: fan_click.h:216
@ FAN_SPINUP_TIME_2S
Definition: fan_click.h:220
@ FAN_SPINUP_TIME_250MS
Definition: fan_click.h:217
@ FAN_SPINUP_TIME_1S
Definition: fan_click.h:219
@ FAN_SPINUP_TIME_500MS
Definition: fan_click.h:218
fan_alarm_state
Definition: fan_click.h:70
@ FAN_ALARM_TRIGGERED
Definition: fan_click.h:71
@ FAN_ALARM_CLEARED
Definition: fan_click.h:72
fan_update_time
Definition: fan_click.h:154
@ FAN_UPDATE_TIME_500MS
Definition: fan_click.h:159
@ FAN_UPDATE_TIME_100MS
Definition: fan_click.h:155
@ FAN_UPDATE_TIME_1600MS
Definition: fan_click.h:162
@ FAN_UPDATE_TIME_800MS
Definition: fan_click.h:160
@ FAN_UPDATE_TIME_1200MS
Definition: fan_click.h:161
@ FAN_UPDATE_TIME_300MS
Definition: fan_click.h:157
@ FAN_UPDATE_TIME_200MS
Definition: fan_click.h:156
@ FAN_UPDATE_TIME_400MS
Definition: fan_click.h:158
fan_error_window
Definition: fan_click.h:176
@ FAN_ERR_WINDOW_100RPM
Definition: fan_click.h:179
@ FAN_ERR_WINDOW_0RPM
Definition: fan_click.h:177
@ FAN_ERR_WINDOW_200RPM
Definition: fan_click.h:180
@ FAN_ERR_WINDOW_50RPM
Definition: fan_click.h:178
fan_spin_up_level
Definition: fan_click.h:203
@ FAN_SPINUP_LEVEL_30PERCENT
Definition: fan_click.h:204
@ FAN_SPINUP_LEVEL_60PERCENT
Definition: fan_click.h:210
@ FAN_SPINUP_LEVEL_50PERCENT
Definition: fan_click.h:208
@ FAN_SPINUP_LEVEL_55PERCENT
Definition: fan_click.h:209
@ FAN_SPINUP_LEVEL_65PERCENT
Definition: fan_click.h:211
@ FAN_SPINUP_LEVEL_40PERCENT
Definition: fan_click.h:206
@ FAN_SPINUP_LEVEL_45PERCENT
Definition: fan_click.h:207
@ FAN_SPINUP_LEVEL_35PERCENT
Definition: fan_click.h:205
fan_derivative_option
Definition: fan_click.h:167
@ FAN_DERIVATIVE_STEP
Definition: fan_click.h:170
@ FAN_DERIVATIVE_BASIC
Definition: fan_click.h:169
@ FAN_DERIVATIVE_NONE
Definition: fan_click.h:168
@ FAN_DERIVATIVE_BOTH
Definition: fan_click.h:171
fan_drive_fail_count
Definition: fan_click.h:194
@ FAN_DRIVE_FAIL_COUNT_32
Definition: fan_click.h:197
@ FAN_DRIVE_FAIL_COUNT_64
Definition: fan_click.h:198
@ FAN_DRIVE_FAIL_COUNT_DISABLED
Definition: fan_click.h:195
@ FAN_DRIVE_FAIL_COUNT_16
Definition: fan_click.h:196
fan_reg_address
Definition: fan_click.h:87
@ FAN_REG_CONFIGURATION
Definition: fan_click.h:88
@ FAN_REG_SPINUP
Definition: fan_click.h:102
@ FAN_REG_STALL_STATUS
Definition: fan_click.h:90
@ FAN_REG_PWM_OUTPUT_CONFIG
Definition: fan_click.h:95
@ FAN_REG_PWM_POLARITY
Definition: fan_click.h:94
@ FAN_REG_MAX_STEP
Definition: fan_click.h:103
@ FAN_REG_PRODUCT_ID
Definition: fan_click.h:113
@ FAN_REG_CONFIG1
Definition: fan_click.h:99
@ FAN_REG_VALID_TACH
Definition: fan_click.h:105
@ FAN_REG_TACH_READING_HIGH
Definition: fan_click.h:110
@ FAN_REG_MIN_DRIVE
Definition: fan_click.h:104
@ FAN_REG_REVISION
Definition: fan_click.h:115
@ FAN_REG_TACH_READING_LOW
Definition: fan_click.h:111
@ FAN_REG_TACH_TARGET_HIGH
Definition: fan_click.h:109
@ FAN_REG_STATUS
Definition: fan_click.h:89
@ FAN_REG_SPIN_STATUS
Definition: fan_click.h:91
@ FAN_REG_PWM_BASE_FREQ
Definition: fan_click.h:96
@ FAN_REG_TACH_TARGET_LOW
Definition: fan_click.h:108
@ FAN_REG_SOFTWARE_LOCK
Definition: fan_click.h:112
@ FAN_REG_MANUFACTUERE_ID
Definition: fan_click.h:114
@ FAN_REG_FAIL_HIGH
Definition: fan_click.h:107
@ FAN_REG_DRIVE_FAIL_STATUS
Definition: fan_click.h:92
@ FAN_REG_CONFIG2
Definition: fan_click.h:100
@ FAN_REG_DIVIDE
Definition: fan_click.h:98
@ FAN_REG_GAIN
Definition: fan_click.h:101
@ FAN_REG_SETTING
Definition: fan_click.h:97
@ FAN_REG_FAIL_LOW
Definition: fan_click.h:106
@ FAN_REG_INTERRUPT_ENABLE
Definition: fan_click.h:93
fan_gain
Definition: fan_click.h:185
@ FAN_GAIN_4X
Definition: fan_click.h:188
@ FAN_GAIN_2X
Definition: fan_click.h:187
@ FAN_GAIN_1X
Definition: fan_click.h:186
@ FAN_GAIN_8X
Definition: fan_click.h:189