Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
NanostackRfPhySpirit1.h
00001 #ifndef NANOSTACK_RF_PHY_SPIRIT1_H_ 00002 #define NANOSTACK_RF_PHY_SPIRIT1_H_ 00003 00004 #include <stdint.h> 00005 00006 #include "NanostackRfPhy.h" 00007 #include "PinNames.h" 00008 00009 // Arduino pin defaults for convenience 00010 #if !defined(SPIRIT1_SPI_MOSI) 00011 #define SPIRIT1_SPI_MOSI D11 00012 #endif 00013 #if !defined(SPIRIT1_SPI_MISO) 00014 #define SPIRIT1_SPI_MISO D12 00015 #endif 00016 #if !defined(SPIRIT1_SPI_SCLK) 00017 #define SPIRIT1_SPI_SCLK D13 00018 #endif 00019 #if !defined(SPIRIT1_DEV_IRQ) 00020 #define SPIRIT1_DEV_IRQ D9 00021 #endif 00022 #if !defined(SPIRIT1_DEV_CS) 00023 #define SPIRIT1_DEV_CS D10 00024 #endif 00025 #if !defined(SPIRIT1_DEV_SDN) 00026 #define SPIRIT1_DEV_SDN D2 00027 #endif 00028 #if !defined(SPIRIT1_BRD_LED) 00029 #define SPIRIT1_BRD_LED NC 00030 #endif 00031 00032 class NanostackRfPhySpirit1 : public NanostackRfPhy { 00033 public: 00034 NanostackRfPhySpirit1(PinName spi_mosi, PinName spi_miso, PinName spi_sclk, 00035 PinName dev_irq, PinName dev_cs, PinName dev_sdn, PinName brd_led); 00036 ~NanostackRfPhySpirit1(); 00037 int8_t rf_register(); 00038 void rf_unregister(); 00039 void get_mac_address(uint8_t *mac); 00040 void set_mac_address(uint8_t *mac); 00041 00042 private: 00043 void rf_init(void); 00044 00045 const PinName _spi_mosi; 00046 const PinName _spi_miso; 00047 const PinName _spi_sclk; 00048 const PinName _dev_irq; 00049 const PinName _dev_cs; 00050 const PinName _dev_sdn; 00051 const PinName _brd_led; 00052 }; 00053 00054 #endif /* NANOSTACK_RF_PHY_SPIRIT1_H_ */
Generated on Wed Jul 13 2022 01:16:06 by
1.7.2