You are here

How to use the parameters in PSoC Creator | Cypress Semiconductor

How to use the parameters in PSoC Creator

Summary: 2 Replies, Latest post by Bob Marlowe on 11 Apr 2014 12:11 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_322064261's picture
69 posts

Okay so I keep seeing all these capital letter definitions or whatever they are called and I don't know how to use them..


For my project I want to check if the timer is running, I can see from the documentation that the "readStatus" function returns the following parameters.. STATUS_DOWN and STATUS_RUNNING

I was thinking I could use them like so... if(Timer_ReadStatus() == STATUS_RUNNING) but PSoC creator is not happy with that..

any ideas?




user_78878863's picture
2553 posts

I think it needs to be

if (Timer_ReadStatus()==Timer_STATUS_RUNNING)

but I did not test it... Otherwise: what is the error message you get from the compiler?

user_1377889's picture
9301 posts

HLI is right, I tested it.

As a hint: Open the Timer.h file (if your component is named "Timer") and have a look (search) at STATUS_RUNNING.

As an agreement in C-language only, all names spelled in capital letters are #defined constants.



Log in to post new comments.