- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hai frnds
i am trying to read value of counter 24 bit ,
but some error came i.e(type error unsigned long found pointer expected to unsigned long).
i write the prg as below
unsingned long int value;
Counter24_1_ReadCounter(value);
plz solve this coding.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change this -
unsingned long int value;
Counter24_1_ReadCounter(value);
to this
unsingned long value;
Counter24_1_ReadCounter(value);
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... or shall it be
value = Counter24_1_ReadCounter();
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dana and bob
i already tried as same as you told but it gives same error,plz help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So why don't you post (attach) your project here so that we all can look for errors.
To do so: use the function "Archive Project... " and upload the generated .zip - archive using MS internet explorer (not Chrome!!!)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
unsigned long value;
void main(void)
{
Counter24_1_start();
Counter24_1_ReadCounter(value);
}
!W E:\YVRAO\psocexam\COUNTE~1\COUNTE~1\main.c(11):[warning] calling a function without prototype may cause runtime errors if the function does not return int or unsigned int
!E E:\YVRAO\psocexam\COUNTE~1\COUNTE~1\main.c(12): type error in argument 1 to `Counter24_1_ReadCounter'; found `unsigned long' expected `pointer to unsigned long'
C:\PROGRA~1\Cypress\Common\CYPRES~3\tools\make: *** [obj/main.o] Error 1
counter24bit - 2 error(s) 1 warning(s) 19:49:52
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the mis-understanding, I am talking about posting the complete PROJECT, not only some lines of code. The project contains all the definitions you made. Stick to my prior post to generate an archive.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... and it is
Counter24_1_Start(); // Capital "S"
Counter24_1_ReadCounter(&value); // Address of Value / Pointer to Value
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you bob