monoZ docs
MZ_spi.h File Reference

This file contains all the functionalities for SPI protocol. More...

#include "MZ_public.h"
#include "MZ_common.h"
#include "MZ_error_handler.h"
#include "stm32l4xx_hal_spi.h"

Go to the source code of this file.

Data Structures

struct  MZ_SPIX
 
struct  st_spi_intr
 

Macros

#define SPI_MAX_COUNT_SIZE   SPI_MAX_COUNT
 

Typedefs

typedef _mz_fp _spi_api
 use _spi_api as monoZ function pointer More...
 
typedef MZ_SPIX MZ_SPI_BTYPE
 [TODO] More...
 
typedef MZ_SPIXMZ_SPI_BTYPE_PTR
 [TODO] More...
 

Enumerations

enum  en_spi_no { SPI_MAX_COUNT }
 Enumeration for monoZ SPI Enable or disable the I2C instance. More...
 

Functions

MZ_SPI_BTYPE_PTR MZ_SPI_get_base_address (void)
 This function returns the base address of all the SPI defined in SDK. More...
 
MZ_SPI_BTYPE_PTR MZ_SPI_reference (en_spi_no spi_no)
 This function returns the address of specific SPI defined in SDK. More...
 
mz_error_t MZ_SPI_init (MZ_SPI_INIT_PTR _cfg)
 This function initializes the specific SPI. More...
 
mz_error_t MZ_SPI_register_callback (uint8_t spi_no, _spi_api cb)
 This function registers the SPI Event callback. More...
 
mz_error_t MZ_SPI_register_intr_cb_tx (uint8_t spi_no, _spi_api cb)
 This function registers the Interrupt for TX complete callback function for the specific SPI. More...
 
mz_error_t MZ_SPI_register_intr_cb_rx (uint8_t spi_no, _spi_api cb)
 This function registers the Interrupt for RX complete callback function for the specific SPI. More...
 
void MZ_HAL_SPI_IRQHandler (uint8_t spi_no)
 This function defines the Global Interrupt handler functions of SPI. More...
 
mz_error_t MZ_SPI_Transmit (uint8_t spi_no, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 This function is used to transmit data using SPI in polling mode. More...
 
mz_error_t MZ_SPI_Receive (uint8_t spi_no, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 This function is used to receive data using SPI in polling mode. More...
 
mz_error_t MZ_SPI_TransmitReceive (uint8_t spi_no, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout)
 This function is used to transmit/receive data using SPI in polling mode. More...
 
mz_error_t MZ_SPI_Transmit_IT (uint8_t spi_no, uint8_t *pData, uint16_t Size)
 This function is used to transmit data using SPI in interrupt mode. More...
 
mz_error_t MZ_SPI_Receive_IT (uint8_t spi_no, uint8_t *pData, uint16_t Size)
 This function is used to receive data using SPI in interrupt mode. More...
 
mz_error_t MZ_SPI_TransmitReceive_IT (uint8_t spi_no, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
 This function is used to transmit/receive data using SPI in interrupt mode. More...
 

Detailed Description

This file contains all the functionalities for SPI protocol.

Date
Jul 19, 2021
Author
Mahendra & Kafeel

Definition in file MZ_spi.h.

Macro Definition Documentation

◆ SPI_MAX_COUNT_SIZE

#define SPI_MAX_COUNT_SIZE   SPI_MAX_COUNT

Definition at line 34 of file MZ_spi.h.

Typedef Documentation

◆ _spi_api

use _spi_api as monoZ function pointer

Definition at line 40 of file MZ_spi.h.

◆ MZ_SPI_BTYPE

[TODO]

Definition at line 82 of file MZ_spi.h.

◆ MZ_SPI_BTYPE_PTR

[TODO]

Definition at line 88 of file MZ_spi.h.

Enumeration Type Documentation

◆ en_spi_no

enum en_spi_no

Enumeration for monoZ SPI Enable or disable the I2C instance.

Enumerator
SPI_MAX_COUNT 

Definition at line 20 of file MZ_spi.h.