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( __SBUF_FSM_H__ ) 21 #define __SBUF_FSM_H__ 22 23 24 25 typedef struct _sbuf_fsm_t sbuf_fsm_t; 26 typedef struct _sbuf_fsm_t *sbuf_fsm_ptr_t; 27 typedef const struct _sbuf_fsm_t *sbuf_fsm_const_ptr_t; 28 29 void sbuf_fsm_initialize( sbuf_fsm_ptr_t p_fsm ); 30 void sbuf_deinit( sbuf_fsm_ptr_t p_fsm ); 31 void sbuf_update_ae_idx( sbuf_fsm_ptr_t p_fsm ); 32 void sbuf_update_awb_idx( sbuf_fsm_ptr_t p_fsm ); 33 void sbuf_update_af_idx( sbuf_fsm_ptr_t p_fsm ); 34 void sbuf_update_gamma_idx( sbuf_fsm_ptr_t p_fsm ); 35 void sbuf_update_calibration_data( sbuf_fsm_ptr_t p_fsm ); 36 37 38 struct _sbuf_fsm_t { 39 fsm_common_t cmn; 40 41 acamera_fsm_mgr_t *p_fsm_mgr; 42 43 fsm_irq_mask_t mask; 44 uint32_t opened; 45 uint32_t mode; 46 uint8_t is_paused; 47 }; 48 49 50 void sbuf_fsm_clear( sbuf_fsm_ptr_t p_fsm ); 51 52 void sbuf_fsm_init( void *fsm, fsm_init_param_t *init_param ); 53 int sbuf_fsm_set_param( void *fsm, uint32_t param_id, void *input, uint32_t input_size ); 54 55 uint8_t sbuf_fsm_process_event( sbuf_fsm_ptr_t p_fsm, event_id_t event_id ); 56 57 void sbuf_fsm_process_interrupt( sbuf_fsm_const_ptr_t p_fsm, uint8_t irq_event ); 58 59 60 #endif /* __SBUF_FSM_H__ */ 61