Hi, I would like to write a stm32f4 discovery code using First In Last Out queue of any length. I am initially confusing what is the main communication protocol should i use USART or SPI or I2C etc......I would like to use Vbat voltage sampled once per second as long as space exists in the queue. Please anyone give some light at the beginning for this confusion...
And the point of doing this would be what exactly?
Okay now i got about stacks. So if i would like to store Vbat voltage sampled one per second. What are the functions i should have to use?
STM32F4xx_DSP_StdPeriph_Lib_V1.3.0\Project\STM32F4xx_StdPeriph_Examples\ADC\ADC_VBATMeasurement\main.c
Bunch of other examples including timers in the library.
What do you think?
I fail to understand why it would be a good idea to store battery voltages in a stack. Normally, measurements are expected to be processed in the same order they are measured, which would mean the use of a normal queue.
A stack is normally used when something with a lower priority has to be put aside to handle something with a higher priority, and you then want to return back to that lower priority task at a later time. Like when processing an mathematical expression and you suddenly find a '(' which represents a sub-expression with a higher priority.
Or when your parents says: 'Put the game aside and start working with your school assignment!'