<?xml version="1.0" encoding="UTF-8"?>
<!--
    Autogenerated for TCS3472 v0.1.0.
    Generated from peripherals/TCS3472.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>TCS3472</name>
    <version>0.1.0</version>
    <description>Color Light-to-Digital Converter with IR Filter</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>TCS3472</name>
            <description>Color Light-to-Digital Converter with IR Filter</description>
            <baseAddress>41</baseAddress>
            <addressBlock>
                <offset>0</offset>
                <size>255</size>
                <usage>registers</usage>
            </addressBlock>
            <registers>
                <register>
                    <name>blue</name>
                    <description>Blue light as an int. Divide by ambient light to get scaled number.</description>
                    <addressOffset>186</addressOffset>
                    <size>16</size>
                    <access>read</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>

                </register>
                <register>
                    <name>clear</name>
                    <description>This is the ambient amount of detected light.</description>
                    <addressOffset>180</addressOffset>
                    <size>16</size>
                    <access>read</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>

                </register>
                <register>
                    <name>enable</name>
                    <description>Enable specific components of the peripheral</description>
                    <addressOffset>128</addressOffset>
                    <size>8</size>
                    <access>read-write</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint8_t</dataType>
                    <fields>
                        <field>
                            <name>init</name>
                            <description>
                            Enable RGBC and Power
                            </description>
                            <lsb>0</lsb>
                            <msb>7</msb>
                            <access>read-write</access>
                            <enumeratedValues>
                                <enumeratedValue>
                                    <name>Power</name>
                                    <description>Power</description>
                                    <value>1</value>
                                </enumeratedValue>
                                <enumeratedValue>
                                    <name>RGBC</name>
                                    <description>Color</description>
                                    <value>2</value>
                                </enumeratedValue>
                            </enumeratedValues>
                            <writeConstraint>
                                <useEnumeratedValues>true</useEnumeratedValues>
                                <range>
                                    <minimum>0</minimum>
                                    <maximum>7</maximum>
                                </range>
                            </writeConstraint>
                        </field>
                    </fields>
                </register>
                <register>
                    <name>green</name>
                    <description>Green light as an int. Divide by ambient light to get scaled number.</description>
                    <addressOffset>184</addressOffset>
                    <size>16</size>
                    <access>read</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>

                </register>
                <register>
                    <name>red</name>
                    <description>Red light as an int. Divide by ambient light to get scaled number.</description>
                    <addressOffset>182</addressOffset>
                    <size>16</size>
                    <access>read</access>
                    <resetValue>0x00</resetValue>
                    <resetMask>0xFF</resetMask>
                    <dataType>uint16_t</dataType>

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