Beginning EJTAG (MIPS) support with an empty app.
[goodfet] / firmware / include / glitch.h
1 /*! \file glitch.h
2   \author Travis Goodspeed
3   \brief Glitch handler functions.
4 */
5
6 #include <signal.h>
7 #include <io.h>
8 #include <iomacros.h>
9
10 //Command codes
11 #define GLITCHAPP      0x80
12 #define GLITCHVERB     0x81
13 #define GLITCHTIME     0x82
14 #define GLITCHVOLTAGES 0x90
15 #define GLITCHRATE     0x91
16
17
18 //! Setup glitching.
19 void glitchsetup();
20 //! Setup analog chain for glitching.
21 void glitchsetupdac();
22 //! Call this before the function to be glitched.
23 void glitchprime();
24
25 extern u16 glitchH, glitchL, glitchstate, glitchcount;
26
27 //! Glitch an application.
28 void glitchapp(u8 app);
29 //! Set glitching voltages.
30 void glitchvoltages(u16 low, u16 high);
31 //! Set glitching rate.
32 void glitchrate(u16 rate);
33
34 //! Handles a monitor command.
35 void glitchhandle(unsigned char app,
36                   unsigned char verb,
37                   unsigned long len);