Skip to content

Commit

Permalink
Daniel/duo/lifi (#49)
Browse files Browse the repository at this point in the history
* Lots more work

* some fixes

* fix

* fixes

* more fixes

* Lots of work

* Button to pin 14(final) Brightness scaling

* Different inputs for holding from off and on

* Nearly working brightness drop from off

* Improved brightness adjustment(not finished)

* Brightness still not working yet

* some work but idk what I broke sry

* some fixes seems to be working well

* Fixed

* oops

* Sorted out delay and stuff

* Added the stuff for toggle brightness

* looking really sexy

* fixes

* improvements

* comment

* some comments

* lots of improvements

* idk

* at stuff

* fixed makefile and appmain

* holy hell it works

* cleaned up testing code

* more cleanup

* sampling test

* cleanup and fixes, working well

* fixes and cleanup

* minor fixes

* more final cleanup

* last minor fix

* minor fix

* added comment

* Color Select Visuals and State revert bug fixes

* More visuals for color select, not working yet

* Added ft23r programmer and lock only from sleep

* added ttl232r

* lots of fixes for color select

* Fixes for modesharing and sleep

* Sorted out randomizer auto random

* fixed configured brightnesses

* Added esd protection

* Added progress to receive

---------

Co-authored-by: Shane Aronson <[email protected]>
  • Loading branch information
Unreal-Dan and LivingSynthesis authored Jun 20, 2023
1 parent 8b899d1 commit 693db98
Show file tree
Hide file tree
Showing 33 changed files with 1,352 additions and 243 deletions.
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ NM = ${BINDIR}/avr-nm
AVRDUDE = ${AVRDUDEDIR}/avrdude

AVRDUDE_CONF = avrdude.conf
AVRDUDE_PORT = COM12
AVRDUDE_PORT = COM85
AVRDUDE_PROGRAMMER = jtag2updi
AVRDUDE_BAUDRATE = 115200
AVRDUDE_CHIP = attiny3217
AVRDUDE_FLAGS = -C$(AVRDUDE_CONF) -v -p$(AVRDUDE_CHIP) -c$(AVRDUDE_PROGRAMMER) -P$(AVRDUDE_PORT) -b$(AVRDUDE_BAUDRATE)

CFLAGS = -Os -MMD -Wall -flto -mrelax -std=gnu++17 -fno-threadsafe-statics -fno-exceptions -mmcu=$(AVRDUDE_CHIP) -DF_CPU=20000000L
CFLAGS = -g -Os -MMD -Wall -flto -mrelax -std=gnu++17 -fno-threadsafe-statics -fno-exceptions -mmcu=$(AVRDUDE_CHIP) -DF_CPU=20000000L

LDFLAGS = -Wall -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mrelax -mmcu=$(AVRDUDE_CHIP) -lm
LDFLAGS = -g -Wall -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mrelax -mmcu=$(AVRDUDE_CHIP) -lm

INCLUDES=\
-I ./VortexEngine/src/
Expand All @@ -30,7 +30,7 @@ CFLAGS+=$(INCLUDES)
# Source files
SRCS = \
$(shell find ./VortexEngine/src/ -type f -name '\*.cpp') \
./appmain.cpp
./VortexEngine/appmain.cpp

OBJS = $(SRCS:.cpp=.o)

Expand Down Expand Up @@ -58,14 +58,22 @@ $(TARGET).elf: $(OBJS)
%.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@

# 0x7e = 0x7e00 flash and 0x100 appcode for storage
# fuse6 =
# fuse7 = APPEND
# fuse8 = BOOTEND
# 0x7e = 0x7e00 flash and 0x100 appcode for storage
SAVE_EEPROM = 1
FUSE0 = 0b00000000
FUSE2 = 0x02
FUSE5 = 0b1100010$(SAVE_EEPROM)
FUSE6 = 0x04
FUSE7 = 0x00
FUSE8 = 0x7e
upload: $(TARGET).hex
$(AVRDUDE) $(AVRDUDE_FLAGS) -Ufuse0:w:0b00000000:m -Ufuse2:w:0x02:m -Ufuse5:w:0b11000101:m -Ufuse6:w:0x04:m -Ufuse7:w:0x00:m -Ufuse8:w:0x7e:m -Uflash:w:$(TARGET).hex:i
$(AVRDUDE) $(AVRDUDE_FLAGS) -Ufuse0:w:$(FUSE0):m -Ufuse2:w:$(FUSE2):m -Ufuse5:w:$(FUSE5):m -Ufuse6:w:$(FUSE6):m -Ufuse7:w:$(FUSE7):m -Ufuse8:w:$(FUSE8):m -Uflash:w:$(TARGET).hex:i

clean:
rm -f $(OBJS) $(TARGET).elf $(TARGET).hex
rm -f $(OBJS) $(TARGET).elf $(TARGET).hex $(DFILES)

# include dependency files to ensure partial rebuilds work correctly
-include $(DFILES)
22 changes: 22 additions & 0 deletions VortexEngine.atsln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Atmel Studio Solution File, Format Version 11.00
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "VortexEngine", "VortexEngine\VortexEngine.cppproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|AVR = Debug|AVR
Release|AVR = Release|AVR
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.ActiveCfg = Debug|AVR
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
86 changes: 86 additions & 0 deletions VortexEngine/VortexEngine.componentinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
<ProjectComponents>
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<CApiVersion></CApiVersion>
<CBundle></CBundle>
<CClass>Device</CClass>
<CGroup>Startup</CGroup>
<CSub></CSub>
<CVariant></CVariant>
<CVendor>Atmel</CVendor>
<CVersion>1.10.0</CVersion>
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<Description></Description>
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.10.348\include\</AbsolutePath>
<Attribute></Attribute>
<Category>include</Category>
<Condition>C</Condition>
<FileContentHash i:nil="true" />
<FileVersion></FileVersion>
<Name>include/</Name>
<SelectString></SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.10.348\include\avr\iotn3217.h</AbsolutePath>
<Attribute></Attribute>
<Category>header</Category>
<Condition>C</Condition>
<FileContentHash>vKmqiC5Iu75NT1p4uv8rXg==</FileContentHash>
<FileVersion></FileVersion>
<Name>include/avr/iotn3217.h</Name>
<SelectString></SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.10.348\templates\main.c</AbsolutePath>
<Attribute>template</Attribute>
<Category>source</Category>
<Condition>C Exe</Condition>
<FileContentHash>KjvOcFWd++tbnsEMfVPd/w==</FileContentHash>
<FileVersion></FileVersion>
<Name>templates/main.c</Name>
<SelectString>Main file (.c)</SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.10.348\templates\main.cpp</AbsolutePath>
<Attribute>template</Attribute>
<Category>source</Category>
<Condition>C Exe</Condition>
<FileContentHash>b1blCCNoZpiRE6nioQfFjA==</FileContentHash>
<FileVersion></FileVersion>
<Name>templates/main.cpp</Name>
<SelectString>Main file (.cpp)</SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.10.348\gcc\dev\attiny3217</AbsolutePath>
<Attribute></Attribute>
<Category>libraryPrefix</Category>
<Condition>GCC</Condition>
<FileContentHash i:nil="true" />
<FileVersion></FileVersion>
<Name>gcc/dev/attiny3217</Name>
<SelectString></SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
</Files>
<PackName>ATtiny_DFP</PackName>
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.10.348/Atmel.ATtiny_DFP.pdsc</PackPath>
<PackVersion>1.10.348</PackVersion>
<PresentInProject>true</PresentInProject>
<ReferenceConditionId>ATtiny3217</ReferenceConditionId>
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string></d4p1:string>
</RteComponents>
<Status>Resolved</Status>
<VersionMode>Fixed</VersionMode>
<IsComponentInAtProject>true</IsComponentInAtProject>
</ProjectComponent>
</ProjectComponents>
</Store>
Loading

0 comments on commit 693db98

Please sign in to comment.