diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -1,15 +1,15 @@ #include "main.h" #include "stm32l100c_discovery.h" -#include "Libraries/u8glib/u8g_arm.h" +#include "u8g_arm.h" static __IO uint32_t TimingDelay; uint8_t BlinkSpeed = 0; -/* Setup periphs / etc */ -void setup() { - - RCC_ClocksTypeDef RCC_Clocks; +/* Main */ +int main(void) +{ + RCC_ClocksTypeDef RCC_Clocks; /* Configure LED3 and LED4 on STM32L100C-Discovery */ STM_EVAL_LEDInit(LED3); @@ -21,16 +21,13 @@ void setup() { /* SysTick end of count event each 1ms */ RCC_GetClocksFreq(&RCC_Clocks); SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000); - -} - - -/* Main */ -int main(void) -{ /* Initiate Blink Speed variable */ BlinkSpeed = 1; + + /* Init lcd driver */ + u8g_t u8g; + u8g_InitComFn(&u8g, &u8g_dev_ssd1306_128x64_hw_spi, u8g_com_hw_spi_fn); while(1) {