Skip to content

Commit

Permalink
Remove linefeeds from debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Seppo Takalo authored and adbridge committed Nov 18, 2019
1 parent 1a90105 commit 4f86135
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ QSPIFBlockDevice::QSPIFBlockDevice(PinName io0, PinName io1, PinName io2, PinNam
_unique_device_status = add_new_csel_instance(csel);

if (_unique_device_status == 0) {
tr_debug("Adding a new QSPIFBlockDevice csel: %d\n", (int)csel);
tr_debug("Adding a new QSPIFBlockDevice csel: %d", (int)csel);
} else if (_unique_device_status == -1) {
tr_error("QSPIFBlockDevice with the same csel(%d) already exists\n", (int)csel);
tr_error("QSPIFBlockDevice with the same csel(%d) already exists", (int)csel);
} else {
tr_error("Too many different QSPIFBlockDevice devices - max allowed: %d\n", QSPIF_MAX_ACTIVE_FLASH_DEVICES);
tr_error("Too many different QSPIFBlockDevice devices - max allowed: %d", QSPIF_MAX_ACTIVE_FLASH_DEVICES);
}
}

Expand Down Expand Up @@ -199,7 +199,7 @@ int QSPIFBlockDevice::init()
goto exit_point;
}

tr_debug("Vendor device ID = 0x%x 0x%x 0x%x 0x%x \n", vendor_device_ids[0],
tr_debug("Vendor device ID = 0x%x 0x%x 0x%x 0x%x", vendor_device_ids[0],
vendor_device_ids[1], vendor_device_ids[2], vendor_device_ids[3]);
switch (vendor_device_ids[0]) {
case 0xbf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int SPIFBlockDevice::init()
status = SPIF_BD_ERROR_DEVICE_ERROR;
goto exit_point;
} else {
tr_debug("Initialize flash memory OK\n");
tr_debug("Initialize flash memory OK");
}

/* Read Manufacturer ID (1byte), and Device ID (2bytes)*/
Expand Down Expand Up @@ -907,21 +907,21 @@ int SPIFBlockDevice::_reset_flash_mem()
// Perform Soft Reset of the Device prior to initialization
int status = 0;
char status_value[2] = {0};
tr_info("_reset_flash_mem:\n");
tr_info("_reset_flash_mem:");
//Read the Status Register from device
if (SPIF_BD_ERROR_OK == _spi_send_general_command(SPIF_RDSR, SPI_NO_ADDRESS_COMMAND, NULL, 0, status_value, 1)) {
// store received values in status_value
tr_debug("Reading Status Register Success: value = 0x%x\n", (int)status_value[0]);
tr_debug("Reading Status Register Success: value = 0x%x", (int)status_value[0]);
} else {
tr_error("Reading Status Register failed\n");
tr_error("Reading Status Register failed");
status = -1;
}

if (0 == status) {
//Send Reset Enable
if (SPIF_BD_ERROR_OK == _spi_send_general_command(SPIF_RSTEN, SPI_NO_ADDRESS_COMMAND, NULL, 0, NULL, 0)) {
// store received values in status_value
tr_debug("Sending RSTEN Success\n");
tr_debug("Sending RSTEN Success");
} else {
tr_error("Sending RSTEN failed");
status = -1;
Expand All @@ -931,7 +931,7 @@ int SPIFBlockDevice::_reset_flash_mem()
//Send Reset
if (SPIF_BD_ERROR_OK == _spi_send_general_command(SPIF_RST, SPI_NO_ADDRESS_COMMAND, NULL, 0, NULL, 0)) {
// store received values in status_value
tr_debug("Sending RST Success\n");
tr_debug("Sending RST Success");
} else {
tr_error("Sending RST failed");
status = -1;
Expand Down

0 comments on commit 4f86135

Please sign in to comment.