RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Flexio_mculcd

Data Structures

struct  _flexio_mculcd_type
 Define FlexIO MCULCD access structure typedef. More...
 
struct  _flexio_mculcd_config
 Define FlexIO MCULCD configuration structure. More...
 
struct  _flexio_mculcd_transfer
 Define FlexIO MCULCD transfer structure. More...
 
struct  _flexio_mculcd_handle
 Define FlexIO MCULCD handle structure. More...
 

Variables

FLEXIO_Type_flexio_mculcd_type::flexioBase
 
flexio_mculcd_bus_t _flexio_mculcd_type::busType
 
uint8_t _flexio_mculcd_type::dataPinStartIndex
 
uint8_t _flexio_mculcd_type::ENWRPinIndex
 
uint8_t _flexio_mculcd_type::RDPinIndex
 
uint8_t _flexio_mculcd_type::txShifterStartIndex
 
uint8_t _flexio_mculcd_type::txShifterEndIndex
 
uint8_t _flexio_mculcd_type::rxShifterStartIndex
 
uint8_t _flexio_mculcd_type::rxShifterEndIndex
 
uint8_t _flexio_mculcd_type::timerIndex
 
flexio_mculcd_pin_func_t _flexio_mculcd_type::setCSPin
 
flexio_mculcd_pin_func_t _flexio_mculcd_type::setRSPin
 
flexio_mculcd_pin_func_t _flexio_mculcd_type::setRDWRPin
 
bool _flexio_mculcd_config::enable
 
bool _flexio_mculcd_config::enableInDoze
 
bool _flexio_mculcd_config::enableInDebug
 
bool _flexio_mculcd_config::enableFastAccess
 
uint32_t _flexio_mculcd_config::baudRate_Bps
 
uint32_t _flexio_mculcd_transfer::command
 
flexio_mculcd_transfer_mode_t _flexio_mculcd_transfer::mode
 
uint32_t _flexio_mculcd_transfer::dataAddrOrSameValue
 
size_t _flexio_mculcd_transfer::dataSize
 
uint32_t _flexio_mculcd_handle::dataAddrOrSameValue
 
size_t _flexio_mculcd_handle::dataCount
 
volatile size_t _flexio_mculcd_handle::remainingCount
 
volatile uint32_t _flexio_mculcd_handle::state
 
flexio_mculcd_transfer_callback_t _flexio_mculcd_handle::completionCallback
 
void * _flexio_mculcd_handle::userData
 

Driver version

enum  { kStatus_FLEXIO_MCULCD_Idle = MAKE_STATUS(kStatusGroup_FLEXIO_MCULCD, 0) , kStatus_FLEXIO_MCULCD_Busy = MAKE_STATUS(kStatusGroup_FLEXIO_MCULCD, 1) , kStatus_FLEXIO_MCULCD_Error = MAKE_STATUS(kStatusGroup_FLEXIO_MCULCD, 2) }
 FlexIO LCD transfer status. More...
 
enum  _flexio_mculcd_pixel_format { kFLEXIO_MCULCD_RGB565 = 0 , kFLEXIO_MCULCD_BGR565 , kFLEXIO_MCULCD_RGB888 , kFLEXIO_MCULCD_BGR888 }
 Define FlexIO MCULCD pixel format. More...
 
enum  _flexio_mculcd_bus { kFLEXIO_MCULCD_8080 , kFLEXIO_MCULCD_6800 }
 Define FlexIO MCULCD bus type. More...
 
enum  _flexio_mculcd_interrupt_enable { kFLEXIO_MCULCD_TxEmptyInterruptEnable = (1U << 0U) , kFLEXIO_MCULCD_RxFullInterruptEnable = (1U << 1U) }
 Define FlexIO MCULCD interrupt mask. More...
 
enum  _flexio_mculcd_status_flags { kFLEXIO_MCULCD_TxEmptyFlag = (1U << 0U) , kFLEXIO_MCULCD_RxFullFlag = (1U << 1U) }
 Define FlexIO MCULCD status mask. More...
 
enum  _flexio_mculcd_dma_enable { kFLEXIO_MCULCD_TxDmaEnable = 0x1U , kFLEXIO_MCULCD_RxDmaEnable = 0x2U }
 Define FlexIO MCULCD DMA mask. More...
 
enum  _flexio_mculcd_transfer_mode { kFLEXIO_MCULCD_ReadArray , kFLEXIO_MCULCD_WriteArray , kFLEXIO_MCULCD_WriteSameValue }
 Transfer mode. More...
 
typedef enum _flexio_mculcd_pixel_format flexio_mculcd_pixel_format_t
 Define FlexIO MCULCD pixel format.
 
typedef enum _flexio_mculcd_bus flexio_mculcd_bus_t
 Define FlexIO MCULCD bus type.
 
typedef void(* flexio_mculcd_pin_func_t) (bool set)
 Function to set or clear the CS and RS pin.
 
typedef struct _flexio_mculcd_type FLEXIO_MCULCD_Type
 Define FlexIO MCULCD access structure typedef.
 
typedef struct _flexio_mculcd_config flexio_mculcd_config_t
 Define FlexIO MCULCD configuration structure.
 
typedef enum _flexio_mculcd_transfer_mode flexio_mculcd_transfer_mode_t
 Transfer mode.
 
typedef struct _flexio_mculcd_transfer flexio_mculcd_transfer_t
 Define FlexIO MCULCD transfer structure.
 
typedef struct _flexio_mculcd_handle flexio_mculcd_handle_t
 typedef for flexio_mculcd_handle_t in advance.
 
typedef void(* flexio_mculcd_transfer_callback_t) (FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle, status_t status, void *userData)
 FlexIO MCULCD callback for finished transfer.
 
#define FSL_FLEXIO_MCULCD_DRIVER_VERSION   (MAKE_VERSION(2, 0, 7))
 FlexIO MCULCD driver version.
 
#define FLEXIO_MCULCD_WAIT_COMPLETE_TIME   512
 The delay time to wait for FLEXIO transmit complete.
 
#define FLEXIO_MCULCD_DATA_BUS_WIDTH   16UL
 The data bus width, must be 8 or 16.
 

FlexIO MCULCD Configuration

status_t FLEXIO_MCULCD_Init (FLEXIO_MCULCD_Type *base, flexio_mculcd_config_t *config, uint32_t srcClock_Hz)
 Ungates the FlexIO clock, resets the FlexIO module, configures the FlexIO MCULCD hardware, and configures the FlexIO MCULCD with FlexIO MCULCD configuration. The configuration structure can be filled by the user, or be set with default values by the FLEXIO_MCULCD_GetDefaultConfig.
 
void FLEXIO_MCULCD_Deinit (FLEXIO_MCULCD_Type *base)
 Resets the FLEXIO_MCULCD timer and shifter configuration.
 
void FLEXIO_MCULCD_GetDefaultConfig (flexio_mculcd_config_t *config)
 Gets the default configuration to configure the FlexIO MCULCD.
 

Status

uint32_t FLEXIO_MCULCD_GetStatusFlags (FLEXIO_MCULCD_Type *base)
 Gets FlexIO MCULCD status flags.
 
void FLEXIO_MCULCD_ClearStatusFlags (FLEXIO_MCULCD_Type *base, uint32_t mask)
 Clears FlexIO MCULCD status flags.
 

Interrupts

void FLEXIO_MCULCD_EnableInterrupts (FLEXIO_MCULCD_Type *base, uint32_t mask)
 Enables the FlexIO MCULCD interrupt.
 
void FLEXIO_MCULCD_DisableInterrupts (FLEXIO_MCULCD_Type *base, uint32_t mask)
 Disables the FlexIO MCULCD interrupt.
 

Bus Operations

status_t FLEXIO_MCULCD_SetBaudRate (FLEXIO_MCULCD_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz)
 Set desired baud rate.
 
void FLEXIO_MCULCD_SetSingleBeatWriteConfig (FLEXIO_MCULCD_Type *base)
 Configures the FLEXIO MCULCD to multiple beats write mode.
 
void FLEXIO_MCULCD_ClearSingleBeatWriteConfig (FLEXIO_MCULCD_Type *base)
 Clear the FLEXIO MCULCD multiple beats write mode configuration.
 
void FLEXIO_MCULCD_SetSingleBeatReadConfig (FLEXIO_MCULCD_Type *base)
 Configures the FLEXIO MCULCD to multiple beats read mode.
 
void FLEXIO_MCULCD_ClearSingleBeatReadConfig (FLEXIO_MCULCD_Type *base)
 Clear the FLEXIO MCULCD multiple beats read mode configuration.
 
void FLEXIO_MCULCD_SetMultiBeatsWriteConfig (FLEXIO_MCULCD_Type *base)
 Configures the FLEXIO MCULCD to multiple beats write mode.
 
void FLEXIO_MCULCD_ClearMultiBeatsWriteConfig (FLEXIO_MCULCD_Type *base)
 Clear the FLEXIO MCULCD multiple beats write mode configuration.
 
void FLEXIO_MCULCD_SetMultiBeatsReadConfig (FLEXIO_MCULCD_Type *base)
 Configures the FLEXIO MCULCD to multiple beats read mode.
 
void FLEXIO_MCULCD_ClearMultiBeatsReadConfig (FLEXIO_MCULCD_Type *base)
 Clear the FLEXIO MCULCD multiple beats read mode configuration.
 
uint32_t FLEXIO_MCULCD_ReadData (FLEXIO_MCULCD_Type *base)
 Read data from the FLEXIO MCULCD RX shifter buffer.
 
void FLEXIO_MCULCD_WaitTransmitComplete (void)
 Wait for transmit data send out finished.
 
void FLEXIO_MCULCD_WriteCommandBlocking (FLEXIO_MCULCD_Type *base, uint32_t command)
 Send command in blocking way.
 
void FLEXIO_MCULCD_WriteDataArrayBlocking (FLEXIO_MCULCD_Type *base, const void *data, size_t size)
 Send data array in blocking way.
 
void FLEXIO_MCULCD_ReadDataArrayBlocking (FLEXIO_MCULCD_Type *base, void *data, size_t size)
 Read data into array in blocking way.
 
void FLEXIO_MCULCD_WriteSameValueBlocking (FLEXIO_MCULCD_Type *base, uint32_t sameValue, size_t size)
 Send the same value many times in blocking way.
 
void FLEXIO_MCULCD_TransferBlocking (FLEXIO_MCULCD_Type *base, flexio_mculcd_transfer_t *xfer)
 Performs a polling transfer.
 

Transactional

status_t FLEXIO_MCULCD_TransferCreateHandle (FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle, flexio_mculcd_transfer_callback_t callback, void *userData)
 Initializes the FlexIO MCULCD handle, which is used in transactional functions.
 
status_t FLEXIO_MCULCD_TransferNonBlocking (FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle, flexio_mculcd_transfer_t *xfer)
 Transfer data using IRQ.
 
void FLEXIO_MCULCD_TransferAbort (FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle)
 Aborts the data transfer, which used IRQ.
 
status_t FLEXIO_MCULCD_TransferGetCount (FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle, size_t *count)
 Gets the data transfer status which used IRQ.
 
void FLEXIO_MCULCD_TransferHandleIRQ (void *base, void *handle)
 FlexIO MCULCD IRQ handler function.
 

Detailed Description

Macro Definition Documentation

◆ FLEXIO_MCULCD_WAIT_COMPLETE_TIME

#define FLEXIO_MCULCD_WAIT_COMPLETE_TIME   512

The delay time to wait for FLEXIO transmit complete.

Currently there is no method to detect whether the data has been sent out from the shifter, so the driver use a software delay for this. When the data is written to shifter buffer, the driver call the delay function to wait for the data shift out. If this value is too small, then the last few bytes might be lost when writing data using interrupt method or DMA method.

Typedef Documentation

◆ flexio_mculcd_transfer_callback_t

typedef void(* flexio_mculcd_transfer_callback_t) (FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle, status_t status, void *userData)

FlexIO MCULCD callback for finished transfer.

When transfer finished, the callback function is called and returns the status as kStatus_FLEXIO_MCULCD_Idle.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

FlexIO LCD transfer status.

Enumerator
kStatus_FLEXIO_MCULCD_Idle 

FlexIO LCD is idle.

kStatus_FLEXIO_MCULCD_Busy 

FlexIO LCD is busy

kStatus_FLEXIO_MCULCD_Error 

FlexIO LCD error occurred

◆ _flexio_mculcd_bus

Define FlexIO MCULCD bus type.

Enumerator
kFLEXIO_MCULCD_8080 

Using Intel 8080 bus.

kFLEXIO_MCULCD_6800 

Using Motorola 6800 bus.

◆ _flexio_mculcd_dma_enable

Define FlexIO MCULCD DMA mask.

Enumerator
kFLEXIO_MCULCD_TxDmaEnable 

Tx DMA request source

kFLEXIO_MCULCD_RxDmaEnable 

Rx DMA request source

◆ _flexio_mculcd_interrupt_enable

Define FlexIO MCULCD interrupt mask.

Enumerator
kFLEXIO_MCULCD_TxEmptyInterruptEnable 

Transmit buffer empty interrupt enable.

kFLEXIO_MCULCD_RxFullInterruptEnable 

Receive buffer full interrupt enable.

◆ _flexio_mculcd_pixel_format

Define FlexIO MCULCD pixel format.

Enumerator
kFLEXIO_MCULCD_RGB565 

RGB565, 16-bit.

kFLEXIO_MCULCD_BGR565 

BGR565, 16-bit.

kFLEXIO_MCULCD_RGB888 

RGB888, 24-bit.

kFLEXIO_MCULCD_BGR888 

BGR888, 24-bit.

◆ _flexio_mculcd_status_flags

Define FlexIO MCULCD status mask.

Enumerator
kFLEXIO_MCULCD_TxEmptyFlag 

Transmit buffer empty flag.

kFLEXIO_MCULCD_RxFullFlag 

Receive buffer full flag.

◆ _flexio_mculcd_transfer_mode

Transfer mode.

Enumerator
kFLEXIO_MCULCD_ReadArray 

Read data into an array.

kFLEXIO_MCULCD_WriteArray 

Write data from an array.

kFLEXIO_MCULCD_WriteSameValue 

Write the same value many times.

Function Documentation

◆ FLEXIO_MCULCD_ClearMultiBeatsReadConfig()

void FLEXIO_MCULCD_ClearMultiBeatsReadConfig ( FLEXIO_MCULCD_Type base)

Clear the FLEXIO MCULCD multiple beats read mode configuration.

Clear the read configuration set by FLEXIO_MCULCD_SetMultBeatsReadConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_ClearMultiBeatsWriteConfig()

void FLEXIO_MCULCD_ClearMultiBeatsWriteConfig ( FLEXIO_MCULCD_Type base)

Clear the FLEXIO MCULCD multiple beats write mode configuration.

Clear the write configuration set by FLEXIO_MCULCD_SetMultBeatsWriteConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_ClearSingleBeatReadConfig()

void FLEXIO_MCULCD_ClearSingleBeatReadConfig ( FLEXIO_MCULCD_Type base)

Clear the FLEXIO MCULCD multiple beats read mode configuration.

Clear the read configuration set by FLEXIO_MCULCD_SetSingleBeatReadConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_ClearSingleBeatWriteConfig()

void FLEXIO_MCULCD_ClearSingleBeatWriteConfig ( FLEXIO_MCULCD_Type base)

Clear the FLEXIO MCULCD multiple beats write mode configuration.

Clear the write configuration set by FLEXIO_MCULCD_SetSingleBeatWriteConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_ClearStatusFlags()

void FLEXIO_MCULCD_ClearStatusFlags ( FLEXIO_MCULCD_Type base,
uint32_t  mask 
)

Clears FlexIO MCULCD status flags.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
maskStatus to clear, it is the OR'ed value of _flexio_mculcd_status_flags.
Note
Don't use this function with DMA APIs.

◆ FLEXIO_MCULCD_Deinit()

void FLEXIO_MCULCD_Deinit ( FLEXIO_MCULCD_Type base)

Resets the FLEXIO_MCULCD timer and shifter configuration.

Parameters
basePointer to the FLEXIO_MCULCD_Type.

◆ FLEXIO_MCULCD_DisableInterrupts()

void FLEXIO_MCULCD_DisableInterrupts ( FLEXIO_MCULCD_Type base,
uint32_t  mask 
)

Disables the FlexIO MCULCD interrupt.

This function disables the FlexIO MCULCD interrupt.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
maskInterrupts to disable, it is the OR'ed value of _flexio_mculcd_interrupt_enable.

◆ FLEXIO_MCULCD_EnableInterrupts()

void FLEXIO_MCULCD_EnableInterrupts ( FLEXIO_MCULCD_Type base,
uint32_t  mask 
)

Enables the FlexIO MCULCD interrupt.

This function enables the FlexIO MCULCD interrupt.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
maskInterrupts to enable, it is the OR'ed value of _flexio_mculcd_interrupt_enable.

◆ FLEXIO_MCULCD_GetDefaultConfig()

void FLEXIO_MCULCD_GetDefaultConfig ( flexio_mculcd_config_t config)

Gets the default configuration to configure the FlexIO MCULCD.

The default configuration value is:

config->enable = true;
config->enableInDoze = false;
config->enableInDebug = true;
config->enableFastAccess = true;
config->baudRate_Bps = 96000000U;
Definition: deflate.c:114
Parameters
configPointer to the flexio_mculcd_config_t structure.

◆ FLEXIO_MCULCD_GetStatusFlags()

uint32_t FLEXIO_MCULCD_GetStatusFlags ( FLEXIO_MCULCD_Type base)

Gets FlexIO MCULCD status flags.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
Returns
status flag; OR'ed value or the _flexio_mculcd_status_flags.
Note
Don't use this function with DMA APIs.

◆ FLEXIO_MCULCD_Init()

status_t FLEXIO_MCULCD_Init ( FLEXIO_MCULCD_Type base,
flexio_mculcd_config_t config,
uint32_t  srcClock_Hz 
)

Ungates the FlexIO clock, resets the FlexIO module, configures the FlexIO MCULCD hardware, and configures the FlexIO MCULCD with FlexIO MCULCD configuration. The configuration structure can be filled by the user, or be set with default values by the FLEXIO_MCULCD_GetDefaultConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
configPointer to the flexio_mculcd_config_t structure.
srcClock_HzFlexIO source clock in Hz.
Return values
kStatus_SuccessInitialization success.
kStatus_InvalidArgumentInitialization failed because of invalid argument.

◆ FLEXIO_MCULCD_ReadData()

uint32_t FLEXIO_MCULCD_ReadData ( FLEXIO_MCULCD_Type base)

Read data from the FLEXIO MCULCD RX shifter buffer.

Read data from the RX shift buffer directly, it does no check whether the buffer is empty or not.

If the data bus width is 8-bit:

uint8_t value;
value = (uint8_t)FLEXIO_MCULCD_ReadData(base);
uint32_t FLEXIO_MCULCD_ReadData(FLEXIO_MCULCD_Type *base)
Read data from the FLEXIO MCULCD RX shifter buffer.

If the data bus width is 16-bit:

uint16_t value;
value = (uint16_t)FLEXIO_MCULCD_ReadData(base);
Note
This function returns the RX shifter buffer value (32-bit) directly. The return value should be converted according to data bus width.
Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
Returns
The data read out.
Note
Don't use this function with DMA APIs.

◆ FLEXIO_MCULCD_ReadDataArrayBlocking()

void FLEXIO_MCULCD_ReadDataArrayBlocking ( FLEXIO_MCULCD_Type base,
void *  data,
size_t  size 
)

Read data into array in blocking way.

This function reads the data into array and returns when the data read finished.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
dataThe array to save the data.
sizeHow many bytes to read.

◆ FLEXIO_MCULCD_SetBaudRate()

status_t FLEXIO_MCULCD_SetBaudRate ( FLEXIO_MCULCD_Type base,
uint32_t  baudRate_Bps,
uint32_t  srcClock_Hz 
)

Set desired baud rate.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
baudRate_BpsDesired baud rate.
srcClock_HzFLEXIO clock frequency in Hz.
Return values
kStatus_SuccessSet successfully.
kStatus_InvalidArgumentCould not set the baud rate.

◆ FLEXIO_MCULCD_SetMultiBeatsReadConfig()

void FLEXIO_MCULCD_SetMultiBeatsReadConfig ( FLEXIO_MCULCD_Type base)

Configures the FLEXIO MCULCD to multiple beats read mode.

At the begining or multiple beats read operation, the FLEXIO MCULCD is configured to multiple beats read mode using this function. After read operation, the configuration is cleared by FLEXIO_MCULCD_ClearMultBeatsReadConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_SetMultiBeatsWriteConfig()

void FLEXIO_MCULCD_SetMultiBeatsWriteConfig ( FLEXIO_MCULCD_Type base)

Configures the FLEXIO MCULCD to multiple beats write mode.

At the begining multiple beats write operation, the FLEXIO MCULCD is configured to multiple beats write mode using this function. After write operation, the configuration is cleared by FLEXIO_MCULCD_ClearMultBeatsWriteConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_SetSingleBeatReadConfig()

void FLEXIO_MCULCD_SetSingleBeatReadConfig ( FLEXIO_MCULCD_Type base)

Configures the FLEXIO MCULCD to multiple beats read mode.

At the begining or multiple beats read operation, the FLEXIO MCULCD is configured to multiple beats read mode using this function. After read operation, the configuration is cleared by FLEXIO_MCULCD_ClearSingleBeatReadConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_SetSingleBeatWriteConfig()

void FLEXIO_MCULCD_SetSingleBeatWriteConfig ( FLEXIO_MCULCD_Type base)

Configures the FLEXIO MCULCD to multiple beats write mode.

At the begining multiple beats write operation, the FLEXIO MCULCD is configured to multiple beats write mode using this function. After write operation, the configuration is cleared by FLEXIO_MCULCD_ClearSingleBeatWriteConfig.

Parameters
basePointer to the FLEXIO_MCULCD_Type.
Note
This is an internal used function, upper layer should not use.

◆ FLEXIO_MCULCD_TransferAbort()

void FLEXIO_MCULCD_TransferAbort ( FLEXIO_MCULCD_Type base,
flexio_mculcd_handle_t handle 
)

Aborts the data transfer, which used IRQ.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
handlePointer to the flexio_mculcd_handle_t structure to store the transfer state.

◆ FLEXIO_MCULCD_TransferBlocking()

void FLEXIO_MCULCD_TransferBlocking ( FLEXIO_MCULCD_Type base,
flexio_mculcd_transfer_t xfer 
)

Performs a polling transfer.

Note
The API does not return until the transfer finished.
Parameters
basepointer to FLEXIO_MCULCD_Type structure.
xferpointer to flexio_mculcd_transfer_t structure.

◆ FLEXIO_MCULCD_TransferCreateHandle()

status_t FLEXIO_MCULCD_TransferCreateHandle ( FLEXIO_MCULCD_Type base,
flexio_mculcd_handle_t handle,
flexio_mculcd_transfer_callback_t  callback,
void *  userData 
)

Initializes the FlexIO MCULCD handle, which is used in transactional functions.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
handlePointer to the flexio_mculcd_handle_t structure to store the transfer state.
callbackThe callback function.
userDataThe parameter of the callback function.
Return values
kStatus_SuccessSuccessfully create the handle.
kStatus_OutOfRangeThe FlexIO type/handle/ISR table out of range.

◆ FLEXIO_MCULCD_TransferGetCount()

status_t FLEXIO_MCULCD_TransferGetCount ( FLEXIO_MCULCD_Type base,
flexio_mculcd_handle_t handle,
size_t *  count 
)

Gets the data transfer status which used IRQ.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
handlePointer to the flexio_mculcd_handle_t structure to store the transfer state.
countHow many bytes transferred so far by the non-blocking transaction.
Return values
kStatus_SuccessGet the transferred count Successfully.
kStatus_NoTransferInProgressNo transfer in process.

◆ FLEXIO_MCULCD_TransferHandleIRQ()

void FLEXIO_MCULCD_TransferHandleIRQ ( void *  base,
void *  handle 
)

FlexIO MCULCD IRQ handler function.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
handlePointer to the flexio_mculcd_handle_t structure to store the transfer state.

◆ FLEXIO_MCULCD_TransferNonBlocking()

status_t FLEXIO_MCULCD_TransferNonBlocking ( FLEXIO_MCULCD_Type base,
flexio_mculcd_handle_t handle,
flexio_mculcd_transfer_t xfer 
)

Transfer data using IRQ.

This function sends data using IRQ. This is a non-blocking function, which returns right away. When all data is sent out/received, the callback function is called.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
handlePointer to the flexio_mculcd_handle_t structure to store the transfer state.
xferFlexIO MCULCD transfer structure. See flexio_mculcd_transfer_t.
Return values
kStatus_SuccessSuccessfully start a transfer.
kStatus_InvalidArgumentInput argument is invalid.
kStatus_FLEXIO_MCULCD_BusyMCULCD is busy with another transfer.

◆ FLEXIO_MCULCD_WaitTransmitComplete()

void FLEXIO_MCULCD_WaitTransmitComplete ( void  )

Wait for transmit data send out finished.

Currently there is no effective method to wait for the data send out from the shiter, so here use a while loop to wait.

Note
This is an internal used function.

◆ FLEXIO_MCULCD_WriteCommandBlocking()

void FLEXIO_MCULCD_WriteCommandBlocking ( FLEXIO_MCULCD_Type base,
uint32_t  command 
)

Send command in blocking way.

This function sends the command and returns when the command has been sent out.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
commandThe command to send.

◆ FLEXIO_MCULCD_WriteDataArrayBlocking()

void FLEXIO_MCULCD_WriteDataArrayBlocking ( FLEXIO_MCULCD_Type base,
const void *  data,
size_t  size 
)

Send data array in blocking way.

This function sends the data array and returns when the data sent out.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
dataThe data array to send.
sizeHow many bytes to write.

◆ FLEXIO_MCULCD_WriteSameValueBlocking()

void FLEXIO_MCULCD_WriteSameValueBlocking ( FLEXIO_MCULCD_Type base,
uint32_t  sameValue,
size_t  size 
)

Send the same value many times in blocking way.

This function sends the same value many times. It could be used to clear the LCD screen. If the data bus width is 8, this function will send LSB 8 bits of sameValue for size times. If the data bus is 16, this function will send LSB 16 bits of sameValue for size / 2 times.

Parameters
basePointer to the FLEXIO_MCULCD_Type structure.
sameValueThe same value to send.
sizeHow many bytes to send.

Variable Documentation

◆ baudRate_Bps

uint32_t _flexio_mculcd_config::baudRate_Bps

Baud rate in Bps.

◆ busType

flexio_mculcd_bus_t _flexio_mculcd_type::busType

The bus type, 8080 or 6800.

◆ command

uint32_t _flexio_mculcd_transfer::command

Command to send.

◆ completionCallback

flexio_mculcd_transfer_callback_t _flexio_mculcd_handle::completionCallback

FlexIO MCULCD transfer completed callback.

◆ dataAddrOrSameValue [1/2]

uint32_t _flexio_mculcd_transfer::dataAddrOrSameValue

When sending the same value for many times, this is the value to send. When writing or reading array, this is the address of the data array.

◆ dataAddrOrSameValue [2/2]

uint32_t _flexio_mculcd_handle::dataAddrOrSameValue

When sending the same value for many times, this is the value to send. When writing or reading array, this is the address of the data array.

◆ dataCount

size_t _flexio_mculcd_handle::dataCount

Total count to be transferred.

◆ dataPinStartIndex

uint8_t _flexio_mculcd_type::dataPinStartIndex

Start index of the data pin, the FlexIO pin dataPinStartIndex to (dataPinStartIndex + FLEXIO_MCULCD_DATA_BUS_WIDTH -1) will be used for data transfer. Only support data bus width 8 and 16.

◆ dataSize

size_t _flexio_mculcd_transfer::dataSize

How many bytes to transfer.

◆ enable

bool _flexio_mculcd_config::enable

Enable/disable FlexIO MCULCD after configuration.

◆ enableFastAccess

bool _flexio_mculcd_config::enableFastAccess

Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.

◆ enableInDebug

bool _flexio_mculcd_config::enableInDebug

Enable/disable FlexIO operation in debug mode.

◆ enableInDoze

bool _flexio_mculcd_config::enableInDoze

Enable/disable FlexIO operation in doze mode.

◆ ENWRPinIndex

uint8_t _flexio_mculcd_type::ENWRPinIndex

Pin select for WR(8080 mode), EN(6800 mode).

◆ flexioBase

FLEXIO_Type* _flexio_mculcd_type::flexioBase

FlexIO base pointer.

◆ mode

flexio_mculcd_transfer_mode_t _flexio_mculcd_transfer::mode

Transfer mode.

◆ RDPinIndex

uint8_t _flexio_mculcd_type::RDPinIndex

Pin select for RD(8080 mode), not used in 6800 mode.

◆ remainingCount

volatile size_t _flexio_mculcd_handle::remainingCount

Remaining count to transfer.

◆ rxShifterEndIndex

uint8_t _flexio_mculcd_type::rxShifterEndIndex

End index of shifters used for data read, it must be 3 or 7.

◆ rxShifterStartIndex

uint8_t _flexio_mculcd_type::rxShifterStartIndex

Start index of shifters used for data read.

◆ setCSPin

flexio_mculcd_pin_func_t _flexio_mculcd_type::setCSPin

Function to set or clear the CS pin.

◆ setRDWRPin

flexio_mculcd_pin_func_t _flexio_mculcd_type::setRDWRPin

Function to set or clear the RD/WR pin, only used in 6800 mode.

◆ setRSPin

flexio_mculcd_pin_func_t _flexio_mculcd_type::setRSPin

Function to set or clear the RS pin.

◆ state

volatile uint32_t _flexio_mculcd_handle::state

FlexIO MCULCD internal state.

◆ timerIndex

uint8_t _flexio_mculcd_type::timerIndex

Timer index used in FlexIO MCULCD.

◆ txShifterEndIndex

uint8_t _flexio_mculcd_type::txShifterEndIndex

End index of shifters used for data write.

◆ txShifterStartIndex

uint8_t _flexio_mculcd_type::txShifterStartIndex

Start index of shifters used for data write, it must be 0 or 4.

◆ userData

void* _flexio_mculcd_handle::userData

Callback parameter.