Search:

Type: Posts; User: wolfrose

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. I'm writing a small threading manager for...

    I'm writing a small threading manager for microcontrollers and having problems in referencing pointers to void :)
  2. malloc different types of data and a pointer to array

    Hi,

    I want to get a pointer to a list of data that should be a list of arguments.

    These are header stuff:
    ...
  3. I liked the "toys" description :biggrin: Yes...

    I liked the "toys" description :biggrin:

    Yes of course without OS, one has to read the datasheet and write the device drivers for that chip.

    Arduino; for example, is doing this by installing...
  4. Yes, I got you, you mean that the hardware is...

    Yes, I got you, you mean that the hardware is something done which is the CPU and how it handles tasks, that's the hardware part.

    But for the software part, it is the way how the core main...
  5. OK, so my understanding for the desktop running...

    OK, so my understanding for the desktop running concept is that windows is built over a kernel written in C.

    So the kernel of the CPU is the one that do the algorithms, logic and arithmetic...
  6. How a CPU with multi-core architecture run kernel with one main function ?

    Hi,

    I hope it's the right forum to ask this question, I was doing a simple microcontroller session and one asked me this question which I didn't expect actually ;)

    He asked me why in a C...
  7. So is recursion a good programming practice or I...

    So is recursion a good programming practice or I better use function pointers and callbacks from a manager function ?
  8. It means like "hopefully" in the Arabic language,...

    It means like "hopefully" in the Arabic language, also; like, for sake of God, for the love of God ... etc. Arabs also have religious phrases like any other regions in the world :) I hope it's not a...
  9. I found this link which talks about the goals I...

    I found this link which talks about the goals I want to reach for God's will.

    Arduino Linked List Menu for LCD | Arduino | C++ Programming | Freelancer

    Yes, I want a code that manage the writes...
  10. I checked the optimizations in codeblocks, there...

    I checked the optimizations in codeblocks, there are 11. Which one to use ?

    Also, went to the gcc website, this link, there are a lot of stuff here:

    Optimize Options (Using the GNU Compiler...
  11. OK, so unless I optimize the compiler, it would...

    OK, so unless I optimize the compiler, it would be like free machine. Basically a compiler like the GCC is doing anything freely without optimizations. The programmer has to do them.

    Are there any...
  12. It's ok, I'm not insisting on this method, II...

    It's ok, I'm not insisting on this method, II just tried it and thought why it crashes every time.

    My alternative solution is to run a normal timer; like:


    uint32_t millis(void){
    ...
  13. I'm searching now for software timers. I want...

    I'm searching now for software timers.

    I want a timer to run the background, I want to do some multitasking and learn a little bit of threading.
  14. But the same method is known in C programming....

    But the same method is known in C programming. Check this link:

    C - Recursion - Tutorialspoint
  15. Yes, I think the recursive calls are causing the...

    Yes, I think the recursive calls are causing the problem. A normal while loop works perfectly.

    Yes, the way I'm calling the function from itself is wrong I guess, I should call another problem.
  16. I want to run a counter until overflow but counting stops at 43178

    Hello,

    I'm trying to emulate Arduino
    millis() function which is used for functions timing, ... etc.

    I tried this function which is working until it hits 43178 and stops every time I run this...
  17. Replies
    16
    Views
    1,007

    It's OK I solved it partially.

    It's OK I solved it partially.
  18. Replies
    16
    Views
    1,007

    Hello, I have another question regarding...

    Hello,

    I have another question regarding accessing struct in multiple source files. Should I post it here or open a new thread ?
  19. Replies
    16
    Views
    1,007

    OK, I did little adjustments. I changed the...

    OK, I did little adjustments. I changed the function pointer to return a value, and this way I can use it with functions that return values and functions that returns void.


    ...
  20. Replies
    16
    Views
    1,007

    OK, sorry didn't notice the way of assigning the...

    OK, sorry didn't notice the way of assigning the function pointer.

    I tested the code, it's working but I tried something else.

    What if the function is returning something ? how to design the...
  21. Replies
    16
    Views
    1,007

    OK, I tried that, and started with a function...

    OK, I tried that, and started with a function that returns 32-bit number.

    But got an error:





    static unsigned int i;
  22. Replies
    16
    Views
    1,007

    I'm trying to do this: void...

    I'm trying to do this:



    void (*function_pointer)(void *);


    uint8_t fun1(uint8_t a, uint8_t b, uint8_t *str1){
    printf("%s",*str1);
    return a + b;
  23. Replies
    16
    Views
    1,007

    Thank you so much for clarifying this, didn't...

    Thank you so much for clarifying this, didn't know this about stucts syntax, what about unions and enums, do they follow the same rules ?
  24. Replies
    16
    Views
    1,007

    Isn't there a way to declare a function pointer...

    Isn't there a way to declare a function pointer with a form that can receive any type of function ?

    Because I have different types of functions; for example,



    void fun1(uint8_t num, uint8_t...
  25. Replies
    16
    Views
    1,007

    multi-argument function pointer and enum

    Hi,

    I have two main questions:

    1. How to design a function pointer that can deal with various types of functions ?

    For example, I have a function that receive 3 arguments. I tried to assign...
Results 1 to 25 of 69
Page 1 of 3 1 2 3