Skip to content

Commit

Permalink
fix spi_oled compilation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
driver1998 committed Sep 29, 2018
1 parent 629ade2 commit 0c0a400
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion spi_oled/OLED.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "pch.h"
#include "OLED.h"



Expand Down
4 changes: 2 additions & 2 deletions spi_oled/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


#include "pch.h"
#include "OLED.h"


using namespace winrt;
using namespace Windows::Foundation;
Expand Down Expand Up @@ -46,7 +46,7 @@ int main()

// initialize OLED
auto oled = OLED(displayDevice, dataCommandPin, resetPin);
printf("OLED initialized on %ls, CS=%d DC=%d RST=%d.\n", spiHardwareId, CS_PIN, DC_PIN, RST_PIN);
printf("OLED initialized on %ls, CS=%d DC=%d RST=%d.\n", spiHardwareId, CS, DC_PIN, RST_PIN);

// load bitmap and draw it on the OLED.
wchar_t currentDir[MAX_PATH];
Expand Down
1 change: 1 addition & 0 deletions spi_oled/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
#include <winrt/Windows.Storage.h>
#include <winrt/Windows.Storage.Streams.h>
#include <winrt/Windows.Devices.Enumeration.h>
#include "OLED.h"
10 changes: 7 additions & 3 deletions spi_oled/spi_oled.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Create</PrecompiledHeader>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down Expand Up @@ -116,13 +116,17 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="OLED.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="OLED.h" />

</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="main.cpp" />
<ClCompile Include="OLED.cpp" />
<ClCompile Include="pch.cpp" />

</ItemGroup>
<ItemGroup>
<Image Include="logo.bmp">
Expand Down

0 comments on commit 0c0a400

Please sign in to comment.