EM260 client is finally showing signs of life!
[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 //! Call this before the function to be glitched.
21 void glitchprime();
22
23 extern u16 glitchH, glitchL, glitchstate, glitchcount;
24
25 //! Glitch an application.
26 void glitchapp(u8 app);
27 //! Set glitching voltages.
28 void glitchvoltages(u16 gnd, u16 vcc);
29 //! Set glitching rate.
30 void glitchrate(u16 rate);
31
32 //! Handles a monitor command.
33 extern void glitchhandle(unsigned char app,
34                   unsigned char verb,
35                   unsigned long len) WEAKDEF;