36#ifndef _FREERTOS_DRIVERS_ST_STM32I2C_HXX_
37#define _FREERTOS_DRIVERS_ST_STM32I2C_HXX_
54 Stm32I2C(
const char *
name, I2C_TypeDef *port, uint32_t ev_interrupt,
55 uint32_t er_interrupt);
89 int transfer(
struct i2c_msg *msg,
bool stop)
override;
const char * name
device name
Private data for an I2C device.
This class provides a counting semaphore API.
Specialization of I2C driver for STM32 devices.
void error_interrupt_handler()
Call this function from the specific i2c interrupt routine in HwInit.
I2C_HandleTypeDef i2cHandle_
Stm32 HAL device structure.
void error_from_isr()
Internal. This function is called from the error ISR callback.
void disable() override
function to disable device
OSSem sem
Semaphore to wakeup task level from ISR.
void enable() override
function to enable device
Stm32I2C()
Default constructor.
int error_
Pending transfer error field.
void event_interrupt_handler()
Call this function from the specific i2c interrupt routine in HwInit.
void complete_from_isr()
Internal. This function is called from the complete ISR callback.
int transfer(struct i2c_msg *msg, bool stop) override
Method to transmit/receive the data.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.