| BlueNRG-1 Peripherals drivers Examples

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

GPIO_InputInterrupt_main.c
Go to the documentation of this file.
1
2 /******************** (C) COPYRIGHT 2016 STMicroelectronics ********************
3 * File Name : GPIO_InputInterrupt_main.c
4 * Author : VMA DIVISION
5 * Version : 1.0.0
6 * Date : 21-September-2015
7 * Description : Code demostrating the GPIO interrupt functionality
8 ********************************************************************************
9 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
10 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
11 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
12 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
13 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
14 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
15 *******************************************************************************/
16
154 /* Includes ------------------------------------------------------------------*/
155 #include "BlueNRG1.h"
156 #include "BlueNRG1_conf.h"
157 #include "SDK_EVAL_Config.h"
158
171 /* Private typedef -----------------------------------------------------------*/
172 /* Private define ------------------------------------------------------------*/
173 /* Private macro -------------------------------------------------------------*/
174 /* Private variables ---------------------------------------------------------*/
175 /* Private function prototypes -----------------------------------------------*/
176 /* Private functions ---------------------------------------------------------*/
177
183 int main(void)
184 {
185 /* System initialization function */
186 SystemInit();
187
188 /* Identify BlueNRG1 platform */
189 SdkEvalIdentification();
190
191 /* LEDS initialization */
192 SdkEvalLedInit(LED1);
193 SdkEvalLedInit(LED2);
194
195 /* BUTTON_1 initialization */
196 SdkEvalPushButtonInit(BUTTON_1);
197 SdkEvalPushButtonIrq(BUTTON_1, IRQ_ON_BOTH_EDGE);
198
199 /* BUTTON_2 initialization */
200 SdkEvalPushButtonInit(BUTTON_2);
201 SdkEvalPushButtonIrq(BUTTON_2, IRQ_ON_RISING_EDGE);
202
203 /* Infinite loop */
204 while(1);
205 }
206
207
208
209 #ifdef USE_FULL_ASSERT
210
217 void assert_failed(uint8_t* file, uint32_t line)
218 {
219 /* User can add his own implementation to report the file name and line number,
220 ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
221
222 /* Infinite loop */
223 while (1)
224 {
225 }
226 }
227
228 #endif
229
243 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/
main
int main(void)
Main program code.
Definition: GPIO_InputInterrupt_main.c:183