Skip to content

Disabled Core callback feature #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions cores/arduino/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,22 @@ void initVariant() { }
*/
int main( void )
{
initVariant();
initVariant();

#if defined(USBCON)
usbd_interface_init();
usbd_interface_init();
#endif

setup();
setup();

for (;;)
{
CoreCallback();
loop();
if (serialEventRun) serialEventRun();
}
for (;;)
{
#if defined(CORE_CALLBACK)
CoreCallback();
#endif
loop();
if (serialEventRun) serialEventRun();
}

return 0;
return 0;
}
4 changes: 2 additions & 2 deletions cores/arduino/stm32/core_callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* list. Otherwise, your function should be called inside the loop() function of
* the sketch.
*/

#if defined(CORE_CALLBACK)
#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -107,5 +107,5 @@ void CoreCallback(void)
#ifdef __cplusplus
}
#endif

#endif // CORE_CALLBACK
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
4 changes: 2 additions & 2 deletions cores/arduino/stm32/core_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __CALLBACK_H
#define __CALLBACK_H

#if defined(CORE_CALLBACK)
#include "variant.h"

#ifdef __cplusplus
Expand All @@ -61,7 +61,7 @@ void CoreCallback(void);
#ifdef __cplusplus
}
#endif

#endif // CORE_CALLBACK
#endif /* __CALLBACK_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/