feat: 为防止上位机接收数据过慢,收到上位机消息后主动等待3秒再打开硬件接收开关
This commit is contained in:
parent
080a92724f
commit
20e32469fe
@ -79,8 +79,8 @@ int main(int argc, char **argv) {
|
|||||||
printf("[recvfrom]:%s\n", buffer);
|
printf("[recvfrom]:%s\n", buffer);
|
||||||
|
|
||||||
if (strcmp(buffer, "ok") == 0) {
|
if (strcmp(buffer, "ok") == 0) {
|
||||||
|
usleep(2000000);
|
||||||
printf("[mmap]:wr...\n");
|
printf("[mmap]:wr...\n");
|
||||||
sleep(1);
|
|
||||||
mapped_addr = (volatile uint32_t *)ucp4008_ctrl_mmap_base;
|
mapped_addr = (volatile uint32_t *)ucp4008_ctrl_mmap_base;
|
||||||
*mapped_addr = 0xA5A55A5A;
|
*mapped_addr = 0xA5A55A5A;
|
||||||
munmap(ucp4008_ctrl_mmap_base, PAGE_SIZE);
|
munmap(ucp4008_ctrl_mmap_base, PAGE_SIZE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user