Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/drivers/tpu/tpud.c File Reference

#include <cubeos.h>
#include <mc68681.h>
#include <tpu.h>
#include <tpud.h>
#include <ivtab.h>

Include dependency graph for tpud.c:

Go to the source code of this file.

Defines

#define WFSR   1000

Functions

int TPU_init ()
int TPU_initchannel (unsigned char nr)
 resets TPU channel nr. More...

int TPU_makedio (unsigned char nr)
int TPU_setdio (unsigned char nr, unsigned char v)
int TPU_getdio (unsigned char nr)
int TPU_makepwm_TCR1 (unsigned char nr)
 configure TP channel as PWM output, clock source TCR1. More...

int TPU_makepwm_TCR2 (unsigned char nr)
 configure TP channel as PWM output, clock source TCR2. More...

int TPU_makepwm (unsigned char nr)
 configure TP channel as PWM output, default clock source. More...

int TPU_setpwmperiod (unsigned char nr, unsigned short period)
 sets the PWM period of TPU PWM channel nr to period. More...

int TPU_setpwmdc (unsigned char nr, unsigned char hightime)
int TPU_setpwmhigh (unsigned char nr, unsigned short hightime)
int TPU_makepac (unsigned char nr)
unsigned short TPU_getpac (unsigned char nr)
int TPU_makeqd (unsigned char ch1, unsigned char ch2)
short TPU_getqd (unsigned char nr)
short TPU_readqd (unsigned char nr)
int TPU_setisr (unsigned char ch, void(*isr)(void))
int TPU_clearisr (unsigned char ch, void(*isr)(void))


Define Documentation

#define WFSR   1000
 

Definition at line 22 of file tpud.c.

Referenced by TPU_setpwmdc, and TPU_setpwmperiod.


Function Documentation

int TPU_clearisr unsigned char    ch,
void(*    isr)(void)
 

Definition at line 393 of file tpud.c.

References _KERN_IVTab_clearvector.

int TPU_getdio unsigned char    nr
 

Definition at line 171 of file tpud.c.

References getCFSR, getPAR, setHSQR, and setHSRR.

unsigned short TPU_getpac unsigned char    nr
 

Definition at line 311 of file tpud.c.

References getCFSR, getPAR, and setHSRR.

short TPU_getqd unsigned char    nr
 

Definition at line 356 of file tpud.c.

References getCFSR, getPAR, setPAR, TPU_FKT_QDEC, and TPU_QDEC_POS_COUNT.

int TPU_init  
 

Definition at line 67 of file tpud.c.

References setTICR, setTPUMCR, TPU_CIER, and writeshort.

int TPU_makedio unsigned char    nr
 

Definition at line 129 of file tpud.c.

References setCFSR, setCIER, setCPR, and setHSRR.

int TPU_makepac unsigned char    nr
 

Definition at line 298 of file tpud.c.

References setCFSR, setCIER, setCPR, setHSQR, setHSRR, and setPAR.

int TPU_makeqd unsigned char    ch1,
unsigned char    ch2
 

Definition at line 330 of file tpud.c.

References setCFSR, setCPR, setHSQR, setHSRR, setPAR, TPU_FKT_QDEC, TPU_QDEC_CHAN_PINSTATE, TPU_QDEC_CORR_PINSTATE_ADDR, TPU_QDEC_EDGE_TIME_LSB_ADDR, and TPU_QDEC_POS_COUNT.

short TPU_readqd unsigned char    nr
 

Definition at line 372 of file tpud.c.

References getCFSR, getPAR, TPU_FKT_QDEC, and TPU_QDEC_POS_COUNT.

int TPU_setdio unsigned char    nr,
unsigned char    v
 

Definition at line 144 of file tpud.c.

References getCFSR, setHSQR, and setHSRR.

int TPU_setisr unsigned char    ch,
void(*    isr)(void)
 

Definition at line 387 of file tpud.c.

References _KERN_IVTab_setvector.

int TPU_setpwmdc unsigned char    nr,
unsigned char    hightime
 

Definition at line 259 of file tpud.c.

References getCFSR, getHSRR, getPAR, setHSRR, setPAR, and WFSR.

int TPU_setpwmhigh unsigned char    nr,
unsigned short    hightime
 

Definition at line 285 of file tpud.c.

References getCFSR, and setPAR.


Generated on Thu Feb 20 15:38:50 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002