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

NCA9595 Driver. More...

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

Functions

FctERR NCA9595_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization for NCA9595 peripheral.
 
FctERR NCA9595_Init_Single (void)
 Initialization for NCA9595 peripheral.
 
FctERR NCA9595_Write_Word (I2C_slave_t *const pSlave, const uint16_t *data, const uint16_t addr)
 I2C Write function for NCA9595.
 
FctERR NCA9595_Read_Word (I2C_slave_t *const pSlave, uint16_t *data, const uint16_t addr)
 I2C Read function for NCA9595.
 

Detailed Description

NCA9595 Driver.

Author
SMFSW

NCA9595: Low-voltage 16-bit I²C and SMBus I/O expander

Function Documentation

◆ NCA9595_Init()

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

Initialization for NCA9595 peripheral.

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

◆ NCA9595_Init_Single()

FctERR NCA9595_Init_Single ( void )

Initialization for NCA9595 peripheral.

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

◆ NCA9595_Read_Word()

FctERR NCA9595_Read_Word ( I2C_slave_t *const pSlave,
uint16_t * data,
const uint16_t addr )

I2C Read function for NCA9595.

Note
Reads 8bits register pair (address shall be even for little endian / odd for big endian)
Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NCA9595_Write_Word()

FctERR NCA9595_Write_Word ( I2C_slave_t *const pSlave,
const uint16_t * data,
const uint16_t addr )

I2C Write function for NCA9595.

Note
Writes 8bits register pair (address shall be even for little endian / odd for big endian)
Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: