-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.c
41 lines (35 loc) · 1.01 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
******************************************************************************
* @file : main.c
* @author : Rohit Nimkar <nehalnimkar@gmail.com> <https://csrohit.github.io>
* @brief : Main program body
******************************************************************************
* @attention
*
* This software component is licensed by Rohit Nimkar under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
#include <stdint.h>
#include <stdio.h>
#include <stm32f1xx.h>
#include <timer.h>
#include <uart.h>
char msg[28];
int main(void)
{
USART1_init(115200U);
int ret = SysTick_Config(8000000/1000);
if (ret < 0)
while (1)
;
while (1)
{
// sprintf(msg, "Time elapsed: %lu ms\r\n", msTicks);
USART1_puts(msg);
delay(5000U);
}
}