diff options
author | tomaszduda23 <[email protected]> | 2022-07-11 11:59:56 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2022-07-11 05:59:56 +0300 |
commit | dc1bc121c89600e2d5a18458283aa5960aa39e24 (patch) | |
tree | 9c212046147cdea8a65973b3b0fd1405cbdeb5c4 /hid/lib/drivers-avr/factory.cpp | |
parent | 89aff795fd7905aaf192428bb99814c13b98d5c2 (diff) |
add interface for storage (#99)
Diffstat (limited to 'hid/lib/drivers-avr/factory.cpp')
-rw-r--r-- | hid/lib/drivers-avr/factory.cpp | 13 |
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); + } + } + } |