Skip to content

Commit 341157c

Browse files
committed
altos: Use new ao_spi_speed inline to set SPI speeds using spec'd frequencies
Instead of hand-adjusting SPI speeds for each driver and product based on processor supported rates, create an inline function that takes the maximum frequency supported by the device and maps that to a value supported by the SoC. This ensures that we don't accidentally drive devices faster than they want (as could happen with AO_SPI_SPEED_FAST), but do go as fast as possible in every configuration. Using an inline function means the value is computed at compile time. Signed-off-by: Keith Packard <[email protected]>
1 parent 2021662 commit 341157c

File tree

40 files changed

+88
-86
lines changed

40 files changed

+88
-86
lines changed

src/drivers/ao_adxl375.c

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#define PRINTD(l,...)
2727
#endif
2828

29+
#define AO_ADXL375_SPI_SPEED ao_spi_speed(5000000)
30+
2931
struct ao_adxl375_sample ao_adxl375_current;
3032

3133
static void

src/drivers/ao_bmx160.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ static uint8_t ao_bmx160_configured;
2424

2525
static struct ao_bmm150_trim ao_bmm150_trim;
2626

27-
#define ao_bmx160_spi_get() ao_spi_get(AO_BMX160_SPI_BUS, AO_SPI_SPEED_8MHz)
27+
#define AO_BMX160_SPI_SPEED ao_spi_speed(10000000)
28+
29+
#define ao_bmx160_spi_get() ao_spi_get(AO_BMX160_SPI_BUS, AO_BMX160_SPI_SPEED)
2830
#define ao_bmx160_spi_put() ao_spi_put(AO_BMX160_SPI_BUS)
2931

3032
#define ao_bmx160_spi_start() ao_spi_set_cs(AO_BMX160_SPI_CS_PORT, \

src/drivers/ao_cc1120.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ extern const uint32_t ao_radio_cal;
4242

4343
#define FOSC 32000000
4444

45-
#define ao_radio_try_select(task_id) ao_spi_try_get_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS,AO_SPI_SPEED_4MHz, task_id)
46-
#define ao_radio_select() ao_spi_get_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS,AO_SPI_SPEED_4MHz)
45+
#define AO_CC1120_SPI_SPEED ao_spi_speed(6100000) /* 6.1MHz max with 32MHz osc */
46+
47+
#define ao_radio_try_select(task_id) ao_spi_try_get_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS,AO_CC1120_SPI_SPEED, task_id)
48+
#define ao_radio_select() ao_spi_get_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS,AO_CC1120_SPI_SPEED)
4749
#define ao_radio_deselect() ao_spi_put_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS)
4850
#define ao_radio_spi_start_bytes() ao_spi_start_bytes(AO_CC1120_SPI_BUS)
4951
#define ao_radio_spi_stop_bytes() ao_spi_stop_bytes(AO_CC1120_SPI_BUS)

src/drivers/ao_cc115l.c

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ static uint8_t ao_radio_abort; /* radio operation should abort */
3939

4040
#define FOSC 26000000
4141

42+
#define AO_CC115L_SPI_SPEED ao_spi_speed(6500000) /* for back-to-back access */
43+
4244
#define ao_radio_select() ao_spi_get_mask(AO_CC115L_SPI_CS_PORT,(1 << AO_CC115L_SPI_CS_PIN),AO_CC115L_SPI_BUS,AO_CC115L_SPI_SPEED)
4345
#define ao_radio_deselect() ao_spi_put_mask(AO_CC115L_SPI_CS_PORT,(1 << AO_CC115L_SPI_CS_PIN),AO_CC115L_SPI_BUS)
4446
#define ao_radio_spi_send(d,l) ao_spi_send((d), (l), AO_CC115L_SPI_BUS)

src/drivers/ao_cc1200.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ extern const uint32_t ao_radio_cal;
5151
#define FOSC 40000000
5252
#endif
5353

54-
#ifndef AO_CC1200_SPI_SPEED
55-
#error AO_CC1200_SPI_SPEED undefined
56-
#endif
54+
#define AO_CC1200_SPI_SPEED ao_spi_speed(7700000) /* 7.7MHz max for extended memory reads */
5755

5856
#define ao_radio_select() ao_spi_get_mask(AO_CC1200_SPI_CS_PORT,(1 << AO_CC1200_SPI_CS_PIN),AO_CC1200_SPI_BUS,AO_CC1200_SPI_SPEED)
5957
#define ao_radio_deselect() ao_spi_put_mask(AO_CC1200_SPI_CS_PORT,(1 << AO_CC1200_SPI_CS_PIN),AO_CC1200_SPI_BUS)

src/drivers/ao_companion.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
#error HAS_COMPANION not set in ao_companion.c
2929
#endif
3030

31+
#define AO_COMPANION_SPI_SPEED ao_spi_speed(200000)
32+
3133
#define COMPANION_SELECT() do { \
3234
ao_spi_get_bit(AO_COMPANION_CS_PORT, \
3335
AO_COMPANION_CS_PIN, \
3436
AO_COMPANION_SPI_BUS, \
35-
AO_SPI_SPEED_200kHz); \
37+
AO_COMPANION_SPI_SPEED); \
3638
} while (0)
3739

3840
#define COMPANION_DESELECT() do { \

src/drivers/ao_m25.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ static uint8_t ao_m25_mutex;
101101

102102
static uint8_t ao_m25_instruction[4];
103103

104-
#define M25_SELECT(cs) ao_spi_get_mask(AO_M25_SPI_CS_PORT,cs,AO_M25_SPI_BUS, AO_SPI_SPEED_FAST)
104+
#define AO_M25_SPI_SPEED ao_spi_speed(10000000) /* this seems like a reasonable minimum speed to require */
105+
106+
#define M25_SELECT(cs) ao_spi_get_mask(AO_M25_SPI_CS_PORT,cs,AO_M25_SPI_BUS,AO_M25_SPI_SPEED)
105107
#define M25_DESELECT(cs) ao_spi_put_mask(AO_M25_SPI_CS_PORT,cs,AO_M25_SPI_BUS)
106108

107109
#define M25_BLOCK_SHIFT 16

src/drivers/ao_mma655x.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
#define PRINTD(l,...)
3131
#endif
3232

33+
#define AO_MMA655X_SPI_SPEED ao_spi_speed(8333333) /* 120ns clock period */
34+
3335
static void
3436
ao_mma655x_start(void) {
3537
ao_spi_get_bit(AO_MMA655X_CS_PORT,
3638
AO_MMA655X_CS_PIN,
3739
AO_MMA655X_SPI_INDEX,
38-
AO_SPI_SPEED_FAST);
40+
AO_MMA655X_SPI_SPEED);
3941
}
4042

4143
static void

src/drivers/ao_mpu6000.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ static uint8_t ao_mpu6000_configured;
3232

3333
#if AO_MPU6000_SPI
3434

35-
#define ao_mpu6000_spi_get() ao_spi_get(AO_MPU6000_SPI_BUS, AO_SPI_SPEED_1MHz)
35+
#define AO_MPU6000_SPI_SPEED ao_spi_speed(1000000) /* 1Mhz for all register access */
36+
37+
#define ao_mpu6000_spi_get() ao_spi_get(AO_MPU6000_SPI_BUS, AO_MPU6000_SPI_SPEED)
3638
#define ao_mpu6000_spi_put() ao_spi_put(AO_MPU6000_SPI_BUS)
3739

3840
#define ao_mpu6000_spi_start() ao_spi_set_cs(AO_MPU6000_SPI_CS_PORT, \
@@ -383,7 +385,7 @@ ao_mpu6000_init(void)
383385
*/
384386

385387
ao_cur_task = &ao_mpu6000_task;
386-
ao_spi_get(AO_MPU6000_SPI_BUS, AO_SPI_SPEED_1MHz);
388+
ao_mpu6000_spi_get();
387389
ao_cur_task = NULL;
388390
#endif
389391

src/drivers/ao_mpu9250.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static uint8_t ao_mpu9250_configured;
3535
#if AO_MPU9250_SPI
3636

3737
#ifndef AO_MPU9250_SPI_SPEED
38-
#define AO_MPU9250_SPI_SPEED AO_SPI_SPEED_1MHz
38+
#define AO_MPU9250_SPI_SPEED ao_spi_speed(1000000) /* 1MHz max SCLK */
3939
#endif
4040

4141
#define ao_mpu9250_spi_get() ao_spi_get(AO_MPU9250_SPI_BUS, AO_MPU9250_SPI_SPEED)

src/drivers/ao_ms5607.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
struct ao_ms5607_prom ao_ms5607_prom;
2626
static uint8_t ms5607_configured;
2727

28-
#ifndef AO_MS5607_SPI_SPEED
29-
#define AO_MS5607_SPI_SPEED AO_SPI_SPEED_FAST
30-
#endif
28+
#define AO_MS5607_SPI_SPEED ao_spi_speed(20000000)
3129

3230
static void
3331
ao_ms5607_start(void) {

src/easymega-v2.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ struct ao_adc {
324324
#define AO_ADXL375_SPI_INDEX (AO_SPI_1_PB3_PB4_PB5 | AO_SPI_MODE_3)
325325
#define AO_ADXL375_CS_PORT (&stm_gpioc)
326326
#define AO_ADXL375_CS_PIN 12
327-
#define AO_ADXL375_SPI_SPEED AO_SPI_SPEED_4MHz
328327

329328
#define AO_ADXL375_INT1_PORT (&stm_gpiob)
330329
#define AO_ADXL375_INT1_PIN 8

src/easymega-v3.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ struct ao_adc {
324324
#define AO_ADXL375_SPI_INDEX (AO_SPI_1_PB3_PB4_PB5 | AO_SPI_MODE_3)
325325
#define AO_ADXL375_CS_PORT (&stm_gpioc)
326326
#define AO_ADXL375_CS_PIN 12
327-
#define AO_ADXL375_SPI_SPEED AO_SPI_SPEED_4MHz
328327

329328
#define AO_ADXL375_INT1_PORT (&stm_gpiob)
330329
#define AO_ADXL375_INT1_PIN 8

src/easymini-v2.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
#define AO_MS5607_MISO_PIN 6
9494
#define AO_MS5607_MISO_MASK (1 << AO_MS5607_MISO_PIN)
9595
#define AO_MS5607_SPI_INDEX AO_SPI_1_PA5_PA6_PA7
96-
#define AO_MS5607_SPI_SPEED AO_SPI_SPEED_12MHz
9796

9897
#define AO_DATA_RING 64
9998

src/lpc/ao_arch.h

+22-12
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,28 @@ ao_serial_init(void);
103103

104104
/* SPI definitions */
105105

106-
#define AO_SPI_SPEED_12MHz 4
107-
#define AO_SPI_SPEED_8MHz 6
108-
#define AO_SPI_SPEED_6MHz 8
109-
#define AO_SPI_SPEED_4MHz 12
110-
#define AO_SPI_SPEED_2MHz 24
111-
#define AO_SPI_SPEED_1MHz 48
112-
#define AO_SPI_SPEED_500kHz 96
113-
#define AO_SPI_SPEED_250kHz 192
114-
#define AO_SPI_SPEED_125kHz 384
115-
#define AO_SPI_SPEED_62500Hz 768
116-
117-
#define AO_SPI_SPEED_FAST AO_SPI_SPEED_12MHz
106+
#define _AO_SPI_SPEED_12MHz 4
107+
#define _AO_SPI_SPEED_8MHz 6
108+
#define _AO_SPI_SPEED_6MHz 8
109+
#define _AO_SPI_SPEED_4MHz 12
110+
#define _AO_SPI_SPEED_2MHz 24
111+
#define _AO_SPI_SPEED_1MHz 48
112+
#define _AO_SPI_SPEED_500kHz 96
113+
#define _AO_SPI_SPEED_250kHz 192
114+
#define _AO_SPI_SPEED_125kHz 384
115+
#define _AO_SPI_SPEED_62500Hz 768
116+
117+
static inline uint32_t
118+
ao_spi_speed(uint32_t hz)
119+
{
120+
if (hz >= 4000000) return _AO_SPI_SPEED_4MHz;
121+
if (hz >= 2000000) return _AO_SPI_SPEED_2MHz;
122+
if (hz >= 1000000) return _AO_SPI_SPEED_1MHz;
123+
if (hz >= 500000) return _AO_SPI_SPEED_500kHz;
124+
if (hz >= 250000) return _AO_SPI_SPEED_250kHz;
125+
if (hz >= 125000) return _AO_SPI_SPEED_125kHz;
126+
return _AO_SPI_SPEED_62500Hz;
127+
}
118128

119129
#define AO_BOOT_APPLICATION_BASE ((uint32_t *) 0x00001000)
120130
#define AO_BOOT_APPLICATION_BOUND ((uint32_t *) (0x00000000 + 32 * 1024))

src/stm/ao_arch_funcs.h

+19-15
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,26 @@
2424

2525
/* PCLK is set to 16MHz (HCLK 32MHz, APB prescaler 2) */
2626

27-
#define AO_SPI_SPEED_8MHz STM_SPI_CR1_BR_PCLK_2
28-
#define AO_SPI_SPEED_4MHz STM_SPI_CR1_BR_PCLK_4
29-
#define AO_SPI_SPEED_2MHz STM_SPI_CR1_BR_PCLK_8
30-
#define AO_SPI_SPEED_1MHz STM_SPI_CR1_BR_PCLK_16
31-
#define AO_SPI_SPEED_500kHz STM_SPI_CR1_BR_PCLK_32
32-
#define AO_SPI_SPEED_250kHz STM_SPI_CR1_BR_PCLK_64
33-
#define AO_SPI_SPEED_125kHz STM_SPI_CR1_BR_PCLK_128
34-
#define AO_SPI_SPEED_62500Hz STM_SPI_CR1_BR_PCLK_256
27+
//#define AO_SPI_SPEED_8MHz STM_SPI_CR1_BR_PCLK_2 /* too fast to use safely */
28+
#define _AO_SPI_SPEED_4MHz STM_SPI_CR1_BR_PCLK_4
29+
#define _AO_SPI_SPEED_2MHz STM_SPI_CR1_BR_PCLK_8
30+
#define _AO_SPI_SPEED_1MHz STM_SPI_CR1_BR_PCLK_16
31+
#define _AO_SPI_SPEED_500kHz STM_SPI_CR1_BR_PCLK_32
32+
#define _AO_SPI_SPEED_250kHz STM_SPI_CR1_BR_PCLK_64
33+
#define _AO_SPI_SPEED_125kHz STM_SPI_CR1_BR_PCLK_128
34+
#define _AO_SPI_SPEED_62500Hz STM_SPI_CR1_BR_PCLK_256
3535

36-
#define AO_SPI_SPEED_FAST AO_SPI_SPEED_8MHz
37-
38-
/* Companion bus wants something no faster than 200kHz */
39-
40-
#define AO_SPI_SPEED_200kHz AO_SPI_SPEED_125kHz
36+
static inline uint32_t
37+
ao_spi_speed(uint32_t hz)
38+
{
39+
if (hz >= 4000000) return _AO_SPI_SPEED_4MHz;
40+
if (hz >= 2000000) return _AO_SPI_SPEED_2MHz;
41+
if (hz >= 1000000) return _AO_SPI_SPEED_1MHz;
42+
if (hz >= 500000) return _AO_SPI_SPEED_500kHz;
43+
if (hz >= 250000) return _AO_SPI_SPEED_250kHz;
44+
if (hz >= 125000) return _AO_SPI_SPEED_125kHz;
45+
return _AO_SPI_SPEED_62500Hz;
46+
}
4147

4248
#define AO_SPI_CPOL_BIT 4
4349
#define AO_SPI_CPHA_BIT 5
@@ -151,8 +157,6 @@ ao_spi_recv(void *block, uint16_t len, uint8_t spi_index);
151157
void
152158
ao_spi_duplex(const void *out, void *in, uint16_t len, uint8_t spi_index);
153159

154-
extern uint16_t ao_spi_speed[STM_NUM_SPI];
155-
156160
void
157161
ao_spi_init(void);
158162

src/stmf0/ao_arch_funcs.h

+20-15
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,27 @@
2626

2727
/* PCLK is set to 48MHz (HCLK 48MHz, HPRE 1, PPRE 1) */
2828

29-
#define AO_SPI_SPEED_24MHz STM_SPI_CR1_BR_PCLK_2
30-
#define AO_SPI_SPEED_12MHz STM_SPI_CR1_BR_PCLK_4
31-
#define AO_SPI_SPEED_6MHz STM_SPI_CR1_BR_PCLK_8
32-
#define AO_SPI_SPEED_3MHz STM_SPI_CR1_BR_PCLK_16
33-
#define AO_SPI_SPEED_1500kHz STM_SPI_CR1_BR_PCLK_32
34-
#define AO_SPI_SPEED_750kHz STM_SPI_CR1_BR_PCLK_64
35-
#define AO_SPI_SPEED_375kHz STM_SPI_CR1_BR_PCLK_128
36-
#define AO_SPI_SPEED_187500Hz STM_SPI_CR1_BR_PCLK_256
29+
#define _AO_SPI_SPEED_24MHz STM_SPI_CR1_BR_PCLK_2
30+
#define _AO_SPI_SPEED_12MHz STM_SPI_CR1_BR_PCLK_4
31+
#define _AO_SPI_SPEED_6MHz STM_SPI_CR1_BR_PCLK_8
32+
#define _AO_SPI_SPEED_3MHz STM_SPI_CR1_BR_PCLK_16
33+
#define _AO_SPI_SPEED_1500kHz STM_SPI_CR1_BR_PCLK_32
34+
#define _AO_SPI_SPEED_750kHz STM_SPI_CR1_BR_PCLK_64
35+
#define _AO_SPI_SPEED_375kHz STM_SPI_CR1_BR_PCLK_128
36+
#define _AO_SPI_SPEED_187500Hz STM_SPI_CR1_BR_PCLK_256
3737

38-
#define AO_SPI_SPEED_FAST AO_SPI_SPEED_24MHz
39-
40-
/* Companion bus wants something no faster than 200kHz */
41-
42-
#define AO_SPI_SPEED_200kHz AO_SPI_SPEED_187500Hz
38+
static inline uint32_t
39+
ao_spi_speed(uint32_t hz)
40+
{
41+
if (hz >=24000000) return _AO_SPI_SPEED_24MHz;
42+
if (hz >=12000000) return _AO_SPI_SPEED_12MHz;
43+
if (hz >= 6000000) return _AO_SPI_SPEED_6MHz;
44+
if (hz >= 3000000) return _AO_SPI_SPEED_3MHz;
45+
if (hz >= 1500000) return _AO_SPI_SPEED_1500kHz;
46+
if (hz >= 750000) return _AO_SPI_SPEED_750kHz;
47+
if (hz >= 375000) return _AO_SPI_SPEED_375kHz;
48+
return _AO_SPI_SPEED_187500Hz;
49+
}
4350

4451
#define AO_SPI_CONFIG_1 0x00
4552
#define AO_SPI_1_CONFIG_PA5_PA6_PA7 AO_SPI_CONFIG_1
@@ -141,8 +148,6 @@ ao_spi_recv(void *block, uint16_t len, uint8_t spi_index);
141148
void
142149
ao_spi_duplex(void *out, void *in, uint16_t len, uint8_t spi_index);
143150

144-
extern uint16_t ao_spi_speed[STM_NUM_SPI];
145-
146151
void
147152
ao_spi_init(void);
148153

src/telebt-v3.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ struct ao_adc {
198198
#define AO_CC1200_SPI_CS_PIN 10
199199
#define AO_CC1200_SPI_BUS AO_SPI_1_PA5_PA6_PA7
200200
#define AO_CC1200_SPI stm_spi1
201-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
202201

203202
#define AO_CC1200_INT_PORT (&stm_gpiob)
204203
#define AO_CC1200_INT_PIN (11)

src/telebt-v4.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ struct ao_adc {
272272
#define AO_CC1200_SPI_CS_PIN 11
273273
#define AO_CC1200_SPI_BUS AO_SPI_1_PA5_PA6_PA7
274274
#define AO_CC1200_SPI stm_spi1
275-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_6MHz
276275

277276
#define AO_CC1200_INT_PORT (&stm_gpiob)
278277
#define AO_CC1200_INT_PIN (10)

src/teledongle-v3.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
#define AO_CC1200_SPI_CS_PIN 3
9797
#define AO_CC1200_SPI_BUS 0
9898
#define AO_CC1200_SPI 0
99-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_8MHz
10099

101100
#define AO_CC1200_INT_PORT 0
102101
#define AO_CC1200_INT_PIN 2

src/telefireeight-v1.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
#define AO_CC1200_SPI_CS_PIN 11
104104
#define AO_CC1200_SPI_BUS AO_SPI_1_PE13_PE14_PE15
105105
#define AO_CC1200_SPI stm_spi1
106-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
107106

108107
#define AO_CC1200_INT_PORT (&stm_gpioe)
109108
#define AO_CC1200_INT_PIN (12)

src/telefireeight-v2.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
#define AO_CC1200_SPI_CS_PIN 11
8989
#define AO_CC1200_SPI_BUS AO_SPI_1_PE13_PE14_PE15
9090
#define AO_CC1200_SPI stm_spi1
91-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
9291

9392
#define AO_CC1200_INT_PORT (&stm_gpioe)
9493
#define AO_CC1200_INT_PIN (12)

src/telefireone-v1.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
#define AO_CC1200_SPI_CS_PIN 7
124124
#define AO_CC1200_SPI_BUS AO_SPI_2_PB13_PB14_PB15
125125
#define AO_CC1200_SPI stm_spi2
126-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
127126

128127
#define AO_CC1200_INT_PORT (&stm_gpiob)
129128
#define AO_CC1200_INT_PIN (11)

src/telefireone-v2.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@
145145
#define AO_CC1200_SPI_CS_PIN 3
146146
#define AO_CC1200_SPI_BUS AO_SPI_2_PB13_PB14_PB15
147147
#define AO_CC1200_SPI stm_spi2
148-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
149148

150149
#define AO_CC1200_INT_PORT (&stm_gpiob)
151150
#define AO_CC1200_INT_PIN (11)

src/telefiretwo-v0.1/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
#define AO_CC1200_SPI_CS_PIN 7
111111
#define AO_CC1200_SPI_BUS AO_SPI_2_PB13_PB14_PB15
112112
#define AO_CC1200_SPI stm_spi2
113-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
114113

115114
#define AO_CC1200_INT_PORT (&stm_gpiob)
116115
#define AO_CC1200_INT_PIN (11)

src/telefiretwo-v0.2/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
#define AO_CC1200_SPI_CS_PIN 7
112112
#define AO_CC1200_SPI_BUS AO_SPI_2_PB13_PB14_PB15
113113
#define AO_CC1200_SPI stm_spi2
114-
#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_FAST
115114

116115
#define AO_CC1200_INT_PORT (&stm_gpiob)
117116
#define AO_CC1200_INT_PIN (11)

src/telegps-v0.1/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@
148148
#define AO_CC115L_SPI_CS_PIN 12
149149
#define AO_CC115L_SPI_BUS AO_SPI_2_PB13_PB14_PB15
150150
#define AO_CC115L_SPI stm_spi2
151-
#define AO_CC115L_SPI_SPEED AO_SPI_SPEED_4MHz
152151

153152
#define AO_CC115L_FIFO_INT_GPIO_IOCFG CC115L_IOCFG2
154153
#define AO_CC115L_FIFO_INT_PORT (&stm_gpioa)

src/telegps-v0.3/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
#define AO_CC115L_SPI_CS_PORT 0
9797
#define AO_CC115L_SPI_CS_PIN 3
9898
#define AO_CC115L_SPI_BUS 0
99-
#define AO_CC115L_SPI_SPEED AO_SPI_SPEED_6MHz
10099

101100
#define AO_CC115L_FIFO_INT_GPIO_IOCFG CC115L_IOCFG2
102101
#define AO_CC115L_FIFO_INT_PORT 0

src/telegps-v1.0/ao_pins.h

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
#define AO_CC115L_SPI_CS_PORT 0
9999
#define AO_CC115L_SPI_CS_PIN 3
100100
#define AO_CC115L_SPI_BUS 0
101-
#define AO_CC115L_SPI_SPEED AO_SPI_SPEED_6MHz
102101

103102
#define AO_CC115L_FIFO_INT_GPIO_IOCFG CC115L_IOCFG2
104103
#define AO_CC115L_FIFO_INT_PORT 0

0 commit comments

Comments
 (0)