Memory layout of a data structure: Difference between revisions
Content deleted Content added
Line 130: | Line 130: | ||
method ring_indicator = BitSet.is_set d 8 |
method ring_indicator = BitSet.is_set d 8 |
||
method set_carrier_detect b = if b then BitSet.is_set |
method set_carrier_detect b = (if b then BitSet.is_set else BitSet.unset) d 0 |
||
method set_received_data b = if b then BitSet.is_set |
method set_received_data b = (if b then BitSet.is_set else BitSet.unset) d 1 |
||
method set_transmitted_data b = if b then BitSet.is_set |
method set_transmitted_data b = (if b then BitSet.is_set else BitSet.unset) d 2 |
||
method set_data_terminal_ready b = if b then BitSet.is_set |
method set_data_terminal_ready b = (if b then BitSet.is_set else BitSet.unset) d 3 |
||
method set_signal_ground b = if b then BitSet.is_set |
method set_signal_ground b = (if b then BitSet.is_set else BitSet.unset) d 4 |
||
method set_data_set_ready b = if b then BitSet.is_set |
method set_data_set_ready b = (if b then BitSet.is_set else BitSet.unset) d 5 |
||
method set_request_to_send b = if b then BitSet.is_set |
method set_request_to_send b = (if b then BitSet.is_set else BitSet.unset) d 6 |
||
method set_clear_to_send b = if b then BitSet.is_set |
method set_clear_to_send b = (if b then BitSet.is_set else BitSet.unset) d 7 |
||
method set_ring_indicator b = if b then BitSet.is_set |
method set_ring_indicator b = (if b then BitSet.is_set else BitSet.unset) d 8 |
||
end |
end |
||
;;</ocaml> |
;;</ocaml> |