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 "config.h"
#include "expression.h"
◆ adc_config
Initial value:= {
.prescaler = ADC_PRESCALER_DIV512_gc,
}
ADC conversion yields unsigned values.
Definition: adc.h:42
◆ cmd_string_cal
const char cmd_string_cal[] = "cal" |
|
static |
◆ cmd_string_echo
const char cmd_string_echo[] = "echo" |
|
static |
◆ cmd_string_mute
const char cmd_string_mute[] = "mute" |
|
static |
◆ expression_conversion
Initial value:= {
}
Use ADC input pin 4.
Definition: adc.h:64
ADC channel 0.
Definition: adc.h:51
void update_expression_value(uint16_t adc_value)
Updates the stored expression value.
Definition: expression.c:220
◆ gpio_mappings
Initial value:= {
}
The GPIO pin acts as an output.
Definition: gpio.h:50
The GPIO pin acts as an input and is pulled up.
Definition: gpio.h:49
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
const struct gpio_header header3
Pin header GPIO3 on the PCB.
Definition: gpio.h:99
The GPIO pin acts as an input.
Definition: gpio.h:47
◆ gpio_mappings_size
◆ help_string_cal
const char help_string_cal[] |
|
static |
Initial value:= "<m>\n"
"Calibrate the pedal (in the following order):\n"
"<m> : \"adc\" calibrates the ADC offset\n"
" \"min\" sets the minimum registered ADC value\n"
" \"max\" sets the maximum registered ADC value\n"
" \"dmp\" dumps currently active values\n"
" \"sav\" saves active values to EEPROM\n"
◆ help_string_echo
const char help_string_echo[] |
|
static |
Initial value:= "<v>\n"
"Switch expression value console output on / off\n"
"<v> : \"on\" or \"off\"\n"
◆ help_string_mute
const char help_string_mute[] |
|
static |
Initial value:= "<v>\n"
"Mute CC message transmission when status LED is off.\n"
"Should only be enabled if there is an enable switch.\n"
"This setting is immediately stored to EEPROM.\n"
"<m> : \"on\" mute if not enabled\n"
" \"off\" always transmit\n"
" \"stat\" show current setting\n"
◆ high_frequency_tasks
Initial value:= {
}
void serial_communication_task(void)
Main task for USB communication.
Definition: serial_communication.c:477
◆ high_frequency_tasks_size
◆ low_frequency_tasks
Initial value:= {
}
void update_leds(void)
State machine task that updates the LEDs.
Definition: leds.c:195
void handle_enable_switch(void)
A background task that handles the enable switch.
Definition: expression.c:167
◆ low_frequency_tasks_size
◆ mid_frequency_tasks
Initial value:= {
}
void usb_main_task(void)
Main background task for USB CDC operation.
Definition: usb.c:181
void trigger_expression_conversion(void)
Triggers an ADC conversion of the expression pedal input.
Definition: expression.c:215
◆ mid_frequency_tasks_size
◆ midi_config
Initial value:= {
.event_handlers = {
.control_change = NULL,
.note_off = NULL,
.note_on = NULL,
.program_change = NULL
},
.omni_mode = false,
.signal_rx = false,
}
MIDI channel 1.
Definition: midi.h:61
◆ power_led
Initial value:= {
}
Configurations for all available GPIO pins.
Definition: gpio.h:95
const struct gpio_header header3
Pin header GPIO3 on the PCB.
Definition: gpio.h:99
◆ serial_commands
Initial value:= {
}
bool exec_mute(const char *command)
Handler for the serial command 'mute'.
Definition: expression.c:140
static const char cmd_string_cal[]
Definition: config.c:72
bool exec_cal(const char *command)
Handler for the serial command 'cal'.
Definition: expression.c:81
static const char help_string_mute[]
Definition: config.c:85
static const char cmd_string_mute[]
Definition: config.c:84
static const char help_string_echo[]
Definition: config.c:81
static const char cmd_string_echo[]
Definition: config.c:80
static const char help_string_cal[]
Definition: config.c:73
bool exec_echo(const char *command)
Handler for the serial command 'echo'.
Definition: expression.c:122
◆ serial_commands_size
◆ status_led
Initial value:= {
}
Configurations for all available GPIO pins.
Definition: gpio.h:95
const struct gpio_header header3
Pin header GPIO3 on the PCB.
Definition: gpio.h:99