Added api_flash.c/h
Added some function for writing config to flash. NOT TESTED.