查看迷你看门狗的源代码
←
迷你看门狗
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
==== GPIO 中断相关 ==== <source lang=c> ETS_GPIO_INTR_ATTACH(func, arg); ETS_GPIO_INTR_DISABLE(); EST_GPIO_INTR_ENABLE(); void gpio_pin_intr_state_set(u32 gpio_no, GPIO_INT_TYPE stat); typedef enum { GPIO_PIN_INTR_DISABLE = 0, GPIO_PIN_INTR_POSEDGE = 1, GPIO_PIN_INTR_NEGEDGE = 2, GPIO_PIN_INTR_ANYEDGE = 3, GPIO_PIN_INTR_LOLEVEL = 4, GPIO_PIN_INTR_HILEVEL =5 } GPIO_INT_TYPE; /* * Register an application-specific interrupt handler for GPIO pin * interrupts. Once the interrupt handler is called, it will not * be called again until after a call to gpio_intr_ack. Any GPIO * interrupts that occur during the interim are masked. * * The application-specific handler is called with a mask of * pending GPIO interrupts. After processing pin interrupts, the * application-specific handler may wish to use gpio_intr_pending * to check for any additional pending interrupts before it returns. */ void gpio_intr_handler_register(gpio_intr_handler_fn_t fn, void *arg); typedef void (* gpio_intr_handler_fn_t)(uint32 intr_mask, void *arg); /* Determine which GPIO interrupts are pending. */ uint32 gpio_intr_pending(void); /* * Acknowledge GPIO interrupts. * Intended to be called from the gpio_intr_handler_fn. */ void gpio_intr_ack(uint32 ack_mask); void gpio_pin_wakeup_enable(uint32 i, GPIO_INT_TYPE intr_state); void gpio_pin_wakeup_disable(); </source> GPIO 中断处理: <source lang=c> uint32 gpio_status; gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS); //clear interrupt status GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status); </source> <br><br>
返回到
迷你看门狗
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面