SdFat
|
SpiDriver classes for Arduino compatible systems. More...
#include "../common/SysCall.h"
Classes | |
class | SdLibSpiDriver |
SdLibSpiDriver - use standard SPI library. More... | |
class | SdSpiConfig |
SPI card configuration. More... | |
Macros | |
#define | SD_SCK_HZ(maxSpeed) SPISettings(maxSpeed, MSBFIRST, SPI_MODE0) |
#define | SD_SCK_MHZ(maxMhz) SPISettings(1000000UL*maxMhz, MSBFIRST, SPI_MODE0) |
#define | SPI_DIV3_SPEED SD_SCK_HZ(F_CPU/3) |
#define | SPI_DIV6_SPEED SD_SCK_HZ(F_CPU/6) |
#define | SPI_EIGHTH_SPEED SD_SCK_HZ(F_CPU/16) |
#define | SPI_FULL_SPEED SD_SCK_MHZ(50) |
#define | SPI_HALF_SPEED SD_SCK_HZ(F_CPU/4) |
#define | SPI_LOW_SPEED SD_SCK_HZ(250000) |
#define | SPI_QUARTER_SPEED SD_SCK_HZ(F_CPU/8) |
#define | SPI_SIXTEENTH_SPEED SD_SCK_HZ(F_CPU/32) |
Typedefs | |
typedef SdLibSpiDriver | SdSpiDriver |
typedef SPIClass | SpiPort_t |
SpiDriver classes for Arduino compatible systems.
Copyright (c) 2011-2019 Bill Greiman This file is part of the SdFat library for SD memory cards.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SD_SCK_HZ | ( | maxSpeed | ) | SPISettings(maxSpeed, MSBFIRST, SPI_MODE0) |
SPISettings for SCK frequency in Hz.
#define SD_SCK_MHZ | ( | maxMhz | ) | SPISettings(1000000UL*maxMhz, MSBFIRST, SPI_MODE0) |
SPISettings for SCK frequency in MHz.
#define SPI_DIV3_SPEED SD_SCK_HZ(F_CPU/3) |
Set SCK rate to F_CPU/3 for Due
#define SPI_DIV6_SPEED SD_SCK_HZ(F_CPU/6) |
Set SCK rate to F_CPU/6 for Due
#define SPI_EIGHTH_SPEED SD_SCK_HZ(F_CPU/16) |
Set SCK rate to F_CPU/16.
#define SPI_FULL_SPEED SD_SCK_MHZ(50) |
Set SCK to max rate.
#define SPI_HALF_SPEED SD_SCK_HZ(F_CPU/4) |
Set SCK rate to F_CPU/4.
#define SPI_LOW_SPEED SD_SCK_HZ(250000) |
Set SCK for SD initialization - only needed for very old cards.
#define SPI_QUARTER_SPEED SD_SCK_HZ(F_CPU/8) |
Set SCK rate to F_CPU/8.
#define SPI_SIXTEENTH_SPEED SD_SCK_HZ(F_CPU/32) |
Set SCK rate to F_CPU/32.
typedef SdLibSpiDriver SdSpiDriver |
Use standard SPI library
typedef SPIClass SpiPort_t |
Port type for SPI hardware driver.