SnijderC / dyplayer

Abstracton for DY-XXXX mp3 player modules over UART.
Other
110 stars 30 forks source link

Version for use with PIC #19

Closed Doubletop12 closed 1 year ago

Doubletop12 commented 4 years ago

I've been asked by Chris to document the variant I am using with a PIC. It is in 'C' with the XC8 complier under the MPLAB IDE. I'm not an expert by any means but the changes are fairly minor and they work. This may even be the wrong place to post this.

Steps are:

Rename DYPlayer.cpp DyPlayer.c

Remove all class statements e.g “DYPlayer::” from all functions

Remove all “inline” statements from functions

Include relevant headers

Add serial read and write functions, including a separate function for the single byte crc serialwrite_crc. Using a buffer length of [1] didn’t work so this was the quick fix. Serial read write functions are as generated by MPLAB Code Configurator (MPP).

Amend DYPlayer.h to match DYPlayer.c

Modify typedef and enum statements to be XC8 compliant.

Files attached

DYPlayer for PIC.zip

Pete

SnijderC commented 1 year ago

Added this to the README for future reference.