zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g" git grep -l 's\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g" Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ee6fa31af6
commit
a1b77fd589
2364 changed files with 32505 additions and 32505 deletions
|
@ -49,13 +49,13 @@ struct fcb_entry {
|
|||
struct flash_sector *fe_sector;
|
||||
/**< Pointer to info about sector where data are placed */
|
||||
|
||||
u32_t fe_elem_off;
|
||||
uint32_t fe_elem_off;
|
||||
/**< Offset from the start of the sector to beginning of element. */
|
||||
|
||||
u32_t fe_data_off;
|
||||
uint32_t fe_data_off;
|
||||
/**< Offset from the start of the sector to the start of element. */
|
||||
|
||||
u16_t fe_data_len; /**< Size of data area in fcb entry*/
|
||||
uint16_t fe_data_len; /**< Size of data area in fcb entry*/
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -85,15 +85,15 @@ struct fcb_entry_ctx {
|
|||
*/
|
||||
struct fcb {
|
||||
/* Caller of fcb_init fills this in */
|
||||
u32_t f_magic;
|
||||
uint32_t f_magic;
|
||||
/**< Magic value. It is placed in the beginning of FCB flash sector.
|
||||
* FCB uses this when determining whether sector contains valid data
|
||||
* or not.
|
||||
*/
|
||||
|
||||
u8_t f_version; /**< Current version number of the data */
|
||||
u8_t f_sector_cnt; /**< Number of elements in sector array */
|
||||
u8_t f_scratch_cnt;
|
||||
uint8_t f_version; /**< Current version number of the data */
|
||||
uint8_t f_sector_cnt; /**< Number of elements in sector array */
|
||||
uint8_t f_scratch_cnt;
|
||||
/**< Number of sectors to keep empty. This can be used if you need
|
||||
* to have scratch space for garbage collecting when FCB fills up.
|
||||
*/
|
||||
|
@ -111,10 +111,10 @@ struct fcb {
|
|||
*/
|
||||
|
||||
struct fcb_entry f_active; /**< internal state */
|
||||
u16_t f_active_id;
|
||||
uint16_t f_active_id;
|
||||
/**< Flash location where the newest data is, internal state */
|
||||
|
||||
u8_t f_align;
|
||||
uint8_t f_align;
|
||||
/**< writes to flash have to aligned to this, internal state */
|
||||
|
||||
const struct flash_area *fap;
|
||||
|
@ -159,7 +159,7 @@ int fcb_init(int f_area_id, struct fcb *fcb);
|
|||
*
|
||||
* @return 0 on success, non-zero on failure.
|
||||
*/
|
||||
int fcb_append(struct fcb *fcb, u16_t len, struct fcb_entry *loc);
|
||||
int fcb_append(struct fcb *fcb, uint16_t len, struct fcb_entry *loc);
|
||||
|
||||
/**
|
||||
* Finishes entry append operation.
|
||||
|
@ -273,7 +273,7 @@ int fcb_is_empty(struct fcb *fcb);
|
|||
*
|
||||
* @return 0 on there are any fcbs available; -ENOENT otherwise
|
||||
*/
|
||||
int fcb_offset_last_n(struct fcb *fcb, u8_t entries,
|
||||
int fcb_offset_last_n(struct fcb *fcb, uint8_t entries,
|
||||
struct fcb_entry *last_n_entry);
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,15 +23,15 @@ struct fs_littlefs {
|
|||
struct lfs_config cfg;
|
||||
|
||||
/* Must be cfg.cache_size */
|
||||
u8_t *read_buffer;
|
||||
uint8_t *read_buffer;
|
||||
|
||||
/* Must be cfg.cache_size */
|
||||
u8_t *prog_buffer;
|
||||
uint8_t *prog_buffer;
|
||||
|
||||
/* Mustbe cfg.lookahead_size/4 elements, and
|
||||
* cfg.lookahead_size must be a multiple of 8.
|
||||
*/
|
||||
u32_t *lookahead_buffer[CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE / sizeof(u32_t)];
|
||||
uint32_t *lookahead_buffer[CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE / sizeof(uint32_t)];
|
||||
|
||||
/* These structures are filled automatically at mount. */
|
||||
struct lfs lfs;
|
||||
|
@ -68,9 +68,9 @@ struct fs_littlefs {
|
|||
* @param lookahead_sz see :option:`CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE`
|
||||
*/
|
||||
#define FS_LITTLEFS_DECLARE_CUSTOM_CONFIG(name, read_sz, prog_sz, cache_sz, lookahead_sz) \
|
||||
static u8_t __aligned(4) name ## _read_buffer[cache_sz]; \
|
||||
static u8_t __aligned(4) name ## _prog_buffer[cache_sz]; \
|
||||
static u32_t name ## _lookahead_buffer[(lookahead_sz) / sizeof(u32_t)]; \
|
||||
static uint8_t __aligned(4) name ## _read_buffer[cache_sz]; \
|
||||
static uint8_t __aligned(4) name ## _prog_buffer[cache_sz]; \
|
||||
static uint32_t name ## _lookahead_buffer[(lookahead_sz) / sizeof(uint32_t)]; \
|
||||
static struct fs_littlefs name = { \
|
||||
.cfg = { \
|
||||
.read_size = (read_sz), \
|
||||
|
|
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
*
|
||||
* @param offset File system offset in flash
|
||||
* @param ate_wra: Allocation table entry write address. Addresses are stored
|
||||
* as u32_t: high 2 bytes are sector, low 2 bytes are offset in sector,
|
||||
* as uint32_t: high 2 bytes are sector, low 2 bytes are offset in sector,
|
||||
* @param data_wra: Data write address.
|
||||
* @param sector_size File system is divided into sectors each sector should be
|
||||
* multiple of pagesize
|
||||
|
@ -46,13 +46,13 @@ extern "C" {
|
|||
*/
|
||||
struct nvs_fs {
|
||||
off_t offset; /* filesystem offset in flash */
|
||||
u32_t ate_wra; /* next alloc table entry write address */
|
||||
u32_t data_wra; /* next data write address */
|
||||
u16_t sector_size; /* filesystem is divided into sectors,
|
||||
uint32_t ate_wra; /* next alloc table entry write address */
|
||||
uint32_t data_wra; /* next data write address */
|
||||
uint16_t sector_size; /* filesystem is divided into sectors,
|
||||
* sector size should be multiple of pagesize
|
||||
*/
|
||||
u16_t sector_count; /* amount of sectors in the filesystem */
|
||||
u8_t write_block_size; /* write block size for alignment */
|
||||
uint16_t sector_count; /* amount of sectors in the filesystem */
|
||||
uint8_t write_block_size; /* write block size for alignment */
|
||||
bool ready; /* is the filesystem initialized ? */
|
||||
|
||||
struct k_mutex nvs_lock;
|
||||
|
@ -106,7 +106,7 @@ int nvs_clear(struct nvs_fs *fs);
|
|||
* of bytes requested to be written. On error returns -ERRNO code.
|
||||
*/
|
||||
|
||||
ssize_t nvs_write(struct nvs_fs *fs, u16_t id, const void *data, size_t len);
|
||||
ssize_t nvs_write(struct nvs_fs *fs, uint16_t id, const void *data, size_t len);
|
||||
|
||||
/**
|
||||
* @brief nvs_delete
|
||||
|
@ -118,7 +118,7 @@ ssize_t nvs_write(struct nvs_fs *fs, u16_t id, const void *data, size_t len);
|
|||
* @retval 0 Success
|
||||
* @retval -ERRNO errno code if error
|
||||
*/
|
||||
int nvs_delete(struct nvs_fs *fs, u16_t id);
|
||||
int nvs_delete(struct nvs_fs *fs, uint16_t id);
|
||||
|
||||
/**
|
||||
* @brief nvs_read
|
||||
|
@ -135,7 +135,7 @@ int nvs_delete(struct nvs_fs *fs, u16_t id);
|
|||
* number of bytes requested to read this indicates not all bytes were read,
|
||||
* and more data is available. On error returns -ERRNO code.
|
||||
*/
|
||||
ssize_t nvs_read(struct nvs_fs *fs, u16_t id, void *data, size_t len);
|
||||
ssize_t nvs_read(struct nvs_fs *fs, uint16_t id, void *data, size_t len);
|
||||
|
||||
/**
|
||||
* @brief nvs_read_hist
|
||||
|
@ -153,8 +153,8 @@ ssize_t nvs_read(struct nvs_fs *fs, u16_t id, void *data, size_t len);
|
|||
* number of bytes requested to read this indicates not all bytes were read,
|
||||
* and more data is available. On error returns -ERRNO code.
|
||||
*/
|
||||
ssize_t nvs_read_hist(struct nvs_fs *fs, u16_t id, void *data, size_t len,
|
||||
u16_t cnt);
|
||||
ssize_t nvs_read_hist(struct nvs_fs *fs, uint16_t id, void *data, size_t len,
|
||||
uint16_t cnt);
|
||||
|
||||
/**
|
||||
* @brief nvs_calc_free_space
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue