|
RTEMS
5.1
|
19 extern void grpwm_register_drv (
void);
21 #define GRPWM_IOCTL_GET_CAP 1 22 #define GRPWM_IOCTL_SET_CONFIG 2 23 #define GRPWM_IOCTL_SET_SCALER 3 24 #define GRPWM_IOCTL_UPDATE 4 25 #define GRPWM_IOCTL_IRQ 5 44 unsigned char dbscaler;
45 unsigned char scaler_index;
48 unsigned char irqscaler;
50 void (*isr)(
int channel,
void *arg);
54 unsigned int wave_synccfg;
55 unsigned int wave_sync;
56 unsigned int *wave_data;
57 unsigned int wave_data_length;
60 #define GRPWM_CONFIG_OPTION_FLIP 0x04000000 61 #define GRPWM_CONFIG_OPTION_DEAD_BAND 0x00200000 62 #define GRPWM_CONFIG_OPTION_SYMMETRIC 0x00000040 63 #define GRPWM_CONFIG_OPTION_ASYMMERTIC 0 64 #define GRPWM_CONFIG_OPTION_DUAL 0x00000020 65 #define GRPWM_CONFIG_OPTION_PAIR 0x00000004 66 #define GRPWM_CONFIG_OPTION_SINGLE 0x00000000 67 #define GRPWM_CONFIG_OPTION_POLARITY_HIGH 0x00000002 68 #define GRPWM_CONFIG_OPTION_POLARITY_LOW 0x00000000 70 #define GRPWM_CONFIG_OPTION_MASK ( \ 71 GRPWM_CONFIG_OPTION_DEAD_BAND | GRPWM_CONFIG_OPTION_SYMMETRIC | \ 72 GRPWM_CONFIG_OPTION_DUAL | GRPWM_CONFIG_OPTION_PAIR | \ 73 GRPWM_CONFIG_OPTION_POLARITY_HIGH \ 79 unsigned int index_mask;
80 unsigned int values[8];
85 #define GRPWM_UPDATE_OPTION_ENABLE 0x01 86 #define GRPWM_UPDATE_OPTION_DISABLE 0x02 87 #define GRPWM_UPDATE_OPTION_PERIOD 0x04 88 #define GRPWM_UPDATE_OPTION_COMP 0x08 89 #define GRPWM_UPDATE_OPTION_DBCOMP 0x10 90 #define GRPWM_UPDATE_OPTION_FIX 0x20 93 #define GRPWM_UPDATE_FIX_ENABLE 1 94 #define GRPWM_UPDATE_FIX_DISABLE 0 95 #define GRPWM_UPDATE_FIX_0_LOW 0 96 #define GRPWM_UPDATE_FIX_0_HIGH 2 97 #define GRPWM_UPDATE_FIX_1_LOW 0 98 #define GRPWM_UPDATE_FIX_1_HIGH 4 101 unsigned int options;
103 unsigned int compare;
110 unsigned char chanmask;
116 #define GRPWM_IRQ_DISABLE 0 117 #define GRPWM_IRQ_PERIOD 1 118 #define GRPWM_IRQ_COMPARE 3 119 #define GRPWM_IRQ_CLEAR 0x10 121 #define GRPWM_IRQ_CHAN 0x100