Commit 3ddf8306 authored by claes's avatar claes

sts added

parent 86f20252
...@@ -26,13 +26,15 @@ void bfbeth_set_write_req(io_sRackLocal *r, pwr_tUInt16 address, pwr_tUInt16 dat ...@@ -26,13 +26,15 @@ void bfbeth_set_write_req(io_sRackLocal *r, pwr_tUInt16 address, pwr_tUInt16 dat
return; return;
} }
pwr_tUInt16 bfbeth_get_data(io_sRackLocal *r, pwr_tUInt16 address) { pwr_tUInt16 bfbeth_get_data(io_sRackLocal *r, pwr_tUInt16 address, int *sts) {
int i; int i;
*sts = -1;
for (i=0; i<350; i++) { for (i=0; i<350; i++) {
if (r->read_area.item[i].address == address) if (r->read_area.item[i].address == address) {
*sts = 1;
return (r->read_area.item[i].data); return (r->read_area.item[i].data);
}
} }
return 0; return 0;
} }
...@@ -6,4 +6,5 @@ void bfbeth_set_write_req( io_sRackLocal *r, ...@@ -6,4 +6,5 @@ void bfbeth_set_write_req( io_sRackLocal *r,
pwr_tUInt16 data); pwr_tUInt16 data);
pwr_tUInt16 bfbeth_get_data( io_sRackLocal *r, pwr_tUInt16 bfbeth_get_data( io_sRackLocal *r,
pwr_tUInt16 address); pwr_tUInt16 address,
int *sts);
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