added actions scripts to automatically build the protocol translator and touch panel firmware on push

This commit is contained in:
FizzyApple12
2022-07-02 19:30:27 -04:00
parent c20632e9b4
commit f526147fbe
13 changed files with 207 additions and 1 deletions
@@ -0,0 +1,16 @@
name: Build Protocol Translator
on: [push]
jobs:
Build-Protocol-Translator:
runs-on: ubuntu-latest
steps:
- name: Download Required Packages
run: sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
- name: Move to Protocol Translator Code
run: cd $GITHUB_WORKSPACE/WaccaProtocolTranslator
- name: Run Autobuild
run: sudo sh autobuild.sh
- uses: actions/upload-artifact@v3
with:
name: Protocol Translator Firmware
path: $GITHUB_WORKSPACE/WaccaProtocolTranslator/artifacts/
+16
View File
@@ -0,0 +1,16 @@
name: Build Touch Panel
on: [push]
jobs:
Build-Touch-Panel:
runs-on: ubuntu-latest
steps:
- name: Download Required Packages
run: sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
- name: Move to Protocol Translator Code
run: cd $GITHUB_WORKSPACE/WaccaTouchPanel
- name: Run Autobuild
run: sudo sh autobuild.sh
- uses: actions/upload-artifact@v3
with:
name: Touch Panel Firmware
path: $GITHUB_WORKSPACE/WaccaTouchPanel/artifacts/
+2
View File
@@ -1,8 +1,10 @@
WaccaProtocolTranslator/build/
WaccaProtocolTranslator/artifacts/
WaccaProtocolTranslator/.vscode/
WaccaTouchPanel/build/
WaccaTouchPanel/artifacts/
WaccaTouchPanel/.vscode/
+6
View File
@@ -3,3 +3,9 @@
This repo is right now still a work in progress, nothing has been finalized and things will probably be broken, stay tuned as things are finalized though!
![Controller Block Diagram](<https://github.com/FizzyApple12/Waccon/blob/master/Block Diagram.png>)
If you'd like to test out the current firmware on your own hardware, there are 2 github actions scripts for the Touch Panel firmware and the Protocol Translator firmware
The 6 Touch Panel firmware builds correspond to which position you want the Touch Panel to be in (1 being top, 6 being bottom)
The 4 Protocol Translator firmware builds correspond to if the translator is controlling the left or right and if you want to mirror Touch Panel 1's inputs to all 6 Touch Panels
+2
View File
@@ -8,6 +8,8 @@ project(WaccaTouchPanel)
pico_sdk_init()
add_definitions($ENV{CUSTOM_CFLAGS})
add_executable(wacca_protocol_translator
main.c
serial.c
+25
View File
@@ -0,0 +1,25 @@
if not exist "build" mkdir build
if not exist "artifacts" mkdir artifacts
cd build
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_left.uf2
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS -DOPT_RIGHT
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_right.uf2
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_left.uf2
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH -DOPT_RIGHT
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_right.uf2
cd ..
+25
View File
@@ -0,0 +1,25 @@
mkdir -p build
mkdir -p artifacts
cd build
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS"
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_left.uf2
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS -DOPT_RIGHT"
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_right.uf2
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH"
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_left.uf2
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH -DOPT_RIGHT"
cmake -G "Unix Makefiles" ..
make wacca_protocol_translator
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_right.uf2
cd ..
+20
View File
@@ -3,15 +3,35 @@
#include "hardware/i2c.h"
#include "waccaserial.h"
#ifdef OPT_PRESETPANELS // for autocompile
#if OPT_SINGLE_TOUCH
#define TOUCH_PANEL_0_ADDR 0x10
#define TOUCH_PANEL_1_ADDR 0x10
#define TOUCH_PANEL_2_ADDR 0x10
#define TOUCH_PANEL_3_ADDR 0x10
#define TOUCH_PANEL_4_ADDR 0x10
#define TOUCH_PANEL_5_ADDR 0x10
#else
#define TOUCH_PANEL_0_ADDR 0x10
#define TOUCH_PANEL_1_ADDR 0x11
#define TOUCH_PANEL_2_ADDR 0x12
#define TOUCH_PANEL_3_ADDR 0x13
#define TOUCH_PANEL_4_ADDR 0x14
#define TOUCH_PANEL_5_ADDR 0x15
#endif
#endif
#define TOUCH_I2C_PORT i2c0
#define TOUCH_I2C_SDA 4
#define TOUCH_I2C_SCL 5
#ifndef OPT_PRESETPANELS
#define TOUCH_PANEL_0_ADDR 0x10
#define TOUCH_PANEL_1_ADDR 0x10 //0x11
#define TOUCH_PANEL_2_ADDR 0x10 //0x12
#define TOUCH_PANEL_3_ADDR 0x10 //0x13
#define TOUCH_PANEL_4_ADDR 0x10 //0x14
#define TOUCH_PANEL_5_ADDR 0x10 //0x15
#endif
#define TOUCH_I2C_FREQ 100000
uint32_t touchPanel0Data = 0;
+6
View File
@@ -9,6 +9,12 @@
//#define RIGHT //uncomment to enable righty flip on interface and sync board data swap
#if OPT_RIGHT // used for automatic compilation
#ifndef RIGHT
#define RIGHT
#endif
#endif
#define CMD_GET_SYNC_BOARD_VER 0xa0
#define CMD_NEXT_READ 0x72
#define CMD_GET_UNIT_BOARD_VER 0xa8
+2
View File
@@ -8,6 +8,8 @@ project(WaccaTouchPanel)
pico_sdk_init()
add_definitions($ENV{CUSTOM_CFLAGS})
add_executable(wacca_touch_panel
main.c
mpr121.h
+35
View File
@@ -0,0 +1,35 @@
if not exist "build" mkdir build
if not exist "artifacts" mkdir artifacts
cd build
set CUSTOM_CFLAGS=-DOPT_PANEL1
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_1.uf2
set CUSTOM_CFLAGS=-DOPT_PANEL2
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_2.uf2
set CUSTOM_CFLAGS=-DOPT_PANEL3
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_3.uf2
set CUSTOM_CFLAGS=-DOPT_PANEL4
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_4.uf2
set CUSTOM_CFLAGS=-DOPT_PANEL5
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_5.uf2
set CUSTOM_CFLAGS=-DOPT_PANEL6
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_6.uf2
cd ..
+35
View File
@@ -0,0 +1,35 @@
mkdir -p build
mkdir -p artifacts
cd build
export CUSTOM_CFLAGS="-DOPT_PANEL1"
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_1.uf2
export CUSTOM_CFLAGS="-DOPT_PANEL2"
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_2.uf2
export CUSTOM_CFLAGS="-DOPT_PANEL3"
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_3.uf2
export CUSTOM_CFLAGS="-DOPT_PANEL4"
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_4.uf2
export CUSTOM_CFLAGS="-DOPT_PANEL5"
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_5.uf2
export CUSTOM_CFLAGS="-DOPT_PANEL6"
cmake -G "Unix Makefiles" ..
make wacca_touch_panel
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_6.uf2
cd ..
+17 -1
View File
@@ -7,9 +7,25 @@
//#define DEBUG_MODE // uncomment for debug messages (note: this will slow things down!)
#if OPT_PANEL1 // used for automatic compilation
#define MOTHERBOARD_I2C_HWID 0x10
#elif OPT_PANEL2
#define MOTHERBOARD_I2C_HWID 0x11
#elif OPT_PANEL3
#define MOTHERBOARD_I2C_HWID 0x12
#elif OPT_PANEL4
#define MOTHERBOARD_I2C_HWID 0x13
#elif OPT_PANEL5
#define MOTHERBOARD_I2C_HWID 0x14
#elif OPT_PANEL6
#define MOTHERBOARD_I2C_HWID 0x15
#endif
#define MOTHERBOARD_I2C_PORT i2c1
#define MOTHERBOARD_I2C_IRQ I2C1_IRQ
#define MOTHERBOARD_I2C_HWID 0x10 // 0x1[0-5 depending on which position it's in bottom to top]
#ifndef MOTHERBOARD_I2C_HWID
#define MOTHERBOARD_I2C_HWID 0x10 // 0x1[0-5 depending on which position it's in bottom to top]
#endif
#define MOTHERBOARD_I2C_SDA 2
#define MOTHERBOARD_I2C_SCL 3
#define MOTHERBOARD_I2C_FREQ 100000