Project

General

Profile

Revision 12ea39cc

ID12ea39cc64a8ebc9b7f3c176488a210d80684453
Parent 3811693d
Child e53aa5c5

Added by Thomas Mullins over 11 years ago

Added actual control of tool

View differences:

toolbox/rfid.c
1
#include <string.h>
1 2
#include <util/delay.h>
2 3
#include "rfid.h"
3 4
#include "serial.h"
......
72 73
}
73 74

  
74 75
void rfid_get_serno(char *buf) {
76
  memcpy(buf, serno, sizeof(serno));
77
}
78

  
79
char rfid_check_serno(char *buf) {
80
  return memcmp(buf, serno, sizeof(serno)) == 0;
81
}
82

  
83
char rfid_nonzero() {
75 84
  int i;
76
  for (i = 0; i < RFID_SERNO_SIZE; i++) {
77
    buf[i] = serno[i];
85
  for (i = 0; i < sizeof(serno); i++) {
86
    if (serno[i]) {
87
      return 1;
88
    }
78 89
  }
90
  return 0;
79 91
}

Also available in: Unified diff