22 lines
448 B
C++
Executable File
22 lines
448 B
C++
Executable File
#include "bsp.h"
|
|
#include "prepherials.h"
|
|
#include <stdio.h>
|
|
|
|
extern "C" {
|
|
int __io_putchar(int ch) { return usart1.send((uint8_t *) &ch, 1); }
|
|
}
|
|
|
|
int main() {
|
|
system_init();
|
|
setup_prepherials();
|
|
pa.init(USART1_TX_Pin, AF, 7);
|
|
pa.init(USART1_RX_Pin, AF, 7);
|
|
usart1.init(int(1e6));
|
|
pb.init(LED_BLUE_PIN);
|
|
while (1) {
|
|
pb.toggle(LED_BLUE_PIN);
|
|
printf("hello world!\n");
|
|
delay.ms(500, true);
|
|
}
|
|
}
|