Switching of magnetoresistive light-emitting diode by external magnetic field