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

Implement interrupts and noInterrupts #119

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

Ayush1325
Copy link
Member

  • Using irq_lock and irq_unlock zephyr apis.
  • Not really sure where these should go. Common.h has the following line:
// interrupts() / noInterrupts() must be defined by the core

@Ayush1325 Ayush1325 force-pushed the interrupts branch 2 times, most recently from b382d4b to d3ea35d Compare August 16, 2024 11:13
cores/arduino/zephyrCommon.cpp Outdated Show resolved Hide resolved
cores/arduino/zephyrCommon.cpp Show resolved Hide resolved
@Ayush1325 Ayush1325 force-pushed the interrupts branch 2 times, most recently from 675628e to 9e2947b Compare August 18, 2024 13:50
Copy link
Collaborator

@DhruvaG2000 DhruvaG2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Ayush1325
Copy link
Member Author

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
Copy link
Collaborator

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.

Copy link
Collaborator

@DhruvaG2000 DhruvaG2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all comments.

@DhruvaG2000
Copy link
Collaborator

Can you please rebase and force push?

- Using irq_lock and irq_unlock zephyr apis.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
@DhruvaG2000 DhruvaG2000 merged commit d190e21 into zephyrproject-rtos:next Aug 30, 2024
3 checks passed
@Ayush1325 Ayush1325 deleted the interrupts branch August 30, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants