Add C code for led gpio control