project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
62 lines
1.9 KiB
C
62 lines
1.9 KiB
C
/*
|
|
* Copyright (c) 2006-2018, RT-Thread Development Team
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
*/
|
|
#ifndef DATAQUEUE_H__
|
|
#define DATAQUEUE_H__
|
|
|
|
#include <rtthread.h>
|
|
|
|
#define RT_DATAQUEUE_EVENT_UNKNOWN 0x00
|
|
#define RT_DATAQUEUE_EVENT_POP 0x01
|
|
#define RT_DATAQUEUE_EVENT_PUSH 0x02
|
|
#define RT_DATAQUEUE_EVENT_LWM 0x03
|
|
|
|
struct rt_data_item;
|
|
#define RT_DATAQUEUE_SIZE(dq) ((dq)->put_index - (dq)->get_index)
|
|
#define RT_DATAQUEUE_EMPTY(dq) ((dq)->size - RT_DATAQUEUE_SIZE(dq))
|
|
/* data queue implementation */
|
|
struct rt_data_queue
|
|
{
|
|
rt_uint16_t size;
|
|
rt_uint16_t lwm;
|
|
rt_bool_t waiting_lwm;
|
|
|
|
rt_uint16_t get_index;
|
|
rt_uint16_t put_index;
|
|
|
|
struct rt_data_item *queue;
|
|
|
|
rt_list_t suspended_push_list;
|
|
rt_list_t suspended_pop_list;
|
|
|
|
/* event notify */
|
|
void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event);
|
|
};
|
|
|
|
/**
|
|
* DataQueue for DeviceDriver
|
|
*/
|
|
rt_err_t rt_data_queue_init(struct rt_data_queue *queue,
|
|
rt_uint16_t size,
|
|
rt_uint16_t lwm,
|
|
void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event));
|
|
rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
|
|
const void *data_ptr,
|
|
rt_size_t data_size,
|
|
rt_int32_t timeout);
|
|
rt_err_t rt_data_queue_pop(struct rt_data_queue *queue,
|
|
const void **data_ptr,
|
|
rt_size_t *size,
|
|
rt_int32_t timeout);
|
|
rt_err_t rt_data_queue_peak(struct rt_data_queue *queue,
|
|
const void **data_ptr,
|
|
rt_size_t *size);
|
|
void rt_data_queue_reset(struct rt_data_queue *queue);
|
|
|
|
#endif
|