wiki:howto/bitfields_in_microblaze

Version 1 (modified by chunter, 9 years ago) (diff)

--

Using Bit-Fields in a MicroBlaze C Project

We use a very useful C programming tool in the 802.11 Reference Design known as a Bit-Field. Bits are not individually addressable in C -- when unaligned access is enabled in a processor, the minimum addressable unit of data is a byte. Bit-fields provide a useful way of interpreting the bits that make up large type definitions. This document is a tutorial on how to use bit-fields in MicroBlaze C projects.

Example: Register Access

Example: Interpretation of Byte Array