Questions tagged [pointers]
The pointers tag has no summary.
18 questions
0
votes
1
answer
218
views
How to pass a pointer to multiple functions [closed]
I'm currently in the process of making my code work for STM32s through a code sample I found online: https://www.exploreembedded.com/wiki/Interfacing_Gas_Sensor_(MQ2)_With_AVR involving an MQ2 gas ...
-1
votes
1
answer
802
views
A question on handles in embedded C [closed]
Regarding handle concept in C the following is stated:
The term handle is sometimes confused with a pointer. A handle is a
reference to a system resource. Access to the resource is provided
through ...
2
votes
1
answer
473
views
Function pointers causing unexpected behaviour within STM32H753ZI Microcontroller
Just out here seeing the craziest programming behaviour I have ever seen, I was wondering if anyone can explain why is this happening?
I finally just finished rewriting how UART packets from an ESP32 ...
6
votes
7
answers
3k
views
Should the pointer datatype be always same as the data type of variable it points in embedded C?
Im wondering if there is a convention or rule about pointer datatype and the stored variable's data type.
If x is an integer ...
2
votes
1
answer
228
views
Pointer to array gets highest bit toggled by ... compiler? (dsPIC33EP & XC16)
Brief:
Pointer to a const-int-array, nested in a struct
Using ptr to this struct (type) in various places
ptr-deref causes address-error, because value was changed from i.e. 0x00AE to 0x80AE -> ...
0
votes
1
answer
144
views
Pointer to a reception buffer seems to have zero in all the other elements differents but the zero index , why with an STM32F401VE
how are you?. I'm having some trouble analizing streamed data. Recently I made a program that analizes streamed data and works for the first message of the stream as you can see in the following post
...
0
votes
0
answers
116
views
Will the following ATSAMD21 series code properly configure SysTick interrupt?
I haven't seen any examples of registering ISRs in Atmel Studio 7, but I've given the following code a go in my IDE.
...
0
votes
1
answer
87
views
XC8 Pic function ptrs looks optimized away
The problem is - new_handler in OWT_RegistrateHandler always equals &_DummyHandler and i ...
0
votes
0
answers
351
views
Why bad data is read from SPI Flash
I have a device in which there is a SPI flash and a I2C EEPROM, W25Q256JV (32MB) and AT24C1024 (1MB) respectively.
The MCU writes data packets in the flash fifo and saves its read write pointers in ...
1
vote
0
answers
346
views
PIC18F4550 - Display 16X4 and menu with more than 4 items
I need to print a list of items of a menu in a 16x4 LCD using a PIC18F4550. I already did it using MPLABX and XC8 compiler and it worked fine, however, I need to migrate it to mikroC environment. But, ...
0
votes
1
answer
132
views
Using pointer of a function's returned value
I would like to know if there are possibilities to change the following code:
...
2
votes
1
answer
180
views
Using Pointers to implement a filter
I'm trying implement a fairy basic filter, and right now I have just some simple test code for me to enter in values. It errors out on the line when it gets to where I call the function I have written....
0
votes
2
answers
711
views
STM32F4 series: what does the '->' operator? [closed]
Reading some C files related to programming an STM32F4 series Arm controller, I found the following instruction:
...
1
vote
1
answer
209
views
C Language Pointers Question [closed]
Not sure if this is the correct place to post a programming based question so will have a go anyway.
Attached below is a piece of code and a table where I have to fill in the blanks. Just to clarify, ...
2
votes
3
answers
697
views
Reading char values, returning 16 and 8 bit values?
I'm reading a internal memory block, im declaring a tracking variable and the start address and end address of the block"
...