本文整理汇总了C++中DMA_GetITStatus函数的典型用法代码示例。如果您正苦于以下问题:C++ DMA_GetITStatus函数的具体用法?C++ DMA_GetITStatus怎么用?C++ DMA_GetITStatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DMA_GetITStatus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DMA1_Channel3_IRQHandler
void DMA1_Channel3_IRQHandler(void)
{
if(DMA_GetITStatus(DMA1_IT_TC3) != RESET)
{
DMA_ClearFlag(DMA1_IT_TC3);
/* 处理激光模块回传的数据 */
switch(laser.cmd_id)
{
case SINGLE_MEASURE:
after_single_measure();
break;
case CIRCULAR_MEASURE:
break;
case SET_RANGE:
after_set_range();
break;
case SET_FREQ:
after_set_freq();
break;
case SET_RESOLUTION:
after_set_resolution();
break;
default:
break;
}
laser_irq_flag = 1;
}
}
示例2: DMA2_Stream0_IRQHandler
void DMA2_Stream0_IRQHandler(void){
if (DMA_GetITStatus(DMA2_Stream0, DMA_IT_TCIF0))
{
DMA_ClearITPendingBit(DMA2_Stream0, DMA_IT_TCIF0);
transfers++;
if(transfers >= 100){
GPIO_ToggleBits(GPIOD, GPIO_Pin_12);
transfers = 0;
}
}
if (DMA_GetITStatus(DMA2_Stream0, DMA_IT_HTIF0))
{
DMA_ClearITPendingBit(DMA2_Stream0, DMA_IT_HTIF0);
}
}
示例3: DMA1_Channel6_IRQHandler
//USART2接收DMA中断处理函数
void DMA1_Channel6_IRQHandler(void)
{
OSIntEnter();
if(DMA_GetITStatus(DMA1_IT_TC6)!=RESET) //如果该DMA通道发生中断请求
{
OS_ERR err;
DMA_Cmd(DMA1_Channel6,DISABLE); //关闭DMA1_Channel6
DMA_ClearITPendingBit(DMA1_IT_TC6); //清除DMA的中断标志
if(U2R_BufferNum==1)
{
DMA1_Channel6->CMAR=(u32)USART2_Rx_Buffer2; //将缓冲区的地址改为2号
U2R_BufferNum=2;
U2R_Buf1_Ok=true; //将1号缓存区标志位置为1,表示已满可读
}
else
{
DMA1_Channel6->CMAR=(u32)USART2_Rx_Buffer1; //将缓冲区的地址改为1号
U2R_BufferNum=1;
U2R_Buf2_Ok=true; //将2号缓存区标志位置为1,表示已满可读
}
OSTaskSemPost(&ZPH01_Task_TCB,OS_OPT_POST_NONE,&err);//释放任务信号量
USART_ITConfig(USART2,USART_IT_RXNE,ENABLE); //使能串口2的接收中断
}
OSIntExit();
}
示例4: DMA1_Channel2_IRQHandler
void
DMA1_Channel2_IRQHandler()
{
if (DMA_GetITStatus(DMA1_IT_TC2) == SET) {
if (USART_GetFlagStatus(USART3, USART_FLAG_TXE) == SET) {
if (usart_tx_dmafifo_out_idx == usart_tx_dmafifo_in_idx) {
dma_running = 0; // no more to send, shut down
DMA_ITConfig(USART3_TX_DMA_CHANNEL, DMA_IT_TC, DISABLE);
DMA_Cmd(USART3_TX_DMA_CHANNEL, DISABLE);
} else {
if (USART_GetFlagStatus(USART3, USART_FLAG_TXE) == RESET) {
debug_printf("DMACH2\r\n");
for (;;)
asm("nop"); // why am i here?
}
kick_dma_usart_tx(4);
}
} else {
USART_ITConfig(USART3, USART_IT_TXE, ENABLE);
dma_running = 3; // indicate DMA TC occurred (but not yet USART TC)
}
DMA_ClearITPendingBit(DMA1_IT_GL2);
//redundant DMA_ClearFlag(DMA1_FLAG_TC2);
DMA_ClearFlag(USART3_TX_DMA_FLAG_GL); // in example
} // ...if (DMA_GetITStatus(DMA1_IT_TC2) == SET)
else {
asm("nop"); // why am i here?
}
}
示例5: Ethernet_IRQHandler
/**
* @brief This function handles DMA2 Stream1 Interrupt
* @param None
* @retval None
*/
void Ethernet_IRQHandler(void)
{
/* This DMA is used for transferring the DCMI Data */
if(DMA_GetITStatus(DMA2_Stream1, DMA_IT_TCIF1) != RESET)
{
/* Mark buffer as filled */
IPCAM_ImageBuffer.BufferStatus = BUFFER_FILLED;
/* Clear interrupt pending bit */
DMA_ClearITPendingBit(DMA2_Stream1, DMA_IT_TCIF1);
}
/* Half Transfer complete interrupt */
else if (DMA_GetFlagStatus(DMA2_Stream1, DMA_FLAG_HTIF1) != RESET)
{
/* Clear the Interrupt flag */
DMA_ClearFlag(DMA2_Stream1, DMA_FLAG_HTIF1);
}
/* FIFO Error interrupt */
else if (DMA_GetFlagStatus(DMA2_Stream1, DMA_FLAG_FEIF1) != RESET)
{
/* Clear the Interrupt flag */
DMA_ClearFlag(DMA2_Stream1, DMA_FLAG_FEIF1);
}
/* Tranfer error interrupt */
else if (DMA_GetFlagStatus(DMA2_Stream1, DMA_FLAG_TEIF1) != RESET)
{
DCMI_ClearFlag(DCMI_FLAG_OVFRI);
/* Clear interrupt pending bit */
DMA_ClearITPendingBit(DMA2_Stream1, DMA_IT_TEIF1);
/* Mark buffer as empty */
IPCAM_ImageBuffer.BufferStatus = BUFFER_EMPTY;
}
}
示例6: IRQDmaTxHandler
void CmdUnit_t::IRQDmaTxHandler() {
if(DMA_GetITStatus(DMA1_IT_TC2)) {
DMA_ClearITPendingBit(DMA1_IT_GL2); // Clear CH2 IRQ global bit
// Switch to next buffer if needed
if(TxIndx != 0) IStartTx();
else IDmaIsIdle = true;
}
}
示例7: DMA1_Channel1_IRQHandler
void DMA1_Channel1_IRQHandler(void)
{
if(DMA_GetITStatus(DMA1_IT_TC1))
{
DMA_ClearITPendingBit(DMA1_IT_GL1);
isr_evt_set(EVT_ADC_DONE, tid_conflict_monitor);
}
}
示例8: DMA1_Channel6_IRQHandler
void DMA1_Channel6_IRQHandler(void)
{
if(DMA_GetITStatus(DMA1_IT_TC6))
{
freeCir[2]+=DMA_BUFSIZE;
DMA_ClearITPendingBit(DMA1_IT_TC6);
}
}
示例9: madArchMem_IRQ_Handler
static void madArchMem_IRQ_Handler(void)
{
if(SET == DMA_GetITStatus(ARCHM_DMA_TX_ITTC)) {
DMA_Cmd(ARCHM_DMA_TX, DISABLE);
madSemRelease(&mad_archm_waiter);
DMA_ClearITPendingBit(ARCHM_DMA_TX_ITTC);
}
}
示例10: DMA1_Channel1_IRQHandler
void DMA1_Channel1_IRQHandler(void)
{
if(DMA_GetITStatus(DMA1_IT_TC1))
{
defaultADCManager->isTransferDone=1;
DMA_ClearITPendingBit(DMA1_IT_TC1);
}
}
示例11: DMA1_Channel2_IRQHandler
void DMA1_Channel2_IRQHandler(void) //spi 发送dma 中断
{
if(DMA_GetITStatus(DMA1_IT_TC2)==SET)
{
DMA_ClearITPendingBit(DMA1_IT_TC2);
}
}
示例12: DMA1_Channel1_IRQHandler
/********************************************************************************************************
**函数信息 :DMA1_Channel1_IRQHandler()
**功能描述 : DMA1通道1的中断函数
**输入参数 :无
**输出参数 :无
********************************************************************************************************/
void DMA1_Channel1_IRQHandler()
{
if(DMA_GetITStatus(DMA1_IT_TC1))
{
DMA_ClearITPendingBit(DMA1_IT_TC1);
dma1Flag = 0x1;
}
}
示例13: DMA1_Channel4_IRQHandler
void DMA1_Channel4_IRQHandler(void)
{
if(DMA_GetITStatus(DMA1_IT_TC4) == SET){
DMA_ClearITPendingBit(DMA1_IT_TC4);
DMA_Cmd(DMA1_Channel4, DISABLE);
USART_DMACmd(USART1, USART_DMAReq_Tx, DISABLE);
usart1_process.txBusy = 0;
// Tx data success
}
if(DMA_GetITStatus(DMA1_IT_TE4) == SET){
DMA_ClearITPendingBit(DMA1_IT_TE4);
DMA_Cmd(DMA1_Channel4, DISABLE);
USART_DMACmd(USART1, USART_DMAReq_Tx, DISABLE);
usart1_process.txBusy = 0;
// Tx data fail
}
}
示例14: DMA1_Stream4_IRQHandler
//DMA1_Stream4中断服务函数
void DMA1_Stream4_IRQHandler(void)
{
if(DMA_GetITStatus(DMA1_Stream4,DMA_IT_TCIF4)==SET)////DMA1_Stream4,传输完成标志
{
DMA_ClearITPendingBit(DMA1_Stream4,DMA_IT_TCIF4);
i2s_tx_callback(); //执行回调函数,读取数据等操作在这里面处理
}
}
示例15: DMA2_Stream6_IRQHandler
/*USART RX - Stream*/
void DMA2_Stream6_IRQHandler(void){
if (DMA_GetITStatus(DMA2_Stream6, DMA_IT_TCIF6) == SET)
{
DMA_ClearITPendingBit(DMA2_Stream6, DMA_IT_TCIF6);
//DMA_Cmd(DMA2_Stream6,DISABLE);
}
}