Skip to content

Commit

Permalink
docs: Update DAC docs.
Browse files Browse the repository at this point in the history
Signed-off-by: iabdalkader <[email protected]>
  • Loading branch information
iabdalkader committed Jul 15, 2024
1 parent cd06842 commit 181b8da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ AdvancedDAC dac1(A13);

### `AdvancedDAC.begin()`

Initializes the DAC with the specified parameters. To reconfigure the DAC, `stop()` must be called first.
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 to true. In loop mode, the DAC will start automatically after all buffers are filled, and continuously cycle through over all buffers.

#### Syntax

```
dac.begin(resolution, frequency, n_samples, n_buffers)
dac.begin(resolution, frequency, n_samples, n_buffers, loop=false)
```

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

#### Returns

Expand Down

0 comments on commit 181b8da

Please sign in to comment.