You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
504 B
C
21 lines
504 B
C
#include <stdio.h>
|
|
#include <PCircularBuffer.h>
|
|
int main()
|
|
{
|
|
const uint16_t maxlength = 16;
|
|
double my_buffer[maxlength];
|
|
p_cb_double data;
|
|
for(int ind = 0; ind < 2; ind++)
|
|
{
|
|
for(int x = 0; x < 16; x++)
|
|
{
|
|
printf("[%02d] Before: %02lf\t", x, data.buffer[x]);
|
|
data.push(&data, (double)x);
|
|
printf("[%02d] After: %02lf\r\n", x, data.buffer[x]);
|
|
}
|
|
}
|
|
|
|
int x = 5;
|
|
printf("%d\r\n", x);
|
|
return 0;
|
|
} |