[feat][ef_ctrl] add ef_ctrl lhal driver

This commit is contained in:
jzlv 2022-11-25 19:47:54 +08:00
parent 3c19b600a0
commit f13440fc48
42 changed files with 2539 additions and 863 deletions

View file

@ -19,6 +19,13 @@ struct bflb_device_s bl602_device_table[] = {
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_DAC,
.user_data = NULL },
{ .name = "ef_ctrl",
.reg_base = EF_CTRL_BASE,
.irq_num = 0xff,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_EF_CTRL,
.user_data = NULL },
{ .name = "gpio",
.reg_base = GLB_BASE,
.irq_num = BL602_IRQ_GPIO_INT0,
@ -169,6 +176,20 @@ struct bflb_device_s bl602_device_table[] = {
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_TIMER,
.user_data = NULL },
{ .name = "irtx",
.reg_base = IR_BASE,
.irq_num = BL602_IRQ_IRTX,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_IR,
.user_data = NULL },
{ .name = "irrx",
.reg_base = IR_BASE,
.irq_num = BL602_IRQ_IRRX,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_IR,
.user_data = NULL },
};
struct bflb_device_s *bflb_device_get_by_name(const char *name)

View file

@ -19,6 +19,13 @@ struct bflb_device_s bl616_device_table[] = {
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_DAC,
.user_data = NULL },
{ .name = "ef_ctrl",
.reg_base = EF_CTRL_BASE,
.irq_num = 0xff,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_EF_CTRL,
.user_data = NULL },
{ .name = "gpio",
.reg_base = GLB_BASE,
.irq_num = BL616_IRQ_GPIO_INT0,

View file

@ -19,6 +19,13 @@ struct bflb_device_s bl702_device_table[] = {
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_DAC,
.user_data = NULL },
{ .name = "ef_ctrl",
.reg_base = EF_CTRL_BASE,
.irq_num = 0xff,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_EF_CTRL,
.user_data = NULL },
{ .name = "gpio",
.reg_base = GLB_BASE,
.irq_num = BL702_IRQ_GPIO_INT0,
@ -176,6 +183,27 @@ struct bflb_device_s bl702_device_table[] = {
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_TIMER,
.user_data = NULL },
{ .name = "irtx",
.reg_base = IR_BASE,
.irq_num = BL702_IRQ_IRTX,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_IR,
.user_data = NULL },
{ .name = "irrx",
.reg_base = IR_BASE,
.irq_num = BL702_IRQ_IRRX,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_IR,
.user_data = NULL },
{ .name = "kys0",
.reg_base = KYS_BASE,
.irq_num = BL702_IRQ_KYS,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_KYS,
.user_data = NULL },
};
struct bflb_device_s *bflb_device_get_by_name(const char *name)

View file

@ -23,6 +23,13 @@ struct bflb_device_s bl808_device_table[] = {
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_DAC,
.user_data = NULL },
{ .name = "ef_ctrl",
.reg_base = EF_CTRL_BASE,
.irq_num = 0xff,
.idx = 0,
.sub_idx = 0,
.dev_type = BFLB_DEVICE_TYPE_EF_CTRL,
.user_data = NULL },
{ .name = "gpio",
.reg_base = GLB_BASE,
#if defined(CPU_M0)