Skip to content

Commit 9352fa8

Browse files
committed
move instance data to protected - to support subclasses as needed
1 parent 4dbc4d8 commit 9352fa8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/sfeTkArdI2C.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ class sfeTkArdI2C : public sfeTkII2C
138138
///
139139
virtual int readRegisterRegion(uint8_t devReg, uint8_t *data, size_t numBytes);
140140

141-
private:
141+
protected:
142+
// note: The wire port is protected, allowing access if a sub-class is
143+
// created to implement a special read/write routine
144+
//
142145
// The actual Arduino i2c port
143146
TwoWire *_i2cPort;
144147
};

src/sfeTkArdSPI.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ class sfeTkArdSPI : public sfeTkISPI
128128
///
129129
virtual int readRegisterRegion(uint8_t reg, uint8_t *data, size_t numBytes);
130130

131-
private:
131+
protected:
132+
// note: The instance data is protected, allowing access if a sub-class is
133+
// created to implement a special read/write routine
134+
//
135+
132136
SPIClass *_spiPort;
133137

134138
// Settings are used for every transaction.

0 commit comments

Comments
 (0)