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.
Fork of USBDevice by
Revision 51:a3c50882f2c5, committed 2015-04-20
- Comitter:
- mbed_official
- Date:
- Mon Apr 20 10:45:54 2015 +0100
- Parent:
- 50:bee5808e91e3
- Commit message:
- Synchronized with git revision 016b9ad9cba789b99acee1102802355338120b29
Full URL: https://github.com/mbedmicro/mbed/commit/016b9ad9cba789b99acee1102802355338120b29/
NXP's HAL - Fix PwmOut period using SCT
Changed in this revision
--- a/USBMIDI/MIDIMessage.h Thu Apr 16 11:46:08 2015 +0100 +++ b/USBMIDI/MIDIMessage.h Mon Apr 20 10:45:54 2015 +0100 @@ -44,9 +44,9 @@ /** A MIDI message container */ class MIDIMessage { public: - MIDIMessage() {} + MIDIMessage() : length(4) {} - MIDIMessage(uint8_t *buf) { + MIDIMessage(uint8_t *buf) : length(4) { for (int i = 0; i < 4; i++) data[i] = buf[i]; } @@ -270,7 +270,7 @@ } uint8_t data[MAX_MIDI_MESSAGE_SIZE+1]; - uint8_t length=4; + uint8_t length; }; #endif
--- a/USBMIDI/USBMIDI.cpp Thu Apr 16 11:46:08 2015 +0100 +++ b/USBMIDI/USBMIDI.cpp Mon Apr 20 10:45:54 2015 +0100 @@ -20,7 +20,9 @@ #include "USBMIDI.h" -USBMIDI::USBMIDI(uint16_t vendor_id, uint16_t product_id, uint16_t product_release): USBDevice(vendor_id, product_id, product_release) { +USBMIDI::USBMIDI(uint16_t vendor_id, uint16_t product_id, uint16_t product_release) + : USBDevice(vendor_id, product_id, product_release), cur_data(0), data_end(true) +{ midi_evt = NULL; USBDevice::connect(); }
--- a/USBMIDI/USBMIDI.h Thu Apr 16 11:46:08 2015 +0100 +++ b/USBMIDI/USBMIDI.h Mon Apr 20 10:45:54 2015 +0100 @@ -103,8 +103,8 @@ private: uint8_t data[MAX_MIDI_MESSAGE_SIZE+1]; - uint8_t cur_data=0; - bool data_end = true; + uint8_t cur_data; + bool data_end; void (*midi_evt)(MIDIMessage); };