Skip to content

Commit cb081a5

Browse files
docs: Update DAC docs.
Signed-off-by: iabdalkader <[email protected]> Co-authored-by: Leonardo Cavagnis <[email protected]>
1 parent cd06842 commit cb081a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/api.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ AdvancedDAC dac1(A13);
189189

190190
### `AdvancedDAC.begin()`
191191

192-
Initializes the DAC with the specified parameters. To reconfigure the DAC, `stop()` must be called first.
192+
Initializes the DAC with the specified parameters. To reconfigure the DAC, `stop()` must be called first. The DAC has a special mode called _loop mode_ enabled by setting `loop` parameter to `true`. In loop mode, the DAC will start automatically after all buffers are filled, and continuously cycle through over all buffers.
193193

194194
#### Syntax
195195

196196
```
197-
dac.begin(resolution, frequency, n_samples, n_buffers)
197+
dac.begin(resolution, frequency, n_samples, n_buffers, loop=false)
198198
```
199199

200200
#### Parameters
@@ -206,6 +206,7 @@ dac.begin(resolution, frequency, n_samples, n_buffers)
206206
- `int` - **frequency** - the output frequency in Hertz, e.g. `8000`.
207207
- `int` - **n_samples** - the number of samples per sample buffer. See [SampleBuffer](#samplebuffer) for more details.
208208
- `int` - **n_buffers** - the number of sample buffers in the queue. See [SampleBuffer](#samplebuffer) for more details.
209+
- `bool`- **loop** - enables loop mode.
209210

210211
#### Returns
211212

0 commit comments

Comments
 (0)