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);
103#if defined(WSPI_LLD_ENHANCED_API)
181 size_t n,
const uint8_t *txbuf) {
207 size_t n, uint8_t *rxbuf) {
221#if (WSPI_USE_WAIT == TRUE) || defined(__DOXYGEN__)
253 return (
bool)(msg !=
MSG_OK);
274 size_t n,
const uint8_t *txbuf) {
291 return (
bool)(msg !=
MSG_OK);
312 size_t n, uint8_t *rxbuf) {
329 return (
bool)(msg !=
MSG_OK);
333#if (WSPI_SUPPORTS_MEMMAP == TRUE) || defined(__DOXYGEN__)
387#if (WSPI_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__)
static void osalSysLock(void)
Enters a critical zone from thread context.
static void osalMutexObjectInit(mutex_t *mp)
Initializes a mutex_t object.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
msg_t osalThreadSuspendS(thread_reference_t *trp)
Sends the current thread sleeping and sets a reference variable.
void osalMutexLock(mutex_t *mp)
Locks the specified mutex.
#define osalDbgAssert(c, remark)
Condition assertion.
void osalMutexUnlock(mutex_t *mp)
Unlocks the specified mutex.
#define osalDbgCheck(c)
Function parameters check.
void wspiObjectInit(WSPIDriver *wspip)
Initializes the standard part of a WSPIDriver structure.
void wspi_lld_init(void)
Low level WSPI driver initialization.
void wspiMapFlash(WSPIDriver *wspip, const wspi_command_t *cmdp, uint8_t **addrp)
Maps in memory space a WSPI flash device.
#define wspiStartReceiveI(wspip, cmdp, n, rxbuf)
Receives data from the WSPI bus.
struct hal_wspi_driver WSPIDriver
Type of a structure representing an WSPI driver.
#define wspiStartSendI(wspip, cmdp, n, txbuf)
Sends data over the WSPI bus.
void wspiAcquireBus(WSPIDriver *wspip)
Gains exclusive access to the WSPI bus.
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.
#define wspiMapFlashI(wspip, cmdp, addrp)
Maps in memory space a WSPI flash device.
void wspiInit(void)
WSPI Driver initialization.
void wspiStartCommand(WSPIDriver *wspip, const wspi_command_t *cmdp)
Sends a command without data phase.
msg_t wspiStart(WSPIDriver *wspip, const WSPIConfig *config)
Configures and activates the WSPI peripheral.
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.
#define wspiStartCommandI(wspip, cmdp)
Sends a command without data phase.
void wspi_lld_stop(WSPIDriver *wspip)
Deactivates the WSPI peripheral.
#define wspiUnmapFlashI(wspip)
Maps in memory space a WSPI flash device.
void wspiReleaseBus(WSPIDriver *wspip)
Releases exclusive access to the WSPI bus.
bool wspiCommand(WSPIDriver *wspip, const wspi_command_t *cmdp)
Sends a command without data phase.
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.
void wspiUnmapFlash(WSPIDriver *wspip)
Unmaps from memory space a WSPI flash device.
#define WSPI_CFG_DATA_MODE_MASK
void wspi_lld_start(WSPIDriver *wspip)
Configures and activates the WSPI peripheral.
struct hal_wspi_config WSPIConfig
Type of a structure representing an WSPI driver configuration.
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 wspiStop(WSPIDriver *wspip)
Deactivates the WSPI peripheral.
#define WSPI_CFG_DATA_MODE_NONE
#define MSG_OK
Normal wakeup message.
wspicallback_t end_cb
Operation complete callback or NULL.
const WSPIConfig * config
Current configuration data.
thread_reference_t thread
Waiting thread.
wspistate_t state
Driver state.
mutex_t mutex
Mutex protecting the peripheral.
Type of a WSPI command descriptor.
uint32_t cfg
Transfer configuration field.