mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Applied @xxxajk's formatting.
This commit is contained in:
parent
df0a711a3a
commit
17cb44b5a2
3 changed files with 28 additions and 26 deletions
|
@ -31,11 +31,13 @@
|
||||||
*/
|
*/
|
||||||
class MiniDSP : public HIDUniversal {
|
class MiniDSP : public HIDUniversal {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for the MiniDSP class.
|
* Constructor for the MiniDSP class.
|
||||||
* @param p Pointer to the USB class instance.
|
* @param p Pointer to the USB class instance.
|
||||||
*/
|
*/
|
||||||
MiniDSP(USB *p) : HIDUniversal(p){};
|
MiniDSP(USB *p) : HIDUniversal(p) {
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to check if a MiniDSP 2x4HD is connected.
|
* Used to check if a MiniDSP 2x4HD is connected.
|
||||||
|
@ -50,7 +52,9 @@ class MiniDSP : public HIDUniversal {
|
||||||
* initialized.
|
* initialized.
|
||||||
* @param funcOnInit Function to call.
|
* @param funcOnInit Function to call.
|
||||||
*/
|
*/
|
||||||
void attachOnInit(void (*funcOnInit)(void)) { pFuncOnInit = funcOnInit; };
|
void attachOnInit(void (*funcOnInit)(void)) {
|
||||||
|
pFuncOnInit = funcOnInit;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to call your own function when the volume has changed.
|
* Used to call your own function when the volume has changed.
|
||||||
|
@ -119,6 +123,7 @@ class MiniDSP : public HIDUniversal {
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/** @name USBDeviceConfig implementation */
|
/** @name USBDeviceConfig implementation */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by the USB core to check what this driver support.
|
* Used by the USB core to check what this driver support.
|
||||||
* @param vid The device's VID.
|
* @param vid The device's VID.
|
||||||
|
|
|
@ -28,14 +28,11 @@ void OnMutedChange(bool isMuted) {
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
#if !defined(__MIPSEL__)
|
#if !defined(__MIPSEL__)
|
||||||
while (!Serial)
|
while(!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
|
||||||
; // Wait for serial port to connect - used on Leonardo, Teensy and other
|
|
||||||
// boards with built-in USB CDC serial connection
|
|
||||||
#endif
|
#endif
|
||||||
if(Usb.Init() == -1) {
|
if(Usb.Init() == -1) {
|
||||||
Serial.print(F("\r\nOSC did not start"));
|
Serial.print(F("\r\nOSC did not start"));
|
||||||
while (1)
|
while(1); // Halt
|
||||||
; // Halt
|
|
||||||
}
|
}
|
||||||
Serial.println(F("\r\nMiniDSP 2x4HD Library Started"));
|
Serial.println(F("\r\nMiniDSP 2x4HD Library Started"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue