| BlueNRG-1 Peripherals drivers Examples

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Micro_Hello_World_main.c
Go to the documentation of this file.
1
2 /******************** (C) COPYRIGHT 2016 STMicroelectronics ********************
3 * File Name : Micro_Hello_World_main.c
4 * Author : VMA DIVISION
5 * Version : 1.0.0
6 * Date : 2-October-2015
7 * Description : BlueNRG-1 Hello World example
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
137 /* Includes ------------------------------------------------------------------*/
138 #include "stdio.h"
139 #include "BlueNRG1.h"
140 #include "BlueNRG1_it.h"
141 #include "BlueNRG1_conf.h"
142 #include "SDK_EVAL_Config.h"
143
156 /* Private typedef -----------------------------------------------------------*/
157 /* Private define ------------------------------------------------------------*/
158 /* Private macro -------------------------------------------------------------*/
159 /* Private variables ---------------------------------------------------------*/
160 /* Private function prototypes -----------------------------------------------*/
161
162 /* Private functions ---------------------------------------------------------*/
163
164
170 int main(void)
171 {
172 uint32_t counter = 0;
173 /* System initialization function */
174 SystemInit();
175
176 /* Identify BlueNRG1 platform */
177 SdkEvalIdentification();
178
179 /* UART initialization */
180 SdkEvalComUartInit(UART_BAUDRATE);
181
182 /* infinite loop */
183 while(1)
184 {
185 if (counter == 0 )
186 printf("Hello World: BlueNRG-1 is here! \r\n");
187 counter = (counter +1) % 0xFFFFF;
188
189 }
190
191 }
192
193 #ifdef USE_FULL_ASSERT
194
201 void assert_failed(uint8_t* file, uint32_t line)
202 {
203 /* User can add his own implementation to report the file name and line number,
204 ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
205 /* Infinite loop */
206 while (1)
207 {
208 }
209 }
210
211 #endif
212
213
226 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/
main
int main(void)
Main program.
Definition: Micro_Hello_World_main.c:170
UART_BAUDRATE
#define UART_BAUDRATE
Definition: ADC_PDM_main.c:225