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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-05-04T10:20:26+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=30&amp;t=15260&amp;mode</id>
<entry>
<author><name><![CDATA[perlon]]></name></author>
<updated>2016-05-04T10:20:26+01:00</updated>
<published>2016-05-04T10:20:26+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159940#p159940</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159940#p159940"/>
<title type="html"><![CDATA[Re: Liczba złożona ze stanów logicznych]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159940#p159940"><![CDATA[
No i jeszcze przydałoby się zrobić operację przypisania w sposób atomowy.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=382">perlon</a> — 4 maja 2016, o 10:20</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rskup]]></name></author>
<updated>2016-04-30T15:49:10+01:00</updated>
<published>2016-04-30T15:49:10+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159623#p159623</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159623#p159623"/>
<title type="html"><![CDATA[Re: Liczba złożona ze stanów logicznych]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159623#p159623"><![CDATA[
A nie prościej skorzystać z union?<br />[syntax=c]typedef union<br />{<br />uint8_t byte;<br />struct<br />{<br />uint8_t bit0 : 1;<br />uint8_t bit1 : 1;<br />uint8_t bit2 : 1;<br />uint8_t bit3 : 1;<br />uint8_t bit4 : 1;<br />uint8_t bit5 : 1;<br />uint8_t bit6 : 1;<br />uint8_t bit7 : 1;<br />};<br />} TBYTE;[/syntax]<br /><br />-- <br />Pozdrawiam,<br />Robert<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3427">rskup</a> — 30 kwi 2016, o 15:49</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Bartek123]]></name></author>
<updated>2016-04-30T12:39:21+01:00</updated>
<published>2016-04-30T12:39:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159615#p159615</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159615#p159615"/>
<title type="html"><![CDATA[Re: Liczba złożona ze stanów logicznych]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159615#p159615"><![CDATA[
Jak dobrze zrozumiałem to Proszę  <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> :<br /><br />[syntax=c]uint8_t stan1 = 1;<br />uint8_t stan2 = 1;<br />uint8_t stan3 = 0;<br />uint8_t stan4 = 1;<br />uint8_t stan5 = 1;<br />uint8_t stan6 = 0;<br />uint8_t stan7 = 0;<br /><br />uint8_t wynik = 0;<br /><br />wynik |= (stan1&lt;&lt;0) | (stan2&lt;&lt;1) | (stan3&lt;&lt;2) | (stan4&lt;&lt;3) | (stan5&lt;&lt;4) | (stan6&lt;&lt;5) | (stan7&lt;&lt;6);[/syntax]<br /><br />wadą tego rozwiązania jest to, że stany muszą być 1 lub zero nie może być stanu 2 czy 3 czy 255, bo to wszystko popsuje <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> . Zmienna wynik przechowuje sklejone stany  <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=10617">Bartek123</a> — 30 kwi 2016, o 12:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[paenaico1859]]></name></author>
<updated>2016-04-30T12:30:15+01:00</updated>
<published>2016-04-30T12:30:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159614#p159614</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159614#p159614"/>
<title type="html"><![CDATA[Liczba złożona ze stanów logicznych]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15260&amp;p=159614#p159614"><![CDATA[
Witam , mam kilka liczb ( z digitalRead ) które są stanami logicznymi na  7czujnikach , moje pytanie to jak nazywa się polecenie które złoży mi te 7 stanów w jedną siedmiobitową liczbę ?<br /><br />Pozdrawiam<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=11758">paenaico1859</a> — 30 kwi 2016, o 12:30</p><hr />
]]></content>
</entry>
</feed>