Functional devices in photonic crystals for future photonic integrated circuits