X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Finclude%2Fglitch.h;h=b7082d8df46605068978428aad7f2929ac36e9ff;hp=de3d4a861bcdae6233442d74ceb2cefcf08a1a07;hb=5fb0341d348e101b30794945a6c91546e25e8e7b;hpb=eddb0eb08f187dc156a6cb51878104df67d97436 diff --git a/firmware/include/glitch.h b/firmware/include/glitch.h index de3d4a8..b7082d8 100644 --- a/firmware/include/glitch.h +++ b/firmware/include/glitch.h @@ -3,11 +3,40 @@ \brief Glitch handler functions. */ +#ifndef GLITCH_H +#define GLITCH_H + +#include "app.h" + #include #include #include -//! Disable glitch state at init. +#define GLITCH 0x71 + +//Command codes +#define GLITCHAPP 0x80 +#define GLITCHVERB 0x81 +#define GLITCHTIME 0x82 +#define GLITCHVOLTAGES 0x90 +#define GLITCHRATE 0x91 + + +//! Setup glitching. void glitchsetup(); -//! Setup analog chain for glitching. -void glitchsetupdac(); +//! Call this before the function to be glitched. +void glitchprime(); + +extern u16 glitchH, glitchL, glitchstate, glitchcount; + +//! Glitch an application. +void glitchapp(u8 app); +//! Set glitching voltages. +void glitchvoltages(u16 gnd, u16 vcc); +//! Set glitching rate. +void glitchrate(u16 rate); + +extern app_t const glitch_app; + +#endif // GLITCH_H +