I2Cwrapper v0.5.0
Generic framework for Arduino I2C target devices
|
Template for a user module/controller library for the I2Cwrapper firmware. "xxx" represents the name of your module, e.g. "PinI2C". More...
Template for a user module/controller library for the I2Cwrapper firmware. "xxx" represents the name of your module, e.g. "PinI2C".
Copyright (c) 2022 juh
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
Copyright (c) 2022 juh
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
Classes | |
class | xxxI2C |
An I2C wrapper class for xxx. More... | |
Macros | |
#define | log(...) |
Variables | |
const uint8_t | xxxCmdOffset = |
These constants represent the commands you want youre target device to understand. They will also be needed by your firmware module (see template_I2C_firmware.h). Usually, each command code will correspond to one of the library functions below. If you want your target device to use more than one module, care must be taken that commands are unique for that target. Currently there is no mechanism in place for controlling that, so it's up to you to ensure uniqeness of command IDs. See I2Cwrapper.h for currently unused ID ranges. More... | |
const uint8_t | xxxDemo1Cmd = xxxCmdOffset + 0 |
const uint8_t | xxxDemo2Cmd = xxxCmdOffset + 1 |
const uint8_t | xxxDemo2CmdResult = 1 |
#define log | ( | ... | ) |
const uint8_t xxxCmdOffset = |
These constants represent the commands you want youre target device to understand. They will also be needed by your firmware module (see template_I2C_firmware.h). Usually, each command code will correspond to one of the library functions below. If you want your target device to use more than one module, care must be taken that commands are unique for that target. Currently there is no mechanism in place for controlling that, so it's up to you to ensure uniqeness of command IDs. See I2Cwrapper.h for currently unused ID ranges.
Non void functions/commands have an additional uint8_t xxx...Result const next to them. It will be used to check for the correct length of target replies in the related functions' implementation.
const uint8_t xxxDemo1Cmd = xxxCmdOffset + 0 |
const uint8_t xxxDemo2Cmd = xxxCmdOffset + 1 |
const uint8_t xxxDemo2CmdResult = 1 |