Loading...
Searching...
No Matches
furi_hal_i2c_types.h
1#pragma once
2
3#include <stm32wbxx_ll_i2c.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9typedef struct FuriHalI2cBus FuriHalI2cBus;
11
13typedef enum {
14 FuriHalI2cBusEventInit,
15 FuriHalI2cBusEventDeinit,
16 FuriHalI2cBusEventLock,
17 FuriHalI2cBusEventUnlock,
18 FuriHalI2cBusEventActivate,
19 FuriHalI2cBusEventDeactivate,
20} FuriHalI2cBusEvent;
21
23typedef void (*FuriHalI2cBusEventCallback)(FuriHalI2cBus* bus, FuriHalI2cBusEvent event);
24
27 I2C_TypeDef* i2c;
28 FuriHalI2cBusHandle* current_handle;
29 FuriHalI2cBusEventCallback callback;
30};
31
33typedef enum {
34 FuriHalI2cBusHandleEventActivate,
35 FuriHalI2cBusHandleEventDeactivate,
36} FuriHalI2cBusHandleEvent;
37
39typedef void (*FuriHalI2cBusHandleEventCallback)(
40 FuriHalI2cBusHandle* handle,
41 FuriHalI2cBusHandleEvent event);
42
45 FuriHalI2cBus* bus;
46 FuriHalI2cBusHandleEventCallback callback;
47};
48
49#ifdef __cplusplus
50}
51#endif
FuriHal i2c handle.
Definition furi_hal_i2c_types.h:44
FuriHal i2c bus.
Definition furi_hal_i2c_types.h:26