![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Data Structures | |
struct | lcdic_config_t |
LCDIC configuration. More... | |
union | lcdic_trx_cmd_t |
LCDIC TRX command. More... | |
struct | lcdic_repeat_tx_xfer_t |
LCDIC repeat data TX transfer structure. More... | |
struct | lcdic_tx_xfer_t |
LCDIC data array TX transfer structure. More... | |
struct | lcdic_rx_xfer_t |
LCDIC data array RX transfer structure. More... | |
struct | lcdic_xfer_t |
LCDIC transfer structure. More... | |
struct | lcdic_handle_t |
LCDIC handle structure. More... | |
Macros | |
#define | LCDIC_RESET_STATE_DELAY 130u |
Delay used in LCDIC_ResetState. More... | |
Typedefs | |
typedef void(* | lcdic_transfer_callback_t )(LCDIC_Type *base, lcdic_handle_t *handle, status_t status, void *userData) |
LCDIC transfer callback function. More... | |
typedef void(* | lcdic_transfer_irq_handler_t )(LCDIC_Type *base, void *handle) |
Typedef for transactional APIs IRQ handler. More... | |
typedef void(* | lcdic_reset_done_callback_t )(LCDIC_Type *base) |
Typedef for reset sequence sent done callback. More... | |
Driver version | |
#define | FSL_LCDIC_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
Initialization and deinitialization | |
status_t | LCDIC_Init (LCDIC_Type *base, const lcdic_config_t *config) |
Initialize the LCDIC. More... | |
void | LCDIC_Deinit (LCDIC_Type *base) |
De-initialize the LCDIC. More... | |
void | LCDIC_GetDefaultConfig (lcdic_config_t *config) |
Get the default configuration for to initialize the LCDIC. More... | |
void | LCDIC_ResetState (LCDIC_Type *base) |
Reset the LCDIC. More... | |
Interrupts | |
static void | LCDIC_EnableInterrupts (LCDIC_Type *base, uint32_t interrupts) |
Enables LCDIC interrupts. More... | |
static void | LCDIC_DisableInterrupts (LCDIC_Type *base, uint32_t interrupts) |
Disable LCDIC interrupts. More... | |
static uint32_t | LCDIC_GetInterruptStatus (LCDIC_Type *base) |
Get LCDIC interrupt pending status. More... | |
static uint32_t | LCDIC_GetInterruptRawStatus (LCDIC_Type *base) |
Get LCDIC raw interrupt status. More... | |
static void | LCDIC_ClearInterruptStatus (LCDIC_Type *base, uint32_t interrupts) |
Clear LCDIC interrupt status. More... | |
static uint32_t | LCDIC_GetStatusFlags (LCDIC_Type *base) |
Get LCDIC status flags. More... | |
static uint32_t | LCDIC_GetProcessingTrxCmd (LCDIC_Type *base) |
Get current on-going LCDIC TRX-CMD. More... | |
FIFO | |
static void | LCDIC_SetTxThreshold (LCDIC_Type *base, lcdic_tx_threshold_t threshold) |
Set TX FIFO threshold. More... | |
static void | LCDIC_SetRxThreshold (LCDIC_Type *base, lcdic_rx_threshold_t threshold) |
Set RX FIFO threshold. More... | |
status_t | LCDIC_WriteTxFifoBlocking (LCDIC_Type *base, const uint32_t *data, uint32_t dataLen_Word) |
Write the TX FIFO using blocking way. More... | |
status_t | LCDIC_ReadRxFifoBlocking (LCDIC_Type *base, uint32_t *data, uint32_t dataLen_Word) |
Read the RX FIFO using blocking way. More... | |
Misc Operations | |
static void | LCDIC_SendResetSequence (LCDIC_Type *base) |
Send reset sequence to the reset pin. More... | |
void | LCDIC_SetResetSequenceDoneCallback (lcdic_reset_done_callback_t callback) |
Set the callback called when reset sequence sent done. More... | |
static void | LCDIC_EnableDMA (LCDIC_Type *base, bool enable) |
Enable or disable to trigger DMA. More... | |
Blocking transfer | |
status_t | LCDIC_SendCommandBlocking (LCDIC_Type *base, uint8_t cmd) |
Send command using blocking way. More... | |
status_t | LCDIC_SendRepeatDataBlocking (LCDIC_Type *base, const lcdic_repeat_tx_xfer_t *xfer) |
Send repeat data using blocking way. More... | |
status_t | LCDIC_SendDataArrayBlocking (LCDIC_Type *base, const lcdic_tx_xfer_t *xfer) |
Send data array using blocking way. More... | |
status_t | LCDIC_ReadDataArrayBlocking (LCDIC_Type *base, const lcdic_rx_xfer_t *xfer) |
Read data array using blocking way. More... | |
status_t | LCDC_TransferBlocking (LCDIC_Type *base, const lcdic_xfer_t *xfer) |
LCDIC data transfer using blocking way. More... | |
Transactional APIs | |
status_t | LCDIC_TransferCreateHandle (LCDIC_Type *base, lcdic_handle_t *handle, lcdic_transfer_callback_t callback, void *userData) |
Initializes the LCDIC driver handle, which is used in transactional functions. More... | |
status_t | LCDIC_TransferNonBlocking (LCDIC_Type *base, lcdic_handle_t *handle, lcdic_xfer_t *xfer) |
Transfer data using IRQ. More... | |
status_t | LCDIC_SendCommandNonBlocking (LCDIC_Type *base, lcdic_handle_t *handle, uint8_t cmd) |
Send command using interrupt-driven way. More... | |
status_t | LCDIC_SendRepeatDataNonBlocking (LCDIC_Type *base, lcdic_handle_t *handle, const lcdic_repeat_tx_xfer_t *xfer) |
Send repeat data using interrupt-driven way. More... | |
status_t | LCDIC_SendDataArrayNonBlocking (LCDIC_Type *base, lcdic_handle_t *handle, const lcdic_tx_xfer_t *xfer) |
Send data array using interrupt-driven way. More... | |
status_t | LCDIC_ReadDataArrayNonBlocking (LCDIC_Type *base, lcdic_handle_t *handle, const lcdic_rx_xfer_t *xfer) |
Read data array using interrupt-driven way. More... | |
void | LCDIC_TransferHandleIRQ (LCDIC_Type *base, void *handle) |
LCDIC IRQ handler function. More... | |
void | LCDIC_TransferInstallIRQHandler (uint32_t instance, void *handle, lcdic_transfer_irq_handler_t handler) |
Install the IRQ handler. More... | |
Helper functions | |
uint32_t | LCDIC_GetInstance (LCDIC_Type *base) |
Get the instance from the base address. More... | |
IRQn_Type | LCDIC_GetIRQn (uint32_t instance) |
Get IRQn for specific instance. More... | |
uint32_t | LCDIC_FillByteToWord (const uint8_t *bytes, uint8_t len) |
Get data from byte array, and fill to 4-byte word. More... | |
void | LCDIC_ExtractByteFromWord (uint32_t word, uint8_t *bytes, uint8_t len) |
Get data from 4-byte, and fill to byte array. More... | |
status_t | LCDIC_PrepareSendCommand (LCDIC_Type *base, uint8_t cmd) |
Prepare the command sending. More... | |
status_t | LCDIC_PrepareSendRepeatData (LCDIC_Type *base, const lcdic_repeat_tx_xfer_t *xfer) |
Prepare the repeat data sending. More... | |
status_t | LCDIC_PrepareSendDataArray (LCDIC_Type *base, const lcdic_tx_xfer_t *xfer, uint32_t *xferSizeWordAligned, uint8_t *xferSizeWordUnaligned, uint32_t *wordUnalignedData) |
Prepare sending data array. More... | |
status_t | LCDIC_PrepareReadDataArray (LCDIC_Type *base, const lcdic_rx_xfer_t *xfer, uint32_t *xferSizeWordAligned, uint8_t *xferSizeWordUnaligned) |
Prepare reading data array. More... | |
struct lcdic_config_t |
Data Fields | |
lcdic_mode_t | mode |
LCDIC work mode. More... | |
lcdic_endian_t | endian |
Data endian. More... | |
lcdic_rx_threshold_t | rxThreshold |
RX FIFO threshold. More... | |
lcdic_tx_threshold_t | txThreshold |
TX FIFO threshold. More... | |
uint8_t | timerRatio0 |
Valid range: 0~15. More... | |
uint8_t | timerRatio1 |
Valid range: 0~15. More... | |
uint8_t | resetPulseWidth_Timer0 |
Reset pulse width, in the unit of timer0 period. More... | |
uint8_t | resetSequence |
Reset sequence, it is a 8-bit value sent to reset pin from LSB. More... | |
uint8_t | resetSequencePulseNum |
Reset sequence pulse number, valid range is 1 ~ 8. More... | |
lcdic_reset_polarity_t | resetPolarity |
Reset signal polarity. More... | |
uint8_t | i8080CtrlFlags |
I8080 control flags, it is OR'ed value of _lcdic_i8080_ctrl_flags. More... | |
uint8_t | csWaitTime |
Minimum CS inactive pulse width. More... | |
uint8_t | csSetupTime |
Minimum CS setup time before WR/RD. More... | |
uint8_t | csHoldTime |
Minimum CS hold time after WR/RD. More... | |
uint8_t | dcSetupTime |
Minimum DC setup time before WR/RD/CS. More... | |
uint8_t | dcHoldTime |
Minimum DC hold time after WR/RD/CS. More... | |
uint8_t | writeDataSetupTime |
Minimum write data setup time after WR active. More... | |
uint8_t | writeDataHoldTime |
Minimum write data setup time before WR active. More... | |
uint8_t | writeEnableActiveWidth |
Minmum write enable active pulse width. More... | |
uint8_t | writeEnableInactiveWidth |
Minmum write enable inactive pulse width. More... | |
uint8_t | readEnableActiveWidth |
Minmum read enable active pulse width. More... | |
uint8_t | readEnableInactiveWidth |
Minmum read enable inactive pulse width. More... | |
uint8_t | spiCtrlFlags |
SPI control flags, it is OR'ed value of _lcdic_spi_ctrl_flags. More... | |
uint8_t | teTimeoutTime_Timer1 |
Tearing effect timeout time. More... | |
uint8_t | teSyncWaitTime_Timer1 |
Tearing effect signal synchronization wait time. More... | |
uint8_t | cmdShortTimeout_Timer0 |
Command short timeout. More... | |
uint8_t | cmdLongTimeout_Timer1 |
Command long timeout. More... | |
lcdic_mode_t lcdic_config_t::mode |
lcdic_endian_t lcdic_config_t::endian |
lcdic_rx_threshold_t lcdic_config_t::rxThreshold |
lcdic_tx_threshold_t lcdic_config_t::txThreshold |
uint8_t lcdic_config_t::timerRatio0 |
freq(timer0) = freq(lcdic_clk) / (2 ^ timerRatio0).
uint8_t lcdic_config_t::timerRatio1 |
freq(timer1) = freq(timer0) / (2 ^ timerRatio1).
uint8_t lcdic_config_t::resetPulseWidth_Timer0 |
Valid range 1 ~ 64.
uint8_t lcdic_config_t::resetSequence |
uint8_t lcdic_config_t::resetSequencePulseNum |
lcdic_reset_polarity_t lcdic_config_t::resetPolarity |
uint8_t lcdic_config_t::i8080CtrlFlags |
uint8_t lcdic_config_t::csWaitTime |
T(csw)=T(lcdic_clk)*csWaitTime, valid range 0-7.
uint8_t lcdic_config_t::csSetupTime |
T(css)=T(lcdic_clk)*csSetupTime, valid range 0-255.
uint8_t lcdic_config_t::csHoldTime |
T(csh)=T(lcdic_clk)*csHoldTime, valid range 0-7.
uint8_t lcdic_config_t::dcSetupTime |
T(dcs)=T(lcdic_clk)*dsSetupTime, valid range 0-7.
uint8_t lcdic_config_t::dcHoldTime |
T(dch)=T(lcdic_clk)*dsHoldTime, valid range 0-7.
uint8_t lcdic_config_t::writeDataSetupTime |
T(wdh)=T(lcdic_clk)*writeDataSetupTime, valid range 0-7.
uint8_t lcdic_config_t::writeDataHoldTime |
T(wds)=T(lcdic_clk)*writeDataHoldTime, valid range 0-7.
uint8_t lcdic_config_t::writeEnableActiveWidth |
T(waw)=T(lcdic_clk)*writeEnableActiveWidth, valid range 0-63.
uint8_t lcdic_config_t::writeEnableInactiveWidth |
T(wiw)=T(lcdic_clk)*writeEnableInactiveWidth, valid range 0-63.
uint8_t lcdic_config_t::readEnableActiveWidth |
T(raw)=T(lcdic_clk)*readEnableActiveWidth, valid range 0-255.
uint8_t lcdic_config_t::readEnableInactiveWidth |
T(riw)=T(lcdic_clk)*readEnableInactiveWidth, valid range 0-255.
uint8_t lcdic_config_t::spiCtrlFlags |
uint8_t lcdic_config_t::teTimeoutTime_Timer1 |
T(te_to)=T(timer1)*teTimeoutTime_Timer1.
uint8_t lcdic_config_t::teSyncWaitTime_Timer1 |
T(tew)=T(timer1)*teSyncWaitTime_Timer1.
uint8_t lcdic_config_t::cmdShortTimeout_Timer0 |
T(cmd_short_to)=T(timer0)*cmdShortTimeout_Timer0.
uint8_t lcdic_config_t::cmdLongTimeout_Timer1 |
T(cmd_long_to)=T(timer1)*cmdLongTimeout_Timer1.
union lcdic_trx_cmd_t |
uint32_t lcdic_trx_cmd_t::dataLen |
uint32_t lcdic_trx_cmd_t::dummyCount |
uint32_t lcdic_trx_cmd_t::useAutoRepeat |
uint32_t lcdic_trx_cmd_t::teSyncMode |
uint32_t lcdic_trx_cmd_t::trxTimeoutMode |
uint32_t lcdic_trx_cmd_t::dataFormat |
uint32_t lcdic_trx_cmd_t::enableCmdDoneInt |
uint32_t lcdic_trx_cmd_t::cmdOrData |
uint32_t lcdic_trx_cmd_t::trx |
struct lcdic_repeat_tx_xfer_t |
Data Fields | |
uint8_t | cmd |
Command. More... | |
uint8_t | teSyncMode |
TE sync mode, see _lcdic_te_sync_mode. More... | |
uint8_t | trxTimeoutMode |
TRX command timeout mode, see _lcdic_trx_timeout_mode. More... | |
uint8_t | dataFormat |
Data format, see _lcdic_data_format. More... | |
uint32_t | dataLen |
Data length. More... | |
uint32_t | txRepeatData |
The repeat data. More... | |
uint8_t lcdic_repeat_tx_xfer_t::cmd |
uint8_t lcdic_repeat_tx_xfer_t::teSyncMode |
uint8_t lcdic_repeat_tx_xfer_t::trxTimeoutMode |
uint8_t lcdic_repeat_tx_xfer_t::dataFormat |
uint32_t lcdic_repeat_tx_xfer_t::dataLen |
uint32_t lcdic_repeat_tx_xfer_t::txRepeatData |
struct lcdic_tx_xfer_t |
Data Fields | |
uint8_t | cmd |
Command. More... | |
uint8_t | teSyncMode |
TE sync mode, see _lcdic_te_sync_mode. More... | |
uint8_t | trxTimeoutMode |
TRX command timeout mode, see _lcdic_trx_timeout_mode. More... | |
uint8_t | dataFormat |
Data format, see _lcdic_data_format. More... | |
uint32_t | dataLen |
Data length. More... | |
const uint8_t * | txData |
The data to send. More... | |
uint8_t lcdic_tx_xfer_t::cmd |
uint8_t lcdic_tx_xfer_t::teSyncMode |
uint8_t lcdic_tx_xfer_t::trxTimeoutMode |
uint8_t lcdic_tx_xfer_t::dataFormat |
uint32_t lcdic_tx_xfer_t::dataLen |
const uint8_t* lcdic_tx_xfer_t::txData |
struct lcdic_rx_xfer_t |
Data Fields | |
uint8_t | cmd |
Command. More... | |
uint8_t | dummyCount |
Dummy cycle between TX and RX, only used for SPI mode. More... | |
uint8_t | trxTimeoutMode |
TRX command timeout mode, see _lcdic_trx_timeout_mode. More... | |
uint8_t | dataFormat |
Data format, see _lcdic_data_format. More... | |
uint32_t | dataLen |
Data length. More... | |
uint8_t * | rxData |
Pointer to the data receive array. More... | |
uint8_t lcdic_rx_xfer_t::cmd |
uint8_t lcdic_rx_xfer_t::dummyCount |
uint8_t lcdic_rx_xfer_t::trxTimeoutMode |
uint8_t lcdic_rx_xfer_t::dataFormat |
uint32_t lcdic_rx_xfer_t::dataLen |
uint8_t* lcdic_rx_xfer_t::rxData |
struct lcdic_xfer_t |
Data Fields | |
lcdic_xfer_mode_t | mode |
Transfer mode. More... | |
uint8_t | cmdToSendOnly |
Command to send in mode kLCDIC_XferCmdOnly. More... | |
lcdic_repeat_tx_xfer_t | repeatTxXfer |
For mode kLCDIC_XferSendRepeatData. More... | |
lcdic_tx_xfer_t | txXfer |
For mode kLCDIC_XferSendDataArray. More... | |
lcdic_rx_xfer_t | rxXfer |
For mode kLCDIC_XferReceiveDataArray. More... | |
lcdic_xfer_mode_t lcdic_xfer_t::mode |
uint8_t lcdic_xfer_t::cmdToSendOnly |
lcdic_repeat_tx_xfer_t lcdic_xfer_t::repeatTxXfer |
lcdic_tx_xfer_t lcdic_xfer_t::txXfer |
lcdic_rx_xfer_t lcdic_xfer_t::rxXfer |
struct _lcdic_handle |
Data Fields | |
volatile bool | xferInProgress |
Transfer in progress. More... | |
lcdic_xfer_mode_t | xferMode |
On-going transfer mode. More... | |
lcdic_transfer_callback_t | callback |
Callback function. More... | |
void * | userData |
LCDIC callback function parameter. More... | |
uint32_t | xferSizeWordAligned |
4-byte aligned part of the transfer size. More... | |
uint8_t | xferSizeWordUnaligned |
4-byte unaligned part of the transfer size. More... | |
uint32_t | tmpData |
Temp data for driver internal use. More... | |
const uint8_t * | txData |
Data array to send. More... | |
uint8_t * | rxData |
RX data array. More... | |
volatile bool lcdic_handle_t::xferInProgress |
lcdic_xfer_mode_t lcdic_handle_t::xferMode |
lcdic_transfer_callback_t lcdic_handle_t::callback |
void* lcdic_handle_t::userData |
const uint8_t* lcdic_handle_t::txData |
uint8_t* lcdic_handle_t::rxData |
uint32_t lcdic_handle_t::xferSizeWordAligned |
uint8_t lcdic_handle_t::xferSizeWordUnaligned |
uint32_t lcdic_handle_t::tmpData |
#define LCDIC_RESET_STATE_DELAY 130u |
This should be larger than 5 * core clock / LCDIC function clock.
typedef void(* lcdic_transfer_callback_t)(LCDIC_Type *base, lcdic_handle_t *handle, status_t status, void *userData) |
The status is kStatus_Success when transfer finished successfully, it is kStatus_Timeout when timeout happened.
typedef void(* lcdic_transfer_irq_handler_t)(LCDIC_Type *base, void *handle) |
typedef void(* lcdic_reset_done_callback_t)(LCDIC_Type *base) |
enum lcdic_mode_t |
enum lcdic_endian_t |
enum lcdic_rx_threshold_t |
enum lcdic_tx_threshold_t |
TX threshold interrupt happens if the empty word number in TX FIFO is bigger than the threshold value.
anonymous enum |
anonymous enum |
enum _lcdic_interrupt |
anonymous enum |
anonymous enum |
anonymous enum |
enum lcdic_xfer_mode_t |
status_t LCDIC_Init | ( | LCDIC_Type * | base, |
const lcdic_config_t * | config | ||
) |
This function initializes the LCDIC to work, it configues the LCDIC according to the configue structure and enables the module. After calling this function, the peripheral is ready to work.
base | LCDIC peripheral base address. |
kStatus_Success | Initialize successfully. |
void LCDIC_Deinit | ( | LCDIC_Type * | base | ) |
This function disables the LCDIC, and disables peripheral clock if necessary.
base | LCDIC peripheral base address. |
void LCDIC_GetDefaultConfig | ( | lcdic_config_t * | config | ) |
The default configuration value is:
config | Pointer to the LCDIC configuration. |
void LCDIC_ResetState | ( | LCDIC_Type * | base | ) |
This function resets the LCDIC state. After calling this function, all data in TX_FIFO and RX_FIFO will be cleared and all transactions on LCD interface will restart despite of formal status.
The configurations will not be reset.
base | LCDIC peripheral base address. |
|
inlinestatic |
base | LCDIC peripheral base address. |
interrupts | The interrupts to enable, pass in as OR'ed value of _lcdic_interrupt. |
|
inlinestatic |
base | LCDIC peripheral base address. |
interrupts | The interrupts to disable, pass in as OR'ed value of _lcdic_interrupt. |
|
inlinestatic |
base | LCDIC peripheral base address. |
|
inlinestatic |
This function gets the raw interrupt pending flags, it is not affected by interrupt enabled status.
base | LCDIC peripheral base address. |
|
inlinestatic |
base | LCDIC peripheral base address. |
interrupts | The interrupt status to clear , pass in as OR'ed value of _lcdic_interrupt. |
|
inlinestatic |
base | LCDIC peripheral base address. |
|
inlinestatic |
base | LCDIC peripheral base address. |
|
inlinestatic |
base | LCDIC peripheral base address. |
threshold | TX threshold. |
|
inlinestatic |
base | LCDIC peripheral base address. |
threshold | RX threshold. |
status_t LCDIC_WriteTxFifoBlocking | ( | LCDIC_Type * | base, |
const uint32_t * | data, | ||
uint32_t | dataLen_Word | ||
) |
This function waits for empty slot in TX FIFO and fill the data to TX FIFO.
base | LCDIC peripheral base address. |
data | Data to send, the data length must be dividable by 4. |
dataLen_Word | Data length in word. |
kStatus_Success | Write successfully. |
kStatus_Timeout | Timeout happened. |
status_t LCDIC_ReadRxFifoBlocking | ( | LCDIC_Type * | base, |
uint32_t * | data, | ||
uint32_t | dataLen_Word | ||
) |
This function waits for valid data in RX FIFO and read them.
base | LCDIC peripheral base address. |
data | Array for received data, the data length must be dividable by 4. |
dataLen_Word | Data length in word. |
kStatus_Success | Read successfully. |
kStatus_Timeout | Timeout happened. |
|
inlinestatic |
The function sends reset to reset pin, to reset the external panel. The reset sequence parameters are configued by lcdic_config_t.
base | LCDIC peripheral base address. |
void LCDIC_SetResetSequenceDoneCallback | ( | lcdic_reset_done_callback_t | callback | ) |
callback | The callback to set. |
|
inlinestatic |
base | LCDIC peripheral base address. |
enable | Use true to enable, false to disable. |
status_t LCDIC_SendCommandBlocking | ( | LCDIC_Type * | base, |
uint8_t | cmd | ||
) |
This function sends out command and waits until send finished.
base | LCDIC peripheral base address. |
cmd | Command to send. |
kStatus_Success | Command sent successfully. |
status_t LCDIC_SendRepeatDataBlocking | ( | LCDIC_Type * | base, |
const lcdic_repeat_tx_xfer_t * | xfer | ||
) |
This function sends out command and the repeat data, then waits until send finished or timeout happened.
base | LCDIC peripheral base address. |
xfer | Pointer to the transfer configuration. |
kStatus_Success | Sent successfully. |
kStatus_Timeout | Timeout happened. |
kStatus_InvalidArgument | Invalid argument. |
status_t LCDIC_SendDataArrayBlocking | ( | LCDIC_Type * | base, |
const lcdic_tx_xfer_t * | xfer | ||
) |
This function sends out command and the data array, then waits until send finished or timeout happened.
base | LCDIC peripheral base address. |
xfer | Pointer to the transfer configuration. |
kStatus_Success | Sent successfully. |
kStatus_Timeout | Timeout happened. |
kStatus_InvalidArgument | Invalid argument. |
status_t LCDIC_ReadDataArrayBlocking | ( | LCDIC_Type * | base, |
const lcdic_rx_xfer_t * | xfer | ||
) |
This function sends out command and read the data array, then waits until send finished or timeout happened.
base | LCDIC peripheral base address. |
xfer | Pointer to the transfer configuration. |
kStatus_Success | Sent successfully. |
kStatus_Timeout | Timeout happened. |
kStatus_InvalidArgument | Invalid argument. |
status_t LCDC_TransferBlocking | ( | LCDIC_Type * | base, |
const lcdic_xfer_t * | xfer | ||
) |
This function sends command only, or sends repeat data, or sends data array, or reads data array based on the transfer structure. It uses blocking way, only returns when transfer successed or failed.
base | LCDIC peripheral base address. |
xfer | Pointer to the transfer configuration. |
kStatus_Success | Sent successfully. |
kStatus_Timeout | Timeout happened. |
kStatus_InvalidArgument | Invalid argument. |
status_t LCDIC_TransferCreateHandle | ( | LCDIC_Type * | base, |
lcdic_handle_t * | handle, | ||
lcdic_transfer_callback_t | callback, | ||
void * | userData | ||
) |
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
callback | The callback function. |
userData | The parameter of the callback function. |
kStatus_Success | Successfully created the handle. |
status_t LCDIC_TransferNonBlocking | ( | LCDIC_Type * | base, |
lcdic_handle_t * | handle, | ||
lcdic_xfer_t * | xfer | ||
) |
This function transfer data using IRQ. This is a non-blocking function, which returns right away. When all data is sent out/received, or timeout happened, the callback function is called.
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
xfer | LCDIC transfer structure. |
kStatus_Success | Successfully start a transfer. |
kStatus_InvalidArgument | Input argument is invalid. |
kStatus_Busy | LCDIC driver is busy with another transfer. |
status_t LCDIC_SendCommandNonBlocking | ( | LCDIC_Type * | base, |
lcdic_handle_t * | handle, | ||
uint8_t | cmd | ||
) |
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
cmd | Command to send. |
kStatus_Success | Command sent successfully. |
kStatus_Busy | LCDIC driver is busy with another transfer. |
status_t LCDIC_SendRepeatDataNonBlocking | ( | LCDIC_Type * | base, |
lcdic_handle_t * | handle, | ||
const lcdic_repeat_tx_xfer_t * | xfer | ||
) |
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
xfer | LCDIC transfer structure. |
kStatus_Success | Successfully start a transfer. |
kStatus_InvalidArgument | Input argument is invalid. |
kStatus_Busy | LCDIC driver is busy with another transfer. |
status_t LCDIC_SendDataArrayNonBlocking | ( | LCDIC_Type * | base, |
lcdic_handle_t * | handle, | ||
const lcdic_tx_xfer_t * | xfer | ||
) |
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
xfer | LCDIC transfer structure. |
kStatus_Success | Successfully start a transfer. |
kStatus_InvalidArgument | Input argument is invalid. |
kStatus_Busy | LCDIC driver is busy with another transfer. |
status_t LCDIC_ReadDataArrayNonBlocking | ( | LCDIC_Type * | base, |
lcdic_handle_t * | handle, | ||
const lcdic_rx_xfer_t * | xfer | ||
) |
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
xfer | LCDIC transfer structure. |
kStatus_Success | Successfully start a transfer. |
kStatus_InvalidArgument | Input argument is invalid. |
kStatus_Busy | LCDIC driver is busy with another transfer. |
void LCDIC_TransferHandleIRQ | ( | LCDIC_Type * | base, |
void * | handle | ||
) |
IRQ handler to work with LCDIC_TransferNonBlocking.
base | LCDIC peripheral base address. |
handle | Pointer to the lcdic_handle_t structure to store the transfer state. |
void LCDIC_TransferInstallIRQHandler | ( | uint32_t | instance, |
void * | handle, | ||
lcdic_transfer_irq_handler_t | handler | ||
) |
Install IRQ handler for specific instance.
instance | LCDIC instance. |
handle | Driver handle, it will be used as IRQ handler parameter. |
handler | IRQ handler to instance. |
uint32_t LCDIC_GetInstance | ( | LCDIC_Type * | base | ) |
base | LCDIC peripheral base address |
IRQn_Type LCDIC_GetIRQn | ( | uint32_t | instance | ) |
instance | LCDIC instance. |
uint32_t LCDIC_FillByteToWord | ( | const uint8_t * | bytes, |
uint8_t | len | ||
) |
LCDIC data registers only accept 4-byte data, but the user passed data might be not 4-byte size aligned. This function is used to construct the unaligned part to a word, to write to LCDIC register.
bytes | The byte array. |
len | Length of the byte array. |
void LCDIC_ExtractByteFromWord | ( | uint32_t | word, |
uint8_t * | bytes, | ||
uint8_t | len | ||
) |
LCDIC data registers only accept 4-byte data, but the user passed data might be not 4-byte size aligned. This function is used to get desired bytes from the word read from LCDIC register, and save to the user data array.
word | Word data read from LCDIC register. |
bytes | The byte array. |
len | Length of the byte array. |
status_t LCDIC_PrepareSendCommand | ( | LCDIC_Type * | base, |
uint8_t | cmd | ||
) |
Fill the TRX command and command to TX FIFO, after calling this function, user should wait for transfer done by checking status or IRQ.
base | LCDIC peripheral base address. |
cmd | Command to send. |
kStatus_Success | Operation successed. |
status_t LCDIC_PrepareSendRepeatData | ( | LCDIC_Type * | base, |
const lcdic_repeat_tx_xfer_t * | xfer | ||
) |
Fill the required data to TX FIFO, after calling this function, user should wait for transfer done by checking status or IRQ.
base | LCDIC peripheral base address. |
xfer | Transfer structure. |
kStatus_Success | Operation successed. |
kStatus_InvalidArgument | Invalid argument. |
status_t LCDIC_PrepareSendDataArray | ( | LCDIC_Type * | base, |
const lcdic_tx_xfer_t * | xfer, | ||
uint32_t * | xferSizeWordAligned, | ||
uint8_t * | xferSizeWordUnaligned, | ||
uint32_t * | wordUnalignedData | ||
) |
Fill the required command data to TX FIFO, after calling this function, user should fill the xfer->txData to TX FIFO based on FIFO status.
base | LCDIC peripheral base address. |
xfer | Transfer structure. |
xferSizeWordAligned | The word size aligned part of the transfer data. |
xferSizeWordUnaligned | The word size unaligned part of the transfer data. |
wordUnalignedData | Word to save the word size unaligned data, it should be sent after all word size aligned data write finished. |
kStatus_Success | Operation successed. |
kStatus_InvalidArgument | Invalid argument. |
status_t LCDIC_PrepareReadDataArray | ( | LCDIC_Type * | base, |
const lcdic_rx_xfer_t * | xfer, | ||
uint32_t * | xferSizeWordAligned, | ||
uint8_t * | xferSizeWordUnaligned | ||
) |
Fill the required command data to TX FIFO, after calling this function, user should read RX FIFO to xfer->rxData based on FIFO status.
base | LCDIC peripheral base address. |
xfer | Transfer structure. |
xferSizeWordAligned | The word size aligned part of the transfer data. |
xferSizeWordUnaligned | The word size unaligned part of the transfer data. |
kStatus_Success | Operation successed. |
kStatus_InvalidArgument | Invalid argument. |