feat: 取收据缓冲区改为24块

This commit is contained in:
yuanQie 2025-06-15 21:49:51 +08:00
parent e799a80021
commit 0133847d4f

View File

@ -65,7 +65,7 @@ struct sockaddr_in server_addr_case52; //
int mem_fd_case52; // 统一文件描述符
ssize_t send_len;
void *ucp4008_ctrl_mmap_base; // 接受开关映射地址
void *map_base_rx_case52; // RX映射地址 8
void *map_base_rx_case52; // RX映射地址 24
void *map_base_rxf_case52; // wr 计数映射地址
uint8_t w_idx, r_idx; // RX 信号
uint16_t udp_data_buffer[8008];
@ -252,13 +252,13 @@ void *handleUdpTransmission(void *arg)
}
r_idx ++ ;
}
r_idx = r_idx % 8;
r_idx = r_idx % 24;
}
else //r_idx > w_idx
{
// printf("[while(w)]: w_idx = %hhu, r_idx = %hhu\n", w_idx, r_idx);
// printf("[while(w)]: w_idx < r_idx\n");
for (cut_i = 0; cut_i < (8-r_idx); cut_i++)
for (cut_i = 0; cut_i < (24-r_idx); cut_i++)
{
memcpy(udp_data_buffer,
(char*)map_base_rx_case52 + (r_idx+cut_i) * 16016,
@ -298,7 +298,7 @@ void *handleUdpTransmission(void *arg)
}
r_idx ++;
}
r_idx = r_idx % 8;
r_idx = r_idx % 24;
}
}
}