@@ -16,6 +16,61 @@ https://github.com/stm32duino/Arduino_Core_STM32/wiki/STM32duinoBLE#stm32duinobl
1616For more information about ArduinoBLE library please visit the official web page at:
1717https://www.arduino.cc/en/Reference/ArduinoBLE
1818
19+ # Configuration
20+
21+ ### Shield
22+
23+ The user can include the file ` ble_spi_conf.h ` to define which shield and configuration to use from the following list:
24+
25+ * [ X-NUCLEO-IDB05A2] ( https://www.st.com/en/ecosystems/x-nucleo-idb05a2.html )
26+ * ` IDB05A2_SPI_CLOCK_D3 ` : SPI clock on D3
27+ * ` IDB05A2_SPI_CLOCK_D13 ` SPI clock on D13
28+ * [ X-NUCLEO-IDB05A1] ( https://www.st.com/en/ecosystems/x-nucleo-idb05a1.html )
29+ * ` IDB05A1_SPI_CLOCK_D3 ` : SPI clock on D3
30+ * ` IDB05A1_SPI_CLOCK_D13 ` : SPI clock on D13
31+ * [ X-NUCLEO-BNRG2A1] ( https://www.st.com/en/ecosystems/x-nucleo-bnrg2a1.html )
32+ * ` BNRG2A1_CLOCK_D3 ` : SPI clock on D3
33+ * ` BNRG2A1_CLOCK_D13 ` : SPI clock on D13
34+ * ` CUSTOM_BLE_SPI ` : define a custom configuration, it requires below definition:
35+ * ` BLE_SPI_MISO ` : SPI MISO pin
36+ * ` BLE_SPI_MOSI ` : SPI MOSI pin
37+ * ` BLE_SPI_CLK ` : SPI CLocK pin
38+ * ` BLE_SPI_CS ` : SPI Chip Select pin
39+ * ` BLE_SPI_IRQ ` : SPI IRQ pin
40+ * ` BLE_SPI_FREQ ` : SPI bus frequency
41+ * ` BLE_SPI_MODE ` : can be one of the below ` SPIMode ` :
42+ * ` SPI_MODE0 `
43+ * ` SPI_MODE1 `
44+ * ` SPI_MODE2 `
45+ * ` SPI_MODE0 `
46+ * ` BLE_CHIP_TYPE ` : can be one of the below ` BLEChip_t ` :
47+ * ` SPBTLE_RF `
48+ * ` SPBTLE_1S `
49+ * ` BLUENRG_M2SP `
50+ * ` BLUENRG_M0 `
51+ * ` BLUENRG_LP `
52+ * ` BLE_RESET ` : BLE reset pin
53+
54+ #### Examples
55+
56+ To use the [ X-NUCLEO-IDB05A2] ( https://www.st.com/en/ecosystems/x-nucleo-idb05a2.html ) with SPI clock on D3, define in ` ble_spi_conf.h ` :
57+ ``` C
58+ #define IDB05A2_SPI_CLOCK_D3
59+ ```
60+ This is equivalent to the below configuration using the ` CUSTOM_BLE_SPI ` :
61+ ``` C
62+ #define CUSTOM_BLE_SPI
63+ #define BLE_SPI_MISO D12
64+ #define BLE_SPI_MOSI D11
65+ #define BLE_SPI_CLK D3
66+ #define BLE_SPI_CS A1
67+ #define BLE_SPI_IRQ A0
68+ #define BLE_SPI_FREQ 8000000
69+ #define BLE_SPI_MODE SPI_MODE0
70+ #define BLE_CHIP_TYPE BLUENRG_M0
71+ #define BLE_RESET D7
72+ ```
73+
1974## License
2075
2176```
0 commit comments