makfile works fine thanks!!
Type: Posts; User: Nikosant03
makfile works fine thanks!!
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...
Thank a lot!!! It works fine now. I know about == operator, it was just carelessness.
But I didn't know about that:
thanks :)
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.
...
Hi John and thank you for your reply, still I do not understand it. Could you provide a real case example?
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)...
I found the error, there was a space in CONCAT_2 (p1,p2)
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
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...
Struggling to understand why he is doing like that. Why is required this definition?
define NRF_SAADC_BASE 0x40007000UL
Why not implement like this?
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
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;
Thank you very much Salem!!
A lot of information!! I will read your suggestions carefully and revert if I have questions!! Thanks a lot
I see, thanks laserlight!!
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...
Thank you John!!
Why you passing the array by reference?
f((uint8_t*)n, sizeof n);
That's not the same?
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...
Thank you Tim!! That was just for the example code chunk I prepared..
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...
Thank you Salem!!
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,...
Thank you guys!!
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>
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,...