An energy-efficient spiking neural network with continuous learning for self-adaptive brain-machine interface