From 065f21440c9a7894d3fa31075911918ec7b4f692 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Tue, 24 May 2016 19:40:08 +0200 Subject: [PATCH] Renamed project to lowercase --- .gitattributes | 1 + .gitignore | 5 ++ InOut.atsln => inout.atsln | 2 +- InOut/Clock.h => inout/clock.h | 0 InOut/InOut.cpp => inout/inout.cpp | 30 +++++------ InOut/InOut.cppproj => inout/inout.cppproj | 12 ++--- InOut/InOut.h => inout/inout.h | 58 +++++++++++----------- {InOut => inout}/main.cpp | 10 ++-- 8 files changed, 62 insertions(+), 56 deletions(-) create mode 100644 .gitignore rename InOut.atsln => inout.atsln (86%) rename InOut/Clock.h => inout/clock.h (100%) rename InOut/InOut.cpp => inout/inout.cpp (99%) rename InOut/InOut.cppproj => inout/inout.cppproj (98%) rename InOut/InOut.h => inout/inout.h (98%) rename {InOut => inout}/main.cpp (94%) diff --git a/.gitattributes b/.gitattributes index 38e47ad..3e5b64f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ *.hpp eol=lf *.c eol=lf *.cpp eol=lf +.git* eol=lf *.vcxproj* eol=crlf *.cppproj eol=crlf *.sln eol=crlf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38e936d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.vs +Release +Debug +*.componentinfo.xml +avrdude.bat diff --git a/InOut.atsln b/inout.atsln similarity index 86% rename from InOut.atsln rename to inout.atsln index 574935a..7efe3e3 100644 --- a/InOut.atsln +++ b/inout.atsln @@ -3,7 +3,7 @@ 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}") = "InOut", "InOut\InOut.cppproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" +Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "inout", "inout\inout.cppproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/InOut/Clock.h b/inout/clock.h similarity index 100% rename from InOut/Clock.h rename to inout/clock.h diff --git a/InOut/InOut.cpp b/inout/inout.cpp similarity index 99% rename from InOut/InOut.cpp rename to inout/inout.cpp index ca576e5..1bb3c2d 100644 --- a/InOut/InOut.cpp +++ b/inout/inout.cpp @@ -1,17 +1,17 @@ -#include "InOut.h" +#include "inout.h" ////////////////////////////////////////////////////////////////////////// volatile uint8_t* InOut::getPort( Pin enmPin, Type enmType ) { volatile uint8_t *vpui8Port = nullptr; - + if( enmPin == Pin::P_NONE ) { return vpui8Port; } - + uint8_t ui8Port = ( static_cast( enmPin ) >> 4 ) & 0x0F; - + switch( ui8Port ) { case 0: @@ -99,13 +99,13 @@ void InOut::setPinDirection( Pin enmPin, Dir enmDir, bool bPullup ) { return; } - + volatile uint8_t *vpui8PortDir = getPort( enmPin, Type::T_DDR ); volatile uint8_t *vpui8PortOut = getPort( enmPin, Type::T_PORT ); uint8_t ui8Pin = getPin( enmPin ); - + setPinDirection( vpui8PortDir, ui8Pin, enmDir ); - + if( enmDir == Dir::D_IN ) { writePin( vpui8PortOut, ui8Pin, bPullup ); @@ -119,10 +119,10 @@ bool InOut::readPin( Pin enmPin ) { return false; } - + volatile uint8_t *vpui8Port = getPort( enmPin, Type::T_PIN ); uint8_t ui8Pin = getPin( enmPin ); - + return readPin( vpui8Port, ui8Pin ); } @@ -133,7 +133,7 @@ void InOut::writePin( Pin enmPin, bool bValue ) { return; } - + volatile uint8_t *vpui8Port = getPort( enmPin, Type::T_PORT ); uint8_t ui8Pin = getPin( enmPin ); @@ -147,9 +147,9 @@ uint8_t InOut::readPort( Pin enmPortPin ) { return 0; } - + volatile uint8_t *vpui8Port = getPort( enmPortPin, Type::T_PIN ); - + return readPort( vpui8Port ); } @@ -160,7 +160,7 @@ void InOut::writePort( Pin enmPortPin, uint8_t ui8Value ) { return; } - + volatile uint8_t *vpui8Port = getPort( enmPortPin, Type::T_PORT ); writePort( vpui8Port, ui8Value ); @@ -190,7 +190,7 @@ void InOutPin::setPin( InOut::Pin enmPin ) m_vpui8Input = InOut::getPort( enmPin, InOut::Type::T_PIN ); m_vpui8Dir = InOut::getPort( enmPin, InOut::Type::T_DDR ); m_vpui8Output = InOut::getPort( enmPin, InOut::Type::T_PORT ); - + m_ui8Pin = InOut::getPin( enmPin ); } @@ -218,4 +218,4 @@ void InOutPort::setPort( InOut::Pin enmPortPin ) m_vpui8Input = InOut::getPort( enmPortPin, InOut::Type::T_PIN ); m_vpui8Dir = InOut::getPort( enmPortPin, InOut::Type::T_DDR ); m_vpui8Output = InOut::getPort( enmPortPin, InOut::Type::T_PORT ); -} \ No newline at end of file +} diff --git a/InOut/InOut.cppproj b/inout/inout.cppproj similarity index 98% rename from InOut/InOut.cppproj rename to inout/inout.cppproj index 23efc30..c21e616 100644 --- a/InOut/InOut.cppproj +++ b/inout/inout.cppproj @@ -12,9 +12,9 @@ $(MSBuildProjectName) .elf $(MSBuildProjectDirectory)\$(Configuration) - InOut - InOut - InOut + inout + inout + inout Native true false @@ -170,10 +170,10 @@ compile - + compile - + compile @@ -181,4 +181,4 @@ - \ No newline at end of file + diff --git a/InOut/InOut.h b/inout/inout.h similarity index 98% rename from InOut/InOut.h rename to inout/inout.h index 61de1e0..1da178a 100644 --- a/InOut/InOut.h +++ b/inout/inout.h @@ -116,17 +116,17 @@ public: T_DDR = 1, T_PORT = 2 }; - + static volatile uint8_t* getPort( Pin enmPin, Type enmType ); static uint8_t getPin( Pin enmPin ); - + static void setPinDirection( Pin enmPin, Dir enmDir, bool bPullup ); static bool readPin( Pin enmPin ); static void writePin( Pin enmPin, bool bValue ); - + static uint8_t readPort( Pin enmPortPin ); static void writePort( Pin enmPortPin, uint8_t ui8Value ); - + ////////////////////////////////////////////////////////////////////////// static inline void setPinDirection( volatile uint8_t *vpui8Port, uint8_t ui8Pin, Dir enmDir ) { @@ -139,7 +139,7 @@ public: *vpui8Port &= ~( 1 << ui8Pin ); } } - + ////////////////////////////////////////////////////////////////////////// static inline bool readPin( volatile uint8_t *vpui8Port, uint8_t ui8Pin ) { @@ -147,10 +147,10 @@ public: { return true; } - + return false; } - + ////////////////////////////////////////////////////////////////////////// static inline void writePin( volatile uint8_t *vpui8Port, uint8_t ui8Pin, bool bValue ) { @@ -163,19 +163,19 @@ public: *vpui8Port &= ~( 1 << ui8Pin ); } } - + ////////////////////////////////////////////////////////////////////////// static inline void setPortDirection( volatile uint8_t *vpui8Port, Dir enmDir ) { *vpui8Port = ( ( enmDir == InOut::Dir::D_OUT ) ? ( 0xFF ) : ( 0x00 ) ); } - + ////////////////////////////////////////////////////////////////////////// static inline uint8_t readPort( volatile uint8_t *vpui8Port ) { return *vpui8Port; } - + ////////////////////////////////////////////////////////////////////////// static inline void writePort( volatile uint8_t *vpui8Port, uint8_t ui8Value ) { @@ -191,16 +191,16 @@ private: volatile uint8_t *m_vpui8Input; volatile uint8_t *m_vpui8Dir; volatile uint8_t *m_vpui8Output; - + uint8_t m_ui8Pin; - + public: InOutPin(); InOutPin( InOut::Pin enmPin ); ~InOutPin(); - + void setPin( InOut::Pin enmPin ); - + ////////////////////////////////////////////////////////////////////////// inline void setDirection( InOut::Dir enmDir, bool bPullup ) { @@ -208,15 +208,15 @@ public: { return; } - + InOut::setPinDirection( m_vpui8Dir, m_ui8Pin, enmDir ); - + if( enmDir == InOut::Dir::D_IN ) { InOut::writePin( m_vpui8Output, m_ui8Pin, bPullup ); } } - + ////////////////////////////////////////////////////////////////////////// inline bool read() { @@ -224,10 +224,10 @@ public: { return false; } - + return InOut::readPin( m_vpui8Input, m_ui8Pin ); } - + ////////////////////////////////////////////////////////////////////////// inline void write( bool bValue ) { @@ -235,7 +235,7 @@ public: { return; } - + InOut::writePin( m_vpui8Output, m_ui8Pin, bValue ); } }; @@ -253,9 +253,9 @@ public: InOutPort(); InOutPort( InOut::Pin enmPortPin ); ~InOutPort(); - + void setPort( InOut::Pin enmPortPin ); - + ////////////////////////////////////////////////////////////////////////// inline void setDirection( InOut::Dir enmDir, bool bPullup ) { @@ -263,15 +263,15 @@ public: { return; } - + InOut::setPortDirection( m_vpui8Dir, enmDir ); - + if( enmDir == InOut::Dir::D_IN ) { InOut::writePort( m_vpui8Output, ( ( bPullup ) ? ( 0xFF ) : ( 0x00 ) ) ); } } - + ////////////////////////////////////////////////////////////////////////// inline uint8_t read() { @@ -279,10 +279,10 @@ public: { return 0; } - + return InOut::readPort( m_vpui8Input ); } - + ////////////////////////////////////////////////////////////////////////// inline void write( uint8_t ui8Value ) { @@ -290,9 +290,9 @@ public: { return; } - + InOut::writePort( m_vpui8Output, ui8Value ); } }; -#endif \ No newline at end of file +#endif diff --git a/InOut/main.cpp b/inout/main.cpp similarity index 94% rename from InOut/main.cpp rename to inout/main.cpp index 233fbc7..b25f6fd 100644 --- a/InOut/main.cpp +++ b/inout/main.cpp @@ -4,13 +4,13 @@ * Version 1.3 */ -#include "Clock.h" -#include "InOut.h" +#include "clock.h" +#include "inout.h" int main() { InOutPin cLED( InOut::Pin::P_D7 ); - + cLED.setDirection( InOut::Dir::D_OUT, false ); cLED.write( false ); @@ -47,6 +47,6 @@ int main() _delay_ms( 1000 ); } - + return 0; -} \ No newline at end of file +}