|
OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>#include <string.h>#include <logging/log.h>#include "sensor.h"#include "hal_i2c.h"#include "emc1413.h"
Classes | |
| struct | _temp_mapping_register |
Macros | |
| #define | EMC1413_STATUS_REG 0x02 |
| #define | EMC1413_EXTERNAL_DIODE_FAULT_REG 0x1B |
| #define | EMC1413_HIGH_LIMIT_STATUS_REG 0x35 |
| #define | EMC1413_LOW_LIMIT_STATUS_REG 0x36 |
| #define | EMC1413_THERM_LIMIT_STATUS_REG 0x37 |
| #define | EMC1413_DEFAULT_RESOLUTION 0.125 |
| #define | EMC1413_TEMP_SHIFT_BIT 5 |
| #define | EMC1413_CONFIG_REG1 0x03 |
| #define | EMC1413_THERM_HYSTERESIS_REG 0x21 |
Typedefs | |
| typedef struct _temp_mapping_register | temp_mapping_register |
Functions | |
| LOG_MODULE_REGISTER (dev_emc1413) | |
| bool | get_emc1413_two_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
| bool | get_emc1413_one_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
| bool | emc1413_get_temp_threshold (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
| bool | set_emc1413_two_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
| bool | set_emc1413_one_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
| bool | emc1413_set_temp_threshold (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
| bool | emc1413_set_comparator_mode (sensor_cfg *cfg) |
| bool | emc1413_set_therm_hysteresis (sensor_cfg *cfg, uint8_t temp_therm_hysteresis_val) |
| uint8_t | emc1413_read (sensor_cfg *cfg, int *reading) |
| bool | emc1413_get_temp_status (sensor_cfg *cfg, uint8_t *temp_status) |
| bool | emc1413_clear_temp_status (sensor_cfg *cfg) |
| uint8_t | emc1413_init (sensor_cfg *cfg) |
Variables | |
| temp_mapping_register | emc1413_temp_register_map [] |
| #define EMC1413_CONFIG_REG1 0x03 |
| #define EMC1413_DEFAULT_RESOLUTION 0.125 |
| #define EMC1413_EXTERNAL_DIODE_FAULT_REG 0x1B |
| #define EMC1413_HIGH_LIMIT_STATUS_REG 0x35 |
| #define EMC1413_LOW_LIMIT_STATUS_REG 0x36 |
| #define EMC1413_STATUS_REG 0x02 |
| #define EMC1413_TEMP_SHIFT_BIT 5 |
| #define EMC1413_THERM_HYSTERESIS_REG 0x21 |
| #define EMC1413_THERM_LIMIT_STATUS_REG 0x37 |
| typedef struct _temp_mapping_register temp_mapping_register |
| bool emc1413_clear_temp_status | ( | sensor_cfg * | cfg | ) |

| bool emc1413_get_temp_status | ( | sensor_cfg * | cfg, |
| uint8_t * | temp_status | ||
| ) |

| bool emc1413_get_temp_threshold | ( | sensor_cfg * | cfg, |
| uint8_t | temp_threshold_index, | ||
| uint32_t * | millidegree_celsius | ||
| ) |

| uint8_t emc1413_init | ( | sensor_cfg * | cfg | ) |

| uint8_t emc1413_read | ( | sensor_cfg * | cfg, |
| int * | reading | ||
| ) |

| bool emc1413_set_comparator_mode | ( | sensor_cfg * | cfg | ) |

| bool emc1413_set_temp_threshold | ( | sensor_cfg * | cfg, |
| uint8_t | temp_threshold_index, | ||
| uint32_t * | millidegree_celsius | ||
| ) |

| bool emc1413_set_therm_hysteresis | ( | sensor_cfg * | cfg, |
| uint8_t | temp_therm_hysteresis_val | ||
| ) |

| bool get_emc1413_one_byte_limit | ( | sensor_cfg * | cfg, |
| uint8_t | temp_threshold_index, | ||
| uint32_t * | millidegree_celsius | ||
| ) |

| bool get_emc1413_two_byte_limit | ( | sensor_cfg * | cfg, |
| uint8_t | temp_threshold_index, | ||
| uint32_t * | millidegree_celsius | ||
| ) |

| LOG_MODULE_REGISTER | ( | dev_emc1413 | ) |
| bool set_emc1413_one_byte_limit | ( | sensor_cfg * | cfg, |
| uint8_t | temp_threshold_index, | ||
| uint32_t * | millidegree_celsius | ||
| ) |

| bool set_emc1413_two_byte_limit | ( | sensor_cfg * | cfg, |
| uint8_t | temp_threshold_index, | ||
| uint32_t * | millidegree_celsius | ||
| ) |

| temp_mapping_register emc1413_temp_register_map[] |