note description: "[ A parallel port's write-only control register. ]" legal : "See notice at end of class." status : "See notice at end of class."; author : "Paul Bates (paul.a.bates@gmail.com)" date : "$Date$" revision: "$Revision$" frozen class PRT_PARALLEL_CONTROL_REGISTER inherit PRT_PARALLEL_REGISTER rename bit_0 as strobe, bit_1 as auto_line_feed, bit_2 as initialize_printer, bit_3 as select_printer, bit_4 as irq_via_ack_line, bit_5 as bi_directional, set_bit_0 as set_strobe, set_bit_1 as set_auto_line_feed, set_bit_2 as set_initialize_printer, set_bit_3 as set_select_printer, set_bit_4 as set_irq_via_ack_line, set_bit_5 as set_bi_directional export {NONE} bit_6, bit_7, set_bit_6, set_bit_7 redefine is_readable, strobe, auto_line_feed, initialize_printer, select_printer, irq_via_ack_line, bi_directional, set_strobe, set_auto_line_feed, set_initialize_printer, set_select_printer, set_irq_via_ack_line, set_bi_directional end create {PRT_PARALLEL_CONNECTION} make feature -- Access data_bit_mask: NATURAL_8 = 0b00001111 -- type: attached PRT_PARALLEL_REGISTER_TYPE -- once Result := {PRT_PARALLEL_REGISTER_TYPE}.control end feature -- Status report frozen is_readable: BOOLEAN -- once Result := False end strobe: BOOLEAN assign set_strobe -- Will a stobe signal be send on the next call to `flush'? -- Note: This value only represents the register state held in memory. The control register is -- read-only. do Result := Precursor end auto_line_feed: BOOLEAN assign set_auto_line_feed -- Will auto-line feed be enabled on the next call to `flush'? -- Note: This value only represents the register state held in memory. The control register is -- read-only. do Result := Precursor end initialize_printer: BOOLEAN assign set_initialize_printer -- Will the printer initialized on the next call to `flush'? -- Note: This value only represents the register state held in memory. The control register is -- read-only. do Result := Precursor end select_printer: BOOLEAN assign set_select_printer -- Will the printer be selected on the next call to `flush'? -- Note: This value only represents the register state held in memory. The control register is -- read-only. do Result := Precursor end irq_via_ack_line: BOOLEAN assign set_irq_via_ack_line -- Will IRQ be enabled via Ack Line on the next call to `flush'? -- Note: This value only represents the register state held in memory. The control register is -- read-only. do Result := Precursor end bi_directional: BOOLEAN assign set_bi_directional -- Will the port bi-direction be enabled on the next call to `flush'? -- Note: This value only represents the register state held in memory. The control register is -- read-only. do Result := Precursor end feature -- Status setting set_strobe (a_set: BOOLEAN) -- Sets a stobe signal be send on the next call to `flush'. -- Note: Be sure to call `flush' to send any changes to the register. do Precursor (a_set) end set_auto_line_feed (a_set: BOOLEAN) -- Sets auto-line feed be enabled on the next call to `flush'. -- Note: Be sure to call `flush' to send any changes to the register. do Precursor (a_set) end set_initialize_printer (a_set: BOOLEAN) -- Sets the printer initialized on the next call to `flush'. -- Note: Be sure to call `flush' to send any changes to the register. do Precursor (a_set) end set_select_printer (a_set: BOOLEAN) -- Sets the printer be selected on the next call to `flush'. -- Note: Be sure to call `flush' to send any changes to the register. do Precursor (a_set) end set_irq_via_ack_line (a_set: BOOLEAN) -- Sets IRQ be enabled via Ack Line on the next call to `flush'. -- Note: Be sure to call `flush' to send any changes to the register. do Precursor (a_set) end set_bi_directional (a_set: BOOLEAN) -- Sets the port bi-direction be enabled on the next call to `flush'. -- Note: Be sure to call `flush' to send any changes to the register. do Precursor (a_set) end end