<?xml version="1.0" encoding="UTF-8"?>
<!--
    Autogenerated for Example v0.1.0.
    Generated from peripherals/example.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>Example</name>
    <version>0.1.0</version>
    <description>Example of a package</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>Example</name>
            <description>Example of a package</description>
            <baseAddress>16</baseAddress>
            <addressBlock>
                <offset>0</offset>
                <size>255</size>
                <usage>registers</usage>
            </addressBlock>
            <registers>
                <register>
                    <name>RegisterA</name>
                    <description>An 8-bit register</description>
                    <addressOffset>0</addressOffset>
                    <size>8</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint8_t</dataType>
                    <fields>
                        <field>
                            <name>FieldA</name>
                            <description>
                            This is a few bits
                            </description>
                            <lsb>4</lsb>
                            <msb>7</msb>
                            <access>read-only</access>
                            <writeConstraint>
                                <range>
                                    <minimum>4</minimum>
                                    <maximum>7</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                        <field>
                            <name>FieldB</name>
                            <description>
                            This is fewer bits
                            </description>
                            <lsb>2</lsb>
                            <msb>3</msb>
                            <access>write-only</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>VAL_1</name>
                                    <description>Value 1</description>
                                    <value>1</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>VAL_2</name>
                                    <description>Value 2</description>
                                    <value>2</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>VAL_3</name>
                                    <description>Value 3</description>
                                    <value>4</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>VAL_4</name>
                                    <description>Value 4</description>
                                    <value>8</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>2</minimum>
                                    <maximum>3</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                        <field>
                            <name>FieldC</name>
                            <description>
                            A single-bit
                            </description>
                            <lsb>1</lsb>
                            <msb>1</msb>
                            <access>read-write</access>
                            <writeConstraint>
                                <range>
                                    <minimum>1</minimum>
                                    <maximum>1</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                    </fields>
                </register>
                <register>
                    <name>RegisterB</name>
                    <description>A 16-bit register</description>
                    <addressOffset>1</addressOffset>
                    <size>16</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>

                </register>
                <register>
                    <name>RegisterC</name>
                    <description>A 32-bit register</description>
                    <addressOffset>2</addressOffset>
                    <size>32</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint32_t</dataType>

                </register>
                <register>
                    <name>RegisterD</name>
                    <description>A dummy register that has no data</description>
                    <addressOffset>3</addressOffset>
                    <size>0</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint8_t</dataType>

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