Skip to content

Commit

Permalink
minors
Browse files Browse the repository at this point in the history
  • Loading branch information
pat1 committed Oct 12, 2023
1 parent 55d36aa commit 838a630
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions platformio/libraries/Rmap/registers-master.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
/*!
\def I2C_MASTER_ADDRESS_LENGTH
\brief length of the address variable for i2c-master module.
\brief length of the address variable for i2c-master module. (not managed by firmware!)
*/
#define I2C_MASTER_ADDRESS_LENGTH (0x01)

/*!
\def I2C_MASTER_ADDRESS_ADDRESS
\brief address of the address variable for i2c-master module.
\brief address of the address variable for i2c-master module. (not managed by firmware!)
*/
#define I2C_MASTER_ADDRESS_ADDRESS (I2C_WRITE_REGISTER_START_ADDRESS)



/*!
\def I2C_MASTER_CONFIGURATION_INDEX_LENGTH
\brief length of the configuration index variable for i2c-master module.
Expand Down
4 changes: 4 additions & 0 deletions platformio/stima_v3/stima/src/stima.ino
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ void i2c_receive_interrupt_handler(int rx_data_length) {

// it is a registers write?
} else if (is_writable_register(i2c_rx_data[0])) {

// we have to manage others registers here (i2c address)
// but they are not in configuration_t

if (i2c_rx_data[0] == I2C_MASTER_CONFIGURATION_INDEX_ADDRESS &&
rx_data_length <= (I2C_MASTER_CONFIGURATION_INDEX_LENGTH + I2C_MASTER_CONFIGURATION_LENGTH )) {
rx_data_length -= 1;
Expand Down

0 comments on commit 838a630

Please sign in to comment.