git subrepo clone --branch=20.41.6 git@github.com:ETLCPP/etl.git components/etl
subrepo: subdir: "components/etl" merged: "be5537ec" upstream: origin: "git@github.com:ETLCPP/etl.git" branch: "20.41.6" commit: "be5537ec" git-subrepo: version: "0.4.9" origin: "???" commit: "???"
This commit is contained in:
parent
931c4def56
commit
11c24647ea
1296 changed files with 801882 additions and 0 deletions
53
components/etl/examples/BlinkList/BlinkList.ino
Normal file
53
components/etl/examples/BlinkList/BlinkList.ino
Normal file
|
@ -0,0 +1,53 @@
|
|||
//***********************************************************************************
|
||||
// A version of the Blink demo, but with delays stored in two instances of etl::list
|
||||
//***********************************************************************************
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
#include <list.h>
|
||||
#include <container.h>
|
||||
|
||||
void setup()
|
||||
{
|
||||
// initialize digital pin 13 as an output.
|
||||
pinMode(13, OUTPUT);
|
||||
}
|
||||
|
||||
void iterate(const etl::ilist<int>& delays)
|
||||
{
|
||||
etl::ilist<int>::const_iterator itr;
|
||||
|
||||
// Iterate through the list.
|
||||
itr = delays.begin();
|
||||
|
||||
while (itr != delays.end())
|
||||
{
|
||||
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
|
||||
delay(100); // wait
|
||||
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
|
||||
delay(*itr++); // wait
|
||||
}
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
int delay_times1[] = { 900, 800, 700, 600, 500, 400, 300, 200, 100 };
|
||||
int delay_times2[] = { 400, 300, 200, 100 };
|
||||
|
||||
// Fill the first delay list, then reverse it.
|
||||
// Notice how we don't have to know the size of the array!
|
||||
const size_t size1 = sizeof(etl::array_size(delay_times1));
|
||||
etl::list<int, size1> delays1(etl::begin(delay_times1), etl::end(delay_times1));
|
||||
delays1.reverse();
|
||||
|
||||
// Fill the second delay list,
|
||||
const size_t size2 = sizeof(etl::array_size(delay_times2));
|
||||
etl::list<int, size2> delays2(etl::begin(delay_times2), etl::end(delay_times2));
|
||||
|
||||
while (true)
|
||||
{
|
||||
iterate(delays1);
|
||||
iterate(delays2);
|
||||
}
|
||||
}
|
22
components/etl/examples/BlinkList/VisualMicro/BlinkList.sln
Normal file
22
components/etl/examples/BlinkList/VisualMicro/BlinkList.sln
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BlinkList", "BlinkList.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\BlinkList.ino" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="__vm\.VisualMicro.vsarduino.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="__vm\.BlinkList.vsarduino.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
1
components/etl/examples/BlinkList/VisualMicro/__vm/.gitignore
vendored
Normal file
1
components/etl/examples/BlinkList/VisualMicro/__vm/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.vsarduino.h
|
1
components/etl/examples/BlinkList/__vm/.gitignore
vendored
Normal file
1
components/etl/examples/BlinkList/__vm/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.vmps.xml
|
Loading…
Add table
Add a link
Reference in a new issue