Files
luban-lite-t3e-pro/bsp/artinchip/include/drv/drv_cir.h
刘可亮 7bbc029dae v1.0.0
2023-08-30 16:21:18 +08:00

37 lines
747 B
C

/*
* Copyright (c) 2022-2023, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
* Authors: dwj <weijie.ding@artinchip.com>
*/
#ifndef _DRV_CIR_H_
#define _DRV_CIR_H_
#include "hal_cir.h"
typedef enum cir_protocol {
CIR_PROTOCOL_NEC = 0U,
CIR_PROTOCOL_RC5 = 1U,
} cir_protocol_t;
typedef struct cir_config {
cir_protocol_t protocol;
uint32_t tx_duty;
uint32_t rx_level; /* Indicates the idle level of RX */
} cir_config_t;
typedef struct aic_cir
{
struct rt_device dev;
aic_cir_ctrl_t aic_cir_ctrl;
cir_config_t config;
} aic_cir_t;
#define IOC_CIR_CONFIGURE 1
#define CIR_RX_DONE 1
#define CIR_RX_ERROR 0
#endif