• 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 #if !defined( __AUTOCAPTURE_FSM_H__ )
21 #define __AUTOCAPTURE_FSM_H__
22 
23 typedef struct _autocapture_fsm_t autocapture_fsm_t;
24 typedef struct _autocapture_fsm_t *autocapture_fsm_ptr_t;
25 typedef const struct _autocapture_fsm_t *autocapture_fsm_const_ptr_t;
26 
27 void autocapture_initialize( autocapture_fsm_ptr_t p_fsm );
28 
29 struct _autocapture_fsm_t {
30     fsm_common_t cmn;
31 
32     acamera_fsm_mgr_t *p_fsm_mgr;
33 };
34 
35 struct module_cfg_info {
36 	uint8_t enable;
37 	uint8_t p_type;
38 	uint8_t planes;
39 	uint32_t frame_size0;
40 	uint32_t frame_buffer_start0;
41 	uint32_t frame_size1;
42 	uint32_t frame_buffer_start1;
43 };
44 
45 void autocapture_fsm_clear( autocapture_fsm_ptr_t p_fsm );
46 
47 void autocapture_fsm_init( void *fsm, fsm_init_param_t *init_param );
48 void autocapture_deinit( autocapture_fsm_ptr_t p_fsm );
49 void autocapture_hwreset(autocapture_fsm_ptr_t p_fsm );
50 
51 int autocapture_fsm_set_param( void *fsm, uint32_t param_id, void *input, uint32_t input_size );
52 
53 uint8_t autocapture_fsm_process_event( autocapture_fsm_ptr_t p_fsm, event_id_t event_id );
54 void autocapture_fsm_process_interrupt( autocapture_fsm_const_ptr_t p_fsm, uint8_t irq_event );
55 
56 void autocap_set_new_param(struct module_cfg_info *m_cfg);
57 
58 #endif /* __AUTOCAPTURE_FSM_H__ */
59