A variable in C/C++ which stores the type and location of data in memory.

learn more… | top users | synonyms

0
votes
3answers
105 views

ISR executes even though an interrupt is not trigerred

I am trying to implement a function queue scheduling system. INT1 is connected to a button and int1task causes a LED to flash. typedef void (*funcptr)(void); TPrioQueue *queue = NULL; void ...
0
votes
1answer
120 views

Wrong Mouse.move() output in Arduino Leonardo

I'm using my Arduino Leonardo as a Mouse but I'm experimenting a strange behaviour. I put my mouse at (-1, -1) (absolute) coordinates and then I execute this code: Move.move(com[curr_cmd_id].x, ...
1
vote
3answers
229 views

Is it bad coding practice to design a buffer using pointers?

I coded a ring buffer for my Arduino to buffer data from either the SPI or TWI ports. In the .h file I used a pointer for the buffer: typedef uint8_t *ring_buffer_t; typedef uint8_t ring_count_t; ...
7
votes
1answer
229 views

Are function pointer assignments atomic in Arduino?

The following snippets are from TimerOne library source code: // TimerOne.h: void (*isrCallback)(); // TimerOne.cpp: ISR(TIMER1_OVF_vect) // interrupt service routine that wraps a user defined ...
1
vote
1answer
431 views

How to use String.substring?

I have the following code in which requestLine is always empty and I can't figure out why. request contains a raw HTTP request, and I want to get the first line of the request which contains the ...
7
votes
2answers
2k views

Why can I not use pointers instead of array with PROGMEM?

I'm currently changing some libraries to use flash instead of RAM for string storage so that I do not run out of SRAM on a project. Some strings in the library are declared in this manner: const ...