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.
USBHostDac Class Reference
A class to communicate a USB dac (send:only 48kHz,16bit,2ch , receive:only 48kHz,16bit,1ch) More...
#include <USBHost6ChDac.h>
Public Member Functions | |
| USBHostDac () | |
| Constructor. | |
| virtual | ~USBHostDac () |
| Destructor. | |
| bool | connect () |
| Try to connect a audio device. | |
| bool | connected () |
| Check if a audio is connected. | |
| uint32_t | send (uint8_t *buf, uint32_t len, bool flush=true) |
| Data send : only 48kHz,16bit,2ch. | |
| uint32_t | receive (uint8_t *buf, uint32_t len) |
| Data receive : only 48kHz,16bit,1ch. | |
Detailed Description
A class to communicate a USB dac (send:only 48kHz,16bit,2ch , receive:only 48kHz,16bit,1ch)
Definition at line 39 of file USBHost6ChDac.h.
Constructor & Destructor Documentation
| USBHostDac | ( | ) |
Constructor.
Definition at line 44 of file USBHost6ChDac.cpp.
| ~USBHostDac | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file USBHost6ChDac.cpp.
Member Function Documentation
| bool connect | ( | ) |
Try to connect a audio device.
- Returns:
- true if connection was successful
Definition at line 86 of file USBHost6ChDac.cpp.
| bool connected | ( | ) |
Check if a audio is connected.
- Returns:
- true if a audio is connected
Definition at line 82 of file USBHost6ChDac.cpp.
| uint32_t receive | ( | uint8_t * | buf, |
| uint32_t | len | ||
| ) |
Data receive : only 48kHz,16bit,1ch.
- Parameters:
-
buf pointer on a buffer which will be read len length of the transfer
- Returns:
- the number of bytes read is returned
Definition at line 184 of file USBHost6ChDac.cpp.
| uint32_t send | ( | uint8_t * | buf, |
| uint32_t | len, | ||
| bool | flush = true |
||
| ) |
Data send : only 48kHz,16bit,2ch.
It's sent by the 1536byte unit.
- Parameters:
-
buf pointer on a buffer which will be written len length of the transfer flush if true, less than 1536 bytes of data is sent
- Returns:
- the number of bytes written is returned
Definition at line 130 of file USBHost6ChDac.cpp.
Generated on Wed Jul 13 2022 04:57:20 by
1.7.2