diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/device.c | 4 | ||||
| -rw-r--r-- | src/mem.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index cbd42cf103..83385128d5 100644 --- a/src/device.c +++ b/src/device.c @@ -83,6 +83,10 @@ rt_err_t rt_device_init_all() { rt_kprintf("init device:%s error:\n", device->parent.name); rt_kprintf("error code:%d\n", result); + }
+ else
+ {
+ device->flag |= RT_DEVICE_FLAG_ACTIVATED;
} } } @@ -318,7 +318,7 @@ void *rt_malloc(rt_size_t size) #ifdef RT_USING_HOOK if (rt_malloc_hook != RT_NULL) - rt_malloc_hook((rt_uint8_t*)mem, size); + rt_malloc_hook((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM, size); #endif /* return the memory data except mem struct */ return (rt_uint8_t *)mem + SIZEOF_STRUCT_MEM; |
