![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Modules | |
SPIXFC_Registers | |
Registers, Bit Masks and Bit Positions for the SPIXFC Peripheral Module. | |
Data Structures | |
struct | spixfc_cfg_t |
SPIXFC configuration type. More... | |
struct | spixfc_req_t |
SPIXFC Transaction request. More... | |
Macros | |
#define | SPIXFC_HEADER_DIRECTION_POS 0 |
Defining all the bit positions for the 16-BIT Header. | |
#define | SPIXFC_HEADER_UNITS_POS 2 |
#define | SPIXFC_HEADER_SIZE_POS 4 |
#define | SPIXFC_HEADER_WIDTH_POS 9 |
#define | SPIXFC_HEADER_DEASS_SS_POS 13 |
#define | MXC_V_SPIXFC_CONFIG_PAGE_SIZE_4B ((uint32_t)0x00000000UL) |
Page Size and their positions. | |
#define | MXC_V_SPIXFC_CONFIG_PAGE_SIZE_8B ((uint32_t)0x00000001UL) |
#define | MXC_V_SPIXFC_CONFIG_PAGE_SIZE_16B ((uint32_t)0x00000002UL) |
#define | MXC_V_SPIXFC_CONFIG_PAGE_SIZE_32B ((uint32_t)0x00000003UL) |
#define | MXC_S_SPIXFC_CONFIG_PAGE_4B (MXC_V_SPIXFC_CONFIG_PAGE_SIZE_4B << MXC_F_SPIXFC_CONFIG_PAGE_SIZE_POS) |
#define | MXC_S_SPIXFC_CONFIG_PAGE_8B (MXC_V_SPIXFC_CONFIG_PAGE_SIZE_8B << MXC_F_SPIXFC_CONFIG_PAGE_SIZE_POS) |
#define | MXC_S_SPIXFC_CONFIG_PAGE_16B (MXC_V_SPIXFC_CONFIG_PAGE_SIZE_16B << MXC_F_SPIXFC_CONFIG_PAGE_SIZE_POS) |
#define | MXC_S_SPIXFC_CONFIG_PAGE_32B (MXC_V_SPIXFC_CONFIG_PAGE_SIZE_32B << MXC_F_SPIXFC_CONFIG_PAGE_SIZE_POS) |
#define | SPIXFC_HEADER_DEASS_SS 1 |
#define | MAX_SCLK 0x10 |
#define | SPIXFC_HEADER_TX_DIR 1 |
#define | NOT_HEADER_DATA 0xF000 |
Enumerations | |
enum | spixfc_ssel_t { SPIXFC_SSEL0_HIGH = (0x1 << 0), SPIXFC_SSEL0_LOW = 0, SPIXFC_SSEL1_HIGH = (0x1 << 1), SPIXFC_SSEL1_LOW = 0, SPIXFC_SSEL2_HIGH = (0x1 << 2), SPIXFC_SSEL2_LOW = 0, SPIXFC_SSEL3_HIGH = (0x1 << 3), SPIXFC_SSEL3_LOW = 0 } |
Active levels for slave select lines. | |
enum | spixfc_width_t { SPIXFC_WIDTH_1 = 0, SPIXFC_WIDTH_2 = 1, SPIXFC_WIDTH_4 = 2 } |
Number of data lines to use. More... | |
enum | spixfc_hdr_direction_t { SPIXFC_HEADER_DIR_NONE, SPIXFC_HEADER_DIR_TX, SPIXFC_HEADER_DIR_RX, SPIXFC_HEADER_DIR_BOTH } |
enum | spixfc_hdr_units_t { SPIXFC_HEADER_UNITS_BITS, SPIXFC_HEADER_UNITS_BYTES, SPIXFC_HEADER_UNITS_PAGES } |
enum | spixfc_hdr_width_t { SPIXFC_HEADER_WIDTH_SINGLE, SPIXFC_HEADER_WIDTH_DUAL, SPIXFC_HEADER_WIDTH_QUAD, SPIXFC_HEADER_WIDTH_INVALID } |
Functions | |
int | SPIXFC_Init (mxc_spixfc_regs_t *spixfc, const spixfc_cfg_t *cfg, const sys_cfg_spixfc_t *sys_cfg) |
Initialize SPIXFC module and setup the GPIO pins. More... | |
void | SPIXFC_Shutdown (mxc_spixfc_regs_t *spixfc) |
Shutdown SPIXFC module. More... | |
int | SPIXFC_Clocks (mxc_spixfc_regs_t *spixfc, uint32_t len, uint8_t ssel, uint8_t deass) |
Send Clock cycles on SCK without reading or writing. More... | |
int | SPIXFC_Trans (mxc_spixfc_regs_t *spixfc, spixfc_req_t *req) |
Read/write SPIXFC data. More... | |
int | SPIXFC_TransAsync (mxc_spixfc_regs_t *spixfc, spixfc_req_t *req) |
Asynchronously read/write SPIXFC data. More... | |
int | SPIXFC_AbortAsync (mxc_spixfc_regs_t *spixfc, spixfc_req_t *req) |
Abort asynchronous request. More... | |
void | SPIXFC_Handler (mxc_spixfc_regs_t *spixfc) |
SPIXFC interrupt handler. More... | |
int | SPIXFC_PrepForSleep (mxc_spixfc_regs_t *spixfc) |
Attempt to prepare the SPIXFC for sleep. More... | |
enum spixfc_width_t |
int SPIXFC_Init | ( | mxc_spixfc_regs_t * | spixfc, |
const spixfc_cfg_t * | cfg, | ||
const sys_cfg_spixfc_t * | sys_cfg | ||
) |
spixfc | Pointer to SPIXFC regs. |
cfg | Pointer to SPIXFC configuration. |
sys_cfg | Pointer to system configuration object |
void SPIXFC_Shutdown | ( | mxc_spixfc_regs_t * | spixfc | ) |
spixfc | Pointer to SPIXFC regs. |
int SPIXFC_Clocks | ( | mxc_spixfc_regs_t * | spixfc, |
uint32_t | len, | ||
uint8_t | ssel, | ||
uint8_t | deass | ||
) |
spixfc | Pointer to SPIXFC regs. |
len | Number of clock cycles to send. |
ssel | Slave select number. |
deass | De-assert slave select at the end of the transaction. |
int SPIXFC_Trans | ( | mxc_spixfc_regs_t * | spixfc, |
spixfc_req_t * | req | ||
) |
Will block until transaction is complete.
spixfc | Pointer to SPIXFC regs. |
req | Request for a SPIXFC transaction. |
int SPIXFC_TransAsync | ( | mxc_spixfc_regs_t * | spixfc, |
spixfc_req_t * | req | ||
) |
spixfc | Pointer to SPIXFC regs. |
req | Request for a SPIXFC transaction. |
int SPIXFC_AbortAsync | ( | mxc_spixfc_regs_t * | spixfc, |
spixfc_req_t * | req | ||
) |
spixfc | Pointer to SPIXFC regs. |
req | Pointer to request for a SPIXFC transaction. |
void SPIXFC_Handler | ( | mxc_spixfc_regs_t * | spixfc | ) |
This function should be called by the application from the interrupt handler if SPIXFC interrupts are enabled. Alternately, this function can be periodically called by the application if SPIXFC interrupts are disabled.
spixfc | Base address of the SPIXFC module. |
int SPIXFC_PrepForSleep | ( | mxc_spixfc_regs_t * | spixfc | ) |
spixfc | Pointer to SPIXFC regs. |