![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Modules | |
| SPI17Y_Registers | |
| Registers, Bit Masks and Bit Positions for the SPI17Y Peripheral Module. | |
| Spi_async | |
| Callback function type used in asynchronous SPI Master communication requests. | |
Data Structures | |
| struct | spi17y_req_t |
| Structure type representing a SPI17Y Master Transaction request. More... | |
Typedefs | |
| typedef void(* | spi17y_callback_fn) (spi17y_req_t *req, int error_code) |
Enumerations | |
| enum | spi17y_width_t { SPI17Y_WIDTH_1 = 0, SPI17Y_WIDTH_2 = 1, SPI17Y_WIDTH_4 = 2 } |
| Enumeration type for setting the number data lines to use for communication. More... | |
| enum | spi17y_sspol_t { SPI17Y_POL_LOW = 0, SPI17Y_POL_HIGH = 1 } |
| Enumeration type for setting the polarity of ss lines. More... | |
Functions | |
| int | SPI17Y_Init (mxc_spi17y_regs_t *spi, unsigned int mode, unsigned int freq, const sys_cfg_spi17y_t *sys_cfg) |
| Initialize the spi. More... | |
| int | SPI17Y_Shutdown (mxc_spi17y_regs_t *spi) |
| Shutdown SPI module. More... | |
| void | SPI17Y_Handler (mxc_spi17y_regs_t *spi) |
| Processing function for asynchronous SPI operations. More... | |
| int | SPI17Y_MasterTrans (mxc_spi17y_regs_t *spi, spi17y_req_t *req) |
| Execute a master transaction. More... | |
| int | SPI17Y_SlaveTrans (mxc_spi17y_regs_t *spi, spi17y_req_t *req) |
| Execute a slave transaction. More... | |
| int | SPI17Y_MasterTransAsync (mxc_spi17y_regs_t *spi, spi17y_req_t *req) |
| Asynchronously read/write SPI Master data. More... | |
| int | SPI17Y_SlaveTransAsync (mxc_spi17y_regs_t *spi, spi17y_req_t *req) |
| Asynchronously read/write SPI Slave data. More... | |
| int | SPI17Y_AbortAsync (spi17y_req_t *req) |
| Aborts an Asynchronous request. More... | |
| void | SPI17Y_Enable (mxc_spi17y_regs_t *spi) |
| Enable SPI. More... | |
| void | SPI17Y_Disable (mxc_spi17y_regs_t *spi) |
| Disable SPI. More... | |
| void | SPI17Y_Clear_fifo (mxc_spi17y_regs_t *spi) |
| Clear the TX and RX FIFO. More... | |
| enum spi17y_width_t |
| enum spi17y_sspol_t |
| int SPI17Y_Init | ( | mxc_spi17y_regs_t * | spi, |
| unsigned int | mode, | ||
| unsigned int | freq, | ||
| const sys_cfg_spi17y_t * | sys_cfg | ||
| ) |
| spi | Pointer to spi module to initialize. |
| mode | SPI mode for clock phase and polarity. |
| freq | Desired clock frequency. |
| sys_cfg | System configuration object |
| int SPI17Y_Shutdown | ( | mxc_spi17y_regs_t * | spi | ) |
| spi | Pointer to SPI regs. |
| void SPI17Y_Handler | ( | mxc_spi17y_regs_t * | spi | ) |
This function must be called either from the SPI interrupt handler or periodically.
| spi | Pointer to spi module. |
| int SPI17Y_MasterTrans | ( | mxc_spi17y_regs_t * | spi, |
| spi17y_req_t * | req | ||
| ) |
This function will block until the transaction is complete.
| spi | Pointer to spi module. |
| req | Pointer to spi request |
| int SPI17Y_SlaveTrans | ( | mxc_spi17y_regs_t * | spi, |
| spi17y_req_t * | req | ||
| ) |
This function will block until the transaction is complete.
| spi | Pointer to spi module. |
| req | Pointer to spi request |
| int SPI17Y_MasterTransAsync | ( | mxc_spi17y_regs_t * | spi, |
| spi17y_req_t * | req | ||
| ) |
| spi | Pointer to spi module |
| req | Pointer to spi request |
| int SPI17Y_SlaveTransAsync | ( | mxc_spi17y_regs_t * | spi, |
| spi17y_req_t * | req | ||
| ) |
| spi | Pointer to spi module |
| req | Pointer to spi request |
| int SPI17Y_AbortAsync | ( | spi17y_req_t * | req | ) |
| req | Pointer to spi request |
| void SPI17Y_Enable | ( | mxc_spi17y_regs_t * | spi | ) |
| spi | Pointer to spi module. |
| void SPI17Y_Disable | ( | mxc_spi17y_regs_t * | spi | ) |
Any pending asynchronous transactions will not complete and their callbacks will not be executed.
| spi | Pointer to spi module. |
| void SPI17Y_Clear_fifo | ( | mxc_spi17y_regs_t * | spi | ) |
| spi | Pointer to spi module. |