Communicate to bluetooth devices or wifi per at-commands
Diff: at.cpp
- Revision:
- 3:cdabd56aec53
- Parent:
- 2:b8d28a4f6b02
- Child:
- 4:96aa57261092
--- a/at.cpp Sun Aug 19 07:51:33 2018 +0000 +++ b/at.cpp Sun Aug 19 16:58:17 2018 +0000 @@ -98,13 +98,13 @@ char *atterm::getAnswer(uint32_t timeout) { int b = 0; - int t_time = 0; + uint32_t t_time = 0; char sign, sign1; memset(read_timed_buffer, 0, sizeof(read_timed_buffer)); t.start(); - t_time = t.read(); + t_time = t.read_ms(); while(1) { if(atserial0.readable()) { @@ -118,7 +118,7 @@ read_timed_buffer[b] = sign1; b ++; } - if((t.read() - t_time) > timeout) { + if((t.read_ms() - t_time) > timeout) { t.stop(); t.reset(); break;