1 /* 2 * Support for Intel Camera Imaging ISP subsystem. 3 * Copyright (c) 2010 - 2015, Intel Corporation. 4 * 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. 8 * 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 12 * more details. 13 */ 14 15 #ifndef _IA_CSS_EVENTQ_H 16 #define _IA_CSS_EVENTQ_H 17 18 #include "ia_css_queue.h" /* queue APIs */ 19 20 /** 21 * @brief HOST receives event from SP. 22 * 23 * @param[in] eventq_handle eventq_handle. 24 * @param[in] payload The event payload. 25 * @return 0 - Successfully dequeue. 26 * @return -EINVAL - Invalid argument. 27 * @return -ENODATA - Queue is empty. 28 */ 29 int ia_css_eventq_recv( 30 ia_css_queue_t *eventq_handle, 31 uint8_t *payload); 32 33 /** 34 * @brief The Host sends the event to SP. 35 * The caller of this API will be blocked until the event 36 * is sent. 37 * 38 * @param[in] eventq_handle eventq_handle. 39 * @param[in] evt_id The event ID. 40 * @param[in] evt_payload_0 The event payload. 41 * @param[in] evt_payload_1 The event payload. 42 * @param[in] evt_payload_2 The event payload. 43 * @return 0 - Successfully enqueue. 44 * @return -EINVAL - Invalid argument. 45 * @return -ENOBUFS - Queue is full. 46 */ 47 int ia_css_eventq_send( 48 ia_css_queue_t *eventq_handle, 49 u8 evt_id, 50 u8 evt_payload_0, 51 u8 evt_payload_1, 52 uint8_t evt_payload_2); 53 #endif /* _IA_CSS_EVENTQ_H */ 54