stepRocker servo Open Source TMCL  1.00
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
Functions
IO.c File Reference

I/O functions. More...

#include <stdlib.h>
#include "derivative.h"
#include "bits.h"
#include "stepRocker.h"
#include "TMC262.h"
#include "IO.h"
Include dependency graph for IO.c:

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...
 

Detailed Description

I/O functions.

Author
Trinamic Motion Control GmbH & Co KG
Version
2.20

This file provides functions for intializing and using the I/O ports and some other miscellaneous stuff.

Function Documentation

DisableInterrupts ( void  )

Disable all interrupts.

This function globally disables all interrupts.

Here is the caller graph for this function:

EnableInterrupts ( void  )

Enable all interrupts.

This function globally enables all interrupts.

Here is the caller graph for this function:

GetStallState ( UCHAR  Motor)

Get stall flag state of motor driver.

Parameters
MotorMotor number (with stepRocker always 0)
Returns
TRUE stall
FALSE no stall

This function reads the state of the SG_TEST pin of the TMC262.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

ResetCPU ( UCHAR  ResetPeripherals)

Reset the CPU.

Parameters
ResetPeripheralsReset also periperals when TRUE

This function resets the CPU with or without the integrated peripherals.

Here is the caller graph for this function:

SetMotorCurrent ( UCHAR  Motor,
UCHAR  Current 
)

Set motor current.

Parameters
MotorMotor number (with stepRocker always 0)
CurrentMotor current scaled to 0..255

This function sets the motor current, scaled to 0..255 as usual in TMCL.

Here is the call graph for this function:

Here is the caller graph for this function: