Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches
spi1.h
Go to the documentation of this file.
1
18/*
19© [2024] Microchip Technology Inc. and its subsidiaries.
20
21 Subject to your compliance with these terms, you may use Microchip
22 software and any derivatives exclusively with Microchip products.
23 You are responsible for complying with 3rd party license terms
24 applicable to your use of 3rd party software (including open source
25 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
26 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
27 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
28 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
29 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
30 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
31 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
32 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
33 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
34 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
35 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
36 THIS SOFTWARE.
37*/
38
39#ifndef SPI1_H
40#define SPI1_H
41
42// Section: Included Files
43#include <stdint.h>
44#include <stdbool.h>
45#include <stddef.h>
46#include "spi_client_interface.h"
47
48// Section: Data Type Definitions
49
57extern const struct SPI_CLIENT_INTERFACE SPI1_Client;
58
63#define SPI1_Client_Initialize SPI1_Initialize
68#define SPI1_Client_Deinitialize SPI1_Deinitialize
73#define SPI1_Client_Close SPI1_Close
78#define SPI1_Client_Open SPI1_Open
83#define SPI1_Client_ByteExchange SPI1_ByteExchange
88#define SPI1_Client_ByteWrite SPI1_ByteWrite
93#define SPI1_Client_ByteRead SPI1_ByteRead
98#define SPI1_Client_IsRxReady SPI1_IsRxReady
103#define SPI1_Client_IsTxReady SPI1_IsTxReady
104
120
121// Section: Driver Interface Function
122
123
131void SPI1_Initialize (void);
132
133
140void SPI1_Deinitialize(void);
141
142
150void SPI1_Close (void);
151
152
160bool SPI1_Open(uint8_t spiConfigIndex);
161
162
170uint8_t SPI1_ByteExchange(uint8_t byteData);
171
172
181void SPI1_ByteWrite(uint8_t byteData);
182
183
192uint8_t SPI1_ByteRead(void);
193
194
203bool SPI1_IsRxReady(void);
204
205
214bool SPI1_IsTxReady(void);
215
216#endif //SPI1_H
217
218
219
@ CLIENT_CONFIG
Definition spi1.h:117
void SPI1_Initialize(void)
Initializes SPI1 module, using the given initialization data. This function must be called before any...
Definition spi1.c:86
void SPI1_Deinitialize(void)
Deinitializes the SPI1 to POR values.
Definition spi1.c:126
bool SPI1_Open(uint8_t spiConfigIndex)
Configures SPI1 module with user defined unique configuration.
Definition spi1.c:144
const struct SPI_CLIENT_INTERFACE SPI1_Client
Structure object of type SPI_CLIENT_INTERFACE assigned with name displayed in the Melody Driver User ...
Definition spi1.c:53
bool SPI1_IsRxReady(void)
Returns a boolean value if data is available to read.
Definition spi1.c:194
uint8_t SPI1_ByteRead(void)
Reads one byte of data from SPI1.
Definition spi1.c:184
bool SPI1_IsTxReady(void)
Returns a boolean value if data can be written.
Definition spi1.c:199
void SPI1_Close(void)
Disables the SPI1 module.
Definition spi1.c:139
SPI1_CLIENT_USER_CONFIG
Enum list is the Custom names for the SPI1 CLIENT multiple configuration, configured by user in MCC M...
Definition spi1.h:114
void SPI1_ByteWrite(uint8_t byteData)
Writes one byte of data.
Definition spi1.c:174
uint8_t SPI1_ByteExchange(uint8_t byteData)
Exchanges one byte of data. This is a blocking function.
Definition spi1.c:157
Structure containing the function pointers of SPI CLIENT driver.