[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

eeprom implementation for SPIMemory (eeprom emulation for external SPI-Flash chips) RSS feed
Forum Index » tcMenu Arduinio library
Author Message
bitz


Joined: Apr 1, 2020
Messages: 9
Offline
Hi,

i currently use a ItsyBitsy m0 express (SAMD21), it has a SPI Flash chip on it.

I wanted to use it with ioAbstraction/TCMenu, so i made small wrapper for the SPIMemory LIB.
Its not fully tested yet, but worked in (the amended) i2cEepromExample.
I wanted to ask for comments, my c++ is a bit rusty.
If OK you can include it to ioAbstraction, if you like. Otherwise feel free to comment.

Unfortunately i wont be able to do a fork/pull request (at least in the near future).
Here are the files (EepromAbstractionSPIMemory.h and EepromAbstractionSPIMemory.cpp)

https://drive.google.com/drive/folders/10TvEUiQss9t3iPWBamizdXam_gB--K9N?usp=sharing

If someone wants to use it:
The SPIMemory LIB has a small bug in the v 3.4.0 not working with SPI1 (the second SPI line),
where the itsybitsy onboard flash is hardwired to.
There is a SPI.begin missing after line 119 in SPIFlash.cpp (in the SPIFlash::begin()).
I had to add the following:
#elif defined (ARDUINO_ARCH_SAMD)
    BEGIN_SPI
    #endif


Regards,
bitz

PS: ... later i see: this post might belong better to the ioAbstraction forum...
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Many thanks for providing this implementation. I'll take a look at it soon to try and integrate it into the library.
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.