# emreoztoklu/flash_w25n01gv architecture

> Architecture diagram of the GitHub repository emreoztoklu/flash_w25n01gv, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/emreoztoklu/flash_w25n01gv
- Repository: https://github.com/emreoztoklu/flash_w25n01gv

## Overview

This repository is primarily an embedded driver for Winbond W25N01GV NAND flash. Its user-facing workflow is to initialize the device, then read, program, or erase data through page/sector/block address handling and SPI commands; status and identification operations support that work. The tree also contains independent drivers for an IS25LP128F SPI NOR flash, PCT2075 temperature sensor, and CS43L22/TAS5720 audio devices. The README identifies only the W25N flash driver, and the sampled excerpts do not establish a common application orchestrating these drivers; auxiliary-device links are therefore shown independently.

Main entry points: [`W25N/Src/w25nxx.c`](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/Src/w25nxx.c) (W25N driver), [`W25N/Inc/w25nxx.h`](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/Inc/w25nxx.h) (W25N API), [`extra/IS25LP128F/Src/is25lp128f.c`](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/IS25LP128F/Src/is25lp128f.c) (IS25 driver), [`extra/IS25LP128F/Inc/is25lp128f.h`](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/IS25LP128F/Inc/is25lp128f.h) (IS25 API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_nand["NAND Flash"]
  node_w25driver["W25N driver<br/>[w25nxx.c]"]
  node_w25api["W25N API<br/>[w25nxx.h]"]
  node_spi["SPI transport<br/>[eo_spi.c]"]
  node_timer["Timer support<br/>[eo_tim.c]"]
  node_nandchip["W25N01GV chip"]
end

subgraph group_nor["SPI NOR"]
  node_is25driver["IS25 driver<br/>[is25lp128f.c]"]
  node_is25api["IS25 API<br/>[is25lp128f.h]"]
  node_norchip["IS25LP128F chip"]
end

subgraph group_sensor["Temperature Sensor"]
  node_pctdriver["PCT2075 driver<br/>[pct2075.c]"]
  node_pctchip["PCT2075 sensor"]
end

subgraph group_audio["Audio Devices"]
  node_cs43driver["CS43L22 driver<br/>[cs43l22.c]"]
  node_cs43api["CS43L22 API<br/>[cs43l22.h]"]
  node_cs43chip["CS43L22 codec"]
  node_tasdriver["TAS5720 driver<br/>[tas5720aq1_r01.c]"]
  node_tasapi["TAS5720 API<br/>[tas5720aq1_r01.h]"]
  node_i2s["I2S transport<br/>[eo_i2s.c]"]
  node_tasdma["Audio DMA<br/>[eo_dma.c]"]
  node_taschip["TAS5720 amplifier"]
end

node_caller(("Firmware caller"))

node_caller -->|"calls"| node_w25api
node_w25api -->|"exposes"| node_w25driver
node_w25driver -->|"transfers SPI"| node_spi
node_w25driver -->|"uses timing"| node_timer
node_w25driver -->|"commands"| node_nandchip
node_caller -->|"calls"| node_is25api
node_is25api -->|"exposes"| node_is25driver
node_is25driver -->|"commands SPI"| node_norchip
node_caller -->|"calls"| node_pctdriver
node_pctdriver -->|"reads/writes I2C"| node_pctchip
node_caller -->|"calls"| node_cs43api
node_cs43api -->|"exposes"| node_cs43driver
node_cs43driver -->|"configures I2C"| node_cs43chip
node_caller -->|"calls"| node_tasapi
node_tasapi -->|"exposes"| node_tasdriver
node_tasdriver -->|"controls I2C"| node_taschip
node_caller -->|"configures"| node_i2s
node_i2s -->|"configures DMA"| node_tasdma

click node_w25driver "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/Src/w25nxx.c"
click node_w25api "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/Inc/w25nxx.h"
click node_spi "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/eo_spi.c"
click node_timer "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/eo_tim.c"
click node_is25driver "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/IS25LP128F/Src/is25lp128f.c"
click node_is25api "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/IS25LP128F/Inc/is25lp128f.h"
click node_pctdriver "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/PCT2075/Src/pct2075.c"
click node_cs43driver "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/CS43l22/Src/cs43l22.c"
click node_cs43api "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/CS43l22/Inc/cs43l22.h"
click node_tasdriver "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/Src/tas5720aq1_r01.c"
click node_tasapi "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/Inc/tas5720aq1_r01.h"
click node_i2s "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/eo_i2s.c"
click node_tasdma "https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/eo_dma.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_w25driver,node_w25api,node_spi,node_timer,node_nandchip toneBlue
class node_is25driver,node_is25api,node_norchip toneAmber
class node_pctdriver,node_pctchip toneMint
class node_cs43driver,node_cs43api,node_cs43chip,node_tasdriver,node_tasapi,node_i2s,node_tasdma,node_taschip toneRose
class node_caller toneIndigo
```

## Components

### NAND Flash

- [W25N driver](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/Src/w25nxx.c): `W25N/Src/w25nxx.c`
- [W25N API](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/Inc/w25nxx.h): `W25N/Inc/w25nxx.h`
- [SPI transport](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/eo_spi.c): `W25N/eo_spi.c`
- [Timer support](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/W25N/eo_tim.c): `W25N/eo_tim.c`
- **W25N01GV chip**

### SPI NOR

- [IS25 driver](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/IS25LP128F/Src/is25lp128f.c): `extra/IS25LP128F/Src/is25lp128f.c`
- [IS25 API](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/IS25LP128F/Inc/is25lp128f.h): `extra/IS25LP128F/Inc/is25lp128f.h`
- **IS25LP128F chip**

### Temperature Sensor

- [PCT2075 driver](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/PCT2075/Src/pct2075.c): `extra/PCT2075/Src/pct2075.c`
- **PCT2075 sensor**

### Audio Devices

- [CS43L22 driver](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/CS43l22/Src/cs43l22.c): `extra/CS43l22/Src/cs43l22.c`
- [CS43L22 API](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/CS43l22/Inc/cs43l22.h): `extra/CS43l22/Inc/cs43l22.h`
- **CS43L22 codec**
- [TAS5720 driver](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/Src/tas5720aq1_r01.c): `extra/TAS5720/Src/tas5720aq1_r01.c`
- [TAS5720 API](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/Inc/tas5720aq1_r01.h): `extra/TAS5720/Inc/tas5720aq1_r01.h`
- [I2S transport](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/eo_i2s.c): `extra/TAS5720/eo_i2s.c`
- [Audio DMA](https://github.com/emreoztoklu/flash_w25n01gv/blob/main/extra/TAS5720/eo_dma.c): `extra/TAS5720/eo_dma.c`
- **TAS5720 amplifier**

### Other components

- **Firmware caller**

## Connections

- Firmware caller → W25N API: calls
- W25N API → W25N driver: exposes
- W25N driver → SPI transport: transfers SPI
- W25N driver → Timer support: uses timing
- W25N driver → W25N01GV chip: commands
- Firmware caller → IS25 API: calls
- IS25 API → IS25 driver: exposes
- IS25 driver → IS25LP128F chip: commands SPI
- Firmware caller → PCT2075 driver: calls
- PCT2075 driver → PCT2075 sensor: reads/writes I2C
- Firmware caller → CS43L22 API: calls
- CS43L22 API → CS43L22 driver: exposes
- CS43L22 driver → CS43L22 codec: configures I2C
- Firmware caller → TAS5720 API: calls
- TAS5720 API → TAS5720 driver: exposes
- TAS5720 driver → TAS5720 amplifier: controls I2C
- Firmware caller → I2S transport: configures
- I2S transport → Audio DMA: configures DMA
