echo "==============================================================" echo "Test application to test whether MMC/SD card is in slot or not" echo "==============================================================" echo -n "GPIO pin number to be used (64 for MMC/SD card detection): " read pin_no echo $pin_no > /sys/class/gpio/export is_card_present=`cat /sys/class/gpio/gpio64/value` if [ $is_card_present -eq 1 ] then echo "Card is *NOT* present" else echo "Card is present" fi echo $pin_no > /sys/class/gpio/unexport