annotate oscilloscope.h @ 2299:a1c9edf44c7e

Fix a place I missed a problem from the SDL2 upgrade
author Michael Pavone <pavone@retrodev.com>
date Thu, 09 Mar 2023 22:59:29 -0800
parents d220305e81b9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2245
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef OSCILLOSCOPE_H_
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define OSCILLOSCOPE_H_
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3 #include <stdint.h>
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 typedef struct {
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 const char *name;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 int16_t *samples;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8 uint32_t next_sample;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 uint32_t period;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 uint32_t last_trigger;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 uint32_t cur_trigger;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 } scope_channel;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 typedef struct {
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 scope_channel *channels;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 uint8_t num_channels;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 uint8_t channel_storage;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 uint8_t window;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 } oscilloscope;
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 oscilloscope *create_oscilloscope();
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 uint8_t scope_add_channel(oscilloscope *scope, const char *name, uint32_t sample_rate);
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 void scope_add_sample(oscilloscope *scope, uint8_t channel, int16_t value, uint8_t trigger);
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24 void scope_render(oscilloscope *scope);
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 void scope_close(oscilloscope *scope);
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26
d220305e81b9 Add missing files
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 #endif //OSCILLOSCOPE_H_