From 344a52ae97904c2ea09b85a0162c4dde321baf0f Mon Sep 17 00:00:00 2001 From: Stefan Andritoiu Date: Fri, 27 Nov 2015 19:24:38 +0200 Subject: [PATCH] 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 Signed-off-by: Mihai Tudor Panu --- src/sx1276/javaupm_sx1276.i | 3 +++ src/sx1276/sx1276.cxx | 8 ++++---- src/sx1276/sx1276.h | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/sx1276/javaupm_sx1276.i b/src/sx1276/javaupm_sx1276.i index 6b72702d..49c8b9c6 100644 --- a/src/sx1276/javaupm_sx1276.i +++ b/src/sx1276/javaupm_sx1276.i @@ -9,4 +9,7 @@ #include "sx1276.h" %} +%ignore send(uint8_t *buffer, uint8_t size, int txTimeout); +%ignore getRxBuffer(); + %include "sx1276.h" diff --git a/src/sx1276/sx1276.cxx b/src/sx1276/sx1276.cxx index 004d025f..0297a1c9 100644 --- a/src/sx1276/sx1276.cxx +++ b/src/sx1276/sx1276.cxx @@ -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__) + diff --git a/src/sx1276/sx1276.h b/src/sx1276/sx1276.h index bf4cd497..9a282c39 100644 --- a/src/sx1276/sx1276.h +++ b/src/sx1276/sx1276.h @@ -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