| 66 | |
| 67 | |
| 68 | int gpio_direction_input(unsigned int gpio) |
| 69 | { |
| 70 | unsigned int offset; |
| 71 | int ret=0; |
| 72 | |
| 73 | rt_ubase_t temp = rt_hw_interrupt_disable(); |
| 74 | ret = gpio_to_base(gpio); |
| 75 | if (ret < 0) { |
| 76 | goto gpio_free; |
| 77 | } |
| 78 | offset = gpio & ((1 << GPIO_GRP_MASK) -1); |
| 79 | |
| 80 | gpio_dirin(offset); |
| 81 | |
| 82 | gpio_free: |
| 83 | rt_hw_interrupt_enable(temp); |
| 84 | |
| 85 | return ret; |
| 86 | } |
| 87 | |
| 88 | int gpio_direction_output(unsigned int gpio, int value) |
| 89 | { |
nothing calls this directly
no test coverage detected