27 #if (HAL_USE_WSPI == TRUE) || defined(__DOXYGEN__) 72 #if WSPI_USE_WAIT == TRUE 75 #if WSPI_USE_MUTUAL_EXCLUSION == TRUE 78 #if defined(WSPI_DRIVER_EXT_INIT_HOOK) 79 WSPI_DRIVER_EXT_INIT_HOOK(wspip);
166 size_t n,
const uint8_t *txbuf) {
192 size_t n, uint8_t *rxbuf) {
206 #if (WSPI_USE_WAIT == TRUE) || defined(__DOXYGEN__) 222 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) == WSPI_CFG_DATA_MODE_NONE);
250 size_t n,
const uint8_t *txbuf) {
254 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) != WSPI_CFG_DATA_MODE_NONE);
282 size_t n, uint8_t *rxbuf) {
286 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) != WSPI_CFG_DATA_MODE_NONE);
300 #if (WSPI_SUPPORTS_MEMMAP == TRUE) || defined(__DOXYGEN__) 318 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) != WSPI_CFG_DATA_MODE_NONE);
354 #if (WSPI_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__) static void osalMutexObjectInit(mutex_t *mp)
Initializes s mutex_t object.
void wspiMapFlash(WSPIDriver *wspip, const wspi_command_t *cmdp, uint8_t **addrp)
Maps in memory space a WSPI flash device.
wspicallback_t end_cb
Operation complete callback or NULL.
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.
msg_t osalThreadSuspendS(thread_reference_t *trp)
Sends the current thread sleeping and sets a reference variable.
void wspiAcquireBus(WSPIDriver *wspip)
Gains exclusive access to the WSPI bus.
void wspi_lld_start(WSPIDriver *wspip)
Configures and activates the WSPI peripheral.
Structure representing an WSPI driver.
void wspiStart(WSPIDriver *wspip, const WSPIConfig *config)
Configures and activates the WSPI peripheral.
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.
void wspiStop(WSPIDriver *wspip)
Deactivates the WSPI peripheral.
void osalMutexLock(mutex_t *mp)
Locks the specified mutex.
Driver configuration structure.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
void wspiInit(void)
WSPI Driver initialization.
void wspiReleaseBus(WSPIDriver *wspip)
Releases exclusive access to the WSPI bus.
void wspiUnmapFlash(WSPIDriver *wspip)
Unmaps from memory space a WSPI flash device.
#define wspiStartCommandI(wspip, cmdp)
Sends a command without data phase.
void wspi_lld_init(void)
Low level WSPI driver initialization.
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.
const WSPIConfig * config
Current configuration data.
void wspiObjectInit(WSPIDriver *wspip)
Initializes the standard part of a WSPIDriver structure.
wspistate_t state
Driver state.
thread_reference_t thread
Waiting thread.
#define osalDbgCheck(c)
Function parameters check.
#define wspiUnmapFlashI(wspip)
Maps in memory space a WSPI flash device.
mutex_t mutex
Mutex protecting the peripheral.
#define wspiMapFlashI(wspip, cmdp, addrp)
Maps in memory space a WSPI flash device.
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.
#define wspiStartReceiveI(wspip, cmdp, n, rxbuf)
Receives data from the WSPI bus.
void wspi_lld_stop(WSPIDriver *wspip)
Deactivates the WSPI peripheral.
Type of a WSPI command descriptor.
static void osalSysLock(void)
Enters a critical zone from thread context.
#define wspiStartSendI(wspip, cmdp, n, txbuf)
Sends data over the WSPI bus.
void wspiCommand(WSPIDriver *wspip, const wspi_command_t *cmdp)
Sends a command without data phase.
#define osalDbgAssert(c, remark)
Condition assertion.
void osalMutexUnlock(mutex_t *mp)
Unlocks the specified mutex.
void wspiStartCommand(WSPIDriver *wspip, const wspi_command_t *cmdp)
Sends a command without data phase.
uint32_t cfg
Transfer configuration field.