\r
volatile uint8_t owid1[8]={0x1D, 0x40, 0xDA, 0x84, 0x00, 0x00, 0x05, 0xBD};/**/\r
volatile uint8_t owid2[8]={0x1D, 0x41, 0xDA, 0x84, 0x00, 0x00, 0x05, 0x8A};/**/\r
-#if RAMEND>260 //defined(__AVR_ATtiny84__) ||defined(__AVR_ATtiny84A__) \r
+#if RAMEND>260 //defined(__AVR_ATtiny84__) ||defined(__AVR_ATtiny84A__)\r
uint8_t config_info1[26]={9,13,9,13,9,13,9,13,0x02,19,19,19,19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC\r
uint8_t config_info2[26]={9,13,9,13,9,13,9,13,0x02,19,19,19,19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC\r
#endif\r
counterpack_t pack1;\r
\r
//The Memory of both Chips is the same, beause of the small memory of ATTiny44\r
-#define pack2 pack1 \r
+#define pack2 pack1\r
\r
volatile uint8_t lastcps;\r
typedef union {\r
PORTB&=~(1<<PINB1);\r
CLKPR=0x80;\r
CLKPR=0;\r
+#ifdef FHEM_PLATINE\r
+ LPORT_CH1|=LPIN_CH1;\r
+#endif\r
GIFR|=(1<<INTF0);\r
}\r
}\r
//ACSR|=(1<<ACD); //Disable Comparator\r
ADCSRB|=(1<<ACME); //Disable Analog multiplexer\r
MCUCR &=~(1<<PUD); //All Pins Pullup...\r
-#ifdef FHEM_PLATINE\r
+ #ifdef FHEM_PLATINE\r
DIDR0|=(1<<ADC0D);\r
PORTA&=~(1<<PINA0);//Disable Pullup\r
-#else\r
+ #else\r
DIDR0|=(1<<ADC2D)|(1<<ADC1D); // Disable Digital input on Analog AIN0/AIN1 (PINA1 / PINA2)\r
PORTA&=~(1<<PINA2); //AIN1\r
-#endif\r
+ #endif\r
ACSR&=~(1<<ACD);\r
ACSR|=(1<<ACIE)|(1<<ACIS1)|(1<<ACIS0)|(1<<ACBG); //Enabble comperator interrupt Rising edge....(1<<ACIS0) -> minus of Comperator falls down -> output of Comperator rises\r
-#ifdef FHEM_PLATINE\r
+ #ifdef FHEM_PLATINE\r
//Switch std AIN1 to A0\r
ADCSRA&=~(1<<ADEN);\r
ADCSRB=(1<<ACME);\r
\r
\r
LPORT_CH0|=LPIN_CH0;\r _delay_ms(500);\r LPORT_CH0&=~LPIN_CH0;\r
-#endif\r
+ #endif\r
sei();\r
while(1) {\r
#ifdef FHEM_PLATINE\r
if (LPORT_CH2&LPIN_CH2) {\r _delay_ms(50);\r LPORT_CH2&=~LPIN_CH2;\r }\r
-#endif\r
-#ifndef FHEM_PLATINE\r
+ if (LPORT_CH1&LPIN_CH1) {\r _delay_ms(50);\r LPORT_CH1&=~LPIN_CH1;\r }\r
+ #endif\r
+ #ifndef FHEM_PLATINE\r
if ((PINB&(1<<PORTB0))==0) { //Jumper gesetzt ->Ruecksetzen\r
if ((counters1.c32[2]!=0)||(counters1.c32[3]!=0)||(counters2.c32[2]!=0)||(counters2.c32[3]!=0)) {\r
counters1.c32[0]++;\r counters2.c32[0]++;\r for (uint8_t i=2;i<4;i++) {\r
//count Resets\r changefromeeprom=1;\r
}\r
}\r
-#endif\r
+ #endif\r
MCUCR|=(1<<SE);\r
MCUCR&=~(1<<SM1);\r
asm("SLEEP");\r
<eraseonlaunchrule>1</eraseonlaunchrule>\r
<ExternalProgrammingToolCommand />\r
<AsfFrameworkConfig>\r
- <framework-data xmlns="">\r
- <options />\r
- <configurations />\r
- <files />\r
- <documentation help="" />\r
- <offline-documentation help="" />\r
- <dependencies>\r
- <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />\r
- </dependencies>\r
- </framework-data>\r
+ <framework-data>\r
+ <options />\r
+ <configurations />\r
+ <files />\r
+ <documentation help="" />\r
+ <offline-documentation help="" />\r
+ <dependencies>\r
+ <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.28.1" />\r
+ </dependencies>\r
+</framework-data>\r
</AsfFrameworkConfig>\r
<avrtool />\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
<ToolchainSettings>\r
<AvrGcc>\r
- <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
- <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
- <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
- <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
- <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
- <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
- <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
- <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
- <avrgcc.compiler.symbols.DefSymbols>\r
- <ListValues>\r
- <Value>NDEBUG</Value>\r
- </ListValues>\r
- </avrgcc.compiler.symbols.DefSymbols>\r
- <avrgcc.compiler.directories.IncludePaths>\r
- <ListValues>\r
- <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
- </ListValues>\r
- </avrgcc.compiler.directories.IncludePaths>\r
- <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
- <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
- <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
- <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
- <avrgcc.linker.libraries.Libraries>\r
- <ListValues>\r
- <Value>libm</Value>\r
- </ListValues>\r
- </avrgcc.linker.libraries.Libraries>\r
- <avrgcc.assembler.general.IncludePaths>\r
- <ListValues>\r
- <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
- </ListValues>\r
- </avrgcc.assembler.general.IncludePaths>\r
-</AvrGcc>\r
+ <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+ <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+ <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+ <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+ <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+ <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+ <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+ <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+ <avrgcc.compiler.symbols.DefSymbols>\r
+ <ListValues>\r
+ <Value>NDEBUG</Value>\r
+ </ListValues>\r
+ </avrgcc.compiler.symbols.DefSymbols>\r
+ <avrgcc.compiler.directories.IncludePaths>\r
+ <ListValues>\r
+ <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+ </ListValues>\r
+ </avrgcc.compiler.directories.IncludePaths>\r
+ <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
+ <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+ <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+ <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+ <avrgcc.linker.libraries.Libraries>\r
+ <ListValues>\r
+ <Value>libm</Value>\r
+ </ListValues>\r
+ </avrgcc.linker.libraries.Libraries>\r
+ <avrgcc.assembler.general.IncludePaths>\r
+ <ListValues>\r
+ <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+ </ListValues>\r
+ </avrgcc.assembler.general.IncludePaths>\r
+ </AvrGcc>\r
</ToolchainSettings>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
<ToolchainSettings>\r
<AvrGcc>\r
- <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
- <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
- <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
- <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
- <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
- <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
- <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
- <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
- <avrgcc.compiler.symbols.DefSymbols>\r
- <ListValues>\r
- <Value>DEBUG</Value>\r
- </ListValues>\r
- </avrgcc.compiler.symbols.DefSymbols>\r
- <avrgcc.compiler.directories.IncludePaths>\r
- <ListValues>\r
- <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
- </ListValues>\r
- </avrgcc.compiler.directories.IncludePaths>\r
- <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
- <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
- <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
- <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
- <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
- <avrgcc.linker.libraries.Libraries>\r
- <ListValues>\r
- <Value>libm</Value>\r
- </ListValues>\r
- </avrgcc.linker.libraries.Libraries>\r
- <avrgcc.assembler.general.IncludePaths>\r
- <ListValues>\r
- <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
- </ListValues>\r
- </avrgcc.assembler.general.IncludePaths>\r
- <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
-</AvrGcc>\r
+ <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+ <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+ <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+ <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+ <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+ <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+ <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+ <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+ <avrgcc.compiler.symbols.DefSymbols>\r
+ <ListValues>\r
+ <Value>DEBUG</Value>\r
+ </ListValues>\r
+ </avrgcc.compiler.symbols.DefSymbols>\r
+ <avrgcc.compiler.directories.IncludePaths>\r
+ <ListValues>\r
+ <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+ </ListValues>\r
+ </avrgcc.compiler.directories.IncludePaths>\r
+ <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+ <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+ <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+ <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+ <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+ <avrgcc.linker.libraries.Libraries>\r
+ <ListValues>\r
+ <Value>libm</Value>\r
+ </ListValues>\r
+ </avrgcc.linker.libraries.Libraries>\r
+ <avrgcc.assembler.general.IncludePaths>\r
+ <ListValues>\r
+ <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+ </ListValues>\r
+ </avrgcc.assembler.general.IncludePaths>\r
+ <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+ </AvrGcc>\r
</ToolchainSettings>\r
</PropertyGroup>\r
<ItemGroup>\r