I have the need to create something that emulates a piece of hardware that will be built later. The hardware will act as a SPI slave and I thought "heck, that should be easy....right?"

I've done a bunch of searching and while there are plenty of examples of SPI master code, there just doesn't seem to be much for implementing a slave, particularly on the Teensy 4.0. I'm just making the rabid assumption that the NXP part has lovely built-in register functionality that would allow me to configure it as a slave, point to the data, and let it handle my life for me, but getting that exposed to the Arduino (Teensyduino?) development environment doesn't seem to be as simple as I would have hoped.

I'm betting that for my purposes I can actually just hack together some bit-banging, polled-not-even-interrupt-driven code that will do what I want (it's pretty basic), but before I jump off of that particular embarrassing bridge I thought I would first publicly display my ignorance and ask if there are any examples of SPI slave code for the Teensy 4.0 out there.

Anybody have any sage wisdom here? OK, how about any semi-snarky advice? Or should I consider a different profession in the lucrative lawn-mowing business?

..glen