<?xml version="1.0" encoding="UTF-8"?>
<!--
    Autogenerated for MCP9808 v0.1.0.
    Generated from peripherals/MCP9808.yaml using Cyanobyte Codegen v0.1.0
-->
<device schemaVersion="1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD_Schema_1_1.xsd">
    <vendor>Google Inc.</vendor>
    <name>MCP9808</name>
    <version>0.1.0</version>
    <description>This is a test description</description>
    <licenseText>
    Copyright (C) 2019 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

    </licenseText>
    <!-- Placeholder values -->
    <addressUnitBits>8</addressUnitBits>
    <width>8</width>
    <!-- Define our peripheral -->
    <peripherals>
        <peripheral>
            <name>MCP9808</name>
            <description>This is a test description</description>
            <baseAddress>24</baseAddress>
            <addressBlock>
                <offset>0</offset>
                <size>120</size>
                <usage>registers</usage>
            </addressBlock>
            <registers>
                <register>
                    <name>configuration</name>
                    <description>The MCP9808 has a 16-bit Configuration register (CONFIG) that
allows the user to set various functions for a robust temperature
monitoring system.
Bits 10 through 0 are used to select the temperature alert output
hysteresis, device shutdown or Low-Power mode, temperature boundary
and critical temperature lock, and temperature Alert output
enable/disable.
In addition, Alert output condition (output set for TUPPER and
TLOWER temperature boundary or TCRIT only), Alert output status
and Alert output polarity and mode (Comparator Output or Interrupt
Output mode) are user-configurable.
</description>
                    <addressOffset>1</addressOffset>
                    <size>16</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>
                    <fields>
                        <field>
                            <name>limitHysteresis</name>
                            <description>
                            This bit can not be altered when either of the Lock bits are set
(bit 6 and bit 7). This bit can be programmed in Shutdown mode.

                            </description>
                            <lsb>9</lsb>
                            <msb>10</msb>
                            <access>read-only</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>Temp_0C</name>
                                    <description>0°C (power-up default)</description>
                                    <value>0</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>Temp_1C5</name>
                                    <description>+1.5°C</description>
                                    <value>1</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>Temp_3C</name>
                                    <description>+3.0°C</description>
                                    <value>2</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>Temp_6C</name>
                                    <description>+6.0°C</description>
                                    <value>3</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>9</minimum>
                                    <maximum>10</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                        <field>
                            <name>shutdownMode</name>
                            <description>
                            In shutdown, all power-consuming activities are disabled, though
all registers can be written to or read. This bit cannot be set
to ‘1’ when either of the Lock bits is set (bit 6 and bit 7).
However, it can be cleared to ‘0’ for continuous conversion while
locked.

                            </description>
                            <lsb>8</lsb>
                            <msb>8</msb>
                            <access>read-only</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>continousConversion</name>
                                    <description>Continuous conversion (power-up default)</description>
                                    <value>0</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>shutdown</name>
                                    <description>Shutdown (Low-Power mode)</description>
                                    <value>1</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>8</minimum>
                                    <maximum>8</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                    </fields>
                </register>
            </registers>
        </peripheral>
    </peripherals>
</device>