fatfs/src/ff.c
static FRESULT fill_last_frag (
	FFOBJID* obj,	/* Pointer to the corresponding object */
	DWORD lcl,		/* Last cluster of the fragment */
	DWORD term		/* Value to set the last FAT entry */
)
{
	FRESULT res;


	while (obj->n_frag > 0) {	/* Create the chain of last fragment */
		res = put_fat(obj->fs, lcl - obj->n_frag + 1, (obj->n_frag > 1) ? lcl - obj->n_frag + 2 : term);
		if (res != FR_OK) return res;
		obj->n_frag--;
	}
	return FR_OK;
}
/*---------------------------------------------*/
/* Fill the last fragment of the FAT chain     */
/*---------------------------------------------*/
Fill the last fragment of the FAT chain
Fill the last fragment of the FAT chain
static FRESULT fill_last_frag (
	FFOBJID* obj,	
	DWORD lcl,		
	DWORD term		
)
{
	FRESULT res;
	while (obj->n_frag > 0) {	
		res = put_fat(obj->fs, lcl - obj->n_frag + 1, (obj->n_frag > 1) ? lcl - obj->n_frag + 2 : term);
		if (res != FR_OK) return res;
		obj->n_frag--;
	}
	return FR_OK;
}
static FRESULT fill_last_frag ( FFOBJID * obj , DWORD lcl , DWORD term ) { FRESULT res ; while ( obj -> n_frag > 0 ) { res = put_fat ( obj -> fs , lcl - obj -> n_frag + 1 , ( obj -> n_frag > 1 ) ? lcl - obj -> n_frag + 2 : term ) ; if ( res != FR_OK ) return res ; obj -> n_frag -- ; } return FR_OK ; }
Fill the last fragment of the FAT chain
Fill the last fragment of the FAT chain
/* Pointer to the corresponding object */ /* Last cluster of the fragment */ /* Value to set the last FAT entry */ /* Create the chain of last fragment */