ChibiOS/HAL
7.0.3
|
WSPI Driver macros and structures. More...
#include "hal_wspi_lld.h"
Go to the source code of this file.
Data Structures | |
struct | wspi_command_t |
Type of a WSPI command descriptor. More... | |
struct | hal_wspi_config |
Driver configuration structure. More... | |
struct | hal_wspi_driver |
Structure representing an WSPI driver. More... | |
Macros | |
WSPI configuration options | |
#define | WSPI_USE_WAIT TRUE |
Enables synchronous APIs. More... | |
#define | WSPI_USE_MUTUAL_EXCLUSION TRUE |
Enables the wspiAcquireBus() and wspiReleaseBus() APIs. More... | |
Transfer options | |
| |
#define | WSPI_CFG_CMD_MODE_MASK (7LU << 0LU) |
#define | WSPI_CFG_CMD_MODE_NONE (0LU << 0LU) |
#define | WSPI_CFG_CMD_MODE_ONE_LINE (1LU << 0LU) |
#define | WSPI_CFG_CMD_MODE_TWO_LINES (2LU << 0LU) |
#define | WSPI_CFG_CMD_MODE_FOUR_LINES (3LU << 0LU) |
#define | WSPI_CFG_CMD_MODE_EIGHT_LINES (4LU << 0LU) |
#define | WSPI_CFG_CMD_DTR (1LU << 3LU) |
#define | WSPI_CFG_CMD_SIZE_MASK (3LU << 4LU) |
#define | WSPI_CFG_CMD_SIZE_8 (0LU << 4LU) |
#define | WSPI_CFG_CMD_SIZE_16 (1LU << 4LU) |
#define | WSPI_CFG_CMD_SIZE_24 (2LU << 4LU) |
#define | WSPI_CFG_CMD_SIZE_32 (3LU << 4LU) |
#define | WSPI_CFG_ADDR_MODE_MASK (7LU << 8LU) |
#define | WSPI_CFG_ADDR_MODE_NONE (0LU << 8LU) |
#define | WSPI_CFG_ADDR_MODE_ONE_LINE (1LU << 8LU) |
#define | WSPI_CFG_ADDR_MODE_TWO_LINES (2LU << 8LU) |
#define | WSPI_CFG_ADDR_MODE_FOUR_LINES (3LU << 8LU) |
#define | WSPI_CFG_ADDR_MODE_EIGHT_LINES (4LU << 8LU) |
#define | WSPI_CFG_ADDR_DTR (1LU << 11LU) |
#define | WSPI_CFG_ADDR_SIZE_MASK (3LU << 12LU) |
#define | WSPI_CFG_ADDR_SIZE_8 (0LU << 12LU) |
#define | WSPI_CFG_ADDR_SIZE_16 (1LU << 12LU) |
#define | WSPI_CFG_ADDR_SIZE_24 (2LU << 12LU) |
#define | WSPI_CFG_ADDR_SIZE_32 (3LU << 12LU) |
#define | WSPI_CFG_ALT_MODE_MASK (7LU << 16LU) |
#define | WSPI_CFG_ALT_MODE_NONE (0LU << 16LU) |
#define | WSPI_CFG_ALT_MODE_ONE_LINE (1LU << 16LU) |
#define | WSPI_CFG_ALT_MODE_TWO_LINES (2LU << 16LU) |
#define | WSPI_CFG_ALT_MODE_FOUR_LINES (3LU << 16LU) |
#define | WSPI_CFG_ALT_MODE_EIGHT_LINES (4LU << 16LU) |
#define | WSPI_CFG_ALT_DTR (1LU << 19LU) |
#define | WSPI_CFG_ALT_SIZE_MASK (3LU << 20LU) |
#define | WSPI_CFG_ALT_SIZE_8 (0LU << 20LU) |
#define | WSPI_CFG_ALT_SIZE_16 (1LU << 20LU) |
#define | WSPI_CFG_ALT_SIZE_24 (2LU << 20LU) |
#define | WSPI_CFG_ALT_SIZE_32 (3LU << 20LU) |
#define | WSPI_CFG_DATA_MODE_MASK (7LU << 24LU) |
#define | WSPI_CFG_DATA_MODE_NONE (0LU << 24LU) |
#define | WSPI_CFG_DATA_MODE_ONE_LINE (1LU << 24LU) |
#define | WSPI_CFG_DATA_MODE_TWO_LINES (2LU << 24LU) |
#define | WSPI_CFG_DATA_MODE_FOUR_LINES (3LU << 24LU) |
#define | WSPI_CFG_DATA_MODE_EIGHT_LINES (4LU << 24LU) |
#define | WSPI_CFG_DATA_DTR (1LU << 27LU) |
#define | WSPI_CFG_DQS_ENABLE (1LU << 29LU) |
#define | WSPI_CFG_SIOO (1LU << 31LU) |
#define | WSPI_CFG_ALL_DTR |
Macro Functions | |
#define | wspiStartCommandI(wspip, cmdp) |
Sends a command without data phase. More... | |
#define | wspiStartSendI(wspip, cmdp, n, txbuf) |
Sends data over the WSPI bus. More... | |
#define | wspiStartReceiveI(wspip, cmdp, n, rxbuf) |
Receives data from the WSPI bus. More... | |
#define | wspiMapFlashI(wspip, cmdp, addrp) wspi_lld_map_flash(wspip, cmdp, addrp) |
Maps in memory space a WSPI flash device. More... | |
#define | wspiUnmapFlashI(wspip) wspi_lld_unmap_flash(wspip) |
Maps in memory space a WSPI flash device. More... | |
Low level driver helper macros | |
#define | _wspi_wakeup_isr(wspip) |
Wakes up the waiting thread. More... | |
#define | _wspi_isr_code(wspip) |
Common ISR code. More... | |
Typedefs | |
typedef struct hal_wspi_driver | WSPIDriver |
Type of a structure representing an WSPI driver. More... | |
typedef struct hal_wspi_config | WSPIConfig |
Type of a structure representing an WSPI driver configuration. More... | |
typedef void(* | wspicallback_t) (WSPIDriver *wspip) |
Type of a WSPI notification callback. More... | |
Enumerations |
Functions | |
void | wspiInit (void) |
WSPI Driver initialization. More... | |
void | wspiObjectInit (WSPIDriver *wspip) |
Initializes the standard part of a WSPIDriver structure. More... | |
void | wspiStart (WSPIDriver *wspip, const WSPIConfig *config) |
Configures and activates the WSPI peripheral. More... | |
void | wspiStop (WSPIDriver *wspip) |
Deactivates the WSPI peripheral. More... | |
void | wspiStartCommand (WSPIDriver *wspip, const wspi_command_t *cmdp) |
Sends a command without data phase. More... | |
void | wspiStartSend (WSPIDriver *wspip, const wspi_command_t *cmdp, size_t n, const uint8_t *txbuf) |
Sends a command with data over the WSPI bus. More... | |
void | wspiStartReceive (WSPIDriver *wspip, const wspi_command_t *cmdp, size_t n, uint8_t *rxbuf) |
Sends a command then receives data over the WSPI bus. More... | |
void | wspiCommand (WSPIDriver *wspip, const wspi_command_t *cmdp) |
Sends a command without data phase. More... | |
void | wspiSend (WSPIDriver *wspip, const wspi_command_t *cmdp, size_t n, const uint8_t *txbuf) |
Sends a command with data over the WSPI bus. More... | |
void | wspiReceive (WSPIDriver *wspip, const wspi_command_t *cmdp, size_t n, uint8_t *rxbuf) |
Sends a command then receives data over the WSPI bus. More... | |
void | wspiMapFlash (WSPIDriver *wspip, const wspi_command_t *cmdp, uint8_t **addrp) |
Maps in memory space a WSPI flash device. More... | |
void | wspiUnmapFlash (WSPIDriver *wspip) |
Unmaps from memory space a WSPI flash device. More... | |
void | wspiAcquireBus (WSPIDriver *wspip) |
Gains exclusive access to the WSPI bus. More... | |
void | wspiReleaseBus (WSPIDriver *wspip) |
Releases exclusive access to the WSPI bus. More... | |
WSPI Driver macros and structures.
Definition in file hal_wspi.h.