15#include "pico/i2c_slave.h"
16#include "pico/stdlib.h"
21#include "hardware/irq.h"
55 uint8_t *source_address,
79 uint8_t *destination_address,
Class to manage a DMA channel.
Definition hw_dma.h:32
HW_I2C_Master(struct_ConfigMasterI2C master_config)
Construct a new hw i2c master object.
Definition hw_i2c.cpp:7
~rtos_HW_I2C_Master()
Destructor of the class.
Definition rtos_hw_i2c.cpp:22
struct_I2CXferResult burst_byte_write(uint8_t slave_address, uint8_t mem_addr, uint8_t *source_address, size_t length)
a function member to write a burst of data to a slave device, using DMA and FreeRTOS queue
Definition rtos_hw_i2c.cpp:27
SemaphoreHandle_t i2c_access_mutex
semaphore to protect access to the I2C bus
Definition rtos_hw_i2c.h:38
rtos_HW_I2C_Master(struct_ConfigMasterI2C cfg)
Constructor of the class.
Definition rtos_hw_i2c.cpp:13
SemaphoreHandle_t i2c_tx_FIFO_empty
semaphore to signal the TX FIFO of I2C is empty
Definition rtos_hw_i2c.h:36
HW_DMA * tx_dma
the DMA channel used for I2C TX
Definition rtos_hw_i2c.h:33
void i2c_dma_isr()
the I2C IRQ handler, to be called in the main program IRQ map
Definition rtos_hw_i2c.cpp:238
struct_I2CXferResult burst_byte_read(uint8_t slave_address, uint8_t mem_address, uint8_t *destination_address, size_t length)
a convenient C++ member wrapper to read a block of data starting at a slave memory address,...
Definition rtos_hw_i2c.cpp:161
struct_I2CXferResult repeat_byte_write(uint8_t slave_address, uint8_t mem_addr, uint8_t pattern, size_t length)
a function member to write a burst of data to a slave device, using DMA and FreeRTOS queue
Definition rtos_hw_i2c.cpp:94
The configuration data of I2C interface used as Master.
Definition hw_i2c.h:61
this data structure collects result when an I2C transfer is done. It gives a more verbose error descr...
Definition hw_i2c.h:33