Skip to content

Commit

Permalink
Fix permissive compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kwagyeman committed Oct 8, 2020
1 parent 84b7cc9 commit d03f1d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/openmvrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ bool rpc_i2c_master::put_bytes(uint8_t *data, size_t size, unsigned long timeout
}

volatile uint8_t *rpc_i2c_slave::__bytes_buff = NULL;
volatile size_t rpc_i2c_slave::__bytes_size = 0;
volatile int rpc_i2c_slave::__bytes_size = 0;

void rpc_i2c_slave::onReceiveHandler(int numBytes)
{
Expand All @@ -818,7 +818,7 @@ void rpc_i2c_slave::onReceiveHandler(int numBytes)
void rpc_i2c_slave::onRequestHandler()
{
if (!__bytes_size) return;
size_t written = Wire.write((const uint8_t *) __bytes_buff, min(__bytes_size, 32));
size_t written = Wire.write((uint8_t *) __bytes_buff, min(__bytes_size, 32));
__bytes_buff += written;
__bytes_size -= written;
}
Expand Down
2 changes: 1 addition & 1 deletion src/openmvrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class rpc_i2c_slave : public rpc_slave
private:
uint8_t __slave_addr;
static volatile uint8_t *__bytes_buff;
static volatile size_t __bytes_size;
static volatile int __bytes_size;
static void onReceiveHandler(int numBytes);
static void onRequestHandler();
rpc_i2c_slave(const rpc_i2c_slave &);
Expand Down

0 comments on commit d03f1d4

Please sign in to comment.