modified to get more signal info
Dependencies: WncControllerModified
Fork of WncControllerK64F by
Revision 23:43a36c66c574, committed 2016-11-17
- Comitter:
- fkellermavnet
- Date:
- Thu Nov 17 15:31:35 2016 +0000
- Parent:
- 22:9b9cb0d95f51
- Child:
- 24:7244f8c64aa0
- Commit message:
- Removed direct usage of debug UART for debug. Added check for debug uart NULL pointer.
Changed in this revision
diff -r 9b9cb0d95f51 -r 43a36c66c574 WncController.lib --- a/WncController.lib Wed Nov 16 18:18:56 2016 +0000 +++ b/WncController.lib Thu Nov 17 15:31:35 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/fkellermavnet/code/WncControllerLibrary/#6512f41ac6f0 +https://developer.mbed.org/users/fkellermavnet/code/WncControllerLibrary/#2958e09ad308
diff -r 9b9cb0d95f51 -r 43a36c66c574 WncControllerK64F.cpp --- a/WncControllerK64F.cpp Wed Nov 16 18:18:56 2016 +0000 +++ b/WncControllerK64F.cpp Thu Nov 17 15:31:35 2016 +0000 @@ -19,8 +19,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - @file WncController.cpp - @purpose Controls WNC Cellular Modem + @file WncControllerK64F.cpp + @purpose Contains K64F and mbed specifics to control the WNC modem using the WncController base class. @version 1.0 @date July 2016 @author Fred Kellerman @@ -70,7 +70,6 @@ } } - int WncControllerK64F::putc(char c) { return (m_pWncUart->putc(c)); @@ -146,15 +145,13 @@ // Toggle wakeup to prevent future dropped 'A' of "AT", this was // suggested by ATT. if (res == true) { - if (m_pDbgUart != NULL) - m_pDbgUart->puts("\r\nToggling Wakeup...\r\n"); + dbgPuts("\r\nToggling Wakeup..."); waitMs(20); *m_gpioPinList.mdm_wakeup_in = 0; waitMs(2000); *m_gpioPinList.mdm_wakeup_in = 1; waitMs(20); - if (m_pDbgUart != NULL) - m_pDbgUart->puts("Toggling complete.\r\n"); + dbgPuts("Toggling complete."); } return (res);
diff -r 9b9cb0d95f51 -r 43a36c66c574 WncControllerK64F.h --- a/WncControllerK64F.h Wed Nov 16 18:18:56 2016 +0000 +++ b/WncControllerK64F.h Thu Nov 17 15:31:35 2016 +0000 @@ -19,8 +19,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - @file WncController.h - @purpose Controls WNC Cellular Modem + @file WncControllerK64F.h + @purpose Contains K64F and mbed specifics to control the WNC modem using the WncController base class. @version 1.0 @date July 2016 @author Fred Kellerman @@ -40,6 +40,7 @@ using namespace WncController_fk; using namespace std; +/** List of K64F pins that are used to control and setup the ATT IoT Kit WNC Shield */ struct WncGpioPinListK64F { ///////////////////////////////////////////////////// // NXP GPIO Pins that are used to initialize the WNC Shield @@ -52,45 +53,49 @@ DigitalOut * mdm_uart1_cts; }; + +/** + * @author Fred Kellerman + * @see API + * + * <b>WncControllerK64F</b> This mbed C++ class is for controlling the WNC + * Cellular modem from the NXP K64F Freedom board. It uses the control code + * from it's base class WncController to handle the WNC Modem AT cmds. This + * class fulfills various pure virtual methods of the base class. The point of + * this class is to have the platform specific code in it thus isolating the + * control code logic from any particular platform or OS. + */ class WncControllerK64F : public WncController { public: + /** - * \brief Constructor for UART controlled WNC - * - * \param [in] wnc_uart - Reference to a SerialBuffered object which will - * be used as the bus to control the WNC. apnStr = a text string for - * the cellular APN name. * - * \return None. - * - * \details Adding another way to talk to the WNC, like I2C or USB, - * a constructor should be added for each type just like the SerialBuffered - * constructor below. Assumes UART is enabled, setup and ready to go. This - * class will read and write to this UART. + * Sets up the resources to control the WNC modem shield. + * @ingroup API + * @param pPins - pointer to a list of K64F pins that are used to setup and control the ATT IoT Kit's WNC Shield. + * @param wnc_uart - a pointer to the serial uart that is used to communicate with the WNC modem. + * @param debug_uart - a pointer to a serial uart for the debug output to go out of, if NULL debug will not be output. */ WncControllerK64F(struct WncGpioPinListK64F * pPins, MODSERIAL * wnc_uart, MODSERIAL * debug_uart = NULL); /** - * \brief Activates a mode where the user can send text to and from the K64F - * debug Serial port directly to the WNC. * - * \param [in] echoOn - set to true to enable terminal echo - * - * \return true - if terminal mode was successfully entered and exited. - * - * \details Activates a mode where the user can send text to and from the K64F + * Activates a mode where the user can send text to and from the K64F * debug Serial port directly to the WNC. The mode is entered via this * call. The mode is exited when the user types CTRL-Q. While in this * mode all text to and from the WNC is consumed by the debug Serial port. * No other methods in the class will receive any of the WNC output. + * @ingroup API + * @param pUart - a pointer to a uart to use to collect the user input and put the output from the WNC. + * @param echoOn - set to true to echo what is input back to the output of pUart. */ bool enterWncTerminalMode(MODSERIAL *pUart, bool echoOn); private: // Disallow copy -// WncControllerK64F operator=(WncControllerK64F lhs); + WncControllerK64F operator=(WncControllerK64F lhs); // Users must define these functionalities: virtual int putc(char c);