diff options
| author | Meco Man <[email protected]> | 2023-03-17 00:12:16 -0400 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2023-03-20 00:06:16 -0400 |
| commit | 0f461e870c481a24ce2690cca1949706bb80f9e7 (patch) | |
| tree | e77c8813658be76824bb848346cf9ef2340806f2 /documentation | |
| parent | de963feef4c5075626858c97413186fc2a309ffe (diff) | |
[errno code][-RT_ERROR] fix that use RT_ERROR without -
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/device/adc/adc.md | 2 | ||||
| -rw-r--r-- | documentation/device/device.md | 2 | ||||
| -rw-r--r-- | documentation/device/hwtimer/hwtimer.md | 4 | ||||
| -rw-r--r-- | documentation/device/pwm/pwm.md | 2 | ||||
| -rw-r--r-- | documentation/device/uart/uart.md | 8 | ||||
| -rw-r--r-- | documentation/device/watchdog/watchdog.md | 6 |
6 files changed, 12 insertions, 12 deletions
diff --git a/documentation/device/adc/adc.md b/documentation/device/adc/adc.md index 8b1f60fed4..9ded20ae7f 100644 --- a/documentation/device/adc/adc.md +++ b/documentation/device/adc/adc.md @@ -236,7 +236,7 @@ static int adc_vol_sample(int argc, char *argv[]) if (adc_dev == RT_NULL) { rt_kprintf("adc sample run failed! can't find %s device!\n", ADC_DEV_NAME); - return RT_ERROR; + return -RT_ERROR; } /* enable the device */ diff --git a/documentation/device/device.md b/documentation/device/device.md index 2f24f61304..4c8c026c18 100644 --- a/documentation/device/device.md +++ b/documentation/device/device.md @@ -461,7 +461,7 @@ int main(void) if (!wdg_dev) { rt_kprintf("find %s failed!\n", IWDG_DEVICE_NAME); - return RT_ERROR; + return -RT_ERROR; } /* initialize device */ res = rt_device_init(wdg_dev); diff --git a/documentation/device/hwtimer/hwtimer.md b/documentation/device/hwtimer/hwtimer.md index 333578b104..da8903a547 100644 --- a/documentation/device/hwtimer/hwtimer.md +++ b/documentation/device/hwtimer/hwtimer.md @@ -354,7 +354,7 @@ static int hwtimer_sample(int argc, char *argv[]) if (hw_dev == RT_NULL) { rt_kprintf("hwtimer sample run failed! can't find %s device!\n", HWTIMER_DEV_NAME); - return RT_ERROR; + return -RT_ERROR; } /* Open the device in read-write mode */ @@ -384,7 +384,7 @@ static int hwtimer_sample(int argc, char *argv[]) if (rt_device_write(hw_dev, 0, &timeout_s, sizeof(timeout_s)) != sizeof(timeout_s)) { rt_kprintf("set timeout value failed\n"); - return RT_ERROR; + return -RT_ERROR; } /* delay 3500ms */ diff --git a/documentation/device/pwm/pwm.md b/documentation/device/pwm/pwm.md index e87c1328f9..792078289e 100644 --- a/documentation/device/pwm/pwm.md +++ b/documentation/device/pwm/pwm.md @@ -223,7 +223,7 @@ static int pwm_led_sample(int argc, char *argv[]) if (pwm_dev == RT_NULL) { rt_kprintf("pwm sample run failed! can't find %s device!\n", PWM_DEV_NAME); - return RT_ERROR; + return -RT_ERROR; } /* Set PWM period and pulse width defaults */ diff --git a/documentation/device/uart/uart.md b/documentation/device/uart/uart.md index 27227607b0..d49a005019 100644 --- a/documentation/device/uart/uart.md +++ b/documentation/device/uart/uart.md @@ -482,7 +482,7 @@ static int uart_sample(int argc, char *argv[]) if (!serial) { rt_kprintf("find %s failed!\n", uart_name); - return RT_ERROR; + return -RT_ERROR; } /* Initialize the semaphore */ @@ -503,7 +503,7 @@ static int uart_sample(int argc, char *argv[]) } else { - ret = RT_ERROR; + ret = -RT_ERROR; } return ret; @@ -609,7 +609,7 @@ static int uart_dma_sample(int argc, char *argv[]) if (!serial) { rt_kprintf("find %s failed!\n", uart_name); - return RT_ERROR; + return -RT_ERROR; } /* Initialize message queue */ @@ -635,7 +635,7 @@ static int uart_dma_sample(int argc, char *argv[]) } else { - ret = RT_ERROR; + ret = -RT_ERROR; } return ret; diff --git a/documentation/device/watchdog/watchdog.md b/documentation/device/watchdog/watchdog.md index 053c4f20ec..e300f5a798 100644 --- a/documentation/device/watchdog/watchdog.md +++ b/documentation/device/watchdog/watchdog.md @@ -201,21 +201,21 @@ static int iwdg_sample(int argc, char *argv[]) if (!wdg_dev) { rt_kprintf("find %s failed!\n", device_name); - return RT_ERROR; + return -RT_ERROR; } /* initialize the device */ ret = rt_device_init(wdg_dev); if (ret != RT_EOK) { rt_kprintf("initialize %s failed!\n", device_name); - return RT_ERROR; + return -RT_ERROR; } /* set the overflow time of the watch dog */ ret = rt_device_control(wdg_dev, RT_DEVICE_CTRL_WDT_SET_TIMEOUT, &timeout); if (ret != RT_EOK) { rt_kprintf("set %s timeout failed!\n", device_name); - return RT_ERROR; + return -RT_ERROR; } /* set idle thread callback function */ rt_thread_idle_sethook(idle_hook); |
