OpenCores
URL https://opencores.org/ocsvn/s6soc/s6soc/trunk

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [sw/] [zipos/] [doorbell.c] - Diff between revs 39 and 44

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 39 Rev 44
Line 480... Line 480...
int     menu_readkey(void) {
int     menu_readkey(void) {
        int     key;
        int     key;
        wait(0,3);
        wait(0,3);
        key = keypadread();
        key = keypadread();
        keypad_wait_for_release();
        keypad_wait_for_release();
        clear(INT_KEYPAD);
        clear(INT_KEYPAD,0);
        return key;
        return key;
}
}
 
 
void    time_menu(void) {
void    time_menu(void) {
        int     timeout = 60;
        int     timeout = 60;
Line 532... Line 532...
        //
        //
        // Of course ... this won't work if it takes the clock longer than 
        // Of course ... this won't work if it takes the clock longer than 
        // a millisecond to finish setting the clock ... but this is such a
        // a millisecond to finish setting the clock ... but this is such a
        // rare race condition, and the consequences so minor, that this will
        // rare race condition, and the consequences so minor, that this will
        // probably continue to work for now.
        // probably continue to work for now.
        clear(SWINT_PPS);
        clear(SWINT_PPS,0);
        rtcclock = newclock;
        rtcclock = newclock;
        if (wait(SWINT_PPS, 1))
        if (wait(SWINT_PPS, 1))
                rtcclock = newclock;
                rtcclock = newclock;
}
}
 
 
Line 664... Line 664...
                                case 11: dawn_menu(); break;
                                case 11: dawn_menu(); break;
                                case 12: dusk_menu(); break;
                                case 12: dusk_menu(); break;
                                default:
                                default:
                                        unknown_menu();
                                        unknown_menu();
                                        wait(0,3000);
                                        wait(0,3000);
                        } clear(INT_KEYPAD);
                        } clear(INT_KEYPAD,0);
                }
                }
        }
        }
}
}
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2022 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.