21
21
#include " ATCmdParser.h"
22
22
#include " mbed_poll.h"
23
23
#include " mbed_debug.h"
24
- #include < stdio.h>
25
- #include < stdlib.h>
26
- #include < string.h>
27
24
28
25
#ifdef LF
29
26
#undef LF
@@ -105,7 +102,7 @@ int ATCmdParser::read(char *data, int size)
105
102
106
103
107
104
// printf/scanf handling
108
- int ATCmdParser::vprintf (const char *format, std:: va_list args)
105
+ int ATCmdParser::vprintf (const char *format, va_list args)
109
106
{
110
107
111
108
if (vsprintf (_buffer, format, args) < 0 ) {
@@ -121,7 +118,7 @@ int ATCmdParser::vprintf(const char *format, std::va_list args)
121
118
return i;
122
119
}
123
120
124
- int ATCmdParser::vscanf (const char *format, std:: va_list args)
121
+ int ATCmdParser::vscanf (const char *format, va_list args)
125
122
{
126
123
// Since format is const, we need to copy it into our buffer to
127
124
// add the line's null terminator and clobber value-matches with asterisks.
@@ -184,7 +181,7 @@ int ATCmdParser::vscanf(const char *format, std::va_list args)
184
181
185
182
186
183
// Command parsing with line handling
187
- bool ATCmdParser::vsend (const char *command, std:: va_list args)
184
+ bool ATCmdParser::vsend (const char *command, va_list args)
188
185
{
189
186
// Create and send command
190
187
if (vsprintf (_buffer, command, args) < 0 ) {
@@ -208,7 +205,7 @@ bool ATCmdParser::vsend(const char *command, std::va_list args)
208
205
return true ;
209
206
}
210
207
211
- bool ATCmdParser::vrecv (const char *response, std:: va_list args)
208
+ bool ATCmdParser::vrecv (const char *response, va_list args)
212
209
{
213
210
restart:
214
211
_aborted = false ;
@@ -341,7 +338,7 @@ bool ATCmdParser::vrecv(const char *response, std::va_list args)
341
338
// Mapping to vararg functions
342
339
int ATCmdParser::printf (const char *format, ...)
343
340
{
344
- std:: va_list args;
341
+ va_list args;
345
342
va_start (args, format);
346
343
int res = vprintf (format, args);
347
344
va_end (args);
@@ -350,7 +347,7 @@ int ATCmdParser::printf(const char *format, ...)
350
347
351
348
int ATCmdParser::scanf (const char *format, ...)
352
349
{
353
- std:: va_list args;
350
+ va_list args;
354
351
va_start (args, format);
355
352
int res = vscanf (format, args);
356
353
va_end (args);
@@ -359,7 +356,7 @@ int ATCmdParser::scanf(const char *format, ...)
359
356
360
357
bool ATCmdParser::send (const char *command, ...)
361
358
{
362
- std:: va_list args;
359
+ va_list args;
363
360
va_start (args, command);
364
361
bool res = vsend (command, args);
365
362
va_end (args);
@@ -368,7 +365,7 @@ bool ATCmdParser::send(const char *command, ...)
368
365
369
366
bool ATCmdParser::recv (const char *response, ...)
370
367
{
371
- std:: va_list args;
368
+ va_list args;
372
369
va_start (args, response);
373
370
bool res = vrecv (response, args);
374
371
va_end (args);
0 commit comments