RTC auf true

Committer:
kevman
Date:
Wed Nov 28 15:10:15 2018 +0000
Revision:
0:38ceb79fef03
RTC modified

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevman 0:38ceb79fef03 1 /*
kevman 0:38ceb79fef03 2 * Copyright (c) 2016-2017, Arm Limited and affiliates.
kevman 0:38ceb79fef03 3 * SPDX-License-Identifier: Apache-2.0
kevman 0:38ceb79fef03 4 *
kevman 0:38ceb79fef03 5 * Licensed under the Apache License, Version 2.0 (the "License");
kevman 0:38ceb79fef03 6 * you may not use this file except in compliance with the License.
kevman 0:38ceb79fef03 7 * You may obtain a copy of the License at
kevman 0:38ceb79fef03 8 *
kevman 0:38ceb79fef03 9 * http://www.apache.org/licenses/LICENSE-2.0
kevman 0:38ceb79fef03 10 *
kevman 0:38ceb79fef03 11 * Unless required by applicable law or agreed to in writing, software
kevman 0:38ceb79fef03 12 * distributed under the License is distributed on an "AS IS" BASIS,
kevman 0:38ceb79fef03 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
kevman 0:38ceb79fef03 14 * See the License for the specific language governing permissions and
kevman 0:38ceb79fef03 15 * limitations under the License.
kevman 0:38ceb79fef03 16 */
kevman 0:38ceb79fef03 17
kevman 0:38ceb79fef03 18 #ifndef NANOSTACK_RF_PHY_H_
kevman 0:38ceb79fef03 19 #define NANOSTACK_RF_PHY_H_
kevman 0:38ceb79fef03 20
kevman 0:38ceb79fef03 21 #include "NanostackPhy.h"
kevman 0:38ceb79fef03 22
kevman 0:38ceb79fef03 23 /** Radio PHY driver class for Nanostack */
kevman 0:38ceb79fef03 24 class NanostackRfPhy : public NanostackPhy {
kevman 0:38ceb79fef03 25 public:
kevman 0:38ceb79fef03 26
kevman 0:38ceb79fef03 27 /** Return the default on-board NanostackRfPhy
kevman 0:38ceb79fef03 28 *
kevman 0:38ceb79fef03 29 * Returns the default on-board NanostackRfPhy - this will be target-specific, and
kevman 0:38ceb79fef03 30 * may not be available on all targets.
kevman 0:38ceb79fef03 31 */
kevman 0:38ceb79fef03 32 static NanostackRfPhy &get_default_instance();
kevman 0:38ceb79fef03 33
kevman 0:38ceb79fef03 34 /** Register this physical interface with Nanostack
kevman 0:38ceb79fef03 35 *
kevman 0:38ceb79fef03 36 * @return Device driver ID or a negative error
kevman 0:38ceb79fef03 37 * code on failure
kevman 0:38ceb79fef03 38 */
kevman 0:38ceb79fef03 39 virtual int8_t rf_register() = 0;
kevman 0:38ceb79fef03 40
kevman 0:38ceb79fef03 41 /** Unregister this physical interface
kevman 0:38ceb79fef03 42 *
kevman 0:38ceb79fef03 43 */
kevman 0:38ceb79fef03 44 virtual void rf_unregister() = 0;
kevman 0:38ceb79fef03 45
kevman 0:38ceb79fef03 46 /** Register this physical interface with Nanostack
kevman 0:38ceb79fef03 47 *
kevman 0:38ceb79fef03 48 * @return Device driver ID or a negative error
kevman 0:38ceb79fef03 49 * code on failure
kevman 0:38ceb79fef03 50 */
kevman 0:38ceb79fef03 51 virtual int8_t phy_register() { return rf_register();}
kevman 0:38ceb79fef03 52
kevman 0:38ceb79fef03 53 /** Unregister this physical interface
kevman 0:38ceb79fef03 54 *
kevman 0:38ceb79fef03 55 */
kevman 0:38ceb79fef03 56 virtual void unregister() { rf_unregister(); }
kevman 0:38ceb79fef03 57 };
kevman 0:38ceb79fef03 58
kevman 0:38ceb79fef03 59 #endif /* NANOSTACK_RF_PHY_H_ */