File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,18 @@ class sfeTkArdI2C : public sfeTkII2C
4747 {
4848 }
4949
50+ // copy constructor
51+ sfeTkArdI2C (sfeTkArdI2C const &rhs) : _i2cPort{rhs._i2cPort }
52+ {
53+ }
54+
55+ // Copy assignment
56+ sfeTkArdI2C &operator =(const sfeTkArdI2C &rhs)
57+ {
58+ _i2cPort = rhs._i2cPort ;
59+ return *this ;
60+ }
61+
5062 // / @brief Method sets up the required I2C settings.
5163 // / @note This function provides a default I2C Port.
5264 // /
Original file line number Diff line number Diff line change @@ -39,6 +39,18 @@ class sfeTkBusSPI : public sfeTkIBus
3939 // /
4040 sfeTkBusSPI (void ) : _spiPort(nullptr ){};
4141
42+ // copy constructor
43+ sfeTkArdSPI (sfeTkArdSPI const &rhs) : _spiPort{rhs._spiPort }, _sfeSPISettings{rhs._sfeSPISettings }
44+ {
45+ }
46+
47+ // Copy assignment
48+ sfeTkArdSPI &operator =(const sfeTkArdSPI &rhs)
49+ {
50+ _spiPort = rhs._spiPort ;
51+ _sfeSPISettings = rhs._sfeSPISettings ;
52+ return *this ;
53+ }
4254 // / @brief Method sets up the required SPI settings.
4355 // / @note This function provides a default SPI Port.
4456 // /
You can’t perform that action at this time.
0 commit comments