encode firmware vales to C