• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 *
3 * SPDX-License-Identifier: GPL-2.0
4 *
5 * Copyright (C) 2011-2018 ARM or its affiliates
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19 
20 #include "application_command_api.h"
21 #include "acamera_command_api.h"
22 #include "acamera_types.h"
23 #include "acamera_firmware_config.h"
24 
25 extern uint32_t acamera_get_api_context( void );
26 
application_command(uint8_t command_type,uint8_t command,uint32_t value,uint8_t direction,uint32_t * ret_value)27 uint8_t application_command( uint8_t command_type, uint8_t command, uint32_t value, uint8_t direction, uint32_t *ret_value )
28 {
29     uint8_t ret = NOT_EXISTS;
30     uint32_t ctx_id = acamera_get_api_context();
31 
32     ret = acamera_command( ctx_id, command_type, command, value, direction, ret_value );
33 
34     return ret;
35 }
36 
37 
application_api_calibration(uint8_t type,uint8_t id,uint8_t direction,void * data,uint32_t data_size,uint32_t * ret_value)38 uint8_t application_api_calibration( uint8_t type, uint8_t id, uint8_t direction, void *data, uint32_t data_size, uint32_t *ret_value )
39 {
40     uint8_t ret = SUCCESS;
41 
42     uint32_t ctx_id = acamera_get_api_context();
43     ret = acamera_api_calibration( ctx_id, type, id, direction, data, data_size, ret_value );
44     return ret;
45 }
46