| BlueNRG-1 SDK drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

SDK_EVAL_Config.c
Go to the documentation of this file.
1
24 /* Includes ------------------------------------------------------------------*/
25 #include "BlueNRG1.h"
26 #include "BlueNRG1_conf.h"
27 #include "SDK_EVAL_Config.h"
28
68 static volatile uint8_t s_SdkEvalVersion = ID_UNKNOWN;
69
70 #if USER_DEFINED_PLATFORM == STEVAL_IDB007VX
71
75 const uint32_t s_vectnButtonPinVersion[SDK_PLATFORMS_NUMBER][EVAL_BOARD_BUTTONS] = {{GPIO_Pin_13, GPIO_Pin_5}};
76
77
81 const uint32_t s_UartTxPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_8};
82 const uint32_t s_UartTxModeVersion[SDK_PLATFORMS_NUMBER] = {Serial1_Mode};
83 const uint32_t s_UartRxPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_11};
84 const uint32_t s_UartRxModeVersion[SDK_PLATFORMS_NUMBER] = {Serial1_Mode};
85
86
90 const I2C_Type* s_I2cPeripheralVersion[SDK_PLATFORMS_NUMBER] = {I2C2};
91 const uint32_t s_I2cDataPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_5};
92 const uint32_t s_I2cDataModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
93 const uint32_t s_I2cClkPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_4};
94 const uint32_t s_I2cClkPinModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
95
96 const DMA_CH_Type* s_I2cDataDmaTxVersion[SDK_PLATFORMS_NUMBER] = {DMA_CH7};
97 const uint32_t s_I2cDataDmaRxTcVersion[SDK_PLATFORMS_NUMBER] = {DMA_FLAG_TC6};
98
99 const DMA_CH_Type* s_I2cDataDmaRxVersion[SDK_PLATFORMS_NUMBER] = {DMA_CH6};
100 const uint32_t s_I2cDataDmaTxTcVersion[SDK_PLATFORMS_NUMBER] = {DMA_FLAG_TC7};
101
102 const uint32_t s_I2CBaseVersion[SDK_PLATFORMS_NUMBER] = {I2C2_BASE};
103
107 const uint32_t s_vectnGpioPinVersion[SDK_PLATFORMS_NUMBER][EVAL_BOARD_LEDS] = {{GPIO_Pin_6, GPIO_Pin_7, GPIO_Pin_14}};
108
109
110
114 const uint32_t s_SpiCs1PinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_1};
115 const uint32_t s_SpiCs1ModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
116 const uint32_t s_SpiCs2PinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_11};
117 const uint32_t s_SpiCs2ModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
118 const uint32_t s_SpiMosiPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_2};
119 const uint32_t s_SpiMosiModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
120 const uint32_t s_SpiMisoPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_3};
121 const uint32_t s_SpiMisoModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
122 const uint32_t s_SpiSclkPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_0};
123 const uint32_t s_SpiSclkModeVersion[SDK_PLATFORMS_NUMBER] = {Serial0_Mode};
124
128 const uint32_t s_SpiIrqSensorPinVersion[SDK_PLATFORMS_NUMBER] = {GPIO_Pin_12};
129
130 #endif /* #ifndef USER_DEFINED_PLATFORM */
131
157 void SdkEvalIdentification(void)
158 {
159 #if USER_DEFINED_PLATFORM == STEVAL_IDB007VX
160
161 /* Try to understand if it is possible to have information about the board */
162 s_SdkEvalVersion = ID_STEVAL_IDB007V1;
163
164 #elif USER_DEFINED_PLATFORM == STEVAL_IDB007V1
165 s_SdkEvalVersion = ID_STEVAL_IDB007V1;
166 #elif USER_DEFINED_PLATFORM == USER_EVAL_PLATFORM
167 s_SdkEvalVersion = ID_STEVAL_IDB007V1; /* user code */
168 #endif
169
170 } /* end SdkEvalIdentification() */
171
177 uint8_t SdkEvalGetVersion(void)
178 {
179 return s_SdkEvalVersion;
180 } /* end SdkEvalGetVersion() */
181
196 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/
s_I2cClkPinModeVersion
const uint32_t s_I2cClkPinModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:94
s_SpiMisoPinVersion
const uint32_t s_SpiMisoPinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:120
s_UartRxModeVersion
const uint32_t s_UartRxModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:84
SDK_EVAL_Config.h
This file contains SDK EVAL configuration and useful defines.
s_I2cDataDmaTxVersion
const DMA_CH_Type * s_I2cDataDmaTxVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:96
s_vectnGpioPinVersion
const uint32_t s_vectnGpioPinVersion[SDK_PLATFORMS_NUMBER][EVAL_BOARD_LEDS]
BlueNRG1 Eval Board (STEVAL-IDB007V1) LEDs definitions.
Definition: SDK_EVAL_Config.c:107
s_I2cPeripheralVersion
const I2C_Type * s_I2cPeripheralVersion[SDK_PLATFORMS_NUMBER]
BlueNRG1 Eval Board (STEVAL-IDB007V1) I2C definitions.
Definition: SDK_EVAL_Config.c:90
s_vectnButtonPinVersion
const uint32_t s_vectnButtonPinVersion[SDK_PLATFORMS_NUMBER][EVAL_BOARD_BUTTONS]
BlueNRG1 Eval Board (STEVAL-IDB007V1) Buttons definitions.
Definition: SDK_EVAL_Config.c:75
ID_STEVAL_IDB007V1
Definition: SDK_EVAL_Config.h:118
s_SpiCs2PinVersion
const uint32_t s_SpiCs2PinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:116
s_I2cDataModeVersion
const uint32_t s_I2cDataModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:92
EVAL_BOARD_LEDS
#define EVAL_BOARD_LEDS
Definition: SDK_EVAL_Led.h:68
s_SpiMosiModeVersion
const uint32_t s_SpiMosiModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:119
s_SpiSclkModeVersion
const uint32_t s_SpiSclkModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:123
s_SpiIrqSensorPinVersion
const uint32_t s_SpiIrqSensorPinVersion[SDK_PLATFORMS_NUMBER]
BlueNRG1 Eval Board (STEVAL-IDB007V1) sensor IRQ definitions.
Definition: SDK_EVAL_Config.c:128
s_SpiCs2ModeVersion
const uint32_t s_SpiCs2ModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:117
s_I2cDataDmaTxTcVersion
const uint32_t s_I2cDataDmaTxTcVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:100
ID_UNKNOWN
Definition: SDK_EVAL_Config.h:117
s_I2CBaseVersion
const uint32_t s_I2CBaseVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:102
SDK_PLATFORMS_NUMBER
#define SDK_PLATFORMS_NUMBER
Definition: SDK_EVAL_Config.h:34
s_UartTxModeVersion
const uint32_t s_UartTxModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:82
SdkEvalGetVersion
uint8_t SdkEvalGetVersion(void)
Returns the version of the current BlueNRG1 platform.
Definition: SDK_EVAL_Config.c:177
EVAL_BOARD_BUTTONS
#define EVAL_BOARD_BUTTONS
Definition: SDK_EVAL_Button.h:77
s_I2cDataDmaRxTcVersion
const uint32_t s_I2cDataDmaRxTcVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:97
SdkEvalIdentification
void SdkEvalIdentification(void)
Identify the version of the current BlueNRG1 platform.
Definition: SDK_EVAL_Config.c:157
s_I2cClkPinVersion
const uint32_t s_I2cClkPinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:93
s_SpiCs1ModeVersion
const uint32_t s_SpiCs1ModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:115
s_I2cDataPinVersion
const uint32_t s_I2cDataPinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:91
s_SpiSclkPinVersion
const uint32_t s_SpiSclkPinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:122
s_SpiMosiPinVersion
const uint32_t s_SpiMosiPinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:118
s_UartTxPinVersion
const uint32_t s_UartTxPinVersion[SDK_PLATFORMS_NUMBER]
BlueNRG1 Eval Board (STEVAL-IDB007V1) UART definitions.
Definition: SDK_EVAL_Config.c:81
s_I2cDataDmaRxVersion
const DMA_CH_Type * s_I2cDataDmaRxVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:99
s_SpiMisoModeVersion
const uint32_t s_SpiMisoModeVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:121
s_SpiCs1PinVersion
const uint32_t s_SpiCs1PinVersion[SDK_PLATFORMS_NUMBER]
BlueNRG1 Eval Board (STEVAL-IDB007V1) SPI definitions.
Definition: SDK_EVAL_Config.c:114
s_UartRxPinVersion
const uint32_t s_UartRxPinVersion[SDK_PLATFORMS_NUMBER]
Definition: SDK_EVAL_Config.c:83