The controller may not matter for your final setup but for the port of the library it may well do.
In this community we discuss, port and maintain libraries that (should) run on the Particle devices but not any arbitrary non-related library for other controllers.
If you are running a Particle device and have problems with the libraries that are meant to run then we probably can help, but with your code I’m not really familiar or would even know where to look into the implementation of the libraries you are calling there.
Nor do I know how the “SPI concept” is implemented on your PIC. Although I could look it up. But a dedicated PIC community (if there is any) or any cross platform forum (e.g. stackexchange) would probably already have people who know.