aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpio.c')
-rw-r--r--src/gpio.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gpio.c b/src/gpio.c
index 151779d..29ed763 100644
--- a/src/gpio.c
+++ b/src/gpio.c
@@ -20,6 +20,27 @@
#include <gpio.h>
+void gpio_svc(uint32_t *args)
+{
+ switch (args[0]) {
+ case 0:
+ gpio_mode((GPIO_TypeDef *)args[1], args[2], args[3]);
+ break;
+ case 1:
+ gpio_type((GPIO_TypeDef *)args[1], args[2], args[3]);
+ break;
+ case 2:
+ gpio_pupd((GPIO_TypeDef *)args[1], args[2], args[3]);
+ break;
+ case 3:
+ gpio_speed((GPIO_TypeDef *)args[1], args[2], args[3]);
+ break;
+ case 4:
+ gpio_dout((GPIO_TypeDef *)args[1], args[2], args[3]);
+ break;
+ }
+}
+
void gpio_init(void)
{
// enable clocks