PDM
First-order PDM sample playback on OUT1 through OUT3.
import "lib/pdm.nbl";
pdm_init() selects CLOCK_250K and clears the error accumulator. The encoder
drives OUT1 through OUT3; bit 0 stays high. A sample table is a flash byte
table terminated by 0xFF. pdm_play_loop restarts at the beginning after the
terminator.
Functions
Call |
Returns |
Notes |
|---|---|---|
|
|
|
|
|
|
|
|
Encode one 4-bit sample. Call this in a tight loop for streaming audio. |
|
|
Play a flash sample table terminated by 0xFF. |
|
|
Play a flash sample table forever. |