Replaced const define with hardcoded bus size of 16

pull/808/head
Przemek Wirkus 2015-01-06 08:42:49 +00:00
parent 7d54c82331
commit d068a2b479
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ BusIn::operator int() {
} }
DigitalIn& BusIn::operator[] (int index) { DigitalIn& BusIn::operator[] (int index) {
MBED_ASSERT(index < 0 || index >= MBED_BUS_SIZE); MBED_ASSERT(index < 0 || index >= 16);
MBED_ASSERT(_pin[index]); MBED_ASSERT(_pin[index]);
if (index >= 16 || _pin[index] == NULL) { if (index >= 16 || _pin[index] == NULL) {
return din_dummy; return din_dummy;

View File

@ -103,7 +103,7 @@ BusInOut& BusInOut::operator= (BusInOut& rhs) {
} }
DigitalInOut& BusInOut::operator[] (int index) { DigitalInOut& BusInOut::operator[] (int index) {
MBED_ASSERT(index < 0 || index >= MBED_BUS_SIZE); MBED_ASSERT(index < 0 || index >= 16);
MBED_ASSERT(_pin[index]); MBED_ASSERT(_pin[index]);
if (index >= 16 || _pin[index] == NULL) { if (index >= 16 || _pin[index] == NULL) {
return dinout_dummy; return dinout_dummy;

View File

@ -79,7 +79,7 @@ BusOut& BusOut::operator= (BusOut& rhs) {
} }
DigitalOut& BusOut::operator[] (int index) { DigitalOut& BusOut::operator[] (int index) {
MBED_ASSERT(index < 0 || index >= MBED_BUS_SIZE); MBED_ASSERT(index < 0 || index >= 16);
MBED_ASSERT(_pin[index]); MBED_ASSERT(_pin[index]);
if (index >= 16 || _pin[index] == NULL) { if (index >= 16 || _pin[index] == NULL) {
return dout_dummy; return dout_dummy;