waveform
所属分类:音频处理
开发工具:Zig
文件大小:0KB
下载次数:0
上传日期:2024-02-09 14:54:34
上 传 者:
sh-1993
说明: 生成漂亮的Unicode渲染波形。
(Generates nice Unicode rendered waveforms.)
文件列表:
examples/
src/
vendor/
.envrc
LICENCE
build.zig
build.zig.zon
flake.lock
flake.nix
# waveform
Generates unicode waveforms that can be embedded into code comments
```
1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆
┆ ┆ ┏━━┓ ┏━━┓ ┏━━┓ ┏━━┓ ┏━━┓ ┏━━┓ ┏━━┓ ┏━━┓ ┏━━┓ ┆ ┆ ┆
CLK ┆ ┆ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┆ ┆ ┆
━━━━━━┛ ┗━━┛ ┗━━┛ ┗━━┛ ┗━━┛ ┗━━┛ ┗━━┛ ┗━━┛ ┗━━┛ ┗━━━━━━━━━
┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆
━━━┓ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┏━━━━━━━━━━━━
/CE ┆ ┃ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┃ ┆ ┆ ┆ ┆
┆ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┆ ┆ ┆ ┆
┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆
┆ ┆ ┏━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┓ ┆ ┆ ┆ ┆
MOSI ━━━━━━┫ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣━━━━━━━━━━━━
┆ ┆ ┗━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┆ ┆ ┆ ┆
┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆
┆ ┆ ┆ ┏━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┓ ┆ ┆ ┆
MISO ━━━━━━━━━┫ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣━━━━━━━━━
┆ ┆ ┆ ┗━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┆ ┆ ┆
┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆
```
The input for this diagram is a text file:
```
CLK | LLHLHLHLHLHLHLHLHLHLLLL
/CE | HLLLLLLLLLLLLLLLLLHHHHH
MOSI | ZZB-B-B-B-B-B-B-B-ZZZZZ
MISO | ZZZB-B-B-B-B-B-B-B-ZZZZ
```
Each part after the `|` describes the state on a clock edge.
The allowed states are:
- `L`: edge to low
- `H`: edge to high
- `Z`: edge to high impedance
- `B`: edge to low or high (can be both)
- `-`: no change in the signal
近期下载者:
相关文件:
收藏者: