diff options
| author | guozhanxin <[email protected]> | 2022-03-30 19:24:54 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2022-04-01 00:09:31 +0800 |
| commit | d48630e2b6f277996f40d2fecdc864c1fc2d61e4 (patch) | |
| tree | e99caceb0931924c291f40d2b5d2b0ac0146bb14 | |
| parent | b10761c09dfee22150e5abded0c4b7a94a8a19e3 (diff) | |
[bsp]fix building error.
| -rw-r--r-- | bsp/lpc55sxx/Libraries/drivers/drv_pwm.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/bsp/lpc55sxx/Libraries/drivers/drv_pwm.c b/bsp/lpc55sxx/Libraries/drivers/drv_pwm.c index e2fa7f05b6..aa950c3378 100644 --- a/bsp/lpc55sxx/Libraries/drivers/drv_pwm.c +++ b/bsp/lpc55sxx/Libraries/drivers/drv_pwm.c @@ -203,55 +203,4 @@ int rt_hw_pwm_init(void) INIT_DEVICE_EXPORT(rt_hw_pwm_init); - -#ifdef RT_USING_FINSH -#include <finsh.h> - -#ifdef FINSH_USING_MSH - -rt_err_t rt_pwm_get(struct rt_device_pwm *device, int channel) -{ - rt_err_t result = RT_EOK; - struct rt_pwm_configuration configuration = {0}; - - if (!device) - { - return -RT_EIO; - } - - configuration.channel = channel; - result = rt_device_control(&device->parent, PWM_CMD_GET, &configuration); - - return result; -} - -static int pwm_get(int argc, char **argv) -{ - int result = 0; - struct rt_device_pwm *device = RT_NULL; - - if (argc != 3) - { - rt_kprintf("Usage: pwm_get pwm1 1\n"); - result = -RT_ERROR; - goto _exit; - } - - device = (struct rt_device_pwm *)rt_device_find(argv[1]); - if (!device) - { - result = -RT_EIO; - goto _exit; - } - - result = rt_pwm_get(device, atoi(argv[2])); - -_exit: - return result; -} -MSH_CMD_EXPORT(pwm_get, pwm_get pwm1 1); - -#endif /* FINSH_USING_MSH */ -#endif /* RT_USING_FINSH */ - #endif /* RT_USING_PWM */ |
