Re: header files including other files



On Mon, 10 Sep 2007 19:36:51 -0400, CBFalconer <cbfalconer@xxxxxxxxx>
wrote:

Al Balmer wrote:
CBFalconer <cbfalconer@xxxxxxxxx> wrote:
Al Balmer wrote:
CBFalconer <cbfalconer@xxxxxxxxx> wrote:

... snip ...

You can only create types in C with struct or enums. Anything else
is simply an alias, including those unint8_ts etc. If you want
exactly 8 bits of something, put it in a type that can hold those 8
bits, and mask off anything outside them.

How do you write only the masked bits to the device?

Investigate the i/o of the device.

<g>
Point is that your advice may not always work.

Why not? The device input is done via things constructed from
byte, short, int, long, float, double, etc. Not from unint8_t*.

(I said output, btw, not input.) Then you don't need the mask. What
the stdint types do is make porting to another architecture simple
when there is a suitable type available. If there isn't, then masking
another type might be useful.

--
Al Balmer
Sun City, AZ
.



Relevant Pages

  • Re: header files including other files
    ... is simply an alias, including those unint8_ts etc. ... Investigate the i/o of the device. ... The device input is done via things constructed from ... Then you don't need the mask. ...
    (comp.arch.embedded)
  • Alias in different subnet on card
    ... I'm running a firewall at the moment using FreeBSD 5.2.1 and IPFW. ... this by adding an alias to xl1, ... The primary IP on xl 1 is currently 19x.xxx.xxx.1 and the mask on there is ... The problem with another network card ...
    (freebsd-questions)
  • Re: Masking E-mail Address Hyperlink
    ... I'm trying to mask it so the mail program does not show the actual address. ... I've noticed some mail appears with the "alias" in the From ...
    (microsoft.public.frontpage.client)
  • Add network alias permanently - How?
    ... ifconfig eth0 add netmask ... this alias is lost. ...
    (linux.redhat.install)