Skip to content

Commit

Permalink
Merge pull request #150 from lf-lang/arduino-cli-support
Browse files Browse the repository at this point in the history
Disable MBED Support since it is a multithreaded enabled board.
  • Loading branch information
lhstrh authored Jan 28, 2023
2 parents c8455ba + 6dce219 commit eb345fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/platform/lf_arduino_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int lf_critical_section_enter() {
// TODO: Do we need to check whether the interrupts were enabled to
// begin with? AFAIK there is no Arduino API for that
#if BOARD==MBED
core_util_critical_section_enter(); //MBED Boards use an RTOS, so we use a specific call to enter a critical section.
//core_util_critical_section_enter(); //MBED Boards use an RTOS, so we use a specific call to enter a critical section.
#else
noInterrupts();
#endif
Expand All @@ -163,7 +163,7 @@ int lf_critical_section_exit() {
}
if (--_lf_num_nested_critical_sections == 0) {
#if BOARD==MBED
core_util_critical_section_exit(); //MBED Boards use an RTOS, so we use a specific call to exit a critical section.
//core_util_critical_section_exit(); //MBED Boards use an RTOS, so we use a specific call to exit a critical section.
#else
interrupts();
#endif
Expand Down
4 changes: 4 additions & 0 deletions include/core/platform/lf_arduino_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif

#if BOARD==MBED
#error "MBED RTOS-based Arduino Boards are currently unsupported"
#endif

#define __STDC_FORMAT_MACROS
#include <inttypes.h>

Expand Down

0 comments on commit eb345fe

Please sign in to comment.