Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FATFileSystem N5110_mod SDFileSystem USBDevice mbed
Variables and functions used to act as a USB soundcard (heavily based on existing code, [see here](https://developer.mbed.org/users/samux/code/USBAUDIO_speaker/)) More...
Functions | |
| void | audio_tkr_ISR () |
| # USB audio functions | |
Variables | |
| Ticker | audio_tkr |
| # flags & variables | |
| int16_t | USBaudio_buffer [96/2] |
| buffer to contain incoming audio packets | |
| volatile bool | USBaudio_packet_available = false |
| indicates availability of audio data | |
| int | USBaudio_index_buffer = 0 |
| indicates current position within USBaudio_buffer | |
| uint16_t | audio_prev_val = 0 |
| maintains previous speaker value until more data is available | |
Detailed Description
Variables and functions used to act as a USB soundcard (heavily based on existing code, [see here](https://developer.mbed.org/users/samux/code/USBAUDIO_speaker/))
Function Documentation
| void audio_tkr_ISR | ( | ) |
# USB audio functions
ISR for audio ouput
speaker value
checks if packet is available
converts value to float
ofsets speaker value
adjusts output level
increment buffer position
checks if buffer is empty
sets speaker value to previous available value
writes speaker value to analog output
Variable Documentation
| uint16_t audio_prev_val = 0 |
| int16_t USBaudio_buffer[96/2] |
| int USBaudio_index_buffer = 0 |
| volatile bool USBaudio_packet_available = false |
Generated on Tue Jul 12 2022 13:31:54 by
1.7.2