blob: 0953539e2e594c2e269bd42a25a9c749507047ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <cstdint>
using adcsample_t = uint16_t;
__attribute__((section(".process_data")))
void process_data(adcsample_t *samples, unsigned int size);
////////////////////////////////////////////////////////////////////////////////
void process_data(adcsample_t *samples, unsigned int size)
{
size--;
for (unsigned int i = 0; i < size; i++)
samples[i] = samples[i] * 80 / 100 + samples[i + 1] * 20 / 100;
}
|