/* * ________________________________________________________________________________________________________ * Copyright (c) 2020 InvenSense Inc. All rights reserved. * * This software, related documentation and any modifications thereto (collectively “Software”) is subject * to InvenSense and its licensors' intellectual property rights under U.S. and international copyright * and other intellectual property rights laws. * * InvenSense and its licensors retain all intellectual property and proprietary rights in and to the Software * and any use, reproduction, disclosure or distribution of the Software without an express license agreement * from InvenSense is strictly prohibited. * * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, THE SOFTWARE IS * PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, IN NO EVENT SHALL * INVENSENSE BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THE SOFTWARE. * ________________________________________________________________________________________________________ */ /** * \file chirp_board_config.h * * This file defines required symbols used to build an application with the Chirp SonicLib * API and driver. These symbols are used for static array allocations and counters in SonicLib * (and often applications), and are based on the number of specific resources on the target board. * * Two symbols must be defined: * CHIRP_MAX_NUM_SENSORS - the number of possible sensor devices (i.e. the number of sensor ports) * CHIRP_NUM_I2C_BUSES - the number of I2C buses on the board that are used for those sensor ports * * This file must be in the C pre-processor include path when the application is built with SonicLib * and this board support package. */ #ifndef CHIRP_BOARD_CONFIG_H #define CHIRP_BOARD_CONFIG_H /* Settings for the Chirp SmartSonic board */ #define CHIRP_MAX_NUM_SENSORS 1 // maximum possible number of sensor devices #define CHIRP_NUM_I2C_BUSES 1 // number of I2C buses used by sensors #define I2C0_MASTER_ADDRESS7 0xA0 #define I2C0_SPEED 400000 /* PROG_EN GPIO */ #define CHIRP_PIN_PROG_PORT GPIOA #define CHIRP_PIN_PROG_PIN GPIO_PIN_5 #define CHIRP_PIN_PROG_CLK RCU_GPIOA /* RST GPIO */ #define CHIRP_PIN_RST_PORT GPIOA #define CHIRP_PIN_RST_PIN GPIO_PIN_6 #define CHIRP_PIN_RST_CLK RCU_GPIOA /* INT GPIO */ #define CHIRP_PIN_INT_PORT GPIOA #define CHIRP_PIN_INT_PIN GPIO_PIN_7 #define CHIRP_PIN_INT_CLK RCU_GPIOA #define CHIRP_EXTI_INT_PORT EXTI_SOURCE_GPIOA #define CHIRP_EXTI_INT_PIN EXTI_SOURCE_PIN7 #define CHIRP_EXTI_INT_LINE EXTI_7 /* LED GPIO */ #define CHIRP_PIN_LED_PORT GPIOB #define CHIRP_PIN_LED_PIN GPIO_PIN_1 #define CHIRP_PIN_LED_CLK RCU_GPIOB /* IIC Config */ #define CHIRP_PIN_IIC_BUS I2C0 #define CHIRP_PIN_IIC_PORT GPIOF #define CHIRP_PIN_IIC_SDA_PIN GPIO_PIN_0 #define CHIRP_PIN_IIC_SCL_PIN GPIO_PIN_1 #define CHIRP_PIN_IIC_PIN_CLK RCU_GPIOF #define CHIRP_PIN_IIC_CLK RCU_I2C0 #define CHIRP_PIN_IIC_DMA_CLK RCU_DMA #define CHIRP_ADC_NONE // #define DEBUG_VERBOES /* Deactivate use of debug I2C interface */ #define USE_STD_I2C_FOR_IQ (1) #endif /* CHIRP_BOARD_CONFIG_H */