Open ghost opened 9 years ago
I think it should be able to use a cast to a function pointer. So the buffer contains a function pointer and the buffer content should be cast to a function pointer --> no refactoring needed.
Example:
#include <stdlib.h>
void test(char* buf, int length) {
void (*fptr)(void);
fptr = (void (*)(void))buf;
fptr();
}
void callMe(void) {
printf("Call me");
}
int main(void) {
char* buf = (char*)callMe;
test(buf, 0);
return EXIT_SUCCESS;
}
thanks, I appreciate your help!
Pls close if clarified.
@mpe5651 @Blackjack92 Why is this ticket sill open?
Isn't this related to Bug #19? We should close either this or that ticket. @mpe5651 Pls decide which one is more related to the actual issue.
refactor existing timer functions to be able to run timer1 properly