| 351 | |
| 352 | |
| 353 | int32_t w25q_read_data(struct rt_qspi_device *device, uint32_t u32Addr, uint8_t *pu8ReadBuf, uint32_t u32Size) |
| 354 | { |
| 355 | int32_t i32Ret = LL_OK; |
| 356 | rt_uint8_t txBuf[5] = {0}; |
| 357 | |
| 358 | txBuf[0] = W25Q_QSPI_RD_MD; |
| 359 | txBuf[1] = (u32Addr >> 16) & 0xFFU; |
| 360 | txBuf[2] = (u32Addr >> 8) & 0xFFU; |
| 361 | txBuf[3] = u32Addr & 0xFFU; |
| 362 | if (u32Size != bsp_qspi_send_then_recv(device, txBuf, 4, pu8ReadBuf, u32Size)) |
| 363 | { |
| 364 | i32Ret = LL_ERR; |
| 365 | } |
| 366 | |
| 367 | return i32Ret; |
| 368 | } |
| 369 | |
| 370 | |
| 371 | int32_t w25q_write_data(struct rt_qspi_device *device, uint32_t u32Addr, uint8_t *pu8WriteBuf, uint32_t u32Size) |
no test coverage detected