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
Modules§
- clock
- A top level system which keeps track of time using the onboard clock peripheral.
- debug
- gate
- i2c
- This module provides the ability to designate any two gpio pins as SDA/SCL which allows you to introduce i2c capabilities into your project.
- math
- This module represents basic math functionality that you might find useful in a kernel.
- mem
- This module represents paged memory functionality alloc(), and free().
- phys
- Phys module handles kernel-level interfacing for physical, on-board peripherals.
- prelude
- serio
- This module represents the serial communication protocol based on UART physical hardware.
- system
- A collection of datastructures to aid in general development.
- usb_
serial
Macros§
- assembly
- This method will call the asm! macro but
in a way that doesn’t break tests. Use it
in lieu of the
asm!
macro. - gate_
open - main
- 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.
- str
- A thin wrapper around Str::with_content($X)
- using
- A directive for managing memory.
- vec_str
- This macro takes a static string and returns a vector containing the sequence of characters.
- vector
- This macro returns a vector of the items you pass to it.
Enums§
Constants§
- MICRO_
TO_ NANO - Returns how many nanos are in a microsecond
- MS_
TO_ NANO - Returns how many nanos are in a millisecond
- S_
TO_ NANO - Returns how many nanos are in a second
Traits§
Functions§
- arm_
dcache_ delete - code_
hash - This function returns a u32 containing the program counter of the line of code which invokes this function.
- dsb
- Data Memory Barrier
- err
- Use this method to enter a system-wide failure event.
- isb
- Instruction Synchronization Barrier
- pendsv
- This method will intiate a pendsv interrupt
- wait_
exact_ ns - This method will wait a certain amount of milliseconds
by calculating how many
nop
commands it will take and issuing them sequentially. - wait_ns
- Waits for a specific amount of nanoseconds.