<?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=7101&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-05-17T13:49:50+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=7101&amp;mode</id>
<entry>
<author><name><![CDATA[gumeni]]></name></author>
<updated>2014-05-17T13:49:50+01:00</updated>
<published>2014-05-17T13:49:50+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81412#p81412</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81412#p81412"/>
<title type="html"><![CDATA[Re: Makrodefinicje]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81412#p81412"><![CDATA[
Dziękuję zmieniłem na i działa <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br />czujnik.h<br />[syntax=c]/*<br /> * czujnik.h<br /> *<br /> *  Created on: 17-05-2014<br /> *      Author: cover<br /> */<br /><br />#ifndef CZUJNIK_H_<br />#define CZUJNIK_H_<br /><br />#define CZUJNIK_PORT  D<br />#define CZUJNIK_PIN  0<br /><br />#define PORT(x) SPORT(x)<br />#define SPORT(x) (PORT##x)<br />// *** PIN<br />#define PIN(x) SPIN(x)<br />#define SPIN(x) (PIN##x)<br />// *** DDR<br />#define DDR(x) SDDR(x)<br />#define SDDR(x) (DDR##x)<br /><br /><br /><br /><br />//uint16_t pomiar (void);<br /><br /><br />#endif /* CZUJNIK_H_ */[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3088">gumeni</a> — 17 maja 2014, o 13:49</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2014-05-17T13:31:41+01:00</updated>
<published>2014-05-17T13:31:41+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81410#p81410</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81410#p81410"/>
<title type="html"><![CDATA[Re: Makrodefinicje]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81410#p81410"><![CDATA[
zajrzyj sobie do Bluebooka ... albo też tutaj:<br /><br /><!-- m --><a class="postlink" href="http://mirekk36.blogspot.com/2011/12/jezyk-c-makra-upraszczajace-dostep-do.html" >http://mirekk36.blogspot.com/2011/12/je ... ep-do.html</a><!-- m --><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 17 maja 2014, o 13:31</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gumeni]]></name></author>
<updated>2014-05-17T13:29:03+01:00</updated>
<published>2014-05-17T13:29:03+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81409#p81409</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81409#p81409"/>
<title type="html"><![CDATA[Makrodefinicje]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7101&amp;p=81409#p81409"><![CDATA[
Witam<br />Mam problem z makrodefinicją w funkcji static inline void czujnik_wyjscie(void) przy ustawianiu DDR(CZUJNIK_PORT) wywala błąd Symbol 'D' could not be resolved i parę innych na dole w konsoli są wypisane. Jak to naprawić?<br /><br />czujnik.c<br />[syntax=c]/*<br /> * czujnik.c<br /> *<br /> *  Created on: 17-05-2014<br /> *      Author: cover<br /> */<br />#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br />#include &quot;czujnik.h&quot;<br /><br />#define CZUJNIK_HIGH  PORT(CZUJNIK_PORT) |= (1&lt;&lt;CZUJNIK_PIN)<br />#define CZUJNIK_LOW  PORT(CZUJNIK_PORT) &amp;= ~(1&lt;&lt;CZUJNIK_PIN)<br /><br /><br />static inline void czujnik_wyjscie(void)<br />{<br />DDR(CZUJNIK_PORT) |= (1&lt;&lt;CZUJNIK_PIN);<br /><br />}[/syntax]<br /><br />czujnik.h<br />[syntax=c]/*<br /> * czujnik.h<br /> *<br /> *  Created on: 17-05-2014<br /> *      Author: cover<br /> */<br /><br />#ifndef CZUJNIK_H_<br />#define CZUJNIK_H_<br /><br />#define CZUJNIK_PORT  D<br />#define CZUJNIK_PIN  0<br /><br /><br /><br /><br />//uint16_t pomiar (void);<br /><br /><br />#endif /* CZUJNIK_H_ */[/syntax]<br /><br />Console:<br /><br />**** Build of configuration Release for project atmega88 ****<br /><br />make all <br />Building file: ../czujnik.c<br />Invoking: AVR Compiler<br />avr-gcc -Wall -Os -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega8 -DF_CPU=8000000UL -MMD -MP -MF&quot;czujnik.d&quot; -MT&quot;czujnik.d&quot; -c -o &quot;czujnik.o&quot; &quot;../czujnik.c&quot;<br />../czujnik.c: In function 'czujnik_wyjscie':<br />../czujnik.c:18: warning: implicit declaration of function 'DDR'<br />../czujnik.c:18: error: 'D' undeclared (first use in this function)<br />../czujnik.c:18: error: (Each undeclared identifier is reported only once<br />../czujnik.c:18: error: for each function it appears in.)<br />../czujnik.c:18: error: lvalue required as left operand of assignment<br />make: *** [czujnik.o] Error 1<br /><br />**** Build Finished ****<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3088">gumeni</a> — 17 maja 2014, o 13:29</p><hr />
]]></content>
</entry>
</feed>