Advertisement
Franck1333

SPIFLASH_Hallowing_M0_EXPRESS

Feb 28th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //AIDES: https://learn.adafruit.com/adafruit-hallowing
  2. //AIDES: https://bit.ly/2EemKGw
  3. //Adafruit Hallowing M0 Express
  4.  
  5. /*//---SPIFFLASH LIBs (Memoire Interne)---
  6. #include <SPI.h>
  7. #include <Adafruit_SPIFlash.h>
  8. #include <Adafruit_SPIFlash_FatFs.h>
  9. //---SPIFFLASH LIBs (Memoire Interne)---
  10. // Configuration of the flash chip pins and flash fatfs object.
  11. // You don't normally need to change these if using a Feather/Metro
  12. // M0 express board.
  13. #define FLASH_TYPE     SPIFLASHTYPE_W25Q16BV  // Flash chip type,If you change this be, sure to change the fatfs,/ object type below to match.
  14. #if (SPI_INTERFACES_COUNT == 1)
  15.   #define FLASH_SS       SS                    // Flash chip SS pin.
  16.   #define FLASH_SPI_PORT SPI                   // What SPI port is Flash on?
  17. #else
  18.   #define FLASH_SS       SS1                    // Flash chip SS pin.
  19.   #define FLASH_SPI_PORT SPI1                   // What SPI port is Flash on?
  20. #endif
  21. Adafruit_SPIFlash flash(FLASH_SS, &FLASH_SPI_PORT);     // Use hardware SPI
  22. // Alternatively you can define and use non-SPI pins!
  23. //Adafruit_SPIFlash flash(SCK1, MISO1, MOSI1, FLASH_SS);
  24. // Finally create an Adafruit_M0_Express_CircuitPython object which gives
  25. // an SD card-like interface to interacting with files stored in CircuitPython's
  26. // flash filesystem.
  27. Adafruit_M0_Express_CircuitPython pythonfs(flash);//Configuration SPIFFLASH */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement