Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1.  
  2.  
  3. case HM2_SSERIAL_TYPE_8I20: // 8i20 found
  4. inst->tag_8i20 |= (1 << c);
  5. inst->tag_all |= (1 << c);
  6. inst->num_8i20 += 1;
  7. inst->num_all += 1;
  8. break;
  9. case HM2_SSERIAL_TYPE_7I64: // 7i64 found
  10. inst->tag_7i64 |= (1 << c);
  11. inst->tag_all |= (1 << c);
  12. inst->num_7i64 += 1;
  13. inst->num_all += 1;
  14. break;
  15. <<<<<<< HEAD
  16. default: // Unknown card, so create raw register access
  17. inst->tag_other |= (1 << c);
  18. inst->tag_all |= (1 << c);
  19. inst->num_other += 1;
  20. inst->num_all += 1;
  21. break;
  22. |||||||
  23. default:
  24. HM2_ERR("Unsupported Device ID %X found on sserial %d "
  25. "channel %d\n", buff, i, c);
  26. =======
  27. default:
  28. HM2_ERR("Unsupported Device ID %4s found on sserial %d "
  29. "channel %d\n", (char*)&buff, i, c);
  30. >>>>>>> v2.5_branch
  31. }
  32. }
  33. if (inst->num_all > 0){
  34. r = hal_pin_bit_newf(HAL_IN, &(inst->run),
  35. hm2->llio->comp_id,
  36. "%s.sserial.port-%1d.run",
  37. hm2->llio->name, i);
  38. if (r < 0) {
  39. HM2_ERR("error adding pin %s.sserial.%1d.run. aborting\n",
  40. hm2->llio->name, i);
  41. goto fail0;
  42. }
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. ...
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. typedef struct {
  69. hm2_lowlevel_io_t *llio;
  70.  
  71. struct {
  72. int num_encoders;
  73. int num_pwmgens;
  74. int num_tp_pwmgens;
  75. int num_stepgens;
  76. int num_leds;
  77. int num_sserials;
  78. <<<<<<< HEAD
  79. int num_bspis;
  80. int num_sserial_chans[4];
  81. |||||||
  82. int num_sserial_chans[4];
  83. =======
  84. char sserial_modes[4][8];
  85. >>>>>>> v2.5_branch
  86. int enable_raw;
  87. char *firmware;
  88. } config;
  89.  
  90. char config_name[HM2_CONFIGNAME_LENGTH + 1];
  91. u16 idrom_offset;
  92.  
  93. hm2_idrom_t idrom;
  94.  
  95. hm2_module_descriptor_t md[HM2_MAX_MODULE_DESCRIPTORS];
  96. int num_mds;
  97.  
  98. hm2_pin_t *pin;
  99. int num_pins;
  100.  
  101. // this keeps track of all the tram entries
  102. struct list_head tram_read_entries;
  103. u32 *tram_read_buffer;
  104. u16 tram_read_size;
  105.  
  106. struct list_head tram_write_entries;
  107. u32 *tram_write_buffer;
  108. u16 tram_write_size;
  109.  
  110. // the hostmot2 "Functions"
  111. hm2_encoder_t encoder;
  112. hm2_pwmgen_t pwmgen;
  113. hm2_tp_pwmgen_t tp_pwmgen;
  114. hm2_stepgen_t stepgen;
  115. hm2_sserial_t sserial;
  116. hm2_bspi_t bspi;
  117. hm2_ioport_t ioport;
  118. hm2_watchdog_t watchdog;
  119. hm2_led_t led;
  120.  
  121. hm2_raw_t *raw;
  122.  
  123. struct list_head list;
  124. } hostmot2_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement