Changeset 8b655705 in mainline for uspace/srv/hw/bus/cuda_adb/cuda_adb.c
- Timestamp:
- 2011-04-15T19:38:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9dd730d1
- Parents:
- 6b9e85b (diff), b2fb47f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
r6b9e85b r8b655705 209 209 210 210 if (dev_addr < 0) { 211 ipc_answer_0(iid, EINVAL);211 async_answer_0(iid, EINVAL); 212 212 return; 213 213 } 214 214 215 215 /* Answer the IPC_M_CONNECT_ME_TO call. */ 216 ipc_answer_0(iid, EOK);216 async_answer_0(iid, EOK); 217 217 218 218 while (1) { … … 222 222 case IPC_M_PHONE_HUNGUP: 223 223 /* The other side has hung up. */ 224 ipc_answer_0(callid, EOK);224 async_answer_0(callid, EOK); 225 225 return; 226 226 case IPC_M_CONNECT_TO_ME: … … 245 245 break; 246 246 } 247 ipc_answer_0(callid, retval);247 async_answer_0(callid, retval); 248 248 } 249 249 } … … 276 276 cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_kernel)->ifr; 277 277 async_set_interrupt_received(cuda_irq_handler); 278 ipc_register_irq(10, device_assign_devno(), 0, &cuda_irq_code);278 register_irq(10, device_assign_devno(), 0, &cuda_irq_code); 279 279 280 280 /* Enable SR interrupt. */ … … 367 367 static void cuda_irq_rcv_end(void *buf, size_t *len) 368 368 { 369 uint8_t data,b;370 369 uint8_t b; 370 371 371 b = pio_read_8(&dev->b); 372 data =pio_read_8(&dev->sr);373 372 pio_read_8(&dev->sr); 373 374 374 if ((b & TREQ) == 0) { 375 375 instance->xstate = cx_receive; … … 379 379 cuda_send_start(); 380 380 } 381 382 383 381 382 memcpy(buf, instance->rcv_buf, instance->bidx); 383 *len = instance->bidx; 384 384 instance->bidx = 0; 385 385 }
Note:
See TracChangeset
for help on using the changeset viewer.