Go to the documentation of this file.
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__)
226 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) == WSPI_CFG_DATA_MODE_NONE);
238 return (
bool)(msg !=
MSG_OK);
259 size_t n,
const uint8_t *txbuf) {
264 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) != WSPI_CFG_DATA_MODE_NONE);
276 return (
bool)(msg !=
MSG_OK);
297 size_t n, uint8_t *rxbuf) {
302 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) != WSPI_CFG_DATA_MODE_NONE);
314 return (
bool)(msg !=
MSG_OK);
318 #if (WSPI_SUPPORTS_MEMMAP == TRUE) || defined(__DOXYGEN__)
336 osalDbgCheck((cmdp->
cfg & WSPI_CFG_DATA_MODE_MASK) != WSPI_CFG_DATA_MODE_NONE);
372 #if (WSPI_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__)
void wspi_lld_start(WSPIDriver *wspip)
Configures and activates the WSPI peripheral.
Type of a WSPI command descriptor.
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 wspiStart(WSPIDriver *wspip, const WSPIConfig *config)
Configures and activates the WSPI peripheral.
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.
void wspiUnmapFlash(WSPIDriver *wspip)
Unmaps from memory space a WSPI flash device.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
thread_reference_t thread
Waiting thread.
void wspiStop(WSPIDriver *wspip)
Deactivates the WSPI peripheral.
void osalMutexLock(mutex_t *mp)
Locks the specified mutex.
#define wspiStartCommandI(wspip, cmdp)
Sends a command without data phase.
void wspiReleaseBus(WSPIDriver *wspip)
Releases exclusive access to the WSPI bus.
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.
void wspiInit(void)
WSPI Driver initialization.
void wspiObjectInit(WSPIDriver *wspip)
Initializes the standard part of a WSPIDriver structure.
Structure representing an WSPI driver.
#define wspiMapFlashI(wspip, cmdp, addrp)
Maps in memory space a WSPI flash device.
mutex_t mutex
Mutex protecting the peripheral.
#define MSG_OK
Normal wakeup message.
#define osalDbgCheck(c)
Function parameters check.
bool wspiReceive(WSPIDriver *wspip, const wspi_command_t *cmdp, size_t n, uint8_t *rxbuf)
Sends a command then receives data over the WSPI bus.
bool wspiSend(WSPIDriver *wspip, const wspi_command_t *cmdp, size_t n, const uint8_t *txbuf)
Sends a command with data over the WSPI bus.
Driver configuration structure.
#define wspiStartSendI(wspip, cmdp, n, txbuf)
Sends data over the WSPI bus.
static void osalSysLock(void)
Enters a critical zone from thread context.
#define wspiStartReceiveI(wspip, cmdp, n, rxbuf)
Receives data from the WSPI bus.
void wspi_lld_stop(WSPIDriver *wspip)
Deactivates the WSPI peripheral.
bool wspiCommand(WSPIDriver *wspip, const wspi_command_t *cmdp)
Sends a command without data phase.
#define wspiUnmapFlashI(wspip)
Maps in memory space a WSPI flash device.
uint32_t cfg
Transfer configuration field.
#define osalDbgAssert(c, remark)
Condition assertion.
const WSPIConfig * config
Current configuration data.
void wspiStartCommand(WSPIDriver *wspip, const wspi_command_t *cmdp)
Sends a command without data phase.
wspistate_t state
Driver state.
void osalMutexUnlock(mutex_t *mp)
Unlocks the specified mutex.
wspicallback_t end_cb
Operation complete callback or NULL.
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.