# Generated by ./sydney_gen_resets_tcl.sh from soc/BP200-BU-00000-r1p0-00rel0/software/cmsis/Device/ARM/CMSDK_CM0/Include/base_addr.h

source [find regs/all_regs.tcl]

proc parse_id { id } {
    set c0 [expr [expr $id & 0xff000000] >> 24]
    set c1 [expr [expr $id & 0x00ff0000] >> 16]
    set c2 [expr [expr $id & 0x0000ff00] >> 8]
    set c3 [expr [expr $id & 0x000000ff] >> 0]
    format "%c%c%c%c" $c0 $c1 $c2 $c3
}

proc enable_pwm {} {
    global CMSDK_WRPR_APB6_CTRL
    mww $CMSDK_WRPR_APB6_CTRL 0x00000001
}

proc disable_pwm {} {
    global CMSDK_WRPR_APB6_CTRL
    mww $CMSDK_WRPR_APB6_CTRL 0x00000000
}

proc reset_pwm {} {
    global CMSDK_WRPR_APB6_CTRL
    mww $CMSDK_WRPR_APB6_CTRL 0x00000002
}

proc getid_pwm {} {
    enable_pwm
    global CMSDK_PWM_CORE_ID
    parse_id [mrw $CMSDK_PWM_CORE_ID]
}

proc enable_spi0 {} {
    global CMSDK_WRPR_APB7_CTRL
    mww $CMSDK_WRPR_APB7_CTRL 0x00000001
}

proc disable_spi0 {} {
    global CMSDK_WRPR_APB7_CTRL
    mww $CMSDK_WRPR_APB7_CTRL 0x00000000
}

proc reset_spi0 {} {
    global CMSDK_WRPR_APB7_CTRL
    mww $CMSDK_WRPR_APB7_CTRL 0x00000002
}

proc getid_spi0 {} {
    enable_spi0
    global CMSDK_SPI0_CORE_ID
    parse_id [mrw $CMSDK_SPI0_CORE_ID]
}

proc enable_oled {} {
    global CMSDK_WRPR_APB9_CTRL
    mww $CMSDK_WRPR_APB9_CTRL 0x00000001
}

proc disable_oled {} {
    global CMSDK_WRPR_APB9_CTRL
    mww $CMSDK_WRPR_APB9_CTRL 0x00000000
}

proc reset_oled {} {
    global CMSDK_WRPR_APB9_CTRL
    mww $CMSDK_WRPR_APB9_CTRL 0x00000002
}

proc getid_oled {} {
    enable_oled
    global CMSDK_OLED_CORE_ID
    parse_id [mrw $CMSDK_OLED_CORE_ID]
}

proc enable_ksm {} {
    global CMSDK_WRPR_APB10_CTRL
    mww $CMSDK_WRPR_APB10_CTRL 0x00000001
}

proc disable_ksm {} {
    global CMSDK_WRPR_APB10_CTRL
    mww $CMSDK_WRPR_APB10_CTRL 0x00000000
}

proc reset_ksm {} {
    global CMSDK_WRPR_APB10_CTRL
    mww $CMSDK_WRPR_APB10_CTRL 0x00000002
}

proc getid_ksm {} {
    enable_ksm
    global CMSDK_KSM_CORE_ID
    parse_id [mrw $CMSDK_KSM_CORE_ID]
}

proc enable_spi2 {} {
    global CMSDK_WRPR_APB11_CTRL
    mww $CMSDK_WRPR_APB11_CTRL 0x00000001
}

proc disable_spi2 {} {
    global CMSDK_WRPR_APB11_CTRL
    mww $CMSDK_WRPR_APB11_CTRL 0x00000000
}

proc reset_spi2 {} {
    global CMSDK_WRPR_APB11_CTRL
    mww $CMSDK_WRPR_APB11_CTRL 0x00000002
}

proc getid_spi2 {} {
    enable_spi2
    global CMSDK_SPI2_CORE_ID
    parse_id [mrw $CMSDK_SPI2_CORE_ID]
}

proc enable_qdec {} {
    global CMSDK_WRPR_APB12_CTRL
    mww $CMSDK_WRPR_APB12_CTRL 0x00000001
}

proc disable_qdec {} {
    global CMSDK_WRPR_APB12_CTRL
    mww $CMSDK_WRPR_APB12_CTRL 0x00000000
}

proc reset_qdec {} {
    global CMSDK_WRPR_APB12_CTRL
    mww $CMSDK_WRPR_APB12_CTRL 0x00000002
}

proc getid_qdec {} {
    enable_qdec
    global CMSDK_QDEC_CORE_ID
    parse_id [mrw $CMSDK_QDEC_CORE_ID]
}

proc enable_spi1 {} {
    global CMSDK_WRPR_APB13_CTRL
    mww $CMSDK_WRPR_APB13_CTRL 0x00000001
}

proc disable_spi1 {} {
    global CMSDK_WRPR_APB13_CTRL
    mww $CMSDK_WRPR_APB13_CTRL 0x00000000
}

proc reset_spi1 {} {
    global CMSDK_WRPR_APB13_CTRL
    mww $CMSDK_WRPR_APB13_CTRL 0x00000002
}

proc getid_spi1 {} {
    enable_spi1
    global CMSDK_SPI1_CORE_ID
    parse_id [mrw $CMSDK_SPI1_CORE_ID]
}

proc enable_slwtimer {} {
    global CMSDK_WRPR_APB14_CTRL
    mww $CMSDK_WRPR_APB14_CTRL 0x00000001
}

proc disable_slwtimer {} {
    global CMSDK_WRPR_APB14_CTRL
    mww $CMSDK_WRPR_APB14_CTRL 0x00000000
}

proc reset_slwtimer {} {
    global CMSDK_WRPR_APB14_CTRL
    mww $CMSDK_WRPR_APB14_CTRL 0x00000002
}

proc getid_slwtimer {} {
    enable_slwtimer
    global CMSDK_SLWTIMER_CORE_ID
    parse_id [mrw $CMSDK_SLWTIMER_CORE_ID]
}

proc enable_qspi {} {
    global CMSDK_WRPR_APB15_CTRL
    mww $CMSDK_WRPR_APB15_CTRL 0x00000001
}

proc disable_qspi {} {
    global CMSDK_WRPR_APB15_CTRL
    mww $CMSDK_WRPR_APB15_CTRL 0x00000000
}

proc reset_qspi {} {
    global CMSDK_WRPR_APB15_CTRL
    mww $CMSDK_WRPR_APB15_CTRL 0x00000002
}

proc getid_qspi {} {
    enable_qspi
    global CMSDK_QSPI_CORE_ID
    parse_id [mrw $CMSDK_QSPI_CORE_ID]
}

proc enable_i2c0 {} {
    global CMSDK_WRPR1_APB0_CTRL
    mww $CMSDK_WRPR1_APB0_CTRL 0x00000001
}

proc disable_i2c0 {} {
    global CMSDK_WRPR1_APB0_CTRL
    mww $CMSDK_WRPR1_APB0_CTRL 0x00000000
}

proc reset_i2c0 {} {
    global CMSDK_WRPR1_APB0_CTRL
    mww $CMSDK_WRPR1_APB0_CTRL 0x00000002
}

proc getid_i2c0 {} {
    enable_i2c0
    global CMSDK_I2C0_ID
    parse_id [mrw $CMSDK_I2C0_ID]
}

proc enable_i2c1 {} {
    global CMSDK_WRPR1_APB1_CTRL
    mww $CMSDK_WRPR1_APB1_CTRL 0x00000001
}

proc disable_i2c1 {} {
    global CMSDK_WRPR1_APB1_CTRL
    mww $CMSDK_WRPR1_APB1_CTRL 0x00000000
}

proc reset_i2c1 {} {
    global CMSDK_WRPR1_APB1_CTRL
    mww $CMSDK_WRPR1_APB1_CTRL 0x00000002
}

proc getid_i2c1 {} {
    enable_i2c1
    global CMSDK_I2C1_ID
    parse_id [mrw $CMSDK_I2C1_ID]
}

proc enable_nvm {} {
    global CMSDK_WRPR1_APB2_CTRL
    mww $CMSDK_WRPR1_APB2_CTRL 0x00000001
}

proc disable_nvm {} {
    global CMSDK_WRPR1_APB2_CTRL
    mww $CMSDK_WRPR1_APB2_CTRL 0x00000000
}

proc reset_nvm {} {
    global CMSDK_WRPR1_APB2_CTRL
    mww $CMSDK_WRPR1_APB2_CTRL 0x00000002
}

proc getid_nvm {} {
    enable_nvm
    global CMSDK_NVM_ID
    parse_id [mrw $CMSDK_NVM_ID]
}

proc enable_rif {} {
    global CMSDK_WRPR1_APB4_CTRL
    mww $CMSDK_WRPR1_APB4_CTRL 0x00000001
}

proc disable_rif {} {
    global CMSDK_WRPR1_APB4_CTRL
    mww $CMSDK_WRPR1_APB4_CTRL 0x00000000
}

proc reset_rif {} {
    global CMSDK_WRPR1_APB4_CTRL
    mww $CMSDK_WRPR1_APB4_CTRL 0x00000002
}

proc getid_rif {} {
    enable_rif
    global CMSDK_RIF_ID
    parse_id [mrw $CMSDK_RIF_ID]
}

proc enable_radio {} {
    global CMSDK_WRPR1_APB5_CTRL
    mww $CMSDK_WRPR1_APB5_CTRL 0x00000001
}

proc disable_radio {} {
    global CMSDK_WRPR1_APB5_CTRL
    mww $CMSDK_WRPR1_APB5_CTRL 0x00000000
}

proc reset_radio {} {
    global CMSDK_WRPR1_APB5_CTRL
    mww $CMSDK_WRPR1_APB5_CTRL 0x00000002
}

proc getid_radio {} {
    enable_radio
    global CMSDK_RADIO_CORE_ID
    parse_id [mrw $CMSDK_RADIO_CORE_ID]
}

proc enable_mdm {} {
    global CMSDK_WRPR1_APB6_CTRL
    mww $CMSDK_WRPR1_APB6_CTRL 0x00000001
}

proc disable_mdm {} {
    global CMSDK_WRPR1_APB6_CTRL
    mww $CMSDK_WRPR1_APB6_CTRL 0x00000000
}

proc reset_mdm {} {
    global CMSDK_WRPR1_APB6_CTRL
    mww $CMSDK_WRPR1_APB6_CTRL 0x00000002
}

proc getid_mdm {} {
    enable_mdm
    global CMSDK_MDM_CORE_ID
    parse_id [mrw $CMSDK_MDM_CORE_ID]
}

proc enable_pmu {} {
    global CMSDK_WRPR1_APB7_CTRL
    mww $CMSDK_WRPR1_APB7_CTRL 0x00000001
}

proc disable_pmu {} {
    global CMSDK_WRPR1_APB7_CTRL
    mww $CMSDK_WRPR1_APB7_CTRL 0x00000000
}

proc reset_pmu {} {
    global CMSDK_WRPR1_APB7_CTRL
    mww $CMSDK_WRPR1_APB7_CTRL 0x00000002
}

proc getid_pmu {} {
    enable_pmu
    global CMSDK_PMU_CORE_ID
    parse_id [mrw $CMSDK_PMU_CORE_ID]
}

proc enable_pseq {} {
    global CMSDK_WRPR1_APB8_CTRL
    mww $CMSDK_WRPR1_APB8_CTRL 0x00000001
}

proc disable_pseq {} {
    global CMSDK_WRPR1_APB8_CTRL
    mww $CMSDK_WRPR1_APB8_CTRL 0x00000000
}

proc reset_pseq {} {
    global CMSDK_WRPR1_APB8_CTRL
    mww $CMSDK_WRPR1_APB8_CTRL 0x00000002
}

proc getid_pseq {} {
    enable_pseq
    global CMSDK_PSEQ_CORE_ID
    parse_id [mrw $CMSDK_PSEQ_CORE_ID]
}

proc enable_swd {} {
    global CMSDK_WRPR1_APB9_CTRL
    mww $CMSDK_WRPR1_APB9_CTRL 0x00000001
}

proc disable_swd {} {
    global CMSDK_WRPR1_APB9_CTRL
    mww $CMSDK_WRPR1_APB9_CTRL 0x00000000
}

proc reset_swd {} {
    global CMSDK_WRPR1_APB9_CTRL
    mww $CMSDK_WRPR1_APB9_CTRL 0x00000002
}

proc getid_swd {} {
    enable_swd
    global CMSDK_SWD_CORE_ID
    parse_id [mrw $CMSDK_SWD_CORE_ID]
}

proc enable_gadc {} {
    global CMSDK_WRPR1_APB10_CTRL
    mww $CMSDK_WRPR1_APB10_CTRL 0x00000001
}

proc disable_gadc {} {
    global CMSDK_WRPR1_APB10_CTRL
    mww $CMSDK_WRPR1_APB10_CTRL 0x00000000
}

proc reset_gadc {} {
    global CMSDK_WRPR1_APB10_CTRL
    mww $CMSDK_WRPR1_APB10_CTRL 0x00000002
}

proc getid_gadc {} {
    enable_gadc
    global CMSDK_GADC_CORE_ID
    parse_id [mrw $CMSDK_GADC_CORE_ID]
}

proc enable_trng {} {
    global CMSDK_WRPR1_APB11_CTRL
    mww $CMSDK_WRPR1_APB11_CTRL 0x00000001
}

proc disable_trng {} {
    global CMSDK_WRPR1_APB11_CTRL
    mww $CMSDK_WRPR1_APB11_CTRL 0x00000000
}

proc reset_trng {} {
    global CMSDK_WRPR1_APB11_CTRL
    mww $CMSDK_WRPR1_APB11_CTRL 0x00000002
}

proc getid_trng {} {
    enable_trng
    global CMSDK_TRNG_CORE_ID
    parse_id [mrw $CMSDK_TRNG_CORE_ID]
}

proc enable_rcos_cal {} {
    global CMSDK_WRPR1_APB12_CTRL
    mww $CMSDK_WRPR1_APB12_CTRL 0x00000001
}

proc disable_rcos_cal {} {
    global CMSDK_WRPR1_APB12_CTRL
    mww $CMSDK_WRPR1_APB12_CTRL 0x00000000
}

proc reset_rcos_cal {} {
    global CMSDK_WRPR1_APB12_CTRL
    mww $CMSDK_WRPR1_APB12_CTRL 0x00000002
}

proc getid_rcos_cal {} {
    enable_rcos_cal
    global CMSDK_RCOS_CAL_CORE_ID
    parse_id [mrw $CMSDK_RCOS_CAL_CORE_ID]
}

proc enable_shub {} {
    global CMSDK_WRPR1_APB13_CTRL
    mww $CMSDK_WRPR1_APB13_CTRL 0x00000001
}

proc disable_shub {} {
    global CMSDK_WRPR1_APB13_CTRL
    mww $CMSDK_WRPR1_APB13_CTRL 0x00000000
}

proc reset_shub {} {
    global CMSDK_WRPR1_APB13_CTRL
    mww $CMSDK_WRPR1_APB13_CTRL 0x00000002
}

proc getid_shub {} {
    enable_shub
    global CMSDK_SHUB_ID
    parse_id [mrw $CMSDK_SHUB_ID]
}

proc enable_atlc {} {
    global CMSDK_WRPR1_APB14_CTRL
    mww $CMSDK_WRPR1_APB14_CTRL 0x00000001
}

proc disable_atlc {} {
    global CMSDK_WRPR1_APB14_CTRL
    mww $CMSDK_WRPR1_APB14_CTRL 0x00000000
}

proc reset_atlc {} {
    global CMSDK_WRPR1_APB14_CTRL
    mww $CMSDK_WRPR1_APB14_CTRL 0x00000002
}

proc getid_atlc {} {
    enable_atlc
    global CMSDK_ATLC_ID
    parse_id [mrw $CMSDK_ATLC_ID]
}

proc enable_pdm {} {
    global CMSDK_WRPR1_APB15_CTRL
    mww $CMSDK_WRPR1_APB15_CTRL 0x00000001
}

proc disable_pdm {} {
    global CMSDK_WRPR1_APB15_CTRL
    mww $CMSDK_WRPR1_APB15_CTRL 0x00000000
}

proc reset_pdm {} {
    global CMSDK_WRPR1_APB15_CTRL
    mww $CMSDK_WRPR1_APB15_CTRL 0x00000002
}

proc getid_pdm {} {
    enable_pdm
    global CMSDK_PDM_CORE_ID
    parse_id [mrw $CMSDK_PDM_CORE_ID]
}
