Rev 11 | Rev 14 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11 | Rev 13 | ||
---|---|---|---|
Line 224... | Line 224... | ||
224 | size_t count = (size_t)(ulElementCount * ubAccessWidth); |
224 | size_t count = (size_t)(ulElementCount * ubAccessWidth); |
225 | ssize_t result; |
225 | ssize_t result; |
226 | int error; |
226 | int error; |
227 | long pos; |
227 | long pos; |
228 | 228 | ||
229 |
|
229 | // printf("VMEread: AW 0x%0x 0x%0x , AM 0x%0x \n", dev->cAccessWidth, ubAccessWidth, dev->cAddressModifier); |
230 | if (dev->cAccessWidth != ubAccessWidth) |
230 | if (dev->cAccessWidth != ubAccessWidth) |
231 | { |
231 | { |
232 | if ((error = setAccessProperties(nHandle, dev->cAddressModifier, ubAccessWidth))) |
232 | if ((error = setAccessProperties(nHandle, dev->cAddressModifier, ubAccessWidth))) |
233 | return error; |
233 | return error; |
234 | } |
234 | } |
Line 246... | Line 246... | ||
246 | //return errno; |
246 | //return errno; |
247 | } |
247 | } |
248 | 248 | ||
249 | 249 | ||
250 | result = read(dev->nFileNo, pvBuffer, count); |
250 | result = read(dev->nFileNo, pvBuffer, count); |
251 |
|
251 | // printf("VMEread: read %d dev->nFileNo=%d err=%d %s\n",count, dev->nFileNo, errno, strerror(errno)); |
252 | if (result != count) |
252 | if (result != count) |
253 | { |
253 | { |
254 | if (result < 0) |
254 | if (result < 0) |
255 | { |
255 | { |
256 | dev->nLastError = errno; |
256 | dev->nLastError = errno; |
Line 269... | Line 269... | ||
269 | size_t count = (size_t)(ulElementCount * ubAccessWidth); |
269 | size_t count = (size_t)(ulElementCount * ubAccessWidth); |
270 | ssize_t result; |
270 | ssize_t result; |
271 | int error; |
271 | int error; |
272 | long pos; |
272 | long pos; |
273 | 273 | ||
274 |
|
274 | // printf("VMEwrite: AW 0x%0x 0x%0x , AM 0x%0x \n", dev->cAccessWidth, ubAccessWidth, dev->cAddressModifier); |
275 | if (dev->cAccessWidth != ubAccessWidth) |
275 | if (dev->cAccessWidth != ubAccessWidth) |
276 | { |
276 | { |
277 | if ((error = setAccessProperties(nHandle, dev->cAddressModifier, ubAccessWidth))) |
277 | if ((error = setAccessProperties(nHandle, dev->cAddressModifier, ubAccessWidth))) |
278 | return error; |
278 | return error; |
279 | } |
279 | } |
Line 289... | Line 289... | ||
289 | case ENXIO:printf("errno =ENXIO\n");break; |
289 | case ENXIO:printf("errno =ENXIO\n");break; |
290 | } |
290 | } |
291 | //return errno; |
291 | //return errno; |
292 | } |
292 | } |
293 | result = write(dev->nFileNo, pvBuffer, count); |
293 | result = write(dev->nFileNo, pvBuffer, count); |
294 |
|
294 | // printf("VMEwrite: write %d dev->nFileNo=%d err=%d %s\n",count, dev->nFileNo,errno, strerror(errno)); |
295 | if (result != count) |
295 | if (result != count) |
296 | { |
296 | { |
297 | if (result < 0) |
297 | if (result < 0) |
298 | { |
298 | { |
299 | dev->nLastError = errno; |
299 | dev->nLastError = errno; |