mirror of https://github.com/ARMmbed/mbed-os.git
Replaced const define with hardcoded bus size of 16
parent
7d54c82331
commit
d068a2b479
|
@ -73,7 +73,7 @@ BusIn::operator int() {
|
|||
}
|
||||
|
||||
DigitalIn& BusIn::operator[] (int index) {
|
||||
MBED_ASSERT(index < 0 || index >= MBED_BUS_SIZE);
|
||||
MBED_ASSERT(index < 0 || index >= 16);
|
||||
MBED_ASSERT(_pin[index]);
|
||||
if (index >= 16 || _pin[index] == NULL) {
|
||||
return din_dummy;
|
||||
|
|
|
@ -103,7 +103,7 @@ BusInOut& BusInOut::operator= (BusInOut& rhs) {
|
|||
}
|
||||
|
||||
DigitalInOut& BusInOut::operator[] (int index) {
|
||||
MBED_ASSERT(index < 0 || index >= MBED_BUS_SIZE);
|
||||
MBED_ASSERT(index < 0 || index >= 16);
|
||||
MBED_ASSERT(_pin[index]);
|
||||
if (index >= 16 || _pin[index] == NULL) {
|
||||
return dinout_dummy;
|
||||
|
|
|
@ -79,7 +79,7 @@ BusOut& BusOut::operator= (BusOut& rhs) {
|
|||
}
|
||||
|
||||
DigitalOut& BusOut::operator[] (int index) {
|
||||
MBED_ASSERT(index < 0 || index >= MBED_BUS_SIZE);
|
||||
MBED_ASSERT(index < 0 || index >= 16);
|
||||
MBED_ASSERT(_pin[index]);
|
||||
if (index >= 16 || _pin[index] == NULL) {
|
||||
return dout_dummy;
|
||||
|
|
Loading…
Reference in New Issue