• Main Page
  • Classes
  • Files
  • File List
  • File Members

qemotor.h

Go to the documentation of this file.
00001 //
00002 // begin license header
00003 //  
00004 // This file is part of Terk and TerkOS.
00005 //
00006 // All Terk and TerkOS source code is provided under the terms of the 
00007 // GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).  
00008 // Those wishing to use Terk and TerkOS source code, software and/or
00009 // technologies under different licensing terms should contact us at 
00010 // [email protected]. Such licensing terms are available for
00011 // all portions of the Terk and TerkOS codebase presented here.
00012 //
00013 // end license header
00014 //
00015 
00016 #ifndef _QEMOTOR_H
00017 #define _QEMOTOR_H
00018 
00019 #ifndef TRUE
00020 #define TRUE                   1
00021 #endif
00022 #ifndef FALSE               
00023 #define FALSE                  0
00024 #endif
00025 
00026 #define QEMOT_MAJOR_NUMBER     214
00027 #define QEMOT_MINOR_NUMBER     0
00028 
00029 #define QEMOT_NUM_MOTORS       4
00030 #define QEMOT_BASE_ADDR        0x20000000
00031 #define QEMOT_WIDTH            0x400
00032 #define QEMOT_VECTOR           0
00033 
00034 typedef long Axis_position;
00035 typedef int (*qe_motor_func)(unsigned int, long, long, long, long, long);
00036 #define QEMOT_NUM_ARGS         5
00037 
00038 #define MOT_SET_PERIOD           0
00039 #define MOT_GET_FREQUENCY        1
00040 #define MOT_GET_STATUS           2
00041 #define MOT_SET_MODE             3
00042 #define MOT_GET_POSITION         4
00043 #define MOT_GET_POSITION_VECTOR  5
00044 #define MOT_SET_PWM              6
00045 #define MOT_GET_PWM              7
00046 #define MOT_SET_BEMF_OFFSET      8
00047 #define MOT_SET_POSITION         9
00048 #define MOT_GET_MCURRENT         10
00049 #define MOT_GET_MCURRENT_VECTOR  11
00050 #define MOT_GET_VELOCITY         12
00051 #define MOT_GET_VELOCITY_VECTOR  13
00052 #define MOT_SET_BEMF_CALIBRATE   14
00053 #define MOT_SET_BEMF_TIMING      15
00054 #define MOT_SET_PIDV_GAINS       16
00055 #define MOT_SET_MAX_ERROR        17
00056 #define MOT_SET_MAX_INTEGRAL     18
00057 #define MOT_GET_DONE             19
00058 #define MOT_SET_HOLD             20
00059 #define MOT_GET_BEMF             21
00060 #define MOT_FLUSH_WRITE_QUEUE    22
00061 #define MOT_SET_WRITE_QUEUE_SIZE 23
00062 #define MOT_STOP                 24
00063 #define MOT_SET_READ_QUEUE_SIZE  25
00064 
00065 #endif

Generated on Mon Oct 3 2011 15:36:31 for libqwerk by  doxygen 1.7.1