Skip to content

Commit 5b23474

Browse files
committed
Adds new virtual functions to highest order bus class
* Updates descriptions to indicate that these functions to not index to a given register.
1 parent c499f29 commit 5b23474

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

src/sfeTk/sfeTkIBus.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,32 @@ class sfeTkIBus
8787
{
8888
public:
8989
/**--------------------------------------------------------------------------
90-
* @brief Write a single byte to the device*
90+
* @brief Send a single byte to the device*
9191
* @param data Data to write.
9292
*
9393
* @retval sfeTkError_t - kSTkErrOk on successful execution.
9494
*
9595
*/
9696
virtual sfeTkError_t writeByte(uint8_t data) = 0;
9797

98+
/**--------------------------------------------------------------------------
99+
* @brief Send a word to the device.
100+
* @param data Data to write.
101+
*
102+
* @retval sfeTkError_t - kSTkErrOk on successful execution.
103+
*
104+
*/
105+
virtual sfeTkError_t writeWord(uint16_t data) = 0;
106+
107+
/**--------------------------------------------------------------------------
108+
* @brief Send an array of data to the device.
109+
* @param data Data to write.
110+
*
111+
* @retval sfeTkError_t - kSTkErrOk on successful execution.
112+
*
113+
*/
114+
virtual sfeTkError_t writeBlock(const uint8_t *data, size_t length) = 0;
115+
98116
/**--------------------------------------------------------------------------
99117
* @brief Write a single byte to the given register
100118
*

src/sfeTkArdI2C.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ sfeTkError_t sfeTkArdI2C::writeWord(uint16_t dataToWrite)
125125
//
126126
// Returns true on success, false on failure
127127
//
128-
sfeTkError_t sfeTkArdI2C::writeBlock(const uint8_t *dataToWrite, size_t length)
128+
sfeTkError_t sfeTkArdI2C::writeBlock(const uint8_t *data, size_t length)
129129
{
130130
int nData = 0;
131131
if (!_i2cPort)

src/sfeTkArdI2C.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class sfeTkArdI2C : public sfeTkII2C
136136
137137
@retval returns kStkErrOk on success
138138
*/
139-
sfeTkError_t writeBlock(const uint8_t *data);
139+
sfeTkError_t writeBlock(const uint8_t *data, size_t length);
140140

141141
/**
142142
@brief Write a single byte to the given register

0 commit comments

Comments
 (0)