<mipdefs>
	<descriptor_set name="BOOTLOADER" descriptor="0x7E">
		<field descriptor="0x01" name="unlock" proprietary="true">
			Unlocks the bootloader commands.
			<enum name="Mode" type="u8">
				<value name="LOCK" value="0" />
				<value name="UNLOCK" value="1" />
			</enum>
			<param name="action" index="0" type="Mode" />
			<param name="security_key" index="1" type="u32" />
		</field>
		<field descriptor="0x02" name="info" proprietary="true">
			S    Returns the identifying strings just like those in the YModem menu.
			<response descriptor="0x82">
				<param name="version" index="0" type="u16" />
				<enum name="Type" type="u8">
					<value name="STANDALONE" value="0" />
					<value name="EMBEDDED" value="1" />
					<value name="APPLICATION" value="2" />
				</enum>
				<param name="updater_type" index="2" type="Type" />
				<bitfield name="Target" type="u8">
					<value name="update_bootloader" firstBit="0" />
					<value name="update_os" firstBit="1" />
					<value name="update_app" firstBit="2" />
				</bitfield>
				<param name="update_targets" index="3" type="Target" />
				<bitfield name="Interface" type="u16">
					<value name="uart" firstBit="0" />
					<value name="usb" firstBit="1" />
					<value name="can" firstBit="2" />
				</bitfield>
				<param name="interfaces" index="4" type="Interface" />
				<bitfield name="Protocol" type="u8">
					<value name="mip" firstBit="0" />
					<value name="ymodem" firstBit="1" />
				</bitfield>
				<param name="protocols" index="6" type="Protocol" />
				<param name="num_strings" index="7" type="u8" />
				<struct name="InfoStr">
					<param name="string" type="char" index="0" />
				</struct>
				<param name="strings" index="8" type="InfoStr" count="num_strings" />
			</response>
		</field>
		<field descriptor="0x03" name="reset" proprietary="true">
			Resets the processor.
		</field>
		<field descriptor="0x04" name="run" proprietary="true">
			Runs the firmware.
			<param name="target" index="0" type="u32" />
		</field>
		<field descriptor="0x05" name="baudrate" proprietary="true">
			Changes the UART or CAN interface baudrate.
			<param name="baudrate" index="0" type="u32" />
		</field>
		<field descriptor="0x0C" name="status" proprietary="true">
			Returns the status of the download system.
			<response descriptor="0x8C">
				<param name="status" index="0" type="u8" />
				<param name="address" index="1" type="u32" />
				<param name="size" index="5" type="u32" />
				<param name="reserved" index="9" type="u32" />
				<param name="offset" index="13" type="u32" />
				<param name="available" index="17" type="u32" />
			</response>
		</field>
		<field descriptor="0x0D" name="download" proprietary="true">
			Prepares for new firmware.
			<param name="target" index="0" type="u32" />
			<param name="size" index="4" type="u32" />
			<param name="reserved" index="8" type="u32" />
		</field>
		<field descriptor="0x0F" name="filedata" proprietary="true">
			Sends a block of data.
			<param name="offset" index="0" type="u32" />
			<param name="reserved" index="4" type="u8" />
			<param name="data" index="5" type="u8" count="" />
		</field>
	</descriptor_set>
</mipdefs>
