From 200c4df9ec9d3cd86bdff2ee63b5851ef8a8ff33 Mon Sep 17 00:00:00 2001 From: Jannis Konrad <kabel42@gmail.com> Date: Sat, 20 May 2023 16:18:07 +0200 Subject: [PATCH] more testing, more comments --- examples/struct_gpio/struct_gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/struct_gpio/struct_gpio.c b/examples/struct_gpio/struct_gpio.c index 978dac2..3c5643d 100644 --- a/examples/struct_gpio/struct_gpio.c +++ b/examples/struct_gpio/struct_gpio.c @@ -51,8 +51,8 @@ int main() GPIOD->BSHR_bits = (struct BSHR_t) { .BS0 = 1, .BR4 = 1, - }; - GPIOC->BSHR_bits.BS0 = 1; + }; // one store + GPIOC->BSHR_bits.BS0 = 1; // implicit read->modify->write Delay_Ms( 100 ); // Turn D0 off and D4 on at the same time @@ -60,7 +60,7 @@ int main() .BR0 = 1, .BS4 = 1, }; - // or clear in BCR + // clear C0 in BCR GPIOC->BCR_bits.BR0 = 1; Delay_Ms( 100 ); } -- GitLab