Ship example minidexed.ini files for various devices (#754)

fx
probonopd 5 days ago committed by GitHub
parent f033fc4cc0
commit c2cb172baa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      .github/workflows/build.yml
  2. 1
      .gitignore
  3. 46
      hwconfig/DT-DX.override
  4. 33
      hwconfig/customize.sh
  5. 32
      hwconfig/pirate_audio.override

@ -82,6 +82,13 @@ jobs:
zip -r ../MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip * zip -r ../MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip *
echo "artifactName=MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV echo "artifactName=MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
cd - cd -
- name: Hardware configration files
run: |
cd hwconfig
sh -ex ./customize.sh
cd -
mkdir -p ./sdcard/hardware/
cp -r ./hwconfig/minidexed_* ./sdcard/minidexed.ini ./sdcard/hardware/
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: ${{ env.artifactName }} # Exported above name: ${{ env.artifactName }} # Exported above

1
.gitignore vendored

@ -49,3 +49,4 @@ sdcard
CMSIS_5/ CMSIS_5/
Synth_Dexed/ Synth_Dexed/
circle-stdlib/ circle-stdlib/
minidexed_*

@ -0,0 +1,46 @@
# DTronics DT-DX
# https://www.dtronics.nl/dt-dx
SoundDevice=i2s
SampleRate=22000
ChunkSize=256
DACI2CAddress=0x0
ChannelsSwapped=1
LCDEnabled=1
LCDPinEnable=17
LCDPinRegisterSelect=27
LCDPinReadWrite=16
LCDPinData4=22
LCDPinData5=23
LCDPinData6=24
LCDPinData7=25
LCDI2CAddress=0x00
SSD1306LCDI2CAddress=0x00
SSD1306LCDWidth=128
SSD1306LCDHeight=32
SSD1306LCDRotate=0
SSD1306LCDMirror=0
LCDColumns=16
LCDRows=2
ButtonPinPrev=0
ButtonActionPrev=0
ButtonPinNext=0
ButtonActionNext=0
ButtonPinBack=26
ButtonActionBack=longpress
ButtonPinSelect=26
ButtonActionSelect=click
ButtonPinHome=26
ButtonActionHome=doubleclick
ButtonPinShortcut=26
DoubleClickTimeout=400
LongPressTimeout=400
EncoderEnabled=1
EncoderPinClock=6
EncoderPinData=5

@ -0,0 +1,33 @@
#!/bin/sh
# This script creates a set of ini files from the *.override files
# to provide customized configurations for well-known hardware
# Find all files named *.override, and run the following on each of them
for file in *.override; do
# Copy the file minidexed.ini to the name of this file but with .ini extension instead
name_of_ini_file=minidexed_$(echo "$file" | sed 's/\.override$/.ini/')
cp ../src/minidexed.ini "$name_of_ini_file"
# Change the values in the ini file, leaving the rest of the file unchanged
while IFS='=' read -r key value; do
# Skip empty lines and comments
if [ -z "$key" ] || [ "${key#\#}" != "$key" ]; then
continue
fi
value=$(echo "$value" | tr -d '\r')
if [ -n "$value" ]; then
sed -i "s/^$key=.*/$key=$value/" "$name_of_ini_file"
fi
done < "$file"
# Process the last line of the override file separately, if it doesn't end with a newline
if [ -n "$key" ]; then
value=$(echo "$value" | tr -d '\r')
if [ -n "$value" ]; then
sed -i "s/^$key=.*/$key=$value/" "$name_of_ini_file"
fi
fi
echo "Created $name_of_ini_file"
done

@ -0,0 +1,32 @@
# Pimoroni Pirate Audio (screen, buttons and audio output)
# https://shop.pimoroni.com/search?q=pirate%20audio
SoundDevice=i2s
LCDEnabled=1
SPIBus=0
ST7789Enabled=1
ST7789Data=9
ST7789Select=1
ST7789Reset=
ST7789Backlight=13
ST7789Width=240
ST7789Height=240
ST7789Rotation=90
LCDColumns=15
LCDRows=2
ButtonPinPrev=5
ButtonActionPrev=click
ButtonPinNext=6
ButtonActionNext=click
ButtonPinBack=16
ButtonActionBack=click
ButtonPinSelect=24
ButtonActionSelect=click
ButtonPinHome=16
ButtonActionHome=doubleclick
ButtonPinShortcut=0
EncoderEnabled=0
Loading…
Cancel
Save