Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS: DSS - SCANF DON'T WAIT OPERATOR INPUT

$
0
0

Tool/software: Code Composer Studio

Hi,

I have written this code on CCS6 

void main(void){

    char *c = "x";
    char *ax = "x";
    while(strcmp(c,"e")){
        printf("Press:\n");
        printf("p --> Program Device\n");
        printf("e --> Exit Programmer\n");
        printf(">>");
        scanf("%s",c);
        if(!strcmp(c,"p")){
            printf("Connect and turn on device to be programmed\n");
            while(strcmp(ax,"g")){
                printf("Press <g> to continue\n");
                scanf("%s",ax);
            }
            program();
            continue;
        }
    }
    printf("\nGoodbye !\n");
    exit(0);

}

Running it with CCS works correctly.

Using DSS, when I run it on the command line, it loops ignoring scans functions:

Press:
p --> Program Device
e --> Exit Programmer
>>

Press:
p --> Program Device
e --> Exit Programmer
>>

Press:
p --> Program Device
e --> Exit Programmer
>>

Any tip?

Thanks in advance

Paolo


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>