X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=firmware%2Finclude%2Fglitch.h;h=e208549c51fd2f491c375dcbf264d6f9356a0bad;hb=60199925981808668a7fd5d86602a4e574bc2b63;hp=7576c7e56fb3b5381979e4fcb711396f72e47ee2;hpb=ccbb5f9f7ae6fee33ba360030ecdaa76e7967024;p=goodfet diff --git a/firmware/include/glitch.h b/firmware/include/glitch.h index 7576c7e..e208549 100644 --- a/firmware/include/glitch.h +++ b/firmware/include/glitch.h @@ -3,20 +3,24 @@ \brief Glitch handler functions. */ -#include -#include -#include +#ifndef GLITCH_H +#define GLITCH_H + +#include "command.h" +#include "app.h" + +#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(); @@ -25,11 +29,11 @@ extern u16 glitchH, glitchL, glitchstate, glitchcount; //! Glitch an application. void glitchapp(u8 app); //! Set glitching voltages. -void glitchvoltages(u16 low, u16 high); +void glitchvoltages(u16 gnd, u16 vcc); //! Set glitching rate. void glitchrate(u16 rate); -//! Handles a monitor command. -void glitchhandle(unsigned char app, - unsigned char verb, - unsigned long len); +extern app_t const glitch_app; + +#endif // GLITCH_H +