SBus is a Futaba protocol that can be implemented with simple serial transmit functions. The problem is that the signal polarity is actually backwards at the hardware level. That needs a simple hardware inverter, or disable the hardware inverter on the CC3D (hardware mod or simple change to firmware), or use the unreleased development version called "next" (you usually want to build it yourself) because it has an option to do the non-inverted SBus.
You could look at the LP code to see how SBus is decoded and make a matching encoder for your project, or find an SBus (S.Bus) protocol description on the internet somewhere.
To make a hardware change to skip inverting the SBus, look at the schematic, find the external inverter chip connected to MainPort, note that a signal line tells it whether to invert it or not, cut the line, permanently tie the line high or low, I don't know which without doing this research.
I would guess that someone has written an RPi driver to do PPM accurately, but it would require driver privileges and interrupts/DMA, not application privileges and bit banging.