Use this interface to connect to and interact with the WNC M14A2A LTE Cellular Data Module which is provided by Wistron NeWeb Corporation (WNC) when using ARMmbed v5. The interface provides a Networking interface that can be used with the AT&T Cellular IoT Starter Kit that is sold by Avnet (http://cloudconnectkits.org/product/att-cellular-iot-starter-kit).
Dependencies: WncControllerK64F
Dependents: easy-connect-wnc easy-connect easy-connect111
WNCDebug.h
00001 00002 #ifndef __WNCDEBUG__ 00003 #define __WNCDEBUG__ 00004 #include <stdio.h> 00005 #include "BufferedSerial.h" 00006 00007 00008 class WNCDebug 00009 { 00010 public: 00011 WNCDebug( FILE * fd = stderr ): m_puart(NULL) {m_stdiofp=fd;}; 00012 WNCDebug( BufferedSerial * uart): m_stdiofp(NULL) {m_puart=uart;}; 00013 ~WNCDebug() {}; 00014 00015 int printf( char * fmt, ...) { 00016 char buffer[256]; 00017 int ret=0; 00018 va_list args; 00019 va_start (args, fmt); 00020 vsnprintf(buffer, sizeof(buffer), fmt, args); 00021 if( m_stdiofp ) 00022 ret=fputs(buffer,m_stdiofp); 00023 else 00024 ret=m_puart->puts(buffer); 00025 va_end (args); 00026 return ret; 00027 } 00028 00029 int putc( int c ) { 00030 int ret=0; 00031 if( m_stdiofp ) 00032 ret=fputc(c, m_stdiofp); 00033 else 00034 ret=m_puart->putc(c); 00035 return ret; 00036 } 00037 00038 int puts( const char * str ) { 00039 int ret=0; 00040 if( m_stdiofp ) 00041 ret=fputs(str,m_stdiofp); 00042 else 00043 ret=m_puart->puts(str); 00044 return ret; 00045 } 00046 00047 private: 00048 std::FILE *m_stdiofp; 00049 BufferedSerial *m_puart; 00050 }; 00051 #endif
Generated on Wed Jul 13 2022 08:07:17 by
1.7.2