diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -7,6 +7,9 @@ #include "ssd1306_display_driver.h" #include "debug.h" //TODO move to timer #include "br24t_eeprom_driver.h" +#include "pcf_clock_driver.h" +#include "pins.h" +#include "uart.h" /** * TODO * make sure desired functions are static (it's just good practice) @@ -19,37 +22,41 @@ */ -#if defined(DEBUG_BUILD) || defined(EEPROM_INSTALL) -#include "uart.h" //TODO remove if needed -#endif int main() { + LED_DEBUG_DDR |= _BV(LED_DEBUG); //TODO move to debug file or somethin + LED_DEBUG_PORT &= ~(_BV(LED_DEBUG)); //initlizes i2c, right now only speed //TODO don't delegate a whole function if desired i2c_init(); - screen_init(); -#if defined(DEBUG_BUILD) || defined(EEPROM_INSTALL) - //initlizes usart registers + //screen_init(); +#if defined(DEBUG_BUILD) || defined(FLASH_EEPROM) + uart_init(); FILE stdout_replacement = FDEV_SETUP_STREAM((void *)uart_sendbyte, NULL, _FDEV_SETUP_WRITE); FILE stdin_replacement = FDEV_SETUP_STREAM(NULL, (void *)uart_recvbyte, _FDEV_SETUP_READ); stdout = &stdout_replacement; stdin = &stdin_replacement; - screen_testdraw(); + + //screen_lowlvl_testdraw(); + //eeprom_testbyte(); + //test_clock(); #endif + //initilize timer timer_init(); -#ifdef EEPROM_INSTALL +#ifdef FLASH_EEPROM + //uart_echo(); flash_eeprom(); #endif //initlizes screen registers with good values since we dont have control over reset functionallity - screen_init(); + //screen_init(); return 0; } |