Search the Community
Showing results for tags 'function'.
-
Hello I don't know if this is quite the right place to post this or if my title is describing this correct and maybe this is more of a general C questions, but I hope its OK to post it here. It is on a MSP430 Launchpad anyway. The code is simplified, there is more parameters passed to the function etc. // I have a function like this. void foo (char* bar) { if (!bar) Serial.print("bar is NULL"); // I want to check when NULL is passed on but this doesn't work? // Also tried (bar == NULL) and (bar[0] == NULL)... else Serial.print("bar is not NULL"); } // Usually I call it
-
Hi again, maybe you guys are getting tire of me by now, but i'm trying to make the exercises and all what appears on the tutorial http://www.43oh.com/2010/08/10-beginner-msp430-tutorials-and-counting/. Well, i got count = contador(); for (j=1; j<count; j++){ P1OUT |= LED_L + LED_R; delayfun(); P1OUT &= ~(LED_L + LED_R); delayfun(); } it turns out that, it calls the function contador() normally and it do what it has to do, but when it has to call the function delayfun(), it skip it. and both of the functions are declared void delayfun (void); int unsigned contador (void); int main