Hello
If I send serial data into my serial port, I can process the command and everthing is fine. However, this seems to block all other interrupts. Thus, if I subsequenly want to process a command input from one of the control knobs, the system will not respond. The inputs from the knons only work until the point that I send some commands via the serial port.
Is the problem here that scanf is basically tying up my serial port? To check this, I made sure I was sending complete strings and was able to confirm this with printf.
I am pretty confused about this - any ideas to point me in the right direction?
/********************* remote serial IRQ *************************/
void remotecontrol(void) {
int q=0;
myled=!myled; /* just to let us know we are looping through here */
//printf("1");
if (remote.scanf("%s", remcon)){
remaction=atoi(remcon);}
/* here we flush everything to make sure that any garbage entries do not remain */
/* because what we got in from the serial link was not a valid string */
else {
for (q=0;q<8;q++) {
remcon[q]=(' '); /* clean it up for the next cycle */
remaction=0;
}
}
flag=remaction;
remcontoken=1;
//printf("2");
}
Hello
If I send serial data into my serial port, I can process the command and everthing is fine. However, this seems to block all other interrupts. Thus, if I subsequenly want to process a command input from one of the control knobs, the system will not respond. The inputs from the knons only work until the point that I send some commands via the serial port.
Is the problem here that scanf is basically tying up my serial port? To check this, I made sure I was sending complete strings and was able to confirm this with printf.
I am pretty confused about this - any ideas to point me in the right direction?
/********************* remote serial IRQ *************************/
void remotecontrol(void) {
int q=0;
myled=!myled; /* just to let us know we are looping through here */
//printf("1");
if (remote.scanf("%s", remcon)){
remaction=atoi(remcon);}
/* here we flush everything to make sure that any garbage entries do not remain */
/* because what we got in from the serial link was not a valid string */
else {
for (q=0;q<8;q++) {
remcon[q]=(' '); /* clean it up for the next cycle */
remaction=0;
}
}
flag=remaction;
remcontoken=1;
//printf("2");
}