FastArduino  v1.9
C++ library to build fast but small Arduino/AVR projects
i2c::I2CAsyncLCManager< MODE_, POLICY_ > Class Template Reference

Asynchronous I2C Manager for ATmega architecture with support for dynamic proxies. More...

#include <fastarduino/i2c_handler_atmega.h>

Inheritance diagram for i2c::I2CAsyncLCManager< MODE_, POLICY_ >:
Collaboration diagram for i2c::I2CAsyncLCManager< MODE_, POLICY_ >:

Public Member Functions

template<uint8_t SIZE>
 I2CAsyncLCManager (typename PARENT::I2CCOMMAND(&buffer)[SIZE], lifecycle::AbstractLifeCycleManager &lifecycle_manager)
 Create an asynchronous I2C Manager for ATmega MCUs. More...
 
- Public Member Functions inherited from i2c::AbstractI2CAsyncManager< MODE_, I2CErrorPolicy::CLEAR_ALL_COMMANDS, true, false, I2C_STATUS_HOOK, false, I2C_DEBUG_HOOK >
void begin ()
 Prepare and enable the MCU for I2C transmission. More...
 
void end ()
 Disable MCU I2C transmission. More...
 
void begin_ ()
 Prepare and enable the MCU for I2C transmission. More...
 
void end_ ()
 Disable MCU I2C transmission. More...
 

Additional Inherited Members

- Public Types inherited from i2c::AbstractI2CAsyncManager< MODE_, I2CErrorPolicy::CLEAR_ALL_COMMANDS, true, false, I2C_STATUS_HOOK, false, I2C_DEBUG_HOOK >
using ABSTRACT_FUTURE = future::AbstractFuture
 
using PROXY = typename LC::template PROXY< T >
 
using FUTURE = future::Future< OUT, IN >
 
using FUTURE_PROXY = PROXY< ABSTRACT_FUTURE >
 The type passed to callback functions registered alongside ISR. More...
 
using I2CCOMMAND = I2CCommand< FUTURE_PROXY >
 The type of I2CCommand to use in the buffer passed to the constructor of this AbstractI2CAsyncManager.
 

Detailed Description

template<I2CMode MODE_, I2CErrorPolicy POLICY_ = I2CErrorPolicy::CLEAR_ALL_COMMANDS>
class i2c::I2CAsyncLCManager< MODE_, POLICY_ >

Asynchronous I2C Manager for ATmega architecture with support for dynamic proxies.

This class offers no debug facility.

Warning
You need to register the proper ISR for this class to work properly.
Template Parameters
MODE_the I2C mode for this manager
POLICY_the policy to use in case of an error during I2C transaction
See also
i2c::I2CMode
i2c::I2CErrorPolicy
REGISTER_I2C_ISR()
REGISTER_I2C_ISR_FUNCTION()
REGISTER_I2C_ISR_METHOD()

Definition at line 996 of file i2c_handler_atmega.h.

Constructor & Destructor Documentation

◆ I2CAsyncLCManager()

template<I2CMode MODE_, I2CErrorPolicy POLICY_ = I2CErrorPolicy::CLEAR_ALL_COMMANDS>
template<uint8_t SIZE>
i2c::I2CAsyncLCManager< MODE_, POLICY_ >::I2CAsyncLCManager ( typename PARENT::I2CCOMMAND(&)  buffer[SIZE],
lifecycle::AbstractLifeCycleManager lifecycle_manager 
)
inlineexplicit

Create an asynchronous I2C Manager for ATmega MCUs.

Template Parameters
SIZEthe size of I2CCommand buffer that will be queued for asynchronous handling
Parameters
buffera buffer of SIZE I2CCommand items, that will be used to queue I2C command for asynchronous handling
lifecycle_managerthe AbstractLifeCycleManager used to handle the lifecycle of Future used by this I2C Manager

Definition at line 1012 of file i2c_handler_atmega.h.


The documentation for this class was generated from the following file: