CommunityGD32Cores / ArduinoCore-GD32

Arduino core for GD32 devices, community developed, based on original GigaDevice's core
Other
86 stars 33 forks source link

implement noInterrupts/interrupts. #61

Closed obra closed 1 year ago

obra commented 2 years ago

https://www.arduino.cc/reference/en/language/functions/interrupts/nointerrupts/ says they're part of the standard API.

We don't implement them.

It looks like it they should be implemented as wrappers around __disableIrq and __enableIrq() per https://stm32f4-discovery.net/2015/06/how-to-properly-enabledisable-interrupts-in-arm-cortex-m/ and some grepping of the GD32 code.

maxgerhardt commented 2 years ago

I agree, we should implement it like STM32Duino does as a macro for fastest execution speed.

https://github.com/stm32duino/Arduino_Core_STM32/blob/76887a45b43c9e919db17df9e039d96bd01641d1/cores/arduino/wiring_constants.h#L85-L86

maxgerhardt commented 1 year ago

Done in https://github.com/CommunityGD32Cores/ArduinoCore-GD32/commit/a22a2e3aca8ce338f1ca8e2170fd70c53399120e quite some time ago.