lib: Fix band selection

There was two issues :
 - Swap between the RX/TX GPIOs controlling the switch
 - The proper LNA was not being selected inside the LMS

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
lib: Avoid warning in lib when using lms_printf in 'if'

When you have something like:

if (bad_thing_happenned)
    lms_printf("Panic !");

defining lms_printf to nothing creates a warning.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
lib/lms: Clean up of the PLL parameters setting

Using 64 bit math is just way easier to read and
just as safe and precise.

Also cleanup random bits in that area

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
lib/lms: New VCOCAP search algorithm

Seems more resilient to errors than the previous one.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
lib/lms: Add a function to convert a lms_freq struct to frequency in Hz

... and use it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Merge pull request #27 from smunaut/fixes

Various small fixed in the lib