Base class for I2C abstraction.
More...
#include <i2c.hpp>
|
using | Impl = I2CImpl< Context > |
|
template<auto Context, template< auto > typename I2CImpl>
struct bsp::drv::I2C< Context, I2CImpl >
Base class for I2C abstraction.
- Template Parameters
-
Context | I2C context |
I2CImpl | I2C implementation |
◆ Impl
template<auto Context, template< auto > typename I2CImpl>
◆ I2C()
template<auto Context, template< auto > typename I2CImpl>
◆ deinit()
template<auto Context, template< auto > typename I2CImpl>
static auto bsp::drv::I2C< Context, I2CImpl >::deinit |
( |
auto ... |
args | ) |
|
|
inlinestatic |
I2C deinitialization.
- Parameters
-
args | Platform specific arguments |
- Returns
- Success
◆ init()
template<auto Context, template< auto > typename I2CImpl>
static auto bsp::drv::I2C< Context, I2CImpl >::init |
( |
auto ... |
args | ) |
|
|
inlinestatic |
I2C initialization.
- Parameters
-
args | Platform specific arguments |
- Returns
- Success
◆ read() [1/2]
template<auto Context, template< auto > typename I2CImpl>
template<typename T >
I2C read function.
- Template Parameters
-
- Parameters
-
- Returns
- Read data
◆ read() [2/2]
template<auto Context, template< auto > typename I2CImpl>
template<typename T >
I2C read function.
- Template Parameters
-
- Parameters
-
address | Device address |
reg | Register address |
- Returns
- Read data
◆ write() [1/2]
template<auto Context, template< auto > typename I2CImpl>
template<typename T >
static void bsp::drv::I2C< Context, I2CImpl >::write |
( |
u8 |
address, |
|
|
T |
value |
|
) |
| |
|
inlinestatic |
I2C write function.
- Template Parameters
-
- Parameters
-
address | Device address |
value | Data to write |
◆ write() [2/2]
template<auto Context, template< auto > typename I2CImpl>
template<typename T >
I2C write function.
- Template Parameters
-
- Parameters
-
address | Device address |
reg | Register address |
value | Data to write |
The documentation for this struct was generated from the following file: