jonny_ji7 a3f3cb340c Add config, buzzer, evalSwitch, switch to c++
Add config.cpp/hpp
    - macros for all input and output pins
    - gloabl evaluated switch objects
    - buzzer object
    - display config
    - encoder config

Move main.c to main.cpp and adjust code to be c++ compatible

add custom library evaluated switch (copied from armchair project)
add buzzer object (copied from armchair project)

add control.cpp/hpp with control task (no function yet)
2022-08-17 10:29:11 +02:00

16 lines
969 B
C++

#include "config.hpp"
//--- inputs ---
//create objects for switches at bottom screw temerinals
gpio_evaluatedSwitch SW_START(GPIO_SW_START, true, false); //pullup true, not inverted (switch to GND, pullup on receiver pcb)
gpio_evaluatedSwitch SW_RESET(GPIO_SW_RESET, true, false); //pullup true, not inverted (switch to GND, pullup on receiver pcb)
gpio_evaluatedSwitch SW_SET(GPIO_SW_SET, true, false); //pullup true, not inverted (switch to GND, pullup on receiver pcb)
gpio_evaluatedSwitch SW_PRESET1(GPIO_SW_PRESET1, true, false); //pullup true, not inverted (switch to GND, pullup on receiver pcb)
gpio_evaluatedSwitch SW_PRESET2(GPIO_SW_PRESET2, true, false); //pullup true, not inverted (switch to GND, pullup on receiver pcb)
gpio_evaluatedSwitch SW_PRESET3(GPIO_SW_PRESET3, true, false); //pullup true, not inverted (switch to GND, pullup on receiver pcb)
//create buzzer object with gap between queued events of 100ms
buzzer_t buzzer(GPIO_BUZZER, 100);