/* Return true if CD pin is configured and is high.  */
static bool card_missing(int slot)
/* Return true if CD pin is configured and is high.  */
static bool card_missing(int slot)
{
    if (s_slots[slot].gpio_cd == GPIO_UNUSED) {
        return false;
    }
    return gpio_get_level(s_slots[slot].gpio_cd) == 1;
}