Пример #1
0
void swapBuff() {
	int i;
	long next, old;
	_farsetsel(my_video_ds);
	for (i = 0; i < 1024*768/4; i++) { 
		next = ((long*)doubleBuff)[i];
		old = ((long*)prevBuff)[i];
		if (next != old) {
			_farnspokel(i*4, next);
			((long*)prevBuff)[i] = next;
		}
	}	
}
Пример #2
0
static int Clear(SexyAL_device *device)
{
    CMI8738_Driver_t *ds = (CMI8738_Driver_t *)device->private_data;
    const uint32_t base = ds->dmabuf.rm_segment << 4;
    const uint32_t siz = ds->dmabuf.size << 4;

    Pause(device, true);

    _farsetsel(_dos_ds);
    for(unsigned i = 0; i < siz; i += 4)
        _farnspokel(base + i, 0);

    UpdateReadCounter(ds);
    ds->write_counter = ds->read_counter;

    return(1);
}