Skip to content

Commit 727a56e

Browse files
committed
avoid definition of open close and write in all subclasses
1 parent 19710d4 commit 727a56e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libraries/BlockDevices/blockDevice.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ typedef pin_size_t pin_t;
4040

4141
class BlockDevice {
4242
private:
43-
virtual int open() = 0;
44-
virtual int close() = 0;
45-
virtual int write(const void *buffer, bd_addr_t addr, bd_size_t size) = 0;
43+
virtual int open() {}
44+
virtual int close() {}
45+
virtual int write(const void *buffer, bd_addr_t addr, bd_size_t size) {
46+
program(buffer, addr, size);
47+
}
4648

4749

4850
public:

0 commit comments

Comments
 (0)