java: Changed size_t and unsigned int to int in array declarations. Renamed buf to buffer where necesarry. Moved most Java array typemaps to java_buffer.i. Fixed some String buffers.

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>

Conflicts:
	src/upm.i
This commit is contained in:
Petre Eftime
2015-09-07 19:00:30 +03:00
committed by Mihai Tudor Panu
parent ab730038fd
commit 2cab79b4c2
50 changed files with 237 additions and 326 deletions

View File

@@ -50,10 +50,10 @@ DS1307::~DS1307()
mraa_i2c_stop(m_i2c);
}
mraa_result_t DS1307::writeBytes(uint8_t reg, uint8_t *buffer, unsigned int len)
mraa::Result DS1307::writeBytes(uint8_t reg, uint8_t *buffer, int len)
{
if (!len || !buffer)
return MRAA_ERROR_INVALID_PARAMETER;
return mraa::ERROR_INVALID_PARAMETER;
// create a buffer 1 byte larger than the supplied buffer,
// store the register in the first byte
@@ -67,10 +67,10 @@ mraa_result_t DS1307::writeBytes(uint8_t reg, uint8_t *buffer, unsigned int len)
mraa_i2c_address(m_i2c, DS1307_I2C_ADDR);
return mraa_i2c_write(m_i2c, buf2, len + 1);
return (mraa::Result) mraa_i2c_write(m_i2c, buf2, len + 1);
}
uint8_t DS1307::readBytes(uint8_t reg, uint8_t *buffer, unsigned int len)
int DS1307::readBytes(uint8_t reg, uint8_t *buffer, int len)
{
if (!len || !buffer)
return 0;
@@ -166,7 +166,7 @@ bool DS1307::setTime()
return writeBytes(0, buffer, 7);
}
mraa_result_t DS1307::enableClock()
mraa::Result DS1307::enableClock()
{
// the oscillator enable bit is the high bit of reg 0
// so read it, clear it, and write it back.
@@ -179,7 +179,7 @@ mraa_result_t DS1307::enableClock()
return writeBytes(0, &buf, 1);
}
mraa_result_t DS1307::disableClock()
mraa::Result DS1307::disableClock()
{
// the oscillator enable bit is the high bit of reg 0
// so read it, set it, and write it back.