From: Marcus M. <cod...@gm...> - 2012-02-20 23:02:29
|
Hello, motivated and supported by Robert Resch I wrote a lcd4linux driver to run a Futaba VFD M402SD06GL (bought mine in 2005, 40x2 chars) on the parallel port. The diff file is attached to this mail. Due C is not my native language, I need a code review. At the moment the VFD shows no errors, but on the terminal the error message... unable to compact bar characters nSegment=3 fSegment=2 CHARS=0 ICONS=0 Segment[0].val1=0 val2=0 Segment[1].val1=255 val2=255 Segment[2].val1=5 val2=1 ... is shown (with variable values). What's to do? Beside this I've some questions/concerns: 0. I'd like to install a switch on the 5V wire. By connecting the 5V with a status pin (using a 1-10kOhm resistor) I could check in the drivers write function if the VFD is switched off and ignore the commands in this case. But how can I get informed and rewrite all widgets when the VFD is switched on? 1. The driver name might be confusing because current Futaba VFDs seems to run with the HD44780 driver (as LCD emulators). 2. The VFD supports no user defined chars or icons. So I made drv_generic_text_real_defchar do nothing or should it point to NULL? 3. Char values below 0x20 are controll data (goto, reset, dim...). Should they be filtered (or replaced by blanks) in the write function? 4. Do I have to add drv_generic_parport_hardwire_ctrl for D0-7? 5. What's the meaning of the first three arguments (val1,val2,dir) of drv_generic_text_bar_add_segment and how must they to be 'constructed'? 6. Should I delete or comment out all the icon lines? Thanks for your help. Regards Marcus -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://www.gmx.net/de/go/freephone/ |