X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=firmware%2Finclude%2Fsbw.h;h=91fcad1d7b3f876859ae305a4e70bed1e697308a;hb=984c06c6028f27ef87d7b9453c8c61045b8d26dd;hp=4bd4f5ecdfd515c1f4400c46f0fa290b891ecc9a;hpb=29c88436fcb77cc01088694e54731ac950956afd;p=goodfet diff --git a/firmware/include/sbw.h b/firmware/include/sbw.h index 4bd4f5e..91fcad1 100644 --- a/firmware/include/sbw.h +++ b/firmware/include/sbw.h @@ -6,6 +6,11 @@ #ifndef SBW_H #define SBW_H +#include "app.h" +extern app_t const sbw_app; + +#define SBW 0x17 + #include "platform.h" #include "command.h" #include "app.h" @@ -23,13 +28,21 @@ // I/O Redefintions extern int tms, tdi, tdo; +#undef SETTMS #define SETTMS tms=1 +#undef CLRTMS #define CLRTMS tms=0 +#undef SETTDI #define SETTDI tdi=1 +#undef CLRTDI #define CLRTDI tdi=0 +#undef TCKTOCK #define TCKTOCK clock_sbw() +#undef SETMOSI #define SETMOSI SETTDI +#undef CLRMOSI #define CLRMOSI CLRTDI +#undef READMISO #define READMISO tdo #endif @@ -38,7 +51,7 @@ extern int tms, tdi, tdo; void sbwsetup(); //! Handle a SBW request. -void sbwhandle(u8 app, u8 verb, u8 len); +void sbw_handler_fn(u8 app, u8 verb, u32 len); //! Perform a SBW bit transaction. void clock_sbw();