|
Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Macros | |
| #define | DMA_DESCRIPTORS 4 |
Functions | |
| void | initDac (dac_channel_mask_t channel, gpio_num_t shdn_gpio, fnDacCallback_t cb) |
| Initialize the DAC. | |
| void | deinitDac (void) |
| Deinitialize the DAC and free memory. | |
| void | powerDownDac (void) |
| Power down the DAC (speaker) | |
| void | powerUpDac (void) |
| Power up the DAC (speaker) | |
| void | dacStart (void) |
| Start the DAC. This will cause samples to be requested from the application. | |
| void | dacStop (void) |
| Stop the DAC. | |
| void | dacPoll (void) |
| Poll the queue to see if any buffers need to be filled with audio samples. | |
| void | setDacShutdown (bool shutdown) |
| Set the shutdown state of the DAC. | |
| #define DMA_DESCRIPTORS 4 |
The number of buffers to use. The more buffers, the longer latency
| void initDac | ( | dac_channel_mask_t | channel, |
| gpio_num_t | shdn_gpio, | ||
| fnDacCallback_t | cb ) |
Initialize the DAC.
| channel | The output channel (pin) for the ADC |
| shdn_gpio | The GPIO that controls the amplifier's shutdown |
| cb | A callback function which will be called to request samples from the application |
| void deinitDac | ( | void | ) |
Deinitialize the DAC and free memory.
| void powerDownDac | ( | void | ) |
Power down the DAC (speaker)
| void powerUpDac | ( | void | ) |
Power up the DAC (speaker)
| void dacStart | ( | void | ) |
Start the DAC. This will cause samples to be requested from the application.
| void dacStop | ( | void | ) |
Stop the DAC.
| void dacPoll | ( | void | ) |
Poll the queue to see if any buffers need to be filled with audio samples.
| void setDacShutdown | ( | bool | shutdown | ) |
Set the shutdown state of the DAC.
| shutdown | true to shut down the DAC, false to enable it |