- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I used the Psoc4 to BLDC motor Driver,have to add some custom code to close the motor in the CY_ISR(IntDefaultHandler).However once rebuild the project ,the code will be removed.What can I do to prevent the code is deleted by the building operation.
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
找到cyapicallbacks.h, 申明一下callback函数。
#ifndef CYAPICALLBACKS_H
#define CYAPICALLBACKS_H
/*Define your macro callbacks here */
/*For more information, refer to the Writing Code topic in the PSoC Creator Help.*/
#ifndef CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
#define CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
void CyBoot_IntDefaultHandler_Enomem_Exception_Callback(void);
#endif
#endif /* CYAPICALLBACKS_H */
/* [] */
然后在mian.c里面定义一下下面这个函数:
void CyBoot_IntDefaultHandler_Enomem_Exception_Callback()
{
}
重点:: 也许你不是要把自己的函数写到这个中断回调函数里面,但是方法是一样的。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
找到cyapicallbacks.h, 申明一下callback函数。
#ifndef CYAPICALLBACKS_H
#define CYAPICALLBACKS_H
/*Define your macro callbacks here */
/*For more information, refer to the Writing Code topic in the PSoC Creator Help.*/
#ifndef CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
#define CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
void CyBoot_IntDefaultHandler_Enomem_Exception_Callback(void);
#endif
#endif /* CYAPICALLBACKS_H */
/* [] */
然后在mian.c里面定义一下下面这个函数:
void CyBoot_IntDefaultHandler_Enomem_Exception_Callback()
{
}
重点:: 也许你不是要把自己的函数写到这个中断回调函数里面,但是方法是一样的。