7 LUAT_MCU_PERIPHERAL_UART
,
8 LUAT_MCU_PERIPHERAL_I2C
,
9 LUAT_MCU_PERIPHERAL_SPI
,
10 LUAT_MCU_PERIPHERAL_PWM
,
11 LUAT_MCU_PERIPHERAL_GPIO
,
12 LUAT_MCU_PERIPHERAL_I2S
,
13 LUAT_MCU_PERIPHERAL_LCD
,
14 LUAT_MCU_PERIPHERAL_CAM
,
17 int luat_mcu_set_clk(size_t mhz
);
18 int luat_mcu_get_clk(void);
20 const char* luat_mcu_unique_id(size_t* t
);
22 long luat_mcu_ticks(void);
23 uint32_t luat_mcu_hz(void);
25 uint64_t luat_mcu_tick64(void);
26 int luat_mcu_us_period(void);
27 uint64_t luat_mcu_tick64_ms(void);
28 void luat_mcu_set_clk_source(uint8_t source_main
, uint8_t source_32k
, uint32_t delay
);
31 * @brief 用户是否设置了外设的IOMUX
32 * @param type 外设类型 LUAT_MCU_PERIPHERAL_XXX
34 * @return 0 用户配置了 1用户没配置
36 uint8_t luat_mcu_iomux_is_default(uint8_t type
, uint8_t sn
);
38 * @brief 用户控制外设的IOMUX,如果不配置或者取消,则外设初始化时使用默认配置
39 * @param type 外设类型 LUAT_MCU_PERIPHERAL_XXX
41 * @param pad_index pad序号,具体看芯片,可能是GPIO序号,可能是PAD序号。如果是-1,则表示取消配置
42 * @param alt 复用功能序号,具体看芯片
43 * @param is_input,是否是单纯输入功能
46 void luat_mcu_iomux_ctrl(uint8_t type
, uint8_t sn
, int pad_index
, uint8_t alt
, uint8_t is_input
);
48 void luat_mcu_set_hardfault_mode(int mode
);
51 * @param main_enable 主晶振参考信号输出使能,0关闭,其他开启
52 * @param slow_32k_enable 慢速(一般是32K)晶振参考信号输出使能,0关闭,其他开启
55 void luat_mcu_xtal_ref_output(uint8_t main_enable
, uint8_t slow_32k_enable
);