From c8ad62ff81c52b69af64a80b2d51fe7f7ad22b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Tue, 20 Oct 2015 10:14:10 +0200 Subject: [PATCH] better comments --- main.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.asm b/main.asm index 904b1d5..9bca06b 100644 --- a/main.asm +++ b/main.asm @@ -129,14 +129,16 @@ GPIO_CNF ; Output pins C8, C9 LDR R0, =GPIOC_MODER LDR R1, [R0] + ; Clear the area we'll write to BIC R1,R1, #(GPIO_MODER_8 :OR: GPIO_MODER_9) + ; Write "OUTPUT" pattern (0x5555...) masked to the two bits ORR R1,R1, #(GPIO_MODER_8 :OR: GPIO_MODER_9) & GPIO_MODER_OUTPUT STR R1, [R0] ; Input pin A0 LDR R0, =GPIOA_MODER LDR R1, [R0] - BIC R1,R1, #GPIO_MODER_0 ; Clear the bit config area + BIC R1,R1, #GPIO_MODER_0 ORR R1,R1, #(GPIO_MODER_0 & GPIO_MODER_INPUT); Write the "input" pattern into the bit config area STR R1, [R0]