How to measure water in a reservoir

Dependencies:   Cayenne-MQTT-mbed Cayenne-LPP

Committer:
wamae
Date:
Fri Mar 08 11:34:56 2019 +0000
Revision:
0:7bfeb237e600
working code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wamae 0:7bfeb237e600 1 /**
wamae 0:7bfeb237e600 2 * Copyright (c) 2017, Arm Limited and affiliates.
wamae 0:7bfeb237e600 3 * SPDX-License-Identifier: Apache-2.0
wamae 0:7bfeb237e600 4 *
wamae 0:7bfeb237e600 5 * Licensed under the Apache License, Version 2.0 (the "License");
wamae 0:7bfeb237e600 6 * you may not use this file except in compliance with the License.
wamae 0:7bfeb237e600 7 * You may obtain a copy of the License at
wamae 0:7bfeb237e600 8 *
wamae 0:7bfeb237e600 9 * http://www.apache.org/licenses/LICENSE-2.0
wamae 0:7bfeb237e600 10 *
wamae 0:7bfeb237e600 11 * Unless required by applicable law or agreed to in writing, software
wamae 0:7bfeb237e600 12 * distributed under the License is distributed on an "AS IS" BASIS,
wamae 0:7bfeb237e600 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
wamae 0:7bfeb237e600 14 * See the License for the specific language governing permissions and
wamae 0:7bfeb237e600 15 * limitations under the License.
wamae 0:7bfeb237e600 16 */
wamae 0:7bfeb237e600 17
wamae 0:7bfeb237e600 18 #include "lorawan/LoRaRadio.h"
wamae 0:7bfeb237e600 19
wamae 0:7bfeb237e600 20 #ifndef APP_LORA_RADIO_HELPER_H_
wamae 0:7bfeb237e600 21 #define APP_LORA_RADIO_HELPER_H_
wamae 0:7bfeb237e600 22
wamae 0:7bfeb237e600 23 #include "SX1272_LoRaRadio.h"
wamae 0:7bfeb237e600 24 #include "SX1276_LoRaRadio.h"
wamae 0:7bfeb237e600 25
wamae 0:7bfeb237e600 26 #define SX1272 0xFF
wamae 0:7bfeb237e600 27 #define SX1276 0xEE
wamae 0:7bfeb237e600 28
wamae 0:7bfeb237e600 29 #if (MBED_CONF_APP_LORA_RADIO == SX1272)
wamae 0:7bfeb237e600 30
wamae 0:7bfeb237e600 31 SX1272_LoRaRadio radio(MBED_CONF_APP_LORA_SPI_MOSI,
wamae 0:7bfeb237e600 32 MBED_CONF_APP_LORA_SPI_MISO,
wamae 0:7bfeb237e600 33 MBED_CONF_APP_LORA_SPI_SCLK,
wamae 0:7bfeb237e600 34 MBED_CONF_APP_LORA_CS,
wamae 0:7bfeb237e600 35 MBED_CONF_APP_LORA_RESET,
wamae 0:7bfeb237e600 36 MBED_CONF_APP_LORA_DIO0,
wamae 0:7bfeb237e600 37 MBED_CONF_APP_LORA_DIO1,
wamae 0:7bfeb237e600 38 MBED_CONF_APP_LORA_DIO2,
wamae 0:7bfeb237e600 39 MBED_CONF_APP_LORA_DIO3,
wamae 0:7bfeb237e600 40 MBED_CONF_APP_LORA_DIO4,
wamae 0:7bfeb237e600 41 MBED_CONF_APP_LORA_DIO5,
wamae 0:7bfeb237e600 42 MBED_CONF_APP_LORA_RF_SWITCH_CTL1,
wamae 0:7bfeb237e600 43 MBED_CONF_APP_LORA_RF_SWITCH_CTL2,
wamae 0:7bfeb237e600 44 MBED_CONF_APP_LORA_TXCTL,
wamae 0:7bfeb237e600 45 MBED_CONF_APP_LORA_RXCTL,
wamae 0:7bfeb237e600 46 MBED_CONF_APP_LORA_ANT_SWITCH,
wamae 0:7bfeb237e600 47 MBED_CONF_APP_LORA_PWR_AMP_CTL,
wamae 0:7bfeb237e600 48 MBED_CONF_APP_LORA_TCXO);
wamae 0:7bfeb237e600 49
wamae 0:7bfeb237e600 50 #elif (MBED_CONF_APP_LORA_RADIO == SX1276)
wamae 0:7bfeb237e600 51
wamae 0:7bfeb237e600 52 SX1276_LoRaRadio radio(MBED_CONF_APP_LORA_SPI_MOSI,
wamae 0:7bfeb237e600 53 MBED_CONF_APP_LORA_SPI_MISO,
wamae 0:7bfeb237e600 54 MBED_CONF_APP_LORA_SPI_SCLK,
wamae 0:7bfeb237e600 55 MBED_CONF_APP_LORA_CS,
wamae 0:7bfeb237e600 56 MBED_CONF_APP_LORA_RESET,
wamae 0:7bfeb237e600 57 MBED_CONF_APP_LORA_DIO0,
wamae 0:7bfeb237e600 58 MBED_CONF_APP_LORA_DIO1,
wamae 0:7bfeb237e600 59 MBED_CONF_APP_LORA_DIO2,
wamae 0:7bfeb237e600 60 MBED_CONF_APP_LORA_DIO3,
wamae 0:7bfeb237e600 61 MBED_CONF_APP_LORA_DIO4,
wamae 0:7bfeb237e600 62 MBED_CONF_APP_LORA_DIO5,
wamae 0:7bfeb237e600 63 MBED_CONF_APP_LORA_RF_SWITCH_CTL1,
wamae 0:7bfeb237e600 64 MBED_CONF_APP_LORA_RF_SWITCH_CTL2,
wamae 0:7bfeb237e600 65 MBED_CONF_APP_LORA_TXCTL,
wamae 0:7bfeb237e600 66 MBED_CONF_APP_LORA_RXCTL,
wamae 0:7bfeb237e600 67 MBED_CONF_APP_LORA_ANT_SWITCH,
wamae 0:7bfeb237e600 68 MBED_CONF_APP_LORA_PWR_AMP_CTL,
wamae 0:7bfeb237e600 69 MBED_CONF_APP_LORA_TCXO);
wamae 0:7bfeb237e600 70
wamae 0:7bfeb237e600 71 #else
wamae 0:7bfeb237e600 72 #error "Unknown LoRa radio specified (SX1272,SX1276 are valid)"
wamae 0:7bfeb237e600 73 #endif
wamae 0:7bfeb237e600 74
wamae 0:7bfeb237e600 75
wamae 0:7bfeb237e600 76 #endif /* APP_LORA_RADIO_HELPER_H_ */