#ifndef ENCODERIO_H
#define ENCODERIO_H

#ifdef __cplusplus
extern "C" {
#endif

//----------------------------------
// includes and forward declarations
//----------------------------------
#include <pkgconf/hal.h>
#include <cyg/infra/cyg_type.h>
#include <cyg/io/encoderconfig_keys.h>

//--------------------------
// The default configuration
//--------------------------
#define ENCODER_INITIAL_COUNT CYGDAT_IO_ENCODER_INITIAL_COUNT

typedef enum {
  ENCODER_LATCH_MODE_NO_LATCH,
  ENCODER_LATCH_MODE_INDEX,
  ENCODER_LATCH_MODE_PROBE
} ENCODER_LATCH_MODE;

#define ENCODER_LATCH_MODE_DEFAULT ENCODER_LATCH_MODE_NO_LATCH

#ifdef __cplusplus
}
#endif

#endif //ENCODERIO_H
