summaryrefslogtreecommitdiff
path: root/drivers/pd3000.pl
blob: a73ae932a02c4cfe7787de2fe524ab8086f13ca0 (plain)
  1. #
  2. ######################################################################
  3. # LedgerSMB Accounting and ERP
  4. # http://www.ledgersmb.org/
  5. #
  6. # Copyright (C) 2006
  7. # This work contains copyrighted information from a number of sources all used
  8. # with permission.
  9. #
  10. # This file contains source code included with or based on SQL-Ledger which
  11. # is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
  12. # under the GNU General Public License version 2 or, at your option, any later
  13. # version. For a full list including contact information of contributors,
  14. # maintainers, and copyright holders, see the CONTRIBUTORS file.
  15. # Driver for Logic Controls PD-3000 Pole Display.
  16. # As with all pole display drivers, the control codes are contained in a hash
  17. # array called $pd_control.
  18. # THis pole display uses separate meanings for LF and CR. Both are included.
  19. # LF moves the cursor to the other line (same position), while CR moves the
  20. # cursor to the left-most spot (same line). Assume most PD's do this.
  21. # Most of this is simple ASCII, but what to make things clear.
  22. # This first part is straight from the manual.
  23. # Not including the bit about installing fonts.
  24. %pd_control = (
  25. 'mode_vscroll' => pack('C', 18),
  26. 'mode_normal' => pack('C', 17),
  27. 'bright_full' => pack('CC', 4, 0xFF),
  28. 'bright_high' => pack('CC', 4, 0x60),
  29. 'bright_med' => pack('CC', 4, 0x40),
  30. 'bright_low' => pack('CC', 4, 0x20),
  31. 'backspace' => pack('C', 8),
  32. 'htab' => pack('C', 9), # Functions like cursor movement
  33. 'lf' => pack('C', 0x0A),
  34. 'cr' => pack('C', 0x0D),
  35. 'digit_select' => pack('C', 0x10), # Pack followed by a number 0-39
  36. 'cursor_on' => pack('C', 0x13),
  37. 'cursor_off' => pack('C', 0x14),
  38. 'reset' => pack('C', 0x1F),
  39. 'scroll_message' => pack ('C', 0x05), # Followed by up to 45 chars.
  40. );
  41. # A few more useful control sequences:
  42. $pd_control{'new_line'} = $pd_control{'cr'}.$pd_control{'lf'};