FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
ATmega I2C Manager API. More...
#include <util/delay_basic.h>
#include "i2c.h"
#include "future.h"
#include "queue.h"
#include "interrupts.h"
#include "bits.h"
#include "utilities.h"
#include "i2c_handler_common.h"
Go to the source code of this file.
Classes | |
class | i2c::AbstractI2CSyncATmegaManager< MODE_, HAS_STATUS_, STATUS_HOOK_, HAS_DEBUG_, DEBUG_HOOK_ > |
Abstract synchronous I2C Manager for ATmega architecture. More... | |
class | i2c::AbstractI2CAsyncManager< MODE_, POLICY_, HAS_STATUS_, STATUS_HOOK_, HAS_DEBUG_, DEBUG_HOOK_ > |
Abstract asynchronous I2C Manager. More... | |
class | i2c::I2CAsyncManager< MODE_, POLICY_ > |
Asynchronous I2C Manager for ATmega architecture. More... | |
class | i2c::I2CAsyncDebugManager< MODE_, POLICY_, DEBUG_HOOK_ > |
Asynchronous I2C Manager for ATmega architecture with debug facility. More... | |
class | i2c::I2CAsyncStatusManager< MODE_, POLICY_, STATUS_HOOK_ > |
Asynchronous I2C Manager for ATmega architecture with status notification facility. More... | |
class | i2c::I2CAsyncStatusDebugManager< MODE_, POLICY_, STATUS_HOOK_, DEBUG_HOOK_ > |
Asynchronous I2C Manager for ATmega architecture with debug and status notification facilities. More... | |
class | i2c::I2CSyncManager< MODE_ > |
Synchronous I2C Manager for ATmega architecture. More... | |
class | i2c::I2CSyncStatusManager< MODE_, STATUS_HOOK_ > |
Synchronous I2C Manager for ATmega architecture wit status notification facility. More... | |
class | i2c::I2CSyncDebugManager< MODE_, DEBUG_HOOK_ > |
Synchronous I2C Manager for ATmega architecture with debug facility. More... | |
class | i2c::I2CSyncStatusDebugManager< MODE_, STATUS_HOOK_, DEBUG_HOOK_ > |
Synchronous I2C Manager for ATmega architecture with status notification and debug facility. More... | |
Namespaces | |
namespace | i2c |
Define API to define and manage I2C devices. | |
Macros | |
#define | I2C_TRUE_ASYNC 1 |
This macro indicates if truly asynchronous I2C management is available for a platform: More... | |
#define | REGISTER_I2C_ISR(MANAGER) |
Register the necessary ISR (Interrupt Service Routine) for an asynchronous I2C Manager to work properly. More... | |
#define | REGISTER_I2C_ISR_FUNCTION(MANAGER, CALLBACK) |
Register the necessary ISR (Interrupt Service Routine) for an asynchronous I2C Manager to work properly, along with a callback function that will be called everytime an I2C transaction progresses (one command executed, whole transaction executed, error). More... | |
#define | REGISTER_I2C_ISR_METHOD(MANAGER, HANDLER, CALLBACK) |
Register the necessary ISR (Interrupt Service Routine) for an asynchronous I2C Manager to work properly, along with a callback method that will be called everytime an I2C transaction progresses (one command executed, whole transaction executed, error). More... | |
#define | DECL_I2C_ISR_HANDLERS_FRIEND |
This macro shall be used in a class containing a private callback method, registered by REGISTER_I2C_ISR_METHOD . More... | |
Enumerations | |
enum class | i2c::I2CCallback : uint8_t { i2c::NONE = 0 , i2c::END_COMMAND , i2c::END_TRANSACTION , i2c::ERROR } |
Type passed to I2C ISR registered callbacks (asynchronous I2C Manager only) when an asynchronous I2C transaction is executed. More... | |
ATmega I2C Manager API.
This defines asynchronous and synchronous I2C Managers for ATmega architecture.
Definition in file i2c_handler_atmega.h.
#define I2C_TRUE_ASYNC 1 |
This macro indicates if truly asynchronous I2C management is available for a platform:
1
0
Definition at line 49 of file i2c_handler_atmega.h.
#define REGISTER_I2C_ISR | ( | MANAGER | ) |
Register the necessary ISR (Interrupt Service Routine) for an asynchronous I2C Manager to work properly.
MANAGER | one of many asynchronous I2C managers defined in this header |
Definition at line 57 of file i2c_handler_atmega.h.
#define REGISTER_I2C_ISR_FUNCTION | ( | MANAGER, | |
CALLBACK | |||
) |
Register the necessary ISR (Interrupt Service Routine) for an asynchronous I2C Manager to work properly, along with a callback function that will be called everytime an I2C transaction progresses (one command executed, whole transaction executed, error).
MANAGER | one of many asynchronous I2C managers defined in this header |
CALLBACK | the function that will be called when the interrupt is triggered; it should follow this prototype: void f(I2CCallback, typename MANAGER::ABSTRACT_FUTURE&) |
Definition at line 76 of file i2c_handler_atmega.h.
#define REGISTER_I2C_ISR_METHOD | ( | MANAGER, | |
HANDLER, | |||
CALLBACK | |||
) |
Register the necessary ISR (Interrupt Service Routine) for an asynchronous I2C Manager to work properly, along with a callback method that will be called everytime an I2C transaction progresses (one command executed, whole transaction executed, error).
MANAGER | one of many asynchronous I2C managers defined in this header |
HANDLER | the class holding the callback method |
CALLBACK | the method of HANDLER that will be called when the interrupt is triggered; this must be a proper PTMF (pointer to member function); it should follow this prototype: void f(I2CCallback, typename MANAGER::ABSTRACT_FUTURE&) |
Definition at line 96 of file i2c_handler_atmega.h.
#define DECL_I2C_ISR_HANDLERS_FRIEND |
This macro shall be used in a class containing a private callback method, registered by REGISTER_I2C_ISR_METHOD
.
It declares the class where it is used as a friend of all necessary functions so that the private callback method can be called properly.
Definition at line 108 of file i2c_handler_atmega.h.