From ba068278146d7e41bc5d26a39f9d3c0b52e727fa Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 17 Feb 2024 11:21:26 -0800 Subject: [PATCH] Whitespace/Type cleanup --- src/BlueSCSI.cpp | 15 +++++++-------- src/BlueSCSI.h | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/BlueSCSI.cpp b/src/BlueSCSI.cpp index 4af7b26..20fd14a 100644 --- a/src/BlueSCSI.cpp +++ b/src/BlueSCSI.cpp @@ -339,7 +339,6 @@ bool hddimageOpen(SCSI_DEVICE *dev, FsFile *file,int id,int lun,int blocksize) return true; // File opened failed: - dev->m_file.close(); dev->m_fileSize = dev->m_blocksize = 0; // no file //delete dev->m_file; @@ -463,12 +462,12 @@ void setup() TRANSCEIVER_IO_SET(vTR_INITIATOR,TR_INPUT); #endif - //GPIO(SCSI BUS)Initialization - //Port setting register (lower) -// GPIOB->regs->CRL |= 0x000000008; // SET INPUT W/ PUPD on PAB-PB0 - //Port setting register (upper) - //GPIOB->regs->CRH = 0x88888888; // SET INPUT W/ PUPD on PB15-PB8 -// GPIOB->regs->ODR = 0x0000FF00; // SET PULL-UPs on PB15-PB8 + // GPIO(SCSI BUS)Initialization + // Port setting register (lower) + // GPIOB->regs->CRL |= 0x000000008; // SET INPUT W/ PUPD on PAB-PB0 + // Port setting register (upper) + // GPIOB->regs->CRH = 0x88888888; // SET INPUT W/ PUPD on PB15-PB8 + // GPIOB->regs->ODR = 0x0000FF00; // SET PULL-UPs on PB15-PB8 // DB and DP are input modes SCSI_DB_INPUT() @@ -635,7 +634,7 @@ void findDriveImages(FsFile root) { int lun = 0; int blk = 512; - // Positionally read in and coerase the chars to integers. + // Positionally read in and coerce the chars to integers. // We only require the minimum and read in the next if provided. int file_name_length = strlen(name); if(file_name_length > 2) { // HD[N] diff --git a/src/BlueSCSI.h b/src/BlueSCSI.h index f1eb0a7..3f3a410 100644 --- a/src/BlueSCSI.h +++ b/src/BlueSCSI.h @@ -182,7 +182,7 @@ enum SCSI_DEVICE_TYPE | 1 | 1 | 1 | MESSAGE IN | Initiator from target / | phase | |-----------------------------------------------------------------------------| | Key: 0 = False, 1 = True, * = Reserved for future standardization | -+=============================================================================+ ++=============================================================================+ */ // SCSI phase change as single write to port B #define SCSIPHASEMASK(MSGACTIVE, CDACTIVE, IOACTIVE) ((BITMASK(vMSG)<<((MSGACTIVE)?16:0)) | (BITMASK(vCD)<<((CDACTIVE)?16:0)) | (BITMASK(vIO)<<((IOACTIVE)?16:0))) @@ -340,15 +340,15 @@ typedef struct _SCSI_INQUIRY_DATA // HDD image typedef __attribute__((aligned(4))) struct _SCSI_DEVICE { - FsFile m_file; // File object - uint64_t m_fileSize; // File size - uint16_t m_blocksize; // SCSI BLOCK size + FsFile m_file; // File object + uint64_t m_fileSize; // File size + uint16_t m_blocksize; // SCSI BLOCK size uint16_t m_rawblocksize; // OPTICAL raw sector size uint8_t m_type; // SCSI device type uint32_t m_blockcount; // blockcount - SCSI_INQUIRY_DATA inquiry_block; // SCSI information + SCSI_INQUIRY_DATA inquiry_block; // SCSI information uint8_t m_senseKey; // Sense key - uint16_t m_additional_sense_code; // ASC/ASCQ + uint16_t m_additional_sense_code; // ASC/ASCQ uint8_t m_sector_offset; // optical sector offset for missing sync header uint8_t flags; // various device flags } SCSI_DEVICE;