I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
MCP9808.c File Reference

MCP9808 Driver. More...

#include "MCP9808.h"
Include dependency graph for MCP9808.c:

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.
 

Detailed Description

MCP9808 Driver.

Author
SMFSW

MCP9808: +/-0.5C Maximum Accuracy Digital Temperature Sensor

Function Documentation

◆ MCP9808_Init()

FctERR MCP9808_Init ( const uint8_t idx,
I2C_HandleTypeDef *const hi2c,
const uint16_t devAddress )

Initialization of the MCP9808 peripheral.

Parameters
[in]idx- MCP9808 index
[in]hi2c- pointer to MCP9808 I2C instance
[in]devAddress- MCP9808 device address
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP9808_Init_Single()

FctERR MCP9808_Init_Single ( void )

Initialization for MCP9808 peripheral.

Warning
In case multiple devices (defined by I2C_MCP9808_NB > 1), you shall use MCP9808_Init instead
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP9808_Read()

FctERR MCP9808_Read ( I2C_slave_t *const pSlave,
uint16_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Read function for MCP9808.

Parameters
[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
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP9808_Write()

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.

Parameters
[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
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: