/* Registers a callback. 
Registers and enable a callback function which is implemented by the user. */
void quad_decoder_register_callback(enum quad_decoder_axis qdec, quad_decoder_callback_t fun)
/* Registers a callback. 
Registers and enable a callback function which is implemented by the user. */
void quad_decoder_register_callback(enum quad_decoder_axis qdec, quad_decoder_callback_t fun)
{
	switch (qdec) {
	case QDEC_AXIS_X:
		quad_decoder0_callback = fun;
		break;
	case QDEC_AXIS_Y:
		quad_decoder1_callback = fun;
		break;
	case QDEC_AXIS_Z:
		quad_decoder2_callback = fun;
		break;
	}
}