File EMC2305.h
FileList > driver > Inc > EMC2305.h
Go to the source code of this file
#include <stdint.h>#include "stm32xx_hal.h"#include "FreeRTOS.h"
Classes
| Type | Name |
|---|---|
| struct | EMC2305_Fan_Config1 |
| struct | EMC2305_Fan_Config2 |
| struct | EMC2305_Fan_Status |
| struct | EMC2305_Global_Config |
| struct | EMC2305_HandleTypeDef |
| struct | EMC2305_I2C_Message |
Public Types
| Type | Name |
|---|---|
| enum | EMC2305_DPT |
| enum | EMC2305_EDG |
| enum | EMC2305_ERG |
| enum | EMC2305_Fan |
| enum | EMC2305_I2C_OP |
| enum | EMC2305_PID_Gain |
| enum | EMC2305_PWM_BaseFreq |
| enum | EMC2305_RNG |
| enum | EMC2305_Status |
| enum | EMC2305_UDT |
Public Functions
| Type | Name |
|---|---|
| EMC2305_Status | EMC2305_EnableSWLock (EMC2305_HandleTypeDef * chip) Software locks all SWL registers. SWL registers are now read-only until power cycle. |
| uint8_t | EMC2305_GetFanPWM (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan) Gets current fan driver PWM duty cycle. |
| uint16_t | EMC2305_GetFanRPM (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan) Gets current fan RPM based on tachometer measurement. |
| EMC2305_Fan_Status | EMC2305_GetFanStatus (EMC2305_HandleTypeDef * chip) Gets current fan status for all drivers. |
| void | EMC2305_I2C_MasterRxCpltCallback (I2C_HandleTypeDef * hi2c) |
| void | EMC2305_I2C_MasterTxCpltCallback (I2C_HandleTypeDef * hi2c) |
| void | EMC2305_I2C_Worker_Task (void * pvParameters) |
| EMC2305_Status | EMC2305_Init (EMC2305_HandleTypeDef * chip, I2C_HandleTypeDef * hi2c, uint16_t dev_addr) Initializes the I2C bus and validates the chip by reading the Product ID and Manufacturer ID. |
| EMC2305_Status | EMC2305_ReadReg (EMC2305_HandleTypeDef * chip, uint8_t reg, uint8_t * data) Reads a byte of data from the specified register. |
| EMC2305_Status | EMC2305_SetFanConfig (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan, EMC2305_Fan_Config1 * config1, EMC2305_Fan_Config2 * config2) Sets the EMC2305 configuration 1 and 2 registers based on the provided config. |
| EMC2305_Status | EMC2305_SetFanPWM (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan, uint8_t duty_cycle) Sets the PWM drive of the specified fan directly. Works only with fan speed control (FSC) disabled. |
| EMC2305_Status | EMC2305_SetFanRPM (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan, uint16_t rpm_target) Sets the RPM target for the control algorithm. Works only with fan speed control (FSC) enabled. |
| EMC2305_Status | EMC2305_SetGlobalConfig (EMC2305_HandleTypeDef * chip, EMC2305_Global_Config * config) Sets the EMC2305 global configuration register based on provided config. |
| EMC2305_Status | EMC2305_SetPWMBaseFrequency (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan, EMC2305_PWM_BaseFreq freq) Sets the base frequency of the specified fan's PWM driver. |
| EMC2305_Status | EMC2305_SetPWMOutputMode (EMC2305_HandleTypeDef * chip, EMC2305_Fan fan, bool open_drain) Sets the specified fan's PWM driver to open-drain or push-pull. |
| EMC2305_Status | EMC2305_WriteReg (EMC2305_HandleTypeDef * chip, uint8_t reg, uint8_t data) Writes a byte of data to the specified register. |
Macros
| Type | Name |
|---|---|
| define | EMC2305_CFG_DIS_TO (1u << 6) /\* DIS\_TO - SMBus timeout disable (I2C compat) \*/ |
| define | EMC2305_CFG_DRECK (1u << 1) /\* DRECK - CLK pin drives internal clock when set (output) \*/ |
| define | EMC2305_CFG_MASK_ALERT (1u << 7) /\* MASK - mask ALERT pin when set \*/ |
| define | EMC2305_CFG_USECK (1u << 0) /\* USECK - use external CLK pin as tach clock when set \*/ |
| define | EMC2305_CFG_WD_EN (1u << 5) /\* WD\_EN - enable watchdog continuous mode \*/ |
| define | EMC2305_CONFIG1_EDG_SHIFT 3u |
| define | EMC2305_CONFIG1_ENAG_SHIFT 7u |
| define | EMC2305_CONFIG1_RNG_SHIFT 5u |
| define | EMC2305_CONFIG1_UDT_SHIFT 0u |
| define | EMC2305_CONFIG2_DPT_SHIFT 3u |
| define | EMC2305_CONFIG2_ENRC_SHIFT 6u |
| define | EMC2305_CONFIG2_ERG_SHIFT 1u |
| define | EMC2305_CONFIG2_GHEN_SHIFT 5u |
| define | EMC2305_FAN1_MASK (1u << 0) |
| define | EMC2305_FAN2_MASK (1u << 1) |
| define | EMC2305_FAN3_MASK (1u << 2) |
| define | EMC2305_FAN4_MASK (1u << 3) |
| define | EMC2305_FAN5_MASK (1u << 4) |
| define | EMC2305_FAN_ADDRESS_OFFSET 0x10u |
| define | EMC2305_FAN_REG_ADDR (fan_num, fan1_reg_addr) ((fan1\_reg\_addr) + ((fan\_num) \* [**EMC2305\_FAN\_ADDRESS\_OFFSET**](EMC2305_8h.md#define-emc2305_fan_address_offset)))Calculates the register address for a specific fan (N) based on the Fan 1 register address and known offset. |
| define | EMC2305_I2C_TIMEOUT 100u |
| define | EMC2305_INVALID_FAN (fan_num) (fan < EMC2305\_FAN1 \|\| fan > EMC2305\_FAN5) |
| define | EMC2305_MAX_RPM 16000 |
| define | EMC2305_MIN_RPM 500 |
| define | EMC2305_PWM_FAN1_MASK 0x03u |
| define | EMC2305_PWM_FAN1_SHIFT 0u |
| define | EMC2305_PWM_FAN2_MASK 0x0Cu |
| define | EMC2305_PWM_FAN2_SHIFT 2u |
| define | EMC2305_PWM_FAN3_MASK 0x30u |
| define | EMC2305_PWM_FAN3_SHIFT 4u |
| define | EMC2305_PWM_FAN4_MASK 0x03u |
| define | EMC2305_PWM_FAN4_SHIFT 0u |
| define | EMC2305_PWM_FAN5_MASK 0x0Cu |
| define | EMC2305_PWM_FAN5_SHIFT 2u |
| define | EMC2305_QUEUE_ITEM_SIZE sizeof([**EMC2305\_I2C\_Message**](structEMC2305__I2C__Message.md)) |
| define | EMC2305_QUEUE_LENGTH 10 |
| define | EMC2305_REG_CONFIGURATION 0x20u |
| define | EMC2305_REG_DRIVE_FAIL_STATUS 0x27u |
| define | EMC2305_REG_FAN1_CONFIG1 0x32u |
| define | EMC2305_REG_FAN1_CONFIG2 0x33u |
| define | EMC2305_REG_FAN1_DRVFAIL_H 0x3Bu |
| define | EMC2305_REG_FAN1_DRVFAIL_L 0x3Au |
| define | EMC2305_REG_FAN1_MAX_STEP 0x37u |
| define | EMC2305_REG_FAN1_MIN_DRIVE 0x38u |
| define | EMC2305_REG_FAN1_SETTING 0x30u |
| define | EMC2305_REG_FAN1_SPIN 0x36u |
| define | EMC2305_REG_FAN1_TACH_READING_H 0x3Eu |
| define | EMC2305_REG_FAN1_TACH_READING_L 0x3Fu |
| define | EMC2305_REG_FAN1_TACH_TARGET_H 0x3Du |
| define | EMC2305_REG_FAN1_TACH_TARGET_L 0x3Cu |
| define | EMC2305_REG_FAN1_VALID_TACH 0x39u |
| define | EMC2305_REG_FAN_INTERRUPT_ENABLE 0x29u |
| define | EMC2305_REG_FAN_SPIN_STATUS 0x26u |
| define | EMC2305_REG_FAN_STALL_STATUS 0x25u |
| define | EMC2305_REG_FAN_STATUS 0x24u |
| define | EMC2305_REG_GAIN1 0x35u |
| define | EMC2305_REG_MANUFACTURER_ID 0xFEu |
| define | EMC2305_REG_PRODUCT_FEAT 0xFCu |
| define | EMC2305_REG_PRODUCT_ID 0xFDu |
| define | EMC2305_REG_PWM1_DIVIDE 0x31u |
| define | EMC2305_REG_PWM_BASEF123 0x2Du |
| define | EMC2305_REG_PWM_BASEF45 0x2Cu |
| define | EMC2305_REG_PWM_OUTPUT_CONFIG 0x2Bu |
| define | EMC2305_REG_PWM_POLARITY 0x2Au |
| define | EMC2305_REG_REVISION 0xFFu |
| define | EMC2305_REG_SW_LOCK 0xEFu |
| define | EMC2305_SEMAPHORE_POOL_SIZE [**EMC2305\_QUEUE\_LENGTH**](EMC2305_8h.md#define-emc2305_queue_length) |
| define | EMC2305_STAT_DRVFAIL (1u << 2) /\* Drive fail summary \*/ |
| define | EMC2305_STAT_FNSPIN (1u << 1) /\* spin-up failure summary \*/ |
| define | EMC2305_STAT_FNSTL (1u << 0) /\* stall summary \*/ |
| define | EMC2305_STAT_WATCH (1u << 7) /\* WATCH - watchdog fired (read-to-clear) \*/ |
| define | EMC2305_SWL (1u << 0) |
| define | EMC2305_TACH_MULT 2u |
| define | EMC2305_TACH_RPM_CONV 3932160u |
Public Types Documentation
enum EMC2305_DPT
enum EMC2305_DPT {
EMC2305_DPT_NONE = 0b00,
EMC2305_DPT_BASIC = 0b01,
EMC2305_DPT_STEP = 0b10,
EMC2305_DPT_BOTH = 0b11
};
enum EMC2305_EDG
enum EMC2305_EDG {
EMC2305_EDG_9 = 0b11,
EMC2305_EDG_7 = 0b10,
EMC2305_EDG_5 = 0b01,
EMC2305_EDG_3 = 0b00
};
enum EMC2305_ERG
enum EMC2305_ERG {
EMC2305_ERG_0RPM = 0b00,
EMC2305_ERG_50RPM = 0b01,
EMC2305_ERG_100RPM = 0b10,
EMC2305_ERG_200RPM = 0b11
};
enum EMC2305_Fan
enum EMC2305_Fan {
EMC2305_FAN1,
EMC2305_FAN2,
EMC2305_FAN3,
EMC2305_FAN4,
EMC2305_FAN5
};
enum EMC2305_I2C_OP
enum EMC2305_I2C_OP {
EMC2305_OP_WRITE,
EMC2305_OP_READ
};
enum EMC2305_PID_Gain
enum EMC2305_PID_Gain {
EMC2305_PID_8X = 0b11,
EMC2305_PID_4X = 0b10,
EMC2305_PID_2X = 0b01,
EMC2305_PID_1X = 0b00
};
enum EMC2305_PWM_BaseFreq
enum EMC2305_PWM_BaseFreq {
EMC2305_PWM_2k441 = 0b11,
EMC2305_PWM_4k882 = 0b10,
EMC2305_PWM_19k53 = 0b01,
EMC2305_PWM_26k00 = 0b00
};
enum EMC2305_RNG
enum EMC2305_RNG {
EMC2305_RNG_4000 = 0b11,
EMC2305_RNG_2000 = 0b10,
EMC2305_RNG_1000 = 0b01,
EMC2305_RNG_500 = 0b00
};
enum EMC2305_Status
enum EMC2305_Status {
EMC2305_OK,
EMC2305_ERR
};
enum EMC2305_UDT
enum EMC2305_UDT {
EMC2305_UDT_100 = 0b000,
EMC2305_UDT_200 = 0b001,
EMC2305_UDT_300 = 0b010,
EMC2305_UDT_400 = 0b011,
EMC2305_UDT_500 = 0b100,
EMC2305_UDT_800 = 0b101,
EMC2305_UDT_1200 = 0b110,
EMC2305_UDT_1600 = 0b111
};
Public Functions Documentation
function EMC2305_EnableSWLock
Software locks all SWL registers. SWL registers are now read-only until power cycle.
EMC2305_Status EMC2305_EnableSWLock (
EMC2305_HandleTypeDef * chip
)
Parameters:
chipEMC2305 to lock
Returns:
OK if successful, ERR otherwise
function EMC2305_GetFanPWM
Gets current fan driver PWM duty cycle.
uint8_t EMC2305_GetFanPWM (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan
)
Parameters:
chipEMC2305 to getfanFan to get (1-5)
Returns:
Driven fan PWM duty cycle (0-100). UINT8_MAX on error
function EMC2305_GetFanRPM
Gets current fan RPM based on tachometer measurement.
uint16_t EMC2305_GetFanRPM (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan
)
Parameters:
chipEMC2305 to getfanFan to get (1-5)
Returns:
Measured fan RPM. UINT16_MAX on error
function EMC2305_GetFanStatus
Gets current fan status for all drivers.
EMC2305_Fan_Status EMC2305_GetFanStatus (
EMC2305_HandleTypeDef * chip
)
Parameters:
chipEMC2305 to get
Returns:
Fan status for all drivers
function EMC2305_I2C_MasterRxCpltCallback
void EMC2305_I2C_MasterRxCpltCallback (
I2C_HandleTypeDef * hi2c
)
function EMC2305_I2C_MasterTxCpltCallback
void EMC2305_I2C_MasterTxCpltCallback (
I2C_HandleTypeDef * hi2c
)
function EMC2305_I2C_Worker_Task
void EMC2305_I2C_Worker_Task (
void * pvParameters
)
function EMC2305_Init
Initializes the I2C bus and validates the chip by reading the Product ID and Manufacturer ID.
EMC2305_Status EMC2305_Init (
EMC2305_HandleTypeDef * chip,
I2C_HandleTypeDef * hi2c,
uint16_t dev_addr
)
Parameters:
chipEMC2305 to initializehi2cSTM32 HAL I2C handledev_addrDevice address (7-bit address << 1)
Returns:
OK if successful, ERR otherwise
function EMC2305_ReadReg
Reads a byte of data from the specified register.
EMC2305_Status EMC2305_ReadReg (
EMC2305_HandleTypeDef * chip,
uint8_t reg,
uint8_t * data
)
Parameters:
chipEMC2305 handleregRegister to read fromdataPointer where register data will be stored
Returns:
OK if successful, ERR if message queue is full
function EMC2305_SetFanConfig
Sets the EMC2305 configuration 1 and 2 registers based on the provided config.
EMC2305_Status EMC2305_SetFanConfig (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan,
EMC2305_Fan_Config1 * config1,
EMC2305_Fan_Config2 * config2
)
Parameters:
chipEMC2305 to setfanFan to set (1-5)config1Configuration for register 1config2Configuration for register 2
Returns:
OK if successful, ERR otherwise
function EMC2305_SetFanPWM
Sets the PWM drive of the specified fan directly. Works only with fan speed control (FSC) disabled.
EMC2305_Status EMC2305_SetFanPWM (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan,
uint8_t duty_cycle
)
Parameters:
chipEMC2305 to setfanFan to set (1-5)duty_cyclePWM duty cycle percentage (0 to 100)
Returns:
OK if successful, ERR otherwise
function EMC2305_SetFanRPM
Sets the RPM target for the control algorithm. Works only with fan speed control (FSC) enabled.
EMC2305_Status EMC2305_SetFanRPM (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan,
uint16_t rpm_target
)
Parameters:
chipEMC2305 to setfanFan to set (1-5)rpm_targetRPM target to set (500 to 16k)
Returns:
OK if successful, ERR otherwise
function EMC2305_SetGlobalConfig
Sets the EMC2305 global configuration register based on provided config.
EMC2305_Status EMC2305_SetGlobalConfig (
EMC2305_HandleTypeDef * chip,
EMC2305_Global_Config * config
)
Parameters:
chipEMC2305 to configureconfigGlobal configuration to use
Returns:
OK if successful, ERR otherwise
function EMC2305_SetPWMBaseFrequency
Sets the base frequency of the specified fan's PWM driver.
EMC2305_Status EMC2305_SetPWMBaseFrequency (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan,
EMC2305_PWM_BaseFreq freq
)
Parameters:
chipEMC2305 to setfanFan to set (1-5)freqBase frequency as specified in Section 6.10
Returns:
OK if successful, ERR otherwise
function EMC2305_SetPWMOutputMode
Sets the specified fan's PWM driver to open-drain or push-pull.
EMC2305_Status EMC2305_SetPWMOutputMode (
EMC2305_HandleTypeDef * chip,
EMC2305_Fan fan,
bool open_drain
)
Parameters:
chipEMC2305 to setfanFan to set (1-5)open_drainSet to true for open-drain (only driven low, requires pullup) or false for push-pull (driven high and low, no pullup)
Returns:
OK if successful, ERR otherwise
function EMC2305_WriteReg
Writes a byte of data to the specified register.
EMC2305_Status EMC2305_WriteReg (
EMC2305_HandleTypeDef * chip,
uint8_t reg,
uint8_t data
)
Parameters:
chipEMC2305 handleregRegister to write todataData to write
Returns:
OK if successful, ERR if message queue is full
Macro Definition Documentation
define EMC2305_CFG_DIS_TO
#define EMC2305_CFG_DIS_TO `(1u << 6) /* DIS_TO - SMBus timeout disable (I2C compat) */`
define EMC2305_CFG_DRECK
#define EMC2305_CFG_DRECK `(1u << 1) /* DRECK - CLK pin drives internal clock when set (output) */`
define EMC2305_CFG_MASK_ALERT
#define EMC2305_CFG_MASK_ALERT `(1u << 7) /* MASK - mask ALERT pin when set */`
define EMC2305_CFG_USECK
#define EMC2305_CFG_USECK `(1u << 0) /* USECK - use external CLK pin as tach clock when set */`
define EMC2305_CFG_WD_EN
#define EMC2305_CFG_WD_EN `(1u << 5) /* WD_EN - enable watchdog continuous mode */`
define EMC2305_CONFIG1_EDG_SHIFT
#define EMC2305_CONFIG1_EDG_SHIFT `3u`
define EMC2305_CONFIG1_ENAG_SHIFT
#define EMC2305_CONFIG1_ENAG_SHIFT `7u`
define EMC2305_CONFIG1_RNG_SHIFT
#define EMC2305_CONFIG1_RNG_SHIFT `5u`
define EMC2305_CONFIG1_UDT_SHIFT
#define EMC2305_CONFIG1_UDT_SHIFT `0u`
define EMC2305_CONFIG2_DPT_SHIFT
#define EMC2305_CONFIG2_DPT_SHIFT `3u`
define EMC2305_CONFIG2_ENRC_SHIFT
#define EMC2305_CONFIG2_ENRC_SHIFT `6u`
define EMC2305_CONFIG2_ERG_SHIFT
#define EMC2305_CONFIG2_ERG_SHIFT `1u`
define EMC2305_CONFIG2_GHEN_SHIFT
#define EMC2305_CONFIG2_GHEN_SHIFT `5u`
define EMC2305_FAN1_MASK
#define EMC2305_FAN1_MASK `(1u << 0)`
define EMC2305_FAN2_MASK
#define EMC2305_FAN2_MASK `(1u << 1)`
define EMC2305_FAN3_MASK
#define EMC2305_FAN3_MASK `(1u << 2)`
define EMC2305_FAN4_MASK
#define EMC2305_FAN4_MASK `(1u << 3)`
define EMC2305_FAN5_MASK
#define EMC2305_FAN5_MASK `(1u << 4)`
define EMC2305_FAN_ADDRESS_OFFSET
#define EMC2305_FAN_ADDRESS_OFFSET `0x10u`
define EMC2305_FAN_REG_ADDR
Calculates the register address for a specific fan (N) based on the Fan 1 register address and known offset.
#define EMC2305_FAN_REG_ADDR (
fan_num,
fan1_reg_addr
) `((fan1_reg_addr) + ((fan_num) * EMC2305_FAN_ADDRESS_OFFSET ))`
Parameters:
fan_numThe fan number (0-4 to match fan enum).fan1_reg_addrThe address of the corresponding Fan 1 register (base)
Returns:
The calculated register address for Fan N.
define EMC2305_I2C_TIMEOUT
#define EMC2305_I2C_TIMEOUT `100u`
define EMC2305_INVALID_FAN
#define EMC2305_INVALID_FAN (
fan_num
) `(fan < EMC2305_FAN1 || fan > EMC2305_FAN5 )`
define EMC2305_MAX_RPM
#define EMC2305_MAX_RPM `16000`
define EMC2305_MIN_RPM
#define EMC2305_MIN_RPM `500`
define EMC2305_PWM_FAN1_MASK
#define EMC2305_PWM_FAN1_MASK `0x03u`
define EMC2305_PWM_FAN1_SHIFT
#define EMC2305_PWM_FAN1_SHIFT `0u`
define EMC2305_PWM_FAN2_MASK
#define EMC2305_PWM_FAN2_MASK `0x0Cu`
define EMC2305_PWM_FAN2_SHIFT
#define EMC2305_PWM_FAN2_SHIFT `2u`
define EMC2305_PWM_FAN3_MASK
#define EMC2305_PWM_FAN3_MASK `0x30u`
define EMC2305_PWM_FAN3_SHIFT
#define EMC2305_PWM_FAN3_SHIFT `4u`
define EMC2305_PWM_FAN4_MASK
#define EMC2305_PWM_FAN4_MASK `0x03u`
define EMC2305_PWM_FAN4_SHIFT
#define EMC2305_PWM_FAN4_SHIFT `0u`
define EMC2305_PWM_FAN5_MASK
#define EMC2305_PWM_FAN5_MASK `0x0Cu`
define EMC2305_PWM_FAN5_SHIFT
#define EMC2305_PWM_FAN5_SHIFT `2u`
define EMC2305_QUEUE_ITEM_SIZE
#define EMC2305_QUEUE_ITEM_SIZE `sizeof( EMC2305_I2C_Message )`
define EMC2305_QUEUE_LENGTH
#define EMC2305_QUEUE_LENGTH `10`
define EMC2305_REG_CONFIGURATION
#define EMC2305_REG_CONFIGURATION `0x20u`
define EMC2305_REG_DRIVE_FAIL_STATUS
#define EMC2305_REG_DRIVE_FAIL_STATUS `0x27u`
define EMC2305_REG_FAN1_CONFIG1
#define EMC2305_REG_FAN1_CONFIG1 `0x32u`
define EMC2305_REG_FAN1_CONFIG2
#define EMC2305_REG_FAN1_CONFIG2 `0x33u`
define EMC2305_REG_FAN1_DRVFAIL_H
#define EMC2305_REG_FAN1_DRVFAIL_H `0x3Bu`
define EMC2305_REG_FAN1_DRVFAIL_L
#define EMC2305_REG_FAN1_DRVFAIL_L `0x3Au`
define EMC2305_REG_FAN1_MAX_STEP
#define EMC2305_REG_FAN1_MAX_STEP `0x37u`
define EMC2305_REG_FAN1_MIN_DRIVE
#define EMC2305_REG_FAN1_MIN_DRIVE `0x38u`
define EMC2305_REG_FAN1_SETTING
#define EMC2305_REG_FAN1_SETTING `0x30u`
define EMC2305_REG_FAN1_SPIN
#define EMC2305_REG_FAN1_SPIN `0x36u`
define EMC2305_REG_FAN1_TACH_READING_H
#define EMC2305_REG_FAN1_TACH_READING_H `0x3Eu`
define EMC2305_REG_FAN1_TACH_READING_L
#define EMC2305_REG_FAN1_TACH_READING_L `0x3Fu`
define EMC2305_REG_FAN1_TACH_TARGET_H
#define EMC2305_REG_FAN1_TACH_TARGET_H `0x3Du`
define EMC2305_REG_FAN1_TACH_TARGET_L
#define EMC2305_REG_FAN1_TACH_TARGET_L `0x3Cu`
define EMC2305_REG_FAN1_VALID_TACH
#define EMC2305_REG_FAN1_VALID_TACH `0x39u`
define EMC2305_REG_FAN_INTERRUPT_ENABLE
#define EMC2305_REG_FAN_INTERRUPT_ENABLE `0x29u`
define EMC2305_REG_FAN_SPIN_STATUS
#define EMC2305_REG_FAN_SPIN_STATUS `0x26u`
define EMC2305_REG_FAN_STALL_STATUS
#define EMC2305_REG_FAN_STALL_STATUS `0x25u`
define EMC2305_REG_FAN_STATUS
#define EMC2305_REG_FAN_STATUS `0x24u`
define EMC2305_REG_GAIN1
#define EMC2305_REG_GAIN1 `0x35u`
define EMC2305_REG_MANUFACTURER_ID
#define EMC2305_REG_MANUFACTURER_ID `0xFEu`
define EMC2305_REG_PRODUCT_FEAT
#define EMC2305_REG_PRODUCT_FEAT `0xFCu`
define EMC2305_REG_PRODUCT_ID
#define EMC2305_REG_PRODUCT_ID `0xFDu`
define EMC2305_REG_PWM1_DIVIDE
#define EMC2305_REG_PWM1_DIVIDE `0x31u`
define EMC2305_REG_PWM_BASEF123
#define EMC2305_REG_PWM_BASEF123 `0x2Du`
define EMC2305_REG_PWM_BASEF45
#define EMC2305_REG_PWM_BASEF45 `0x2Cu`
define EMC2305_REG_PWM_OUTPUT_CONFIG
#define EMC2305_REG_PWM_OUTPUT_CONFIG `0x2Bu`
define EMC2305_REG_PWM_POLARITY
#define EMC2305_REG_PWM_POLARITY `0x2Au`
define EMC2305_REG_REVISION
#define EMC2305_REG_REVISION `0xFFu`
define EMC2305_REG_SW_LOCK
#define EMC2305_REG_SW_LOCK `0xEFu`
define EMC2305_SEMAPHORE_POOL_SIZE
#define EMC2305_SEMAPHORE_POOL_SIZE `EMC2305_QUEUE_LENGTH`
define EMC2305_STAT_DRVFAIL
#define EMC2305_STAT_DRVFAIL `(1u << 2) /* Drive fail summary */`
define EMC2305_STAT_FNSPIN
#define EMC2305_STAT_FNSPIN `(1u << 1) /* spin-up failure summary */`
define EMC2305_STAT_FNSTL
#define EMC2305_STAT_FNSTL `(1u << 0) /* stall summary */`
define EMC2305_STAT_WATCH
#define EMC2305_STAT_WATCH `(1u << 7) /* WATCH - watchdog fired (read-to-clear) */`
define EMC2305_SWL
#define EMC2305_SWL `(1u << 0)`
define EMC2305_TACH_MULT
#define EMC2305_TACH_MULT `2u`
define EMC2305_TACH_RPM_CONV
#define EMC2305_TACH_RPM_CONV `3932160u`
The documentation for this class was generated from the following file driver/Inc/EMC2305.h