import{R as t}from"./c.B2LvkjpK.js";class _ extends t{constructor(){super(...arguments),this.CHIP_NAME="ESP32-H2",this.IMAGE_CHIP_ID=16,this.EFUSE_BASE=1610647552,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.UART_CLKDIV_REG=1072955412,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612860,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=0,this.FLASH_SIZES={"1MB":0,"2MB":16,"4MB":32,"8MB":48,"16MB":64},this.SPI_REG_BASE=1610620928,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88,this.USB_RAM_BLOCK=2048,this.UARTDEV_BUF_NO_USB=3,this.UARTDEV_BUF_NO=1070526796}async getChipDescription(t){return this.CHIP_NAME}async getChipFeatures(t){return["BLE","IEEE802.15.4"]}async getCrystalFreq(t){return 32}_d2h(t){const _=(+t).toString(16);return 1===_.length?"0"+_:_}async postConnect(t){const _=255&await t.readReg(this.UARTDEV_BUF_NO);t.debug("In _post_connect "+_),_==this.UARTDEV_BUF_NO_USB&&(t.ESP_RAM_BLOCK=this.USB_RAM_BLOCK)}async readMac(t){let _=await t.readReg(this.MAC_EFUSE_REG);_>>>=0;let s=await t.readReg(this.MAC_EFUSE_REG+4);s=s>>>0&65535;const i=new Uint8Array(6);return i[0]=s>>8&255,i[1]=255&s,i[2]=_>>24&255,i[3]=_>>16&255,i[4]=_>>8&255,i[5]=255&_,this._d2h(i[0])+":"+this._d2h(i[1])+":"+this._d2h(i[2])+":"+this._d2h(i[3])+":"+this._d2h(i[4])+":"+this._d2h(i[5])}getEraseSize(t,_){return _}}export{_ as ESP32H2ROM};
//# sourceMappingURL=c.DORkz68C.js.map
