diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -2,6 +2,9 @@ #include "stm32l100c_discovery.h" #include "ssd1306.h" +#define LED_POWER GPIOB, GPIO_Pin_9 +#define LED_STAT GPIOA, GPIO_Pin_15 + static __IO uint32_t TimingDelay; uint8_t BlinkSpeed = 0; @@ -11,6 +14,8 @@ void init_spi(); /* Main */ int main(void) { + + // Hopefully init clocks SystemInit(); RCC_ClocksTypeDef RCC_Clocks; @@ -18,11 +23,6 @@ int main(void) STM_EVAL_LEDInit(LED3); STM_EVAL_LEDInit(LED4); - -// RCC_Configuration(); - /* Initialize User_Button on STM32L100C-Discovery */ - //STM_EVAL_PBInit(BUTTON_USER, BUTTON_MODE_GPIO); - /* SysTick end of count event each 1ms */ RCC_GetClocksFreq(&RCC_Clocks); SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000); @@ -30,21 +30,19 @@ int main(void) /* Initiate Blink Speed variable */ BlinkSpeed = 1; -// while(1) { -// ITM_SendChar('!'); -// } - - init_spi(); //SPI_I2S_SendData(SPI1, 0x1); /* Init lcd driver */ // SSD1303_Init(); // SSD1303_DrawPoint(3,3,1); // SSD1303_DrawPoint(5,5,0); - + +//testme +// GPIO_SetBits(LED_PWR); STM_EVAL_LEDOn(LED4); Delay(1000); - STM_EVAL_LEDOff(LED4); +// GPIO_ResetBits(LED_PWR); +STM_EVAL_LEDOff(LED4); Delay(1000); while(1)