2 Replies Latest reply on Nov 2, 2017 1:12 PM by user_365962704

    [Custom components] How to identify a PSoC6?

    user_365962704

      Hi,

       

      I'm working on a custom component (https://github.com/C47D/nRF24_Component) and would like to add support for PSoC6 devices

      With PSoC5LP and PSoC4 a couple of defines were available to identify them:

      CY_PSOC5 and CY_PSOC4 respectively.

      Couldn't find CY_PSOC6, so my question is: is a define available to identify i'm using a PSoC6 on my project? or any other way to do this?

       

      Regards,

      Carlos

        • 1. Re: [Custom components] How to identify a PSoC6?
          msur

          Hello Carlos,

           

          Currently we do not have any defines, which identifies PSoC 6 in a code. However, we have defines for part number, which you can use to  identify PSoC 6. And you can even remove codes depending on the part# you are using.

           

          Something like below for PSoC 63 family:

           

          #if defined (CY8C6336BZI_BLF03)   

          #elif defined (CY8C6316BZI_BLF03)   

          #elif defined (CY8C6316BZI_BLF53)   

          #elif defined (CY8C6336BZI_BLD13)   

          #elif defined (CY8C6347BZI_BLD43)   

          #elif defined (CY8C6347BZI_BLD33)   

          #elif defined (CY8C6347BZI_BLD53)   

          #elif defined (CY8C6347FMI_BLD13)   

          #elif defined (CY8C6347FMI_BLD43)   

          #elif defined (CY8C6347FMI_BLD33)   

          #elif defined (CY8C6347FMI_BLD53)   

          #else

              #define CY_NON_PSOC6

          #endif

           

          #ifndef CY_NON_PSOC6

              #define CY_PSOC6

          #endif

           

          You can also define CY_PSOC6 in the additional preprocessor defines in the compiler settings for both M0+ and M4 when building for PSoC 6.

           

          Regards,

          Meenakshi Sundaram R

          • 2. Re: [Custom components] How to identify a PSoC6?
            user_365962704

            Hi Meenakshi,

             

            Thanks for the reply, for now i'm just using

            #if defined (CY_GPIO_H)

            so far it works because PSoC6 devices are the only devices (that i know of) that does that define, so it's a little bit easier for me to maintain it.

             

            Regards

            Carlos