Changeset 6226 in vbox for trunk/src/VBox/Devices/Parallel
- Timestamp:
- Dec 31, 2007 11:41:21 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Parallel/DevParallel.cpp
r6223 r6226 192 192 break; 193 193 case 2: 194 /* *Set the reserved bits to one */194 /* Set the reserved bits to one */ 195 195 ch |= (LPT_CONTROL_BIT6 | LPT_CONTROL_BIT7); 196 196 if (ch != s->reg_control) { … … 299 299 s->act_fifo_pos_write++; 300 300 if (s->act_fifo_pos_write < LPT_ECP_FIFO_DEPTH) { 301 /* *FIFO has some data (clear both FIFO bits) */301 /* FIFO has some data (clear both FIFO bits) */ 302 302 s->reg_ecp_ecr &= ~(LPT_ECP_ECR_FIFO_EMPTY | LPT_ECP_ECR_FIFO_FULL); 303 303 } else { 304 /* *FIFO is full */305 /* *Clear FIFO empty bit */304 /* FIFO is full */ 305 /* Clear FIFO empty bit */ 306 306 s->reg_ecp_ecr &= ~LPT_ECP_ECR_FIFO_EMPTY; 307 /* *Set FIFO full bit */307 /* Set FIFO full bit */ 308 308 s->reg_ecp_ecr |= LPT_ECP_ECR_FIFO_FULL; 309 309 s->act_fifo_pos_write = 0; … … 317 317 break; 318 318 case 2: 319 /* *If we change the mode clear FIFO */319 /* If we change the mode clear FIFO */ 320 320 if ((ch & LPT_ECP_ECR_CHIPMODE_MASK) != (s->reg_ecp_ecr & LPT_ECP_ECR_CHIPMODE_MASK)) { 321 /* *reset the fifo */321 /* reset the fifo */ 322 322 s->act_fifo_pos_write = 0; 323 323 s->act_fifo_pos_read = 0; 324 /* *Set FIFO empty bit */324 /* Set FIFO empty bit */ 325 325 s->reg_ecp_ecr |= LPT_ECP_ECR_FIFO_EMPTY; 326 /* *Clear FIFO full bit */326 /* Clear FIFO full bit */ 327 327 s->reg_ecp_ecr &= ~LPT_ECP_ECR_FIFO_FULL; 328 328 } 329 /* *Set new mode */329 /* Set new mode */ 330 330 s->reg_ecp_ecr |= LPT_ECP_ECR_CHIPMODE_SET_BITS(LPT_ECP_ECR_CHIPMODE_GET_BITS(ch)); 331 331 break; … … 359 359 s->act_fifo_pos_read++; 360 360 if (s->act_fifo_pos_read == LPT_ECP_FIFO_DEPTH) 361 s->act_fifo_pos_read = 0; /* *end of FIFO, start at beginning */361 s->act_fifo_pos_read = 0; /* end of FIFO, start at beginning */ 362 362 if (s->act_fifo_pos_read == s->act_fifo_pos_write) { 363 /* *FIFO is empty */364 /* *Set FIFO empty bit */363 /* FIFO is empty */ 364 /* Set FIFO empty bit */ 365 365 s->reg_ecp_ecr |= LPT_ECP_ECR_FIFO_EMPTY; 366 /* *Clear FIFO full bit */366 /* Clear FIFO full bit */ 367 367 s->reg_ecp_ecr &= ~LPT_ECP_ECR_FIFO_FULL; 368 368 } else { 369 /* *FIFO has some data (clear all FIFO bits) */369 /* FIFO has some data (clear all FIFO bits) */ 370 370 s->reg_ecp_ecr &= ~(LPT_ECP_ECR_FIFO_EMPTY | LPT_ECP_ECR_FIFO_FULL); 371 371 } … … 816 816 } 817 817 818 /* *Set compatibility mode */818 /* Set compatibility mode */ 819 819 pData->pDrvHostParallelConnector->pfnSetMode(pData->pDrvHostParallelConnector, PDM_PARALLEL_PORT_MODE_COMPAT); 820 /* *Get status of control register */820 /* Get status of control register */ 821 821 pData->pDrvHostParallelConnector->pfnReadControl(pData->pDrvHostParallelConnector, &pData->reg_control); 822 822
Note:
See TracChangeset
for help on using the changeset viewer.