Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
hal_i2c_master.c File Reference

I2C master HAL layer implementation. More...

#include "hal_i2c_master.h"
#include <stdint.h>
#include <stdio.h>
#include "cascoda-bm/cascoda_sensorif.h"
Include dependency graph for hal_i2c_master.c:

Macros

#define I2C_MODULE_COUNT   2
 

Functions

void pop_first_element (uint8_t *ini_data, u8_t *mod_data, uint8_t len)
 
err_t hal_i2c_master_open (handle_t *handle, bool hal_obj_open_state)
 Open the I2C Master HAL object. More...
 
void hal_i2c_master_set_slave_address (handle_t *handle, hal_i2c_master_config_t *config)
 Set I2C slave address. More...
 
err_t hal_i2c_master_read (handle_t handle, uint8_t *read_data_buf, size_t len_read_data)
 Read data from the I2C bus. More...
 
err_t hal_i2c_master_write (handle_t handle, uint8_t *write_data_buf, size_t len_write_data)
 Write data to the I2C bus. More...
 
err_t hal_i2c_master_write_then_read (handle_t handle, uint8_t *write_data_buf, size_t len_write_data, uint8_t *read_data_buf, size_t len_read_data)
 Write data followed by read. More...
 
err_t hal_i2c_master_close (handle_t *handle)
 Closes I2C Master HAL object. More...
 
void hal_i2c_master_configure_default (hal_i2c_master_config_t *config)
 Configure I2C Master HAL configuration structure. More...
 
err_t hal_i2c_master_set_speed (handle_t *handle, hal_i2c_master_config_t *config)
 Set I2C master module speed. More...
 
void hal_i2c_master_set_timeout (handle_t *handle, hal_i2c_master_config_t *config)
 Set I2C master timeout value. More...
 

Variables

int num = 0
 

Detailed Description

I2C master HAL layer implementation.

Macro Definition Documentation

◆ I2C_MODULE_COUNT

#define I2C_MODULE_COUNT   2

Function Documentation

◆ pop_first_element()

void pop_first_element ( uint8_t *  ini_data,
u8_t mod_data,
uint8_t  len 
)

Variable Documentation

◆ num

int num = 0