Home
last modified time | relevance | path

Searched full:block (Results 1 – 25 of 399) sorted by relevance

12345678910>>...16

/nrf52832-nimble/rt-thread/components/drivers/src/
H A Dringblk_buf.c16 * ring block buffer object initialization
18 * @param rbb ring block buffer object
21 * @param block_set block set
22 * @param blk_max_num max block number
39 /* initialize block status */ in rt_rbb_init()
48 * ring block buffer object create
51 * @param blk_max_num max block number
53 * @return != NULL: ring block buffer object
90 * ring block buffer object destroy
92 * @param rbb ring block buffer object
[all …]
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/uffs/
H A Duffs_badblock.c35 * \brief bad block checking and recovering
48 dev->bad.block = UFFS_INVALID_BLOCK; in uffs_BadBlockInit()
53 * \brief process bad block: erase bad block, mark it as 'bad'
54 * and put the node to bad block list.
56 * \param[in] node bad block tree node
57 * (before the block turn 'bad', it must belong to something ...)
62 // mark the bad block in uffs_BadBlockProcess()
63 uffs_FlashMarkBadBlock(dev, dev->bad.block); in uffs_BadBlockProcess()
65 // and put it into bad block list in uffs_BadBlockProcess()
69 //clear bad block mark. in uffs_BadBlockProcess()
[all …]
H A Duffs_blockinfo.c35 * \brief block information cache system manipulations
51 * \brief before block info cache is enable,
70 "block info cache has been inited already, " in uffs_BlockInfoInitCache()
89 "Block cache buffer require %d but only %d available.", in uffs_BlockInfoInitCache()
108 //initialize block info in uffs_BlockInfoInitCache()
114 work->block = UFFS_INVALID_BLOCK; in uffs_BlockInfoInitCache()
121 work->block = UFFS_INVALID_BLOCK; in uffs_BlockInfoInitCache()
127 work->block = UFFS_INVALID_BLOCK; in uffs_BlockInfoInitCache()
145 * \brief release all allocated memory of block info cache,
157 "There have refed block info cache, release cache fail."); in uffs_BlockInfoReleaseCache()
[all …]
H A Duffs_tree.c146 return node->u.dir.block; in _GetBlockFromNode()
148 return node->u.file.block; in _GetBlockFromNode()
150 return node->u.data.block; in _GetBlockFromNode()
152 uffs_Perror(UFFS_MSG_SERIOUS, "unkown type, X-block"); in _GetBlockFromNode()
244 u16 block, parent, serial, block_alt, block_save; in _BuildValidTreeNode() local
253 // check the first page on the block ... in _BuildValidTreeNode()
261 "First page is clean in a non-erased block ?"); in _BuildValidTreeNode()
268 "first page in block %d is invalid, will be erased now!", in _BuildValidTreeNode()
269 bc->block); in _BuildValidTreeNode()
273 block = bc->block; in _BuildValidTreeNode()
[all …]
H A Duffs_flash.c371 * \param[in] block flash block num
381 int block, int page, uffs_Tags *tag) in uffs_FlashReadPageTag() argument
394 ret = ops->ReadPageWithLayout(dev, block, page, NULL, 0, NULL, tag ? &tag->s : NULL, NULL); in uffs_FlashReadPageTag()
399 ret = ops->ReadPage(dev, block, page, NULL, 0, NULL, in uffs_FlashReadPageTag()
428 * So we need to try tag ECC (don't treat it as bad block if ECC failed) in uffs_FlashReadPageTag()
460 uffs_BadBlockAdd(dev, block); in uffs_FlashReadPageTag()
462 "A new bad block (%d) is detected.", block); in uffs_FlashReadPageTag()
474 * \param[in] block flash block num
475 * \param[in] page flash page num of the block
488 int uffs_FlashReadPage(uffs_Device *dev, int block, int page, uffs_Buf *buf, UBOOL skip_ecc) in uffs_FlashReadPage() argument
[all …]
H A Duffs_buf.c384 * \param[in] block psychical block number
389 URET uffs_BufLoadPhyData(uffs_Device *dev, uffs_Buf *buf, u32 block, u32 page) in uffs_BufLoadPhyData() argument
393 ret = uffs_FlashReadPage(dev, block, page, buf, U_FALSE); in uffs_BufLoadPhyData()
410 * \param[in] block psychical block number
414 * \note this function should be only used when doing bad block recover.
417 uffs_Buf *buf, u32 block, u32 page) in uffs_LoadPhyDataToBufEccUnCare() argument
421 ret = uffs_FlashReadPage(dev, block, page, buf, U_TRUE); in uffs_LoadPhyDataToBufEccUnCare()
598 * \brief flush buffer with block recover
601 * 1. get a free (erased) block --> newNode <br>
602 * 2. copy from old block ---> oldNode, or copy from dirty list, <br>
[all …]
H A Duffs_public.c66 "the two block have the same time stamp ?"); in uffs_IsSrcNewerThanObj()
84 * \brief given a page, search the block to find
88 * \param[in] bc block info
129 * \param[in] bc block info
153 * Are all the pages in the block used ?
159 // if the last page is dirty, then the whole block is full in uffs_IsBlockPagesFullUsed()
167 * Is this block used ?
169 * \param[in] bc block info
170 * \retval U_TRUE block is used
171 * \retval U_FALSE block is free
[all …]
H A Duffs_utils.c90 static void _ForceFormatAndCheckBlock(uffs_Device *dev, int block) in _ForceFormatAndCheckBlock() argument
112 ret = uffs_FlashEraseBlock(dev, block); in _ForceFormatAndCheckBlock()
122 ret = ops->WritePageWithLayout(dev, block, i, buf->header, dev->com.pg_size, NULL, &ts); in _ForceFormatAndCheckBlock()
124 ret = ops->WritePage(dev, block, i, buf->header, dev->com.pg_size, spare, dev->attr->spare_size); in _ForceFormatAndCheckBlock()
135 ret = ops->ReadPageWithLayout(dev, block, i, buf->header, dev->com.pg_size, NULL, &ts, NULL); in _ForceFormatAndCheckBlock()
146 …ret = ops->ReadPage(dev, block, i, buf->header, dev->com.pg_size, NULL, spare, dev->attr->spare_si… in _ForceFormatAndCheckBlock()
159 ret = uffs_FlashEraseBlock(dev, block); in _ForceFormatAndCheckBlock()
169 ret = ops->ReadPageWithLayout(dev, block, i, buf->header, dev->com.pg_size, NULL, &ts, NULL); in _ForceFormatAndCheckBlock()
180 …ret = ops->ReadPage(dev, block, i, buf->header, dev->com.pg_size, NULL, spare, dev->attr->spare_si… in _ForceFormatAndCheckBlock()
197 uffs_FlashMarkBadBlock(dev, block); in _ForceFormatAndCheckBlock()
[all …]
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/inc/uffs/
H A Duffs_flash.h73 #define UFFS_FLASH_BAD_BLK -3 //!< bad block
102 u16 pages_per_block; //!< pages per block
104 u8 block_status_offs; //!< block status byte offset in spare
151 …* #UFFS_FLASH_BAD_BLK: if the block is a bad block (e.g., the bad block mark byte is not …
154 * then read bad block mark and return UFFS_FLASH_BAD_BLK if bad block mark is not 0xFF.
158 int (*ReadPage)(uffs_Device *dev, u32 block, u32 page, u8 *data, int data_len, u8 *ecc,
179 …* #UFFS_FLASH_BAD_BLK: if the block is a bad block (e.g., the bad block mark byte is not …
183 * then read bad block mark and return UFFS_FLASH_BAD_BLK if bad block mark is not 0xFF.
188 int (*ReadPageWithLayout)(uffs_Device *dev, u32 block, u32 page, u8* data, int data_len, u8 *ecc,
198 * \note If data == NULL && spare == NULL, driver should mark this block as a 'bad block'.
[all …]
H A Duffs_blockinfo.h34 * \brief data structure for operating block information
59 * \brief block information data. Block info is frequently accessed,
60 UFFS use a cache system to speed up block info access.
65 u16 block; //!< block number member
67 int expired_count; //!< how many pages expired in this block ?
68 …int ref_count; //!< reference counter, it's safe to reuse this block memory when the counter …
71 /** get tag from block info */
75 /** initialize block info caches */
78 /** release block info caches */
81 /** load page spare to block info cache */
[all …]
H A Duffs_tree.h67 u16 block; member
69 u16 serial; /* for suspended block list */
70 u8 need_check; /* for erased block list */
76 u16 block; member
83 u16 block; member
91 u16 block; member
93 u32 len; /* file data length on this block */
118 u8 offs; //the offset of this file header on FILE block
130 u16 block;
147 #define MAX_UFFS_FDN 0x3fff //!< maximum file data block serial numbers (uffs_TagStore#serial: 14…
[all …]
H A Duffs_badblock.h34 * \brief bad block management
50 #define HAVE_BADBLOCK(dev) (dev->bad.block != UFFS_INVALID_BLOCK)
52 /** initialize bad block management data structures for uffs device */
55 /** processing bad block: erase bad block,
56 mark it as 'bad' and put it to bad block list */
59 /** processing bad block: erase bad block,
60 mark it as 'bad' and put it to suspend block list */
63 /** try to recover data from a new discovered bad block */
66 /** put a new block to the bad block waiting list */
67 void uffs_BadBlockAdd(uffs_Device *dev, int block);
/nrf52832-nimble/nordic/nrfx/hal/
H A Dnrf_vmc.h48 /** @brief Power configuration bits for each section in particular RAM block. */
51 …_S0POWER_Msk, ///< Keep retention on RAM section S0 of the particular RAM block when RAM section i…
52 …_S1POWER_Msk, ///< Keep retention on RAM section S1 of the particular RAM block when RAM section i…
53 …_S2POWER_Msk, ///< Keep retention on RAM section S2 of the particular RAM block when RAM section i…
54 …_S3POWER_Msk, ///< Keep retention on RAM section S3 of the particular RAM block when RAM section i…
57 /** @brief Retention configuration bits for each section in particular RAM block. */
60 …RAM_POWER_S0RETENTION_Msk, ///< Keep RAM section S0 of the particular RAM block on or off in Syste…
61 …RAM_POWER_S1RETENTION_Msk, ///< Keep RAM section S1 of the particular RAM block on or off in Syste…
62 …RAM_POWER_S2RETENTION_Msk, ///< Keep RAM section S2 of the particular RAM block on or off in Syste…
63 …RAM_POWER_S3RETENTION_Msk, ///< Keep RAM section S3 of the particular RAM block on or off in Syste…
[all …]
H A Dnrf_power.h198 NRF_POWER_ONRAM0, /**< Keep RAM block 0 on or off in system ON Mode */
199 NRF_POWER_OFFRAM0, /**< Keep retention on RAM block 0 when RAM block is switched off */
200 NRF_POWER_ONRAM1, /**< Keep RAM block 1 on or off in system ON Mode */
201 NRF_POWER_OFFRAM1, /**< Keep retention on RAM block 1 when RAM block is switched off */
202 NRF_POWER_ONRAM2, /**< Keep RAM block 2 on or off in system ON Mode */
203 NRF_POWER_OFFRAM2, /**< Keep retention on RAM block 2 when RAM block is switched off */
204 NRF_POWER_ONRAM3, /**< Keep RAM block 3 on or off in system ON Mode */
205 NRF_POWER_OFFRAM3, /**< Keep retention on RAM block 3 when RAM block is switched off */
215 …NRF_POWER_ONRAM0_MASK = 1U << NRF_POWER_ONRAM0, /**< Keep RAM block 0 on or off in system ON Mod…
216 …FRAM0_MASK = 1U << NRF_POWER_OFFRAM0, /**< Keep retention on RAM block 0 when RAM block is switche…
[all …]
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/emu/
H A Duffs_fileem_wrap.c58 int block; member
65 #define FILEEMU_STOCK_BAD_BLOCKS {5, 180} // bad block come from manufacture
66 #define FILEEMU_ERASE_BAD_BLOCKS {100, 150} // new bad block discovered when erasing
71 {20, 2, 10, 1 << 4}, /* block 20, page 2, offset 10, bit 4 */ \
72 {24, 4, -3, 1 << 2}, /* block 24, page 4, spare offset 3, bit 2*/ \
73 {60, 1, 5, 1 << 3}, /* block 60, page 1, offset 5, bit 3 */ \
74 {66, 1, 15, 1 << 7}, /* block 66, page 1, offset 300, bit 7 */ \
75 {80, 2, 2, 1 << 1}, /* block 80, page 2, offset 2, bit 1 */ \
76 {88, 2, 100, 1 << 5}, /* block 88, page 2, offset 100, bit 5 */ \
82 static int femu_ReadPage_wrap(uffs_Device *dev, u32 block, u32 page, u8 *data, int data_len, u8 *ec…
[all …]
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/include/os/
H A Dos_mempool.h40 * A memory block structure. This simply contains a pointer to the free list
41 * chain and is only used when the block is on the free list. When the block
42 * has been removed from the free list the entire memory block is usable by the
72 /** Name for memory block */
85 * Block put callback function. If configured, this callback gets executed
86 * whenever a block is freed to the corresponding extended mempool. Note: The
87 * os_memblock_put() function calls this callback instead of freeing the block
88 * itself. Therefore, it is the callback's responsibility to free the block
91 * @param ome The extended mempool that a block is being
93 * @param data The block being freed.
[all …]
/nrf52832-nimble/rt-thread/components/lwp/
H A Dlwp_memheap.c14 * 2013-07-11 Grissiom fix the memory block splitting issue.
37 * | whole freed memory block | Used Memory Block Tailer |
40 * block_list --> whole freed memory block
42 * The length of Used Memory Block Tailer is 0,
43 * which is prevents block merging across list
72 /* initialize the first big memory block */ in rt_lwp_memheap_init()
85 /* block list header */ in rt_lwp_memheap_init()
88 /* place the big memory block to free list */ in rt_lwp_memheap_init()
94 /* move to the end of memory pool to build a small tailer block, in rt_lwp_memheap_init()
95 * which prevents block merging in rt_lwp_memheap_init()
[all …]
/nrf52832-nimble/rt-thread/components/net/uip/lib/
H A Dmemb.h37 * \defgroup memb Memory block management functions
39 * The memory block allocation routines provide a simple yet powerful
48 * block is local to each C module.
50 * The following example shows how to declare and use a memory block
60 * Memory block allocation routines.
78 * Declare a memory block.
80 * This macro is used to staticall declare a block of memory that can
81 * be used by the block allocation functions. The macro statically
90 * \param name The name of the memory block (later used with
95 * \param num The total number of memory chunks in the block.
[all …]
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/src/
H A Dos_mempool.c181 struct os_memblock *block; in os_mempool_is_sane() local
183 /* Verify that each block in the free list belongs to the mempool. */ in os_mempool_is_sane()
184 SLIST_FOREACH(block, mp, mb_next) { in os_mempool_is_sane()
185 if (!os_memblock_from(mp, block)) { in os_mempool_is_sane()
188 os_mempool_poison_check(block, OS_MEMPOOL_TRUE_BLOCK_SIZE(mp)); in os_mempool_is_sane()
208 /* Check that the block is in the memory buffer range. */ in os_memblock_from()
213 /* All freed blocks should be on true block size boundaries! */ in os_memblock_from()
225 struct os_memblock *block; in os_memblock_get() local
228 block = NULL; in os_memblock_get()
233 /* Get a free block */ in os_memblock_get()
[all …]
/nrf52832-nimble/rt-thread/src/
H A Dmemheap.c18 * 2013-07-11 Grissiom fix the memory block splitting issue.
42 * | whole freed memory block | Used Memory Block Tailer |
45 * block_list --> whole freed memory block
47 * The length of Used Memory Block Tailer is 0,
48 * which is prevents block merging across list
79 /* initialize the first big memory block */ in rt_memheap_init()
92 /* block list header */ in rt_memheap_init()
95 /* place the big memory block to free list */ in rt_memheap_init()
101 /* move to the end of memory pool to build a small tailer block, in rt_memheap_init()
102 * which prevents block merging in rt_memheap_init()
[all …]
H A Dmempool.c10 * 2006-06-30 Bernard fix the allocate/free block bug
25 static void (*rt_mp_alloc_hook)(struct rt_mempool *mp, void *block);
26 static void (*rt_mp_free_hook)(struct rt_mempool *mp, void *block);
36 * block is allocated from memory pool.
40 void rt_mp_alloc_sethook(void (*hook)(struct rt_mempool *mp, void *block)) in rt_mp_alloc_sethook() argument
47 * block is released to memory pool.
51 void rt_mp_free_sethook(void (*hook)(struct rt_mempool *mp, void *block)) in rt_mp_free_sethook() argument
73 * @param block_size the size for each block
96 /* align the block size */ in rt_mp_init()
108 /* initialize free block list */ in rt_mp_init()
[all …]
/nrf52832-nimble/rt-thread/examples/test/
H A Drbb_test.c35 rt_rbb_blk_t block; in put_thread() local
46 block = rt_rbb_blk_alloc(rbb, rand() % 10 + 1); in put_thread()
47 if (block) in put_thread()
49 block->buf[0] = put_count++; in put_thread()
50 rt_rbb_blk_put(block); in put_thread()
54 rt_kprintf("Put block data finish.\n"); in put_thread()
62 rt_rbb_blk_t block; in get_thread() local
71 block = rt_rbb_blk_get(rbb); in get_thread()
72 if (block) in get_thread()
74 if (block->buf[0] != get_count++) in get_thread()
[all …]
/nrf52832-nimble/rt-thread/components/drivers/include/ipc/
H A Dringblk_buf.h18 * is very suitable for put block and get block by a certain order. Such as DMA block transmit,
40 * the block of rbb
53 …* Rbb block queue: the blocks (from block1->buf to blockn->buf) memory which on this queue is cont…
63 * ring block buffer
77 /* rbb (ring block buffer) API */
83 /* rbb block API */
85 void rt_rbb_blk_put(rt_rbb_blk_t block);
87 rt_size_t rt_rbb_blk_size(rt_rbb_blk_t block);
88 rt_uint8_t *rt_rbb_blk_buf(rt_rbb_blk_t block);
89 void rt_rbb_blk_free(rt_rbb_t rbb, rt_rbb_blk_t block);
[all …]
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/
H A Duffs_nandif.c18 static int nand_erase_block(uffs_Device *dev, unsigned block) in nand_erase_block() argument
22 res = rt_mtd_nand_erase_block(RT_MTD_NAND_DEVICE(dev->_private), block); in nand_erase_block()
28 static int nand_check_block(uffs_Device *dev, unsigned block) in nand_check_block() argument
32 res = rt_mtd_nand_check_block(RT_MTD_NAND_DEVICE(dev->_private), block); in nand_check_block()
37 static int nand_mark_badblock(uffs_Device *dev, unsigned block) in nand_mark_badblock() argument
41 res = rt_mtd_nand_mark_badblock(RT_MTD_NAND_DEVICE(dev->_private), block); in nand_mark_badblock()
49 u32 block, in nand_read_page() argument
59 page = block * dev->attr->pages_per_block + page; in nand_read_page()
65 /* check block status: bad or good */ in nand_read_page()
88 u32 block, in nand_write_page() argument
[all …]
/nrf52832-nimble/rt-thread/components/drivers/include/drivers/
H A Dmtd_nand.h41 rt_uint32_t pages_per_block; /* The number of page a block */
44 rt_uint32_t block_start; /* The start of available block*/
45 rt_uint32_t block_end; /* The end of available block */
66 rt_err_t (*erase_block)(struct rt_mtd_nand_device* device, rt_uint32_t block);
67 rt_err_t (*check_block)(struct rt_mtd_nand_device* device, rt_uint32_t block);
68 rt_err_t (*mark_badblock)(struct rt_mtd_nand_device* device, rt_uint32_t block);
102 rt_inline rt_err_t rt_mtd_nand_erase_block(struct rt_mtd_nand_device* device, rt_uint32_t block) in rt_mtd_nand_erase_block() argument
104 return device->ops->erase_block(device, block); in rt_mtd_nand_erase_block()
107 rt_inline rt_err_t rt_mtd_nand_check_block(struct rt_mtd_nand_device* device, rt_uint32_t block) in rt_mtd_nand_check_block() argument
109 return device->ops->check_block(device, block); in rt_mtd_nand_check_block()
[all …]

12345678910>>...16