AP_logger how to add SDcard to hwdef.dat

I want to add an SD card device to my homemade system, I have been bothered for too long, there is too little information about the SD card as well as log, if I want to add an SD card, I should use that, block, file, dateflash