STAR Firmware by JonnyC - Source Code and Explanation

These would be a good place to start I think, TK has taken a lot of time to combine most of the firmware around.

https://code.launchpad.net/~toykeeper/flashlight-firmware/trunk