[solved] RF12.h: Why is there not definition of 315MHz

Hello.

I have read the datasheet and looked into the corresponding position in the sourcecode of "RF12.cpp".
Additionally, and the really helpful source!!!, I received great help from a electronic engineer.

More detailed:
Look the definition of "uint8_t rf12_initialize (uint8_t id, uint8_t band, uint8_t g)" in RF12.cpp, this function is used to initialize teh RFM12(B) module.
Then, I want to know what paramter has to be changed, of course it was "band" (uint8_t), it was only used once in the function rf12_initialize. That means that this position is the corresponding one to be examined:

rf12_xfer(0x80C7 | (band << 4));

(RF12.cpp, l.404)
Look here:
"|" is the logical AND operator, << is a bitshift operator (shifts 4 to the left, that means a hexadecimal unit (2^4=16))
Now consider binary:
1000 0000 1100 0111
Now I need the datasheet ( hoperf : RFM12.pdf ) , see the bottom left table on page 12.
Back to the binary code:
I said << is the bitshift operator, lets apply it on the code, e.g. we use "2" as given in the definition (#define RF12_868MHZ 2) for 868MHz band. Then it is
0000 0010 << 4 ("shift" the 10 ,which is 2 in binary, 4 bits left) = 0010 0000 .
Now do the addition:
0000 0000 0010 0000 + 1000 0000 1100 0111 = 1000 0000 1110 0111
The important binary parts were highlighted.
In the datasheet's table there is written:
315MHz band: b0=0; b1=0. That means we need a zero for both b0 and b1.
That is 1000 0000 1100 0111 .

And it is a lot of fun!

Feel free to ask if there are any questions (maybe explanation was unclear because quickly written).

Regards.