Jump to content

How to check if SD card is Inserted/Removed


ron123456

Recommended Posts

Hi, I am trying to write a program which will detect the presence of SD Card in Nano Pi M1 plus device. 

There are many ways to do this either by doing fdisk -l or looking into /dev/mmcblk* .

But I want to keep running it in a loop and doing fdisk -l and grep doesn't seems an appropriate way.

 

Can the insertion or removal of SD cards be checked via Hardware Interrupts? Plz. help me I am a newbie. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines