uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
Variables
config.c File Reference

Device configuration. More...

#include <stddef.h>
#include "lib/adc.h"
#include "lib/background_tasks.h"
#include "lib/gpio.h"
#include "lib/leds.h"
#include "lib/midi.h"
#include "lib/serial_communication.h"
#include "lib/usb.h"
#include "lib/wave.h"
#include "config.h"
#include "wah.h"
Include dependency graph for config.c:

Variables

struct gpio_mapping gpio_mappings []
 
uint8_t gpio_mappings_size = sizeof(gpio_mappings)/sizeof(struct gpio_mapping)
 
struct midi_config midi_config
 
background_task_t high_frequency_tasks []
 
uint8_t high_frequency_tasks_size = sizeof(high_frequency_tasks)/sizeof(background_task_t)
 
background_task_t mid_frequency_tasks []
 
uint8_t mid_frequency_tasks_size = sizeof(mid_frequency_tasks)/sizeof(background_task_t)
 
background_task_t low_frequency_tasks []
 
uint8_t low_frequency_tasks_size = sizeof(low_frequency_tasks)/sizeof(background_task_t)
 
static const char cmd_string_enable [] = "enable"
 
static const char help_string_enable []
 
static const char cmd_string_speed [] = "speed"
 
static const char help_string_speed []
 
static const char cmd_string_tap [] = "tap"
 
static const char help_string_tap [] = "\nSend this command repeatedly to tap in a tempo\n"
 
static const char cmd_string_waveform [] = "waveform"
 
static const char help_string_waveform []
 
struct serial_command serial_commands []
 
uint8_t serial_commands_size = sizeof(serial_commands) / sizeof(struct serial_command)
 

Detailed Description

Device configuration.

Variable Documentation

◆ cmd_string_enable

const char cmd_string_enable[] = "enable"
static

◆ cmd_string_speed

const char cmd_string_speed[] = "speed"
static

◆ cmd_string_tap

const char cmd_string_tap[] = "tap"
static

◆ cmd_string_waveform

const char cmd_string_waveform[] = "waveform"
static

◆ gpio_mappings

struct gpio_mapping gpio_mappings[]
Initial value:
= {
{ .pin = &gpio.header3.pin2, .type = GPIO_OUTPUT },
{ .pin = &gpio.header3.pin4, .type = GPIO_OUTPUT },
{ .pin = &gpio.header3.pin6, .type = GPIO_INPUT_PULLUP },
{ .pin = &gpio.header3.pin8, .type = GPIO_OUTPUT },
}
The GPIO pin acts as an output.
Definition: gpio.h:50
const struct gpio_pin pin8
Pin 8 in the pin header on the PCB.
Definition: gpio.h:81
The GPIO pin acts as an input and is pulled up.
Definition: gpio.h:49
const struct gpio_pin pin2
Pin 2 in the pin header on the PCB.
Definition: gpio.h:75
Configurations for all available GPIO pins.
Definition: gpio.h:95
const struct gpio_pin pin6
Pin 6 in the pin header on the PCB.
Definition: gpio.h:79
const struct gpio_header header3
Pin header GPIO3 on the PCB.
Definition: gpio.h:99
const struct gpio_pin pin4
Pin 4 in the pin header on the PCB.
Definition: gpio.h:77

◆ gpio_mappings_size

uint8_t gpio_mappings_size = sizeof(gpio_mappings)/sizeof(struct gpio_mapping)

◆ help_string_enable

const char help_string_enable[]
static
Initial value:
= "<a>\n"
"Enable or disable the effect:\n"
"<a> : action\n"
" 't' = enable\n"
" ? = disable"

◆ help_string_speed

const char help_string_speed[]
static
Initial value:
= "<s>\n"
"Adjust the speed of the effect if in waveform mode:\n"
"<s> : wave speed\n"

◆ help_string_tap

const char help_string_tap[] = "\nSend this command repeatedly to tap in a tempo\n"
static

◆ help_string_waveform

const char help_string_waveform[]
static
Initial value:
= "<w>\n"
"En-/disable waveform mode and set waveform:\n"
"<w> : waveform\n"
" \"next\" = switch to next waveform\n"
" \"prev\" = switch to previous waveform\n"
" \"off\" = disable"

◆ high_frequency_tasks

background_task_t high_frequency_tasks[]
Initial value:
= {
}
void serial_communication_task(void)
Main task for USB communication.
Definition: serial_communication.c:477
void update_wah_pwm(void)
Definition: wah.c:188

◆ high_frequency_tasks_size

uint8_t high_frequency_tasks_size = sizeof(high_frequency_tasks)/sizeof(background_task_t)

◆ low_frequency_tasks

background_task_t low_frequency_tasks[]
Initial value:
= {
}
void handle_switch(void)
Definition: wah.c:160
void update_leds(void)
State machine task that updates the LEDs.
Definition: leds.c:195
void tap_tempo_task(void)
Background task for the tap tempo function.
Definition: wave.c:258

◆ low_frequency_tasks_size

uint8_t low_frequency_tasks_size = sizeof(low_frequency_tasks)/sizeof(background_task_t)

◆ mid_frequency_tasks

background_task_t mid_frequency_tasks[]
Initial value:
= {
}
void usb_main_task(void)
Main background task for USB CDC operation.
Definition: usb.c:181

◆ mid_frequency_tasks_size

uint8_t mid_frequency_tasks_size = sizeof(mid_frequency_tasks)/sizeof(background_task_t)

◆ midi_config

Initial value:
= {
.event_handlers = {
.control_change = handle_midi_cc,
.note_off = handle_midi_note_off,
.note_on = handle_midi_note_on,
.program_change = NULL
},
.omni_mode = false,
.rx_channel = MIDI_CHANNEL_01,
.signal_rx = false,
.tx_channel = MIDI_CHANNEL_01,
}
void handle_midi_cc(midi_value_t controller, midi_value_t value)
Definition: wah.c:143
void handle_midi_note_off(midi_value_t note, midi_value_t velocity)
Definition: wah.c:148
MIDI channel 1.
Definition: midi.h:61
void handle_midi_note_on(midi_value_t note, midi_value_t velocity)
Definition: wah.c:154

◆ serial_commands

struct serial_command serial_commands[]
Initial value:
= {
{ .cmd_string = cmd_string_enable, .help_string = help_string_enable, .handler = &exec_enable },
{ .cmd_string = cmd_string_speed, .help_string = help_string_speed, .handler = &exec_speed },
{ .cmd_string = cmd_string_tap, .help_string = help_string_tap, .handler = &exec_tap },
{ .cmd_string = cmd_string_waveform, .help_string = help_string_waveform, .handler = &exec_waveform },
}
static const char cmd_string_tap[]
Definition: config.c:95
bool exec_speed(const char *command)
Definition: wah.c:86
static const char cmd_string_enable[]
Definition: config.c:85
static const char cmd_string_speed[]
Definition: config.c:91
bool exec_tap(const char *command)
Definition: wah.c:100
bool exec_waveform(const char *command)
Definition: wah.c:106
bool exec_enable(const char *command)
Definition: wah.c:75
static const char help_string_waveform[]
Definition: config.c:98
static const char help_string_tap[]
Definition: config.c:96
static const char cmd_string_waveform[]
Definition: config.c:97
static const char help_string_speed[]
Definition: config.c:92
static const char help_string_enable[]
Definition: config.c:86

◆ serial_commands_size

uint8_t serial_commands_size = sizeof(serial_commands) / sizeof(struct serial_command)