File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -37,20 +37,22 @@ void initVariant() { }
3737 */
3838int main ( void )
3939{
40- initVariant ();
40+ initVariant ();
4141
4242#if defined(USBCON)
43- usbd_interface_init ();
43+ usbd_interface_init ();
4444#endif
4545
46- setup ();
46+ setup ();
4747
48- for (;;)
49- {
50- CoreCallback ();
51- loop ();
52- if (serialEventRun) serialEventRun ();
53- }
48+ for (;;)
49+ {
50+ #if defined(CORE_CALLBACK)
51+ CoreCallback ();
52+ #endif
53+ loop ();
54+ if (serialEventRun) serialEventRun ();
55+ }
5456
55- return 0 ;
57+ return 0 ;
5658}
Original file line number Diff line number Diff line change 4343 * list. Otherwise, your function should be called inside the loop() function of
4444 * the sketch.
4545 */
46-
46+ #if defined( CORE_CALLBACK )
4747#ifdef __cplusplus
4848 extern "C" {
4949#endif
@@ -107,5 +107,5 @@ void CoreCallback(void)
107107#ifdef __cplusplus
108108}
109109#endif
110-
110+ #endif // CORE_CALLBACK
111111/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line number Diff line number Diff line change 3838/* Define to prevent recursive inclusion -------------------------------------*/
3939#ifndef __CALLBACK_H
4040#define __CALLBACK_H
41-
41+ #if defined( CORE_CALLBACK )
4242#include "variant.h"
4343
4444#ifdef __cplusplus
@@ -61,7 +61,7 @@ void CoreCallback(void);
6161#ifdef __cplusplus
6262}
6363#endif
64-
64+ #endif // CORE_CALLBACK
6565#endif /* __CALLBACK_H */
6666
6767/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
You can’t perform that action at this time.
0 commit comments