Error in Propeller C Library Studies
Genetix
Posts: 1,754
Sharing Values in Source Files - Functions in Multiple Files Sharing Variables - Try This
http://learn.parallax.com/propeller-c-library-studies/functions-multiple-files-sharing-variables
The last line of Timer.c has the wrong variable and generates an error when you build the project.
This is what it should be:
http://learn.parallax.com/propeller-c-library-studies/functions-multiple-files-sharing-variables
The last line of Timer.c has the wrong variable and generates an error when you build the project.
void secondCtr(void *par) { int dt = CLKFREQ; int t = CNT; while(1) { waitcnt(t += dt); awesome_cog_sec_cnt++; // Wrong name - Generates a Build Error } }
This is what it should be:
void secondCtr(void *par) { int dt = CLKFREQ; int t = CNT; while(1) { waitcnt(t += dt); // seconds++; awesome_cog_seconds++; // 3rd declared variable at top of Timer.c } }
Comments
The code has been fixed.