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

MCP9808 Driver extensions. More...

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

Functions

FctERR MCP9808_Write_Config (MCP9808_t *const pCpnt, const uint16_t cfg)
 Write MCP9808 configuration.
 
FctERR MCP9808_Shutdown (MCP9808_t *const pCpnt, const bool shutdown)
 Write MCP9808 configuration.
 
FctERR MCP9808_Set_AlertHysteresis (MCP9808_t *const pCpnt, const MCP9808_hyst hys)
 Set MCP9808 alert hysteresis.
 
FctERR MCP9808_Set_AlertType (MCP9808_t *const pCpnt, const bool comparator)
 Set MCP9808 alert type.
 
FctERR MCP9808_Set_AlertOutput (MCP9808_t *const pCpnt, const bool en, const bool alt)
 Set MCP9808 alert enable.
 
FctERR MCP9808_Set_AlertLock (MCP9808_t *const pCpnt, const MCP9808_alert alt, const bool lock)
 Set MCP9808 alert lock.
 
FctERR MCP9808_Set_Resolution (MCP9808_t *const pCpnt, const MCP9808_res res)
 Set MCP9808 Resolution.
 
FctERR MCP9808_Get_Resolution (MCP9808_t *const pCpnt, MCP9808_res *const res)
 Get MCP9808 Resolution.
 
void MCP9808_Alert_GPIO_Init (MCP9808_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Alert GPIO pin init for MCP9808.
 
bool MCP9808_Alert_GPIO_Get (const MCP9808_t *const pCpnt)
 Change GPIO pin getter for MCP9808.
 

Detailed Description

MCP9808 Driver extensions.

Author
SMFSW

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

Function Documentation

◆ MCP9808_Alert_GPIO_Get()

bool MCP9808_Alert_GPIO_Get ( const MCP9808_t *const pCpnt)

Change GPIO pin getter for MCP9808.

Weak Functions
MCP9808 Change GPIO pin getter may be user implemented if needed
Parameters
[in]pCpnt- Pointer to MCP9808 component
Returns
Alert pin state value (0: inactive, 1: active)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP9808_Alert_GPIO_Init()

void MCP9808_Alert_GPIO_Init ( MCP9808_t *const pCpnt,
GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Alert GPIO pin init for MCP9808.

Weak Functions
MCP9808 Alert GPIO pin init may be user implemented if needed
Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]GPIOx- Alert port
[in]GPIO_Pin- Alert pin
[in]GPIO_ActiveAlert pin active state
Here is the call graph for this function:

◆ MCP9808_Get_Resolution()

FctERR MCP9808_Get_Resolution ( MCP9808_t *const pCpnt,
MCP9808_res *const res )

Get MCP9808 Resolution.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in,out]res- pointer to Resolution to read to
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP9808_Set_AlertHysteresis()

FctERR MCP9808_Set_AlertHysteresis ( MCP9808_t *const pCpnt,
const MCP9808_hyst hys )

Set MCP9808 alert hysteresis.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]hys- Alert hysteresis
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP9808_Set_AlertLock()

FctERR MCP9808_Set_AlertLock ( MCP9808_t *const pCpnt,
const MCP9808_alert alt,
const bool lock )

Set MCP9808 alert lock.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]alt- Alert type
[in]lock- 0 Unlocked, 1 Locked
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP9808_Set_AlertOutput()

FctERR MCP9808_Set_AlertOutput ( MCP9808_t *const pCpnt,
const bool en,
const bool alt )

Set MCP9808 alert enable.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]en- 0 Disabled, 1 Enabled
[in]alt- 0 Low, 1 High
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP9808_Set_AlertType()

FctERR MCP9808_Set_AlertType ( MCP9808_t *const pCpnt,
const bool comparator )

Set MCP9808 alert type.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]comparator- 0 ???, 1 Comparator
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP9808_Set_Resolution()

FctERR MCP9808_Set_Resolution ( MCP9808_t *const pCpnt,
const MCP9808_res res )

Set MCP9808 Resolution.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]res- Resolution for MCP9808
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP9808_Shutdown()

FctERR MCP9808_Shutdown ( MCP9808_t *const pCpnt,
const bool shutdown )

Write MCP9808 configuration.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]shutdown- 0 Normal operation, 1 Shutdown
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP9808_Write_Config()

FctERR MCP9808_Write_Config ( MCP9808_t *const pCpnt,
const uint16_t cfg )

Write MCP9808 configuration.

Parameters
[in]pCpnt- Pointer to MCP9808 component
[in]cfg- Configuration value
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: