![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
rfsdfg
lora_radio_helper.h@0:7037ed05f54f, 2018-03-08 (annotated)
- Committer:
- mbed_official
- Date:
- Thu Mar 08 17:46:15 2018 +0000
- Revision:
- 0:7037ed05f54f
- Child:
- 2:dc95ac6d6d4e
Fix construction of LoRaWANInterface object
Since radio object is constructed by another source file, we have a
race condition. In order to prevent this race condition, LoRaWANInterface
object is now created in main().
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-lorawan
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:7037ed05f54f | 1 | /** |
mbed_official | 0:7037ed05f54f | 2 | * Copyright (c) 2017, Arm Limited and affiliates. |
mbed_official | 0:7037ed05f54f | 3 | * SPDX-License-Identifier: Apache-2.0 |
mbed_official | 0:7037ed05f54f | 4 | * |
mbed_official | 0:7037ed05f54f | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 0:7037ed05f54f | 6 | * you may not use this file except in compliance with the License. |
mbed_official | 0:7037ed05f54f | 7 | * You may obtain a copy of the License at |
mbed_official | 0:7037ed05f54f | 8 | * |
mbed_official | 0:7037ed05f54f | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 0:7037ed05f54f | 10 | * |
mbed_official | 0:7037ed05f54f | 11 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 0:7037ed05f54f | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 0:7037ed05f54f | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 0:7037ed05f54f | 14 | * See the License for the specific language governing permissions and |
mbed_official | 0:7037ed05f54f | 15 | * limitations under the License. |
mbed_official | 0:7037ed05f54f | 16 | */ |
mbed_official | 0:7037ed05f54f | 17 | |
mbed_official | 0:7037ed05f54f | 18 | #include "lorawan/LoRaRadio.h" |
mbed_official | 0:7037ed05f54f | 19 | |
mbed_official | 0:7037ed05f54f | 20 | #ifndef APP_LORA_RADIO_HELPER_H_ |
mbed_official | 0:7037ed05f54f | 21 | #define APP_LORA_RADIO_HELPER_H_ |
mbed_official | 0:7037ed05f54f | 22 | |
mbed_official | 0:7037ed05f54f | 23 | /** |
mbed_official | 0:7037ed05f54f | 24 | * Helper function for the application to |
mbed_official | 0:7037ed05f54f | 25 | * get access to a LoRaRadio object. Based upon the target platform, |
mbed_official | 0:7037ed05f54f | 26 | * a certain radio driver is selected, constructed and returned to the |
mbed_official | 0:7037ed05f54f | 27 | * application. |
mbed_official | 0:7037ed05f54f | 28 | */ |
mbed_official | 0:7037ed05f54f | 29 | LoRaRadio& get_lora_radio(); |
mbed_official | 0:7037ed05f54f | 30 | |
mbed_official | 0:7037ed05f54f | 31 | #endif /* APP_LORA_RADIO_HELPER_H_ */ |