diff --git a/firmware/common/max2837.c b/firmware/common/max2837.c index 86a88441..21b53022 100644 --- a/firmware/common/max2837.c +++ b/firmware/common/max2837.c @@ -119,6 +119,7 @@ void max2837_setup(void) uint16_t max2837_spi_read(uint8_t r) { gpio_clear(PORT_XCVR_CS, PIN_XCVR_CS); // FIXME: Unimplemented. + r=r; gpio_set(PORT_XCVR_CS, PIN_XCVR_CS); return 0; } diff --git a/firmware/common/rffc5071.c b/firmware/common/rffc5071.c index 768c3104..3bc678bf 100644 --- a/firmware/common/rffc5071.c +++ b/firmware/common/rffc5071.c @@ -269,7 +269,7 @@ void rffc5071_spi_write(uint8_t r, uint16_t v) { int bits = 25; int msb = 1 << (bits -1); - uint32_t data = ((reg & 0x7f) << 16) | val; + uint32_t data = ((r & 0x7f) << 16) | v; /* make sure everything is starting in the correct state */ gpio_set(PORT_MIXER, PIN_MIXER_ENX); @@ -458,6 +458,9 @@ uint16_t rffc5071_config_synth_int(uint16_t lo) { uint16_t rffc5071_set_frequency(uint16_t mhz, uint32_t hz) { uint16_t tune_freq; + // Fractional tuning unimplemented, 'hz' ignored + hz=hz; + rffc5071_disable(); tune_freq = rffc5071_config_synth_int(mhz); rffc5071_enable(); diff --git a/firmware/common/rffc5071_regs.def b/firmware/common/rffc5071_regs.def index a40451fe..d17a064f 100644 --- a/firmware/common/rffc5071_regs.def +++ b/firmware/common/rffc5071_regs.def @@ -39,12 +39,12 @@ * l=length (bits) */ #define __MREG__(n,r,o,l) \ static inline uint16_t get_##n(void) { \ - return (rffc5071_regs[r] >> o) & ((1<> o) & ((1L<