mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-23 22:29:15 +01:00
[SC64][SW] Fix timeout issues on slow backends in sc64deployer
This commit is contained in:
parent
04cecb1955
commit
d12bfaabf6
@ -59,8 +59,8 @@ const FTDI_PREFIX: &str = "ftdi://";
|
||||
|
||||
const RESET_TIMEOUT: Duration = Duration::from_secs(1);
|
||||
const POLL_TIMEOUT: Duration = Duration::from_millis(5);
|
||||
const READ_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
const WRITE_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
const READ_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
const WRITE_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
|
||||
pub trait Backend {
|
||||
fn read(&mut self, buffer: &mut [u8]) -> std::io::Result<usize>;
|
||||
|
@ -102,7 +102,7 @@ const ISV_BUFFER_LENGTH: usize = 64 * 1024;
|
||||
|
||||
pub const MEMORY_LENGTH: usize = 0x0500_2980;
|
||||
|
||||
const MEMORY_CHUNK_LENGTH: usize = 8 * 1024 * 1024;
|
||||
const MEMORY_CHUNK_LENGTH: usize = 1 * 1024 * 1024;
|
||||
|
||||
impl SC64 {
|
||||
fn command_identifier_get(&mut self) -> Result<[u8; 4], Error> {
|
||||
@ -717,7 +717,7 @@ impl SC64 {
|
||||
|
||||
pub fn test_usb_speed(&mut self, direction: SpeedTestDirection) -> Result<f64, Error> {
|
||||
const TEST_ADDRESS: u32 = SDRAM_ADDRESS;
|
||||
const TEST_LENGTH: usize = 16 * 1024 * 1024;
|
||||
const TEST_LENGTH: usize = 8 * 1024 * 1024;
|
||||
const MIB_DIVIDER: f64 = 1024.0 * 1024.0;
|
||||
|
||||
let data = vec![0x00; TEST_LENGTH];
|
||||
|
@ -17,8 +17,8 @@ struct StreamHandler {
|
||||
writer: std::io::BufWriter<std::net::TcpStream>,
|
||||
}
|
||||
|
||||
const READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(5);
|
||||
const WRITE_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(5);
|
||||
const READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10);
|
||||
const WRITE_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10);
|
||||
const KEEPALIVE_PERIOD: std::time::Duration = std::time::Duration::from_secs(5);
|
||||
|
||||
impl StreamHandler {
|
||||
|
Loading…
Reference in New Issue
Block a user