1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #ifndef __FIFO_MONITOR_PUBLIC_H_INCLUDED__ 8 #define __FIFO_MONITOR_PUBLIC_H_INCLUDED__ 9 10 #include "system_local.h" 11 12 typedef struct fifo_channel_state_s fifo_channel_state_t; 13 typedef struct fifo_switch_state_s fifo_switch_state_t; 14 typedef struct fifo_monitor_state_s fifo_monitor_state_t; 15 16 /*! Set a fifo switch multiplex 17 18 \param ID[in] FIFO_MONITOR identifier 19 \param switch_id[in] fifo switch identifier 20 \param sel[in] fifo switch selector 21 22 \return none, fifo_switch[switch_id].sel = sel 23 */ 24 STORAGE_CLASS_FIFO_MONITOR_H void fifo_switch_set( 25 const fifo_monitor_ID_t ID, 26 const fifo_switch_t switch_id, 27 const hrt_data sel); 28 29 /*! Get a fifo switch multiplex 30 31 \param ID[in] FIFO_MONITOR identifier 32 \param switch_id[in] fifo switch identifier 33 34 \return fifo_switch[switch_id].sel 35 */ 36 STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_switch_get( 37 const fifo_monitor_ID_t ID, 38 const fifo_switch_t switch_id); 39 40 /*! Read the state of FIFO_MONITOR[ID] 41 42 \param ID[in] FIFO_MONITOR identifier 43 \param state[out] fifo monitor state structure 44 45 \return none, state = FIFO_MONITOR[ID].state 46 */ 47 void fifo_monitor_get_state( 48 const fifo_monitor_ID_t ID, 49 fifo_monitor_state_t *state); 50 51 /*! Read the state of a fifo channel 52 53 \param ID[in] FIFO_MONITOR identifier 54 \param channel_id[in] fifo channel identifier 55 \param state[out] fifo channel state structure 56 57 \return none, state = fifo_channel[channel_id].state 58 */ 59 void fifo_channel_get_state( 60 const fifo_monitor_ID_t ID, 61 const fifo_channel_t channel_id, 62 fifo_channel_state_t *state); 63 64 /*! Read the state of a fifo switch 65 66 \param ID[in] FIFO_MONITOR identifier 67 \param switch_id[in] fifo switch identifier 68 \param state[out] fifo switch state structure 69 70 \return none, state = fifo_switch[switch_id].state 71 */ 72 void fifo_switch_get_state( 73 const fifo_monitor_ID_t ID, 74 const fifo_switch_t switch_id, 75 fifo_switch_state_t *state); 76 77 /*! Write to a control register of FIFO_MONITOR[ID] 78 79 \param ID[in] FIFO_MONITOR identifier 80 \param reg[in] register index 81 \param value[in] The data to be written 82 83 \return none, FIFO_MONITOR[ID].ctrl[reg] = value 84 */ 85 STORAGE_CLASS_FIFO_MONITOR_H void fifo_monitor_reg_store( 86 const fifo_monitor_ID_t ID, 87 const unsigned int reg, 88 const hrt_data value); 89 90 /*! Read from a control register of FIFO_MONITOR[ID] 91 92 \param ID[in] FIFO_MONITOR identifier 93 \param reg[in] register index 94 \param value[in] The data to be written 95 96 \return FIFO_MONITOR[ID].ctrl[reg] 97 */ 98 STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_monitor_reg_load( 99 const fifo_monitor_ID_t ID, 100 const unsigned int reg); 101 102 #endif /* __FIFO_MONITOR_PUBLIC_H_INCLUDED__ */ 103