rptun_ping: add sleep param to rptun_ping

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-05-11 12:20:54 +08:00 committed by Xiang Xiao
parent f9bcf1d645
commit a014a19f0e
2 changed files with 3 additions and 0 deletions

View File

@ -161,6 +161,8 @@ int rptun_ping(FAR struct rpmsg_endpoint *ept,
min = MIN(min, tm);
max = MAX(max, tm);
total += tm;
usleep(ping->sleep * USEC_PER_MSEC);
}
syslog(LOG_INFO, "current CPU freq: %" PRIu32 ", ping times: %d\n",

View File

@ -349,6 +349,7 @@ struct rptun_ping_s
int times;
int len;
bool ack;
int sleep; /* unit: ms */
};
/****************************************************************************