From 3f4898456bb1a451e5e6d45cb62c9c718f2b8a76 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 10 Apr 2014 22:46:40 +0100 Subject: stmhal: Add stm module, which contains some constants for the MCU. Also contains raw memory read/write functions, read8, read16, read32, write8, write16, write32. Can now do: stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13) This turns on the red LED. With the new constant folding, the above constants for the GPIO address are actually compiled to constants (and the addition done) at compile time. For viper code and inline assembler, this optimisation will make a big difference. In the inline assembler, using these constants would not be possible without this constant folding. --- stmhal/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stmhal/Makefile') diff --git a/stmhal/Makefile b/stmhal/Makefile index 064db23c3..978918994 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -77,8 +77,9 @@ SRC_C = \ pyexec.c \ help.c \ input.c \ - modpyb.c \ modos.c \ + modpyb.c \ + modstm.c \ modtime.c \ import.c \ lexerfatfs.c \ -- cgit v1.2.3