@@ -104,22 +104,24 @@ const SPISettings DEFAULT_SPI_SETTINGS = SPISettings();
104
104
class HardwareSPI
105
105
{
106
106
public:
107
- virtual uint8_t transfer (uint8_t data);
108
- virtual uint16_t transfer16 (uint16_t data);
109
- virtual void transfer (void *buf, size_t count);
107
+ virtual ~HardwareSPI () { }
108
+
109
+ virtual uint8_t transfer (uint8_t data) = 0;
110
+ virtual uint16_t transfer16 (uint16_t data) = 0;
111
+ virtual void transfer (void *buf, size_t count) = 0;
110
112
111
113
// Transaction Functions
112
- virtual void usingInterrupt (int interruptNumber);
113
- virtual void notUsingInterrupt (int interruptNumber);
114
- virtual void beginTransaction (SPISettings settings);
115
- virtual void endTransaction (void );
114
+ virtual void usingInterrupt (int interruptNumber) = 0 ;
115
+ virtual void notUsingInterrupt (int interruptNumber) = 0 ;
116
+ virtual void beginTransaction (SPISettings settings) = 0 ;
117
+ virtual void endTransaction (void ) = 0 ;
116
118
117
119
// SPI Configuration methods
118
- virtual void attachInterrupt ();
119
- virtual void detachInterrupt ();
120
+ virtual void attachInterrupt () = 0 ;
121
+ virtual void detachInterrupt () = 0 ;
120
122
121
- virtual void begin ();
122
- virtual void end ();
123
+ virtual void begin () = 0 ;
124
+ virtual void end () = 0 ;
123
125
};
124
126
125
127
// Alias SPIClass to HardwareSPI since it's already the defacto standard for SPI classe name
0 commit comments