aboutsummaryrefslogtreecommitdiffstats
path: root/CodingStyle (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-01-13moved 'print list of drivers and plugins' to the end of configuremichael4-36/+27
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@957 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-12update copyrightmichux1-2/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@956 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-12additional verbose messagesvolker3-4/+18
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@955 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-12fix some compiler warningsmichux1-5/+5
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@954 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-11plugin_fifo: fix compile warningsmichux1-2/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@953 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-11drv_st2205u: add verbose error messagemichux1-1/+3
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@952 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-09version of linked serdisplib in long verbose outputvolker1-1/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@951 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-08hhdtemp plugin fixedmichael1-112/+84
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@950 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06hddtemp autconf bug fixedmichael2-2/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@949 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06compiler warnings fixedmichael1-3/+3
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@948 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06indentationmichael1-1/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@947 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06unused array 'tokenNames' removedmichael1-10/+0
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@946 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06compiler warning removedmichael1-1/+1
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@945 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06initialize plugin on first usemichael1-38/+56
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@944 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06indentationmichael1-2/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@943 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06initialize fifo on first usemichael1-13/+26
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@942 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-06cosmeticsmichael1-2/+0
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@941 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-04new string operators eq ne gt ge lt lemichael1-27/+98
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@940 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-04indentationmichael1-8/+8
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@939 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-04typo fixedmichael1-1/+1
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@938 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-04disable unimplemented ioctlsmichael1-8/+26
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@937 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-01distcheck bugs fixedmichael2-3/+6
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@936 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-01button debugging changedmichael1-3/+8
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@935 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2009-01-01widget_bar scale debugging changedmichael2-11/+9
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@934 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31add buttons to X11 sample confmichux1-0/+1
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@933 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31clear pixel to BG_COL (Ticket #117)michael1-1/+1
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@932 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31version bumped to 0.11.0michael4-15/+15
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@931 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31netinfo plugin added to smoketestmichael1-1/+1
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@930 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r847 (new Display CW12832 128x32) from volker_devmichael1-3/+5
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@929 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r846 from volker_devmichael1-6/+18
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@928 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r839 from volker_devmichael5-9/+88
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@927 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r838 from volker_devmichael1-18/+34
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@926 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r837 from volker_devmichael1-3/+18
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@925 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r835 from volker_devmichael1-6/+35
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@924 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31ported r834 from volker_devmichael1-3/+26
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@923 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31r828: 'additional verbose and info messages' ported from volker_devmichael2-3/+12
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@922 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31includes for umask() ported from volker_dev (r827)michael1-0/+2
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@921 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31handle config files with <CR><LF> (DOS line ending) ported from volker_dev ↵michael1-2/+6
(r826) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@920 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31netinfo plugin ported from volker_dev (r823)michael4-2/+255
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@919 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31format characters in qprintf() with optional length (r821) ported from ↵michael1-9/+63
volker_dev git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@918 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31short circuit evaluation ported from volker_dev (r820,r822,r824)michael1-8/+52
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@917 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-31Fixes a buffer underrun error and possible array index issues by mcarey@...michael1-6/+13
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@916 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-27ported r819 from volker_devmichael1-17/+21
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@915 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-27ported and modified r818 from volker_devmichael3-11/+151
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@914 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-27port r817 from volker_devmichael3-24/+944
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@913 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-27ported (modified) r815 from voker_devmichael1-3/+23
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@912 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-24cleanup & cosmeticsmichael5-22/+31
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@911 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-24driver for the PHAnderson serial-to-HD44780 adapter boards by Nicolas Weillmichael5-5/+444
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@910 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-24w1retap plugin by Jonathan Hudsonmichael7-0/+298
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@909 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
2008-12-24Enables/controls the backlight on the Pertelian LCD device by Jonathan Hudsonmichael1-10/+13
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@908 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
span class="kt">char SIGNAL_CE; static unsigned char SIGNAL_CD; static unsigned char SIGNAL_RD; static unsigned char SIGNAL_WR; // Fixme: static int bug=0; // perform normal status check void T6_status1 (void) { int n; // turn off data line drivers parport_direction (1); // lower CE and RD parport_control (SIGNAL_CE | SIGNAL_RD, 0); // Access Time: 150 ns ndelay(150); // wait for STA0=1 and STA1=1 n=0; do { rep_nop(); if (++n>1000) { debug("hang in status1"); bug=1; break; } } while ((parport_read() & 0x03) != 0x03); // rise RD and CE parport_control (SIGNAL_RD | SIGNAL_CE, SIGNAL_RD | SIGNAL_CE); // Output Hold Time: 50 ns ndelay(50); // turn on data line drivers parport_direction (0); } // perform status check in "auto mode" void T6_status2 (void) { int n; // turn off data line drivers parport_direction (1); // lower RD and CE parport_control (SIGNAL_RD | SIGNAL_CE, 0); // Access Time: 150 ns ndelay(150); // wait for STA3=1 n=0; do { rep_nop(); if (++n>1000) { debug("hang in status2"); bug=1; break; } } while ((parport_read() & 0x08) != 0x08); // rise RD and CE parport_control (SIGNAL_RD | SIGNAL_CE, SIGNAL_RD | SIGNAL_CE); // Output Hold Time: 50 ns ndelay(50); // turn on data line drivers parport_direction (0); } static void T6_write_cmd (unsigned char cmd) { // wait until the T6963 is idle T6_status1(); // put data on DB1..DB8 parport_data (cmd); // lower WR and CE parport_control (SIGNAL_WR | SIGNAL_CE, 0); // Pulse width ndelay(80); // rise WR and CE parport_control (SIGNAL_WR | SIGNAL_CE, SIGNAL_WR | SIGNAL_CE); // Data Hold Time ndelay(40); } static void T6_write_data (unsigned char data) { // wait until the T6963 is idle T6_status1(); // put data on DB1..DB8 parport_data (data); // lower C/D parport_control (SIGNAL_CD, 0); // C/D Setup Time ndelay(20); // lower WR and CE parport_control (SIGNAL_WR | SIGNAL_CE, 0); // Pulse Width ndelay(80); // rise WR and CE parport_control (SIGNAL_WR | SIGNAL_CE, SIGNAL_WR | SIGNAL_CE); // Data Hold Time ndelay(40); // rise CD parport_control (SIGNAL_CD, SIGNAL_CD); } static void T6_write_auto (unsigned char data) { // wait until the T6963 is idle T6_status2(); // put data on DB1..DB8 parport_data (data); // lower C/D parport_control (SIGNAL_CD, 0); // C/D Setup Time ndelay(20); // lower WR and CE parport_control (SIGNAL_WR | SIGNAL_CE, 0); // Pulse Width ndelay(80); // rise WR and CE parport_control (SIGNAL_WR | SIGNAL_CE, SIGNAL_WR | SIGNAL_CE); // Data Hold Time ndelay(40); // rise CD parport_control (SIGNAL_CD, SIGNAL_CD); } #if 0 // not used static void T6_send_byte (unsigned char cmd, unsigned char data) { T6_write_data(data); T6_write_cmd(cmd); } #endif static void T6_send_word (unsigned char cmd, unsigned short data) { T6_write_data(data&0xff); T6_write_data(data>>8); T6_write_cmd(cmd); } static void T6_memset(unsigned short addr, unsigned char data, int len) { int i; T6_send_word (0x24, addr); // Set Adress Pointer T6_write_cmd(0xb0); // Set Data Auto Write for (i=0; i<len; i++) { T6_write_auto(data); if (bug) { debug("bug occured at byte %d of %d", i, len); bug=0; } } T6_status2(); T6_write_cmd(0xb2); // Auto Reset } static void T6_memcpy(unsigned short addr, unsigned char *data, int len) { int i; T6_send_word (0x24, 0x0200+addr); // Set Adress Pointer T6_write_cmd(0xb0); // Set Data Auto Write for (i=0; i<len; i++) { T6_write_auto(*(data++)); if (bug) { debug("bug occured at byte %d of %d, addr=%d", i, len, addr); bug=0; } } T6_status2(); T6_write_cmd(0xb2); // Auto Reset } int T6_clear (int full) { int rows; if (full) { rows=(Lcd.rows>8 ? 8 : Lcd.rows); T6_memset(0x0000, 0, Lcd.cols*rows); // clear text area T6_memset(0x0200, 0, Lcd.cols*rows*8); // clear graphic area if (Lcd.rows>8) { T6_memset(0x8000, 0, Lcd.cols*(Lcd.rows-rows)); // clear text area #2 T6_memset(0x8200, 0, Lcd.cols*(Lcd.rows-rows)*8); // clear graphic area #2 } memset(Buffer1,0,Lcd.cols*Lcd.rows*Lcd.yres*sizeof(*Buffer1)); memset(Buffer2,0,Lcd.cols*Lcd.rows*Lcd.yres*sizeof(*Buffer2)); } return pix_clear(); } int T6_init (LCD *Self) { Lcd=*Self; if (pix_init (Lcd.rows, Lcd.cols, Lcd.xres, Lcd.yres)!=0) { error ("T6963: pix_init(%d, %d, %d, %d) failed", Lcd.rows, Lcd.cols, Lcd.xres, Lcd.yres); return -1; } if (cfg_number("Icons", 0, 0, 8, &Icons) < 0) return -1; if (Icons>0) { info ("allocating %d icons", Icons); icon_init(Lcd.rows, Lcd.cols, Lcd.xres, Lcd.yres, 8, Icons, pix_icon); Self->icons=Icons; Lcd.icons=Icons; } Buffer1=malloc(Lcd.cols*Lcd.rows*Lcd.yres); if (Buffer1==NULL) { error ("T6963: malloc(%d) failed: %s", Lcd.cols*Lcd.rows*Lcd.yres, strerror(errno)); return -1; } Buffer2=malloc(Lcd.cols*Lcd.rows*Lcd.yres); if (Buffer2==NULL) { error ("T6963: malloc(%d) failed: %s", Lcd.cols*Lcd.rows*Lcd.yres, strerror(errno)); return -1; } if ((SIGNAL_CE=parport_wire_ctrl ("CE", "STROBE"))==0xff) return -1; if ((SIGNAL_CD=parport_wire_ctrl ("CD", "SELECT"))==0xff) return -1; if ((SIGNAL_RD=parport_wire_ctrl ("RD", "AUTOFD"))==0xff) return -1; if ((SIGNAL_WR=parport_wire_ctrl ("WR", "INIT") )==0xff) return -1; if (parport_open() != 0) { error ("T6963: could not initialize parallel port!"); return -1; } // rise CE, CD, RD and WR parport_control (SIGNAL_CE | SIGNAL_CD | SIGNAL_RD | SIGNAL_WR, SIGNAL_CE | SIGNAL_CD | SIGNAL_RD | SIGNAL_WR); // set direction: write parport_direction (0); debug ("setting %d columns", Lcd.cols); T6_send_word (0x40, 0x0000); // Set Text Home Address T6_send_word (0x41, Lcd.cols); // Set Text Area T6_send_word (0x42, 0x0200); // Set Graphic Home Address T6_send_word (0x43, Lcd.cols); // Set Graphic Area T6_write_cmd (0x80); // Mode Set: OR mode, Internal CG RAM mode T6_send_word (0x22, 0x0002); // Set Offset Register T6_write_cmd (0x98); // Set Display Mode: Curser off, Text off, Graphics on T6_write_cmd (0xa0); // Set Cursor Pattern: 1 line cursor T6_send_word (0x21, 0x0000); // Set Cursor Pointer to (0,0) T6_clear(1); return 0; } int T6_put (int row, int col, char *text) { return pix_put(row,col,text); } int T6_bar (int type, int row, int col, int max, int len1, int len2) { return pix_bar(type,row,col,max,len1,len2); } int T6_icon (int num, int seq, int row, int col) { return icon_draw (num, seq, row, col); } int T6_flush (void) { int i, j, e; memset(Buffer1,0,Lcd.cols*Lcd.rows*Lcd.yres*sizeof(*Buffer1)); for (i=0; i<Lcd.cols*Lcd.rows*Lcd.yres; i++) { for (j=0; j<Lcd.xres; j++) { Buffer1[i]<<=1; if (LCDpixmap[i*Lcd.xres+j]) Buffer1[i]|=1; } } for (i=0; i<Lcd.cols*Lcd.rows*Lcd.yres; i++) { if (Buffer1[i]==Buffer2[i]) continue; for (j=i, e=0; i<Lcd.cols*Lcd.rows*Lcd.yres; i++) { if (Buffer1[i]==Buffer2[i]) { if (++e>4) break; } else { e=0; } } T6_memcpy (j, Buffer1+j, i-j-e+1); } memcpy(Buffer2,Buffer1,Lcd.cols*Lcd.rows*Lcd.yres*sizeof(*Buffer1)); return 0; } int T6_quit (void) { return parport_close(); } LCD T6963[] = { { name: "TLC1091", rows: 16, cols: 40, xres: 6, yres: 8, bars: BAR_L | BAR_R | BAR_U | BAR_D | BAR_H2 | BAR_V2 | BAR_T, icons: 0, gpos: 0, init: T6_init, clear: T6_clear, put: T6_put, bar: T6_bar, icon: T6_icon, gpo: NULL, flush: T6_flush, quit: T6_quit }, { name: "DMF5002N", rows: 14, cols: 16, xres: 8, yres: 8, bars: BAR_L | BAR_R | BAR_U | BAR_D | BAR_H2 | BAR_V2 | BAR_T, icons: 0, gpos: 0, init: T6_init, clear: T6_clear, put: T6_put, bar: T6_bar, icon: T6_icon, gpo: NULL, flush: T6_flush, quit: T6_quit }, { NULL } };