src/drivers/printer/printer.c File Reference

#include <minix/endpoint.h>
#include "../drivers.h"

Go to the source code of this file.

Defines

#define ASSERT_STROBE   0x1D
#define NEGATE_STROBE   0x1C
#define PR_SELECT   0x0C
#define INIT_PRINTER   0x08
#define BUSY_STATUS   0x10
#define NO_PAPER   0x20
#define NORMAL_STATUS   0x90
#define ON_LINE   0x10
#define STATUS_MASK   0xB0
#define MAX_ONLINE_RETRIES   120

Functions

FORWARD _PROTOTYPE (void do_cancel,(message *m_ptr))
FORWARD _PROTOTYPE (void output_done,(void))
FORWARD _PROTOTYPE (void do_write,(message *m_ptr, int safe))
FORWARD _PROTOTYPE (void reply,(int code, int replyee, int proc, int status))
FORWARD _PROTOTYPE (int sef_cb_init_fresh,(int type, sef_init_info_t *info))
EXTERN _PROTOTYPE (void sef_cb_lu_prepare,(int state))
EXTERN _PROTOTYPE (int sef_cb_lu_state_isvalid,(int state))
PUBLIC void main (void)
PRIVATE void sef_local_startup ()
PRIVATE int sef_cb_init_fresh (int type, sef_init_info_t *info)
PRIVATE void do_signal ()
PRIVATE void do_write (message *m_ptr, int safe)
PRIVATE void output_done ()
PRIVATE void do_status (message *m_ptr)
PRIVATE void do_cancel (message *m_ptr)
PRIVATE void reply (int code, int replyee, int process, int status)
PRIVATE void do_initialize ()
PRIVATE void prepare_output ()
PRIVATE void do_printer_output ()

Variables

PRIVATE int caller
PRIVATE int revive_pending
PRIVATE int revive_status
PRIVATE int done_status
PRIVATE int oleft
PRIVATE unsigned char obuf [128]
PRIVATE unsigned char * optr
PRIVATE int orig_count
PRIVATE int port_base
PRIVATE int proc_nr
PRIVATE cp_grant_id_t grant_nr
PRIVATE int user_left
PRIVATE vir_bytes user_vir_g
PRIVATE vir_bytes user_vir_d
PRIVATE int user_safe
PUBLIC int writing
PRIVATE int irq_hook_id
int errno
PUBLIC int is_status_msg_expected = FALSE


Define Documentation

#define ASSERT_STROBE   0x1D

Definition at line 55 of file printer.c.

#define BUSY_STATUS   0x10

Definition at line 68 of file printer.c.

#define INIT_PRINTER   0x08

Definition at line 58 of file printer.c.

#define MAX_ONLINE_RETRIES   120

Definition at line 74 of file printer.c.

#define NEGATE_STROBE   0x1C

Definition at line 56 of file printer.c.

#define NO_PAPER   0x20

Definition at line 69 of file printer.c.

#define NORMAL_STATUS   0x90

Definition at line 70 of file printer.c.

#define ON_LINE   0x10

Definition at line 71 of file printer.c.

#define PR_SELECT   0x0C

Definition at line 57 of file printer.c.

#define STATUS_MASK   0xB0

Definition at line 72 of file printer.c.


Function Documentation

EXTERN _PROTOTYPE ( int  sef_cb_lu_state_isvalid,
(int state  
)

EXTERN _PROTOTYPE ( void  sef_cb_lu_prepare,
(int state  
)

FORWARD _PROTOTYPE ( int  sef_cb_init_fresh,
(int type, sef_init_info_t *info  
)

FORWARD _PROTOTYPE ( void  reply,
(int code, int replyee, int proc, int status  
)

FORWARD _PROTOTYPE ( void  do_write,
(message *m_ptr, int safe)   
)

FORWARD _PROTOTYPE ( void  output_done,
(void)   
)

FORWARD _PROTOTYPE ( void  do_cancel,
(message *m_ptr)   
)

PRIVATE void do_cancel ( message m_ptr  ) 

Definition at line 343 of file printer.c.

PRIVATE void do_initialize (  ) 

Definition at line 382 of file printer.c.

PRIVATE void do_printer_output (  ) 

Definition at line 439 of file printer.c.

PRIVATE void do_signal (  ) 

Definition at line 210 of file printer.c.

PRIVATE void do_status ( message m_ptr  ) 

Definition at line 321 of file printer.c.

PRIVATE void do_write ( message m_ptr,
int  safe 
)

Definition at line 226 of file printer.c.

PUBLIC void main ( void   ) 

Definition at line 129 of file printer.c.

PRIVATE void output_done (  ) 

Definition at line 281 of file printer.c.

PRIVATE void prepare_output (  ) 

Definition at line 413 of file printer.c.

PRIVATE void reply ( int  code,
int  replyee,
int  process,
int  status 
)

Definition at line 363 of file printer.c.

PRIVATE int sef_cb_init_fresh ( int  type,
sef_init_info_t info 
)

Definition at line 193 of file printer.c.

PRIVATE void sef_local_startup ( void   ) 

Definition at line 174 of file printer.c.


Variable Documentation

PRIVATE int caller

Definition at line 88 of file printer.c.

PRIVATE int done_status

Definition at line 91 of file printer.c.

int errno

Definition at line 70 of file rcp.c.

Definition at line 98 of file printer.c.

PRIVATE int irq_hook_id

Definition at line 104 of file printer.c.

PUBLIC int is_status_msg_expected = FALSE

Definition at line 124 of file printer.c.

PRIVATE unsigned char obuf[128]

Definition at line 93 of file printer.c.

PRIVATE int oleft

Definition at line 92 of file printer.c.

PRIVATE unsigned char* optr

Definition at line 94 of file printer.c.

PRIVATE int orig_count

Definition at line 95 of file printer.c.

PRIVATE int port_base

Definition at line 96 of file printer.c.

PRIVATE int proc_nr

Definition at line 97 of file printer.c.

PRIVATE int revive_pending

Definition at line 89 of file printer.c.

PRIVATE int revive_status

Definition at line 90 of file printer.c.

PRIVATE int user_left

Definition at line 99 of file printer.c.

PRIVATE int user_safe

Definition at line 102 of file printer.c.

Definition at line 101 of file printer.c.

Definition at line 100 of file printer.c.

PUBLIC int writing

Definition at line 103 of file printer.c.


Generated on Tue Mar 9 04:36:50 2010 for Minix by  doxygen 1.5.8