CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 6 matches
CCS Forum Index
Author Message
  Topic: sleep() with re-mappable EXT1 as wake up
marek816

Replies: 1
Views: 5506

PostForum: General CCS C Discussion   Posted: Wed Aug 19, 2015 1:17 pm   Subject: sleep() with re-mappable EXT1 as wake up
Hi, my code will sleep if I disable INTR_GLOBAL but will not wake from following code.
uP is DSPIC33FJ16GS502
I've tried every combination I can think of. Data sheet says:
"The device will wak ...
  Topic: How to decode "r=64;g=128;b=255;on=100;off=1000"
marek816

Replies: 12
Views: 19780

PostForum: General CCS C Discussion   Posted: Fri Aug 07, 2015 8:53 am   Subject: How to decode "r=64;g=128;b=255;on=100;off=1000"
My commands might not all be the same number of characters (if I use single characters I limit myself to 26 (A-Z).

Anyway, I just solved it by declaring another case of strtok with the internal sta ...
  Topic: How to decode "r=64;g=128;b=255;on=100;off=1000"
marek816

Replies: 12
Views: 19780

PostForum: General CCS C Discussion   Posted: Fri Aug 07, 2015 5:12 am   Subject: How to decode "r=64;g=128;b=255;on=100;off=1000"
I think the problem might be due to the strtok function in string.h using a static char to save the pointer.
I suspect this gets overwritten by the nested call to strtok in my execute_command functio ...
  Topic: How to decode "r=64;g=128;b=255;on=100;off=1000"
marek816

Replies: 12
Views: 19780

PostForum: General CCS C Discussion   Posted: Fri Aug 07, 2015 4:13 am   Subject: How to decode "r=64;g=128;b=255;on=100;off=1000"
Here is the code extract, I think all of the declarations should be there:

Command string can be any commands and length in the format command1=a;command2=b;command<x>=c etc etc


******** ...
  Topic: How to decode "r=64;g=128;b=255;on=100;off=1000"
marek816

Replies: 12
Views: 19780

PostForum: General CCS C Discussion   Posted: Thu Aug 06, 2015 4:53 pm   Subject: How to decode "r=64;g=128;b=255;on=100;off=1000"
The protocol doesn't always arrive in the same order or with all fields present.
I can parse the ; easy but I cannot seem to successfully make a copy of the semi parsed string (r=100) within the strt ...
  Topic: How to decode "r=64;g=128;b=255;on=100;off=1000"
marek816

Replies: 12
Views: 19780

PostForum: General CCS C Discussion   Posted: Thu Aug 06, 2015 2:36 pm   Subject: How to decode "r=64;g=128;b=255;on=100;off=1000"
My first post.
New to C so please forgive ignorance.

I'm trying to decode "r=64;g=128;b=255;on=100;off=1000" within a loop to give command and value variable pairs (r and 64 etc) that I ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group