diff options
Diffstat (limited to 'peripheral/libupm/src/hmtrp')
-rw-r--r-- | peripheral/libupm/src/hmtrp/CMakeLists.txt | 5 | ||||
-rw-r--r-- | peripheral/libupm/src/hmtrp/hmtrp.cxx | 504 | ||||
-rw-r--r-- | peripheral/libupm/src/hmtrp/hmtrp.h | 269 | ||||
-rw-r--r-- | peripheral/libupm/src/hmtrp/javaupm_hmtrp.i | 37 | ||||
-rw-r--r-- | peripheral/libupm/src/hmtrp/jsupm_hmtrp.i | 14 | ||||
-rw-r--r-- | peripheral/libupm/src/hmtrp/pyupm_hmtrp.i | 20 |
6 files changed, 0 insertions, 849 deletions
diff --git a/peripheral/libupm/src/hmtrp/CMakeLists.txt b/peripheral/libupm/src/hmtrp/CMakeLists.txt deleted file mode 100644 index 6a43ba3..0000000 --- a/peripheral/libupm/src/hmtrp/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -set (libname "hmtrp") -set (libdescription "upm grove serial rf pro (hmtrp) module") -set (module_src ${libname}.cxx) -set (module_h ${libname}.h) -upm_module_init() diff --git a/peripheral/libupm/src/hmtrp/hmtrp.cxx b/peripheral/libupm/src/hmtrp/hmtrp.cxx deleted file mode 100644 index ca71c31..0000000 --- a/peripheral/libupm/src/hmtrp/hmtrp.cxx +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Author: Jon Trulson <jtrulson@ics.com> - * Copyright (c) 2015 Intel Corporation. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include <iostream> -#include <string> -#include <stdexcept> - -#include "hmtrp.h" - -using namespace upm; -using namespace std; - -static const int defaultDelay = 100; // max wait time for read - -// protocol start code -const uint8_t HMTRP_START1 = 0xaa; -const uint8_t HMTRP_START2 = 0xfa; - -HMTRP::HMTRP(int uart) -{ - m_ttyFd = -1; - - if ( !(m_uart = mraa_uart_init(uart)) ) - { - throw std::invalid_argument(std::string(__FUNCTION__) + - ": mraa_uart_init() failed"); - return; - } - - // This requires a recent MRAA (1/2015) - const char *devPath = mraa_uart_get_dev_path(m_uart); - - if (!devPath) - { - throw std::runtime_error(std::string(__FUNCTION__) + - ": mraa_uart_get_dev_path() failed"); - return; - } - - // now open the tty - if ( (m_ttyFd = open(devPath, O_RDWR)) == -1) - { - throw std::runtime_error(std::string(__FUNCTION__) + - ": open of " + - string(devPath) + " failed: " + - string(strerror(errno))); - return; - } -} - -HMTRP::~HMTRP() -{ - if (m_ttyFd != -1) - close(m_ttyFd); -} - -bool HMTRP::dataAvailable(unsigned int millis) -{ - if (m_ttyFd == -1) - return false; - - struct timeval timeout; - - timeout.tv_sec = 0; - timeout.tv_usec = millis * 1000; - - int nfds; - fd_set readfds; - - FD_ZERO(&readfds); - - FD_SET(m_ttyFd, &readfds); - - if (select(m_ttyFd + 1, &readfds, NULL, NULL, &timeout) > 0) - return true; // data is ready - else - return false; -} - -int HMTRP::readData(char *buffer, int len, int millis) -{ - if (m_ttyFd == -1) - return(-1); - - // if specified, wait to see if input shows up, otherwise block - if (millis >= 0) - { - if (!dataAvailable(millis)) - return 0; // timed out - } - - int rv = read(m_ttyFd, buffer, len); - - if (rv < 0) - { - throw std::runtime_error(std::string(__FUNCTION__) + - ": read() failed: " + - string(strerror(errno))); - return rv; - } - - return rv; -} - -int HMTRP::writeData(char *buffer, int len) -{ - if (m_ttyFd == -1) - return(-1); - - int rv = write(m_ttyFd, buffer, len); - - if (rv < 0) - { - throw std::runtime_error(std::string(__FUNCTION__) + - ": write() failed: " + - string(strerror(errno))); - return rv; - } - - tcdrain(m_ttyFd); - - return rv; -} - -bool HMTRP::setupTty(speed_t baud) -{ - if (m_ttyFd == -1) - return(false); - - struct termios termio; - - // get current modes - tcgetattr(m_ttyFd, &termio); - - // setup for a 'raw' mode. 81N, no echo or special character - // handling, such as flow control. - cfmakeraw(&termio); - - // set our baud rates - cfsetispeed(&termio, baud); - cfsetospeed(&termio, baud); - - // make it so - if (tcsetattr(m_ttyFd, TCSAFLUSH, &termio) < 0) - { - throw std::runtime_error(std::string(__FUNCTION__) + - ": tcsetattr() failed: " + - string(strerror(errno))); - return false; - } - - return true; -} - -bool HMTRP::checkOK() -{ - char buf[4]; - - int rv = readData(buf, 4, defaultDelay); - - if (rv != 4) - { - cerr << __FUNCTION__ << ": failed to receive OK response, rv = " - << rv << ", expected 4" << endl; - return false; - } - - // looking for "OK\r\n" - if (buf[0] == 'O' && buf[1] == 'K' && - buf[2] == '\r' && buf[3] == '\n') - return true; - else - return false; -} - -bool HMTRP::reset() -{ - char pkt[3]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = RESET; - - writeData(pkt, 3); - - return checkOK(); -} - -bool HMTRP::getConfig(uint32_t *freq, uint32_t *dataRate, - uint16_t *rxBandwidth, uint8_t *modulation, - uint8_t *txPower, uint32_t *uartBaud) -{ - char pkt[3]; - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = GET_CONFIG; - - writeData(pkt, 3); - usleep(100000); - - // now read back a 16 byte response - char buf[16]; - int rv = readData(buf, 16, defaultDelay); - - if (rv != 16) - { - cerr << __FUNCTION__ << ": failed to receive correct response: rv = " - << rv << ", expected 16" << endl; - return false; - } - - // now decode - if (freq) - { - *freq = ( ((buf[0] & 0xff) << 24) | - ((buf[1] & 0xff) << 16) | - ((buf[2] & 0xff) << 8) | - (buf[3] & 0xff) ); - } - - if (dataRate) - { - *dataRate = ( ((buf[4] & 0xff) << 24) | - ((buf[5] & 0xff) << 16) | - ((buf[6] & 0xff) << 8) | - (buf[7] & 0xff) ); - } - - if (rxBandwidth) - { - *rxBandwidth = ( ((buf[8] & 0xff) << 8) | - (buf[9] & 0xff) ); - } - - if (modulation) - { - *modulation = buf[10] & 0xff; - } - - if (txPower) - { - *txPower = buf[11] & 0xff; - } - - if (uartBaud) - { - *uartBaud = ( ((buf[12] & 0xff) << 24) | - ((buf[13] & 0xff) << 16) | - ((buf[14] & 0xff) << 8) | - (buf[15] & 0xff) ); - } - - return true; -} - -bool HMTRP::setFrequency(uint32_t freq) -{ - char pkt[7]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = SET_FREQUENCY; - - pkt[3] = ( ((freq & 0xff000000) >> 24) & 0xff ); - pkt[4] = ( ((freq & 0x00ff0000) >> 16) & 0xff ); - pkt[5] = ( ((freq & 0x0000ff00) >> 8) & 0xff ); - pkt[6] = ( (freq & 0x000000ff) & 0xff ); - - writeData(pkt, 7); - - return checkOK(); -} - -bool HMTRP::setRFDataRate(uint32_t rate) -{ - // Valid values are between 1200-115200 - - if (rate < 1200 || rate > 115200) - { - throw std::out_of_range(std::string(__FUNCTION__) + - ": Valid rate values are between 1200-115200"); - return false; - } - - char pkt[7]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = SET_RF_DATARATE; - - pkt[3] = ( ((rate & 0xff000000) >> 24) & 0xff ); - pkt[4] = ( ((rate & 0x00ff0000) >> 16) & 0xff ); - pkt[5] = ( ((rate & 0x0000ff00) >> 8) & 0xff ); - pkt[6] = ( (rate & 0x000000ff) & 0xff ); - - writeData(pkt, 7); - - return checkOK(); -} - -bool HMTRP::setRXBandwidth(uint16_t rxBand) -{ - // Valid values are between 30-620 (in Khz) - - if (rxBand < 30 || rxBand > 620) - { - throw std::out_of_range(std::string(__FUNCTION__) + - ": Valid rxBand values are between 30-620"); - return false; - } - - char pkt[5]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = SET_RX_BW; - - pkt[3] = ( ((rxBand & 0xff00) >> 8) & 0xff ); - pkt[4] = ( rxBand & 0xff ); - - writeData(pkt, 5); - - return checkOK(); -} - -bool HMTRP::setFrequencyModulation(uint8_t modulation) -{ - // Valid values are between 10-160 (in Khz) - - if (modulation < 10 || modulation > 160) - { - throw std::out_of_range(std::string(__FUNCTION__) + - ": Valid modulation values are between 10-160"); - return false; - } - - char pkt[4]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = SET_FREQ_MODULATION; - - pkt[3] = modulation; - - writeData(pkt, 4); - - return checkOK(); -} - -bool HMTRP::setTransmitPower(uint8_t power) -{ - // Valid values are between 0-7 - - if (power > 7) - { - throw std::out_of_range(std::string(__FUNCTION__) + - ": Valid power values are between 0-7"); - return false; - } - - char pkt[4]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = SET_TX_POWER; - - pkt[3] = power; - - writeData(pkt, 4); - - return checkOK(); -} - -bool HMTRP::setUARTSpeed(uint32_t speed) -{ - // Valid values are between 1200-115200 - - if (speed < 1200 || speed > 115200) - { - throw std::out_of_range(std::string(__FUNCTION__) + - ": Valid speed values are between 1200-115200"); - return false; - } - - char pkt[7]; - - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = SET_UART_SPEED; - - pkt[3] = ( ((speed & 0xff000000) >> 24) & 0xff ); - pkt[4] = ( ((speed & 0x00ff0000) >> 16) & 0xff ); - pkt[5] = ( ((speed & 0x0000ff00) >> 8) & 0xff ); - pkt[6] = ( (speed & 0x000000ff) & 0xff ); - - writeData(pkt, 7); - - return checkOK(); -} - - -bool HMTRP::getRFSignalStrength(uint8_t *strength) -{ - if (!strength) - return false; - - *strength = 0; - - char pkt[3]; - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = GET_RF_SIGNAL_STR; - - writeData(pkt, 3); - usleep(100000); - - // now read back a 1 byte response - char buf; - int rv = readData(&buf, 1, defaultDelay); - - if (rv != 1) - { - cerr << __FUNCTION__ << ": failed to receive correct response: rv = " - << rv << ", expected 1" << endl; - return false; - } - - // now decode - *strength = (uint8_t)buf; - - return true; -} - -uint8_t HMTRP::getRFSignalStrength() -{ - uint8_t strength = 0; - if (!getRFSignalStrength(&strength)) - throw std::runtime_error(std::string(__PRETTY_FUNCTION__) + - ": readData() failed"); - return strength; -} - -bool HMTRP::getModSignalStrength(uint8_t *strength) -{ - if (!strength) - return false; - - *strength = 0; - - char pkt[3]; - pkt[0] = HMTRP_START1; - pkt[1] = HMTRP_START2; - pkt[2] = GET_MOD_SIGNAL_STR; - - writeData(pkt, 3); - usleep(100000); - - // now read back a 1 byte response - char buf; - int rv = readData(&buf, 1, defaultDelay); - - if (rv != 1) - { - cerr << __FUNCTION__ << ": failed to receive correct response: rv = " - << rv << ", expected 1" << endl; - return false; - } - - // now decode - *strength = (uint8_t)buf; - - return true; -} - -uint8_t HMTRP::getModSignalStrength() -{ - uint8_t strength = 0; - if (!getModSignalStrength(&strength)) - throw std::runtime_error(std::string(__PRETTY_FUNCTION__) + - ": readData() failed"); - return strength; -} - diff --git a/peripheral/libupm/src/hmtrp/hmtrp.h b/peripheral/libupm/src/hmtrp/hmtrp.h deleted file mode 100644 index c091a8f..0000000 --- a/peripheral/libupm/src/hmtrp/hmtrp.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Author: Jon Trulson <jtrulson@ics.com> - * Copyright (c) 2015 Intel Corporation. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -#pragma once - -#include <string> -#include <iostream> - -#include <stdint.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <fcntl.h> -#include <errno.h> -#include <termios.h> -#include <sys/time.h> -#include <sys/select.h> -#include <sys/types.h> -#include <sys/stat.h> - -#include <mraa/uart.h> - -#define HMTRP_DEFAULT_UART 0 - -namespace upm { -/** - * @brief HMTRP Serial RF Pro library - * @defgroup hmtrp libupm-hmtrp - * @ingroup seeed uart wifi - */ - -/** - * @library hmtrp - * @sensor hmtrp - * @comname Grove Serial RF Pro - * @altname HMTRP-433 HMTRP-470 HMTRP-868 HMTRP-915 - * @type wifi - * @man seeed - * @con uart - * - * @brief API for the HM-TRP Serial RF Pro transceiver - * - * UPM support for the HM-TRP Serial RF Pro transceiver. This was tested - * specifically with the Grove Serial RF Pro transceiver. In theory, - * this class should work with the following devices: - * - * HM-TRP-433: 414000000-454000000Hz - * HM-TRP-470: 450000000-490000000Hz - * HM-TRP-868: 849000000-889000000Hz - * HM-TRP-915: 895000000-935000000Hz - * - * The only difference is the transmit and receive frequencies - * supported. - * - * By default, the device simply sends and receives any data - * presented on its UART interface. It can be put into a - * configuration mode by grounding the CONFIG pin on the transceiver. - * - * @image html hmtrp.jpg - * @snippet hmtrp.cxx Interesting - */ - class HMTRP { - public: - - // HMTRP opcodes - typedef enum { RESET = 0xf0, - GET_CONFIG = 0xe1, - SET_FREQUENCY = 0xd2, - SET_RF_DATARATE = 0xc3, // 1200-115200 (baud) - SET_RX_BW = 0xb4, // 30-620 (Khz) - SET_FREQ_MODULATION = 0xa5, // 10-160 (KHz) - SET_TX_POWER = 0x96, // 0-7 - SET_UART_SPEED = 0x1e, // recommended not to change - GET_RF_SIGNAL_STR = 0xa7, - GET_MOD_SIGNAL_STR = 0x78 - } HMTRP_OPCODE_T; - - /** - * HMTRP Serial RF Pro transceiver constructor - * - * @param uart Default UART to use (0 or 1) - */ - HMTRP(int uart=HMTRP_DEFAULT_UART); - - /** - * HMTRP destructor - */ - ~HMTRP(); - - /** - * Checks to see if there is data available for reading - * - * @param millis Number of milliseconds to wait; 0 means no waiting (default). - * @return True if there is data available for reading - */ - bool dataAvailable(unsigned int millis=0); - - /** - * Reads any available data in a user-supplied buffer - * - * @param buffer Buffer to hold the data read - * @param len Length of the buffer - * @param millis Maximum time in milliseconds to wait for input. -1 means - * waiting forever (default). - * @return Number of bytes read; 0 if timed out and millis is >= 0 - */ - int readData(char *buffer, int len, int millis=-1); - - /** - * Writes the data in the buffer to the device - * - * @param buffer Buffer to hold the data read - * @param len Length of the buffer - * @return Number of bytes written - */ - int writeData(char *buffer, int len); - - /** - * Sets up proper tty I/O modes and the baud rate. The default - * baud rate is 9,600 (B9600). - * - * @param baud Desired baud rate. - * @return True if successful - */ - bool setupTty(speed_t baud=B9600); - - /** - * Looks for and verifies an OK response. This looks like "OK\r\n" - * - * @return True if OK received - */ - bool checkOK(); - - /** - * Resets the device to default parameters, except for the UART baud rate - * - * @return True if successful - */ - bool reset(); - - /** - * Queries the radio to determine its configuration - * - * @param freq Operating frequency - * @param dataRate TX/RX bit rate - * @param rxBandwidth Receiving bandwidth in Khz - * @param modulation Modulation frequency in Khz - * @param txPower Transmission power (1-7) - * @param uartBaud UART baud rate - * @return True if successful - */ - bool getConfig(uint32_t *freq, uint32_t *dataRate, uint16_t *rxBandwidth, - uint8_t *modulation, uint8_t *txPower, uint32_t *uartBaud); - - /** - * Sets the frequency. Note: this is limited depending on which - * HM-TRP device you are using. Consult the datasheet. - * - * @param freq Operating frequency - * @return True if successful - */ - bool setFrequency(uint32_t freq); - - /** - * Sets the RF data transmission rate. Valid values are between - * 1,200 and 115,200. - * - * @param rate Radio transmission rate in baud (1,200-115,200) - * @return True if successful - */ - bool setRFDataRate(uint32_t rate); - - /** - * Sets the RX bandwidth. Valid values are between 30 and 620 (in Khz) - * - * @param rxBand RX bandwidth in Khz (30-620) - * @return True if successful - */ - bool setRXBandwidth(uint16_t rxBand); - - /** - * Sets the frequency modulation. Valid values are between 10 and 160 (in Khz) - * - * @param modulation Frequency modulation to use, in Khz (10-160) - * @return True if successful - */ - bool setFrequencyModulation(uint8_t modulation); - - /** - * Sets the transmit power level. Valid values are between 0 and 7, - * 7 being the maximum power. - * - * @param power Power level to use during transmission. Valid values - * are between 0 and 7. - * @return True if successful - */ - bool setTransmitPower(uint8_t power); - - /** - * Sets the configured baud rate of the UART. It is strongly - * recommended you do not change this, or you may lose the - * ability to communicate with the transceiver. Valid values are 1,200-115,200. - * - * @param speed Desired baud rate to configure the device to use - * Valid values are between 1,200 and 115,200. - * @return True if successful - */ - bool setUARTSpeed(uint32_t speed); - - /** - * Gets the RF signal strength - * - * @param strength Returned strength - * @return True if successful - */ - bool getRFSignalStrength(uint8_t *strength); - - /** - * Gets the RF signal strength - * - * @return Signal strength - * @throws std::runtime_error if reading from the sensor failed - */ - uint8_t getRFSignalStrength(); - - /** - * Gets the modulation signal strength. - * - * @param strength Returned strength - * @return True if successful - */ - bool getModSignalStrength(uint8_t *strength); - - /** - * Gets the modulation signal strength. - * - * @return Signal strength - * @throws std::runtime_error if reading from the sensor failed - */ - uint8_t getModSignalStrength(); - - - private: - mraa_uart_context m_uart; - int m_ttyFd; - }; -} - - diff --git a/peripheral/libupm/src/hmtrp/javaupm_hmtrp.i b/peripheral/libupm/src/hmtrp/javaupm_hmtrp.i deleted file mode 100644 index 2f38e06..0000000 --- a/peripheral/libupm/src/hmtrp/javaupm_hmtrp.i +++ /dev/null @@ -1,37 +0,0 @@ -%module javaupm_hmtrp -%include "../upm.i" -%include "stdint.i" -%include "typemaps.i" -%include "../java_buffer.i" -%include "../java_exceptions.i" - -%apply uint32_t *OUTPUT { uint32_t *freq, uint32_t *dataRate }; -%apply uint16_t *OUTPUT { uint16_t *rxBandwidth }; -%apply uint8_t *OUTPUT { uint8_t *modulation, uint8_t *txPower }; -%apply uint32_t *OUTPUT { uint32_t *uartBaud }; -%apply uint8_t *OUTPUT { uint8_t *strength }; - -%{ - #include "hmtrp.h" - speed_t int_B9600 = B9600; -%} - -%ignore getRFSignalStrength(uint8_t *strength); -READDATA_EXCEPTION(getRFSignalStrength()) - -%ignore getModSignalStrength(uint8_t *strength); -READDATA_EXCEPTION(getModSignalStrength()) - -%include "hmtrp.h" -speed_t int_B9600 = B9600; - -%pragma(java) jniclasscode=%{ - static { - try { - System.loadLibrary("javaupm_hmtrp"); - } catch (UnsatisfiedLinkError e) { - System.err.println("Native code library failed to load. \n" + e); - System.exit(1); - } - } -%} diff --git a/peripheral/libupm/src/hmtrp/jsupm_hmtrp.i b/peripheral/libupm/src/hmtrp/jsupm_hmtrp.i deleted file mode 100644 index 2853677..0000000 --- a/peripheral/libupm/src/hmtrp/jsupm_hmtrp.i +++ /dev/null @@ -1,14 +0,0 @@ -%module jsupm_hmtrp -%include "../upm.i" -%include "../carrays_uint8_t.i" -%include "../carrays_uint16_t.i" -%include "../carrays_uint32_t.i" - -%{ - #include "hmtrp.h" - speed_t int_B9600 = B9600; -%} - -%include "hmtrp.h" -speed_t int_B9600 = B9600; -%array_class(char, charArray); diff --git a/peripheral/libupm/src/hmtrp/pyupm_hmtrp.i b/peripheral/libupm/src/hmtrp/pyupm_hmtrp.i deleted file mode 100644 index 3898382..0000000 --- a/peripheral/libupm/src/hmtrp/pyupm_hmtrp.i +++ /dev/null @@ -1,20 +0,0 @@ -// Include doxygen-generated documentation -%include "pyupm_doxy2swig.i" -%module pyupm_hmtrp -%include "../upm.i" -%include "../carrays_uint8_t.i" -%include "../carrays_uint16_t.i" -%include "../carrays_uint32_t.i" - -%rename("getModSignalStrengthNoParam") getModSignalStrength(); -%rename("getRFSignalStrengthNoParam") getRFSignalStrength(); - -%feature("autodoc", "3"); - -%include "hmtrp.h" -%{ - #include "hmtrp.h" - speed_t int_B9600 = B9600; -%} -speed_t int_B9600 = B9600; -%array_class(char, charArray); |