mirror of https://github.com/zrafa/xinu-avr.git
20 changed files with 189 additions and 38 deletions
@ -0,0 +1,16 @@
|
||||
/* xsh_reboot.c - xsh_reboot */ |
||||
|
||||
#include <xinu.h> |
||||
#include <avr/interrupt.h> |
||||
#include <avr/wdt.h> |
||||
|
||||
/*------------------------------------------------------------------------
|
||||
* xsh_reboot - reset Xinu system. WARNING: this is not a hardware reset |
||||
*------------------------------------------------------------------------ |
||||
*/ |
||||
shellcmd xsh_reboot(int nargs, char *args[]) |
||||
{ |
||||
void(* reset_func) (void) = 0;//declare reset function at address 0
|
||||
cli(); // disable interrupts
|
||||
reset_func(); |
||||
} |
||||
@ -0,0 +1,49 @@
|
||||
/* conf.c (GENERATED FILE; DO NOT EDIT) */ |
||||
|
||||
#include <xinu.h> |
||||
|
||||
|
||||
extern devcall ioerr(void); |
||||
extern devcall ionull(void); |
||||
|
||||
/* Device independent I/O switch */ |
||||
|
||||
const __flash struct dentry devtab[] = |
||||
{ |
||||
/**
|
||||
* Format of entries is: |
||||
* dev-number, minor-number, dev-name, |
||||
* init, open, close, |
||||
* read, write, seek, |
||||
* getc, putc, control, |
||||
* dev-csr-address, intr-handler, irq |
||||
*/ |
||||
|
||||
/* CONSOLE is tty */ |
||||
{ 0, 0, "CONSOLE", |
||||
(void *)ttyinit, (void *)ionull, (void *)ionull, |
||||
(void *)ttyread, (void *)ttywrite, (void *)ioerr, |
||||
(void *)ttygetc, (void *)ttyputc, (void *)ttycontrol, |
||||
(void *)0x40013800, (void *)ttyhandler, 53 }, |
||||
|
||||
/* NULLDEV is null */ |
||||
{ 1, 0, "NULLDEV", |
||||
(void *)ionull, (void *)ionull, (void *)ionull, |
||||
(void *)ionull, (void *)ionull, (void *)ioerr, |
||||
(void *)ionull, (void *)ionull, (void *)ioerr, |
||||
(void *)0x0, (void *)ioerr, 0 }, |
||||
|
||||
/* NAMESPACE is nam */ |
||||
{ 2, 0, "NAMESPACE", |
||||
(void *)naminit, (void *)namopen, (void *)ioerr, |
||||
(void *)ioerr, (void *)ioerr, (void *)ioerr, |
||||
(void *)ioerr, (void *)ioerr, (void *)ioerr, |
||||
(void *)0x0, (void *)ioerr, 0 }, |
||||
|
||||
/* EEPROM0 is eeprom */ |
||||
{ 3, 0, "EEPROM0", |
||||
(void *)eeprom_init, (void *)eeprom_open, (void *)eeprom_close, |
||||
(void *)eeprom_read, (void *)eeprom_write, (void *)ioerr, |
||||
(void *)ioerr, (void *)ioerr, (void *)ioerr, |
||||
(void *)0x0, (void *)ionull, 0 } |
||||
}; |
||||
Loading…
Reference in new issue