A current-mode system to self-measure temperature on implantable optoelectronics