<mipdefs>
	<descriptor_set name="PRODUCTION_TEST" descriptor="0xFE">
		<field descriptor="0x01" name="exit" proprietary="true">
			Exit/Disable Production Test Mode.
		</field>
		<field descriptor="0x02" name="set_gpio_mode" proprietary="true">
			Set the GPIO pin mode.
			<param name="port" index="0" type="u8" />
			<param name="pin" index="1" type="u8" />
			<param name="state" index="2" type="u8" />
		</field>
		<field descriptor="0x04" name="read_gpio" proprietary="true">
			Gets the current input value for a previously setup GPIO pin
			<param name="port" index="0" type="u8" />
			<param name="pin" index="1" type="u8" />
			<response descriptor="0x81">
				<param name="port" index="0" type="u8" />
				<param name="pin" index="1" type="u8" />
				<param name="state" index="2" type="bool" />
			</response>
		</field>
		<field descriptor="0x65" name="set_aux_gpio_direction" proprietary="true">
			<param name="port" index="0" type="u8" />
			<param name="pin" index="1" type="u8" />
			<param name="mode" index="2" type="u8" />
		</field>
		<field descriptor="0x66" name="read_aux_gpio" proprietary="true">
			<param name="port" index="0" type="u8" />
			<param name="pin" index="1" type="u8" />
			<response descriptor="0x8E">
				<param name="port" index="0" type="u8" />
				<param name="pin" index="1" type="u8" />
				<param name="state" index="2" type="bool" />
			</response>
		</field>
		<field descriptor="0x05" name="initialize_adc" proprietary="true">
			Initialize the Analog to Digital Converter
		</field>
		<field descriptor="0x06" name="initialize_adc_channel" proprietary="true">
			Initialize an ADC channel on a previously initialized ADC controller.
			<param name="channel" index="0" type="u8" />
		</field>
		<field descriptor="0x07" name="read_adc_channel" proprietary="true">
			Read the raw value from the initialized ADC channel.
			<param name="channel" index="0" type="u8" />
			<response descriptor="0x82">
				<param name="adc" index="0" type="u8" />
				<param name="channel" index="1" type="u8" />
				<param name="value" index="2" type="u16" />
			</response>
		</field>
		<field descriptor="0x60" name="initialize_aux_adc" proprietary="true">
			Initialize the Auxiliary External Analog to Digital Converter
			<param name="adc" index="0" type="u8" />
		</field>
		<field descriptor="0x61" name="read_aux_adc_channel" proprietary="true">
			Read the raw value from the initialized AUX ADC channel.
			<param name="adc" index="0" type="u8" />
			<param name="channel" index="1" type="u8" />
			<response descriptor="0x89">
				<param name="adc" index="0" type="u8" />
				<param name="channel" index="1" type="u8" />
				<param name="num_points" index="2" type="u8" />
				<param name="value" index="3" type="u16" />
			</response>
		</field>
		<field descriptor="0x62" name="stream_aux_adc" proprietary="true">
			Stream the raw value from the initialized AUX ADC channel specified at AUX ADC operating sample rate.
			<param name="enable" index="0" type="u8" />
			<param name="adc" index="1" type="u8" />
			<param name="channel" index="2" type="u8" />
			<response descriptor="0x89">
				<param name="adc" index="0" type="u8" />
				<param name="channel" index="1" type="u8" />
				<param name="num_points" index="2" type="u8" />
				<param name="data" index="3" type="u16" count="num_points" />
			</response>
		</field>
		<field descriptor="0x63" name="read_aux_adc_block_samples" proprietary="true">
			Record blocks of the raw values from the initialized AUX ADC channels specified for the number of data points specified at AUX ADC operating sample rate.
			<param name="adc" index="0" type="u8" />
			<param name="num_points_per_channel" index="1" type="u16" />
			<param name="num_channels" index="3" type="u8" />
			<param name="channels" index="4" type="u8" count="num_channels" />
			<response descriptor="0x89">
				<param name="adc" index="0" type="u8" />
				<param name="channel" index="1" type="u8" />
				<param name="num_points" index="2" type="u8" />
				<param name="data" index="3" type="u16" count="num_points" />
			</response>
		</field>
		<field descriptor="0x64" name="read_adc_channel_32bit" proprietary="true">
			Read the raw value from the initialized AUX ADC channel (Extended version)
			<param name="adc" index="0" type="u8" />
			<param name="channel" index="1" type="u8" />
			<response descriptor="0x8C">
				<param name="adc" index="0" type="u8" />
				<param name="channel" index="1" type="u8" />
				<param name="resolution" index="2" type="s8" />
				<param name="value" index="3" type="u32" />
			</response>
		</field>
		<field descriptor="0x08" name="initialize_dac" proprietary="true">
			Initialize the Digital to analog converter hardware
			<param name="dac_id" index="0" type="u8" />
		</field>
		<field descriptor="0x09" name="set_dac_count" proprietary="true">
			Set output count value for the digital to analog converter.
			<param name="dac_id" index="0" type="u8" />
			<param name="value" index="1" type="u16" />
		</field>
		<field descriptor="0x0A" name="read_dac_count" proprietary="true">
			Read the value in the DAC data output register.
			<param name="dac_id" index="0" type="u8" />
			<response descriptor="0x8A">
				<param name="value" index="0" type="u16" />
			</response>
		</field>
		<field descriptor="0x0B" name="dac_output_value" proprietary="true" functions="WR">
			Read/Write the value from/to the DAC data output register.
			<param name="dac_id" index="0" type="u8" functions="WR" />
			<param name="data" index="1" type="u16" />
			<response descriptor="0x8A">
				<param name="value" index="0" type="u16" />
			</response>
		</field>
		<field descriptor="0x0C" name="enable_mainline_code" proprietary="true" functions="WR">
			Enable/Disable the mainline code to prevent interaction with production test activities
			<param name="enable" index="0" type="u8" />
			<response descriptor="0x8F">
				<param name="enable" index="0" type="u8" />
			</response>
		</field>
		<field descriptor="0x10" name="initialize_i2c" proprietary="true">
			Initialize the I2C Interface
			<param name="i2c_id" index="0" type="u8" />
		</field>
		<field descriptor="0x11" name="read_i2c" proprietary="true">
			Read the specified number of bytes from a given device on a particular I2C interface
			<param name="i2c_id" index="0" type="u8" />
			<param name="address" index="1" type="u8" />
			<param name="num_bytes" index="2" type="u8" />
			<response descriptor="0x83">
				<param name="i2c_id" index="0" type="u8" />
				<param name="address" index="1" type="u8" />
				<param name="data" index="2" type="u8" count="" />
			</response>
		</field>
		<field descriptor="0x12" name="write_i2c" proprietary="true">
			Write the specified number of bytes to a given device on a particular I2C interface
			<param name="i2c_id" index="0" type="u8" />
			<param name="address" index="1" type="u8" />
			<param name="stop" index="2" type="bool" />
			<param name="data" index="3" type="u8" count="" />
		</field>
		<field descriptor="0x13" name="read_register_i2c" proprietary="true">
			Read the specified number of bytes from a given register, on a given device, on a particular I2C interface
			<param name="i2c_id" index="0" type="u8" />
			<param name="address" index="1" type="u8" />
			<param name="register_" index="2" type="u8" />
			<param name="num_bytes" index="3" type="u8" />
			<response descriptor="0x83">
				<param name="i2c_id" index="0" type="u8" />
				<param name="address" index="1" type="u8" />
				<param name="data" index="2" type="u8" count="" />
			</response>
		</field>
		<field descriptor="0x14" name="write_register_i2c" proprietary="true">
			Write the specified number of bytes to a given device on a particular I2C interface
			<param name="i2c_id" index="0" type="u8" />
			<param name="device_id" index="1" type="u8" />
			<param name="register_" index="2" type="u8" />
			<param name="data" index="3" type="u8" count="" />
		</field>
		<field descriptor="0x18" name="initialize_spi" proprietary="true">
			Initialize the SPI Interface
			<param name="spi_id" index="0" type="u8" />
			<param name="spi_mode" index="1" type="u8" />
			<param name="clk_speed" index="2" type="u32" />
		</field>
		<field descriptor="0x19" name="initialize_spi_slave" proprietary="true">
			Initialize SPI Slave SS port/pin.
			<param name="spi_id" index="0" type="u8" />
			<param name="slave" index="1" type="u8" />
			<param name="ss_port" index="2" type="u8" />
			<param name="ss_pin" index="3" type="u8" />
		</field>
		<field descriptor="0x1A" name="spi_transfer" proprietary="true">
			Transfer data full-duplex to and from an SPI slave.
			<param name="spi_id" index="0" type="u8" />
			<param name="slave" index="1" type="u8" />
			<param name="data" index="2" type="u8" count="" />
			<response descriptor="0x8D">
				<param name="spi_id" index="0" type="u8" />
				<param name="slave" index="1" type="u8" />
				<param name="data_out" index="2" type="u8" count="" />
			</response>
		</field>
		<field descriptor="0x20" name="initialize_serial" proprietary="true">
			Initializes the serial port.
			<param name="uart_id" index="0" type="u8" />
			<param name="baud" index="1" type="u32" />
		</field>
		<field descriptor="0x21" name="read_serial" proprietary="true">
			Reads the specified number of bytes from the serial port
			<param name="uart_id" index="0" type="u8" />
			<param name="num_bytes" index="1" type="u8" />
			<response descriptor="0x84">
				<param name="uart_id" index="0" type="u8" />
				<param name="data" index="1" type="u8" count="" />
			</response>
		</field>
		<field descriptor="0x22" name="write_serial" proprietary="true">
			Writes the specified number of bytes to the serial port
			<param name="uart_id" index="0" type="u8" />
			<param name="data" index="1" type="u8" count="" />
		</field>
		<field descriptor="0x23" name="flush_serial" proprietary="true">
			Flushes both the send and receive buffers
			<param name="uart_id" index="0" type="u8" />
		</field>
		<field descriptor="0x25" name="initialize_usb" proprietary="true">
			Initialize the USB Port
		</field>
		<field descriptor="0x26" name="read_usb" proprietary="true">
			Reads the specified number of bytes from the USB port
			<param name="num_bytes" index="0" type="u8" />
			<response descriptor="0x85">
				<param name="data" index="0" type="u8" count="" />
			</response>
		</field>
		<field descriptor="0x27" name="write_usb" proprietary="true">
			Writes the specified number of bytes to the USB port
			<param name="data" index="0" type="u8" count="" />
		</field>
		<field descriptor="0x30" name="initialize_eeprom" proprietary="true">
			Initialize the Emulated EEPROM (located in flash, wear-leveled 2 Kb, actual space 8k)
		</field>
		<field descriptor="0x31" name="read_eeprom" proprietary="true">
			Read emulated EEPROM 16-bit data word located at the specified virtual address.
			<param name="address" index="0" type="u16" />
			<response descriptor="0x86">
				<param name="address" index="0" type="u16" />
				<param name="value" index="2" type="u16" />
			</response>
		</field>
		<field descriptor="0x32" name="write_eeprom" proprietary="true">
			Writes 16-bit data word to the emulated EEPROM located at the specified virtual address.
			<param name="address" index="0" type="u16" />
			<param name="value" index="2" type="u16" />
		</field>
		<field descriptor="0x40" name="read_firmware_version" proprietary="true">
			Reads the firmware version number of the AP-1 firmware.
			<response descriptor="0x87">
				<param name="version" index="0" type="u32" />
			</response>
		</field>
		<field descriptor="0x41" name="read_device_id_string" proprietary="true">
			Reads the selected device ID string of the AP-1 firmware.
			<param name="string_id" index="0" type="u8" />
			<response descriptor="0x88">
				<param name="string_id" index="0" type="u8" />
				<param name="string_value" index="1" type="char" count="16" />
			</response>
		</field>
		<field descriptor="0x42" name="write_device_id_string" proprietary="true">
			Write the selected device ID string to the AP-1 firmware.
			<param name="string_id" index="0" type="u8" />
			<param name="string_value" index="1" type="char" count="16" />
		</field>
		<field descriptor="0x45" name="get_unique_id" proprietary="true">
			Returns the processors factory-assigned unique id.
			<response descriptor="0x8B">
				<param name="length" index="0" type="u8" />
				<param name="unique_id" index="1" type="u8" count="length" />
			</response>
		</field>
		<field descriptor="0x43" name="get_raw_sensor_data" proprietary="true">
			Gets the raw sensor data for all sensors attached to the device
		</field>
		<field descriptor="0x44" name="get_scaled_sensor_data" proprietary="true">
			Gets the scaled sensor data for all sensors attached to the device
		</field>
		<field descriptor="0x50" name="self_test" proprietary="true">
			Assert the Self-Test lines for internal sensors.
		</field>
	</descriptor_set>
</mipdefs>
