<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=4412&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2013-10-08T14:57:36+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=4412&amp;mode</id>
<entry>
<author><name><![CDATA[Paul Dirac]]></name></author>
<updated>2013-10-08T14:57:36+01:00</updated>
<published>2013-10-08T14:57:36+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52267#p52267</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52267#p52267"/>
<title type="html"><![CDATA[Re: Time to Unix Time]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52267#p52267"><![CDATA[
Okey all działa thx, sunriver mi podrzucił gotowe funckje, ale twoja metoda też działa.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1035">Paul Dirac</a> — 8 paź 2013, o 14:57</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Paul Dirac]]></name></author>
<updated>2013-10-08T13:53:58+01:00</updated>
<published>2013-10-08T13:53:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52264#p52264</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52264#p52264"/>
<title type="html"><![CDATA[Re: Time to Unix Time]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52264#p52264"><![CDATA[
[syntax=c]**** Build of configuration Release for project dht ****<br /><br />make all <br />Building file: ../main.c<br />Invoking: AVR Compiler<br />avr-gcc -Wall -Os -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega16 -DF_CPU=11059200UL -MMD -MP -MF&quot;main.d&quot; -MT&quot;main.d&quot; -c -o&quot;main.o&quot; &quot;../main.c&quot;<br />In file included from ../main.c:20:<br />../libtime.h:101: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:103: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:104: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:105: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:118: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:120: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:121: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:122: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:125: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:129: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:132: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:135: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:136: warning: '__cdecl__' attribute directive ignored<br />../libtime.h:241: warning: '__dllimport__' attribute directive ignored<br />../libtime.h:270: warning: '__cdecl__' attribute directive ignored<br />../main.c: In function 'main':<br />../main.c:78: warning: 't_of_day' is used uninitialized in this function<br />Finished building: ../main.c<br /> <br />Building target: dht11.elf<br />Invoking: AVR C Linker<br />avr-gcc -Wl,-Map,dht11.map -Wl,-u,vfprintf -mmcu=atmega16 -o&quot;dht11.elf&quot;  ./main.o  ./TWI/twi.o  ./TIMER/timer.o  ./SWITCHE/key.o  ./SPI/spi.o  ./SHT/sht.o ./SHT/twi.o  ./RTC/rtc.o  ./LCD/lcd.o  ./DHT/dht11.o  ./DATAFLASH/flashmem.o  ./CRC/crc.o  ./CALLBACK/callbacki.o   -lm -lprintf_flt<br />Finished building target: dht11.elf<br /> <br />Invoking: AVR Create Extended Listing<br />avr-objdump -h -S dht11.elf  &gt;&quot;dht11.lss&quot;<br />Finished building: dht11.lss<br /> <br />Create Flash image (ihex format)<br />avr-objcopy -R .eeprom -O ihex dht11.elf  &quot;dht11.hex&quot;<br />Finished building: dht11.hex<br /> <br />Create eeprom image (ihex format)<br />avr-objcopy -j .eeprom --no-change-warnings --change-section-lma .eeprom=0 -O ihex dht11.elf  &quot;dht11.eep&quot;<br />Finished building: dht11.eep<br /> <br />Invoking: Print Size<br />avr-size --format=avr --mcu=atmega16 dht11.elf<br />AVR Memory Usage<br />----------------<br />Device: atmega16<br /><br />Program:   11106 bytes (67.8% Full)<br />(.text + .data + .bootloader)<br /><br />Data:        221 bytes (21.6% Full)<br />(.data + .bss + .noinit)<br /><br /><br />Finished building: sizedummy[/syntax]<br /><br />Coś mu nie pasi z #define __cdecl  __attribute__ ((__cdecl__))<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1035">Paul Dirac</a> — 8 paź 2013, o 13:53</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[krzyychu]]></name></author>
<updated>2013-10-08T13:20:19+01:00</updated>
<published>2013-10-08T13:20:19+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52259#p52259</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52259#p52259"/>
<title type="html"><![CDATA[Re: Time to Unix Time]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52259#p52259"><![CDATA[
Jeśli w takiej postaci przeniosłeś to do AVR-GCC to kompilator krzyczy bo nigdzie nie ma deklaracji struktury. Masz tylko definicję. Chyba, że masz ją w time.h. Nie wiemy tego.<br />Najlepiej pokaż kod i jakie warningi dostajesz bo tak to troszkę wróżenie z fusów (niekoniecznie atmegowych <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> )<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=66">krzyychu</a> — 8 paź 2013, o 13:20</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Paul Dirac]]></name></author>
<updated>2013-10-08T12:51:11+01:00</updated>
<published>2013-10-08T12:51:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52258#p52258</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52258#p52258"/>
<title type="html"><![CDATA[Time to Unix Time]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4412&amp;p=52258#p52258"><![CDATA[
Witam!<br /><br />Jak w temacie, bawie się sobie moim rtc i wpadłem na pomysł konwersji daty do unixa- mniej bajtów podczas zapisu danych. Problem w tym, że nie mam pojęcia jak dodać biblioteke time.h. napisałem sobie program w devc++, który jest postaci:<br />[syntax=c]#include &lt;time.h&gt;<br />#include &lt;io.h&gt;<br />#include &lt;stdio.h&gt;<br /><br />int main()<br />{<br />struct tm t;<br />    time_t t_of_day;<br />    t.tm_year = 2011-1900;<br />    t.tm_mon = 7;           // Month, 0 - jan<br />    t.tm_mday = 8;          // Day of the month<br />    t.tm_hour = 16;     <br />    t.tm_min = 11;<br />    t.tm_sec = 42;<br />    t.tm_isdst = -1;        // Is DST on? 1 = yes, 0 = no, -1 = unknown<br />    t_of_day = mktime(&amp;t);<br />    printf(&quot;%ld\n&quot;, (long) t_of_day);<br />   <br />while(1);<br />return 0;<br />}[/syntax]<br /><br />Podaje on date w sekundach. Nawet przeniesienie z devc całej biblioteki nie zalatwia probelmu, ponieważ mam mnóstwo warningów.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1035">Paul Dirac</a> — 8 paź 2013, o 12:51</p><hr />
]]></content>
</entry>
</feed>