You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
3.1 KiB
108 lines
3.1 KiB
/* |
|
* amba_bpi_defines.h |
|
* |
|
* Histroy: |
|
* 2019-06-14 [Cheng-Yan Li] Created file |
|
* |
|
* Copyright (c) 2019 Ambarella, Inc. |
|
* |
|
* This file and its contents ("Software") are protected by intellectual |
|
* property rights including, without limitation, U.S. and/or foreign |
|
* copyrights. This Software is also the confidential and proprietary |
|
* information of Ambarella, Inc. and its licensors. You may not use, reproduce, |
|
* disclose, distribute, modify, or otherwise prepare derivative works of this |
|
* Software or any portion thereof except pursuant to a signed license agreement |
|
* or nondisclosure agreement with Ambarella, Inc. or its authorized affiliates. |
|
* In the absence of such an agreement, you agree to promptly notify and return |
|
* this Software to Ambarella, Inc. |
|
* |
|
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
|
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, |
|
* MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
* IN NO EVENT SHALL AMBARELLA, INC. OR ITS AFFILIATES 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; COMPUTER FAILURE OR MALFUNCTION; 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. |
|
* |
|
*/ |
|
|
|
#ifndef _AMBA_BPI_DEFINES_H_ |
|
#define _AMBA_BPI_DEFINES_H_ |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
typedef enum { |
|
INVALID_CMD = 0, |
|
|
|
/* amba's chip to MCU. */ |
|
AMB_CMD_TO_MCU_BASE = 0x10, |
|
|
|
/* send CMD. */ |
|
AMB_CMD_STREAM_START = 0x10, |
|
AMB_CMD_STREAM_STOP = 0x11, |
|
|
|
/* send cmd + payload. */ |
|
AMB_CMD_DATA = 0x20, |
|
AMB_CMD_VCA_RESULT = 0x21, |
|
AMB_CMD_SAVE_INFO = 0x22, |
|
AMB_CMD_VERSION = 0x23, |
|
AMB_CMD_UPGRADE_STATUS = 0x24, //indicate the status of upgrading |
|
|
|
/* send cmd and receive feedback. */ |
|
AMB_CMD_REQ_CFG = 0x30, // config |
|
AMB_CMD_REQ_LIGHT_VAL = 0x31, // lux from light sensor |
|
AMB_CMD_REQ_CRC_VAL = 0x32, // request whether append CRC to data |
|
AMB_CMD_REQ_INFO = 0x33, // query batch info |
|
|
|
|
|
AMB_CMD_TO_MCU_END = 0x3F, //AMB_CMD_TO_MCU_BASE |
|
|
|
/* MCU to amba's chip. */ |
|
AMB_CMD_FROM_MCU_BASE = 0x40, |
|
AMB_CMD_FORCE_STOP_STREAM = 0x40, |
|
AMB_CMD_POWER_OFF = 0x41, |
|
AMB_CMD_UPGRADE_DATA = 0x42, //transfer data for upgrading |
|
AMB_CMD_STOP_UPGRADE = 0x43, //cancel the upgrading procedure |
|
|
|
AMB_CMD_FROM_MCU_END = 0x6F, //AMB_CMD_FROM_MCU_BASE |
|
|
|
/* DEBUG cmd. */ |
|
AMB_CMD_DEBUG_BASE = 0xE0, |
|
AMB_CMD_DEBUG_TIME = 0xE0, |
|
|
|
AMB_CMD_DEBUG_END = 0xFF, |
|
|
|
} AMB_MCU_CMD_LIST; |
|
|
|
/* sync with work mode definition of mcu side */ |
|
typedef enum { |
|
INVALID_WORK_MODE = 0, |
|
AMB_STREAM_MODE = 1, |
|
AMB_RECORD_MODE = 2, |
|
AMB_QUERY_VERSION_MODE = 3, |
|
AMB_UPGRADE_MODE = 4, |
|
} AMB_BPI_WORK_MODE; |
|
|
|
typedef enum { |
|
AMB_VCA_NONE = 0, |
|
AMB_VCA_VEHICLE = 0x01, |
|
AMB_VCA_PERSON = 0x02, |
|
AMB_VCA_PET = 0x03, |
|
|
|
/* Add more VCA result here */ |
|
|
|
AMB_VCA_UNKNOWN = 0xFF, |
|
} AMB_BPI_VCA_RESULT; |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#endif |
|
|
|
|