summaryrefslogtreecommitdiff
path: root/hid/lib/drivers-avr/factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hid/lib/drivers-avr/factory.cpp')
-rw-r--r--hid/lib/drivers-avr/factory.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/hid/lib/drivers-avr/factory.cpp b/hid/lib/drivers-avr/factory.cpp
index 26f10583..c6968777 100644
--- a/hid/lib/drivers-avr/factory.cpp
+++ b/hid/lib/drivers-avr/factory.cpp
@@ -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);
+ }
+ }
+
}