1 Reply Latest reply on Jul 28, 2019 8:06 PM by ChiP_16

    PDL 3.1 error in generated code for CapSense

    ChiP_16

      Hi,

      Using CapSense with PDL 3.1, it generate CapSense_Control.c below

      static cy_en_syspm_status_t CapSense_SwitchPowerModeCallback(cy_stc_syspm_callback_params_t *callbackParams)

      {

          cy_en_syspm_status_t retVal = CY_SYSPM_SUCCESS;

       

       

          #if (0u != CapSense_ADC_EN)

              uint8 temp;

          #endif /* (0u != CapSense_ADC_EN) */

       

       

          switch(callbackParams->mode)

          {

          case (CY_SYSPM_CHECK_READY):

              if (CapSense_NOT_BUSY != CapSense_IsBusy())

              {

                  /* Scanning in progress */

                  retVal = CY_SYSPM_FAIL;

              }

              #if (0u != CapSense_ADC_EN)

                  temp = CapSense_AdcIsBusy();

                  if ((CapSense_AdcSTATUS_IDLE != temp) &&

                      (CapSense_AdcSTATUS_OVERFLOW != temp))

                  {

                      /* Scanning in progress */

                      retVal = CY_SYSPM_FAIL;

                  }

              #endif /* (0u != CapSense_ADC_EN) */

              break;

          default:

              break;

          }

          return(retVal);

      }

       

      However in cy_syspm.h, the structure does not has member named mode. It result in build error.

      /** The structure contains syspm callback parameters */

      typedef struct

      {

          void *base;         /**< Base address of a HW instance, matches name of the driver in

                                   the API for the base address. Can be undefined if not required. Base address is not

                                   required for the SysPm driver as the device has only one set of power modes */

          void *context;      /**< Context for the handler function. This item can be

                                   skipped if not required. Can be undefined if not required. */

       

       

      } cy_stc_syspm_callback_params_t;

       

      Regards,

      Pong