zephyrproject-rtos / gsoc-2022-arduino-core

Arduino Core Zephyr Module (GSoC 2022 Project)
Apache License 2.0
44 stars 11 forks source link

Implement interrupts and noInterrupts #119

Closed Ayush1325 closed 2 weeks ago

Ayush1325 commented 1 month ago
Ayush1325 commented 4 weeks ago

You have defined interrupts() / noInterrupts() only in common.cpp. How will anyone outside of this file ever use it? Using it in some example would be great.

These function prototypes don't exist in the Arduino Core API. See how SAMD has done it: https://github.com/arduino/ArduinoCore-samd/blob/993398cb7a23a4e0f821a73501ae98053773165b/cores/arduino/Arduino.h#L53

Is there a reason to use macro instead of just adding function prototype to Arduino.h?

DhruvaG2000 commented 4 weeks ago

You have defined interrupts() / noInterrupts() only in common.cpp. How will anyone outside of this file ever use it? Using it in some example would be great. These function prototypes don't exist in the Arduino Core API. See how SAMD has done it: https://github.com/arduino/ArduinoCore-samd/blob/993398cb7a23a4e0f821a73501ae98053773165b/cores/arduino/Arduino.h#L53

Is there a reason to use macro instead of just adding function prototype to Arduino.h?

Nope, not atall. I just meant to show that they have exposed it via the Arduino.h. You can make it a prototype.

DhruvaG2000 commented 2 weeks ago

Can you please rebase and force push?