def _get_spi_control_byte(self, read_write_cmd):
<EOL>board_addr_pattern = (self.hardware_addr << <NUM_LIT:1>) & <NUM_LIT><EOL>rw_cmd_pattern = read_write_cmd & <NUM_LIT:1>  <EOL>return <NUM_LIT> | board_addr_pattern | rw_cmd_pattern<EOL>
Returns an SPI control byte.

        The MCP23S17 is a slave SPI device. The slave address contains
        four fixed bits and three user-defined hardware address bits
        (if enabled via IOCON.HAEN) (pins A2, A1 and A0) with the
        read/write bit filling out the control byte::

            +--------------------+
            |0|1|0|0|A2|A1|A0|R/W|
            +--------------------+
             7 6 5 4 3  2  1   0

        :param read_write_cmd: Read or write command.
        :type read_write_cmd: int