Expand description

A kernel for teensy-4.0 microcontroller.

This crate provides all the resources necessary to begin interfacing with the teensy-4.0. To get started, you simply need to use the main! macro. This will perform a number of chores for you including the following:

  • Initialize uart, xbar, gpio, system clock
  • Enable interrupts
  • Add panic handling
  • Verify memory access
  • Enable FPU


This module provides the ability to designate any two gpio pins as SDA/SCL which allows you to introduce i2c capabilities into your project.

This module represents basic math functionality that you might find useful in a kernel.


Phys module handles kernel-level interfacing for physical, on-board peripherals.

This module represents the serial communication protocol based on UART physical hardware.



This method will call the asm! macro but in a way that doesn’t break tests. Use it in lieu of the asm! macro.

This is the primary macro necessary to bootstrap your application. It takes a code block that will be used as the entrypoint to your logic.

A thin wrapper around Str::with_content($X)

This macro takes a static string and returns a vector containing the sequence of characters.

This macro returns a vector of the items you pass to it.



Returns how many nanos are in a microsecond

Returns how many nanos are in a millisecond

Returns how many nanos are in a second



This function returns a u32 containing the program counter of the line of code which invokes this function.

Data Memory Barrier

Use this method to enter a system-wide failure event.

Instruction Synchronization Barrier

This method will intiate a pendsv interrupt

This method will wait a certain amount of milliseconds by calculating how many nop commands it will take and issuing them sequentially.

Waits for a specific amount of nanoseconds.