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 #ifdef MBED_CONF_NANOSTACK_CONFIGURATION 00007 00008 #include "NanostackRfPhy.h" 00009 #include "PinNames.h" 00010 00011 // Arduino pin defaults for convenience 00012 #if !defined(SPIRIT1_SPI_MOSI) 00013 #define SPIRIT1_SPI_MOSI D11 00014 #endif 00015 #if !defined(SPIRIT1_SPI_MISO) 00016 #define SPIRIT1_SPI_MISO D12 00017 #endif 00018 #if !defined(SPIRIT1_SPI_SCLK) 00019 #define SPIRIT1_SPI_SCLK D13 00020 #endif 00021 #if !defined(SPIRIT1_DEV_IRQ) 00022 #define SPIRIT1_DEV_IRQ D9 00023 #endif 00024 #if !defined(SPIRIT1_DEV_CS) 00025 #define SPIRIT1_DEV_CS D10 00026 #endif 00027 #if !defined(SPIRIT1_DEV_SDN) 00028 #define SPIRIT1_DEV_SDN D2 00029 #endif 00030 #if !defined(SPIRIT1_BRD_LED) 00031 #define SPIRIT1_BRD_LED NC 00032 #endif 00033 00034 class NanostackRfPhySpirit1 : public NanostackRfPhy { 00035 public: 00036 NanostackRfPhySpirit1(PinName spi_mosi, PinName spi_miso, PinName spi_sclk, 00037 PinName dev_irq, PinName dev_cs, PinName dev_sdn, PinName brd_led); 00038 ~NanostackRfPhySpirit1(); 00039 int8_t rf_register(); 00040 void rf_unregister(); 00041 void get_mac_address(uint8_t *mac); 00042 void set_mac_address(uint8_t *mac); 00043 00044 private: 00045 void rf_init(void); 00046 00047 const PinName _spi_mosi; 00048 const PinName _spi_miso; 00049 const PinName _spi_sclk; 00050 const PinName _dev_irq; 00051 const PinName _dev_cs; 00052 const PinName _dev_sdn; 00053 const PinName _brd_led; 00054 }; 00055 00056 #endif /* MBED_CONF_NANOSTACK_CONFIGURATION */ 00057 #endif /* NANOSTACK_RF_PHY_SPIRIT1_H_ */
Generated on Tue Jul 12 2022 16:35:33 by
