HAL_Linux: don't panic on runtime failures
This commit is contained in:
parent
582318448f
commit
bf001f19ff
@ -174,7 +174,6 @@ void LinuxGPIO_RPI::setPWM0Period(uint32_t time_us)
|
||||
// 320 bits for one cycle of 20 milliseconds = 62.5 us per bit = 16 kHz
|
||||
int idiv = (int) (19200000.0f / (320000000.0f / time_us));
|
||||
if (idiv < 1 || idiv > 0x1000) {
|
||||
hal.scheduler->panic("idiv out of range.");
|
||||
return;
|
||||
}
|
||||
*(clk + PWMCLK_DIV) = 0x5A000000 | (idiv<<12);
|
||||
|
@ -161,7 +161,6 @@ void LinuxRPIOUARTDriver::_timer_tick(void)
|
||||
if (_baudrate != 0) {
|
||||
|
||||
if (!_spi_sem->take_nonblocking()) {
|
||||
hal.scheduler->panic("SPIDevice_RASPIO cannot take semaphore!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user