jonas-schievink / irq

Licence: 0BSD License
Utilities for Interrupt handling

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to irq

embLua
Lua for microcontrollers
Stars: ✭ 23 (+91.67%)
Mutual labels:  embedded
rustsbi-qemu
QEMU platform SBI support implementation, using RustSBI
Stars: ✭ 39 (+225%)
Mutual labels:  embedded
rigel
[UNMAINTAINED] HMAC-SHA512 implementation optimized for embedded devices
Stars: ✭ 14 (+16.67%)
Mutual labels:  embedded
BIPES
BIPES: Block based Integrated Platform for Embedded Systems allows text and block based programming for several types of embedded systems and Internet of Things modules using MicroPython, CircuitPython, Python or Snek. You can connect, program, debug and monitor several types of boards using network, USB or Bluetooth. No software install needed!
Stars: ✭ 72 (+500%)
Mutual labels:  embedded
signalo
A DSP toolbox with focus on embedded environments written in Rust.
Stars: ✭ 71 (+491.67%)
Mutual labels:  embedded
bigbug
Easy Microcontroller Debugging Tool
Stars: ✭ 37 (+208.33%)
Mutual labels:  embedded
EmbeddedScrollView
Embedded UIScrollView for iOS.
Stars: ✭ 55 (+358.33%)
Mutual labels:  embedded
gpib-usbcdc
Interface bridge between GPIB and USB communication device class
Stars: ✭ 81 (+575%)
Mutual labels:  embedded
BelalHashmi-Assembly-Exercise-Solutions
💻 This repository provides solutions to most of the programming questions in the exercise given at the back of chapters for Bao Ji's Book (text book for course "Comp. Organization & Assembly Lang. EE213" at FAST). Sharing these with you, so that they might help you in understanding the concepts.
Stars: ✭ 30 (+150%)
Mutual labels:  interrupts
infinitree
Scalable and encrypted embedded database with 3-tier caching
Stars: ✭ 80 (+566.67%)
Mutual labels:  embedded
kalman-clib
Microcontroller targeted C library for Kalman filtering
Stars: ✭ 43 (+258.33%)
Mutual labels:  embedded
kocherga
Robust platform-agnostic Cyphal/DroneCAN bootloader for deeply embedded systems
Stars: ✭ 21 (+75%)
Mutual labels:  embedded
async-stm32f1xx
Abstractions for asynchronous programming on the STM32F1xx family of microcontrollers.
Stars: ✭ 24 (+100%)
Mutual labels:  embedded
js-docker
Container deployment of TIBCO JasperReports® Server
Stars: ✭ 115 (+858.33%)
Mutual labels:  embedded
lwprintf
Lightweight printf library optimized for embedded systems
Stars: ✭ 98 (+716.67%)
Mutual labels:  embedded
Sub-IoT-Stack
Sub-IoT: Open Source Stack for Dash7 Alliance Protocol
Stars: ✭ 123 (+925%)
Mutual labels:  embedded
kernel-syslog
📝 Kernel module that can be used as a replacement for syslog, logger or logwrapper
Stars: ✭ 37 (+208.33%)
Mutual labels:  embedded
EmbeddedTools
Additions to the model-based DSL for deploying Java and Native projects to remote targets
Stars: ✭ 14 (+16.67%)
Mutual labels:  embedded
lv lib rlottie
Lottie animation support for LVGL
Stars: ✭ 16 (+33.33%)
Mutual labels:  embedded
brookframework
Microframework which helps to develop web Pascal applications.
Stars: ✭ 161 (+1241.67%)
Mutual labels:  embedded

IRQ – Utilities for writing Interrupt Handlers

crates.io docs.rs CI

This crate provides utilities for handling interrupts on embedded devices.

Please refer to the changelog to see what changed in the last releases.

Features

  • Dynamically and atomically registered, zero-allocation interrupt handlers.
  • Allows moving data into interrupt handlers, and sharing data between handlers.
  • Completely platform agnostic, does not require atomic swap operations (works on eg. thumbv6 targets).

Usage

Add an entry to your Cargo.toml:

[dependencies]
irq = "0.2.3"

Check the API Documentation for how to use the crate's functionality. A small example showcasing the Scoped Interrupts API is provided below:

use irq::{scoped_interrupts, handler, scope};
use mock_pac::interrupt;

// Hook `INT0` and `INT1` using the `#[interrupt]` attribute imported above.
scoped_interrupts! {
    enum Interrupt {
        INT0,
        INT1,
    }

    use #[interrupt];
}

fn main() {
    // Define data to be used (via move or borrow) by the interrupt handlers.
    let mut i = 0;
    let shared = [0, 1, 2];

    // Define handlers using the `handler!` macro.
    handler!(int0 = || i += shared[1]);
    handler!(int1 = || println!("{}", shared[2]));

    // Create a scope and register the handlers.
    scope(|scope| {
        scope.register(Interrupt::INT0, int0);
        scope.register(Interrupt::INT1, int1);

        // The interrupts stay registered for the duration of this closure.
        // This is a good place for the application's idle loop.
    });
}

Rust version support

This crate targets stable Rust. No guarantees are made beyond that, so the minimum supported version might be bumped as needed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].