|
|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
#include "avr-hd44780/lcd.h"
|
|
|
|
|
#include "i2c_peter/i2cmaster.h"
|
|
|
|
|
#include <avr/eeprom.h>
|
|
|
|
|
#include <avr/wdt.h>
|
|
|
|
|
|
|
|
|
|
uint8_t pgm = 0;
|
|
|
|
|
uint8_t pvw = 0;
|
|
|
|
|
@ -76,6 +77,8 @@ int main(void){
|
|
|
|
|
|
|
|
|
|
DDRD |= 1<<7; //enable backlight
|
|
|
|
|
|
|
|
|
|
wdt_enable(WDTO_2S);
|
|
|
|
|
|
|
|
|
|
eeprom_read_block(menu.arr, &settings_saved, sizeof(settings_t));
|
|
|
|
|
if(menu.settings.cam > setting_limits[0])
|
|
|
|
|
menu.settings.cam = 0;
|
|
|
|
|
@ -136,11 +139,14 @@ int main(void){
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
wdt_enable(WDTO_60MS);
|
|
|
|
|
|
|
|
|
|
sei();
|
|
|
|
|
|
|
|
|
|
while(1){
|
|
|
|
|
sdi_shield_write(0x5000, 1);
|
|
|
|
|
wdt_reset();
|
|
|
|
|
|
|
|
|
|
sdi_shield_write(0x5000, 1);
|
|
|
|
|
uint8_t data_length = sdi_shield_read(0x5001);
|
|
|
|
|
if(data_length){
|
|
|
|
|
uint8_t tally = sdi_shield_read(0x5100 + menu.settings.cam);
|
|
|
|
|
@ -200,7 +206,6 @@ int main(void){
|
|
|
|
|
lcd_disable_blinking();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
_delay_ms(10);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|