Commit c31cb6d09aa0cd302efd527a160322980d14b97b

Con Kolivas 2014-01-09T08:41:24

Hard code the osc6 programmed on nanofury for now.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/libbitfury.c b/libbitfury.c
index 753f681..a7c2902 100644
--- a/libbitfury.c
+++ b/libbitfury.c
@@ -163,10 +163,8 @@ void spi_config_reg(struct bitfury_info *info, int cfgreg, int ena)
 
 void spi_set_freq(struct bitfury_info *info)
 {
-	uint64_t freq;
-	const uint8_t *osc6 = (unsigned char *)&freq;
+	unsigned char osc6[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00 };
 
-	freq = (1ULL << info->osc6_bits) - 1ULL;
 	spi_add_data(info, 0x6000, osc6, 8); /* Program internal on-die slow oscillator frequency */
 }