- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would it make sense to change cytypes.h to use stdbool.h's bool type for CYBIT variables?
Currently, for non-PSoC3, it defines:
#define CYBIT uint8
But this means when you hover over a CYBIT variable, it shows "uint8" as the type, so it's not obvious if it's meant to be boolean or integer. If this were changed to bool type, it would show that when hovering over it, to clarify that the variable is meant to be true or false, not an integer.
#define CYBIT bool
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JoBr_1593366,
CYBIT is one of the defines among others which is used to support type modifiers for cross platforms IDE's like Keil. You can find information on these in page number 8 under the section "Keil 8051 Compatibility Defines" (Link: http://www.cypress.com/file/130561/download )
Since there were a few issues with bool in different compiler versions it might have been defined as uint8 type. You can go ahead and modify the type based on your application.
Hope this helps,
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JoBr_1593366,
CYBIT is one of the defines among others which is used to support type modifiers for cross platforms IDE's like Keil. You can find information on these in page number 8 under the section "Keil 8051 Compatibility Defines" (Link: http://www.cypress.com/file/130561/download )
Since there were a few issues with bool in different compiler versions it might have been defined as uint8 type. You can go ahead and modify the type based on your application.
Hope this helps,
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RakshithM_16 wrote:
used to support type modifiers for cross platforms IDE's like Keil.
Yes, I know. I'm just suggesting that you define it as a boolean type for platforms that support it. I don't want to change it in my projects since it's part of the Generated Source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JoBr_1593366,
Thank you for your suggestion. We will file an enhancement request for the same.
Thank you for the continuous interest in Cypress products.
Regards,
Rakshith M B
Rakshith M B