Skip to content

Commit 3b8265d

Browse files
committed
Modify the astyle
1 parent 7266070 commit 3b8265d

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

TESTS/mbed_hal/ospi/ospi_test_utils.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ void OspiCommand::build(int instruction, int address, int alt)
8686
} else if (instruction == OSPI_CMD_RDCR2) {
8787
_cmd.dummy_count = 4;
8888
} else if ((instruction == OSPI_CMD_READ_OPI) || (instruction == OSPI_CMD_READ_DOPI)) {
89-
_cmd.dummy_count = 20;
90-
}
91-
else {
89+
_cmd.dummy_count = 20;
90+
} else {
9291
_cmd.dummy_count = 0;
9392
}
9493
}

components/storage/blockdevice/COMPONENT_OSPIF/OSPIFBlockDevice.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,11 +1736,11 @@ ospi_status_t OSPIFBlockDevice::_ospi_send_general_command(ospi_inst_t instructi
17361736
return status;
17371737
}
17381738

1739-
if ((_inst_width == OSPI_CFG_BUS_OCTA) || (_inst_width == OSPI_CFG_BUS_OCTA_DTR)){
1739+
if ((_inst_width == OSPI_CFG_BUS_OCTA) || (_inst_width == OSPI_CFG_BUS_OCTA_DTR)) {
17401740
if ((instruction == OSPIF_INST_RSR1) || (instruction == OSPIF_INST_RDID) ||
17411741
(instruction == OSPIF_INST_RDCR2) || (instruction == OSPIF_INST_RDCR)) {
17421742
_ospi.configure_format(_inst_width, _inst_size, _address_width, _address_size, OSPI_CFG_BUS_SINGLE,
1743-
0, _data_width, 4);
1743+
0, _data_width, 4);
17441744
addr = 0;
17451745
} else if ((instruction == OSPIF_INST_WSR1)) {
17461746
addr = 0;
@@ -1772,15 +1772,15 @@ int OSPIFBlockDevice::_ospi_send_read_sfdp_command(bd_addr_t addr, void *rx_buff
17721772
if (_need_define_sfdp_para) {
17731773
if (addr < 30) {
17741774
for (uint8_t i_ind = 0; i_ind < rx_len; i_ind++) {
1775-
* (rx_buffer_tmp+ i_ind)= _sfdp_head_table[i_ind+addr];
1775+
*(rx_buffer_tmp + i_ind) = _sfdp_head_table[i_ind+addr];
17761776
}
17771777
} else if (addr == 0x30) {
17781778
for (uint8_t i_ind = 0; i_ind < rx_len; i_ind++) {
1779-
*(rx_buffer_tmp+ i_ind) = _sfdp_basic_param_table[i_ind];
1779+
*(rx_buffer_tmp + i_ind) = _sfdp_basic_param_table[i_ind];
17801780
}
17811781
} else if (addr == 0xc0) {
17821782
for (uint8_t i_ind = 0; i_ind < rx_len; i_ind++) {
1783-
*(rx_buffer_tmp+ i_ind) = _sfdp_4_byte_inst_table[i_ind];
1783+
*(rx_buffer_tmp + i_ind) = _sfdp_4_byte_inst_table[i_ind];
17841784
}
17851785
}
17861786
} else {

drivers/OSPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class OSPI : private NonCopyable<OSPI> {
139139
*
140140
*/
141141
ospi_status_t configure_format(ospi_bus_width_t inst_width,
142-
ospi_inst_size_t inst_size,
142+
ospi_inst_size_t inst_size,
143143
ospi_bus_width_t address_width,
144144
ospi_address_size_t address_size,
145145
ospi_bus_width_t alt_width,

hal/ospi_api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ typedef enum ospi_bus_width {
8181
/** Instruction size in bits
8282
*/
8383
typedef enum ospi_inst_size {
84-
OSPI_CFG_INST_SIZE_8, /* 1 byte for SPI mode */
85-
OSPI_CFG_INST_SIZE_16, /* 2 byte for OPI mode */
84+
OSPI_CFG_INST_SIZE_8, /* 1 byte for SPI mode */
85+
OSPI_CFG_INST_SIZE_16, /* 2 byte for OPI mode */
8686
} ospi_inst_size_t;
8787

8888
/** Address size in bits
@@ -164,7 +164,7 @@ typedef enum ospi_status {
164164
OSPI_STATUS_INVALID_PARAMETER if invalid parameter found
165165
OSPI_STATUS_ERROR otherwise
166166
*/
167-
ospi_status_t ospi_init(ospi_t *obj, PinName io0, PinName io1, PinName io2, PinName io3, PinName io4, PinName io5, PinName io6, PinName io7,
167+
ospi_status_t ospi_init(ospi_t *obj, PinName io0, PinName io1, PinName io2, PinName io3, PinName io4, PinName io5, PinName io6, PinName io7,
168168
PinName sclk, PinName ssel, PinName dqs, uint32_t hz, uint8_t mode);
169169

170170
/** Initialize OSPI peripheral.

0 commit comments

Comments
 (0)