Skip to content

Commit 1bca44f

Browse files
committed
modify astyle
1 parent 5f56a5e commit 1bca44f

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

storage/blockdevice/COMPONENT_SPINAND/include/SPINAND/SPINANDBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class SPINANDBlockDevice : public mbed::BlockDevice {
271271
/*********************************/
272272
/* Flash Configuration Functions */
273273
/*********************************/
274-
274+
275275
// Quad Enable in Sercurity Register
276276
int _set_quad_enable();
277277

storage/blockdevice/COMPONENT_SPINAND/source/SPINANDBlockDevice.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ using namespace mbed;
6363
#define SPINAND_BLOCK_PROT_BIT_SP 0x01
6464
#define SPINAND_BLOCK_PROT_BIT_COMPLE 0x02
6565
#define SPINAND_BLOCK_PROT_BIT_INVERT 0x04
66-
#define SPINAND_BLOCK_PROT_BIT_BP0 0x08
67-
#define SPINAND_BLOCK_PROT_BIT_BP1 0x10
68-
#define SPINAND_BLOCK_PROT_BIT_BP2 0x20
66+
#define SPINAND_BLOCK_PROT_BIT_BP0 0x08
67+
#define SPINAND_BLOCK_PROT_BIT_BP1 0x10
68+
#define SPINAND_BLOCK_PROT_BIT_BP2 0x20
6969
#define SPINAND_BLOCK_PROT_BIT_BPRWD 0x80
7070
#define SPINAND_BLOCK_PROT_BIT_BP_MASK 0x38
7171

72-
#define SPINAND_BLOCK_PROT_BP_OFFSET 3
72+
#define SPINAND_BLOCK_PROT_BP_OFFSET 3
7373
#define SPINAND_BLOCK_PROT_COMPLE_OFFSET 1
7474

7575
#define IS_MEM_READY_MAX_RETRIES 10000
@@ -286,7 +286,7 @@ int SPINANDBlockDevice::read(void *buffer, bd_addr_t addr, bd_size_t size)
286286
buffer = static_cast< uint8_t *>(buffer) + chunk;
287287
addr += SPINAND_PAGE_OFFSET;
288288
size -= chunk;
289-
289+
290290
_mutex.unlock();
291291
}
292292

@@ -518,18 +518,18 @@ int SPINANDBlockDevice::_set_quad_enable()
518518
}
519519

520520
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_GET_FEATURE, FEATURES_ADDR_SECURE_OTP,
521-
NULL, 0, (char *) &secur_reg, 1)) {
521+
NULL, 0, (char *) &secur_reg, 1)) {
522522
tr_error("Reading Security Register failed");
523523
}
524524

525525
secur_reg |= SPINAND_SECURE_BIT_QE;
526526

527527
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_SET_FEATURE, FEATURES_ADDR_SECURE_OTP,
528-
(char *) &secur_reg, 1, NULL, 0)) {
528+
(char *) &secur_reg, 1, NULL, 0)) {
529529
tr_error("Writing Security Register failed");
530530
}
531531
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_GET_FEATURE, FEATURES_ADDR_SECURE_OTP,
532-
NULL, 0, (char *) &secur_reg, 1)) {
532+
NULL, 0, (char *) &secur_reg, 1)) {
533533
tr_error("Reading Security Register failed");
534534
}
535535
if (false == _is_mem_ready()) {
@@ -550,18 +550,18 @@ int SPINANDBlockDevice::_clear_block_protection()
550550
}
551551

552552
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_GET_FEATURE, FEATURES_ADDR_BLOCK_PROTECTION,
553-
NULL, 0, (char *) &block_protection_reg, 1)) {
553+
NULL, 0, (char *) &block_protection_reg, 1)) {
554554
tr_error("Reading Block Protection Register failed");
555555
}
556556

557557
block_protection_reg &= ~SPINAND_BLOCK_PROT_BIT_BP_MASK;
558558

559559
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_SET_FEATURE, FEATURES_ADDR_BLOCK_PROTECTION,
560-
(char *) &block_protection_reg, 1, NULL, 0)) {
560+
(char *) &block_protection_reg, 1, NULL, 0)) {
561561
tr_error("Writing Block Protection Register failed");
562562
}
563563
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_GET_FEATURE, FEATURES_ADDR_BLOCK_PROTECTION,
564-
NULL, 0, (char *) &block_protection_reg, 1)) {
564+
NULL, 0, (char *) &block_protection_reg, 1)) {
565565
tr_error("Reading Block Protection Register failed");
566566
}
567567
if (false == _is_mem_ready()) {
@@ -729,7 +729,7 @@ qspi_status_t SPINANDBlockDevice::_qspi_send_program_command(qspi_inst_t prog_in
729729
if (QSPI_STATUS_OK != _qspi_send_general_command(SPINAND_INST_PROGRAM_EXEC, addr >> 12, NULL, 0, NULL, 0)) {
730730
tr_error("Read page from array failed");
731731
}
732-
732+
733733
status = _qspi.configure_format(_inst_width, _address_width, _address_size, _address_width, // Alt width should be the same as address width
734734
_alt_size, _data_width, 0);
735735
if (QSPI_STATUS_OK != status) {
@@ -763,7 +763,7 @@ qspi_status_t SPINANDBlockDevice::_qspi_send_erase_command(qspi_inst_t erase_ins
763763
tr_error("QSPI Erase failed");
764764
return status;
765765
}
766-
766+
767767
status = _qspi.configure_format(_inst_width, _address_width, _address_size, _address_width, // Alt width should be the same as address width
768768
_alt_size, _data_width, 0);
769769
if (QSPI_STATUS_OK != status) {

0 commit comments

Comments
 (0)