mbed-os
Fork of mbed-os by
features/nanostack/FEATURE_NANOSTACK/nanostack-interface/NanostackRfPhy.h@0:f269e3021894, 2016-10-23 (annotated)
- Committer:
- elessair
- Date:
- Sun Oct 23 15:10:02 2016 +0000
- Revision:
- 0:f269e3021894
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
elessair | 0:f269e3021894 | 1 | /* |
elessair | 0:f269e3021894 | 2 | * Copyright (c) 2016 ARM Limited. All rights reserved. |
elessair | 0:f269e3021894 | 3 | */ |
elessair | 0:f269e3021894 | 4 | |
elessair | 0:f269e3021894 | 5 | #ifndef NANOSTACK_RF_PHY_H_ |
elessair | 0:f269e3021894 | 6 | #define NANOSTACK_RF_PHY_H_ |
elessair | 0:f269e3021894 | 7 | |
elessair | 0:f269e3021894 | 8 | class NanostackRfPhy { |
elessair | 0:f269e3021894 | 9 | public: |
elessair | 0:f269e3021894 | 10 | |
elessair | 0:f269e3021894 | 11 | /** Register this physical interface with Nanostack |
elessair | 0:f269e3021894 | 12 | * |
elessair | 0:f269e3021894 | 13 | * @return Device driver ID or a negative error |
elessair | 0:f269e3021894 | 14 | * code on failure |
elessair | 0:f269e3021894 | 15 | */ |
elessair | 0:f269e3021894 | 16 | virtual int8_t rf_register() = 0; |
elessair | 0:f269e3021894 | 17 | |
elessair | 0:f269e3021894 | 18 | /** Unregister this physical interface |
elessair | 0:f269e3021894 | 19 | * |
elessair | 0:f269e3021894 | 20 | */ |
elessair | 0:f269e3021894 | 21 | virtual void rf_unregister() = 0; |
elessair | 0:f269e3021894 | 22 | |
elessair | 0:f269e3021894 | 23 | /** Read the mac address of this physical interface |
elessair | 0:f269e3021894 | 24 | * |
elessair | 0:f269e3021894 | 25 | * Note - some devices do not have a mac address |
elessair | 0:f269e3021894 | 26 | * in hardware. |
elessair | 0:f269e3021894 | 27 | */ |
elessair | 0:f269e3021894 | 28 | virtual void get_mac_address(uint8_t *mac) = 0; |
elessair | 0:f269e3021894 | 29 | |
elessair | 0:f269e3021894 | 30 | /** Set the mac address of this physical interface |
elessair | 0:f269e3021894 | 31 | * |
elessair | 0:f269e3021894 | 32 | */ |
elessair | 0:f269e3021894 | 33 | virtual void set_mac_address(uint8_t *mac) = 0; |
elessair | 0:f269e3021894 | 34 | |
elessair | 0:f269e3021894 | 35 | protected: |
elessair | 0:f269e3021894 | 36 | NanostackRfPhy() {} |
elessair | 0:f269e3021894 | 37 | virtual ~NanostackRfPhy() {} |
elessair | 0:f269e3021894 | 38 | }; |
elessair | 0:f269e3021894 | 39 | |
elessair | 0:f269e3021894 | 40 | #endif /* NANOSTACK_INTERFACE_H_ */ |