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

/projects/cubeos/src_current/hardware/tpu.h File Reference

#include <config.h>

Include dependency graph for tpu.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TPU_ADDR(nr)   (TPU_BASE + nr)
#define TPU_TPUMCR   TPU_ADDR(0x0)
#define TPU_TICR   TPU_ADDR(0x08)
#define TPU_CIER   TPU_ADDR(0x0a)
#define TPU_CFSR   TPU_ADDR(0x0c)
#define TPU_CFSR0   TPU_ADDR(0x0c)
#define TPU_CFSR1   TPU_ADDR(0x0e)
#define TPU_CFSR2   TPU_ADDR(0x10)
#define TPU_CFSR3   TPU_ADDR(0x12)
#define TPU_HSQR   TPU_ADDR(0x14)
#define TPU_HSQR0   TPU_ADDR(0x14)
#define TPU_HSQR1   TPU_ADDR(0x16)
#define TPU_HSRR   TPU_ADDR(0x18)
#define TPU_HSRR0   TPU_ADDR(0x18)
#define TPU_HSRR1   TPU_ADDR(0x1a)
#define TPU_CPR   TPU_ADDR(0x1c)
#define TPU_CPR0   TPU_ADDR(0x1c)
#define TPU_CPR1   TPU_ADDR(0x1e)
#define TPU_CISR   TPU_ADDR(0x20)
#define TPU_PARAMETER   TPU_ADDR(0x100)
#define setTPUMCR(val)   writeshort(TPU_TPUMCR,val)
#define setTICR(val)   writeshort(TPU_TICR,val)
#define setCIER(ch, val)   writeshortpos(TPU_CIER,val,0x1,ch)
#define setCFSR(ch, val)   writeshortpos(TPU_CFSR + ((3-(ch/4))<<1),val,0xf,(ch&0x3)<<2)
#define setHSQR(ch, val)   writeshortpos(TPU_HSQR+((1-(ch/8))<<1),val,0x3,(ch&0x7)<<1)
#define setHSRR(ch, val)   writeshortpos(TPU_HSRR+((1-(ch/8))<<1),val,0x3,(ch&0x7)<<1)
#define setCPR(ch, val)   writeshortpos(TPU_CPR+((1-(ch/8))<<1),val,0x3,(ch&0x7)<<1)
#define clearCISR(ch)   writeshortpos(TPU_CISR,0x0,0x1,ch)
#define setPAR(ch, nr, val)   writeshort(TPU_PARAMETER+(ch*16)+(nr<<1),val)
#define getTPUMCR()   readshort(TPU_TPUMCR)
#define getTICR()   readshort(TPU_TICR)
#define getCIER(ch)   readshortpos(TPU_CIER,0x1,ch)
#define getCFSR(ch)   readshortpos(TPU_CFSR + ((3-(ch/4))<<1),0xf,(ch&0x3)<<2)
#define getHSQR(ch)   readshortpos(TPU_HSQR+((1-(ch/8))<<1),0x3,(ch&0x7)<<1)
#define getHSRR(ch)   readshortpos(TPU_HSRR+((1-(ch/8))<<1),0x3,(ch&0x7)<<1)
#define getCPR(ch)   readshortpos(TPU_CPR+((1-(ch/8))<<1),0x3,(ch&0x7)<<1)
#define getCISR(ch)   readshortpos(TPU_CISR,0x1,ch)
#define getPAR(ch, nr)   readshort(TPU_PARAMETER+(ch*16)+(nr<<1))
#define TPU_FKT_PPWA   0xf
#define TPU_FKT_OC   0xe
#define TPU_FKT_SM   0xd
#define TPU_FKT_PSP   0xc
#define TPU_FKT_PMA   0xb
#define TPU_FKT_ITC   0xa
#define TPU_FKT_PWM   0x9
#define TPU_FKT_DIO   0x8
#define TPU_FKT_SPWM   0x7
#define TPU_FKT_QDEC   0x6
#define TPU_QDEC_EDGE_TIME   0
#define TPU_QDEC_POS_COUNT   1
#define TPU_QDEC_TCR1_VAL   2
#define TPU_QDEC_CHAN_PINSTATE   3
#define TPU_QDEC_CORR_PINSTATE_ADDR   4
#define TPU_QDEC_EDGE_TIME_LSB_ADDR   5


Define Documentation

#define clearCISR ch       writeshortpos(TPU_CISR,0x0,0x1,ch)
 

Definition at line 53 of file tpu.h.

#define getCFSR ch       readshortpos(TPU_CFSR + ((3-(ch/4))<<1),0xf,(ch&0x3)<<2)
 

Definition at line 59 of file tpu.h.

Referenced by TPU_getdio, TPU_getpac, TPU_getqd, TPU_readqd, TPU_setdio, TPU_setpwmdc, TPU_setpwmhigh, and TPU_setpwmperiod.

#define getCIER ch       readshortpos(TPU_CIER,0x1,ch)
 

Definition at line 58 of file tpu.h.

#define getCISR ch       readshortpos(TPU_CISR,0x1,ch)
 

Definition at line 63 of file tpu.h.

#define getCPR ch       readshortpos(TPU_CPR+((1-(ch/8))<<1),0x3,(ch&0x7)<<1)
 

Definition at line 62 of file tpu.h.

#define getHSQR ch       readshortpos(TPU_HSQR+((1-(ch/8))<<1),0x3,(ch&0x7)<<1)
 

Definition at line 60 of file tpu.h.

#define getHSRR ch       readshortpos(TPU_HSRR+((1-(ch/8))<<1),0x3,(ch&0x7)<<1)
 

Definition at line 61 of file tpu.h.

Referenced by TPU_setpwmdc, and TPU_setpwmperiod.

#define getPAR ch,
nr       readshort(TPU_PARAMETER+(ch*16)+(nr<<1))
 

Definition at line 64 of file tpu.h.

Referenced by TPU_getdio, TPU_getpac, TPU_getqd, TPU_readqd, and TPU_setpwmdc.

 
#define getTICR      readshort(TPU_TICR)
 

Definition at line 57 of file tpu.h.

 
#define getTPUMCR      readshort(TPU_TPUMCR)
 

Definition at line 56 of file tpu.h.

#define setCFSR ch,
val       writeshortpos(TPU_CFSR + ((3-(ch/4))<<1),val,0xf,(ch&0x3)<<2)
 

Definition at line 49 of file tpu.h.

Referenced by TPU_initchannel, TPU_makedio, TPU_makepac, TPU_makepwm_TCR1, TPU_makepwm_TCR2, and TPU_makeqd.

#define setCIER ch,
val       writeshortpos(TPU_CIER,val,0x1,ch)
 

Definition at line 48 of file tpu.h.

Referenced by TPU_initchannel, TPU_makedio, TPU_makepac, TPU_makepwm_TCR1, and TPU_makepwm_TCR2.

#define setCPR ch,
val       writeshortpos(TPU_CPR+((1-(ch/8))<<1),val,0x3,(ch&0x7)<<1)
 

Definition at line 52 of file tpu.h.

Referenced by TPU_initchannel, TPU_makedio, TPU_makepac, TPU_makepwm_TCR1, TPU_makepwm_TCR2, and TPU_makeqd.

#define setHSQR ch,
val       writeshortpos(TPU_HSQR+((1-(ch/8))<<1),val,0x3,(ch&0x7)<<1)
 

Definition at line 50 of file tpu.h.

Referenced by TPU_getdio, TPU_makepac, TPU_makeqd, and TPU_setdio.

#define setHSRR ch,
val       writeshortpos(TPU_HSRR+((1-(ch/8))<<1),val,0x3,(ch&0x7)<<1)
 

Definition at line 51 of file tpu.h.

Referenced by TPU_getdio, TPU_getpac, TPU_initchannel, TPU_makedio, TPU_makepac, TPU_makepwm_TCR1, TPU_makepwm_TCR2, TPU_makeqd, TPU_setdio, TPU_setpwmdc, and TPU_setpwmperiod.

#define setPAR ch,
nr,
val       writeshort(TPU_PARAMETER+(ch*16)+(nr<<1),val)
 

Definition at line 54 of file tpu.h.

Referenced by TPU_getqd, TPU_makepac, TPU_makepwm_TCR1, TPU_makepwm_TCR2, TPU_makeqd, TPU_setpwmdc, TPU_setpwmhigh, and TPU_setpwmperiod.

#define setTICR val       writeshort(TPU_TICR,val)
 

Definition at line 47 of file tpu.h.

Referenced by TPU_init.

#define setTPUMCR val       writeshort(TPU_TPUMCR,val)
 

Definition at line 46 of file tpu.h.

Referenced by TPU_init.

#define TPU_ADDR nr       (TPU_BASE + nr)
 

Definition at line 23 of file tpu.h.

#define TPU_CFSR   TPU_ADDR(0x0c)
 

Definition at line 28 of file tpu.h.

#define TPU_CFSR0   TPU_ADDR(0x0c)
 

Definition at line 29 of file tpu.h.

#define TPU_CFSR1   TPU_ADDR(0x0e)
 

Definition at line 30 of file tpu.h.

#define TPU_CFSR2   TPU_ADDR(0x10)
 

Definition at line 31 of file tpu.h.

#define TPU_CFSR3   TPU_ADDR(0x12)
 

Definition at line 32 of file tpu.h.

#define TPU_CIER   TPU_ADDR(0x0a)
 

Definition at line 27 of file tpu.h.

Referenced by TPU_init.

#define TPU_CISR   TPU_ADDR(0x20)
 

Definition at line 42 of file tpu.h.

#define TPU_CPR   TPU_ADDR(0x1c)
 

Definition at line 39 of file tpu.h.

#define TPU_CPR0   TPU_ADDR(0x1c)
 

Definition at line 40 of file tpu.h.

#define TPU_CPR1   TPU_ADDR(0x1e)
 

Definition at line 41 of file tpu.h.

#define TPU_FKT_DIO   0x8
 

Definition at line 73 of file tpu.h.

#define TPU_FKT_ITC   0xa
 

Definition at line 71 of file tpu.h.

#define TPU_FKT_OC   0xe
 

Definition at line 67 of file tpu.h.

#define TPU_FKT_PMA   0xb
 

Definition at line 70 of file tpu.h.

#define TPU_FKT_PPWA   0xf
 

Definition at line 66 of file tpu.h.

#define TPU_FKT_PSP   0xc
 

Definition at line 69 of file tpu.h.

#define TPU_FKT_PWM   0x9
 

Definition at line 72 of file tpu.h.

#define TPU_FKT_QDEC   0x6
 

Definition at line 75 of file tpu.h.

Referenced by TPU_getqd, TPU_makeqd, and TPU_readqd.

#define TPU_FKT_SM   0xd
 

Definition at line 68 of file tpu.h.

#define TPU_FKT_SPWM   0x7
 

Definition at line 74 of file tpu.h.

#define TPU_HSQR   TPU_ADDR(0x14)
 

Definition at line 33 of file tpu.h.

#define TPU_HSQR0   TPU_ADDR(0x14)
 

Definition at line 34 of file tpu.h.

#define TPU_HSQR1   TPU_ADDR(0x16)
 

Definition at line 35 of file tpu.h.

#define TPU_HSRR   TPU_ADDR(0x18)
 

Definition at line 36 of file tpu.h.

#define TPU_HSRR0   TPU_ADDR(0x18)
 

Definition at line 37 of file tpu.h.

#define TPU_HSRR1   TPU_ADDR(0x1a)
 

Definition at line 38 of file tpu.h.

#define TPU_PARAMETER   TPU_ADDR(0x100)
 

Definition at line 43 of file tpu.h.

#define TPU_QDEC_CHAN_PINSTATE   3
 

Definition at line 80 of file tpu.h.

Referenced by TPU_makeqd.

#define TPU_QDEC_CORR_PINSTATE_ADDR   4
 

Definition at line 81 of file tpu.h.

Referenced by TPU_makeqd.

#define TPU_QDEC_EDGE_TIME   0
 

Definition at line 77 of file tpu.h.

#define TPU_QDEC_EDGE_TIME_LSB_ADDR   5
 

Definition at line 82 of file tpu.h.

Referenced by TPU_makeqd.

#define TPU_QDEC_POS_COUNT   1
 

Definition at line 78 of file tpu.h.

Referenced by TPU_getqd, TPU_makeqd, and TPU_readqd.

#define TPU_QDEC_TCR1_VAL   2
 

Definition at line 79 of file tpu.h.

#define TPU_TICR   TPU_ADDR(0x08)
 

Definition at line 26 of file tpu.h.

#define TPU_TPUMCR   TPU_ADDR(0x0)
 

Definition at line 25 of file tpu.h.


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