stepRocker servo Open Source TMCL
1.00
|
I/O functions. More...
#include <stdlib.h>
#include "derivative.h"
#include "bits.h"
#include "stepRocker.h"
#include "TMC262.h"
#include "IO.h"
Functions | |
void | InitIO (void) |
Initialize I/O. More... | |
void | EnableInterrupts (void) |
Enable all interrupts. More... | |
void | DisableInterrupts (void) |
Disable all interrupts. More... | |
void | ResetCPU (UCHAR ResetPeripherals) |
Reset the CPU. More... | |
void | SetMotorCurrent (UCHAR Motor, UCHAR Current) |
Set motor current. More... | |
UCHAR | GetStallState (UCHAR Motor) |
Get stall flag state of motor driver. More... | |
I/O functions.
This file provides functions for intializing and using the I/O ports and some other miscellaneous stuff.
DisableInterrupts | ( | void | ) |
Disable all interrupts.
This function globally disables all interrupts.
EnableInterrupts | ( | void | ) |
Enable all interrupts.
This function globally enables all interrupts.
GetStallState | ( | UCHAR | Motor | ) |
Get stall flag state of motor driver.
Motor | Motor number (with stepRocker always 0) |
This function reads the state of the SG_TEST pin of the TMC262.
InitIO | ( | void | ) |
Initialize I/O.
This function initalizes all I/O port pins of the CPU that are not initialized in somewhere else in other initialization functions.
ResetCPU | ( | UCHAR | ResetPeripherals | ) |
Reset the CPU.
ResetPeripherals | Reset also periperals when TRUE |
This function resets the CPU with or without the integrated peripherals.
Set motor current.
Motor | Motor number (with stepRocker always 0) |
Current | Motor current scaled to 0..255 |
This function sets the motor current, scaled to 0..255 as usual in TMCL.