|
1 | 1 | # API Reference |
2 | 2 |
|
3 | | -This section is the authoritative API surface summary. |
| 3 | +This section provides two ways to find what you need: |
4 | 4 |
|
5 | | -Each function entry should describe: |
| 5 | +- **By task** (beginner-friendly) |
| 6 | +- **By full function list** (complete call-by-call reference) |
6 | 7 |
|
7 | | -- purpose |
8 | | -- preconditions |
9 | | -- return semantics |
10 | | -- side effects |
11 | | -- failure behavior |
| 8 | +## Start by Task |
12 | 9 |
|
13 | | -## Fast Navigation |
| 10 | +| Task | Recommended calls | |
| 11 | +| --- | --- | |
| 12 | +| Initialize memory chip | `begin`, `setClock` | |
| 13 | +| Check chip identity | `getJEDECID`, `getManID`, `getUniqueID` | |
| 14 | +| Find free write location | `getAddress`, `sizeofStr` | |
| 15 | +| Write/read one primitive value | `writeByte`/`readByte`, `writeULong`/`readULong`, etc. | |
| 16 | +| Write/read strings | `writeStr`, `readStr` | |
| 17 | +| Write/read structs | `writeAnything`, `readAnything` | |
| 18 | +| Write/read buffers | `writeByteArray`/`readByteArray`, `writeCharArray`/`readCharArray` | |
| 19 | +| Erase flash data | `eraseSector`, `eraseBlock32K`, `eraseBlock64K`, `eraseSection`, `eraseChip` | |
| 20 | +| Power control | `powerDown`, `powerUp` | |
| 21 | +| Suspend/resume flash operation | `suspendProg`, `resumeProg` | |
| 22 | +| Diagnose failures | `error`, `error(VERBOSE)`, `functionRunTime` | |
14 | 23 |
|
15 | | -- [SPIFlash function-by-function reference](spiflash-reference.md) |
16 | | -- [SPIFram function-by-function reference](spifram-reference.md) |
17 | | -- [Error handling and diagnostics](errors.md) |
| 24 | +## Full References |
| 25 | + |
| 26 | +- [SPIFlash Function Reference](spiflash-reference.md) |
| 27 | +- [SPIFram Function Reference](spifram-reference.md) |
| 28 | +- [Errors and Diagnostics](errors.md) |
| 29 | + |
| 30 | +## Function Discovery Index |
| 31 | + |
| 32 | +If you're searching by function name, start here: |
| 33 | + |
| 34 | +### Shared SPIFlash/SPIFram families |
| 35 | + |
| 36 | +`begin`, `setClock`, `libver`, `error`, `getManID`, `getJEDECID`, `getUniqueID`, `getAddress`, `sizeofStr`, `getCapacity`, `functionRunTime`, `writeByte`, `readByte`, `writeChar`, `readChar`, `writeShort`, `readShort`, `writeWord`, `readWord`, `writeLong`, `readLong`, `writeULong`, `readULong`, `writeFloat`, `readFloat`, `writeStr`, `readStr`, `writeByteArray`, `readByteArray`, `writeCharArray`, `readCharArray`, `writeAnything`, `readAnything`, `eraseSection`, `eraseChip`, `powerDown`, `powerUp` |
| 37 | + |
| 38 | +### SPIFlash-only families |
| 39 | + |
| 40 | +`sfdpPresent`, `getMaxPage`, `eraseSector`, `eraseBlock32K`, `eraseBlock64K`, `suspendProg`, `resumeProg` |
0 commit comments