Use the improved default parameters

This commit is contained in:
Michal Moskal
2016-04-04 19:11:33 -07:00
parent e2b2aa7ff1
commit d62c10d278
3 changed files with 9 additions and 9 deletions

View File

@ -199,8 +199,8 @@ namespace pins {
/**
* Read `size` bytes from a 7-bit I2C `address`.
*/
//% repeat.defl=0
Buffer i2cReadBuffer(int address, int size, bool repeat)
//%
Buffer i2cReadBuffer(int address, int size, bool repeat = false)
{
Buffer buf = createBuffer(size);
uBit.i2c.read(address << 1, (char*)buf->payload, size, repeat);
@ -210,8 +210,8 @@ namespace pins {
/**
* Write bytes to a 7-bit I2C `address`.
*/
//% repeat.defl=0
void i2cWriteBuffer(int address, Buffer buf, bool repeat)
//%
void i2cWriteBuffer(int address, Buffer buf, bool repeat = false)
{
uBit.i2c.write(address << 1, (char*)buf->payload, buf->length, repeat);
}