mbed-os

Dependents:   cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more

Committer:
be_bryan
Date:
Mon Dec 11 17:54:04 2017 +0000
Revision:
0:b74591d5ab33
motor ++

Who changed what in which revision?

UserRevisionLine numberNew contents of line
be_bryan 0:b74591d5ab33 1 /*
be_bryan 0:b74591d5ab33 2 * Copyright (c) 2016, Arm Limited and affiliates.
be_bryan 0:b74591d5ab33 3 * SPDX-License-Identifier: Apache-2.0
be_bryan 0:b74591d5ab33 4 *
be_bryan 0:b74591d5ab33 5 * Licensed under the Apache License, Version 2.0 (the "License");
be_bryan 0:b74591d5ab33 6 * you may not use this file except in compliance with the License.
be_bryan 0:b74591d5ab33 7 * You may obtain a copy of the License at
be_bryan 0:b74591d5ab33 8 *
be_bryan 0:b74591d5ab33 9 * http://www.apache.org/licenses/LICENSE-2.0
be_bryan 0:b74591d5ab33 10 *
be_bryan 0:b74591d5ab33 11 * Unless required by applicable law or agreed to in writing, software
be_bryan 0:b74591d5ab33 12 * distributed under the License is distributed on an "AS IS" BASIS,
be_bryan 0:b74591d5ab33 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
be_bryan 0:b74591d5ab33 14 * See the License for the specific language governing permissions and
be_bryan 0:b74591d5ab33 15 * limitations under the License.
be_bryan 0:b74591d5ab33 16 */
be_bryan 0:b74591d5ab33 17
be_bryan 0:b74591d5ab33 18 #ifndef NANOSTACK_PHY_H_
be_bryan 0:b74591d5ab33 19 #define NANOSTACK_PHY_H_
be_bryan 0:b74591d5ab33 20
be_bryan 0:b74591d5ab33 21 class NanostackPhy {
be_bryan 0:b74591d5ab33 22 public:
be_bryan 0:b74591d5ab33 23
be_bryan 0:b74591d5ab33 24 /** Register this physical interface with Nanostack
be_bryan 0:b74591d5ab33 25 *
be_bryan 0:b74591d5ab33 26 * @return Device driver ID or a negative error
be_bryan 0:b74591d5ab33 27 * code on failure
be_bryan 0:b74591d5ab33 28 */
be_bryan 0:b74591d5ab33 29 virtual int8_t phy_register() = 0;
be_bryan 0:b74591d5ab33 30
be_bryan 0:b74591d5ab33 31 /** Read the mac address of this physical interface
be_bryan 0:b74591d5ab33 32 *
be_bryan 0:b74591d5ab33 33 * Note - some devices do not have a mac address
be_bryan 0:b74591d5ab33 34 * in hardware.
be_bryan 0:b74591d5ab33 35 */
be_bryan 0:b74591d5ab33 36 virtual void get_mac_address(uint8_t *mac) = 0;
be_bryan 0:b74591d5ab33 37
be_bryan 0:b74591d5ab33 38 /** Set the mac address of this physical interface
be_bryan 0:b74591d5ab33 39 *
be_bryan 0:b74591d5ab33 40 */
be_bryan 0:b74591d5ab33 41 virtual void set_mac_address(uint8_t *mac) = 0;
be_bryan 0:b74591d5ab33 42
be_bryan 0:b74591d5ab33 43 protected:
be_bryan 0:b74591d5ab33 44 NanostackPhy() {}
be_bryan 0:b74591d5ab33 45 virtual ~NanostackPhy() {}
be_bryan 0:b74591d5ab33 46 };
be_bryan 0:b74591d5ab33 47
be_bryan 0:b74591d5ab33 48 #endif /* NANOSTACK_INTERFACE_H_ */