Commit 4d48c63e authored by Jacob Vosmaer's avatar Jacob Vosmaer

Suffix _t is reserved

parent 6584ccec
......@@ -25,7 +25,7 @@ uint8_t spi_io(uint8_t data) {
#define SS PORTB2
uint8_t dac_command_set(uint8_t v) {
struct dac_t *d = dac(v);
struct dac *d = dac(v);
if (!d) {
return 0;
};
......@@ -66,7 +66,7 @@ void dac_init(void) {
#define MIDI_LOWEST 24
uint16_t dac_note_pitch(uint8_t v, uint8_t note) {
struct dac_t *d = dac(v);
struct dac *d = dac(v);
if (!d) {
return 0;
};
......
......@@ -17,7 +17,7 @@ void gate_init(void) {
}
void gate_on_legato(uint8_t v) {
struct gate_t *g = gate(v);
struct gate *g = gate(v);
if (!g) {
return;
}
......@@ -26,7 +26,7 @@ void gate_on_legato(uint8_t v) {
}
void gate_off(uint8_t v) {
struct gate_t *g = gate(v);
struct gate *g = gate(v);
if (!g) {
return;
}
......
......@@ -3,8 +3,8 @@
// voicetab represents the physical hardware layout and parameters
struct {
struct gate_t gate;
struct dac_t dac;
struct gate gate;
struct dac dac;
} voicetab[] = {
{.gate = {.port = &PORTC, .mask = _BV(0)},
.dac = {.channel = 2, .offset = 57, .scale = 8381}},
......@@ -26,7 +26,7 @@ struct {
uint8_t voice_map[NUM_VOICES] = {4, 5, 6, 7};
struct gate_t *gate(uint8_t v) {
struct gate *gate(uint8_t v) {
if (v >= NUM_VOICES) {
return 0;
}
......@@ -34,7 +34,7 @@ struct gate_t *gate(uint8_t v) {
return &voicetab[voice_map[v]].gate;
}
struct dac_t *dac(uint8_t v) {
struct dac *dac(uint8_t v) {
if (v >= NUM_VOICES) {
return 0;
}
......
......@@ -10,12 +10,12 @@ enum { NUM_VOICES = 4 }; // dual use: number of voices, but also the "not found"
#define for_each_voice(var) for (uint8_t var = 0; var < NUM_VOICES; var++)
struct gate_t {
struct gate {
volatile uint8_t *port;
uint8_t mask;
};
struct dac_t {
struct dac {
uint8_t channel;
// Offset to get a consistent "zero" on each CV output
uint16_t offset;
......@@ -23,8 +23,8 @@ struct dac_t {
uint16_t scale;
};
struct gate_t *gate(uint8_t v);
struct dac_t *dac(uint8_t v);
struct gate *gate(uint8_t v);
struct dac *dac(uint8_t v);
int16_t dac_semitone_offset(uint8_t semitone);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment