[fal]修正类型不匹配
This commit is contained in:
parent
d5aff0c963
commit
a2ab247d8f
|
@ -212,7 +212,7 @@ struct fal_mtd_nor_device
|
||||||
const struct fal_partition *fal_part;
|
const struct fal_partition *fal_part;
|
||||||
};
|
};
|
||||||
|
|
||||||
static rt_ssize_t mtd_nor_dev_read(struct rt_mtd_nor_device* device, rt_off_t offset, rt_uint8_t* data, rt_uint32_t length)
|
static rt_ssize_t mtd_nor_dev_read(struct rt_mtd_nor_device* device, rt_off_t offset, rt_uint8_t* data, rt_size_t length)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct fal_mtd_nor_device *part = (struct fal_mtd_nor_device*) device;
|
struct fal_mtd_nor_device *part = (struct fal_mtd_nor_device*) device;
|
||||||
|
@ -233,7 +233,7 @@ static rt_ssize_t mtd_nor_dev_read(struct rt_mtd_nor_device* device, rt_off_t of
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rt_ssize_t mtd_nor_dev_write(struct rt_mtd_nor_device* device, rt_off_t offset, const rt_uint8_t* data, rt_uint32_t length)
|
static rt_ssize_t mtd_nor_dev_write(struct rt_mtd_nor_device* device, rt_off_t offset, const rt_uint8_t* data, rt_size_t length)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct fal_mtd_nor_device *part;
|
struct fal_mtd_nor_device *part;
|
||||||
|
@ -255,7 +255,7 @@ static rt_ssize_t mtd_nor_dev_write(struct rt_mtd_nor_device* device, rt_off_t o
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rt_err_t mtd_nor_dev_erase(struct rt_mtd_nor_device* device, rt_off_t offset, rt_uint32_t length)
|
static rt_err_t mtd_nor_dev_erase(struct rt_mtd_nor_device* device, rt_off_t offset, rt_size_t length)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct fal_mtd_nor_device *part;
|
struct fal_mtd_nor_device *part;
|
||||||
|
@ -265,7 +265,7 @@ static rt_err_t mtd_nor_dev_erase(struct rt_mtd_nor_device* device, rt_off_t off
|
||||||
|
|
||||||
ret = fal_partition_erase(part->fal_part, offset, length);
|
ret = fal_partition_erase(part->fal_part, offset, length);
|
||||||
|
|
||||||
if ((rt_uint32_t)ret != length || ret < 0)
|
if (ret != (int)length || ret < 0)
|
||||||
{
|
{
|
||||||
return -RT_ERROR;
|
return -RT_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -277,10 +277,10 @@ static rt_err_t mtd_nor_dev_erase(struct rt_mtd_nor_device* device, rt_off_t off
|
||||||
|
|
||||||
static const struct rt_mtd_nor_driver_ops _ops =
|
static const struct rt_mtd_nor_driver_ops _ops =
|
||||||
{
|
{
|
||||||
RT_NULL,
|
RT_NULL, /* read_id */
|
||||||
mtd_nor_dev_read,
|
mtd_nor_dev_read, /* read */
|
||||||
mtd_nor_dev_write,
|
mtd_nor_dev_write, /* write*/
|
||||||
mtd_nor_dev_erase,
|
mtd_nor_dev_erase, /* erase_block */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue