49 lines
2.0 KiB
C
49 lines
2.0 KiB
C
/*! \file ch201.h
|
|
*
|
|
* \brief Internal definitions for the Chirp CH201 ultrasonic sensor.
|
|
*
|
|
* This file contains various hardware-defined values for the CH201 sensor.
|
|
|
|
* You should not need to edit this file or call the driver functions directly. Doing so
|
|
* will reduce your ability to benefit from future enhancements and releases from Chirp.
|
|
*
|
|
*/
|
|
|
|
/*
|
|
* Copyright © 2016-2020, Chirp Microsystems. All rights reserved.
|
|
*
|
|
* Chirp Microsystems CONFIDENTIAL
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
* DISCLAIMED. IN NO EVENT SHALL CHIRP MICROSYSTEMS BE LIABLE FOR ANY
|
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*
|
|
* You can contact the authors of this program by email at support@chirpmicro.com
|
|
* or by mail at 2560 Ninth Street, Suite 220, Berkeley, CA 94710.
|
|
*/
|
|
|
|
#ifndef CH201_H_
|
|
#define CH201_H_
|
|
|
|
|
|
#define CH201_DATA_MEM_SIZE 0x800
|
|
#define CH201_DATA_MEM_ADDR 0x0200
|
|
#define CH201_PROG_MEM_SIZE 0x800
|
|
#define CH201_PROG_MEM_ADDR 0xF800
|
|
#define CH201_FW_SIZE CH201_PROG_MEM_SIZE
|
|
|
|
#define CH201_BANDWIDTH_INDEX_1 6 /*!< Index of first sample to use for calculating bandwidth. */
|
|
#define CH201_BANDWIDTH_INDEX_2 (CH201_BANDWIDTH_INDEX_1 + 1) /*!< Index of second sample to use for calculating bandwidth. */
|
|
#define CH201_SCALEFACTOR_INDEX 4 /*!< Index for calculating scale factor. */
|
|
|
|
#define CH201_MAX_TICK_INTERVAL 256
|
|
|
|
#endif
|