From db5180d3e7c0ad05c30050ccfe33ca22a4630052 Mon Sep 17 00:00:00 2001 From: Steins7 Date: Sat, 13 May 2023 15:48:07 +0200 Subject: [PATCH] Document afio function --- drivers/afio.h | 7 +++++++ drivers/exti.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/afio.h b/drivers/afio.h index 961390c..f1a06de 100644 --- a/drivers/afio.h +++ b/drivers/afio.h @@ -19,6 +19,13 @@ //--functions------------------------------------------------------------------- +/** + * Maps the exti lines to gpio ports. The ExtiLine enum can be used as a + * mask to configure multiple lines at the same time. This function is used by + * the exti module to configure its line and calling it directly should should + * thus normaly not be needed. It could however still be usefull when wanting to + * change the port linked to an exti without reconfiguring it entirely + */ void afio_map_exti(enum ExtiLine line_mask, enum GpioPort port); diff --git a/drivers/exti.h b/drivers/exti.h index d2c5089..3349aca 100644 --- a/drivers/exti.h +++ b/drivers/exti.h @@ -71,7 +71,10 @@ typedef void (*ExtiCallback)(void); * exti 1). When possible, it is recommanded to use the lowest id possible for * better performance. The ExtiConfig enum can be used as mask. If no callback * is specified, the interrupt won't be enabled, but an event will still be sent - * to wake the cpu up + * to wake the cpu up. + * + * Note: wich port is linked to a line can be changed atfer the fact using + * afio_map_exti() */ void exti_configure(enum ExtiLine line_mask, enum GpioPort port, enum ExtiConfig config_mask, ExtiCallback callback);