A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://technical.swissmicros.com/dmcp/doc/DMCP-ifc-html/group__printer.html below:

DMCP interface: Printer

IR printer functions. More...

#define  PRINT_GRA_LN   1   Graphics line type for printer buffer emulation.
  #define  PRINT_TXT_LN   0   Text line type for printer buffer emulation.
  #define  MAX_82240_WIDTH   166   Printer line width (pixels)
  #define  DFLT_82240_LINE_DUR   1800   Default line print delay.
 

IR printer functions.

At this time supports HP-82240 compatible printers only.

Printer Buffer Management

The "printer buffer" here denotes the buffer inside HP-82240 printer.

DMCP supports delay timers, but application has to handle delays according to the printer usage.

Note that IR printer is unidirectional device and all buffer timing is based on estimates. Use printer_set_delay to fine-tune line delay.

Function printer_busy_for (ln_type), where ln_type is
PRINT_GRA_LN - waits until whole printer buffer is empty
PRINT_TXT_LN - waits until plain text line (25 characters) fits into printer buffer

Function printer_advance_buf (ln_type) updates printer buffer timers

Code example for blocking approach (pr_buf contains single line with pr_len bytes of data to print)

}

for(x=0; x<pr_len; x++)

#define PRINT_TXT_LN

Text line type for printer buffer emulation.

Definition dmcp.h:1763

void print_byte(uint8_t b)

Send byte to printer.

#define PRINT_GRA_LN

Graphics line type for printer buffer emulation.

Definition dmcp.h:1762

void printer_advance_buf(int what)

Add line type to printer buffer emulation.

int printer_busy_for(int what)

Wait until printer buffer is free for given line type.

◆ print_buffer() void print_buffer ( uint8_t * buf, int cnt )

Send bytes to printer.

Bytes are sent directly to IR port.

Parameters
buf Bytes to send cnt Number of bytes to send
◆ print_byte() void print_byte ( uint8_t b )

Send byte to printer.

Byte is sent directly to IR port.

Parameters
◆ print_is_ready()

Check whether IR hw is ready for send.

Returns
(0/1) 1 = IR hw is ready
◆ printer_advance_buf() void printer_advance_buf ( int what ) ◆ printer_busy_for() int printer_busy_for ( int what ) ◆ printer_get_delay() uint printer_get_delay ( )

Returns current printer line delay.

Returns
[ms] Printer line delay
◆ printer_set_delay() void printer_set_delay ( uint val )

Sets printer line delay.

Parameters
val [ms] Printer line delay

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4