Skip to content

Commit

Permalink
Small tweaks. Rename test mode, add some pull resistors.
Browse files Browse the repository at this point in the history
  • Loading branch information
androda committed Oct 12, 2023
1 parent 6da6061 commit ea8d3df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/BlueSCSI_platform_RP2040/BlueSCSI_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ void platform_init()
gpio_conf(scsi_pins.OUT_IO, GPIO_FUNC_SIO, true, false, true, true, false);
gpio_conf(scsi_pins.OUT_REQ, GPIO_FUNC_SIO, true, false, true, true, false);

// Determine whether initiator and I2C are supported
// Determine whether I2C is supported
// If G16 and G17 are high, this is the 2023_09a revision or later desktop board
gpio_conf(GPIO_I2C_SCL, GPIO_FUNC_I2C, false, false, false, false, true);
gpio_conf(GPIO_I2C_SDA, GPIO_FUNC_I2C, false, false, false, false, true);
delay(10);
bool d50_2023_09a = gpio_get(GPIO_I2C_SCL) && gpio_get(GPIO_I2C_SDA);

if (d50_2023_09a) {
log("Initiator and I2C Supported");
log("I2C Supported");
g_supports_initiator = true;
gpio_conf(GPIO_I2C_SCL, GPIO_FUNC_I2C, true, false, false, true, true);
gpio_conf(GPIO_I2C_SDA, GPIO_FUNC_I2C, true, false, false, true, true);
Expand All @@ -156,7 +156,7 @@ void platform_init()
} else {
/* Check option switch settings */
// Option switches: S1 is iATN, S2 is iACK
gpio_conf(scsi_pins.IN_ACK, GPIO_FUNC_SIO, false, false, false, false, false);
gpio_conf(scsi_pins.IN_ACK, GPIO_FUNC_SIO, true, false, false, false, false);
gpio_conf(scsi_pins.IN_ATN, GPIO_FUNC_SIO, false, false, false, false, false);
delay(10); /// Settle time
// Check option switches
Expand Down Expand Up @@ -271,7 +271,7 @@ void platform_late_init()

// SCSI control inputs
// pin function pup pdown out state fast
gpio_conf(scsi_pins.IN_ACK, GPIO_FUNC_SIO, false, false, false, true, false);
gpio_conf(scsi_pins.IN_ACK, GPIO_FUNC_SIO, true, false, false, true, false);
gpio_conf(scsi_pins.IN_ATN, GPIO_FUNC_SIO, false, false, false, true, false);
gpio_conf(scsi_pins.IN_RST, GPIO_FUNC_SIO, true, false, false, true, false);

Expand All @@ -292,7 +292,7 @@ void platform_late_init()
gpio_conf(scsi_pins.IN_BSY, GPIO_FUNC_SIO, true, false, false, true, false);
gpio_conf(scsi_pins.IN_RST, GPIO_FUNC_SIO, true, false, false, true, false);
gpio_conf(scsi_pins.OUT_SEL, GPIO_FUNC_SIO, false,false, true, true, true);
gpio_conf(scsi_pins.OUT_ACK, GPIO_FUNC_SIO, false,false, true, true, true);
gpio_conf(scsi_pins.OUT_ACK, GPIO_FUNC_SIO, true,false, true, true, true);
//gpio_conf(SCSI_OUT_ATN, GPIO_FUNC_SIO, false,false, true, true, true); // ATN output is unused
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/BlueSCSI_platform_RP2040/scsiHostPhy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,5 @@ void scsiHostPhyRelease()
{
scsiLogInitiatorPhaseChange(BUS_FREE);
SCSI_RELEASE_OUTPUTS();
SCSI_RELEASE_DATA_REQ();
}
2 changes: 1 addition & 1 deletion src/BlueSCSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static void reinitSCSI()
{
g_log_debug = true;
}
if (ini_getbool("SCSI", "TESTMODE", 0, CONFIGFILE))
if (ini_getbool("SCSI", "TestMode", 0, CONFIGFILE))
{
g_test_mode = true;
}
Expand Down

0 comments on commit ea8d3df

Please sign in to comment.