sts: add STS_UNREACHABLE_DEFAULT_CASE()

This commit is contained in:
Michael Scire 2019-09-28 15:13:20 -07:00 committed by SciresM
parent 609a302e16
commit add18d868f
23 changed files with 50 additions and 87 deletions

View file

@ -70,8 +70,7 @@ namespace sts::i2c::driver {
svcSleepThread(us * 1'000ul);
}
break;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
return ResultSuccess;
}

View file

@ -282,8 +282,7 @@ namespace sts::i2c::driver::impl {
src_div = 0x02;
debounce = 0;
break;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
if (speed_mode == SpeedMode::HighSpeed) {

View file

@ -61,8 +61,7 @@ namespace sts::i2c::driver::impl {
return PcvModule_I2C5;
case Bus::I2C6:
return PcvModule_I2C6;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}
@ -80,8 +79,7 @@ namespace sts::i2c::driver::impl {
return Bus::I2C5;
case PcvModule_I2C6:
return Bus::I2C6;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}

View file

@ -76,8 +76,7 @@ namespace sts::i2c::driver::impl {
case Command::Receive:
R_TRY(this->bus_accessor->Receive(reinterpret_cast<u8 *>(dst), num_bytes, option, this->addressing_mode, this->slave_address));
break;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
return ResultSuccess;