![]() |
MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
|
Modules | |
| SPIXR_Registers | |
Data Structures | |
| struct | mxc_spixr_cfg_t |
Enumerations | |
| enum | mxc_spixr_width_t |
| enum | mxc_spixr_mode_t |
| struct mxc_spixr_cfg_t |
Configuration parameters of SPIXR.
Data Fields | |
| uint32_t | numbits |
| mxc_spixr_width_t | data_width |
| uint32_t | ssel_act_1 |
| uint32_t | ssel_act_2 |
| uint32_t | ssel_inact |
| uint32_t | baud_freq |
| enum mxc_spixr_mode_t |
SPIXF mode.
| enum mxc_spixr_width_t |
Structure type for configuring a SPIXR port.
Data Width, # of data I/O used to rcv data
Data Width, # of data I/O used to rcv data
| int MXC_SPIXR_Busy | ( | void | ) |
SPI active status.
In Master mode, set when transaction starts, cleared when last bit of last character is acted upon and Slave Select de-assertion would occur.
| void MXC_SPIXR_Disable | ( | void | ) |
Disable the SPIXR peripheral.
| void MXC_SPIXR_DisableInt | ( | int | flags | ) |
Disable SPIXR interrupts.
| flags | The flags to disable |
| void MXC_SPIXR_DisableWakeUp | ( | int | flags | ) |
Enable Wake up for SPIXR.
| flags | The flags to disable |
| int MXC_SPIXR_DmaRXFIFOIsEnabled | ( | void | ) |
Get if RXFIFO DMA is enabled.
| int MXC_SPIXR_DmaTXFIFOIsEnabled | ( | void | ) |
Get if TXFIFO DMA is enabled.
| void MXC_SPIXR_EnableInt | ( | int | flags | ) |
Enable SPIXR interrupts.
| flags | The flags to enable |
| void MXC_SPIXR_EnableWakeUp | ( | int | flags | ) |
Enable Wake up for SPIXR.
| flags | The flags to disable |
| uint8_t MXC_SPIXR_ExMemGetReadCommand | ( | void | ) |
Get the read command used for external memory mode.
| uint8_t MXC_SPIXR_ExMemGetWriteCommand | ( | void | ) |
Get the write command used for external memory mode.
| void MXC_SPIXR_ExMemSetReadCommand | ( | uint8_t | command | ) |
Set the read command used for external memory mode.
| command | The command to be used |
| void MXC_SPIXR_ExMemSetWriteCommand | ( | uint8_t | command | ) |
Set the write command used for external memory mode.
| command | The command to be used |
| void MXC_SPIXR_ExMemUseDummy | ( | int | delay255 | ) |
Put 255 characters worth of clocks between address and read phase of external memory transactions.
| delay255 | add the delay |
| int MXC_SPIXR_GetFrequency | ( | void | ) |
Get the SPI Frequency.
| int MXC_SPIXR_GetIntFlags | ( | void | ) |
Get the active interrupt flags.
| int MXC_SPIXR_GetRXFIFOCount | ( | void | ) |
Get the number of bytes currently in the RX FIFO.
| int MXC_SPIXR_GetSS | ( | void | ) |
Returns the SS line selected.
| int MXC_SPIXR_GetSSCtrl | ( | void | ) |
Get the setting that controls deassertion of the SS line.
| int MXC_SPIXR_GetTXFIFOCount | ( | void | ) |
Get the number of bytes currently in the TX FIFO.
| int MXC_SPIXR_GetWakeUpFlags | ( | void | ) |
Get the active wake up flags.
| int MXC_SPIXR_Init | ( | mxc_spixr_cfg_t * | cfg | ) |
Initialize the SPI RAM XIP Data module.
| cfg | The configuration |
| int MXC_SPIXR_IsEnabled | ( | void | ) |
Get if SPIXR is enabled.
| int MXC_SPIXR_ReadRXFIFO | ( | uint8_t * | buf, |
| int | len | ||
| ) |
Unloads bytes from the FIFO.
| buf | The buffer to read the data into |
| len | The number of bytes to read |
| int MXC_SPIXR_RXFIFOIsEnabled | ( | void | ) |
Get if RXFIFO is enabled.
| void MXC_SPIXR_SendCommand | ( | uint8_t * | cmd, |
| uint32_t | length, | ||
| uint32_t | tx_num_char | ||
| ) |
Send a SPI formatted instruction to external RAM.
| cmd | Array of instructions to send |
| length | number of bytes to send |
| tx_num_char | number of bytes to send |
| int MXC_SPIXR_SetFrequency | ( | int | hz | ) |
Set the SPI Frequency.
| hz | The requested SCLK frequency |
| int MXC_SPIXR_SetSPIMode | ( | mxc_spixr_mode_t | mode | ) |
Set the SPI Mode used.
| mode | The mode to be used |
| void MXC_SPIXR_SetSS | ( | int | ssIdx | ) |
Select which SS pin is used in SPIXR.
| ssIdx | The index of the SS pin to use |
| void MXC_SPIXR_SetSSCtrl | ( | int | stayActive | ) |
Control the deassertion of the SS line.
| stayActive | Keep the SS line asserted between sequential transmissions |
| int MXC_SPIXR_SetSSPolarity | ( | int | activeLow | ) |
Set the active state of the SS line.
| activeLow | Make the slave select line active low |
| void MXC_SPIXR_SetSSTiming | ( | unsigned int | ssIActDelay, |
| unsigned int | postActive, | ||
| unsigned int | preActive | ||
| ) |
Set the SS Timing Parameters.
| ssIActDelay | Delay between end of transaction and start of next |
| postActive | Time after last SCLK that SS remains active |
| preActive | Time after SS becomes active until first SCLK |
| int MXC_SPIXR_SetWidth | ( | mxc_spixr_width_t | width | ) |
Set the SPI Width used.
| width | The width to be used |
| int MXC_SPIXR_Shutdown | ( | void | ) |
Shut Down the SPI RAM XIP Data Module.
| int MXC_SPIXR_ThreeWireModeIsEnabled | ( | void | ) |
Get if three wire mode is enabled.
| int MXC_SPIXR_TXFIFOIsEnabled | ( | void | ) |
Get if TXFIFO is enabled.
| int MXC_SPIXR_WriteTXFIFO | ( | uint8_t * | buf, |
| int | len | ||
| ) |
Loads bytes into the FIFO.
| buf | The buffer containing data to write |
| len | The number of bytes to write |