Added LED test into monitor, supporting increased LEDs on the apimote and telosb...
[goodfet] / firmware / include / glitch.h
1 /*! \file glitch.h
2   \author Travis Goodspeed
3   \brief Glitch handler functions.
4 */
5
6 #ifndef GLITCH_H
7 #define GLITCH_H
8
9 #include "command.h"
10 #include "app.h"
11
12 #define GLITCH 0x71
13
14 //Command codes
15 #define GLITCHAPP      0x80
16 #define GLITCHVERB     0x81
17 #define GLITCHTIME     0x82
18 #define GLITCHVOLTAGES 0x90
19 #define GLITCHRATE     0x91
20
21
22 //! Setup glitching.
23 void glitchsetup();
24 //! Call this before the function to be glitched.
25 void glitchprime();
26
27 extern u16 glitchH, glitchL, glitchstate, glitchcount;
28
29 //! Glitch an application.
30 void glitchapp(u8 app);
31 //! Set glitching voltages.
32 void glitchvoltages(u16 gnd, u16 vcc);
33 //! Set glitching rate.
34 void glitchrate(u16 rate);
35
36 extern app_t const glitch_app;
37
38 #endif // GLITCH_H
39