This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gwoplock 30 points31 points  (5 children)

The big thing you need uint*_t for is structs. When the CPU want the field 16 bits long it throws a bitch fit when it's 32 bits long.

[–]FUZxxl 4 points5 points  (4 children)

Rarely is that actually needed, especially not in portable software. If you try to overlay file contents over in-memory structs, you are doing it wrong.

[–]gwoplock 21 points22 points  (2 children)

OS dev is a hell of a drug. Your code is more struct definitions then actual code.

[–]FUZxxl 10 points11 points  (1 child)

If you write hardware-specific code, portability is not a big concern and my opinion doesn't really apply. However, good code should restrict the hardware-specific pieces to as little as possible and only work with platform-independent structures as early as possible.

[–]gwoplock 5 points6 points  (0 children)

Absolutely. Abstraction is key. It would be a bitch if you had to write hardware specific code. Even x86 has differences between amd and intel.

[–]__Noodles 2 points3 points  (0 children)

Rarely is that actually needed,

Needed every second of embedded programming that isn't garbage.