Skip to main content

Questions tagged [pointers]

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 ...
dreece2498's user avatar
-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 ...
GNZ's user avatar
  • 2,095
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 ...
Leoc's user avatar
  • 1,441
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 ...
user1999's user avatar
  • 1,545
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 -> ...
Raphael B.'s user avatar
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 ...
vram's user avatar
  • 168
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. ...
tuskiomi's user avatar
  • 707
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 ...
segar's user avatar
  • 33
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 ...
alt-rose's user avatar
  • 1,529
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, ...
Daniel's user avatar
  • 981
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: ...
thexeno's user avatar
  • 1,315
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....
user9964422's user avatar
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: ...
LittleSaints's user avatar
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, ...
David777's user avatar
  • 1,615
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" ...
user2982010's user avatar

15 30 50 per page