Search:

Type: Posts; User: Nikosant03

Page 1 of 4 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    5,355

    makfile works fine thanks!!

    makfile works fine thanks!!
  2. Replies
    3
    Views
    5,355

    How to build multiple C files in VS code

    Hi guys,

    I try to compile a program with a main.c, file.c and file.h files
    The file.c and file.h are in another directory than the main.c
    I included the file.h in both main.c and file.c

    16612...
  3. Replies
    2
    Views
    2,519

    Thank a lot!!! It works fine now. I know about ==...

    Thank a lot!!! It works fine now. I know about == operator, it was just carelessness.

    But I didn't know about that:


    thanks :)
  4. Replies
    2
    Views
    2,519

    Function pointer doesn't work as expected

    Hi, I try to understand the concept of function pointers and I wrote an example for demonstration but it doesn't work as expected.

    The return_error fuction never calls the mul_numbers.


    ...
  5. Hi John and thank you for your reply, still I do...

    Hi John and thank you for your reply, still I do not understand it. Could you provide a real case example?
  6. What is the purpose of this bitwise operation?

    Could someone explain to me the purpose of this bitwise operation?


    #define NVMC_CONFIG_WEN_Pos (0UL) /*!< Position of WEN field. */
    #define NVMC_CONFIG_WEN_Msk (0x3UL << NVMC_CONFIG_WEN_Pos)...
  7. Replies
    2
    Views
    2,083

    I found the error, there was a space in CONCAT_2...

    I found the error, there was a space in CONCAT_2 (p1,p2)
  8. Replies
    2
    Views
    2,083

    Concatenate with preprocessing function

    Hi guys,

    I am learning how to write macro style fuctions.
    I wrote this simple function in a header file



    #ifndef CONCATENATE_H
    #define CONCATENATE_H
  9. Replies
    5
    Views
    2,850

    That makes sense!! This is the base address of...

    That makes sense!!
    This is the base address of the ADC peripheral


    define NRF_SAADC_BASE 0x40007000UL


    So by locating the struct at the base address provides the offset address...
  10. Replies
    5
    Views
    2,850

    Struggling to understand why he is doing like...

    Struggling to understand why he is doing like that. Why is required this definition?



    define NRF_SAADC_BASE 0x40007000UL


    Why not implement like this?
  11. Replies
    5
    Views
    2,850

    What is this macro style definition?

    Hi guys,
    I am looking an ADC driver and I found a definition that I do not understand how is expanded.



    define NRF_SAADC_BASE 0x40007000UL
  12. Replies
    12
    Views
    3,753

    I have a lot of questions but let's start from a...

    I have a lot of questions but let's start from a simple one :)


    Why you use anonymous enum instead of:



    #define NUM_FLEXIFORCE_SENSORS 8 // OR
    const uint8_t num_flexiforce_sensors = 8;
  13. Replies
    12
    Views
    3,753

    Thank you very much Salem!!

    Thank you very much Salem!!
  14. Replies
    12
    Views
    3,753

    A lot of information!! I will read your...

    A lot of information!! I will read your suggestions carefully and revert if I have questions!! Thanks a lot
  15. Replies
    5
    Views
    6,531

    I see, thanks laserlight!!

    I see, thanks laserlight!!
  16. Replies
    12
    Views
    3,753

    I must assign the whole payload to p_data,...

    I must assign the whole payload to p_data, otherwise just the imu will be transmitted (bluetooth application)



    Should I typecast the payload?

    hvx_params.p_data = (uint8_t*)sampling->payload...
  17. Replies
    5
    Views
    6,531

    Thank you John!! Why you passing the array...

    Thank you John!!



    Why you passing the array by reference?

    f((uint8_t*)n, sizeof n);
    That's not the same?
  18. Replies
    12
    Views
    3,753

    Thank you Salem!! When the payload is...

    Thank you Salem!!



    When the payload is ready it is assigned to a pointer. This pointer belongs to an SDK provided my the manufacturer of the Bluetooth IC I use.



    ble_gatts_hvx_params_t...
  19. Replies
    12
    Views
    3,753

    Thank you Tim!! That was just for the example...

    Thank you Tim!! That was just for the example code chunk I prepared..
  20. Replies
    12
    Views
    3,753

    Could you review my code?

    Hi guys,

    I want to read an IMU and some pressure sensors and store them together with a counter into a buffer. This is a subtask of my main firmware development. I wrote a working code chunk, but...
  21. Replies
    2
    Views
    2,249

    Thank you Salem!!

    Thank you Salem!!
  22. Replies
    2
    Views
    2,249

    Macro style function

    Hi,

    This macro style function:

    #define nrf_queue_pop(_p_queue, _p_element) nrf_queue_generic_pop((_p_queue), (_p_element), false)

    is the same like this?


    nrf_queue_pop(_p_queue,...
  23. Thread: Pointers

    by Nikosant03
    Replies
    3
    Views
    3,030

    Thank you guys!!

    Thank you guys!!
  24. Thread: Pointers

    by Nikosant03
    Replies
    3
    Views
    3,030

    Type casting Pointers

    Hi everyone,

    I learn type casting of pointers.

    Could someone explain me why the last printf prints 0.00? I expect to print 10. What I am doing wrong?



    #include <stdio.h>
  25. Replies
    5
    Views
    6,531

    Understand typecasting of pointer

    Hi guys,

    Can you please help understand how this pointer typecast of data_in array works?

    Function prototype:


    nrf_ringbuf_cpy_put(nrf_ringbuf_t const * p_ringbuf, uint8_t const* p_data,...
Results 1 to 25 of 97
Page 1 of 4 1 2 3 4