From 7cbc44b8d3bb13bb32b8d9069e262483578cf82f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 4 Oct 2018 11:31:36 -0400 Subject: stm32f1: Use -O2 optimization and inline timer_read_time() As long as timer_read_time() is inlined, I get better performance with gcc -O2 optimization. The binary is also dramatically smaller and O2 better matches the other platforms. Signed-off-by: Kevin O'Connor --- src/stm32f1/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stm32f1/timer.c') diff --git a/src/stm32f1/timer.c b/src/stm32f1/timer.c index e9b96b0a..99eb751f 100644 --- a/src/stm32f1/timer.c +++ b/src/stm32f1/timer.c @@ -50,7 +50,7 @@ timer_kick(void) static uint32_t timer_high; // Return the current time (in absolute clock ticks). -uint32_t +inline uint32_t timer_read_time(void) { uint32_t th = readl(&timer_high); -- cgit v1.2.3-70-g09d2