Go to the documentation of this file.
33 #ifndef CHIBIOS_I2C_H_
34 #define CHIBIOS_I2C_H_
40 #if (HAL_USE_I2C==TRUE)
76 static uint8_t* chI2CBuffer;
77 static uint16_t buffSize;
79 #endif // HAL_USE_I2C==TRUE
81 #endif // CHIBIOS_I2C_H_
I2CDriver * hi2c
Definition: chibios_i2c.h:48
ChibiOS i2c param struct.
Definition: chibios_i2c.h:60
uint16_t i2caddr
Definition: chibios_i2c.h:52
int chibios_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: chibios_i2c.c:124
uint8_t slave_address
Definition: no_os_i2c.h:70
int chibios_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: chibios_i2c.c:49
uint32_t device_id
Definition: no_os_i2c.h:105
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
void * extra
Definition: no_os_i2c.h:74
uint8_t slave_address
Definition: no_os_i2c.h:109
I2CDriver * hi2c
Definition: chibios_i2c.h:62
chibios platform specific I2C descriptor iwth config and slave address parameters
Definition: chibios_i2c.h:46
uint32_t max_speed_hz
Definition: no_os_i2c.h:68
const struct no_os_i2c_platform_ops chibios_i2c_ops
chibios specific I2C platform ops structure
Definition: chibios_i2c.c:194
uint32_t max_speed_hz
Definition: no_os_i2c.h:107
int chibios_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: chibios_i2c.c:162
I2CConfig * i2ccfg
Definition: chibios_i2c.h:64
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
Header file of I2C Interface.
const struct no_os_i2c_platform_ops chibios_i2c_ops
chibios platform specific I2C platform ops structure
Definition: chibios_i2c.c:194
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
I2CConfig * i2ccfg
Definition: chibios_i2c.h:50
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
#define NULL
Definition: wrapper.h:64
int chibios_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: chibios_i2c.c:101
Header file of utility functions.
void * extra
Definition: no_os_i2c.h:113
Header file for the chibios i2c driver.
uint32_t device_id
Definition: no_os_i2c.h:66
Error macro definition for ARM Compiler.