1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

lots of stuff

This commit is contained in:
Bas Wijnen
2009-10-31 09:32:23 +01:00
parent afb496f20b
commit a383b3ffd3
28 changed files with 441 additions and 230 deletions

View File

@@ -16,6 +16,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ARCH
#define INIT
#include "kernel.hh"
void board_init ():
// Disable all gpio interrupts and alternate functions initially.
for unsigned i = 0; i < 4; ++i:
@@ -54,3 +58,12 @@ void board_init ():
ost_set_count (0, 1)
ost_set_mode (0, OST_TCSR_UIE | OST_TCSR_CKS_EXTAL)
ost_enable_channel (0)
void arch_reboot ():
// Wait for serial port to be done.
while !(UART0_LSR & UARTLSR_TEMT):
// Reboot.
wdt_set_count (~0)
wdt_start ()
// Wait for wdt to trigger reboot.
while true: