Tunable edge states in reconfigurable photonic crystals