This is a human and machine readable "database" of config for non-volatile memory chips. It uses cascadetoml
to allow common technology and manufacturer settings to be shared amongst all SKUs.
Shared data goes in a toml file with a name that matches the folder name.
The template documents all of the possible fields.
To get the TOML for a specific SKU do:
cascadetoml cascade filter sku=\"GD25Q64C\"
Here is example TOML output:
[[nvm]]
# Data for path: flash/gigadevice/GD25Q64C.toml
# Data inferred from the path: {technology}/{manufacturer}/{sku}.toml
technology = "flash"
manufacturer = "gigadevice"
sku = "GD25Q64C"
# Data from flash/flash.toml
supports_fast_read = true
# Data from flash/gigadevice/GD25Q64C.toml
# Settings for the Gigadevice GD25Q64C 8MiB SPI flash.
# Datasheet: http://www.elm-tech.com/en/products/spi-flash-memory/gd25q64/gd25q64.pdf
total_size = 0x800000 # 8 MiB
capacity = 0x17
write_status_register_split = true
The filters are actually TOML themselves. They match any entry that include the given keys with any of the given values.
To get all gigadevice
flashes you'd run:
cascadetoml cascade filter manufacturer=\"gigadevice\"
The paths all match {technology}/{manufacturer}/{sku}.toml
. A file such as flash/gigadevice/GD1.toml
will have the implicit values:
technology = "flash"
manufacturer = "gigadevice"
sku = "GD25Q64C"
All of the other values come from these files in order:
flash/flash.toml
flash/gigadevice/gigadevice.toml
flash/gigadevice/GD25Q64C.toml
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
For information on building library documentation, please check out this guide.