summaryrefslogtreecommitdiff
path: root/firmware/bluetooth_rxtx
diff options
context:
space:
mode:
authorRichard Allen <rsaxvc@rsaxvc.net>2015-10-01 22:01:50 -0500
committerRichard Allen <rsaxvc@rsaxvc.net>2015-10-03 21:01:57 -0500
commit8bc54573d918814861326d1c645f31e99abfc272 (patch)
tree640e57b1d6678af4f0e0205d6ed6cd09b99acc10 /firmware/bluetooth_rxtx
parente5436fbd2bc02521072c62e3288676ec3deab873 (diff)
Misc scoping and cleanup
Diffstat (limited to 'firmware/bluetooth_rxtx')
-rw-r--r--firmware/bluetooth_rxtx/bluetooth.c8
-rw-r--r--firmware/bluetooth_rxtx/ubertooth_usb.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/firmware/bluetooth_rxtx/bluetooth.c b/firmware/bluetooth_rxtx/bluetooth.c
index 95d689f..915dd32 100644
--- a/firmware/bluetooth_rxtx/bluetooth.c
+++ b/firmware/bluetooth_rxtx/bluetooth.c
@@ -30,7 +30,7 @@ u8 afh_bank[CHANNELS];
u8 used_channels;
/* count the number of 1 bits in a uint64_t */
-uint8_t count_bits(uint64_t n)
+static uint8_t count_bits(uint64_t n)
{
uint8_t i = 0;
for (i = 0; n != 0; i++)
@@ -82,7 +82,7 @@ void precalc(void)
}
/* 5 bit permutation */
-u8 perm5(u8 z, u8 p_high, u16 p_low)
+static u8 perm5(u8 z, u8 p_high, u16 p_low)
{
/* z is constrained to 5 bits, p_high to 5 bits, p_low to 9 bits */
z &= 0x1f;
@@ -91,8 +91,8 @@ u8 perm5(u8 z, u8 p_high, u16 p_low)
int i;
u8 tmp, output, z_bit[5], p[14];
- u8 index1[] = {0, 2, 1, 3, 0, 1, 0, 3, 1, 0, 2, 1, 0, 1};
- u8 index2[] = {1, 3, 2, 4, 4, 3, 2, 4, 4, 3, 4, 3, 3, 2};
+ static const u8 index1[] = {0, 2, 1, 3, 0, 1, 0, 3, 1, 0, 2, 1, 0, 1};
+ static const u8 index2[] = {1, 3, 2, 4, 4, 3, 2, 4, 4, 3, 4, 3, 3, 2};
/* bits of p_low and p_high are control signals */
for (i = 0; i < 9; i++)
diff --git a/firmware/bluetooth_rxtx/ubertooth_usb.c b/firmware/bluetooth_rxtx/ubertooth_usb.c
index 993655b..7191f83 100644
--- a/firmware/bluetooth_rxtx/ubertooth_usb.c
+++ b/firmware/bluetooth_rxtx/ubertooth_usb.c
@@ -77,7 +77,7 @@
* atomicity of the operations on head and tail.
*/
-const u8 abDescriptors[] = {
+static const u8 abDescriptors[] = {
/* Device descriptor */
0x12,