\\:title MAEVARM : Custom Header File:) \\MEAM.Design - Teensy - Custom Header File
The custom teensy_general.h file provides some useful functions. This is a work in progress, and you are highly encouraged to add/modify/update this file and post changes here (just add a new line with your version and notes about what has been added - as time goes by changes will be rolled into official releases).
defines the following useful constants:
FALSE (0)
TRUE (1)
OFF (0)
ON (1)
TOGGLE (2)
TRUE (1)
OFF (0)
ON (1)
TOGGLE (2)
provides the following macro functions:
set(register,n)
- sets the n-th bit of register
clear(register,n)
- clears the n-th bit of register
toggle(register,n)
- toggles the n-th bit of register
\\->check(register,n)
- returns the state of the n-th bit of register
teensy_disableJTAG()
- turn off JTAG port and allow access to F4-F7 as GPIO
teensy_clockdivide(N)
- reduces the system clock speed by 2^N (N=0..8)
teensy_wait(ms)
- delay the microcontroller for an integer number of milliseconds (assumes a 16 MHz system clock)
teensy_green(state)
- set the state of the green on-board LED to OFF, ON, or TOGGLE
teensy_red(state)
- set the state of the red on-board LED to OFF, ON, or TOGGLE
\\