Commit cfc534d4 authored by Claes Sjofors's avatar Claes Sjofors

IO, max limit for number of channels for a card removed fix

parent 682f2fa1
...@@ -1611,6 +1611,7 @@ static pwr_tStatus io_init_card( ...@@ -1611,6 +1611,7 @@ static pwr_tStatus io_init_card(
{ {
pwr_tStatus sts; pwr_tStatus sts;
pwr_tClassId class; pwr_tClassId class;
pwr_tClassId chan_class;
pwr_tStatus (* CardInit) (); pwr_tStatus (* CardInit) ();
pwr_tStatus (* CardClose) (); pwr_tStatus (* CardClose) ();
pwr_tStatus (* CardRead) (); pwr_tStatus (* CardRead) ();
...@@ -1699,10 +1700,10 @@ static pwr_tStatus io_init_card( ...@@ -1699,10 +1700,10 @@ static pwr_tStatus io_init_card(
maxchan = 0; maxchan = 0;
sts = gdh_GetChild( objid, &chan); sts = gdh_GetChild( objid, &chan);
while( ODD(sts)) { while( ODD(sts)) {
sts = gdh_GetObjectClass( chan, &class); sts = gdh_GetObjectClass( chan, &chan_class);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
switch ( class) { switch ( chan_class) {
case pwr_cClass_ChanAi: case pwr_cClass_ChanAi:
case pwr_cClass_ChanAit: case pwr_cClass_ChanAit:
case pwr_cClass_ChanAo: case pwr_cClass_ChanAo:
...@@ -1828,10 +1829,10 @@ static pwr_tStatus io_init_card( ...@@ -1828,10 +1829,10 @@ static pwr_tStatus io_init_card(
sts = gdh_DLRefObjectInfoAttrref( &attrref, (void *) &chan_op, &chandlid); sts = gdh_DLRefObjectInfoAttrref( &attrref, (void *) &chan_op, &chandlid);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
sts = gdh_GetObjectClass( chan, &class); sts = gdh_GetObjectClass( chan, &chan_class);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
switch ( class) { switch ( chan_class) {
case pwr_cClass_ChanAi: case pwr_cClass_ChanAi:
sigchancon = ((pwr_sClass_ChanAi *) chan_op)->SigChanCon; sigchancon = ((pwr_sClass_ChanAi *) chan_op)->SigChanCon;
number = ((pwr_sClass_ChanAi *) chan_op)->Number; number = ((pwr_sClass_ChanAi *) chan_op)->Number;
...@@ -1923,7 +1924,7 @@ static pwr_tStatus io_init_card( ...@@ -1923,7 +1924,7 @@ static pwr_tStatus io_init_card(
chanp->cop = chan_op; chanp->cop = chan_op;
chanp->ChanDlid = chandlid; chanp->ChanDlid = chandlid;
chanp->ChanAref = cdh_ObjidToAref(chan); chanp->ChanAref = cdh_ObjidToAref(chan);
chanp->ChanClass = class; chanp->ChanClass = chan_class;
if ( sig_found) { if ( sig_found) {
chanp->sop = sig_op; chanp->sop = sig_op;
chanp->SigDlid = sigdlid; chanp->SigDlid = sigdlid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment