def write32(self, offset, value):
        """Write 32-bits to mapped physical memory, starting at the specified
        `offset`, in bytes, relative to the base physical address the MMIO
        object was opened with.

        Args:
            offset (int, long): offset from base physical address, in bytes.
            value (int, long): 32-bit value to write

        Raises:
            TypeError: if `offset` or `value` type are invalid.
            ValueError: if `offset` or `value` are out of bounds.

        """
        if not isinstance(offset, int) and not isinstance(offset, long):
            raise TypeError("Invalid offset type, should be integer.")
        if not isinstance(value, int) and not isinstance(value, long):
            raise TypeError("Invalid value type, should be integer.")
        if value < 0 or value > 0xffffffff:
            raise ValueError("Value out of bounds.")

        offset = self._adjust_offset(offset)
        self._validate_offset(offset, 4)
        ctypes.c_uint32.from_buffer(self.mapping, offset).value = value
dataset/ETHPy150Open vsergeev/python-periphery/periphery/mmio.py/MMIO.write32/original