split config now
This commit is contained in:
26
semestralka1/src/main.cpp
Normal file
26
semestralka1/src/main.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// main.cpp
|
||||
|
||||
#include "mbed.h"
|
||||
#include "background_dark_inverted.h"
|
||||
#include "render/loop.h"
|
||||
|
||||
#define TARGET_TX_PIN USBTX
|
||||
#define TARGET_RX_PIN USBRX
|
||||
#define BAUD_RATE 460800
|
||||
|
||||
BufferedSerial serial_port(TARGET_TX_PIN, TARGET_RX_PIN, BAUD_RATE);
|
||||
|
||||
FileHandle *mbed::mbed_override_console(int fd)
|
||||
{
|
||||
return &serial_port;
|
||||
}
|
||||
|
||||
DigitalOut led(LED1);
|
||||
|
||||
int main(void) {
|
||||
serial_port.set_format(8, BufferedSerial::None, 1);
|
||||
printf("Baud: %d, Format: 8-N-1\r\n", BAUD_RATE);
|
||||
|
||||
// Just call into render feature
|
||||
render_loop();
|
||||
}
|
||||
Reference in New Issue
Block a user