Drivers for KBE and Flash

Where can I find the driver source code of the keyboard emulator? I have some sporadic issues and want to investigate and try to find the root cause.
in addition the flash - SPI module where can i find it’s drivers source code?

There is tiny file system from @ taylorza on codeshare for the flash module.

are there also the drivers of the KBE?

Please check the documentation, it has an example for KBE: