Hardware timer support
This commit is contained in:
parent
5151ccc3b2
commit
1d72ed3f70
8 changed files with 527 additions and 4 deletions
|
@ -117,6 +117,8 @@ typedef enum {
|
|||
extern void gpio_interrupt_handler(void);
|
||||
|
||||
/* Set the interrupt type for a given pin
|
||||
*
|
||||
* If int_type is not INT_NONE, the gpio_interrupt_handler will be attached and unmasked.
|
||||
*/
|
||||
INLINED void gpio_set_interrupt(const uint8_t gpio_num, const gpio_interrupt_t int_type)
|
||||
{
|
||||
|
@ -128,4 +130,10 @@ INLINED void gpio_set_interrupt(const uint8_t gpio_num, const gpio_interrupt_t i
|
|||
}
|
||||
}
|
||||
|
||||
/* Return the interrupt type set for a pin */
|
||||
INLINED gpio_interrupt_t gpio_get_interrupt(const uint8_t gpio_num)
|
||||
{
|
||||
return (gpio_interrupt_t)(GPIO_CTRL_REG(gpio_num) & GPIO_INT_MASK);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue