-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_interrupt_freertos: Add pw_interrupt backend for FreeRTOS
This replaces the pw_interrupt_cortex_a module which does not work correctly. Change-Id: Ibc7a41e3684c87b30b4d0b6869ca666e070e2189 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/267292 Lint: Lint 🤖 <[email protected]> Reviewed-by: Dave Roth <[email protected]> Commit-Queue: Randy Zhang <[email protected]> Reviewed-by: Eric Ye <[email protected]> Presubmit-Verified: CQ Bot Account <[email protected]>
- Loading branch information
Randy Zhang
authored and
CQ Bot Account
committed
Feb 14, 2025
1 parent
0481c3f
commit 7ab1856
Showing
16 changed files
with
69 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
pw_interrupt_cortex_a/public/pw_interrupt_cortex_a/context_inline.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _module-pw_interrupt_freertos: | ||
|
||
--------------------- | ||
pw_interrupt_freertos | ||
--------------------- | ||
.. pigweed-module:: | ||
:name: pw_interrupt_freertos | ||
|
||
This module implements a backend for ``pw_interrupt``. It requires a port of | ||
FreeRTOS that defines the ``ullPortInterruptNesting``. Usually, ports for ARM | ||
A-profile processors will have this defined. For Cortex-M processors, use the | ||
``pw_interrupt_cortex_m`` backend. |
27 changes: 27 additions & 0 deletions
27
pw_interrupt_freertos/public/pw_interrupt_freertos/context_inline.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2025 The Pigweed Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
// use this file except in compliance with the License. You may obtain a copy of | ||
// the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
// License for the specific language governing permissions and limitations under | ||
// the License. | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
#include "portmacro.h" | ||
|
||
namespace pw::interrupt { | ||
|
||
// This backend require the FreeRTOS port to define the xPortIsInsideInterrupt, | ||
// which is not available on every officially supported port. It may be | ||
// necessary to extend certain ports for this backend to work. | ||
inline bool InInterruptContext() { return !!xPortIsInsideInterrupt(); } | ||
|
||
} // namespace pw::interrupt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters