Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
npcx_flash_api_ex.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nuvoton Technology Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef __ZEPHYR_INCLUDE_DRIVERS_NPCX_FLASH_API_EX_H__
8#define __ZEPHYR_INCLUDE_DRIVERS_NPCX_FLASH_API_EX_H__
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15
17 /*
18 * NPCX User Mode Access (UMA) mode execution.
19 *
20 * Execute a SPI transaction via User Mode Access (UMA) mode. Users can
21 * perform a customized SPI transaction to gread or write the device's
22 * configuration such as status registers of nor flash, power on/off,
23 * and so on.
24 */
26 /*
27 * NPCX Configure specific operation for Quad-SPI nor flash.
28 *
29 * It configures specific operation for Quad-SPI nor flash such as lock
30 * or unlock UMA mode, set write protection pin of internal flash, and
31 * so on.
32 */
34 /*
35 * NPCX Get specific operation for Quad-SPI nor flash.
36 *
37 * It returns current specific operation for Quad-SPI nor flash.
38 */
40};
41
42/* Structures used by FLASH_NPCX_EX_OP_EXEC_UMA */
51
55
56/* Structures used by FLASH_NPCX_EX_OP_SET_QSPI_OPER */
61
62/* Structures used by FLASH_NPCX_EX_OP_GET_QSPI_OPER */
66
67/* Specific NPCX QSPI devices control bits */
68#define NPCX_EX_OP_LOCK_UMA BIT(0) /* Lock/Unlock UMA mode */
69#define NPCX_EX_OP_INT_FLASH_WP BIT(1) /* Issue write protection of internal flash */
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* __ZEPHYR_INCLUDE_DRIVERS_NPCX_FLASH_API_EX_H__ */
Public API for FLASH drivers.
#define FLASH_EX_OP_VENDOR_BASE
Definition flash.h:630
flash_npcx_ex_ops
Definition npcx_flash_api_ex.h:16
@ FLASH_NPCX_EX_OP_GET_QSPI_OPER
Definition npcx_flash_api_ex.h:39
@ FLASH_NPCX_EX_OP_SET_QSPI_OPER
Definition npcx_flash_api_ex.h:33
@ FLASH_NPCX_EX_OP_EXEC_UMA
Definition npcx_flash_api_ex.h:25
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Definition npcx_flash_api_ex.h:57
uint32_t mask
Definition npcx_flash_api_ex.h:59
bool enable
Definition npcx_flash_api_ex.h:58
Definition npcx_flash_api_ex.h:63
uint32_t oper
Definition npcx_flash_api_ex.h:64
Definition npcx_flash_api_ex.h:43
size_t addr_count
Definition npcx_flash_api_ex.h:48
uint32_t addr
Definition npcx_flash_api_ex.h:47
uint8_t * tx_buf
Definition npcx_flash_api_ex.h:45
size_t rx_count
Definition npcx_flash_api_ex.h:49
uint8_t opcode
Definition npcx_flash_api_ex.h:44
size_t tx_count
Definition npcx_flash_api_ex.h:46
Definition npcx_flash_api_ex.h:52
uint8_t * rx_buf
Definition npcx_flash_api_ex.h:53