Command controller to issue [count] bit transfers to the physicsl
        scan chain, with a constant TMS and TDI value, and reading back
        the returned TDO bits.

        Args:
            count (int) - Number of bits to read from TDO and write
                          to TMS/TDI
            TMS (bool) - constant value to write to TMS for each bit read
                         from TDO.
            TDI (bool) - constant value to write to TDI for each bit read
                         from TDO.

        Returns:
            Returns the response (bitarray) from the physical scanchain's
            TDO line.

        Usage:
            >>> from proteusisc import getAttachedControllers
            >>> c = getAttachedControllers()[0]
            >>> c.jtag_enable()
            >>> data = c.read_tdo_bits(32)
            >>> c.jtag_disable()

def read_tdo_bits(self, count, TMS=True, TDI=False):
        """
        Command controller to issue [count] bit transfers to the physicsl
        scan chain, with a constant TMS and TDI value, and reading back
        the returned TDO bits.

        Args:
            count (int) - Number of bits to read from TDO and write
                          to TMS/TDI
            TMS (bool) - constant value to write to TMS for each bit read
                         from TDO.
            TDI (bool) - constant value to write to TDI for each bit read
                         from TDO.

        Returns:
            Returns the response (bitarray) from the physical scanchain's
            TDO line.

        Usage:
            >>> from proteusisc import getAttachedControllers
            >>> c = getAttachedControllers()[0]
            >>> c.jtag_enable()
            >>> data = c.read_tdo_bits(32)
            >>> c.jtag_disable()
        """
        self._check_jtag()
        self._update_scanchain(bool(TMS))

        self.bulkCommandDefault(
            _BMSG_READ_TDO % (TMS, TDI, count.to_bytes(4, 'little')))
        res = self._read_tdo(count)
        self._get_adv_trans_stats(_BMSG_READ_TDO[2], True)
        return res