STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
|
Spi Driver More...
#include "Registers.h"
Go to the source code of this file.
Data Structures | |
struct | _Spi_ConfigType |
Hardware unit configuration structure More... | |
struct | _Spi_HwUnit |
Hardware control unit structure More... | |
Macros | |
#define | SPI_STATIC static |
#define | SPI_ID_INIT 0x00u |
#define | SPI_ID_DE_INIT 0x01u |
#define | SPI_ID_WRITE_IB 0x02u |
#define | SPI_ID_ASYNC_TRANSMIT 0x03u |
#define | SPI_ID_READ_IB 0x04u |
#define | SPI_ID_SET_UP_EB 0x05u |
#define | SPI_ID_GET_STATUS 0x06u |
#define | SPI_ID_GET_JOB_RESULT 0x07u |
#define | SPI_ID_GET_SEQUENCE_RESULT 0x08u |
#define | SPI_ID_GET_VERSION_INFO 0x09u |
#define | SPI_ID_SYNC_TRANSMIT 0x0Au |
#define | SPI_ID_GET_HWUNIT_STATUS 0x0Bu |
#define | SPI_ID_CANCEL 0x0Cu |
#define | SPI_ID_SET_ASYNC_MODE 0x0Du |
#define | SPI_E_PARAM_CHANNEL 0x0Au |
#define | SPI_E_PARAM_JOB 0x0Bu |
#define | SPI_E_PARAM_SEQ 0x0Cu |
#define | SPI_E_PARAM_LENGTH 0x0Du |
#define | SPI_E_PARAM_UNIT 0x0Eu |
#define | SPI_E_PARAM_POINTER 0x10u |
#define | SPI_E_UNINIT 0x1Au |
#define | SPI_E_ALREADY_INITIALIZED 0x4Au |
Typedefs | |
typedef enum _Spi_StatusType | Spi_StatusType |
States of the controller SPI. | |
typedef enum _Spi_JobResultType | Spi_JobResultType |
States of the Jobs for the SPI. | |
typedef enum _Spi_SeqResultType | Spi_SeqResultType |
States of the Sequence for the SPI. | |
typedef uint8 | Spi_ChannelType |
Spi Channel Type. | |
typedef uint16 | Spi_JobType |
Spi Job Type. | |
typedef uint8 | Spi_SequenceType |
Spi Sequence Type. | |
typedef uint8 | Spi_HWUnitType |
Spi HWUnit Type. | |
typedef struct _Spi_ConfigType | Spi_ConfigType |
Hardware unit configuration structure | |
typedef struct _Spi_HwUnit | Spi_HwUnit |
Hardware control unit structure | |
typedef uint8 | Spi_DataBufferType |
Spi Data Buffer Type. | |
typedef uint16 | Spi_NumberOfDataType |
Spi Number Of Data Type. | |
typedef enum _Spi_AsyncModeType | Spi_AsyncModeType |
States of the Asynchronoe Mode for the SPI. | |
Enumerations | |
enum | _Spi_StatusType { SPI_UNINIT , SPI_IDLE , SPI_BUSY } |
States of the controller SPI. More... | |
enum | _Spi_JobResultType { SPI_JOB_OK , SPI_JOB_PENDING , SPI_JOB_FAILED , SPI_JOB_QUEUED } |
States of the Jobs for the SPI. More... | |
enum | _Spi_SeqResultType { SPI_SEQ_OK , SPI_SEQ_PENDING , SPI_SEQ_FAILED , SPI_SEQ_CANCELED } |
States of the Sequence for the SPI. More... | |
enum | _Spi_AsyncModeType { SPI_POLLING_MODE , SPI_INTERRUPT_MODE } |
States of the Asynchronoe Mode for the SPI. More... | |
Spi Driver
The header contains the type definitions that are used by the Spi module. The file is implemnted as a means of abstraction from the hardware, this way we can avoid to include Arch headers in the actual driver header, making the low level interfaces available for upper layers.
typedef enum _Spi_AsyncModeType Spi_AsyncModeType |
States of the Asynchronoe Mode for the SPI.
Specifies the asynchronous mechanism mode for SPI busses handled asynchronously.
typedef uint8 Spi_ChannelType |
typedef struct _Spi_ConfigType Spi_ConfigType |
Hardware unit configuration structure
This type of the external data structure shall contain the initialization data for the SPI Handler/Driver.
typedef uint8 Spi_DataBufferType |
typedef struct _Spi_HwUnit Spi_HwUnit |
Hardware control unit structure
This structure contains the hardware unit configuration and the state of the hardware unit pointers to controller structures.
typedef uint8 Spi_HWUnitType |
Spi HWUnit Type.
Specifies the identification (ID) for a SPI Hardware microcontroller peripheral (unit).
typedef enum _Spi_JobResultType Spi_JobResultType |
States of the Jobs for the SPI.
This type defines a range of specific Jobs status for SPI Handler/Driver.
typedef uint16 Spi_JobType |
typedef uint16 Spi_NumberOfDataType |
Spi Number Of Data Type.
Type for defining the number of data elements to send and / or receive by Channel.
typedef enum _Spi_SeqResultType Spi_SeqResultType |
States of the Sequence for the SPI.
This type defines a range of specific Sequences status for SPI Handler/Driver.
typedef uint8 Spi_SequenceType |
Spi Sequence Type.
Specifies the identification (ID) for a sequence of jobs.
typedef enum _Spi_StatusType Spi_StatusType |
States of the controller SPI.
This type defines a range of specific status for SPI Handler/Driver.
enum _Spi_AsyncModeType |
States of the Asynchronoe Mode for the SPI.
Specifies the asynchronous mechanism mode for SPI busses handled asynchronously.
enum _Spi_JobResultType |
States of the Jobs for the SPI.
This type defines a range of specific Jobs status for SPI Handler/Driver.
enum _Spi_SeqResultType |
States of the Sequence for the SPI.
This type defines a range of specific Sequences status for SPI Handler/Driver.
enum _Spi_StatusType |
States of the controller SPI.
This type defines a range of specific status for SPI Handler/Driver.