mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 17:41:54 +08:00
adds abstraction for connection (#111)
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "usb/mouse-relative-stm32.h"
|
||||
#include "backup-register.h"
|
||||
#include "board-stm32.h"
|
||||
#include "serial.h"
|
||||
|
||||
#ifndef __STM32F1__
|
||||
# error "Only STM32F1 is supported"
|
||||
@@ -82,4 +83,12 @@ namespace DRIVERS {
|
||||
return new Board(DRIVERS::DUMMY);
|
||||
}
|
||||
}
|
||||
|
||||
Connection* Factory::makeConnection(type _type) {
|
||||
# ifdef CMD_SERIAL
|
||||
return new Serial();
|
||||
# else
|
||||
# error CMD phy is not defined
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user