# Library structure

## Constructor:

class `SPIFlash`

### Library instantiation functions:

> bool `begin`(uint32_t flashChipSize = 0)
> void `setClock`(uint32_t clockSpeed)

### Chip ID functions:

> uint16_t `getManID`(void)
> uint32_t `getJEDECID`(void)
> uint64_t `getUniqueID`(void)
> uint32_t `getCapacity`(void)
> uint32_t `getMaxPage`(void)

### Read functions:

> `Data type-independent`

> bool `readAnything`(uint32_t _addr, T &data, bool fastRead = false)

> `Data type-dependent`

> uint8_t `readByte`(uint32_t _addr, bool fastRead = false)
> int8_t `readChar`(uint32_t _addr, bool fastRead = false)
> int16_t `readShort`(uint32_t _addr, bool fastRead = false)
> uint16_t `readWord`(uint32_t _addr, bool fastRead = false)
> int32_t `readLong`(uint32_t _addr, bool fastRead = false)
> uint32_t `readULong`(uint32_t _addr, bool fastRead = false)
> float `readFloat`(uint32_t _addr, bool fastRead = false)
> bool `readStr`(uint32_t _addr, String &data, bool fastRead = false)
> bool `readByteArray`(uint32_t _addr, uint8_t *data_buffer, size_t bufferSize, bool fastRead = false)
> bool `readCharArray`(uint32_t _addr, char *data_buffer, size_t buffer_size, bool fastRead = false)