Infineon Logo AIROC BTSDK v4.6 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_hal_quadrature.h File Reference

List of parameters and defined functions needed to access the Quadrature driver. More...

Enumerations

enum  { ENABLE_PORT_2_PINS_AS_QUAD_INPUT = 0, ENABLE_PORT_0_PINS_AS_QUAD_INPUT = 1 }
 Defines the quadrature driver that can detect and decode scroll wheel movement in X, Y, Z axis.
 
enum  { QUADRATURE_LED_CONFIG_OPEN_SOURCE = 0x00, QUADRATURE_LED_CONFIG_SOURCE = 0x01, QUADRATURE_LED_CONFIG_OPEN_DRAIN = 0x02, QUADRATURE_LED_CONFIG_DRAIN = 0x03 }
 
enum  {
  CH_XY_128_KHZ_FIXED_SAMPLE_RATE = 0x00, CH_XY_64_KHZ_FIXED_SAMPLE_RATE = 0x01, CH_XY_32_KHZ_FIXED_SAMPLE_RATE = 0x02, CH_XY_16_KHZ_FIXED_SAMPLE_RATE = 0x03,
  CH_XY_SEL_LHL_PWM_RATE = 0x00, CH_XY_SEL_FIXED_RATE = 0x04, CH_XY_DISABLE = 0x00, CH_XY_ENABLE = 0x08,
  CH_Z_SAMPLE_ONCE_PER_LHL_PWM = 0x00, CH_Z_SAMPLE_ONCE_PER_2_LHL_PWM = 0x10, CH_Z_SAMPLE_ONCE_PER_4_LHL_PWM = 0x20, CH_Z_SAMPLE_ONCE_PER_8_LHL_PWM = 0x30,
  CH_Z_SAMPLE_ONCE_PER_16_LHL_PWM = 0x40, CH_Z_SAMPLE_ONCE_PER_32_LHL_PWM = 0x50, CH_Z_SAMPLE_ONCE_PER_64_LHL_PWM = 0x60, CH_Z_SAMPLE_ONCE_PER_128_LHL_PWM = 0x70,
  CH_Z_DISABLE = 0x00, CH_Z_ENABLE = 0x80
}
 

Functions

void wiced_hal_quadrature_configure (uint16_t QOC_LEDs_output_polarity, uint16_t quadratureInputGpioConfig, uint8_t port0PinsUsedAsQuadratureInput, wiced_bool_t configureP26AsQOC0, wiced_bool_t configureP27AsQOC1, wiced_bool_t configureP28AsQOC2, wiced_bool_t configureP29AsQOC3, uint8_t channelEnableAndSamplingRate, wiced_bool_t pollXAxis, wiced_bool_t pollYAxis, wiced_bool_t pollZAxis)
 configure quadrature driver More...
 
void wiced_hal_quadrature_init (void)
 Initialize the quadrature driver. More...
 
void wiced_hal_quadrature_turnOff (void)
 Disable the quadrature interface including wakeups. More...
 
int16_t wiced_hal_quadrature_get_X_motion (void)
 Returns currently accumulated motion for the X axis. More...
 
int16_t wiced_hal_quadrature_get_Y_motion (void)
 Returns currently accumulated motion for the Y axis. More...
 
int16_t wiced_hal_quadrature_get_Z_motion (void)
 Returns currently accumulated motion for the Z axis. More...
 
int16_t wiced_hal_quadrature_get_scroll_count (void)
 Returns currently accumulated motion for the active axis (X, Y or Z). More...
 
void wiced_hal_quadrature_register_for_event_notification (void(*userfn)(void *), void *userdata)
 Register for notification of changes. More...
 

Detailed Description

List of parameters and defined functions needed to access the Quadrature driver.