Search:

Type: Posts; User: Nikosant03

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    425

    Bit fields and flash memory

    Hi everyone,

    I was reading about bit fields and I tried to apply them to my firmware for practice. So I created a two member struct and define the members to be one bit in lenght. Finally, I...
  2. Replies
    5
    Views
    362

    Yes, thanks for the quick tip!!

    Yes, thanks for the quick tip!!
  3. Replies
    5
    Views
    362

    Yes your're right.. 16299

    Yes your're right..

    16299
  4. Replies
    5
    Views
    362

    Function overloading

    Hi everyone,

    I found a library that defines a preprocessor function style like this:


    #define_EXFUN(name, proto) name proto

    and then declare the functions like this:
  5. Great explanation thanks!!

    Great explanation thanks!!
  6. That's the difference between a pro and a...

    That's the difference between a pro and a beginner :D . Room for improvement!!!
  7. Hi, I was thinking that the uninitialized...

    Hi, I was thinking that the uninitialized variables are initialized by the compiler to 0. No?
  8. oops sorry I ignored the "average" ...

    oops sorry I ignored the "average"




    #include <stdio.h>


    int i=1, cou;
    int num,sum=0;
  9. You,re sure? It seems to work.. GDB online...

    You,re sure?

    It seems to work.. GDB online Debugger | Code, Compile, Run, Debug online C, C++

    What are your expectations?
  10. Try this #include int i=1,...

    Try this




    #include <stdio.h>
    int i=1, cou;
    int num,sum=0;
    int avg;
  11. No it don't. I am using Segger Embedded Studio....

    No it don't. I am using Segger Embedded Studio.
    Nevermind thanks!!
  12. Thanks Salem, However why this work? ...

    Thanks Salem,

    However why this work?




    const char read_payload = 38;
    char read_raw_data[read_payload] __attribute__((aligned(4)));
  13. Thread: arrays

    by Nikosant03
    Replies
    7
    Views
    447

    Arrays are used to store data (they are buffers)....

    Arrays are used to store data (they are buffers). If you want read the data inside the array you need to read the index of the array. For example:




    #include <stdio.h>
    #define array_size 10...
  14. Thread: arrays

    by Nikosant03
    Replies
    7
    Views
    447

    I am not sure if I understand your question...

    I am not sure if I understand your question...
  15. Passing array size as a const variable do not compile

    Hi everyone,

    Could someone explain me why the following does not compile?





    const uint8_t read_payload = 38;
    static char read_raw_data[read_payload] __attribute__((aligned(4))) = {0};
  16. Replies
    7
    Views
    339

    Got it, thank you a lot!!!

    Got it, thank you a lot!!!
  17. Replies
    7
    Views
    339

    Thank you for you responce guys, Could explain...

    Thank you for you responce guys,

    Could explain me the purpose of


    sizeof(data_tx) - index

    Still I am struggling to understand how the loop working...
  18. Replies
    7
    Views
    339

    Thank you for your responce Salem, I've seen...

    Thank you for your responce Salem,


    I've seen the reference to the link you provided but still is not clear to be how the second parameter performs.. I mean why this syntax
    sizeof(data_tx) -...
  19. Replies
    7
    Views
    339

    How this snprintf function works?

    Hi everyone,

    I have an array of integers that I want to convert into a string. I found that a safe way of doing this task is by calling the snprintf function because it truncates rather than...
  20. Replies
    4
    Views
    442

    Sorry for the late response, thanks guys!! Ok,...

    Sorry for the late response, thanks guys!!

    Ok, so the do..while(0) loop is actually used in order to make a uniform macro function, a function that it can be used anywhere especially in if..else...
  21. Replies
    4
    Views
    442

    Do not understand this do..while loop

    Hi everyone,

    Could someone explain me how does this do..while work? What is the purpose of while (!m_finished)? How the loop will break if while (0)?



    #define WAIT_FOR_PERIPH() \
    do { ...
  22. Wooo what a great explanation!! Not this concept...

    Wooo what a great explanation!! Not this concept is clear to me!! Thanks for your effort!!
  23. Thank you for your responce, What I cannot...

    Thank you for your responce,

    What I cannot understand, is how NRFX_CHECK resolves for either 1 or 0. Basically I so understand this part

    16245
  24. I see, thanks!! So this macro #define...

    I see, thanks!! So this macro
    #define NRFX_CHECK(module_enabled) (module_enabled)
    is like an if statement right? This is how you define if statements with macro?

    For example


    #define...
  25. Cannot understand this C preprocessor function

    Hi, I am looking a third party library and I cannot understand how the following lines work.

    In .c file there is the #if directive


    #if NRFX_CHECK(NRFX_SAADC_ENABLED)
    some code...
    #endif
Results 1 to 25 of 70
Page 1 of 3 1 2 3