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/background_tasks.h"
#include "lib/gpio.h"
#include "lib/hmi.h"
#include "lib/leds.h"
#include "lib/midi.h"
#include "lib/sequencer.h"
#include "lib/serial_communication.h"
#include "lib/usb.h"
#include "lib/wave.h"
#include "config.h"
#include "whammy.h"
Include dependency graph for config.c:

Variables

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_pattern [] = "pattern"
 
static const char help_string_pattern []
 
struct serial_command serial_commands []
 
uint8_t serial_commands_size = sizeof(serial_commands) / sizeof(struct serial_command)
 
struct gpio_mapping gpio_mappings []
 
uint8_t gpio_mappings_size = sizeof(gpio_mappings)/sizeof(struct gpio_mapping)
 
struct hmi_config hmi_config
 
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)
 

Detailed Description

Device configuration.

Variable Documentation

◆ cmd_string_pattern

const char cmd_string_pattern[] = "pattern"
static

◆ cmd_string_speed

const char cmd_string_speed[] = "speed"
static

◆ cmd_string_tap

const char cmd_string_tap[] = "tap"
static

◆ gpio_mappings

struct gpio_mapping gpio_mappings[]
Initial value:
= {
}

◆ gpio_mappings_size

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

◆ help_string_pattern

const char help_string_pattern[]
static
Initial value:
= "<p>\n"
"Select sequencer pattern:\n"
"<p> : pattern\n"
" \"next\" = switch to next pattern\n"
" \"prev\" = switch to previous pattern\n"

◆ help_string_speed

const char help_string_speed[]
static
Initial value:
= "<s>\n"
"Adjust the speed of the sequencer:\n"
"<s> : wave speed\n"

◆ help_string_tap

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

◆ 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_sequencer(void)
Main background task for the sequencer module.
Definition: sequencer.c:245

◆ high_frequency_tasks_size

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

◆ hmi_config

Initial value:
= {
.input_header = &gpio.header2,
.output_header = &gpio.header1,
.button1_handler = NULL,
.button2_handler = &toggle_sequencing,
.encoder1cw_handler = select_next_pattern,
.encoder1ccw_handler = select_previous_pattern,
.encoder1push_handler = NULL,
.encoder2cw_handler = &increase_speed,
.encoder2ccw_handler = &decrease_speed,
.encoder2push_handler = &register_tap,
}
void toggle_sequencing(void)
Definition: whammy.c:199
void select_previous_pattern(void)
Definition: whammy.c:189
void select_next_pattern(void)
Definition: whammy.c:184
void decrease_speed(void)
Definition: whammy.c:168
const struct gpio_header header2
Pin header GPIO2 on the PCB.
Definition: gpio.h:98
void register_tap(void)
Registers a tempo tap event.
Definition: wave.c:220
void increase_speed(void)
Definition: whammy.c:173
const struct gpio_header header1
Pin header GPIO1 on the PCB.
Definition: gpio.h:97
Configurations for all available GPIO pins.
Definition: gpio.h:95

◆ low_frequency_tasks

background_task_t low_frequency_tasks[]
Initial value:
= {
}
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 poll_hmi(void)
Polls the HMI inputs and executes registered callbacks if an event occurred.
Definition: hmi.c:119
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 = NULL,
.note_off = NULL,
.note_on = NULL,
.program_change = NULL
},
.omni_mode = true,
.rx_channel = 1,
.signal_rx = true,
.tx_channel = 1,
}

◆ serial_commands

struct serial_command serial_commands[]
Initial value:
= {
{ .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_pattern, .help_string = help_string_pattern, .handler = &exec_pattern },
}
bool exec_pattern(const char *command)
Definition: whammy.c:148
bool exec_speed(const char *command)
Definition: wah.c:86
bool exec_tap(const char *command)
Definition: wah.c:100
static const char cmd_string_tap[]
Definition: config.c:53
static const char cmd_string_speed[]
Definition: config.c:49
static const char help_string_pattern[]
Definition: config.c:56
static const char cmd_string_pattern[]
Definition: config.c:55
static const char help_string_tap[]
Definition: config.c:54
static const char help_string_speed[]
Definition: config.c:50

◆ serial_commands_size

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