Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct JVS_IO {
- BYTE node;
- BOOL valid;
- char ident[101];
- BYTE cmdrev, jvsrev, commver;
- struct {
- // read-only
- BOOL has;
- BYTE slots;
- WORD *count;
- // write-only
- INT16 *subtract;
- } coin;
- struct {
- // read-only
- BOOL has;
- BYTE slots;
- DWORD *count;
- // write-only
- INT16 *subtract;
- } medals;
- struct {
- // read-only
- BOOL has;
- BYTE players, buttons;
- BYTE *data;
- } sw;
- struct {
- // read-only
- BOOL has;
- BYTE channels, bits;
- WORD *data;
- } analog_in;
- struct {
- // read-only
- BOOL has;
- BYTE channels;
- WORD *data;
- } rotary;
- struct {
- // read-only
- BOOL has;
- BYTE data;
- } keycode;
- struct {
- // read-only
- BOOL has;
- BYTE channels, xbits,ybits;
- WORD *x, *y;
- } scrpos;
- struct {
- // read-only
- BOOL has;
- WORD count;
- BYTE *data;
- } miscsw;
- struct {
- // read-only
- BOOL has;
- BYTE slots;
- } cardsys;
- struct {
- // read-only
- BOOL has;
- BYTE slots;
- // write-only
- // TODO
- } general_out;
- struct {
- // read-only
- BOOL has;
- BYTE channels;
- // write-only
- WORD *data;
- } analog_out;
- struct {
- // read-only
- BOOL has;
- BYTE width,height, type;
- // write-only
- // TODO
- } char_out;
- struct {
- // read-only
- BOOL has;
- } backup;
- };
- int jvs_setup(LPCTSTR portname);
- int jvs_shutdown();
- ////////////
- // Helpful API
- ////////////
- // Get number of attached I/Os
- int jvs_io_count(void);
- // Get JVS_IO structure for one I/O node
- JVS_IO *jvs_io_get(BYTE node);
- // Update JVS_IO structure for one I/O node
- int jvs_io_update(BYTE node, JVS_IO *info);
- // Print out the structure information
- void jvs_io_dump(JVS_IO *info);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement