Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void defaultEEP ( void )
- {
- /* EEPROM
- * Prüfen ob der EEPROM schon initalisiert wurden ist..
- */
- eeprom_busy_wait();
- if ( eeprom_read_byte( &eep.byte8[IS_INIT] ) == 0xA3 )
- {
- return;
- }
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[BRIGHT] , 0xAF );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[SOUND_ENABLE] , 0x01 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[MOTOR_ENABLE] , 0x01 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[ALERT] , 0x00 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[DIMM_HOUR_ON] , 20 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[DIMM_MINUTE_ON] , 0 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[DIMM_HOUR_OFF] , 12 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[DIMM_MINUTE_OFF] , 0 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[SYNC_HOUR] , 3 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[SYNC_MINUTE] , 0 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[MES_MESZ] , 0 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[AUTO_CHANGE_MINUTE] , 5 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[AUTO_CHANGE_SECOUND] , 0 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[ALERT_CYCLES] , 1 );
- eeprom_busy_wait();
- eeprom_update_word(&erreep.byte16[SYNC_ERROR_CNT] , 0 );
- eeprom_busy_wait();
- eeprom_write_byte(&eep.byte8[DCF77_NUM_OF_RECORDS] , 2 );
- eeprom_busy_wait();
- for ( uint8_t i = 0 ; i < ALERTS ; i++ )
- {
- eeprom_write_byte( &eep.byte8[ ALERT_HOUR_1 + i ] , i + 1 );
- eeprom_busy_wait();
- eeprom_write_byte( &eep.byte8[ ALERT_MINUTE_1 + i ] , 0 );
- eeprom_busy_wait();
- }
- eeprom_write_byte(&eep.byte8[IS_INIT] , 0xA3 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement