xheep_gen.peripherals.user_peripherals_domain module

class xheep_gen.peripherals.user_peripherals_domain.UserPeripheralDomain(start_address: int = 805306368, length: int = 1048576)

Bases: PeripheralDomain

Domain for user peripherals. All user peripherals must be added.

Start address : 0x30000000 Length : 0x00100000

add_peripheral(peripheral: UserPeripheral)

Add a peripheral to the domain if it is a UserPeripheral. If not, raise an error.

Parameters:

peripheral (UserPeripheral) – The peripheral to add.

get_pdm2pcm()

Get the PDM2PCM peripheral. Assumes only one PDM2PCM peripheral is added. If multiple PDM2PCM peripherals are added, only the first added one will be returned.

Returns:

The PDM2PCM peripheral.

remove_peripheral(peripheral: UserPeripheral)

Remove a peripheral from the domain if it is a UserPeripheral.

Parameters:

peripheral (UserPeripheral) – The peripheral to remove.