aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/adc.c15
-rw-r--r--os/hal/src/can.c12
-rw-r--r--os/hal/src/icu.c8
-rw-r--r--os/hal/src/pwm.c13
-rw-r--r--os/hal/src/serial.c4
-rw-r--r--os/hal/src/spi.c41
6 files changed, 40 insertions, 53 deletions
diff --git a/os/hal/src/adc.c b/os/hal/src/adc.c
index ccc11574a..e6d8d8075 100644
--- a/os/hal/src/adc.c
+++ b/os/hal/src/adc.c
@@ -102,7 +102,7 @@ void adcStart(ADCDriver *adcp, const ADCConfig *config) {
osalSysLock();
osalDbgAssert((adcp->state == ADC_STOP) || (adcp->state == ADC_READY),
- "adcStart(), #1", "invalid state");
+ "invalid state");
adcp->config = config;
adc_lld_start(adcp);
adcp->state = ADC_READY;
@@ -122,7 +122,7 @@ void adcStop(ADCDriver *adcp) {
osalSysLock();
osalDbgAssert((adcp->state == ADC_STOP) || (adcp->state == ADC_READY),
- "adcStop(), #1", "invalid state");
+ "invalid state");
adc_lld_stop(adcp);
adcp->state = ADC_STOP;
osalSysUnlock();
@@ -183,7 +183,7 @@ void adcStartConversionI(ADCDriver *adcp,
osalDbgAssert((adcp->state == ADC_READY) ||
(adcp->state == ADC_COMPLETE) ||
(adcp->state == ADC_ERROR),
- "adcStartConversionI(), #1", "not ready");
+ "not ready");
adcp->samples = samples;
adcp->depth = depth;
@@ -207,9 +207,8 @@ void adcStopConversion(ADCDriver *adcp) {
osalDbgCheck(adcp != NULL);
osalSysLock();
- osalDbgAssert((adcp->state == ADC_READY) ||
- (adcp->state == ADC_ACTIVE),
- "adcStopConversion(), #1", "invalid state");
+ osalDbgAssert((adcp->state == ADC_READY) || (adcp->state == ADC_ACTIVE),
+ "invalid state");
if (adcp->state != ADC_READY) {
adc_lld_stop_conversion(adcp);
adcp->grpp = NULL;
@@ -236,7 +235,7 @@ void adcStopConversionI(ADCDriver *adcp) {
osalDbgAssert((adcp->state == ADC_READY) ||
(adcp->state == ADC_ACTIVE) ||
(adcp->state == ADC_COMPLETE),
- "adcStopConversionI(), #1", "invalid state");
+ "invalid state");
if (adcp->state != ADC_READY) {
adc_lld_stop_conversion(adcp);
@@ -277,7 +276,7 @@ msg_t adcConvert(ADCDriver *adcp,
msg_t msg;
osalSysLock();
- osalDbgAssert(adcp->thread == NULL, "adcConvert(), #1", "already waiting");
+ osalDbgAssert(adcp->thread == NULL, "already waiting");
adcStartConversionI(adcp, grpp, samples, depth);
msg = osalThreadSuspendS(&adcp->thread);
osalSysUnlock();
diff --git a/os/hal/src/can.c b/os/hal/src/can.c
index 9a352ddd1..ed5c43f87 100644
--- a/os/hal/src/can.c
+++ b/os/hal/src/can.c
@@ -104,7 +104,7 @@ void canStart(CANDriver *canp, const CANConfig *config) {
osalDbgAssert((canp->state == CAN_STOP) ||
(canp->state == CAN_STARTING) ||
(canp->state == CAN_READY),
- "canStart(), #1", "invalid state");
+ "invalid state");
while (canp->state == CAN_STARTING)
osalThreadSleepS(1);
if (canp->state == CAN_STOP) {
@@ -128,7 +128,7 @@ void canStop(CANDriver *canp) {
osalSysLock();
osalDbgAssert((canp->state == CAN_STOP) || (canp->state == CAN_READY),
- "canStop(), #1", "invalid state");
+ "invalid state");
can_lld_stop(canp);
canp->state = CAN_STOP;
osalQueueWakeupAllI(&canp->rxqueue, MSG_RESET);
@@ -168,7 +168,7 @@ msg_t canTransmit(CANDriver *canp,
osalSysLock();
osalDbgAssert((canp->state == CAN_READY) || (canp->state == CAN_SLEEP),
- "canTransmit(), #1", "invalid state");
+ "invalid state");
while ((canp->state == CAN_SLEEP) || !can_lld_is_tx_empty(canp, mailbox)) {
msg_t msg = osalQueueGoSleepTimeoutS(&canp->txqueue, timeout);
if (msg != MSG_OK) {
@@ -213,7 +213,7 @@ msg_t canReceive(CANDriver *canp,
osalSysLock();
osalDbgAssert((canp->state == CAN_READY) || (canp->state == CAN_SLEEP),
- "canReceive(), #1", "invalid state");
+ "invalid state");
while ((canp->state == CAN_SLEEP) || !can_lld_is_rx_nonempty(canp, mailbox)) {
msg_t msg = osalQueueGoSleepTimeoutS(&canp->rxqueue, timeout);
if (msg != MSG_OK) {
@@ -245,7 +245,7 @@ void canSleep(CANDriver *canp) {
osalSysLock();
osalDbgAssert((canp->state == CAN_READY) || (canp->state == CAN_SLEEP),
- "canSleep(), #1", "invalid state");
+ "invalid state");
if (canp->state == CAN_READY) {
can_lld_sleep(canp);
canp->state = CAN_SLEEP;
@@ -268,7 +268,7 @@ void canWakeup(CANDriver *canp) {
osalSysLock();
osalDbgAssert((canp->state == CAN_READY) || (canp->state == CAN_SLEEP),
- "canWakeup(), #1", "invalid state");
+ "invalid state");
if (canp->state == CAN_SLEEP) {
can_lld_wakeup(canp);
canp->state = CAN_READY;
diff --git a/os/hal/src/icu.c b/os/hal/src/icu.c
index 401c0e04c..291b6df9a 100644
--- a/os/hal/src/icu.c
+++ b/os/hal/src/icu.c
@@ -89,7 +89,7 @@ void icuStart(ICUDriver *icup, const ICUConfig *config) {
osalSysLock();
osalDbgAssert((icup->state == ICU_STOP) || (icup->state == ICU_READY),
- "icuStart(), #1", "invalid state");
+ "invalid state");
icup->config = config;
icu_lld_start(icup);
icup->state = ICU_READY;
@@ -109,7 +109,7 @@ void icuStop(ICUDriver *icup) {
osalSysLock();
osalDbgAssert((icup->state == ICU_STOP) || (icup->state == ICU_READY),
- "icuStop(), #1", "invalid state");
+ "invalid state");
icu_lld_stop(icup);
icup->state = ICU_STOP;
osalSysUnlock();
@@ -127,7 +127,7 @@ void icuEnable(ICUDriver *icup) {
osalDbgCheck(icup != NULL);
osalSysLock();
- osalDbgAssert(icup->state == ICU_READY, "icuEnable(), #1", "invalid state");
+ osalDbgAssert(icup->state == ICU_READY, "invalid state");
icu_lld_enable(icup);
icup->state = ICU_WAITING;
osalSysUnlock();
@@ -147,7 +147,7 @@ void icuDisable(ICUDriver *icup) {
osalSysLock();
osalDbgAssert((icup->state == ICU_READY) || (icup->state == ICU_WAITING) ||
(icup->state == ICU_ACTIVE) || (icup->state == ICU_IDLE),
- "icuDisable(), #1", "invalid state");
+ "invalid state");
icu_lld_disable(icup);
icup->state = ICU_READY;
osalSysUnlock();
diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c
index bde512176..dfbe32df3 100644
--- a/os/hal/src/pwm.c
+++ b/os/hal/src/pwm.c
@@ -94,7 +94,7 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) {
osalSysLock();
osalDbgAssert((pwmp->state == PWM_STOP) || (pwmp->state == PWM_READY),
- "pwmStart(), #1", "invalid state");
+ "invalid state");
pwmp->config = config;
pwmp->period = config->period;
pwm_lld_start(pwmp);
@@ -115,7 +115,7 @@ void pwmStop(PWMDriver *pwmp) {
osalSysLock();
osalDbgAssert((pwmp->state == PWM_STOP) || (pwmp->state == PWM_READY),
- "pwmStop(), #1", "invalid state");
+ "invalid state");
pwm_lld_stop(pwmp);
pwmp->state = PWM_STOP;
osalSysUnlock();
@@ -141,8 +141,7 @@ void pwmChangePeriod(PWMDriver *pwmp, pwmcnt_t period) {
osalDbgCheck(pwmp != NULL);
osalSysLock();
- osalDbgAssert(pwmp->state == PWM_READY,
- "pwmChangePeriod(), #1", "invalid state");
+ osalDbgAssert(pwmp->state == PWM_READY, "invalid state");
pwmChangePeriodI(pwmp, period);
osalSysUnlock();
}
@@ -168,8 +167,7 @@ void pwmEnableChannel(PWMDriver *pwmp,
osalDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS));
osalSysLock();
- osalDbgAssert(pwmp->state == PWM_READY,
- "pwmEnableChannel(), #1", "not ready");
+ osalDbgAssert(pwmp->state == PWM_READY, "not ready");
pwm_lld_enable_channel(pwmp, channel, width);
osalSysUnlock();
}
@@ -193,8 +191,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) {
osalDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS));
osalSysLock();
- osalDbgAssert(pwmp->state == PWM_READY,
- "pwmDisableChannel(), #1", "not ready");
+ osalDbgAssert(pwmp->state == PWM_READY, "not ready");
pwm_lld_disable_channel(pwmp, channel);
osalSysUnlock();
}
diff --git a/os/hal/src/serial.c b/os/hal/src/serial.c
index 0b9d5b41d..4b1fd17d5 100644
--- a/os/hal/src/serial.c
+++ b/os/hal/src/serial.c
@@ -154,7 +154,7 @@ void sdStart(SerialDriver *sdp, const SerialConfig *config) {
osalSysLock();
osalDbgAssert((sdp->state == SD_STOP) || (sdp->state == SD_READY),
- "sdStart(), #1", "invalid state");
+ "invalid state");
sd_lld_start(sdp, config);
sdp->state = SD_READY;
osalSysUnlock();
@@ -175,7 +175,7 @@ void sdStop(SerialDriver *sdp) {
osalSysLock();
osalDbgAssert((sdp->state == SD_STOP) || (sdp->state == SD_READY),
- "sdStop(), #1", "invalid state");
+ "invalid state");
sd_lld_stop(sdp);
sdp->state = SD_STOP;
oqResetI(&sdp->oqueue);
diff --git a/os/hal/src/spi.c b/os/hal/src/spi.c
index cd7124bd3..f47ed0527 100644
--- a/os/hal/src/spi.c
+++ b/os/hal/src/spi.c
@@ -98,7 +98,7 @@ void spiStart(SPIDriver *spip, const SPIConfig *config) {
osalSysLock();
osalDbgAssert((spip->state == SPI_STOP) || (spip->state == SPI_READY),
- "spiStart(), #1", "invalid state");
+ "invalid state");
spip->config = config;
spi_lld_start(spip);
spip->state = SPI_READY;
@@ -120,7 +120,7 @@ void spiStop(SPIDriver *spip) {
osalSysLock();
osalDbgAssert((spip->state == SPI_STOP) || (spip->state == SPI_READY),
- "spiStop(), #1", "invalid state");
+ "invalid state");
spi_lld_stop(spip);
spip->state = SPI_STOP;
osalSysUnlock();
@@ -138,7 +138,7 @@ void spiSelect(SPIDriver *spip) {
osalDbgCheck(spip != NULL);
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY, "spiSelect(), #1", "not ready");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
spiSelectI(spip);
osalSysUnlock();
}
@@ -156,7 +156,7 @@ void spiUnselect(SPIDriver *spip) {
osalDbgCheck(spip != NULL);
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY, "spiUnselect(), #1", "not ready");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
spiUnselectI(spip);
osalSysUnlock();
}
@@ -179,7 +179,7 @@ void spiStartIgnore(SPIDriver *spip, size_t n) {
osalDbgCheck((spip != NULL) && (n > 0));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY, "spiStartIgnore(), #1", "not ready");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
spiStartIgnoreI(spip, n);
osalSysUnlock();
}
@@ -207,8 +207,7 @@ void spiStartExchange(SPIDriver *spip, size_t n,
osalDbgCheck((spip != NULL) && (n > 0) && (rxbuf != NULL) && (txbuf != NULL));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY,
- "spiStartExchange(), #1", "not ready");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
spiStartExchangeI(spip, n, txbuf, rxbuf);
osalSysUnlock();
}
@@ -233,7 +232,7 @@ void spiStartSend(SPIDriver *spip, size_t n, const void *txbuf) {
osalDbgCheck((spip != NULL) && (n > 0) && (txbuf != NULL));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY, "spiStartSend(), #1", "not ready");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
spiStartSendI(spip, n, txbuf);
osalSysUnlock();
}
@@ -258,8 +257,7 @@ void spiStartReceive(SPIDriver *spip, size_t n, void *rxbuf) {
osalDbgCheck((spip != NULL) && (n > 0) && (rxbuf != NULL));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY,
- "spiStartReceive(), #1", "not ready");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
spiStartReceiveI(spip, n, rxbuf);
osalSysUnlock();
}
@@ -284,10 +282,8 @@ void spiIgnore(SPIDriver *spip, size_t n) {
osalDbgCheck((spip != NULL) && (n > 0));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY,
- "spiIgnore(), #1", "not ready");
- osalDbgAssert(spip->config->end_cb == NULL,
- "spiIgnore(), #2", "has callback");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
+ osalDbgAssert(spip->config->end_cb == NULL, "has callback");
spiStartIgnoreI(spip, n);
_spi_wait_s(spip);
osalSysUnlock();
@@ -318,9 +314,8 @@ void spiExchange(SPIDriver *spip, size_t n,
(rxbuf != NULL) && (txbuf != NULL));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY, "spiExchange(), #1", "not ready");
- osalDbgAssert(spip->config->end_cb == NULL,
- "spiExchange(), #2", "has callback");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
+ osalDbgAssert(spip->config->end_cb == NULL, "has callback");
spiStartExchangeI(spip, n, txbuf, rxbuf);
_spi_wait_s(spip);
osalSysUnlock();
@@ -347,10 +342,8 @@ void spiSend(SPIDriver *spip, size_t n, const void *txbuf) {
osalDbgCheck((spip != NULL) && (n > 0) && (txbuf != NULL));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY,
- "spiSend(), #1", "not ready");
- osalDbgAssert(spip->config->end_cb == NULL,
- "spiSend(), #2", "has callback");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
+ osalDbgAssert(spip->config->end_cb == NULL, "has callback");
spiStartSendI(spip, n, txbuf);
_spi_wait_s(spip);
osalSysUnlock();
@@ -377,10 +370,8 @@ void spiReceive(SPIDriver *spip, size_t n, void *rxbuf) {
osalDbgCheck((spip != NULL) && (n > 0) && (rxbuf != NULL));
osalSysLock();
- osalDbgAssert(spip->state == SPI_READY,
- "spiReceive(), #1", "not ready");
- osalDbgAssert(spip->config->end_cb == NULL,
- "spiReceive(), #2", "has callback");
+ osalDbgAssert(spip->state == SPI_READY, "not ready");
+ osalDbgAssert(spip->config->end_cb == NULL, "has callback");
spiStartReceiveI(spip, n, rxbuf);
_spi_wait_s(spip);
osalSysUnlock();