keil_examples/USBHostLite/UsbHost/Fat/usbhost_fat.c
/*
**************************************************************************************************************
*                                          GET SHORT FILE NAME OF A FILE
*
* Description: This function reads the short file name of a file
*
* Arguments  : ent_buf  buffer which contains the 32 byte entry of a file
*              name     buffer to store the short file name of a file
*
* Returns    : None
*
**************************************************************************************************************
*/
GET SHORT FILE NAME OF A FILE
Description: This function reads the short file name of a file

Arguments  : ent_buf  buffer which contains the 32 byte entry of a file
name     buffer to store the short file name of a file

Returns    : None
GET SHORT FILE NAME OF A FILE Description : This function reads the short file name of a file Arguments : ent_buf buffer which contains the 32 byte entry of a file name buffer to store the short file name of a file Returns : None
void  FAT_GetSfnName (volatile  uint8_t  *entry,
                                uint8_t  *name)
{
    uint32_t  cnt;
    cnt = 0;
    while (cnt < 8) {
        *name = *entry;                     
        name++;
        entry++;
        cnt++;
    }
    *name = 0;
    name--;
    while (*name == 0x20) {                 
        *name = 0;
        name--;
    }
}
void FAT_GetSfnName ( volatile uint8_t * entry , uint8_t * name ) { uint32_t cnt ; cnt = 0 ; while ( cnt < 8 ) { * name = * entry ; name ++ ; entry ++ ; cnt ++ ; } * name = 0 ; name -- ; while ( * name == 0x20 ) { * name = 0 ; name -- ; } }
GET SHORT FILE NAME OF A FILE
Description: This function reads the short file name of a file
GET SHORT FILE NAME OF A FILE Description : This function reads the short file name of a file
/* Get first 8 charecters of an SFN entry                       */ /* If any spaces exist after the file name, replace them with 0 */