FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
i2c::I2CAsyncDebugManager< MODE_, POLICY_, DEBUG_HOOK_ > Class Template Reference

Asynchronous I2C Manager for ATmega architecture with debug facility. More...

#include <fastarduino/i2c_handler_atmega.h>

Inheritance diagram for i2c::I2CAsyncDebugManager< MODE_, POLICY_, DEBUG_HOOK_ >:
Collaboration diagram for i2c::I2CAsyncDebugManager< MODE_, POLICY_, DEBUG_HOOK_ >:

Public Member Functions

template<uint8_t SIZE>
 I2CAsyncDebugManager (typename PARENT::I2CCOMMAND(&buffer)[SIZE], DEBUG_HOOK_ debug_hook)
 Create an asynchronous I2C Manager for ATmega MCUs. More...
 
- Public Member Functions inherited from i2c::AbstractI2CAsyncManager< MODE_, POLICY_, HAS_STATUS_, STATUS_HOOK_, HAS_DEBUG_, 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_, POLICY_, HAS_STATUS_, STATUS_HOOK_, HAS_DEBUG_, DEBUG_HOOK_ >
using ABSTRACT_FUTURE = future::AbstractFuture
 The abstract base class of all futures to be defined for this I2C Manager. More...
 
template<typename OUT , typename IN >
using FUTURE = future::Future< OUT, IN >
 The template base class of all futures to be defined for this I2C Manager. More...
 
using I2CCOMMAND = I2CCommand< ABSTRACT_FUTURE >
 The type of I2CCommand to use in the buffer passed to the constructor of this AbstractI2CAsyncManager. More...
 

Detailed Description

template<I2CMode MODE_, I2CErrorPolicy POLICY_ = I2CErrorPolicy::CLEAR_ALL_COMMANDS, typename DEBUG_HOOK_ = I2C_DEBUG_HOOK>
class i2c::I2CAsyncDebugManager< MODE_, POLICY_, DEBUG_HOOK_ >

Asynchronous I2C Manager for ATmega architecture with debug facility.

This class offers no support for dynamic proxies.

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
DEBUG_HOOK_the type of the hook to be called. This can be a simple function pointer (of type I2C_DEBUG_HOOK) or a Functor class (or Functor class reference). Using a Functor class will generate smaller code.
See also
i2c::I2CMode
i2c::I2CErrorPolicy
REGISTER_I2C_ISR()
REGISTER_I2C_ISR_FUNCTION()
REGISTER_I2C_ISR_METHOD()

Definition at line 808 of file i2c_handler_atmega.h.

Constructor & Destructor Documentation

◆ I2CAsyncDebugManager()

template<I2CMode MODE_, I2CErrorPolicy POLICY_ = I2CErrorPolicy::CLEAR_ALL_COMMANDS, typename DEBUG_HOOK_ = I2C_DEBUG_HOOK>
template<uint8_t SIZE>
i2c::I2CAsyncDebugManager< MODE_, POLICY_, DEBUG_HOOK_ >::I2CAsyncDebugManager ( typename PARENT::I2CCOMMAND(&)  buffer[SIZE],
DEBUG_HOOK_  debug_hook 
)
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
debug_hookthe debug hook function or functor that is called during I2C transaction execution.

Definition at line 824 of file i2c_handler_atmega.h.


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