8 Replies Latest reply on Aug 7, 2012 2:32 AM by suresh.reddy

    ANSI prototype Error

    jay.patel

      Hi,

         

        I am new to PSOC and i am facing error  "requires ANSI-style prototype".

         

      This is the code

         

      #include <device.h>
      #include "stdio.h"
      #include "math.h"

      /* Number of samples to be taken before averaging the ADC value */
      void main()
      {
        
      /* Start both DACs */
      IDAC1_MSD_Start();
      IDAC2_LSD_Start();
      /* Sets both IDACs to source current */
      IDAC1_MSD_SetPolarity(IDAC1_MSD_SOURCE);
      IDAC1_MSD_SetPolarity(IDAC2_LSD_SOURCE);
      /* Sets proper ranges */
      IDAC1_MSD_SetRange(IDAC1_MSD_RANGE_2mA );
      IDAC2_LSD_SetRange(IDAC2_LSD_RANGE_255uA);

         

      /*facing problem in this line*/
      iDAC11_SetValue(12) ;
      }
      /* 11-Bit SetValue function. */
      void iDAC11_SetValue(uint16 dacValue)
      {
          uint8 msb, lsb;
          /* Split data into 2 bytes */
          msb = (uint8)(dacValue >> 3);
          lsb = (uint8)((dacValue << 0) & 0x07);
          /* Write values */
          IDAC1_MSD_SetValue(msb);
          IDAC2_LSD_SetValue(lsb);    
      }
      Please reply ASAP its urgent.