|
I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
|
MCP9808 Driver. More...
#include "sarmfsw.h"#include "I2C_component.h"#include "I2C_peripheral.h"#include "MCP9808_proc.h"#include "MCP9808_ex.h"

Data Structures | |
| union | uMCP9808_REG__CFG |
| Union for CFG of MCP9808. More... | |
| union | uMCP9808_REG__TEMP_LIM |
| Union for Temperature Limit registers of MCP9808. More... | |
| union | uMCP9808_REG__TEMP_AMB |
| Union for Ambient temperature register of MCP9808. More... | |
Macros | |
| #define | I2C_MCP9808_NB 1U |
| Number of MCP9808 peripherals. | |
| #define | MCP9808_ADDR 0x18U |
| MCP9808 address. | |
| #define | MCP9808_BASE_ADDR MCP9808_ADDR |
| MCP9808 Base address. | |
Enumerations | |
| enum | MCP9808_reg { MCP9808__RFU = 0U , MCP9808__CONFIGURATION , MCP9808__ALERT_UPPER , MCP9808__ALERT_LOWER , MCP9808__CRITICAL_TEMP_TRIP , MCP9808__TEMPERATURE , MCP9808__MANUFACTURER_ID , MCP9808__DEVICE_ID , MCP9808__RESOLUTION } |
| Register map enum of MCP9808. More... | |
| enum | MCP9808_res { MCP9808__RES_0_5 = 0U , MCP9808__RES_0_25 , MCP9808__RES_0_125 , MCP9808__RES_0_0625 } |
| Resolution enum of MCP9808. More... | |
| enum | MCP9808_hyst { MCP9808__HYST_0 = 0U , MCP9808__HYST_1_5 , MCP9808__HYST_3_0 , MCP9808__HYST_6_0 } |
| Resolution enum of MCP9808. More... | |
Functions | |
| FctERR | MCP9808_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress) |
| Initialization of the MCP9808 peripheral. | |
| FctERR | MCP9808_Init_Single (void) |
| Initialization for MCP9808 peripheral. | |
| FctERR | MCP9808_Write (I2C_slave_t *const pSlave, const uint16_t *data, const uint16_t addr, const uint16_t nb) |
| I2C Write function for MCP9808. | |
| FctERR | MCP9808_Read (I2C_slave_t *const pSlave, uint16_t *data, const uint16_t addr, const uint16_t nb) |
| I2C Read function for MCP9808. | |
MCP9808 Driver.
MCP9808: +/-0.5C Maximum Accuracy Digital Temperature Sensor
| #define I2C_MCP9808_NB 1U |
Number of MCP9808 peripherals.
| #define MCP9808_ADDR 0x18U |
MCP9808 address.
| #define MCP9808_BASE_ADDR MCP9808_ADDR |
MCP9808 Base address.
| enum MCP9808_hyst |
| enum MCP9808_reg |
Register map enum of MCP9808.
| enum MCP9808_res |
| FctERR MCP9808_Init | ( | const uint8_t | idx, |
| I2C_HandleTypeDef *const | hi2c, | ||
| const uint16_t | devAddress ) |
Initialization of the MCP9808 peripheral.
| [in] | idx | - MCP9808 index |
| [in] | hi2c | - pointer to MCP9808 I2C instance |
| [in] | devAddress | - MCP9808 device address |


| FctERR MCP9808_Init_Single | ( | void | ) |
Initialization for MCP9808 peripheral.

| FctERR MCP9808_Read | ( | I2C_slave_t *const | pSlave, |
| uint16_t * | data, | ||
| const uint16_t | addr, | ||
| const uint16_t | nb ) |
I2C Read function for MCP9808.
| [in,out] | pSlave | - Pointer to I2C slave instance |
| [in,out] | data | - pointer to read to (16b type pointer) |
| [in] | addr | - Address to read from |
| [in] | nb | - Number of bytes to read |


| FctERR MCP9808_Write | ( | I2C_slave_t *const | pSlave, |
| const uint16_t * | data, | ||
| const uint16_t | addr, | ||
| const uint16_t | nb ) |
I2C Write function for MCP9808.
| [in,out] | pSlave | - Pointer to I2C slave instance |
| [in] | data | - pointer to write from (16b type pointer) |
| [in] | addr | - Address to write to |
| [in] | nb | - Number of bytes to write |

