mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
Kernel module should prefer functions with nx/kmm prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
15480e51cf
commit
0536953ded
@@ -31,9 +31,10 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <semaphore.h>
|
||||
#include <fixedmath.h>
|
||||
|
||||
#include <nuttx/semaphore.h>
|
||||
|
||||
#ifdef CONFIG_BATTERY_MONITOR
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -82,7 +82,7 @@ struct i2c_master_s;
|
||||
* Or, if using dynamic memory allocation and I2C:
|
||||
*
|
||||
* struct mpu_config_s* mpuc;
|
||||
* mpuc = malloc(sizeof(*mpuc));
|
||||
* mpuc = kmm_malloc(sizeof(*mpuc));
|
||||
* memset(mpuc, 0, sizeof(*mpuc)); * sets spi to NULL, if present *
|
||||
* mpuc.i2c = ...;
|
||||
*
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
# define EP_ALLOCBUFFER(ep,nb) (ep)->ops->allocbuffer(ep,nb)
|
||||
# define EP_FREEBUFFER(ep,buf) (ep)->ops->freebuffer(ep,buf)
|
||||
#else
|
||||
# define EP_ALLOCBUFFER(ep,nb) malloc(nb)
|
||||
# define EP_FREEBUFFER(ep,buf) free(buf)
|
||||
# define EP_ALLOCBUFFER(ep,nb) kmm_malloc(nb)
|
||||
# define EP_FREEBUFFER(ep,buf) kmm_free(buf)
|
||||
#endif
|
||||
|
||||
/* Submit an I/O request to the endpoint */
|
||||
|
||||
Reference in New Issue
Block a user