/* Reset adapter's CPU. */ static int reset_cyc2x(void __iomem *addr) { writeb(0, addr + RST_ENABLE); delay_cycx(2); writeb(0, addr + RST_DISABLE); delay_cycx(2); return memory_exists(addr); }
/* Reset adapter's CPU. */ static int reset_cyc2x(void __iomem *addr) { writeb(0, addr + RST_ENABLE); msleep_interruptible(2 * 1000); writeb(0, addr + RST_DISABLE); msleep_interruptible(2 * 1000); return memory_exists(addr); }
/* Reset adapter's CPU. */ static int reset_cyc2x(u32 addr) { cyc2x_writeb(0, addr + RST_ENABLE); delay_cycx(2); cyc2x_writeb(0, addr + RST_DISABLE); delay_cycx(2); return memory_exists(addr); }
int memory_save(char *adresse, void *data, int l) { FONTCHARACTER *adr = memory_char2font(adresse); int x=0, handle; if(memory_exists(adresse)) x = Bfile_DeleteFile(adr); if(x<0) { memory_error("save()","DeleteFile()",x); free(adr); return x; } x = Bfile_CreateFile(adr,l+1); if(x<0) { memory_error("save()","CreateFile()",x); free(adr); return x; } handle = Bfile_OpenFile(adr,0x02); if(handle<0) { memory_error("save()","OpenFile()",handle); free(adr); return handle; } x = memory_writefile(handle,data,l); if(x<0) { memory_error("save()","WriteFile()",x); free(adr); return x; } memory_closefile(handle); free(adr); return 0; }
/* Detect Cyclom 2x adapter. * Following tests are used to detect Cyclom 2x adapter: * to be completed based on the tests done below * Return 1 if detected o.k. or 0 if failed. * Note: This test is destructive! Adapter will be left in shutdown * state after the test. */ static int detect_cyc2x(void __iomem *addr) { reset_cyc2x(addr); return memory_exists(addr); }
/* Detect Cyclom 2x adapter. * Following tests are used to detect Cyclom 2x adapter: * to be completed based on the tests done below * Return 1 if detected o.k. or 0 if failed. * Note: This test is destructive! Adapter will be left in shutdown * state after the test. */ static int detect_cyc2x(u32 addr) { reset_cyc2x(addr); return memory_exists(addr); }