Storage::SD::Card Class Reference
#include <Card.h>
Inheritance diagram for Storage::SD::Card:
Collaboration diagram for Storage::SD::Card:
Public Member Functions | |
| Card (const String &name, SPIBase &spi) | |
| ~Card () | |
| bool | begin (uint8_t chipSelect, uint32_t freq=0) |
| Initialise the card. More... | |
| void | end () |
| String | getName () const override |
| Obtain unique device name. More... | |
| uint32_t | getId () const |
| Obtain device ID. More... | |
| Type | getType () const |
| Obtain device type. More... | |
| size_t | getBlockSize () const override |
| Obtain smallest allocation unit for erase operations. More... | |
Public Member Functions inherited from Storage::Disk::BlockDevice | |
| bool | read (storage_size_t address, void *dst, size_t size) override |
| Read data from the storage device. More... | |
| bool | write (storage_size_t address, const void *src, size_t size) override |
| Write data to the storage device. More... | |
| bool | erase_range (storage_size_t address, storage_size_t size) override |
| Erase a region of storage in preparation for writing. More... | |
| storage_size_t | getSize () const override |
| Obtain addressable size of this device. More... | |
| storage_size_t | getSectorCount () const override |
| Obtain total number of sectors on this device. More... | |
| bool | sync () override |
| Flush any pending writes to the physical media. More... | |
| bool | allocateBuffers (unsigned numBuffers) |
| Set number of sector buffers to use. More... | |
Public Member Functions inherited from Storage::Device | |
| Device () | |
| ~Device () | |
| bool | operator== (const String &name) const |
| const PartitionTable & | partitions () const |
| Provide read-only access to partition table. More... | |
| PartitionTable & | editablePartitions () |
| Provide full access to partition table. More... | |
| bool | loadPartitions (uint32_t tableOffset) |
| Load partition table entries @tableOffset Location of partition table to read. More... | |
| bool | loadPartitions (Device &source, uint32_t tableOffset) |
| Load partition table entries from another table. More... | |
| virtual uint16_t | getSectorSize () const |
| Get sector size, the unit of allocation for block-access devices. More... | |
| size_t | printTo (Print &p) const |
Public Member Functions inherited from LinkedObjectTemplate< Device > | |
| Device * | getNext () const |
| bool | insertAfter (Device *object) |
| Iterator | begin () const |
| Iterator | end () const |
| Iterator | cbegin () const |
| Iterator | cend () const |
Public Member Functions inherited from LinkedObject | |
| virtual | ~LinkedObject () |
| virtual LinkedObject * | next () const |
| bool | insertAfter (LinkedObject *object) |
| bool | operator== (const LinkedObject &other) const |
| bool | operator!= (const LinkedObject &other) const |
Public Attributes | |
| const CID & | cid {mCID} |
| const CSD & | csd {mCSD} |
Public Attributes inherited from Storage::Disk::BlockDevice | |
| Stat | stat |
Protected Member Functions | |
| bool | raw_sector_read (storage_size_t address, void *dst, size_t size) override |
| bool | raw_sector_write (storage_size_t address, const void *src, size_t size) override |
| bool | raw_sector_erase_range (storage_size_t address, size_t size) override |
| bool | raw_sync () override |
Protected Member Functions inherited from Storage::Disk::BlockDevice | |
| bool | flushBuffer (Buffer &buf) |
| bool | flushBuffers () |
Additional Inherited Members | |
Public Types inherited from Storage::Device | |
| enum | Type : uint8_t { Type::XX } |
| Storage type. More... | |
| using | List = LinkedObjectListTemplate< Device > |
| using | OwnedList = OwnedLinkedObjectListTemplate< Device > |
Public Types inherited from LinkedObjectTemplate< Device > | |
| using | Iterator = IteratorTemplate< Device, Device *, Device & > |
| using | ConstIterator = IteratorTemplate< const Device, const Device *, const Device & > |
Static Public Attributes inherited from Storage::Device | |
| static constexpr uint16_t | defaultSectorSize {512} |
Protected Attributes inherited from Storage::Disk::BlockDevice | |
| std::unique_ptr< BufferList > | buffers |
| uint64_t | sectorCount {0} |
| uint16_t | sectorSize {defaultSectorSize} |
| uint8_t | sectorSizeShift {getSizeBits(defaultSectorSize)} |
Protected Attributes inherited from Storage::Device | |
| PartitionTable | mPartitions |
Constructor & Destructor Documentation
◆ Card()
◆ ~Card()
|
inline |
Member Function Documentation
◆ begin()
Initialise the card.
- Parameters
-
chipSelect freq SPI frequency in Hz, use 0 for maximum supported frequency
◆ end()
| void Storage::SD::Card::end | ( | ) |
◆ getBlockSize()
|
inlineoverridevirtual |
Obtain smallest allocation unit for erase operations.
Reimplemented from Storage::Disk::BlockDevice.
◆ getId()
|
inlinevirtual |
◆ getName()
|
inlineoverridevirtual |
Obtain unique device name.
Implements Storage::Device.
◆ getType()
|
inlinevirtual |
Obtain device type.
Implements Storage::Device.
◆ raw_sector_erase_range()
|
overrideprotectedvirtual |
Implements Storage::Disk::BlockDevice.
◆ raw_sector_read()
|
overrideprotectedvirtual |
Implements Storage::Disk::BlockDevice.
◆ raw_sector_write()
|
overrideprotectedvirtual |
Implements Storage::Disk::BlockDevice.
◆ raw_sync()
|
overrideprotectedvirtual |
Implements Storage::Disk::BlockDevice.
Member Data Documentation
◆ cid
| const CID& Storage::SD::Card::cid {mCID} |
◆ csd
| const CSD& Storage::SD::Card::csd {mCSD} |
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.8.17