@@ -95,7 +95,7 @@ RTM_EXPORT(rt_device_unregister);
9595 * @return the error code, RT_EOK on successfully.
9696 *
9797 * @deprecated since 1.2.x, this function is not needed because the initialization
98- * of a device is performed when applicaiton opens it.
98+ * of a device is performed when application opens it.
9999 */
100100rt_err_t rt_device_init_all (void )
101101{
@@ -162,7 +162,7 @@ rt_device_t rt_device_create(int type, int attach_size)
162162
163163 size = RT_ALIGN (sizeof (struct rt_device ), RT_ALIGN_SIZE );
164164 attach_size = RT_ALIGN (attach_size , RT_ALIGN_SIZE );
165- /* use the totoal size */
165+ /* use the total size */
166166 size += attach_size ;
167167
168168 device = (rt_device_t )rt_malloc (size );
@@ -208,7 +208,7 @@ rt_err_t rt_device_init(rt_device_t dev)
208208
209209 RT_ASSERT (dev != RT_NULL );
210210
211- /* get device init handler */
211+ /* get device_init handler */
212212 if (device_init != RT_NULL )
213213 {
214214 if (!(dev -> flag & RT_DEVICE_FLAG_ACTIVATED ))
@@ -269,7 +269,7 @@ rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag)
269269 return - RT_EBUSY ;
270270 }
271271
272- /* call device open interface */
272+ /* call device_open interface */
273273 if (device_open != RT_NULL )
274274 {
275275 result = device_open (dev , oflag );
@@ -317,7 +317,7 @@ rt_err_t rt_device_close(rt_device_t dev)
317317 if (dev -> ref_count != 0 )
318318 return RT_EOK ;
319319
320- /* call device close interface */
320+ /* call device_close interface */
321321 if (device_close != RT_NULL )
322322 {
323323 result = device_close (dev );
@@ -357,7 +357,7 @@ rt_size_t rt_device_read(rt_device_t dev,
357357 return 0 ;
358358 }
359359
360- /* call device read interface */
360+ /* call device_read interface */
361361 if (device_read != RT_NULL )
362362 {
363363 return device_read (dev , pos , buffer , size );
@@ -396,7 +396,7 @@ rt_size_t rt_device_write(rt_device_t dev,
396396 return 0 ;
397397 }
398398
399- /* call device write interface */
399+ /* call device_write interface */
400400 if (device_write != RT_NULL )
401401 {
402402 return device_write (dev , pos , buffer , size );
@@ -423,7 +423,7 @@ rt_err_t rt_device_control(rt_device_t dev, int cmd, void *arg)
423423 RT_ASSERT (dev != RT_NULL );
424424 RT_ASSERT (rt_object_get_type (& dev -> parent ) == RT_Object_Class_Device );
425425
426- /* call device write interface */
426+ /* call device_write interface */
427427 if (device_control != RT_NULL )
428428 {
429429 return device_control (dev , cmd , arg );
0 commit comments