<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>licheng</author_name>
  <author_url>https://blog.hatena.ne.jp/licheng/</author_url>
  <blog_title>滴了庵日録</blog_title>
  <blog_url>https://lipoyang.hatenablog.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>マイコンのI/Oポートのアクセスにはよく共用体のビットフィールドを使いますよね。たいてい、メーカーがヘッダファイルを提供してくれてます。 たしかに便利で、可読性も良くなるんですが、当然ながらポインタには渡せないんですよねぇ。たとえば、8ビットの入力ポートがあって、8つのボタンの入力信号を受けてる場合、各ビット（各ボタン）独立に、共通した処理を関数化したいときに困ります。 struct st_io { union { unsigned char BYTE; /* Byte Access */ struct { /* Bit Access */ unsigned char B7:1; /* Bit…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flipoyang.hatenablog.com%2Fentry%2F20071013%2Fp1&quot; title=&quot;ビットフィールドの難点 - 滴了庵日録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-10-13 00:00:00</published>
  <title>ビットフィールドの難点</title>
  <type>rich</type>
  <url>https://lipoyang.hatenablog.com/entry/20071013/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
