no-OS
stm32_i2c.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef STM32_I2C_H_
40 #define STM32_I2C_H_
41 
42 #include <stdint.h>
43 #include "no_os_i2c.h"
44 #include "stm32_hal.h"
45 
52  I2C_HandleTypeDef hi2c;
53 };
54 
58 extern const struct no_os_i2c_platform_ops stm32_i2c_ops;
59 
60 #endif // STM32_I2C_H_
stm32_i2c_ops
const struct no_os_i2c_platform_ops stm32_i2c_ops
stm32 specific I2C platform ops structure
Definition: stm32_i2c.c:214
stm32_i2c.h
Header file for the stm32 i2c driver.
no_os_i2c_init_param::slave_address
uint8_t slave_address
Definition: no_os_i2c.h:70
stm32_i2c_desc::hi2c
I2C_HandleTypeDef hi2c
Definition: stm32_i2c.h:52
no_os_i2c_desc::device_id
uint32_t device_id
Definition: no_os_i2c.h:83
stm32_i2c_read
int32_t stm32_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C read transaction as master.
Definition: stm32_i2c.c:186
no_os_i2c_desc::slave_address
uint8_t slave_address
Definition: no_os_i2c.h:87
no_os_i2c_init_param::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_i2c.h:68
stm32_i2c_ops
const struct no_os_i2c_platform_ops stm32_i2c_ops
stm32 platform specific I2C platform ops structure
Definition: stm32_i2c.c:214
no_os_i2c_desc::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_i2c.h:85
no_os_i2c_platform_ops
Structure holding I2C function pointers that point to the platform specific function.
Definition: no_os_i2c.h:99
stm32_i2c_remove
int32_t stm32_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: stm32_i2c.c:130
no_os_i2c_platform_ops::i2c_ops_init
int32_t(* i2c_ops_init)(struct no_os_i2c_desc **, const struct no_os_i2c_init_param *)
Definition: no_os_i2c.h:101
stm32_i2c_init
int32_t stm32_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: stm32_i2c.c:51
no_os_i2c_desc
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
no_os_i2c.h
Header file of I2C Interface.
stm32_i2c_desc
stm32 platform specific I2C descriptor
Definition: stm32_i2c.h:50
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
NULL
#define NULL
Definition: wrapper.h:64
stm32_i2c_write
int32_t stm32_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C write transaction as master.
Definition: stm32_i2c.c:152
no_os_util.h
Header file of utility functions.
no_os_i2c_desc::extra
void * extra
Definition: no_os_i2c.h:91
no_os_i2c_init_param::device_id
uint32_t device_id
Definition: no_os_i2c.h:66
stm32_hal.h
errno.h
Error macro definition for ARM Compiler.