Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for DFPlayer modules using a MH2024K-16SS chip (#77)
* Autoformat code * Refactor DfMp3_Packet from enum to struct * Add option to send a packet without checksum * Play finished event on MH2024K-16SS is code 0x4c * Reformat using another formatter (in vscode => vcFormat) * Replace C-style casts to their C++ equivalent * On MH2024K-16SS, the end of song USB, is 0x4b instead of 0x3c... * Use a pointer instead of a ref to make it explicit that the packet is changed * Refactor calcChecksum to use a for-loop to reduce program size (48 bytes => 36 bytes) * Use templating to reduce code and memory size * Do not init buffer to save program size. * Remove DfMp3_Packet and declare types in Chip classes * Rename field SendCheckSum * Renamed i variable with a more meaningful name (packetByte) * fix warnings * Move the generation of the packet to the Mp3Chip classes * Add missing const Co-authored-by: Maxime Chéramy <maxime@cheramy.org>
- Loading branch information
1 parent
81692ad
commit d603f8e
Showing
1 changed file
with
119 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters