mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 01:51:53 +08:00
add interface for storage (#99)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "usb/hid.h"
|
||||
#include "ps2/hid.h"
|
||||
#include "factory.h"
|
||||
#include "eeprom.h"
|
||||
|
||||
|
||||
namespace DRIVERS {
|
||||
@@ -56,4 +57,16 @@ namespace DRIVERS {
|
||||
return new Mouse(DRIVERS::DUMMY);
|
||||
}
|
||||
}
|
||||
Storage* Factory::makeStorage(type _type) {
|
||||
switch (_type)
|
||||
{
|
||||
# ifdef HID_DYNAMIC
|
||||
case NON_VOLATILE_STORAGE:
|
||||
return new Eeprom(DRIVERS::NON_VOLATILE_STORAGE);
|
||||
# endif
|
||||
default:
|
||||
return new Storage(DRIVERS::DUMMY);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user