<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">BINGO, to bude ono. Ted otazka, co
      elegantne s tim...<br>
      __attribute__ ((aligned (1))) jsem pokusne nacpal vsude (ted
      neresim, ze by to treba nefungovalo), ale bez efektu.<br>
      <br>
      Pomuze zarovnat zacatek struktur na 64b -dummy (i bez atributu):<br>
      typedef struct<br>
      {<br>
          uint32_t id;<br>
          uint32_t dummy;<br>
          union<br>
          {<br>
              struct<br>
              {<br>
                  uint8_t bcont[SECTOR_FSRECSZ-12];<br>
                  uint32_t crc32;<br>
              } __attribute__ ((aligned (1)));<br>
              struct<br>
              {<br>
                  time64_ms tmLastSms;<br>
              }__attribute__ ((aligned (1)));<br>
          } __attribute__ ((aligned (1)));<br>
      } __attribute__ ((aligned (1))) FLASHFSREC;<br>
      <br>
      Radsi bych tu 64b polozku donutil aby se zarovnala na 4B, coz by
      pro CM4 nemel byt problem.<br>
      <br>
      Dne 21.03.2018 v 9:25 Marek Sembol napsal(a):<br>
    </div>
    <blockquote type="cite"
cite="mid:CADUfZ8GuRX_URU9K+W_068j8tcNtqdypXutjqok3QFGRwKfuRA@mail.gmail.com">
      <div dir="ltr">Zeby nastaveni allignementu?
        <div>Marek</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2018-03-21 9:22 GMT+01:00 Milan B. <span
            dir="ltr"><<a href="mailto:milan@bastl.sk"
              target="_blank" moz-do-not-send="true">milan@bastl.sk</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
            Len odhad  ... skuste tie struktury pomenovat struct {...}
            meno;<br>
            <br>
            (obvykle svoje odpovede najprv testujem, ale ku kompilatoru
            sa dostanem az neskor, takze len odhad)<span class="HOEnZb"><font
                color="#888888"><br>
                <br>
                -m-</font></span>
            <div class="HOEnZb">
              <div class="h5"><br>
                <br>
                On 21.03.2018 9:09, Jaroslav Buchta wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  #define SECTOR_FSRECSZ 128<br>
                  <br>
                  typedef struct<br>
                  {<br>
                      uint32_t id;<br>
                      union<br>
                      {<br>
                          struct<br>
                          {<br>
                              uint8_t b[SECTOR_FSRECSZ-4-4];<br>
                              uint32_t crc32;<br>
                          };<br>
                          struct<br>
                          {<br>
                              time64_ms tmLastSms;<br>
                          };<br>
                      };<br>
                  } FLASHFSREC;<br>
                  <br>
                  <br>
                  proc je sizeof(FLASHFSREC) == 136 a ne 128???<br>
                  <br>
                  Asi jsem neco prehlednul, kdyz odstranim tmLastSms je
                  to 128...<br>
                  <br>
                  ______________________________<wbr>_________________<br>
                  HW-list mailing list  -  sponsored by <a
                    href="http://www.HW.cz" rel="noreferrer"
                    target="_blank" moz-do-not-send="true">www.HW.cz</a><br>
                  <a href="mailto:Hw-list@list.hw.cz" target="_blank"
                    moz-do-not-send="true">Hw-list@list.hw.cz</a><br>
                  <a href="http://list.hw.cz/mailman/listinfo/hw-list"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://list.hw.cz/mailman/list<wbr>info/hw-list</a><br>
                </blockquote>
                <br>
                <br>
              </div>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            HW-list mailing list  -  sponsored by <a
              href="http://www.HW.cz" rel="noreferrer" target="_blank"
              moz-do-not-send="true">www.HW.cz</a><br>
            <a href="mailto:Hw-list@list.hw.cz" moz-do-not-send="true">Hw-list@list.hw.cz</a><br>
            <a href="http://list.hw.cz/mailman/listinfo/hw-list"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://list.hw.cz/mailman/<wbr>listinfo/hw-list</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
HW-list mailing list  -  sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz">www.HW.cz</a>
<a class="moz-txt-link-abbreviated" href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a>
<a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>