IF8080 Exported Functions
- group IF8080_Exported_Functions
Functions
-
void IF8080_DeInit(void)
Deinitialize the IF8080 peripheral registers to their default values.
Example usage
void driver_if8080_init(void) { IF8080_DeInit(); }
- Returns:
None.
-
void IF8080_PinGroupConfig(uint32_t IF8080_PinGroupType)
Select the IF8080 output pin group.
Example usage
void driver_if8080_init(void) { IF8080_PinGroupConfig(IF8080_PinGroup_1); }
- Parameters:
IF8080_PinGroupType – [in] This parameter can be one of the following values, which refers to IF8080 Pin Group.
IF8080_PinGroup_DISABLE : Disable IF8080 interface.
IF8080_PinGroup_1 : CS(P3_3), RD(P3_2), DCX(P3_4), WR(P3_5), D0(P0_2), D1(P0_4), D2(P1_3), D3(P1_4), D4(P4_0), D5(P4_1), D6(P4_2), D7(P4_3)
IF8080_PinGroup_2 : CS(P3_3), DCX(P3_4), WR(P3_2), RD(P2_0) D0(P3_5), D1(P0_1), D2(P0_2), D3(P0_4), D4(P4_0), D5(P4_1), D6(P4_2), D7(P4_3)
- Returns:
None.
-
void IF8080_Init(IF8080_InitTypeDef *IF8080_InitStruct)
Initialize the IF8080 peripheral according to the specified parameters in the IF8080_InitStruct.
Example usage
void driver_if8080_init(void) { //close clock IF8080_DeInit(); RCC_PeriphClockCmd(APBPeriph_IF8080, APBPeriph_IF8080_CLOCK, ENABLE); IF8080_PinGroupConfig(IF8080_PinGroup_1); IF8080_InitTypeDef IF8080_InitStruct; IF8080_StructInit(&IF8080_InitStruct); IF8080_InitStruct.IF8080_ClockDiv = IF8080_CLOCK_DIV_5; IF8080_InitStruct.IF8080_Mode = IF8080_MODE_MANUAL; IF8080_InitStruct.IF8080_AutoModeDirection = IF8080_Auto_Mode_Direction_WRITE; IF8080_InitStruct.IF8080_GuardTimeCmd = IF8080_GUARD_TIME_DISABLE; IF8080_InitStruct.IF8080_GuardTime = IF8080_GUARD_TIME_2T; IF8080_InitStruct.IF8080_8BitSwap = IF8080_8BitSwap_DISABLE; IF8080_InitStruct.IF8080_16BitSwap = IF8080_16BitSwap_DISABLE; IF8080_InitStruct.IF8080_TxThr = 10; IF8080_InitStruct.IF8080_TxDMACmd = IF8080_TX_DMA_DISABLE; IF8080_InitStruct.IF8080_VsyncCmd = IF8080_VSYNC_DISABLE; IF8080_InitStruct.IF8080_VsyncPolarity = IF8080_VSYNC_POLARITY_FALLING; IF8080_Init(&IF8080_InitStruct); }
- Parameters:
IF8080_InitStruct – [in] Pointer to an IF8080_InitTypeDef structure that contains the configuration information for the specified IF8080 peripheral.
- Returns:
None.
-
void IF8080_StructInit(IF8080_InitTypeDef *IF8080_InitStruct)
Fill each IF8080_InitStruct member with its default value.
Example usage
void driver_if8080_init(void) { IF8080_DeInit(); RCC_PeriphClockCmd(APBPeriph_IF8080, APBPeriph_IF8080_CLOCK, ENABLE); IF8080_PinGroupConfig(IF8080_PinGroup_1); IF8080_InitTypeDef IF8080_InitStruct; IF8080_StructInit(&IF8080_InitStruct); IF8080_InitStruct.IF8080_ClockDiv = IF8080_CLOCK_DIV_5; IF8080_InitStruct.IF8080_Mode = IF8080_MODE_MANUAL; IF8080_InitStruct.IF8080_AutoModeDirection = IF8080_Auto_Mode_Direction_WRITE; IF8080_InitStruct.IF8080_GuardTimeCmd = IF8080_GUARD_TIME_DISABLE; IF8080_InitStruct.IF8080_GuardTime = IF8080_GUARD_TIME_2T; IF8080_InitStruct.IF8080_8BitSwap = IF8080_8BitSwap_DISABLE; IF8080_InitStruct.IF8080_16BitSwap = IF8080_16BitSwap_DISABLE; IF8080_InitStruct.IF8080_TxThr = 10; IF8080_InitStruct.IF8080_TxDMACmd = IF8080_TX_DMA_DISABLE; IF8080_InitStruct.IF8080_VsyncCmd = IF8080_VSYNC_DISABLE; IF8080_InitStruct.IF8080_VsyncPolarity = IF8080_VSYNC_POLARITY_FALLING; IF8080_Init(&IF8080_InitStruct); }
- Parameters:
IF8080_InitStruct – [in] Pointer to an IF8080_InitTypeDef structure which will be initialized.
- Returns:
None.
-
void IF8080_AutoModeCmd(uint32_t IF8080_Direction, FunctionalState NewState)
Enable or disable the selected IF8080 operation in auto mode.
Example usage
void if8080_demo(void) { IF8080_AutoModeCmd(IF8080_Auto_Mode_Direction_WRITE, ENABLE); }
- Parameters:
IF8080_Direction – [in] The IF8080 read or write operation. This parameter can be one of the following values, which refer to IF8080 Auto Mode direction.
IF8080_Auto_Mode_Direction_READ: Write operation.
IF8080_Auto_Mode_Direction_WRITE: Read operation.
NewState – [in] New state of the operation mode. This parameter can be: ENABLE or DISABLE.
- Returns:
None.
-
void IF8080_SendCommand(uint8_t cmd)
Send command in manual mode.
Example usage
void if8080_demo(void) { uint8_t cmd = 0x01; // Command which is to be sent. IF8080_SendCommand(cmd); }
- Parameters:
cmd – [in] Command which is to be sent.
- Returns:
None.
-
void IF8080_SendData(uint8_t *pBuf, uint32_t len)
Send data in manual mode.
Example usage
void if8080_demo(void) { uint8_t data[10] = {0}; // Data to be sent. IF8080_SendCommand(data, 10); }
- Parameters:
pBuf – [in] Buffer address to be sent.
len – [in] Data length.
- Returns:
None.
-
void IF8080_ReceiveData(uint8_t *pBuf, uint32_t len)
Receive data in manual mode.
Example usage
void if8080_demo(void) { uint8_t data[10] = {0}; // Data buffer. IF8080_ReceiveData(data, 10); }
- Parameters:
pBuf – [out] Buffer address to be received.
len – [in] Data length.
- Returns:
None.
-
void IF8080_Write(uint8_t cmd, uint8_t *pBuf, uint32_t len)
Send command and data buffer in manual mode.
Example usage
void if8080_demo(void) { uint8_t cmd = 0x01; // Command which is to be sent. uint8_t data[10] = {0}; // Data to be sent. IF8080_Write(cmd, data, 10); }
- Parameters:
cmd – [in] Command which is to be sent.
pBuf – [in] Buffer address to be sent.
len – [in] Data length.
- Returns:
None.
-
void IF8080_Read(uint8_t cmd, uint8_t *pBuf, uint32_t len)
Send command and read data buffer in manual mode.
Example usage
void if8080_demo(void) { uint8_t cmd = 0x01; // Command which is to be sent. uint8_t data[10] = {0}; // Data buffer. IF8080_Read(cmd, data, 10); }
- Parameters:
cmd – [in] Command which is to be sent.
pBuf – [out] Buffer address to be received.
len – [in] Data length.
- Returns:
None.
-
FlagStatus IF8080_SetCmdSequence(uint8_t *pCmdBuf, uint8_t len)
Configure command sequences in auto mode.
Example usage
void if8080_demo(void) { uint8_t cmd[10] = {0}; // Command buffer. IF8080_SetCmdSequence(cmd, 10); }
- Parameters:
pCmdBuf – [in] Buffer address which stores command sequence.
len – [in] Command length.
- Returns:
None.
-
void IF8080_MaskINTConfig(uint32_t IF8080_INT_MSK, FunctionalState NewState)
Mask or unmask the specified IF8080 interrupts.
Example usage
void if8080_demo(void) { IF8080_MaskINTConfig(IF8080_INT_TF_EMPTY_MSK, ENABLE); }
- Parameters:
IF8080_INT_MSK – [in] Specify the IF8080 interrupt sources to be masked or unmasked. This parameter can be the following values, which refer to IF8080 Interrupts Mask Definition.
IF8080_INT_TF_EMPTY_MSK: Mask TX FIFO empty interrupt.
IF8080_INT_TF_OF_MSK: Mask TX FIFO overflow interrupt.
IF8080_INT_TF_LEVEL_MSK: Mask TX FIFO threshold interrupt.
NewState – [in] New state of the specified IF8080 interrupts. This parameter can be: ENABLE or DISABLE.
- Returns:
None.
-
ITStatus IF8080_GetINTStatus(uint32_t IF8080_INT)
Get the specified IF8080 interrupt status.
Example usage
void if8080_demo(void) { ITStatus int_status = IF8080_GetINTStatus(IF8080_INT_SR_TF_EMPTY); }
- Parameters:
IF8080_INT – [in] The specified IF8080 interrupts. This parameter can be one of the following values, which refer to IF8080 Interrupts Definition.
IF8080_INT_SR_VSYNC: Vsync trigger interrupt.
IF8080_INT_SR_RX_AUTO_DONE: Rx auto done interrupt.
IF8080_INT_SR_RF_OF: RX FIFO overflow interrupt.
IF8080_INT_SR_TX_AUTO_DONE: Tx auto done interrupt.
IF8080_INT_SR_TF_EMPTY: TX FIFO empty interrupt.
IF8080_INT_SR_TF_OF: TX FIFO overflow interrupt.
IF8080_INT_SR_TF_LEVEL: TX FIFO threshold interrupt.
- Returns:
The new state of IF8080_INT (SET or RESET).
-
FlagStatus IF8080_GetFlagStatus(uint32_t IF8080_FLAG)
Get the specified IF8080 flag status.
Example usage
void if8080_demo(void) { FlagStatus flag_status = IF8080_GetFlagStatus(IF8080_FLAG_TF_EMPTY); }
- Parameters:
IF8080_INT – [in] the specified IF8080 flag. This parameter can be one of the following values, which refer to IF8080 Flag Definition.
IF8080_FLAG_RF_EMPTY: Rx FIFO empty flag.
IF8080_FLAG_RF_FULL: Rx FIFO full flag.
IF8080_FLAG_TF_EMPTY: Tx FIFO empty flag.
IF8080_FLAG_TF_FULL: Tx FIFO full flag.
- Returns:
The new state of IF8080_FLAG (SET or RESET).
-
void IF8080_GDMALLIConfig(IF8080_GDMALLITypeDef *IF8080_LLPGroup1, IF8080_GDMALLITypeDef *IF8080_LLPGroup2, IF8080_GDMALLIOFTTypeDef *IF8080_LLPGroup1Offset, IF8080_GDMALLIOFTTypeDef *IF8080_LLPGroup2Offset, uint16_t LLI_loop_num, uint32_t last_LLI_addr)
Configure IF8080 multi-block LLI parameters.
Example usage
- Parameters:
IF8080_LLIGroup1 – [in] Pointer to an IF8080_GDMALLITypeDef structure that contains the group 1 configuration information for the IF8080 GDMA peripheral.
IF8080_LLIGroup2 – [in] Pointer to an IF8080_GDMALLITypeDef structure that contains the group 2 configuration information for the IF8080 GDMA peripheral.
IF8080_LLP_Group1Offset – [in] Pointer to an IF8080_GDMALLIOFTTypeDef structure that contains the group 1 offset configuration information for the GDMA transmission.
IF8080_LLP_Group2Offset – [in] Pointer to an IF8080_GDMALLIOFTTypeDef structure that contains the group 2 offset configuration information for the GDMA transmission.
LLI_loop_num – [in] Number of LLI.
last_LLI_addr – [in] Address of last LLI.
- Returns:
None.
-
void IF8080_SwitchMode(uint32_t mode)
Dynamic switch IF8080 operation mode.
Example usage
void driver_if8080_init(void) { IF8080_SwitchMode(IF8080_MODE_MANUAL); }
- Parameters:
mode – [in] Selected IF8080 operation mode. This parameter can be the following values, which refer to IF8080 Mode.
IF8080_MODE_AUTO: Automation mode.
IF8080_MODE_MANUAL: Manual mode.
- Returns:
None.
-
void IF8080_GDMACmd(FunctionalState NewState)
Enable or disable GDMA for IF8080 transmission.
Example usage
void if8080_demo(void) { IF8080_GDMACmd(ENABLE); }
- Parameters:
NewState – [in] New state of GDMA. This parameter can be: ENABLE or DISABLE.
- Returns:
None.
-
void IF8080_SetCS(void)
Set CS signal in manual mode.
Example usage
void if8080_demo(void) { IF8080_SetCS(); }
- Returns:
None.
-
void IF8080_ResetCS(void)
Reset CS signal in manual mode.
Example usage
void if8080_demo(void) { IF8080_ResetCS(); }
- Returns:
None.
-
void IF8080_ClearINTPendingBit(uint32_t IF8080_CLEAR_INT)
Clear the IF8080 interrupt pending bits.
Example usage
void if8080_demo(void) { IF8080_ClearINTPendingBit(IF8080_INT_RX_AUTO_DONE_CLR); }
- Parameters:
IF8080_INT – [in] Specify the interrupt pending bit to clear. This parameter can be any combination of the following values, which refer to IF8080 Interrupts Clear Status.
IF8080_INT_RX_AUTO_DONE_CLR: Clear RX auto done interrupt.
IF8080_INT_RF_OF_CLR: Clear RX FIFO overflow interrupt.
IF8080_INT_TX_AUTO_DONE_CLR: Clear TX auto done interrupt.
IF8080_INT_TF_EMPTY_CLR: Clear TX FIFO empty interrupt.
IF8080_INT_TF_OF_CLR: Clear TX FIFO overflow interrupt.
IF8080_INT_TF_LEVEL_CLR: Clear TX FIFO threshold interrupt.
- Returns:
None.
-
uint32_t IF8080_SetTxDataLen(uint32_t len)
Set IF8080 output data length whose unit is byte.
Example usage
void if8080_demo(void) { uint32_t data_len = IF8080_SetTxDataLen(10); }
- Parameters:
len – [in] : Length of read data which can be 0 to 0x1FFFF.
- Returns:
Value set in.
-
uint32_t IF8080_GetTxDataLen(void)
Get IF8080 output data length whose unit is byte.
Example usage
void if8080_demo(void) { uint32_t data_len = IF8080_GetTxDataLen(); }
- Returns:
Length of read data which can be 0 to 0xFFFFFFFF.
-
uint32_t IF8080_GetTxCounter(void)
Get IF8080 output data counter whose unit is byte.
Example usage
void if8080_demo(void) { uint32_t tx_counter = IF8080_GetTxCounter(); }
- Returns:
Length of counter which can be 0 to 0xFFFFFFFF.
-
uint32_t IF8080_SetRxDataLen(uint32_t len)
Set IF8080 input data length whose unit is byte.
Example usage
void if8080_demo(void) { uint32_t data_len = IF8080_SetRxDataLen(10); }
- Parameters:
len – [in] Length of read data which can be 0 to 0x1FFFF.
- Returns:
Value set in.
-
uint32_t IF8080_GetRxDataLen(void)
Get IF8080 input data length whose unit is byte.
Example usage
void if8080_demo(void) { uint32_t data_len = IF8080_GetRxDataLen(); }
- Returns:
Length of read data which can be 0 to 0xFFFFFFFF.
-
void IF8080_ClearTxCounter(void)
Clear IF8080 output data counter value.
Example usage
void if8080_demo(void) { IF8080_ClearTxCounter(); }
- Returns:
None.
-
void IF8080_ClearRxCounter(void)
Clear IF8080 input data counter value.
Example usage
void if8080_demo(void) { IF8080_ClearRxCounter(); }
- Returns:
None.
-
void IF8080_WriteFIFO(uint32_t data)
Write IF8080 FIFO in auto mode.
Example usage
void if8080_demo(void) { uint32_t data = 0x01020304; IF8080_WriteFIFO(data); }
- Parameters:
data – [in] Data to be written in FIFO.
- Returns:
None.
-
uint32_t IF8080_ReadFIFO(void)
Read IF8080 FIFO in auto mode.
Example usage
void if8080_demo(void) { uint32_t data = IF8080_ReadFIFO(); }
- Returns:
FIFO data.
-
void IF8080_ClearFIFO(void)
Clear IF8080 FIFO.
Example usage
void if8080_demo(void) { IF8080_ClearFIFO(); }
- Returns:
None.
-
void IF8080_VsyncCmd(FunctionalState NewState)
Enable or disable Vsync start function.
Example usage
void if8080_demo(void) { IF8080_VsyncCmd(ENABLE); }
- Parameters:
NewState – [in] new state of the Vsync function. This parameter can be: ENABLE or DISABLE.
- Returns:
None.
-
void IF8080_GDMAVsyncEnable(FunctionalState NewState)
Enable or disable GDMA for LCD transmission.
- Parameters:
NewState – [in] new state of GDMA. This parameter can be: ENABLE or DISABLE.
- Returns:
None
-
void IF8080_DeInit(void)