示例#1
0
文件: digital.cpp 项目: Freecore/qucs
// Initialize constant MNA entries for DC analysis.
void digital::initDC (void) {
  initDigital ();
  allocMatrixMNA ();
  delay = false;
  setB (NODE_OUT, VSRC_1, +1);
  setC (VSRC_1, NODE_OUT, -1);
  setE (VSRC_1, 0);
}
示例#2
0
void ssInitType() {
  switch (SENSOR_TYPE) {
    case SENSOR_TYPE_DIGITAL:
      initDigital();
      break;
    case SENSOR_TYPE_ANALOG_IN:
      initAnalogIn();
      break;
    case SENSOR_TYPE_BUZZER:
      initBuzzer();
      break;
    case SENSOR_TYPE_FLAG:
      initFlag();
      break;
    case SENSOR_TYPE_SERVO:
      initServo();
      break;
    default: break;
    // TODO(cduck): Add more smart sensors types
  }
}