We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
in c51 i use function pointer : code void (*serial_tabel []) () ={ func_0, func_1, func_2, func_3,func_4 }; static void func_0 (){ strcpy(SPackData,"ngetit 0"); SendPack (); } static void func_1 (){ strcpy(SPackData,"ngetit 1"); SendPack (); } static void func_2 (){ strcpy(SPackData,"ngetit 2"); SendPack (); } static void func_3 (){ strcpy(SPackData,"ngetit 3"); SendPack (); } static void func_4 (){ data byte a,b,d; a = (byte) atoi(CMD_LOC[1]); b = (byte) atoi(CMD_LOC[2]); d = (byte) atoi(CMD_LOC[3]); SetBaseFrq(d); strcpy(SPackData,"i love you !"); SendPack (); } in func_4 () i get this warning : *** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?SERIAL_CMD2 CALLER: ?PR?FUNC_4?SERIAL_CMD2 why ? what mean ? how reolve ?
"There is an application note that covers everything you should know about function pointers in C51 because they are tricky." I've already told him that: http://www.8052.com/forum/read.phtml?id=32055&top=
I know. :-) Thanks, Jon