Mercurial > repos > blastem
comparison oscilloscope.h @ 2245:d220305e81b9
Add missing files
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 23 Nov 2022 09:36:42 -0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2244:e6bad7bd8751 | 2245:d220305e81b9 |
---|---|
1 #ifndef OSCILLOSCOPE_H_ | |
2 #define OSCILLOSCOPE_H_ | |
3 #include <stdint.h> | |
4 | |
5 typedef struct { | |
6 const char *name; | |
7 int16_t *samples; | |
8 uint32_t next_sample; | |
9 uint32_t period; | |
10 uint32_t last_trigger; | |
11 uint32_t cur_trigger; | |
12 } scope_channel; | |
13 | |
14 typedef struct { | |
15 scope_channel *channels; | |
16 uint8_t num_channels; | |
17 uint8_t channel_storage; | |
18 uint8_t window; | |
19 } oscilloscope; | |
20 | |
21 oscilloscope *create_oscilloscope(); | |
22 uint8_t scope_add_channel(oscilloscope *scope, const char *name, uint32_t sample_rate); | |
23 void scope_add_sample(oscilloscope *scope, uint8_t channel, int16_t value, uint8_t trigger); | |
24 void scope_render(oscilloscope *scope); | |
25 void scope_close(oscilloscope *scope); | |
26 | |
27 #endif //OSCILLOSCOPE_H_ |