How to build a series of 32 bit words from block of text at compile-time
<p>C newbie here - I'm working with an embedded device and have an interest in transmitting a 'page' of ASCII characters over a particular protocol. </p>

<p>This protocol mandates transmitting 2 characters (in particular bit positions) of a 32 bit word. The rest of the bits in the word are being used for other purposes.</p>

<p>Instead of defining a page such as </p>

<pre><code>MY_PAGE {
{ WHATEVER, 'H', 'E', BAR} // word 1
{ WHATEVER, 'L', 'L', BAR} //word 2
{ WHATEVER, 'O', NUL, BAR} // word 3
}
</code></pre>

<p>For clarity, I would like to simply specify "Hello" and let a macro handle the assembly of data words to make that happen. Is it more hassle than it's worth? </p>

<p>For a run time solution I would just parse a string literal and build something in memory.  </p>

<p>Thanks!</p>