5 Replies Latest reply on Mar 5, 2015 7:21 AM by MiTo_1583836

    Quadrature Driver API exploration in WICED SDK

    MiTo_1583836

      Hi all,


      I am trying to better understand the Quadrature Driver API available in: ./WICED-Smart-SDK/include/Drivers/quadraturedriver.h


      It sounds that a structure is defined in: ./WICED-Smart-SDK/include/Drivers/hidddriversconfig.h


      In this specific header file I found the following comment:


      /// Configuration value used for each GPIO pin used for quadrature. This

          /// allows configuration of pull up/down, etc. just like a GPIO.

          WORD    quadratureInputGpioConfig;

       

       

          /// If TRUE, Port 0 selected as quadrature input port (P2,P3,P4,P5,P6,P7)

          /// If FALSE, Port 2 selected as quadrature input port (P32,P33,P34,P35,P36,P37)

          BYTE    port0PinsUsedAsQuadratureInput;

       

      How can we set this structure? let's say we want to use GPIO P2 and GPIO P3 as inputs for quadrature decoder.


      Also what are the calls that need to be done to setup properly the quadrature interface on the BCM20737? I see the following API:


      void quad_hwInit(void);


      void quad_init(void);


      void quad_configurePortPins(void); ---> not parameters, so I believe we need to set something else up.