Rev 264 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 264 | Rev 307 | ||
---|---|---|---|
Line 162... | Line 162... | ||
162 | 162 | ||
163 | void WIENER_VMUSB_StackClear() { |
163 | void WIENER_VMUSB_StackClear() { |
164 | WIENER_VMUSB_StackInit(); |
164 | WIENER_VMUSB_StackInit(); |
165 | } |
165 | } |
166 | 166 | ||
167 | int |
167 | int WIENER_VMUSB_StackGetUInt16(int maxn, uint16_t *stack) { |
168 | int i; |
168 | int i; |
169 | uint16_t * u16Stack = (uint16_t *) fStack; |
169 | uint16_t * u16Stack = (uint16_t *) fStack; |
170 | for (i=0; i< fStackSize*2; i++) { |
170 | for (i=0; i< fStackSize*2; i++) { |
171 | if (i<maxn) stack[i]=u16Stack[i]; |
171 | if (i<maxn) stack[i]=u16Stack[i]; |
172 | else return -1; |
172 | else return -1; |
173 | } |
173 | } |
174 | return fStackSize*2; |
174 | return fStackSize*2; |
175 | } |
175 | } |
176 | 176 | ||
177 | int |
177 | int WIENER_VMUSB_StackGetUInt32(int maxn, uint32_t *stack) { |
178 | int i; |
178 | int i; |
179 | uint16_t * u16Stack = (uint16_t *) fStack; |
179 | uint16_t * u16Stack = (uint16_t *) fStack; |
180 | for (i=0; i< fStackSize*2; i++) { |
180 | for (i=0; i< fStackSize*2; i++) { |
181 | if (i<maxn) stack[i]=u16Stack[i]; |
181 | if (i<maxn) stack[i]=u16Stack[i]; |
182 | else return -1; |
182 | else return -1; |
Line 240... | Line 240... | ||
240 | printf("WUSBXX_stack_execute device not open\n"); |
240 | printf("WUSBXX_stack_execute device not open\n"); |
241 | return -1; |
241 | return -1; |
242 | } |
242 | } |
243 | uint16_t * exstack = (uint16_t *) wusbcc_stack; |
243 | uint16_t * exstack = (uint16_t *) wusbcc_stack; |
244 | exstack[0]=0; |
244 | exstack[0]=0; |
245 | nb = |
245 | nb = WIENER_VMUSB_StackGetUInt16(MAXSTACKSIZE, &exstack[1] ); |
246 | //printf("WUSBXX_stack_execute stack size %d\n", nb); |
246 | //printf("WUSBXX_stack_execute stack size %d\n", nb); |
247 | //WIENER_VMUSB_StackPrint(); |
247 | //WIENER_VMUSB_StackPrint(); |
248 | nb = xxusb_longstack_execute (dev, exstack, nb, 1000); |
248 | nb = xxusb_longstack_execute (dev, exstack, nb, 1000); |
249 | //DataBuffer(0 - (ReturnValue/2-1)) - (unsigned short)array of returned data when ReturnValue>0 |
249 | //DataBuffer(0 - (ReturnValue/2-1)) - (unsigned short)array of returned data when ReturnValue>0 |
250 | //printf("WUSBXX_stack_execute return size %d\n", nb); |
250 | //printf("WUSBXX_stack_execute return size %d\n", nb); |