Ejemplo n.º 1
0
void populateUSBKeys(json_object* keys, int row, unsigned char* barray)
{
  int pos = 0;
  json_object* key = NULL;

  for(; pos < json_object_array_length(keys); ++pos)
  {
    key = json_object_array_get_idx(keys, pos);
    barray[usbKeyLookupTable[row][pos]] = convertIPACSeries(key);
  }
}
Ejemplo n.º 2
0
unsigned char
convertIPACKey (enum ipac_boards_t bid, json_object* jobj)
{
  switch (bid)
  {
    case PRE_IPAC2_BOARD:
    case PRE_IPAC4_BOARD:
    case PRE_MINIPAC_BOARD:
      return convertIPAC(jobj);
      break;

    case IPAC2_BOARD:
    case MINIPAC_BOARD:
    case IPAC4_BOARD:
    case JPAC_BOARD:
      return convertIPACSeries(jobj);
      break;

    default:
      return 0x00;
  }
}