-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centralize application framework #323
Labels
Comments
terrillmoore
added a commit
that referenced
this issue
Nov 29, 2021
terrillmoore
added a commit
that referenced
this issue
Nov 29, 2021
We don't want to have to tunnel the appVersion through all the constructors, so McciCatena::Catena::Catena() calls new protected McciCatena::Catena::setAppVersion(), exported by CatenaBase, after all the other constructors are done.
terrillmoore
added a commit
that referenced
this issue
Nov 29, 2021
terrillmoore
added a commit
that referenced
this issue
Nov 29, 2021
terrillmoore
added a commit
that referenced
this issue
Nov 29, 2021
terrillmoore
added a commit
that referenced
this issue
Nov 29, 2021
terrillmoore
added a commit
that referenced
this issue
Dec 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a roll-up ticket for centralizing the application framework material that is now scattered all over the place. This gives a ticket to reference for the development branch.
The application framework handles the following.
Serial
, with standard commandsIn addition, we want to centralize some common things:
constexpr
.You must do the following:
McciCatena::Catena gCatena;
.setup()
, add options: for example,gCatena.useLoRaWAN();
if using LoRaWAN, orgCatena.useSigfox();
if using Sigfox. Note that these implyuseStandardFramework()
.gCatena.useSerialBaudrate(n)
sets the baudrate to n.gCatena.setup()
to invoke the standard setup.Then in
loop()
, callgCatena.loop()
.We're going to need to add some slots on the various concrete Catenas. For convenience, we should consider adding a vanilla Catena that allows use of the command-line interface and some other things on any Arduino.
New classes
class Catena_SpiFlash
: the abstract wrapper for the concrete flash drivers.Methods
Return pointer to the external SPI that's driving MOSI, MISO and SCK. By default, it's
SPI
, but on MCCI Catenas using the Murata module, it may begSPI2
.Globals from the application framework
SPIClass gSPI2;
for the second SPI bus, on MCCI Catenas -- this is because the primary SPI interface,SPI
, is not brought to pins and is used with the LoRaWAN radio.Catena_SpiFlash gFlash;
cDownload McciCatena::gDownload;
cBootloaderApi McciCatena::gBootloaderApi;
cSerial<decltype(Serial)> McciCatena::gSerial;
StatusLed McciCatena::gLed;
cLog McciCatena::gLog;
These are all set up (and exported) by
Catena::setup()
, which callsCatena::begin()
for legacy use.The text was updated successfully, but these errors were encountered: