A class to communicate a USB dac (send:only 48kHz,16bit,2ch , receive:only 48kHz,16bit,1ch). Need "USBHost_AddIso" library.
Dependents: USBHostDac_Audio_in_out
Fork of USBHostDac by
USBHostDac Class Reference
A class to communicate a USB dac (send:only 48kHz,16bit,2ch , receive:only 48kHz,16bit,1ch) More...
#include <USBHostDac.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 38 of file USBHostDac.h.
Constructor & Destructor Documentation
USBHostDac | ( | ) |
Constructor.
Definition at line 32 of file USBHostDac.cpp.
~USBHostDac | ( | ) | [virtual] |
Destructor.
Definition at line 43 of file USBHostDac.cpp.
Member Function Documentation
bool connect | ( | ) |
Try to connect a audio device.
- Returns:
- true if connection was successful
Definition at line 74 of file USBHostDac.cpp.
bool connected | ( | ) |
Check if a audio is connected.
- Returns:
- true if a audio is connected
Definition at line 70 of file USBHostDac.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 170 of file USBHostDac.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 116 of file USBHostDac.cpp.
Generated on Thu Jul 14 2022 01:13:33 by 1.7.2