Re: header files including other files

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

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.

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