5 #include "in_compile.h" 19 #define TRIG_ODC_MAX_OUTPUT_NUM 5 20 #define TRIG_MAX_ADDR_OFT 512 23 #define TRIG_SET_TMR_CMD_LEN 1 24 #define TRIG_WAIT_TMR_CMD_LEN 1 25 #define TRIG_REG_RD_COMP_CMD_LEN 4 26 #define TRIG_REG_WR_CMD_LEN 3 27 #define TRIG_REG_RD_MODIFY_WR_CMD_LEN 4 28 #define TRIG_REG_CP_CMD_LEN 3 29 #define TRIG_REG_MASK_CP_CMD_LEN 4 30 #define TRIG_OUTPUT_CMD_LEN 2 31 #define TRIG_NULL_CMD_LEN 1 33 #define TRIG_HIGH_PRI_Q_MAX_TRIG_ID 8 34 #define TRIG_MID_PRI_Q_MAX_TRIG_ID 8 35 #define TRIG_LOW_PRI_Q_MAX_TRIG_ID 16 36 #define TRIG_HIGH_PRI_Q_CMD_START_ADDR TRIG_HIGH_PRI_Q_MAX_TRIG_ID 37 #define TRIG_MID_PRI_Q_CMD_START_ADDR TRIG_MID_PRI_Q_MAX_TRIG_ID 38 #define TRIG_LOW_PRI_Q_CMD_START_ADDR TRIG_LOW_PRI_Q_MAX_TRIG_ID 42 #define TRIG_HP_INTR_CMD_COMPLETED 0x1 43 #define TRIG_HP_INTR_QUEUE_OV 0x2 44 #define TRIG_HP_INTR_QUEUE_EMPTY 0x4 45 #define TRIG_HP_INTR_INVALID_CMD 0x8 46 #define TRIG_HP_INTR_TIMER_TMO 0x10 47 #define TRIG_HP_INTR_TIMER_DONE 0x20 48 #define TRIG_HP_INTR_READ_COMPARE_FAIL 0x40 50 #define TRIG_MP_INTR_CMD_COMPLETED 0x100 51 #define TRIG_MP_INTR_QUEUE_OV 0x200 52 #define TRIG_MP_INTR_QUEUE_EMPTY 0x400 53 #define TRIG_MP_INTR_INVALID_CMD 0x800 54 #define TRIG_MP_INTR_TIMER_TMO 0x1000 55 #define TRIG_MP_INTR_TIMER_DONE 0x2000 56 #define TRIG_MP_INTR_READ_COMPARE_FAIL 0x4000 58 #define TRIG_LP_INTR_CMD_COMPLETED 0x10000 59 #define TRIG_LP_INTR_QUEUE_OV 0x20000 60 #define TRIG_LP_INTR_QUEUE_EMPTY 0x40000 61 #define TRIG_LP_INTR_INVALID_CMD 0x80000 62 #define TRIG_LP_INTR_TIMER_TMO 0x100000 63 #define TRIG_LP_INTR_TIMER_DONE 0x200000 64 #define TRIG_LP_INTR_READ_COMPARE_FAIL 0x400000 67 #define TRIG_HP_INTR_CMD_START 0x1 68 #define TRIG_HP_INTR_CMD_DONE 0x2 69 #define TRIG_MP_INTR_CMD_START 0x10 70 #define TRIG_MP_INTR_CMD_DONE 0x20 71 #define TRIG_LP_INTR_CMD_START 0x100 72 #define TRIG_LP_INTR_CMD_DONE 0x200 332 TRIG_REG_4_BYTES = 2,
383 void (*irq_cb)(
void *arg, uint32_t status0, uint32_t status1);
405 int odc_idx[TRIG_ODC_MAX_OUTPUT_NUM];
406 uint8_t init_value[TRIG_ODC_MAX_OUTPUT_NUM];
407 uint8_t value[TRIG_ODC_MAX_OUTPUT_NUM];
408 uint8_t toggle_en[TRIG_ODC_MAX_OUTPUT_NUM];
496 static INLINE uint32_t trig_intr_status(
void)
498 return RD_WORD(TRIG_HANDLER_REGS_INTR_STATUS);
500 static INLINE
void trig_intr_clear(uint32_t val)
502 WR_WORD(TRIG_HANDLER_REGS_INTR_CLEAR, val);
504 static INLINE
void trig_intr_mask(uint32_t val)
506 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_SET, val);
508 static INLINE
void trig_intr_unmask(uint32_t val)
510 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_CLEAR, val);
512 static INLINE uint32_t trig_intr_status1(
void)
514 return RD_WORD(TRIG_HANDLER_REGS_INTR_STATUS_1);
516 static INLINE
void trig_intr_clear1(uint32_t val)
518 WR_WORD(TRIG_HANDLER_REGS_INTR_CLEAR_1, val);
519 WR_WORD(TRIG_HANDLER_REGS_INTR_CLEAR, 0);
520 WR_WORD(TRIG_HANDLER_REGS_INTR_CLEAR_1, 0);
522 static INLINE
void trig_intr_mask1(uint32_t val)
524 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_SET_1, val);
525 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_SET, 0);
526 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_SET_1, 0);
528 static INLINE
void trig_intr_unmask1(uint32_t val)
530 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_CLEAR_1, val);
531 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_CLEAR, 0);
532 WR_WORD(TRIG_HANDLER_REGS_INTR_MASK_CLEAR_1, 0);
536 static INLINE
void trig_en(
int en)
538 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MISC_CTRL);
540 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_TRIG_HANDLER_EN;
542 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_TRIG_HANDLER_EN;
544 WR_WORD(TRIG_HANDLER_REGS_MISC_CTRL, reg);
546 static INLINE
void trig_hp_queue_en(
int en,
int invalid_cmd)
548 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MISC_CTRL);
550 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_HP_QUEUE_EN;
552 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_HP_QUEUE_EN;
555 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_HP_INVALID_CMD_CONT;
557 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_HP_INVALID_CMD_CONT;
559 WR_WORD(TRIG_HANDLER_REGS_MISC_CTRL, reg);
561 static INLINE
void trig_mp_queue_en(
int en,
int invalid_cmd)
563 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MISC_CTRL);
565 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_MP_QUEUE_EN;
567 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_MP_QUEUE_EN;
570 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_MP_INVALID_CMD_CONT;
572 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_MP_INVALID_CMD_CONT;
574 WR_WORD(TRIG_HANDLER_REGS_MISC_CTRL, reg);
576 static INLINE
void trig_lp_queue_en(
int en,
int invalid_cmd)
578 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MISC_CTRL);
580 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_LP_QUEUE_EN;
582 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_LP_QUEUE_EN;
585 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_LP_INVALID_CMD_CONT;
587 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_LP_INVALID_CMD_CONT;
589 WR_WORD(TRIG_HANDLER_REGS_MISC_CTRL, reg);
591 static INLINE
void trig_dedmem_sw_access_en(
int en)
593 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MISC_CTRL);
595 reg |= TRIG_HANDLER_REGS_MISC_CTRL_CTL_DEDM_SW_ACCESS_EN;
597 reg &=~TRIG_HANDLER_REGS_MISC_CTRL_CTL_DEDM_SW_ACCESS_EN;
599 WR_WORD(TRIG_HANDLER_REGS_MISC_CTRL, reg);
601 static INLINE
void trig_dedmem_wr_init_addr(uint32_t addr)
603 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_DEDM_INI_ADDR);
604 reg &= ~TRIG_HANDLER_REGS_DEDM_INI_ADDR_CTL_DEDM_WR_INI_ADDR;
605 reg |= (addr&TRIG_HANDLER_REGS_DEDM_INI_ADDR_CTL_DEDM_WR_INI_ADDR_MASK)<<TRIG_HANDLER_REGS_DEDM_INI_ADDR_CTL_DEDM_WR_INI_ADDR_SHIFT;
606 WR_WORD(TRIG_HANDLER_REGS_DEDM_INI_ADDR, addr);
608 static INLINE
void trig_dedmem_rd_init_addr(uint32_t addr)
610 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_DEDM_INI_ADDR);
611 reg &= ~TRIG_HANDLER_REGS_DEDM_INI_ADDR_CTL_DEDM_RD_INI_ADDR;
612 reg |= (addr&TRIG_HANDLER_REGS_DEDM_INI_ADDR_CTL_DEDM_RD_INI_ADDR_MASK)<<TRIG_HANDLER_REGS_DEDM_INI_ADDR_CTL_DEDM_RD_INI_ADDR_SHIFT;
613 WR_WORD(TRIG_HANDLER_REGS_DEDM_INI_ADDR, addr);
615 static INLINE
void trig_dedmem_wr_data(uint32_t data)
617 WR_WORD(TRIG_HANDLER_REGS_DEDM_WDATA, data);
619 static INLINE uint32_t trig_dedmem_rd_data(
void)
621 return RD_WORD(TRIG_HANDLER_REGS_DEDM_RDATA);
623 static INLINE
void trig_sw_trig(
int en, uint32_t sw_id)
625 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_SW_TRIG);
631 WR_WORD(TRIG_HANDLER_REGS_SW_TRIG, reg);
633 static INLINE
void trig_set_lp_mem_addr(uint32_t addr_offset)
635 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET);
636 reg &= ~TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_LP_MEM_ADDR_OFFSET;
637 reg |= (addr_offset & TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_LP_MEM_ADDR_OFFSET_MASK)<<TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_LP_MEM_ADDR_OFFSET_SHIFT;
638 WR_WORD(TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET, reg);
640 static INLINE
void trig_set_mp_mem_addr(uint32_t addr_offset)
642 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET);
643 reg &= ~TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_MP_MEM_ADDR_OFFSET;
644 reg |= (addr_offset & TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_MP_MEM_ADDR_OFFSET_MASK)<<TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_MP_MEM_ADDR_OFFSET_SHIFT;
645 WR_WORD(TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET, reg);
647 static INLINE uint32_t trig_get_lp_mem_addr(
void)
649 return (RD_WORD(TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET)>>TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_LP_MEM_ADDR_OFFSET_SHIFT)&TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_LP_MEM_ADDR_OFFSET_MASK;
651 static INLINE uint32_t trig_get_mp_mem_addr(
void)
653 return (RD_WORD(TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET)>>TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_MP_MEM_ADDR_OFFSET_SHIFT)&TRIG_HANDLER_REGS_MP_LP_MEM_ADDR_OFFSET_CTL_MP_MEM_ADDR_OFFSET_MASK;
655 static INLINE
void trig_hp_trig_idx(uint8_t trig_id, uint8_t sig_idx)
657 uint32_t addr, reg, shift;
659 addr = TRIG_HANDLER_REGS_HP_TRIG_IDX_GROUP_1;
661 addr = TRIG_HANDLER_REGS_HP_TRIG_IDX_GROUP_0;
662 shift = (trig_id%4)*8;
664 reg &= ~(0xFF<<shift);
665 reg |= sig_idx<<shift;
668 static INLINE
void trig_mp_trig_idx(uint8_t trig_id, uint8_t sig_idx)
670 uint32_t addr, reg, shift;
672 addr = TRIG_HANDLER_REGS_MP_TRIG_IDX_GROUP_1;
674 addr = TRIG_HANDLER_REGS_MP_TRIG_IDX_GROUP_0;
675 shift = (trig_id%4)*8;
677 reg &= ~(0xFF<<shift);
678 reg |= sig_idx<<shift;
681 static INLINE
void trig_lp_trig_idx(uint8_t trig_id, uint8_t sig_idx)
683 uint32_t addr, reg, shift;
684 uint8_t group = trig_id/4;
686 addr = TRIG_HANDLER_REGS_LP_TRIG_IDX_GROUP_1;
688 addr = TRIG_HANDLER_REGS_LP_TRIG_IDX_GROUP_2;
690 addr = TRIG_HANDLER_REGS_LP_TRIG_IDX_GROUP_3;
692 addr = TRIG_HANDLER_REGS_LP_TRIG_IDX_GROUP_0;
693 shift = (trig_id%4)*8;
695 reg &= ~(0xFF<<shift);
696 reg |= sig_idx<<shift;
699 static INLINE
void trig_hp_rising_edge_en(uint8_t trig_id,
int en)
702 WR_WORD(TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_SET_CTL_HP_TRIG_RISE_EDGE_EN_SET_SHIFT));
704 WR_WORD(TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_SET_CTL_HP_TRIG_RISE_EDGE_EN_SET_SHIFT));
707 static INLINE
void trig_mp_rising_edge_en(uint8_t trig_id,
int en)
710 WR_WORD(TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR_CTL_MP_TRIG_RISE_EDGE_EN_CLR_SHIFT));
712 WR_WORD(TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR_CTL_MP_TRIG_RISE_EDGE_EN_CLR_SHIFT));
715 static INLINE
void trig_lp_rising_edge_en(uint8_t trig_id,
int en)
718 WR_WORD(TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR_CTL_LP_TRIG_RISE_EDGE_EN_CLR_SHIFT));
720 WR_WORD(TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_RISE_EDGE_EN_CLR_CTL_LP_TRIG_RISE_EDGE_EN_CLR_SHIFT));
723 static INLINE
void trig_hp_falling_edge_en(uint8_t trig_id,
int en)
726 WR_WORD(TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET_CTL_HP_TRIG_FALL_EDGE_EN_SET_SHIFT));
728 WR_WORD(TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET_CTL_HP_TRIG_FALL_EDGE_EN_SET_SHIFT));
731 static INLINE
void trig_mp_falling_edge_en(uint8_t trig_id,
int en)
734 WR_WORD(TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET_CTL_MP_TRIG_FALL_EDGE_EN_SET_SHIFT));
736 WR_WORD(TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET_CTL_MP_TRIG_FALL_EDGE_EN_SET_SHIFT));
739 static INLINE
void trig_lp_falling_edge_en(uint8_t trig_id,
int en)
742 WR_WORD(TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET_CTL_LP_TRIG_FALL_EDGE_EN_SET_SHIFT));
744 WR_WORD(TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET, 1<<(trig_id+TRIG_HANDLER_REGS_TRIG_FALL_EDGE_EN_SET_CTL_LP_TRIG_FALL_EDGE_EN_SET_SHIFT));
748 static INLINE
void trig_ctl_gpio_out_0(
int en, uint32_t idx)
750 uint32_t reg = RD_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OUT_0);
756 WR_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OUT_0, reg);
758 static INLINE
void trig_ctl_gpio_out_1(
int en, uint32_t idx)
760 uint32_t reg = RD_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OUT_1);
766 WR_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OUT_1, reg);
768 static INLINE
void trig_ctl_gpio_oe_0(
int en, uint32_t idx)
770 uint32_t reg = RD_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OE_0);
776 WR_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OE_0, reg);
778 static INLINE
void trig_ctl_gpio_oe_1(
int en, uint32_t idx)
780 uint32_t reg = RD_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OE_1);
786 WR_WORD(GLOBAL2_REG_TRIG_HANDLR_CTL_GPIO_OE_1, reg);
790 static INLINE
void trig_hdl_apb_mux(uint32_t pos, uint32_t val)
792 uint32_t reg = RD_WORD(GLOBAL2_REG_TRIG_HANDLR_APB_MASTER_MUX_CTRL);
798 WR_WORD(GLOBAL2_REG_TRIG_HANDLR_APB_MASTER_MUX_CTRL, reg);
801 static INLINE
void trig_hp_tmr_init_tick(uint32_t val)
803 WR_WORD(TRIG_HANDLER_REGS_HP_INI_TIMER_VALUE, val);
806 static INLINE
void trig_mp_tmr_init_tick(uint32_t val)
808 WR_WORD(TRIG_HANDLER_REGS_MP_INI_TIMER_VALUE, val);
811 static INLINE
void trig_lp_tmr_init_tick(uint32_t val)
813 WR_WORD(TRIG_HANDLER_REGS_LP_INI_TIMER_VALUE, val);
816 static INLINE
void trig_hp_tmr_reload_tick(uint32_t val)
818 WR_WORD(TRIG_HANDLER_REGS_HP_RELOAD_TIMER_VALUE, val);
821 static INLINE
void trig_mp_tmr_reload_tick(uint32_t val)
823 WR_WORD(TRIG_HANDLER_REGS_MP_RELOAD_TIMER_VALUE, val);
826 static INLINE
void trig_lp_tmr_reload_tick(uint32_t val)
828 WR_WORD(TRIG_HANDLER_REGS_LP_RELOAD_TIMER_VALUE, val);
831 static INLINE
void trig_apb_mux(uint32_t pos,
int apb_sel)
833 uint32_t reg = RD_WORD(GLOBAL2_REG_TRIG_HANDLR_APB_MASTER_MUX_CTRL);
839 WR_WORD(GLOBAL2_REG_TRIG_HANDLR_APB_MASTER_MUX_CTRL, reg);
842 static INLINE
void trig_odc_init_val(uint32_t sig0, uint32_t val0, uint32_t sig1, uint32_t val1)
845 reg = ((sig0&TRIG_HANDLER_REGS_ODC_INI_VAL_CTL_ODC_IDX_0_MASK)<<TRIG_HANDLER_REGS_ODC_INI_VAL_CTL_ODC_IDX_0_SHIFT)
847 | ((sig1&TRIG_HANDLER_REGS_ODC_INI_VAL_CTL_ODC_IDX_1_MASK)<<TRIG_HANDLER_REGS_ODC_INI_VAL_CTL_ODC_IDX_1_SHIFT)
849 WR_WORD(TRIG_HANDLER_REGS_ODC_INI_VAL, reg);
852 static INLINE
void trig_hp_intr_sig(uint8_t sig)
854 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX);
855 reg &= ~TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_HP_SPECIFIED_TRIG_IDX;
856 reg |= (sig&TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_HP_SPECIFIED_TRIG_IDX_MASK)<<TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_HP_SPECIFIED_TRIG_IDX_SHIFT;
857 WR_WORD(TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX, reg);
859 static INLINE
void trig_mp_intr_sig(uint8_t sig)
861 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX);
862 reg &= ~TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_MP_SPECIFIED_TRIG_IDX;
863 reg |= (sig&TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_MP_SPECIFIED_TRIG_IDX_MASK)<<TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_MP_SPECIFIED_TRIG_IDX_SHIFT;
864 WR_WORD(TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX, reg);
866 static INLINE
void trig_lp_intr_sig(uint8_t sig)
868 uint32_t reg = RD_WORD(TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX);
869 reg &= ~TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_LP_SPECIFIED_TRIG_IDX;
870 reg |= (sig&TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_LP_SPECIFIED_TRIG_IDX_MASK)<<TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX_CTL_LP_SPECIFIED_TRIG_IDX_SHIFT;
871 WR_WORD(TRIG_HANDLER_REGS_SPECIFIED_TRIG_IDX, reg);
Front end TX enable.
Definition: hal_trig.h:204
I2C1 register APB mux.
Definition: hal_trig.h:110
int auto_resume
1: auto resume, 0: mannual resume,should call hal_trig_resume to resume trigger.
Definition: hal_trig.h:382
int size
Copye size, enum trig_reg_cp_len_t.
Definition: hal_trig.h:467
AON timer 1 timeout IRQ.
Definition: hal_trig.h:241
TRX sequencer TX enable GPIO A.
Definition: hal_trig.h:171
System tick aon timer start ack signal.
Definition: hal_trig.h:246
TRX sequencer register.
Definition: hal_trig.h:370
int hal_trig_reg_wr_cmd(int queue, uint32_t addr_offset, trig_reg_wr_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger register write command.
Start of Sync sequence Tx in IPMAC.
Definition: hal_trig.h:220
Snapshot IPMAC timestamp counter(superframe + 24bit free running counter)
Definition: hal_trig.h:135
Snapshot trigger handler low priority queue timer.
Definition: hal_trig.h:140
trig_sig_idx
trigger signal index
Definition: hal_trig.h:154
IPMAC free running IRQ 1.
Definition: hal_trig.h:189
BLE IRQ signal 1, set irq signal with hal_trig_sig_ble_irq.
Definition: hal_trig.h:227
AGC too high.
Definition: hal_trig.h:211
uint32_t mp_mem_addr
Mid priority queue mem address offset. Unit is word, not byte.
Definition: hal_trig.h:387
AON timer 0 timeout IRQ.
Definition: hal_trig.h:240
Timer 0 emit 7 signal.
Definition: hal_trig.h:267
GPIO output base index, hal_trig_sig_gpio_output_idx.
Definition: hal_trig.h:156
IPMAC frame start.
Definition: hal_trig.h:213
Master SPI1 register APB mux.
Definition: hal_trig.h:115
Timer 6(addtional timer 0) emit 7 signal.
Definition: hal_trig.h:185
Modem sync found.
Definition: hal_trig.h:208
CPU in lockup.
Definition: hal_trig.h:232
End of TX IRQ.
Definition: hal_trig.h:309
AON timer 2 capture signal 0 captured.
Definition: hal_trig.h:258
int stop_timer
1 Stop timer, 0:Don't stop timer
Definition: hal_trig.h:425
Timer 1 timeout IRQ.
Definition: hal_trig.h:251
Timer 0 emit 2 signal.
Definition: hal_trig.h:262
uint32_t intr_unmask0
Interrupt unmask 0,.
Definition: hal_trig.h:385
I2C1.
Definition: hal_trig.h:363
Timer 0 emit 8 signal.
Definition: hal_trig.h:158
Timer 3 timeout IRQ.
Definition: hal_trig.h:253
Not equal.
Definition: hal_trig.h:348
Max queue.
Definition: hal_trig.h:92
Timer 6(addtional timer 0) emit 9 signal.
Definition: hal_trig.h:187
uint32_t hal_trig_curr_cmd_addr(int queue)
Get current command address. This address is used for next command. It is word address offset...
uint32_t lp_mem_addr
Low priority queue mem address offset. Unit is word, not byte.
Definition: hal_trig.h:388
System tick signal.
Definition: hal_trig.h:274
BLE TX enable.
Definition: hal_trig.h:198
Larger.
Definition: hal_trig.h:349
Timestamp target IRQ.
Definition: hal_trig.h:302
uint32_t write_value
Write value.
Definition: hal_trig.h:449
Snapshot timer 8(additional timer 2)
Definition: hal_trig.h:144
Sync found signal outside of sync window.
Definition: hal_trig.h:201
Global register.
Definition: hal_trig.h:366
External input WLAN TX signal.
Definition: hal_trig.h:206
int hal_trig_tmr_init_tick(int queue, uint32_t init_val)
Set trigger timer initial tick value to register.
int hal_trig_reg_copy_cmd(int queue, uint32_t addr_offset, trig_reg_cp_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger register copy and write command.
BLE deep sleep enable.
Definition: hal_trig.h:223
I2C0.
Definition: hal_trig.h:362
TRX sequencer RX enable GPIO.
Definition: hal_trig.h:170
uint32_t write_value
Write value.
Definition: hal_trig.h:458
Half slot IRQ.
Definition: hal_trig.h:311
Timer 1 emit 0 signal.
Definition: hal_trig.h:160
trigger set timer command parameter
Definition: hal_trig.h:414
CPU in halt.
Definition: hal_trig.h:231
CPU IRQ signal 6, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:282
Snapshot timer 5.
Definition: hal_trig.h:134
int hal_trig_reg_rd_cmp_cmd(int queue, uint32_t addr_offset, trig_reg_rd_cmp_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger register read and compare command.
Timer 0 emit 9 signal.
Definition: hal_trig.h:159
Snapshot timer 1.
Definition: hal_trig.h:130
Sync found signal in sync window.
Definition: hal_trig.h:200
void * cb_arg
Callback args.
Definition: hal_trig.h:384
uint32_t target_time
Target time.
Definition: hal_trig.h:426
GPIO ie/oe base index. To set oe or ie, hal_trig_sig_gpio_ie_oe.
Definition: hal_trig.h:157
Snapshot timer 2.
Definition: hal_trig.h:131
Snapshot timer 9(additional timer 3)
Definition: hal_trig.h:145
int reg_bus
Register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:457
trig_reg_cp_len_t
trigger register copy length
Definition: hal_trig.h:329
IPMAC free running us tick.
Definition: hal_trig.h:195
void hal_trig_close(void)
Close Trig device.
BLE IRQ signal 0, set irq signal with hal_trig_sig_ble_irq.
Definition: hal_trig.h:226
uint32_t mask
Register read mask.
Definition: hal_trig.h:440
int hal_trig_wr_header(int queue, int trig_id, trig_hdr_t *hdr)
Write trig header.
MPLL locked.
Definition: hal_trig.h:273
trig_timer_val_t
trigger timer value
Definition: hal_trig.h:321
Scheduler FSM timeout IRQ.
Definition: hal_trig.h:316
int reg_bus
Register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:448
Copy 1 byte.
Definition: hal_trig.h:330
Timer 6(addtional timer 0) timeout IRQ.
Definition: hal_trig.h:174
Timer 1 emit 8 signal.
Definition: hal_trig.h:168
Snapshot AON timer 2.
Definition: hal_trig.h:126
uint32_t init_value
initial value
Definition: hal_trig.h:418
unused index
Definition: hal_trig.h:148
int irq_prio
Trig interrupt priority.
Definition: hal_trig.h:381
End of sleep IRQ.
Definition: hal_trig.h:308
ADC.
Definition: hal_trig.h:365
I2C0 register APB mux.
Definition: hal_trig.h:111
Timer 1 emit 5 signal.
Definition: hal_trig.h:165
CPU IRQ signal 7, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:283
Master SPI1.
Definition: hal_trig.h:358
Event scheduler main FSM timeout IRQ.
Definition: hal_trig.h:312
Error IRQ.
Definition: hal_trig.h:303
int hal_trig_sig_gpio_ie_oe(int port, int pin, int oe)
Set trigger signal for GPIO ie/oe.
uint8_t run_until_invalid
Run until invalid command.
Definition: hal_trig.h:398
PD1 Watch dog reset.
Definition: hal_trig.h:196
Middle priority queue.
Definition: hal_trig.h:90
uint32_t wait_time
Wait time, 0 ~ 255.
Definition: hal_trig.h:437
Timer 0 emit 3 signal.
Definition: hal_trig.h:263
int hal_trig_odc_gpio_output_idx(int port, int pin)
Get GPIO output index for trigger ODC index.
End of RX IRQ.
Definition: hal_trig.h:310
trig_apb_mux_t
trigger apb bus mux
Definition: hal_trig.h:356
int reload_src
1: reload value from register, 0: reload value is same as init_value.
Definition: hal_trig.h:417
Snapshot timer 3.
Definition: hal_trig.h:132
trigger handler parameter
Definition: hal_trig.h:394
Timer 0 emit 6 signal.
Definition: hal_trig.h:266
BLE or IPMAC in sync search mode.
Definition: hal_trig.h:209
Input osc_en from PD0.
Definition: hal_trig.h:222
uint32_t fail_cmd_addr
Fail command address, 0 ~ 255, word address.
Definition: hal_trig.h:436
Timer 0 emit 4 signal.
Definition: hal_trig.h:264
Global register APB mux.
Definition: hal_trig.h:106
Timer register APB mux.
Definition: hal_trig.h:109
End of event IRQ.
Definition: hal_trig.h:306
trig_ble_irq_t
BLE IRQ signal.
Definition: hal_trig.h:298
AON timer 2 emit 1 signal.
Definition: hal_trig.h:257
CPU IRQ signal 3, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:279
IPMAC slave in sync.
Definition: hal_trig.h:190
CPLL reset.
Definition: hal_trig.h:268
TRX sequencer general-purpose toggle signal, check register 0x46a04034 to 0x46a040FC.
Definition: hal_trig.h:173
Timer 1 emit 4 signal.
Definition: hal_trig.h:164
Trigger timer use register initial/reload value.
Definition: hal_trig.h:323
int init_src
1: initial value from register, 0: initial value from init_value.
Definition: hal_trig.h:416
trigger register read and write command parameter
Definition: hal_trig.h:456
Timer 0 emit 5 signal.
Definition: hal_trig.h:265
int hal_trig_set_mem_addr(int queue, uint32_t mem_addr)
Set share mem word address.
Slave SPI.
Definition: hal_trig.h:359
Start of preamble Tx in IPMAC.
Definition: hal_trig.h:221
uint32_t exp_value
Expected value.
Definition: hal_trig.h:441
int hal_trig_output_cmd(int queue, uint32_t addr_offset, trig_output_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger output direct control command.
uint32_t reg_addr
Register address.
Definition: hal_trig.h:439
Timer 0 timeout IRQ.
Definition: hal_trig.h:250
int hal_trig_set_sig(int queue, int trig_id, trig_sig_t *sig)
Set trig signal.
Copy 2 bytes.
Definition: hal_trig.h:331
PA reached target gain.
Definition: hal_trig.h:234
Snapshot timer 7(additional timer 1)
Definition: hal_trig.h:143
TRX register.
Definition: hal_trig.h:371
int hal_trig_queue_enable(int queue)
Enable trig queue.
PA off.
Definition: hal_trig.h:235
AON watch dog timer timeout IRQ.
Definition: hal_trig.h:244
Snapshot BLE baseband counter(CLKN and fine)
Definition: hal_trig.h:127
int falling_edge
1:enable falling edge, 0:disable falling edge
Definition: hal_trig.h:492
int src_bus
Source register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:479
int hal_trig_open(trig_init_t *init)
Open Trig device.
Enable RX I/Q capture.
Definition: hal_trig.h:123
int dst_bus
Destination register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:480
int sig_idx
Trig signal index.
Definition: hal_trig.h:490
IPMAC slave tx done.
Definition: hal_trig.h:216
IPMAC background scan start.
Definition: hal_trig.h:192
uint32_t dst_addr
Destination register address.
Definition: hal_trig.h:471
Timer 6(addtional timer 0) emit 2 signal.
Definition: hal_trig.h:180
GPIO oen base index, hal_trig_odc_gpio_oen_idx.
Definition: hal_trig.h:100
IPMAC in suspend.
Definition: hal_trig.h:229
trigger register write command parameter
Definition: hal_trig.h:447
Software IRQ.
Definition: hal_trig.h:299
Timer 9(addtional timer 3) timeout IRQ.
Definition: hal_trig.h:177
uint32_t reg_addr
Register address.
Definition: hal_trig.h:450
trigger condition parameter
Definition: hal_trig.h:489
Timer 1 emit 9 signal.
Definition: hal_trig.h:169
Memory overflow.
Definition: hal_trig.h:81
External input WLAN RX signal.
Definition: hal_trig.h:207
Snapshot IPMAC counter(superframe, duration, and fine)
Definition: hal_trig.h:128
Snapshot timer 0.
Definition: hal_trig.h:129
Fine target timer IRQ.
Definition: hal_trig.h:300
trigger direct output command parameter
Definition: hal_trig.h:404
Share memory register.
Definition: hal_trig.h:369
int hal_trig_intr_sig(int queue, int trig_sig)
Set trigger signal for interrupt status 1, TRIG_HP_INTR_CMD_START.
uint32_t max_rd_num
Max number of read allowed, 0 ~ 255, 0 is forever.
Definition: hal_trig.h:438
MPLL reset.
Definition: hal_trig.h:271
Less.
Definition: hal_trig.h:350
Wake up source ready signal.
Definition: hal_trig.h:249
uint32_t intr_unmask1
Interrupt unmask 1,.
Definition: hal_trig.h:386
trig_err
trigger error code
Definition: hal_trig.h:78
int hal_trig_odc_gpio_oen_en(int port, int pin, int en)
Enable GPIO OE for trigger ODC output.
int cmp_cond
Compare condition, enum trig_reg_comp_cond_t.
Definition: hal_trig.h:434
2M data rate
Definition: hal_trig.h:202
Timer 4 timeout IRQ.
Definition: hal_trig.h:254
Timer 1 emit 3 signal.
Definition: hal_trig.h:163
GPIO input base index, hal_trig_sig_gpio_input_idx.
Definition: hal_trig.h:155
ADC register APB mux.
Definition: hal_trig.h:108
uint32_t dst_addr
Destination register address.
Definition: hal_trig.h:482
Timer additional register(timer6 ~ timer9)
Definition: hal_trig.h:373
Event FSM CLKN miss IRQ.
Definition: hal_trig.h:313
Snapshot BLE timestamp counter(27 bits)
Definition: hal_trig.h:136
uint16_t cmd_num
Command number.
Definition: hal_trig.h:396
IPMAC background scan channel done.
Definition: hal_trig.h:193
BLE CLKN matched(value 0)
Definition: hal_trig.h:284
BLE CLKN matched(value 1)
Definition: hal_trig.h:285
Equal.
Definition: hal_trig.h:347
AON timer 2 emit 0 signal.
Definition: hal_trig.h:256
Trigger handler APB mux.
Definition: hal_trig.h:105
High priority queue.
Definition: hal_trig.h:89
int hal_trig_wait_tmr_cmd(int queue, uint32_t addr_offset, trig_wait_tmr_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger wait timer command.
PWM.
Definition: hal_trig.h:368
IPMAC master tx done.
Definition: hal_trig.h:217
CPLL enable.
Definition: hal_trig.h:269
int hal_trig_null_cmd(int queue, uint32_t addr_offset, uint32_t *cmd_addr_oft)
Null command.
PA 2.4G enable.
Definition: hal_trig.h:203
TRX sequencer TX enable GPIO B.
Definition: hal_trig.h:172
uint32_t mask
Mask.
Definition: hal_trig.h:460
trigger wait timer command parameter
Definition: hal_trig.h:424
Trigger timer use command initial/reload value.
Definition: hal_trig.h:322
Timer 0 emit 0 signal.
Definition: hal_trig.h:260
Timer 5 timeout IRQ.
Definition: hal_trig.h:255
int reg_bus
Register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:435
uint32_t mask
Mask.
Definition: hal_trig.h:483
TRX sequencer register APB MUX.
Definition: hal_trig.h:102
TRX register APB mux.
Definition: hal_trig.h:101
Snapshot system tick counter (coarse and fine)
Definition: hal_trig.h:137
Timer 6(addtional timer 0) emit 0 signal.
Definition: hal_trig.h:178
int hal_trig_set_tmr_cmd(int queue, uint32_t addr_offset, trig_set_tmr_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger set timer command.
Timer 7(addtional timer 1) timeout IRQ.
Definition: hal_trig.h:175
Software trigger 1.
Definition: hal_trig.h:290
int auto_reload
1: auto reload, 0: Don't auto reload
Definition: hal_trig.h:415
CPU IRQ signal 5, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:281
Start of preamble Tx in BLE baseband.
Definition: hal_trig.h:219
System tick aon timer emit signal.
Definition: hal_trig.h:248
CPU IRQ signal 4, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:280
Snapshot timer 6(additional timer 0)
Definition: hal_trig.h:142
Enable IPMAC.
Definition: hal_trig.h:119
CPU reset.
Definition: hal_trig.h:233
void hal_trig_resume(void)
Manually resume trigger after wake up. Should set auto_resume to 0 when open trigger.
Timer 8(addtional timer 2) timeout IRQ.
Definition: hal_trig.h:176
GPIO output base index, hal_trig_odc_gpio_output_idx.
Definition: hal_trig.h:99
UART0.
Definition: hal_trig.h:360
int hal_trig_sig_gpio_input_idx(int port, int pin)
Get GPIO input index for trigger signal.
Timer 6(addtional timer 0) emit 6 signal.
Definition: hal_trig.h:184
CM4 system bus address match with an address specified in a global control register.
Definition: hal_trig.h:286
Snapshot trigger handler high priority queue timer.
Definition: hal_trig.h:138
Timer 1 emit 6 signal.
Definition: hal_trig.h:166
BLE RX packet with CRC fail.
Definition: hal_trig.h:224
AGC too low.
Definition: hal_trig.h:210
int hal_trig_odc_gpio_oen_idx(int port, int pin)
Get GPIO OE index for trigger ODC index.
trig_reg_bus_t
trigger register access bus
Definition: hal_trig.h:338
CM4 program counter matched with an address specified in a global control register.
Definition: hal_trig.h:288
int hal_trig_queue_disable(int queue)
Disable trig queue.
CM4 data bus address match with an address specified in a global control register.
Definition: hal_trig.h:287
Global2 register APB mux.
Definition: hal_trig.h:107
XO ready from PD0.
Definition: hal_trig.h:238
Timer 6(addtional timer 0) emit 4 signal.
Definition: hal_trig.h:182
Input BOD2 out from PMU.
Definition: hal_trig.h:237
Global2 register.
Definition: hal_trig.h:372
UART1 register APB mux.
Definition: hal_trig.h:112
int src_bus
Source register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:468
System tick aon timer timeout IRQ.
Definition: hal_trig.h:247
BLE event start.
Definition: hal_trig.h:212
Cryption IRQ.
Definition: hal_trig.h:304
Event Skipped IRQ.
Definition: hal_trig.h:307
int dst_bus
Destination register access bus, enum trig_reg_bus_t.
Definition: hal_trig.h:469
IPMAC master rx done.
Definition: hal_trig.h:214
Front end RX enable.
Definition: hal_trig.h:205
Input BOD out from PMU.
Definition: hal_trig.h:236
Timer 1 emit 1 signal.
Definition: hal_trig.h:161
CPLL locked.
Definition: hal_trig.h:270
Timer 0 ~ timer 5.
Definition: hal_trig.h:364
uint8_t run_until_null
Run until null command.
Definition: hal_trig.h:397
PD1 Watch dog timeout IRQ.
Definition: hal_trig.h:197
MPLL enable.
Definition: hal_trig.h:272
trigger register copy with mask command parameter
Definition: hal_trig.h:477
Slave SPI APB mux.
Definition: hal_trig.h:114
Software trigger 2.
Definition: hal_trig.h:291
Timer 6(addtional timer 0) emit 8 signal.
Definition: hal_trig.h:186
int hal_trig_sig_gpio_output_idx(int port, int pin)
Get GPIO output index for trigger signal.
uint32_t src_addr
Source register address.
Definition: hal_trig.h:481
uint32_t src_addr
Source register address.
Definition: hal_trig.h:470
Disable.
Definition: hal_trig.h:292
Start of envent IRQ.
Definition: hal_trig.h:305
Snapshot timer 4.
Definition: hal_trig.h:133
int hal_trig_odc_gpio_output_en(int port, int pin, int en)
Enable GPIO output for trigger ODC output.
Suspend IPMAC.
Definition: hal_trig.h:120
int hal_trig_reg_rw_cmd(int queue, uint32_t addr_offset, trig_reg_rw_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger register read and write command.
trigger init parameter
Definition: hal_trig.h:380
int hal_trig_sig_gpio_ie_oe_idx(int port, int pin)
Get GPIO ie or oe index for trigger signal. Use hal_trig_sig_gpio_ie_oe to select ie/oe...
IPMAC background scan all channel done.
Definition: hal_trig.h:194
BLE event done.
Definition: hal_trig.h:228
IPMAC slave sync miss.
Definition: hal_trig.h:191
Start of Sync sequence Tx in BLE baseband.
Definition: hal_trig.h:218
AON timer 2 timeout IRQ.
Definition: hal_trig.h:242
Timer 0 emit 1 signal.
Definition: hal_trig.h:261
CLKN count match IRQ.
Definition: hal_trig.h:314
int hal_trig_apb_mux(int peripheral, int bus_sel)
Set peripheral apb bus mux for trigger.
trigger register copy command parameter
Definition: hal_trig.h:466
CPU IRQ signal 1, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:277
trig_odc_idx
trigger output direct control index
Definition: hal_trig.h:98
Use APB bus.
Definition: hal_trig.h:340
Timer 6(addtional timer 0) emit 1 signal.
Definition: hal_trig.h:179
trig_reg_comp_cond_t
trigger register compare condition
Definition: hal_trig.h:346
Trigger handler register.
Definition: hal_trig.h:367
Timer 1 emit 2 signal.
Definition: hal_trig.h:162
IPMAC free running IRQ 0.
Definition: hal_trig.h:188
trigger register read and compare command parameter
Definition: hal_trig.h:432
BLE RX packet with CRC pass.
Definition: hal_trig.h:225
Snapshot AON watch dog timer.
Definition: hal_trig.h:146
Share memory register APB mux.
Definition: hal_trig.h:103
CPU IRQ signal 2, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:278
System tick aon timer stop ack signal.
Definition: hal_trig.h:245
System tick block IRQ(53), check register 0x4410C380.
Definition: hal_trig.h:275
CPU IRQ signal 0, set irq number with hal_trig_sig_cpu_irq.
Definition: hal_trig.h:276
int cont_cmp
1: continue compare, 0: Not continue compare
Definition: hal_trig.h:433
Snapshot trigger handler middle priority queue timer.
Definition: hal_trig.h:139
Force baseband Rx EN.
Definition: hal_trig.h:122
Max trigger ODC index.
Definition: hal_trig.h:147
Event timeout IRQ.
Definition: hal_trig.h:315
AON timer 2 capture signal 1 captured.
Definition: hal_trig.h:259
Gross target timer IRQ.
Definition: hal_trig.h:301
Invalid parameter.
Definition: hal_trig.h:80
Master SPI0.
Definition: hal_trig.h:357
Master SPI0 register APB mux.
Definition: hal_trig.h:116
Software trigger 0.
Definition: hal_trig.h:289
int size
Copye size, enum trig_reg_cp_len_t.
Definition: hal_trig.h:478
Snapshot AON timer 0.
Definition: hal_trig.h:124
Timer 6(addtional timer 0) emit 3 signal.
Definition: hal_trig.h:181
Low priority queue.
Definition: hal_trig.h:91
uint32_t reg_addr
Register address.
Definition: hal_trig.h:459
Snapshot AON timer 1.
Definition: hal_trig.h:125
AON timer 3 timeout IRQ.
Definition: hal_trig.h:243
int hal_trig_sig_cpu_irq(int idx, uint8_t irq_num)
Set CPU IRQ signal for trigger signal TRIG_SIG_CPU_IRQ0 ~ TRIG_SIG_CPU_IRQ7.
XO enable from PD0.
Definition: hal_trig.h:239
int hal_trig_sig_ble_irq(int idx, uint8_t irq_signal)
Set BLE IRQ signal for trigger signal TRIG_SIG_BLE_IRQ0 and TRIG_SIG_BLE_IRQ1.
UART0 register APB mux.
Definition: hal_trig.h:113
int rising_edge
1:enable rising edge, 0: disable rising edge
Definition: hal_trig.h:491
trig_queue
trigger queue
Definition: hal_trig.h:88
int hal_trig_tmr_reload_tick(int queue, uint32_t reload_val)
Set trigger timer reload tick value to register.
Snapshot IPMAC free running counter(superframe, duration, and fine)
Definition: hal_trig.h:141
Timer 2 timeout IRQ.
Definition: hal_trig.h:252
IPMAC slave rx done.
Definition: hal_trig.h:215
Timer 1 emit 7 signal.
Definition: hal_trig.h:167
int hal_trig_reg_mask_copy_cmd(int queue, uint32_t addr_offset, trig_reg_mask_cp_cmd_t *cmd, uint32_t *cmd_addr_oft)
Write trigger register copy with mask command.
Use AHB bus.
Definition: hal_trig.h:339
CPU in WFI.
Definition: hal_trig.h:230
Force baseband Tx EN.
Definition: hal_trig.h:121
Mutex error.
Definition: hal_trig.h:82
PWM APB mux.
Definition: hal_trig.h:104
No error.
Definition: hal_trig.h:79
Timer 6(addtional timer 0) emit 5 signal.
Definition: hal_trig.h:183
BLE RX enable.
Definition: hal_trig.h:199
Snapshot AON timer 3.
Definition: hal_trig.h:118
Timer additional register(timer6 ~ timer9) APB mux.
Definition: hal_trig.h:117
uint16_t cmd_addr
Trig command word address offset(not byte address).
Definition: hal_trig.h:395
UART1.
Definition: hal_trig.h:361