sx1276: changed function parameter name, so that predefined SWIG typemaps automatically apply. In the SWIG inerface, ignored some functions that have more user-friendly wrappers over them.

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Stefan Andritoiu 2015-11-27 19:24:38 +02:00 committed by Mihai Tudor Panu
parent 1accafa145
commit 344a52ae97
3 changed files with 11 additions and 8 deletions

View File

@ -9,4 +9,7 @@
#include "sx1276.h"
%}
%ignore send(uint8_t *buffer, uint8_t size, int txTimeout);
%ignore getRxBuffer();
%include "sx1276.h"

View File

@ -195,7 +195,7 @@ bool SX1276::writeReg(uint8_t reg, uint8_t val)
return true;
}
void SX1276::readFifo(uint8_t *buf, int len)
void SX1276::readFifo(uint8_t *buffer, int len)
{
// can't read more than 256 bytes
if (len > FIFO_SIZE)
@ -216,7 +216,7 @@ void SX1276::readFifo(uint8_t *buf, int len)
return;
}
if (m_spi.transfer(NULL, buf, len))
if (m_spi.transfer(NULL, buffer, len))
{
csOff();
throw std::runtime_error(string(__FUNCTION__) +
@ -226,7 +226,7 @@ void SX1276::readFifo(uint8_t *buf, int len)
csOff();
}
void SX1276::writeFifo(uint8_t *buf, int len)
void SX1276::writeFifo(uint8_t *buffer, int len)
{
// can't write more than 256 bytes
if (len > FIFO_SIZE)
@ -247,7 +247,7 @@ void SX1276::writeFifo(uint8_t *buf, int len)
return;
}
if (m_spi.transfer(buf, NULL, len))
if (m_spi.transfer(buffer, NULL, len))
{
csOff();
throw std::runtime_error(string(__FUNCTION__) +

View File

@ -1625,18 +1625,18 @@ namespace upm {
/**
* read the FIFO into a buffer
*
* @param buf The buffer to read data into
* @param buffer The buffer to read data into
* @param len The length of the buffer
*/
void readFifo(uint8_t *buf, int len);
void readFifo(uint8_t *buffer, int len);
/**
* write a buffer into the FIFO
*
* @param buf The buffer containing the data to write
* @param buffer The buffer containing the data to write
* @param len The length of the buffer
*/
void writeFifo(uint8_t *buf, int len);
void writeFifo(uint8_t *buffer, int len);
/**
* Set the frequency to transmit and receive on