Skip to content

Commit a85193f

Browse files
committed
[FIX] fix build problem in drv_crypto.c
1 parent e2d951a commit a85193f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bsp/stm32/libraries/HAL_Drivers/drv_crypto.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* 2020-10-14 Dozingfiretruck Porting for stm32wbxx
1010
* 2020-11-26 thread-liu add hash
1111
* 2020-11-26 thread-liu add cryp
12+
* 2020-12-11 WKJay fix build problem
1213
*/
1314

1415
#include <rtthread.h>
@@ -628,6 +629,7 @@ static void _crypto_reset(struct rt_hwcrypto_ctx *ctx)
628629
}
629630
}
630631

632+
#if defined(HASH2_IN_DMA_INSTANCE)
631633
void HASH2_DMA_IN_IRQHandler(void)
632634
{
633635
extern DMA_HandleTypeDef hdma_hash_in;
@@ -640,7 +642,9 @@ void HASH2_DMA_IN_IRQHandler(void)
640642
/* leave interrupt */
641643
rt_interrupt_leave();
642644
}
645+
#endif
643646

647+
#if defined(CRYP2_IN_DMA_INSTANCE)
644648
void CRYP2_DMA_IN_IRQHandler(void)
645649
{
646650
extern DMA_HandleTypeDef hdma_cryp_in;
@@ -653,7 +657,9 @@ void CRYP2_DMA_IN_IRQHandler(void)
653657
/* leave interrupt */
654658
rt_interrupt_leave();
655659
}
660+
#endif
656661

662+
#if defined (CRYP2_OUT_DMA_INSTANCE)
657663
void CRYP2_DMA_OUT_IRQHandler(void)
658664
{
659665
extern DMA_HandleTypeDef hdma_cryp_out;
@@ -666,6 +672,7 @@ void CRYP2_DMA_OUT_IRQHandler(void)
666672
/* leave interrupt */
667673
rt_interrupt_leave();
668674
}
675+
#endif
669676

670677
static const struct rt_hwcrypto_ops _ops =
671678
{

0 commit comments

Comments
 (0)