# HG changeset patch # User Ethan Zonca # Date 2014-07-17 23:18:06 # Node ID c23168e6420ff74b3cc40f13d207547517e1c424 # Parent 5dc11468ff0bf69f460ea3c082ca71566350c44c Back to blinking, commented out USB initialization diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -38,9 +38,8 @@ int main(void) Set_USBClock(); USB_Interrupts_Config(); - USB_Init(); - GPIO_SetBits(LED_POWER); + //USB_Init(); // freezes here... maybe clock issue? RCC_ClocksTypeDef RCC_Clocks; @@ -51,7 +50,6 @@ int main(void) GPIO_ResetBits(LED_STAT); Delay(100); - //ssd1306_Init(); //ssd1306_DrawPoint(3,3,1); //ssd1306_DrawPoint(5,5,0); @@ -60,9 +58,6 @@ int main(void) Delay(500); GPIO_ResetBits(LED_POWER); - -RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE); - init_spi(); while(1) @@ -115,7 +110,7 @@ void process() GPIO_SetBits(MAX_CS); if((!retval || (temp & 0x2) != 0)) - return; // Comms error + return; // Comms error - this is happening right now if((temp & 0x4)!= 0) return; // Open thermocouple @@ -123,6 +118,7 @@ void process() temp = (temp & 0x7FF8) >> 5; + // TODO: Add calibration offset (linear) @@ -289,7 +285,7 @@ void machine() // Something is terribly wrong - deault: + default: { state = STATE_IDLE;