Pinned to some recent date

Committer:
Simon Cooksey
Date:
Thu Nov 17 16:43:53 2016 +0000
Revision:
0:fb7af294d5d9
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Simon Cooksey 0:fb7af294d5d9 1 /*
Simon Cooksey 0:fb7af294d5d9 2 * Copyright (c) 2016 ARM Limited. All rights reserved.
Simon Cooksey 0:fb7af294d5d9 3 */
Simon Cooksey 0:fb7af294d5d9 4
Simon Cooksey 0:fb7af294d5d9 5 #ifndef NANOSTACK_RF_PHY_H_
Simon Cooksey 0:fb7af294d5d9 6 #define NANOSTACK_RF_PHY_H_
Simon Cooksey 0:fb7af294d5d9 7
Simon Cooksey 0:fb7af294d5d9 8 class NanostackRfPhy {
Simon Cooksey 0:fb7af294d5d9 9 public:
Simon Cooksey 0:fb7af294d5d9 10
Simon Cooksey 0:fb7af294d5d9 11 /** Register this physical interface with Nanostack
Simon Cooksey 0:fb7af294d5d9 12 *
Simon Cooksey 0:fb7af294d5d9 13 * @return Device driver ID or a negative error
Simon Cooksey 0:fb7af294d5d9 14 * code on failure
Simon Cooksey 0:fb7af294d5d9 15 */
Simon Cooksey 0:fb7af294d5d9 16 virtual int8_t rf_register() = 0;
Simon Cooksey 0:fb7af294d5d9 17
Simon Cooksey 0:fb7af294d5d9 18 /** Unregister this physical interface
Simon Cooksey 0:fb7af294d5d9 19 *
Simon Cooksey 0:fb7af294d5d9 20 */
Simon Cooksey 0:fb7af294d5d9 21 virtual void rf_unregister() = 0;
Simon Cooksey 0:fb7af294d5d9 22
Simon Cooksey 0:fb7af294d5d9 23 /** Read the mac address of this physical interface
Simon Cooksey 0:fb7af294d5d9 24 *
Simon Cooksey 0:fb7af294d5d9 25 * Note - some devices do not have a mac address
Simon Cooksey 0:fb7af294d5d9 26 * in hardware.
Simon Cooksey 0:fb7af294d5d9 27 */
Simon Cooksey 0:fb7af294d5d9 28 virtual void get_mac_address(uint8_t *mac) = 0;
Simon Cooksey 0:fb7af294d5d9 29
Simon Cooksey 0:fb7af294d5d9 30 /** Set the mac address of this physical interface
Simon Cooksey 0:fb7af294d5d9 31 *
Simon Cooksey 0:fb7af294d5d9 32 */
Simon Cooksey 0:fb7af294d5d9 33 virtual void set_mac_address(uint8_t *mac) = 0;
Simon Cooksey 0:fb7af294d5d9 34
Simon Cooksey 0:fb7af294d5d9 35 protected:
Simon Cooksey 0:fb7af294d5d9 36 NanostackRfPhy() {}
Simon Cooksey 0:fb7af294d5d9 37 virtual ~NanostackRfPhy() {}
Simon Cooksey 0:fb7af294d5d9 38 };
Simon Cooksey 0:fb7af294d5d9 39
Simon Cooksey 0:fb7af294d5d9 40 #endif /* NANOSTACK_INTERFACE_H_ */