This is a SLIP interface for the STM32F446RE Nucleo Board. It is designed to work specifically with the esp-link software for the ESP8266. The program is an example of a rest command.
STMClientCmd.cpp@0:70a6082c1bf7, 2016-07-14 (annotated)
- Committer:
- ShaneKirkbride
- Date:
- Thu Jul 14 20:38:18 2016 +0000
- Revision:
- 0:70a6082c1bf7
first commit. Rest example working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ShaneKirkbride | 0:70a6082c1bf7 | 1 | |
ShaneKirkbride | 0:70a6082c1bf7 | 2 | #include "STMClientCmd.h" |
ShaneKirkbride | 0:70a6082c1bf7 | 3 | |
ShaneKirkbride | 0:70a6082c1bf7 | 4 | STMClientCmd::STMClientCmd(STMClient* elc) :_elc(elc) {} |
ShaneKirkbride | 0:70a6082c1bf7 | 5 | |
ShaneKirkbride | 0:70a6082c1bf7 | 6 | uint32_t STMClientCmd::GetTime() { |
ShaneKirkbride | 0:70a6082c1bf7 | 7 | _elc->Request(CMD_GET_TIME, 0, 0); |
ShaneKirkbride | 0:70a6082c1bf7 | 8 | _elc->Request(); |
ShaneKirkbride | 0:70a6082c1bf7 | 9 | |
ShaneKirkbride | 0:70a6082c1bf7 | 10 | STMClientPacket *pkt = _elc->WaitReturn(); |
ShaneKirkbride | 0:70a6082c1bf7 | 11 | return pkt ? pkt->value : 0; |
ShaneKirkbride | 0:70a6082c1bf7 | 12 | } |