Skip to content
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

[HAL/STM32F1] Fixes #10999

Merged
merged 2 commits into from
Jun 12, 2018
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
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,13 @@ script:
- update_defaults
- opt_enable VIKI2 SDSUPPORT
- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}

#############################
# STM32F1 default config test
#############################

- export TEST_PLATFORM="-e STM32F1"
- restore_configs
- opt_set MOTHERBOARD BOARD_STM32F1R
- update_defaults
- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
12 changes: 6 additions & 6 deletions Marlin/src/HAL/HAL_STM32F1/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// --------------------------------------------------------------------------

#include <stdint.h>

#include <libmaple/atomic.h>
#include <Arduino.h>

// --------------------------------------------------------------------------
Expand Down Expand Up @@ -119,11 +119,11 @@ void HAL_init();
#define analogInputToDigitalPin(p) (p)
#endif

#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
#define CRITICAL_SECTION_END if (!primask) __enable_irq()
#define ISRS_ENABLED() (!__get_PRIMASK())
#define ENABLE_ISRS() __enable_irq()
#define DISABLE_ISRS() __disable_irq()
#define CRITICAL_SECTION_START uint32_t primask = __get_primask(); (void)__iCliRetVal()
#define CRITICAL_SECTION_END if (!primask) (void)__iSeiRetVal()
#define ISRS_ENABLED() (!__get_primask)
#define ENABLE_ISRS() ((void)__iSeiRetVal())
#define DISABLE_ISRS() ((void)__iCliRetVal())

// On AVR this is in math.h?
#define square(x) ((x)*(x))
Expand Down