easy connect wnc added to http request with debug mode enabled. traces collected for AT%CGEQOS, AT%MEAS, AT%PCONI
Dependencies: WNC14A2AInterface-httpmodified
Fork of easy-connect by
mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h@8:54ac58ec99d5, 2017-12-14 (annotated)
- Committer:
- nrithya
- Date:
- Thu Dec 14 00:33:15 2017 +0000
- Revision:
- 8:54ac58ec99d5
- Parent:
- 0:2563b0415d1f
easy connect wnc added to http request with debug mode enabled. traces collected for AT%CGEQOS, AT%MEAS, AT%PCONI
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JMF | 0:2563b0415d1f | 1 | /* |
JMF | 0:2563b0415d1f | 2 | * Copyright (c) 2014-2015 ARM Limited. All rights reserved. |
JMF | 0:2563b0415d1f | 3 | * SPDX-License-Identifier: Apache-2.0 |
JMF | 0:2563b0415d1f | 4 | * Licensed under the Apache License, Version 2.0 (the License); you may |
JMF | 0:2563b0415d1f | 5 | * not use this file except in compliance with the License. |
JMF | 0:2563b0415d1f | 6 | * You may obtain a copy of the License at |
JMF | 0:2563b0415d1f | 7 | * |
JMF | 0:2563b0415d1f | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
JMF | 0:2563b0415d1f | 9 | * |
JMF | 0:2563b0415d1f | 10 | * Unless required by applicable law or agreed to in writing, software |
JMF | 0:2563b0415d1f | 11 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
JMF | 0:2563b0415d1f | 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
JMF | 0:2563b0415d1f | 13 | * See the License for the specific language governing permissions and |
JMF | 0:2563b0415d1f | 14 | * limitations under the License. |
JMF | 0:2563b0415d1f | 15 | */ |
JMF | 0:2563b0415d1f | 16 | |
JMF | 0:2563b0415d1f | 17 | #ifndef NANOSTACK_PHY_MCR20A_H_ |
JMF | 0:2563b0415d1f | 18 | #define NANOSTACK_PHY_MCR20A_H_ |
JMF | 0:2563b0415d1f | 19 | |
JMF | 0:2563b0415d1f | 20 | #include "mbed.h" |
JMF | 0:2563b0415d1f | 21 | #include "NanostackRfPhy.h" |
JMF | 0:2563b0415d1f | 22 | |
JMF | 0:2563b0415d1f | 23 | // Arduino pin defaults for convenience |
JMF | 0:2563b0415d1f | 24 | #if !defined(MCR20A_SPI_MOSI) |
JMF | 0:2563b0415d1f | 25 | #define MCR20A_SPI_MOSI D11 |
JMF | 0:2563b0415d1f | 26 | #endif |
JMF | 0:2563b0415d1f | 27 | #if !defined(MCR20A_SPI_MISO) |
JMF | 0:2563b0415d1f | 28 | #define MCR20A_SPI_MISO D12 |
JMF | 0:2563b0415d1f | 29 | #endif |
JMF | 0:2563b0415d1f | 30 | #if !defined(MCR20A_SPI_SCLK) |
JMF | 0:2563b0415d1f | 31 | #define MCR20A_SPI_SCLK D13 |
JMF | 0:2563b0415d1f | 32 | #endif |
JMF | 0:2563b0415d1f | 33 | #if !defined(MCR20A_SPI_CS) |
JMF | 0:2563b0415d1f | 34 | #define MCR20A_SPI_CS D10 |
JMF | 0:2563b0415d1f | 35 | #endif |
JMF | 0:2563b0415d1f | 36 | #if !defined(MCR20A_SPI_RST) |
JMF | 0:2563b0415d1f | 37 | #define MCR20A_SPI_RST D5 |
JMF | 0:2563b0415d1f | 38 | #endif |
JMF | 0:2563b0415d1f | 39 | #if !defined(MCR20A_SPI_IRQ) |
JMF | 0:2563b0415d1f | 40 | #define MCR20A_SPI_IRQ D2 |
JMF | 0:2563b0415d1f | 41 | #endif |
JMF | 0:2563b0415d1f | 42 | |
JMF | 0:2563b0415d1f | 43 | class NanostackRfPhyMcr20a : public NanostackRfPhy { |
JMF | 0:2563b0415d1f | 44 | public: |
JMF | 0:2563b0415d1f | 45 | NanostackRfPhyMcr20a(PinName spi_mosi, PinName spi_miso, |
JMF | 0:2563b0415d1f | 46 | PinName spi_sclk, PinName spi_cs, PinName spi_rst, |
JMF | 0:2563b0415d1f | 47 | PinName spi_irq); |
JMF | 0:2563b0415d1f | 48 | ~NanostackRfPhyMcr20a(); |
JMF | 0:2563b0415d1f | 49 | int8_t rf_register(); |
JMF | 0:2563b0415d1f | 50 | void rf_unregister(); |
JMF | 0:2563b0415d1f | 51 | void get_mac_address(uint8_t *mac); |
JMF | 0:2563b0415d1f | 52 | void set_mac_address(uint8_t *mac); |
JMF | 0:2563b0415d1f | 53 | |
JMF | 0:2563b0415d1f | 54 | private: |
JMF | 0:2563b0415d1f | 55 | SPI _spi; |
JMF | 0:2563b0415d1f | 56 | DigitalOut _rf_cs; |
JMF | 0:2563b0415d1f | 57 | DigitalOut _rf_rst; |
JMF | 0:2563b0415d1f | 58 | InterruptIn _rf_irq; |
JMF | 0:2563b0415d1f | 59 | DigitalIn _rf_irq_pin; |
JMF | 0:2563b0415d1f | 60 | |
JMF | 0:2563b0415d1f | 61 | void _pins_set(); |
JMF | 0:2563b0415d1f | 62 | void _pins_clear(); |
JMF | 0:2563b0415d1f | 63 | }; |
JMF | 0:2563b0415d1f | 64 | |
JMF | 0:2563b0415d1f | 65 | #endif /* NANOSTACK_PHY_MCR20A_H_ */ |