nPZero IC
API and Examples for the nPZero
|
Source file for nPZero Hardware Abstraction Layer (HAL) More...
Macros | |
#define | I2C_DELAY_MS 5 |
Functions | |
np0_status_e | np0_hal_read (uint8_t slave_address, uint8_t slave_register, uint8_t *pData, uint16_t size, uint32_t timeout) |
Function to read from registers over I2C. | |
np0_status_e | np0_hal_write (uint8_t slave_address, uint8_t *pData, uint16_t size, uint32_t timeout) |
Function to write to registers over I2C. | |
np0_status_e | np0_hal_init () |
Function to initialize hardware dependent I2C interface. | |
Source file for nPZero Hardware Abstraction Layer (HAL)
This file contains the hardware-specific functions and configurations for the I2C communication interface. Users are required to customize these functions according to their target hardware and MCU setup.
The functions in this file serve as an abstraction layer between the IPMIC driver and the hardware-specific I2C implementation on the target system. Users should modify these functions to match the I2C peripheral and communication protocol used in their system.
#define I2C_DELAY_MS 5 |
I2C Delay operation
np0_status_e np0_hal_init | ( | void | ) |
Function to initialize hardware dependent I2C interface.
np0_status_e np0_hal_read | ( | uint8_t | slave_address, |
uint8_t | slave_register, | ||
uint8_t * | pData, | ||
uint16_t | size, | ||
uint32_t | timeout | ||
) |
Function to read from registers over I2C.
[in] | slave_address | I2C Address for slave. |
[in] | slave_register | Register Address to read. |
[out] | pData | Pointer to data buffer where read data will be stored. |
[in] | size | Size of data to be received. |
[in] | timeout | Timeout before transmission is asserted. |
np0_status_e np0_hal_write | ( | uint8_t | slave_address, |
uint8_t * | pData, | ||
uint16_t | size, | ||
uint32_t | timeout | ||
) |
Function to write to registers over I2C.
[in] | slave_address | I2C Address for slave. |
[in] | pData | Pointer to data buffer to write. |
[in] | size | Size of data buffer to be sent. |
[in] | timeout | Timeout before transmission is asserted. |