summaryrefslogtreecommitdiff
path: root/firmware/bluetooth_rxtx
diff options
context:
space:
mode:
authorHannes Ellinger <hannes.ellinger@eas.iis.fraunhofer.de>2016-07-12 13:18:23 +0200
committerHannes Ellinger <hannes.ellinger@eas.iis.fraunhofer.de>2016-07-13 17:49:35 +0200
commitb9f82e9925b8da64b5fdf110a4c83efc786aa247 (patch)
tree5d049bf9108613b4fcac38629796a0b21b00510d /firmware/bluetooth_rxtx
parent97602ab79871d90d61b9140c0a35e841ed4136fe (diff)
firmware: fix compiler warnings
Diffstat (limited to 'firmware/bluetooth_rxtx')
-rw-r--r--firmware/bluetooth_rxtx/bluetooth.c3
-rw-r--r--firmware/bluetooth_rxtx/bluetooth_rxtx.c2
-rw-r--r--firmware/bluetooth_rxtx/cc2400_rangetest.c6
3 files changed, 6 insertions, 5 deletions
diff --git a/firmware/bluetooth_rxtx/bluetooth.c b/firmware/bluetooth_rxtx/bluetooth.c
index f854d8d..4a10bc7 100644
--- a/firmware/bluetooth_rxtx/bluetooth.c
+++ b/firmware/bluetooth_rxtx/bluetooth.c
@@ -73,10 +73,11 @@ void precalc(void)
for(i = 0; i < 10; i++)
used_channels += count_bits((uint64_t) afh_map[i]);
j = 0;
- for (i = 0; i < NUM_BREDR_CHANNELS; i++)
+ for (i = 0; i < NUM_BREDR_CHANNELS; i++) {
chan = (i * 2) % NUM_BREDR_CHANNELS;
if(afh_map[chan/8] & (0x1 << (chan % 8)))
bank[j++] = chan;
+ }
}
}
diff --git a/firmware/bluetooth_rxtx/bluetooth_rxtx.c b/firmware/bluetooth_rxtx/bluetooth_rxtx.c
index c71189e..7d10dfa 100644
--- a/firmware/bluetooth_rxtx/bluetooth_rxtx.c
+++ b/firmware/bluetooth_rxtx/bluetooth_rxtx.c
@@ -1362,7 +1362,7 @@ void br_transmit()
{
uint16_t gio_save;
- uint32_t clkn_saved;
+ uint32_t clkn_saved = 0;
uint16_t preamble = (target.syncword & 1) == 1 ? 0x5555 : 0xaaaa;
uint8_t trailer = ((target.syncword >> 63) & 1) == 1 ? 0xaa : 0x55;
diff --git a/firmware/bluetooth_rxtx/cc2400_rangetest.c b/firmware/bluetooth_rxtx/cc2400_rangetest.c
index 5a1178c..28534f8 100644
--- a/firmware/bluetooth_rxtx/cc2400_rangetest.c
+++ b/firmware/bluetooth_rxtx/cc2400_rangetest.c
@@ -222,8 +222,8 @@ void cc2400_repeater(volatile u16 *chan_ptr)
for (i = 0; i < 16; i++) {
buf[21] = i;
while ((cc2400_get(FSMSTATE) & 0x1f) != STATE_STROBE_FS_ON);
- for (j = 0; j < len; j++)
- cc2400_set8(FIFOREG, buf[j]);
+ for (j = 0; j < len; j++)
+ cc2400_set8(FIFOREG, buf[j]);
cc2400_strobe(STX);
}
}
@@ -250,7 +250,7 @@ void cc2400_txtest(volatile u8 *mod_ptr, volatile u16 *chan_ptr)
cc2400_set(MDMTST0, 0x334b); // with PRNG
cc2400_set(GRMDM, 0x0df1); // default value
cc2400_set(FSDIV, *chan_ptr);
- cc2400_set(MDMCTRL, mdmctrl);
+ cc2400_set(MDMCTRL, mdmctrl);
while (!(cc2400_status() & XOSC16M_STABLE));
cc2400_strobe(SFSON);