2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __FIFO_MONITOR_PUBLIC_H_INCLUDED__
16 #define __FIFO_MONITOR_PUBLIC_H_INCLUDED__
18 #include "system_types.h"
20 typedef struct fifo_channel_state_s fifo_channel_state_t
;
21 typedef struct fifo_switch_state_s fifo_switch_state_t
;
22 typedef struct fifo_monitor_state_s fifo_monitor_state_t
;
24 /*! Set a fifo switch multiplex
26 \param ID[in] FIFO_MONITOR identifier
27 \param switch_id[in] fifo switch identifier
28 \param sel[in] fifo switch selector
30 \return none, fifo_switch[switch_id].sel = sel
32 STORAGE_CLASS_FIFO_MONITOR_H
void fifo_switch_set(
33 const fifo_monitor_ID_t ID
,
34 const fifo_switch_t switch_id
,
37 /*! Get a fifo switch multiplex
39 \param ID[in] FIFO_MONITOR identifier
40 \param switch_id[in] fifo switch identifier
42 \return fifo_switch[switch_id].sel
44 STORAGE_CLASS_FIFO_MONITOR_H hrt_data
fifo_switch_get(
45 const fifo_monitor_ID_t ID
,
46 const fifo_switch_t switch_id
);
48 /*! Read the state of FIFO_MONITOR[ID]
50 \param ID[in] FIFO_MONITOR identifier
51 \param state[out] fifo monitor state structure
53 \return none, state = FIFO_MONITOR[ID].state
55 extern void fifo_monitor_get_state(
56 const fifo_monitor_ID_t ID
,
57 fifo_monitor_state_t
*state
);
59 /*! Read the state of a fifo channel
61 \param ID[in] FIFO_MONITOR identifier
62 \param channel_id[in] fifo channel identifier
63 \param state[out] fifo channel state structure
65 \return none, state = fifo_channel[channel_id].state
67 extern void fifo_channel_get_state(
68 const fifo_monitor_ID_t ID
,
69 const fifo_channel_t channel_id
,
70 fifo_channel_state_t
*state
);
72 /*! Read the state of a fifo switch
74 \param ID[in] FIFO_MONITOR identifier
75 \param switch_id[in] fifo switch identifier
76 \param state[out] fifo switch state structure
78 \return none, state = fifo_switch[switch_id].state
80 extern void fifo_switch_get_state(
81 const fifo_monitor_ID_t ID
,
82 const fifo_switch_t switch_id
,
83 fifo_switch_state_t
*state
);
85 /*! Write to a control register of FIFO_MONITOR[ID]
87 \param ID[in] FIFO_MONITOR identifier
88 \param reg[in] register index
89 \param value[in] The data to be written
91 \return none, FIFO_MONITOR[ID].ctrl[reg] = value
93 STORAGE_CLASS_FIFO_MONITOR_H
void fifo_monitor_reg_store(
94 const fifo_monitor_ID_t ID
,
95 const unsigned int reg
,
96 const hrt_data value
);
98 /*! Read from a control register of FIFO_MONITOR[ID]
100 \param ID[in] FIFO_MONITOR identifier
101 \param reg[in] register index
102 \param value[in] The data to be written
104 \return FIFO_MONITOR[ID].ctrl[reg]
106 STORAGE_CLASS_FIFO_MONITOR_H hrt_data
fifo_monitor_reg_load(
107 const fifo_monitor_ID_t ID
,
108 const unsigned int reg
);
110 #endif /* __FIFO_MONITOR_PUBLIC_H_INCLUDED__ */