HF-A11 Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
58
else
do nothing;
function do_recv_ack_cmd()
if (receiv RECV ACK and check OK & is_waiting_for_recv_ack)
{
agree_data.+;
agree_data.
waiting_4_recv_ack=
0;
to use the received data;
}
else
do nothing;
function main()
……
char cmd;
init_agree_str();
init_pccom_port();
do
if (read one byte from uart -> cmd)
{
if (cmd == 0x01)
do_send_ack_cmd();
else if (cmd == 0x02)
do_recv_ack_cmd();
}
if (want_to_send_data | is_wait_for_send_ack)
do_send_cmd();
if (want_to_recv_data | is_wait_for_recv_ack)
do_recv_cmd();
while
(…)
High-Flying