title: Macro statements used in a header file, but defined outside of it
body: <p>I'm writing some libraries for a microcontroller, and I've organized these libraries in sections with respect to their function. For example, I have <code>adc.h</code> to configure analog input measurements, <code>uart.h</code>, and <code>i2c.h</code> for digital communication etc.</p>
  
  <p>Some of these libraries need information on a CPU speed, so I've defined a macro statement</p>
  
  <pre><code>#define FCY 30000000UL
  </code></pre>
  
  <p>inside all header files that need this piece of information. My question is, can I program somehow these header files in a way that the <code>FCY</code> macro is only "declared" in the header file, but is defined outside of it, e.g. in a <code>main.c</code> file? The problem is, when I change the CPU speed (frequency), I have to update all these <code>FCY</code> macro statements, which is prone to error.</p>