<?xml version="1.0" encoding="UTF-8"?>
<!--
    Autogenerated for ADS1015 v0.1.0.
    Generated from peripherals/ADS1015.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>ADS1015</name>
    <version>0.1.0</version>
    <description>Texas Instruments Analog-Digital Converter</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>ADS1015</name>
            <description>Texas Instruments Analog-Digital Converter</description>
            <baseAddress>73</baseAddress>
            <addressBlock>
                <offset>0</offset>
                <size>255</size>
                <usage>registers</usage>
            </addressBlock>
            <registers>
                <register>
                    <name>Config</name>
                    <description>Describes the specifics of the sensing implementation</description>
                    <addressOffset>1</addressOffset>
                    <size>16</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>
                    <fields>
                        <field>
                            <name>DeviceOperatingMode</name>
                            <description>
                            This bit controls the operating mode

                            </description>
                            <lsb>8</lsb>
                            <msb>8</msb>
                            <access>write-only</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>CONTINUOUS_CONVERSION</name>
                                    <description>Continuous Conversion</description>
                                    <value>0</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>SINGLE_SHOT</name>
                                    <description>Single-shot or power-down state</description>
                                    <value>1</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>8</minimum>
                                    <maximum>8</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                        <field>
                            <name>ProgrammableGain</name>
                            <description>
                            This sets the programmable gain for reading analog voltage

                            </description>
                            <lsb>9</lsb>
                            <msb>11</msb>
                            <access>write-only</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>PGA0_256</name>
                                    <description>Plus/minus 0.256V</description>
                                    <value>5</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>PGA0_512</name>
                                    <description>Plus/minus 0.512V</description>
                                    <value>4</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>PGA1_024V</name>
                                    <description>Plus/minus 1.024V</description>
                                    <value>3</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>PGA2_048V</name>
                                    <description>Plus/minus 2.048V</description>
                                    <value>2</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>PGA4_096V</name>
                                    <description>Plus/minus 4.096V</description>
                                    <value>1</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>PGA6_144V</name>
                                    <description>Plus/minus 6.144V</description>
                                    <value>0</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>9</minimum>
                                    <maximum>11</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                        <field>
                            <name>SampleRate</name>
                            <description>
                            This sets the samples-per-second value

                            </description>
                            <lsb>5</lsb>
                            <msb>7</msb>
                            <access>write-only</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>HZ128</name>
                                    <description>128 samples/second</description>
                                    <value>0</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>HZ1600</name>
                                    <description>1600 samples/second</description>
                                    <value>4</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>HZ2400</name>
                                    <description>2400 samples/second</description>
                                    <value>5</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>HZ250</name>
                                    <description>250 samples/second</description>
                                    <value>1</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>HZ3300</name>
                                    <description>3300 samples/second</description>
                                    <value>6</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>HZ490</name>
                                    <description>490 samples/second</description>
                                    <value>2</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>HZ920</name>
                                    <description>920 samples/second</description>
                                    <value>3</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>5</minimum>
                                    <maximum>7</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                    </fields>
                </register>
                <register>
                    <name>Conversion</name>
                    <description>Conversion register contains the result of the last conversion</description>
                    <addressOffset>0</addressOffset>
                    <size>16</size>
                    <access>read</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>

                </register>
            </registers>
        </peripheral>
    </peripherals>
</device>