Can I call RTX-51 tiny function in my function that was called in my task? Example:
void function1 (void) { os_wait (...) ....... } void task0 (void) _task_ 0 { ..... function1(); ..... }
YES, please see also example code (i.e. \Keil\c51\RtxTiny2\Examples\Traffic)
Hello Reinhard Keil, I want to add some more features to the current RTX-51 Tiny, so I'll need to call RTX-51 tiny functions in my own function. I want to ask if my function can be called from more than 1 task? Example:
void function1 (void) reentrant { .... os_wait (...); .... } void task1 (void) _task_ 1 { while (1) { .... function1 (); .... } } void task2 (void) _task_ 2 { while (1) { .... function1 (); .... } }
Yan can do this. When the function is reentrant, there is no problem (see: http://www.keil.com/support/docs/1861.htm) When the function is not reentrant, the linker will issue warning L15 and you need to proceed as explained in: http://www.keil.com/support/docs/2042.htm